This repository was archived by the owner on Mar 19, 2024. It is now read-only.
4.0.0
·
24 commits
to master
since this release
- Added:
- Added property
productSkuto request typeOrderLineDetails. - Added call
captures.refund.
- Added property
- Changed:
- Rewrote the SDK in TypeScript. This adds types to parameters and response values. For domain objects, all properties are marked as optional. This is done to prevent issues like #5.
The rewrite is almost fully backward compatible, even if you're already using TypeScript. For this reason, the response body has typeany. You can cast it to the right type using theaskeyword if necessary. Since all properties are marked as optional, this may require using the!or?operators, depending on your TypeScript settings. For instance:paymentResponse.payment!.id!.
Despite our attempts to prevent any breaking changes, the following changes are still breaking:requireorimportstatements for anything other thanconnect-sdk-nodejsneed to have an additionallibadded. For instance,require("connect-sdk-nodejs/lib/utils/context"). The same objects are exported; export assignments are used instead of default exports.- The API version is no longer available on the context or webhooks helper as property
API_VERSION, as it was intended for internal use only. If this is still needed, it can be imported usingrequire("connect-sdk-nodejs/lib/utils/versions").apiVersionorimport { apiVersion } from "connect-sdk-nodejs/lib/utils/versions".
- The integrator has been made required when initializing the SDK. This must be done using property
integrator, which could already be used; the old incorrectly namedintergratorproperty is no longer supported. - Replaced dependency
node-uuidwithuuid.
- Rewrote the SDK in TypeScript. This adds types to parameters and response values. For domain objects, all properties are marked as optional. This is done to prevent issues like #5.