@wix/auto_sdk_ecom_order-fulfillments 1.0.26 → 1.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +6 -6
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +8 -6
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +6 -6
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +8 -6
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +6 -6
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +8 -6
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.d.mts +6 -6
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +8 -6
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ interface ListFulfillmentsForSingleOrderSignature {
|
|
|
11
11
|
* The `listFulfillmentsForSingleOrder()` function returns a Promise that resolves when the fulfillments are retrieved.
|
|
12
12
|
* @param - Order ID for which to retrieve fulfillments.
|
|
13
13
|
*/
|
|
14
|
-
(orderId: string): Promise<NonNullablePaths<ListFulfillmentsForSingleOrderResponse, `orderWithFulfillments.orderId` | `orderWithFulfillments.fulfillments
|
|
14
|
+
(orderId: string): Promise<NonNullablePaths<ListFulfillmentsForSingleOrderResponse, `orderWithFulfillments.orderId` | `orderWithFulfillments.fulfillments`, 3>>;
|
|
15
15
|
}
|
|
16
16
|
declare function listFulfillmentsForMultipleOrders$1(httpClient: HttpClient): ListFulfillmentsForMultipleOrdersSignature;
|
|
17
17
|
interface ListFulfillmentsForMultipleOrdersSignature {
|
|
@@ -22,7 +22,7 @@ interface ListFulfillmentsForMultipleOrdersSignature {
|
|
|
22
22
|
* The `listFulfillmentsForMultipleOrders()` function returns a Promise that resolves when the fulfillments are retrieved.
|
|
23
23
|
* @param - List of order IDs for which to retrieve fulfillments.
|
|
24
24
|
*/
|
|
25
|
-
(orderIds: string[]): Promise<NonNullablePaths<ListFulfillmentsForMultipleOrdersResponse, `ordersWithFulfillments` | `ordersWithFulfillments.${number}.orderId
|
|
25
|
+
(orderIds: string[]): Promise<NonNullablePaths<ListFulfillmentsForMultipleOrdersResponse, `ordersWithFulfillments` | `ordersWithFulfillments.${number}.orderId`, 4>>;
|
|
26
26
|
}
|
|
27
27
|
declare function createFulfillment$1(httpClient: HttpClient): CreateFulfillmentSignature;
|
|
28
28
|
interface CreateFulfillmentSignature {
|
|
@@ -34,7 +34,7 @@ interface CreateFulfillmentSignature {
|
|
|
34
34
|
* @param - Order ID.
|
|
35
35
|
* @param - Fulfillment info.
|
|
36
36
|
*/
|
|
37
|
-
(orderId: string, fulfillment: NonNullablePaths<Fulfillment, `lineItems` | `lineItems.${number}._id
|
|
37
|
+
(orderId: string, fulfillment: NonNullablePaths<Fulfillment, `lineItems` | `lineItems.${number}._id`, 4>): Promise<NonNullablePaths<CreateFulfillmentResponse, `orderWithFulfillments.orderId` | `orderWithFulfillments.fulfillments` | `fulfillmentId`, 3> & {
|
|
38
38
|
__applicationErrorsType?: CreateFulfillmentApplicationErrors;
|
|
39
39
|
}>;
|
|
40
40
|
}
|
|
@@ -53,7 +53,7 @@ interface UpdateFulfillmentSignature {
|
|
|
53
53
|
* @param - Available options to use when updating a fulfillment.
|
|
54
54
|
* @returns Order ID and the orders' associated fulfillments after update.
|
|
55
55
|
*/
|
|
56
|
-
(identifiers: NonNullablePaths<UpdateFulfillmentIdentifiers, `fulfillmentId` | `orderId
|
|
56
|
+
(identifiers: NonNullablePaths<UpdateFulfillmentIdentifiers, `fulfillmentId` | `orderId`, 2>, options?: UpdateFulfillmentOptions): Promise<NonNullablePaths<OrderWithFulfillments, `orderId` | `fulfillments`, 2> & {
|
|
57
57
|
__applicationErrorsType?: UpdateFulfillmentApplicationErrors;
|
|
58
58
|
}>;
|
|
59
59
|
}
|
|
@@ -66,7 +66,7 @@ interface DeleteFulfillmentSignature {
|
|
|
66
66
|
* The `deleteFulfillment()` function returns a Promise that resolves when the fulfillment is deleted.
|
|
67
67
|
* @param - Order and fulfillment IDs.
|
|
68
68
|
*/
|
|
69
|
-
(identifiers: NonNullablePaths<DeleteFulfillmentIdentifiers, `fulfillmentId` | `orderId
|
|
69
|
+
(identifiers: NonNullablePaths<DeleteFulfillmentIdentifiers, `fulfillmentId` | `orderId`, 2>): Promise<NonNullablePaths<DeleteFulfillmentResponse, `orderWithFulfillments.orderId` | `orderWithFulfillments.fulfillments`, 3>>;
|
|
70
70
|
}
|
|
71
71
|
declare function bulkCreateFulfillments$1(httpClient: HttpClient): BulkCreateFulfillmentsSignature;
|
|
72
72
|
interface BulkCreateFulfillmentsSignature {
|
|
@@ -77,7 +77,7 @@ interface BulkCreateFulfillmentsSignature {
|
|
|
77
77
|
* The `bulkCreateFulfillments()` function returns a Promise that resolves when the fulfillments are created.
|
|
78
78
|
* @param - List of order IDs and their associated fulfillments' info.
|
|
79
79
|
*/
|
|
80
|
-
(ordersWithFulfillments: NonNullablePaths<BulkCreateOrderWithFulfillments, `fulfillments` | `fulfillments.${number}.lineItems` | `fulfillments.${number}.lineItems.${number}._id` | `orderId
|
|
80
|
+
(ordersWithFulfillments: NonNullablePaths<BulkCreateOrderWithFulfillments, `fulfillments` | `fulfillments.${number}.lineItems` | `fulfillments.${number}.lineItems.${number}._id` | `orderId`, 6>[]): Promise<NonNullablePaths<BulkCreateFulfillmentResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.ordersWithFulfillments.orderId` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
|
|
81
81
|
}
|
|
82
82
|
declare const onFulfillmentsUpdated$1: EventDefinition<FulfillmentsUpdatedEnvelope, "wix.ecom.v1.fulfillments_updated">;
|
|
83
83
|
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/ecom-v1-fulfillments-order-fulfillments.public.ts","../../src/ecom-v1-fulfillments-order-fulfillments.universal.ts","../../src/ecom-v1-fulfillments-order-fulfillments.http.ts","../../src/ecom-v1-fulfillments-order-fulfillments.context.ts"],"sourcesContent":["export * from './src/ecom-v1-fulfillments-order-fulfillments.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n BulkCreateFulfillmentResponse,\n BulkCreateOrderWithFulfillments,\n CreateFulfillmentApplicationErrors,\n CreateFulfillmentResponse,\n DeleteFulfillmentIdentifiers,\n DeleteFulfillmentResponse,\n Fulfillment,\n FulfillmentsUpdatedEnvelope,\n ListFulfillmentsForMultipleOrdersResponse,\n ListFulfillmentsForSingleOrderResponse,\n OrderWithFulfillments,\n UpdateFulfillmentApplicationErrors,\n UpdateFulfillmentIdentifiers,\n UpdateFulfillmentOptions,\n bulkCreateFulfillments as universalBulkCreateFulfillments,\n createFulfillment as universalCreateFulfillment,\n deleteFulfillment as universalDeleteFulfillment,\n listFulfillmentsForMultipleOrders as universalListFulfillmentsForMultipleOrders,\n listFulfillmentsForSingleOrder as universalListFulfillmentsForSingleOrder,\n updateFulfillment as universalUpdateFulfillment,\n} from './ecom-v1-fulfillments-order-fulfillments.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/ecom' };\n\nexport function listFulfillmentsForSingleOrder(\n httpClient: HttpClient\n): ListFulfillmentsForSingleOrderSignature {\n return (orderId: string) =>\n universalListFulfillmentsForSingleOrder(\n orderId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListFulfillmentsForSingleOrderSignature {\n /**\n * Retrieves fulfillments associated with a specified order.\n *\n *\n * The `listFulfillmentsForSingleOrder()` function returns a Promise that resolves when the fulfillments are retrieved.\n * @param - Order ID for which to retrieve fulfillments.\n */\n (orderId: string): Promise<\n NonNullablePaths<\n ListFulfillmentsForSingleOrderResponse,\n `orderWithFulfillments.orderId` | `orderWithFulfillments.fulfillments`\n >\n >;\n}\n\nexport function listFulfillmentsForMultipleOrders(\n httpClient: HttpClient\n): ListFulfillmentsForMultipleOrdersSignature {\n return (orderIds: string[]) =>\n universalListFulfillmentsForMultipleOrders(\n orderIds,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListFulfillmentsForMultipleOrdersSignature {\n /**\n * Retrieves fulfillments associated with multiple specified orders.\n *\n *\n * The `listFulfillmentsForMultipleOrders()` function returns a Promise that resolves when the fulfillments are retrieved.\n * @param - List of order IDs for which to retrieve fulfillments.\n */\n (orderIds: string[]): Promise<\n NonNullablePaths<\n ListFulfillmentsForMultipleOrdersResponse,\n `ordersWithFulfillments` | `ordersWithFulfillments.${number}.orderId`\n >\n >;\n}\n\nexport function createFulfillment(\n httpClient: HttpClient\n): CreateFulfillmentSignature {\n return (\n orderId: string,\n fulfillment: NonNullablePaths<\n Fulfillment,\n `lineItems` | `lineItems.${number}._id`\n >\n ) =>\n universalCreateFulfillment(\n orderId,\n fulfillment,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateFulfillmentSignature {\n /**\n * Creates an order fulfillment.\n *\n *\n * The `createFulfillment()` function returns a Promise that resolves when the fulfillment is created.\n * @param - Order ID.\n * @param - Fulfillment info.\n */\n (\n orderId: string,\n fulfillment: NonNullablePaths<\n Fulfillment,\n `lineItems` | `lineItems.${number}._id`\n >\n ): Promise<\n NonNullablePaths<\n CreateFulfillmentResponse,\n | `orderWithFulfillments.orderId`\n | `orderWithFulfillments.fulfillments`\n | `fulfillmentId`\n > & {\n __applicationErrorsType?: CreateFulfillmentApplicationErrors;\n }\n >;\n}\n\nexport function updateFulfillment(\n httpClient: HttpClient\n): UpdateFulfillmentSignature {\n return (\n identifiers: NonNullablePaths<\n UpdateFulfillmentIdentifiers,\n `fulfillmentId` | `orderId`\n >,\n options?: UpdateFulfillmentOptions\n ) =>\n universalUpdateFulfillment(\n identifiers,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateFulfillmentSignature {\n /**\n * Updates a fulfillment's properties.\n * To update a field's value, include the new value in the `fulfillment` field in the body params.\n * To remove a field's value, pass `null`.\n *\n *\n * The `updateFulfillment()` function returns a Promise that resolves when the fulfillment is updated.\n *\n * > **Note:** Updating line item IDs or fulfilled quantities is not allowed. To update line item IDs or quantities, delete the fulfillment and create it again.\n * @param - Order and fulfillment IDs to be updated.\n * @param - Available options to use when updating a fulfillment.\n * @returns Order ID and the orders' associated fulfillments after update.\n */\n (\n identifiers: NonNullablePaths<\n UpdateFulfillmentIdentifiers,\n `fulfillmentId` | `orderId`\n >,\n options?: UpdateFulfillmentOptions\n ): Promise<\n NonNullablePaths<OrderWithFulfillments, `orderId` | `fulfillments`> & {\n __applicationErrorsType?: UpdateFulfillmentApplicationErrors;\n }\n >;\n}\n\nexport function deleteFulfillment(\n httpClient: HttpClient\n): DeleteFulfillmentSignature {\n return (\n identifiers: NonNullablePaths<\n DeleteFulfillmentIdentifiers,\n `fulfillmentId` | `orderId`\n >\n ) =>\n universalDeleteFulfillment(\n identifiers,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteFulfillmentSignature {\n /**\n * Deletes an existing order fulfillment.\n *\n *\n * The `deleteFulfillment()` function returns a Promise that resolves when the fulfillment is deleted.\n * @param - Order and fulfillment IDs.\n */\n (\n identifiers: NonNullablePaths<\n DeleteFulfillmentIdentifiers,\n `fulfillmentId` | `orderId`\n >\n ): Promise<\n NonNullablePaths<\n DeleteFulfillmentResponse,\n `orderWithFulfillments.orderId` | `orderWithFulfillments.fulfillments`\n >\n >;\n}\n\nexport function bulkCreateFulfillments(\n httpClient: HttpClient\n): BulkCreateFulfillmentsSignature {\n return (\n ordersWithFulfillments: NonNullablePaths<\n BulkCreateOrderWithFulfillments,\n | `fulfillments`\n | `fulfillments.${number}.lineItems`\n | `fulfillments.${number}.lineItems.${number}._id`\n | `orderId`\n >[]\n ) =>\n universalBulkCreateFulfillments(\n ordersWithFulfillments,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkCreateFulfillmentsSignature {\n /**\n * Creates multiple fulfillments for one or more orders.\n *\n *\n * The `bulkCreateFulfillments()` function returns a Promise that resolves when the fulfillments are created.\n * @param - List of order IDs and their associated fulfillments' info.\n */\n (\n ordersWithFulfillments: NonNullablePaths<\n BulkCreateOrderWithFulfillments,\n | `fulfillments`\n | `fulfillments.${number}.lineItems`\n | `fulfillments.${number}.lineItems.${number}._id`\n | `orderId`\n >[]\n ): Promise<\n NonNullablePaths<\n BulkCreateFulfillmentResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.ordersWithFulfillments.orderId`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`\n >\n >;\n}\n\nexport const onFulfillmentsUpdated = EventDefinition(\n 'wix.ecom.v1.fulfillments_updated',\n true,\n (event: FulfillmentsUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.fulfillments.createdDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<FulfillmentsUpdatedEnvelope>();\n\nexport {\n ActionEvent,\n ApplicationError,\n BaseEventMetadata,\n BulkActionMetadata,\n BulkCreateFulfillmentRequest,\n BulkCreateFulfillmentResponse,\n BulkCreateOrderWithFulfillments,\n BulkOrderFulfillmentsResult,\n BuyerInfo,\n CreateFulfillmentRequest,\n CreateFulfillmentResponse,\n CustomFulfillmentInfo,\n DeleteFulfillmentIdentifiers,\n DeleteFulfillmentRequest,\n DeleteFulfillmentResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n Fulfillment,\n FulfillmentCreated,\n FulfillmentDeleted,\n FulfillmentFulfillmentInfoOneOf,\n FulfillmentLineItem,\n FulfillmentStatus,\n FulfillmentTrackingInfo,\n FulfillmentUpdated,\n FulfillmentsUpdatedEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n IdentityType,\n ItemMetadata,\n ListFulfillmentsForMultipleOrdersRequest,\n ListFulfillmentsForMultipleOrdersResponse,\n ListFulfillmentsForSingleOrderRequest,\n ListFulfillmentsForSingleOrderResponse,\n MessageEnvelope,\n OrderWithFulfillments,\n RestoreInfo,\n UpdateFulfillmentIdentifiers,\n UpdateFulfillmentOptions,\n UpdateFulfillmentRequest,\n UpdateFulfillmentResponse,\n V2FulfillmentTrackingInfo,\n WebhookIdentityType,\n} from './ecom-v1-fulfillments-order-fulfillments.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixEcomV1Fulfillments from './ecom-v1-fulfillments-order-fulfillments.http.js';\n\nexport interface OrderWithFulfillments {\n /**\n * Order ID.\n * @minLength 1\n * @maxLength 100\n */\n orderId?: string;\n /** Fulfillments associated with the order. */\n fulfillments?: Fulfillment[];\n}\n\n/** for now, this is a sub-object of Orders, so can refer to order line items by id. */\nexport interface Fulfillment extends FulfillmentFulfillmentInfoOneOf {\n /** Tracking info. */\n trackingInfo?: FulfillmentTrackingInfo;\n /** Custom fulfillment info. */\n customInfo?: CustomFulfillmentInfo;\n /**\n * Fulfillment ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Fulfillment creation date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Line items being fulfilled.\n * @maxSize 300\n */\n lineItems?: FulfillmentLineItem[];\n /**\n * __Optional.__ Fulfillment status.\n *\n * Supported values:\n * + `\"Pending\"`\n * + `\"Accepted\"`\n * + `\"Ready\"`\n * + `\"In_Delivery\"`\n * + `\"Fulfilled\"`\n * @minLength 1\n * @maxLength 100\n */\n status?: string | null;\n /** Fulfillment handling complete. */\n completed?: boolean | null;\n}\n\n/** @oneof */\nexport interface FulfillmentFulfillmentInfoOneOf {\n /** Tracking info. */\n trackingInfo?: FulfillmentTrackingInfo;\n /** Custom fulfillment info. */\n customInfo?: CustomFulfillmentInfo;\n}\n\nexport interface FulfillmentLineItem {\n /**\n * Line item ID (mirrors the ID of the order line item).\n * @format GUID\n */\n _id?: string;\n /**\n * Line item quantity.\n * * If this property isn't passed on creation, it defaults to the number of items not already linked to a fulfillment.\n * * If the order does not have the requested quantity of line items available to add to this fulfillment, the fulfillment will not be created and an error is returned.\n *\n * Min: `1`\n * Max: `100000`\n * @min 1\n * @max 100000\n */\n quantity?: number | null;\n}\n\nexport interface FulfillmentTrackingInfo {\n /**\n * Shipping/delivery tracking number.\n * @minLength 1\n * @maxLength 100\n */\n trackingNumber?: string | null;\n /**\n * Shipping provider. Using one of the following shipping providers will allow for auto-filling the tracking link:\n * * `'fedex'`\n * * `'ups'`\n * * `'usps'`\n * * `'dhl'`\n * * `'canadaPost'`\n * @minLength 1\n * @maxLength 100\n */\n shippingProvider?: string | null;\n /**\n * Tracking link. Auto-filled if a predefined shipping provider is used, otherwise provided on creation.\n * @minLength 1\n * @maxLength 2048\n * @format WEB_URL\n */\n trackingLink?: string | null;\n}\n\nexport interface CustomFulfillmentInfo {\n /**\n * Custom fulfillment info in key:value form.\n * @maxSize 100\n */\n fieldsData?: Record<string, string>;\n}\n\nexport interface FulfillmentCreated {\n /**\n * Order ID (auto generated upon order creation).\n * @format GUID\n */\n orderId?: string;\n /**\n * ID of the newly created fulfillment.\n * @format GUID\n */\n fulfillmentId?: string;\n /** Fulfillment creation date and time. */\n dateCreated?: Date | null;\n /** Buyer information. */\n buyerInfo?: BuyerInfo;\n /** Order fulfillment status. */\n fulfillmentStatus?: FulfillmentStatusWithLiterals;\n /** Fulfillment tracking information. */\n trackingInfo?: V2FulfillmentTrackingInfo;\n}\n\n/** Buyer Info */\nexport interface BuyerInfo {\n /**\n * Wix customer ID\n * @format GUID\n */\n _id?: string | null;\n /**\n * Deprecated (use identityType instead)\n * @readonly\n * @deprecated\n */\n type?: IdentityTypeWithLiterals;\n /** Customer type */\n identityType?: IdentityTypeWithLiterals;\n /**\n * Customer's first name\n * @readonly\n */\n firstName?: string;\n /**\n * Customer's last name\n * @readonly\n */\n lastName?: string;\n /**\n * Customer's phone number\n * @readonly\n */\n phone?: string | null;\n /**\n * Customer's email address\n * @readonly\n */\n email?: string;\n}\n\nexport enum IdentityType {\n UNSPECIFIED_IDENTITY_TYPE = 'UNSPECIFIED_IDENTITY_TYPE',\n /** Site member */\n MEMBER = 'MEMBER',\n /** Contact */\n CONTACT = 'CONTACT',\n}\n\n/** @enumType */\nexport type IdentityTypeWithLiterals =\n | IdentityType\n | 'UNSPECIFIED_IDENTITY_TYPE'\n | 'MEMBER'\n | 'CONTACT';\n\nexport enum FulfillmentStatus {\n /** None of the order items are fulfilled */\n NOT_FULFILLED = 'NOT_FULFILLED',\n /**\n * All of the order items are fulfilled\n * Orders without shipping info are fulfilled automatically\n */\n FULFILLED = 'FULFILLED',\n /** Order is canceled */\n CANCELED = 'CANCELED',\n /** Some, but not all of the order items are fulfilled */\n PARTIALLY_FULFILLED = 'PARTIALLY_FULFILLED',\n}\n\n/** @enumType */\nexport type FulfillmentStatusWithLiterals =\n | FulfillmentStatus\n | 'NOT_FULFILLED'\n | 'FULFILLED'\n | 'CANCELED'\n | 'PARTIALLY_FULFILLED';\n\nexport interface V2FulfillmentTrackingInfo {\n /**\n * Tracking number.\n * @minLength 1\n * @maxLength 100\n */\n trackingNumber?: string;\n /**\n * Shipping provider. Using the following shipping providers will allow for autofilling the tracking link:\n * * `fedex`\n * * `ups`\n * * `usps`\n * * `dhl`\n * * `canadaPost`\n * @minLength 1\n * @maxLength 100\n */\n shippingProvider?: string;\n /**\n * Tracking link - autofilled if using a predefined shipping provider, otherwise provided on creation.\n * @minLength 1\n * @maxLength 2048\n * @format WEB_URL\n */\n trackingLink?: string | null;\n}\n\nexport interface FulfillmentUpdated {\n /**\n * Order ID (auto generated upon order creation).\n * @format GUID\n */\n orderId?: string;\n /**\n * ID of the updated fulfillment.\n * @format GUID\n */\n fulfillmentId?: string;\n /** Fulfillment tracking information. */\n trackingInfo?: V2FulfillmentTrackingInfo;\n}\n\nexport interface FulfillmentDeleted {\n /**\n * Order ID (auto generated upon order creation).\n * @format GUID\n */\n orderId?: string;\n /**\n * ID of the deleted fulfillment.\n * @format GUID\n */\n fulfillmentId?: string;\n /** Order fulfillment status. */\n fulfillmentStatus?: FulfillmentStatusWithLiterals;\n}\n\nexport interface ListFulfillmentsForSingleOrderRequest {\n /**\n * Order ID for which to retrieve fulfillments.\n * @minLength 1\n * @maxLength 100\n */\n orderId: string;\n}\n\nexport interface ListFulfillmentsForSingleOrderResponse {\n /** List of fulfillments associated with the order. */\n orderWithFulfillments?: OrderWithFulfillments;\n}\n\nexport interface ListFulfillmentsForMultipleOrdersRequest {\n /**\n * List of order IDs for which to retrieve fulfillments.\n * @minSize 1\n * @maxSize 100\n */\n orderIds: string[];\n}\n\nexport interface ListFulfillmentsForMultipleOrdersResponse {\n /** List of order IDs and their associated fulfillments. */\n ordersWithFulfillments?: OrderWithFulfillments[];\n}\n\nexport interface CreateFulfillmentRequest {\n /** Order ID. */\n orderId: string;\n /** Fulfillment info. */\n fulfillment: Fulfillment;\n}\n\nexport interface CreateFulfillmentResponse {\n /** Order ID and the orders' fulfillments. */\n orderWithFulfillments?: OrderWithFulfillments;\n /** ID of created fulfillment. */\n fulfillmentId?: string;\n}\n\nexport interface UpdateFulfillmentRequest {\n /** Order ID. */\n orderId: string;\n /** Fulfillment info to update. */\n fulfillment?: Fulfillment;\n}\n\nexport interface UpdateFulfillmentResponse {\n /** Order ID and the orders' associated fulfillments after update. */\n orderWithFulfillments?: OrderWithFulfillments;\n}\n\nexport interface DeleteFulfillmentRequest {\n /**\n * Order ID.\n * @minLength 1\n * @maxLength 100\n */\n orderId: string;\n /**\n * ID of the fulfillment to delete.\n * @format GUID\n */\n fulfillmentId: string;\n}\n\nexport interface DeleteFulfillmentResponse {\n /** Order ID and the order's associated fulfillments after deletion. */\n orderWithFulfillments?: OrderWithFulfillments;\n}\n\nexport interface BulkCreateFulfillmentRequest {\n /**\n * List of order IDs and their associated fulfillments' info.\n * @minSize 1\n * @maxSize 100\n */\n ordersWithFulfillments: BulkCreateOrderWithFulfillments[];\n}\n\nexport interface BulkCreateOrderWithFulfillments {\n /**\n * Order ID.\n * @minLength 1\n * @maxLength 100\n */\n orderId?: string;\n /**\n * Fulfillments associated with the order.\n * @minSize 1\n */\n fulfillments?: Fulfillment[];\n}\n\nexport interface BulkCreateFulfillmentResponse {\n /** Items updated by bulk action. */\n results?: BulkOrderFulfillmentsResult[];\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkOrderFulfillmentsResult {\n /** Item metadata. */\n itemMetadata?: ItemMetadata;\n /** List of order IDs and their associated fulfillments. */\n ordersWithFulfillments?: OrderWithFulfillments;\n}\n\nexport interface ItemMetadata {\n /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\nexport type CreateFulfillmentApplicationErrors = {\n code?: 'TRACKING_NUMBER_ALREADY_EXISTS';\n description?: string;\n data?: Record<string, any>;\n};\nexport type UpdateFulfillmentApplicationErrors = {\n code?: 'TRACKING_NUMBER_ALREADY_EXISTS';\n description?: string;\n data?: Record<string, any>;\n};\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface FulfillmentsUpdatedEnvelope {\n entity: OrderWithFulfillments;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when one or more of an order's fulfillments are created, updated, or deleted.\n *\n * The response contains the order's ID and details about all of its fulfillments following the change.\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Read eCommerce - all read permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS\n * @permissionScope Read Stores - all read permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @permissionId ECOM.READ_FULFILLMENTS\n * @webhook\n * @eventType wix.ecom.v1.fulfillments_updated\n * @serviceIdentifier com.wix.ecom.orders.fulfillments.v1.Fulfillments\n * @slug updated\n */\nexport declare function onFulfillmentsUpdated(\n handler: (event: FulfillmentsUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves fulfillments associated with a specified order.\n *\n *\n * The `listFulfillmentsForSingleOrder()` function returns a Promise that resolves when the fulfillments are retrieved.\n * @param orderId - Order ID for which to retrieve fulfillments.\n * @public\n * @requiredField orderId\n * @permissionId ECOM.READ_FULFILLMENTS\n * @applicableIdentity APP\n * @applicableIdentity MEMBER\n * @fqn com.wix.ecom.orders.fulfillments.v1.Fulfillments.ListFulfillmentsForSingleOrder\n */\nexport async function listFulfillmentsForSingleOrder(\n orderId: string\n): Promise<\n NonNullablePaths<\n ListFulfillmentsForSingleOrderResponse,\n `orderWithFulfillments.orderId` | `orderWithFulfillments.fulfillments`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ orderId: orderId });\n\n const reqOpts =\n ambassadorWixEcomV1Fulfillments.listFulfillmentsForSingleOrder(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { orderId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['orderId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves fulfillments associated with multiple specified orders.\n *\n *\n * The `listFulfillmentsForMultipleOrders()` function returns a Promise that resolves when the fulfillments are retrieved.\n * @param orderIds - List of order IDs for which to retrieve fulfillments.\n * @public\n * @requiredField orderIds\n * @permissionId ECOM.READ_FULFILLMENTS\n * @applicableIdentity APP\n * @applicableIdentity MEMBER\n * @fqn com.wix.ecom.orders.fulfillments.v1.Fulfillments.ListFulfillmentsForMultipleOrders\n */\nexport async function listFulfillmentsForMultipleOrders(\n orderIds: string[]\n): Promise<\n NonNullablePaths<\n ListFulfillmentsForMultipleOrdersResponse,\n `ordersWithFulfillments` | `ordersWithFulfillments.${number}.orderId`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ orderIds: orderIds });\n\n const reqOpts =\n ambassadorWixEcomV1Fulfillments.listFulfillmentsForMultipleOrders(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { orderIds: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['orderIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates an order fulfillment.\n *\n *\n * The `createFulfillment()` function returns a Promise that resolves when the fulfillment is created.\n * @param orderId - Order ID.\n * @param fulfillment - Fulfillment info.\n * @public\n * @requiredField fulfillment\n * @requiredField fulfillment.lineItems\n * @requiredField fulfillment.lineItems._id\n * @requiredField orderId\n * @permissionId ECOM.MODIFY_FULFILLMENTS\n * @applicableIdentity APP\n * @fqn com.wix.ecom.orders.fulfillments.v1.Fulfillments.CreateFulfillment\n */\nexport async function createFulfillment(\n orderId: string,\n fulfillment: NonNullablePaths<\n Fulfillment,\n `lineItems` | `lineItems.${number}._id`\n >\n): Promise<\n NonNullablePaths<\n CreateFulfillmentResponse,\n | `orderWithFulfillments.orderId`\n | `orderWithFulfillments.fulfillments`\n | `fulfillmentId`\n > & {\n __applicationErrorsType?: CreateFulfillmentApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n orderId: orderId,\n fulfillment: fulfillment,\n });\n\n const reqOpts = ambassadorWixEcomV1Fulfillments.createFulfillment(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { orderId: '$[0]', fulfillment: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['orderId', 'fulfillment']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a fulfillment's properties.\n * To update a field's value, include the new value in the `fulfillment` field in the body params.\n * To remove a field's value, pass `null`.\n *\n *\n * The `updateFulfillment()` function returns a Promise that resolves when the fulfillment is updated.\n *\n * > **Note:** Updating line item IDs or fulfilled quantities is not allowed. To update line item IDs or quantities, delete the fulfillment and create it again.\n * @public\n * @requiredField identifiers\n * @requiredField identifiers.fulfillmentId\n * @requiredField identifiers.orderId\n * @param identifiers - Order and fulfillment IDs to be updated.\n * @param options - Available options to use when updating a fulfillment.\n * @permissionId ECOM.MODIFY_FULFILLMENTS\n * @applicableIdentity APP\n * @returns Order ID and the orders' associated fulfillments after update.\n * @fqn com.wix.ecom.orders.fulfillments.v1.Fulfillments.UpdateFulfillment\n */\nexport async function updateFulfillment(\n identifiers: NonNullablePaths<\n UpdateFulfillmentIdentifiers,\n `fulfillmentId` | `orderId`\n >,\n options?: UpdateFulfillmentOptions\n): Promise<\n NonNullablePaths<OrderWithFulfillments, `orderId` | `fulfillments`> & {\n __applicationErrorsType?: UpdateFulfillmentApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n fulfillment: { ...options?.fulfillment, id: identifiers?.fulfillmentId },\n orderId: identifiers?.orderId,\n });\n\n const reqOpts = ambassadorWixEcomV1Fulfillments.updateFulfillment(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.orderWithFulfillments!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { fulfillment: '$[1].fulfillment' },\n explicitPathsToArguments: {\n 'fulfillment.id': '$[0].fulfillmentId',\n orderId: '$[0].orderId',\n },\n singleArgumentUnchanged: false,\n },\n ['identifiers', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateFulfillmentOptions {\n /** Fulfillment info. */\n fulfillment: {\n /** Tracking info. */\n trackingInfo?: FulfillmentTrackingInfo;\n /** Custom fulfillment info. */\n customInfo?: CustomFulfillmentInfo;\n /**\n * Fulfillment ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Fulfillment creation date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Line items being fulfilled.\n * @maxSize 300\n */\n lineItems?: FulfillmentLineItem[];\n /**\n * __Optional.__ Fulfillment status.\n *\n * Supported values:\n * + `\"Pending\"`\n * + `\"Accepted\"`\n * + `\"Ready\"`\n * + `\"In_Delivery\"`\n * + `\"Fulfilled\"`\n * @minLength 1\n * @maxLength 100\n */\n status?: string | null;\n /** Fulfillment handling complete. */\n completed?: boolean | null;\n };\n}\n\nexport interface UpdateFulfillmentIdentifiers {\n /**\n * ID of the fulfillment to be updated.\n * @format GUID\n * @readonly\n */\n fulfillmentId?: string | null;\n /** Order ID. */\n orderId: string;\n}\n\n/**\n * Deletes an existing order fulfillment.\n *\n *\n * The `deleteFulfillment()` function returns a Promise that resolves when the fulfillment is deleted.\n * @public\n * @requiredField identifiers\n * @requiredField identifiers.fulfillmentId\n * @requiredField identifiers.orderId\n * @param identifiers - Order and fulfillment IDs.\n * @permissionId ECOM.MODIFY_FULFILLMENTS\n * @applicableIdentity APP\n * @fqn com.wix.ecom.orders.fulfillments.v1.Fulfillments.DeleteFulfillment\n */\nexport async function deleteFulfillment(\n identifiers: NonNullablePaths<\n DeleteFulfillmentIdentifiers,\n `fulfillmentId` | `orderId`\n >\n): Promise<\n NonNullablePaths<\n DeleteFulfillmentResponse,\n `orderWithFulfillments.orderId` | `orderWithFulfillments.fulfillments`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n fulfillmentId: identifiers?.fulfillmentId,\n orderId: identifiers?.orderId,\n });\n\n const reqOpts = ambassadorWixEcomV1Fulfillments.deleteFulfillment(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n fulfillmentId: '$[0].fulfillmentId',\n orderId: '$[0].orderId',\n },\n singleArgumentUnchanged: false,\n },\n ['identifiers']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteFulfillmentIdentifiers {\n /**\n * ID of the fulfillment to delete.\n * @format GUID\n */\n fulfillmentId: string;\n /**\n * Order ID.\n * @minLength 1\n * @maxLength 100\n */\n orderId: string;\n}\n\n/**\n * Creates multiple fulfillments for one or more orders.\n *\n *\n * The `bulkCreateFulfillments()` function returns a Promise that resolves when the fulfillments are created.\n * @param ordersWithFulfillments - List of order IDs and their associated fulfillments' info.\n * @public\n * @requiredField ordersWithFulfillments\n * @requiredField ordersWithFulfillments.fulfillments\n * @requiredField ordersWithFulfillments.fulfillments.lineItems\n * @requiredField ordersWithFulfillments.fulfillments.lineItems._id\n * @requiredField ordersWithFulfillments.orderId\n * @permissionId ECOM.MODIFY_FULFILLMENTS\n * @applicableIdentity APP\n * @fqn com.wix.ecom.orders.fulfillments.v1.Fulfillments.BulkCreateFulfillment\n */\nexport async function bulkCreateFulfillments(\n ordersWithFulfillments: NonNullablePaths<\n BulkCreateOrderWithFulfillments,\n | `fulfillments`\n | `fulfillments.${number}.lineItems`\n | `fulfillments.${number}.lineItems.${number}._id`\n | `orderId`\n >[]\n): Promise<\n NonNullablePaths<\n BulkCreateFulfillmentResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.ordersWithFulfillments.orderId`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n ordersWithFulfillments: ordersWithFulfillments,\n });\n\n const reqOpts =\n ambassadorWixEcomV1Fulfillments.bulkCreateFulfillment(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { ordersWithFulfillments: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['ordersWithFulfillments']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixEcomOrdersFulfillmentsV1FulfillmentsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/ecom/v1/fulfillments',\n destPath: '/v1/fulfillments',\n },\n ],\n _: [\n {\n srcPath: '/_api/fulfillments',\n destPath: '',\n },\n {\n srcPath: '/_api/ecom-fulfillments',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/fulfillments/v1/fulfillments',\n destPath: '/v1/fulfillments',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_order-fulfillments';\n\n/**\n * Retrieves fulfillments associated with a specified order.\n *\n *\n * The `listFulfillmentsForSingleOrder()` function returns a Promise that resolves when the fulfillments are retrieved.\n */\nexport function listFulfillmentsForSingleOrder(\n payload: object\n): RequestOptionsFactory<any> {\n function __listFulfillmentsForSingleOrder({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v1.fulfillments',\n method: 'GET' as any,\n methodFqn:\n 'com.wix.ecom.orders.fulfillments.v1.Fulfillments.ListFulfillmentsForSingleOrder',\n packageName: PACKAGE_NAME,\n url: resolveComWixEcomOrdersFulfillmentsV1FulfillmentsUrl({\n protoPath: '/v1/fulfillments/orders/{orderId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'orderWithFulfillments.fulfillments.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listFulfillmentsForSingleOrder;\n}\n\n/**\n * Retrieves fulfillments associated with multiple specified orders.\n *\n *\n * The `listFulfillmentsForMultipleOrders()` function returns a Promise that resolves when the fulfillments are retrieved.\n */\nexport function listFulfillmentsForMultipleOrders(\n payload: object\n): RequestOptionsFactory<any> {\n function __listFulfillmentsForMultipleOrders({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v1.fulfillments',\n method: 'POST' as any,\n methodFqn:\n 'com.wix.ecom.orders.fulfillments.v1.Fulfillments.ListFulfillmentsForMultipleOrders',\n packageName: PACKAGE_NAME,\n url: resolveComWixEcomOrdersFulfillmentsV1FulfillmentsUrl({\n protoPath: '/v1/fulfillments/list-by-ids',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'ordersWithFulfillments.fulfillments.createdDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listFulfillmentsForMultipleOrders;\n}\n\n/**\n * Creates an order fulfillment.\n *\n *\n * The `createFulfillment()` function returns a Promise that resolves when the fulfillment is created.\n */\nexport function createFulfillment(payload: object): RequestOptionsFactory<any> {\n function __createFulfillment({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'fulfillment.createdDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.ecom.v1.fulfillments',\n method: 'POST' as any,\n methodFqn:\n 'com.wix.ecom.orders.fulfillments.v1.Fulfillments.CreateFulfillment',\n packageName: PACKAGE_NAME,\n url: resolveComWixEcomOrdersFulfillmentsV1FulfillmentsUrl({\n protoPath: '/v1/fulfillments/orders/{orderId}/create-fulfillment',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'orderWithFulfillments.fulfillments.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createFulfillment;\n}\n\n/**\n * Updates a fulfillment's properties.\n * To update a field's value, include the new value in the `fulfillment` field in the body params.\n * To remove a field's value, pass `null`.\n *\n *\n * The `updateFulfillment()` function returns a Promise that resolves when the fulfillment is updated.\n *\n * > **Note:** Updating line item IDs or fulfilled quantities is not allowed. To update line item IDs or quantities, delete the fulfillment and create it again.\n */\nexport function updateFulfillment(payload: object): RequestOptionsFactory<any> {\n function __updateFulfillment({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'fulfillment.createdDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.ecom.v1.fulfillments',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wix.ecom.orders.fulfillments.v1.Fulfillments.UpdateFulfillment',\n packageName: PACKAGE_NAME,\n url: resolveComWixEcomOrdersFulfillmentsV1FulfillmentsUrl({\n protoPath: '/v1/fulfillments/{fulfillment.id}/orders/{orderId}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'orderWithFulfillments.fulfillments.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateFulfillment;\n}\n\n/**\n * Deletes an existing order fulfillment.\n *\n *\n * The `deleteFulfillment()` function returns a Promise that resolves when the fulfillment is deleted.\n */\nexport function deleteFulfillment(payload: object): RequestOptionsFactory<any> {\n function __deleteFulfillment({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v1.fulfillments',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wix.ecom.orders.fulfillments.v1.Fulfillments.DeleteFulfillment',\n packageName: PACKAGE_NAME,\n url: resolveComWixEcomOrdersFulfillmentsV1FulfillmentsUrl({\n protoPath: '/v1/fulfillments/{fulfillmentId}/orders/{orderId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'orderWithFulfillments.fulfillments.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __deleteFulfillment;\n}\n\n/**\n * Creates multiple fulfillments for one or more orders.\n *\n *\n * The `bulkCreateFulfillments()` function returns a Promise that resolves when the fulfillments are created.\n */\nexport function bulkCreateFulfillment(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkCreateFulfillment({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'ordersWithFulfillments.fulfillments.createdDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.ecom.v1.fulfillments',\n method: 'POST' as any,\n methodFqn:\n 'com.wix.ecom.orders.fulfillments.v1.Fulfillments.BulkCreateFulfillment',\n packageName: PACKAGE_NAME,\n url: resolveComWixEcomOrdersFulfillmentsV1FulfillmentsUrl({\n protoPath: '/v1/fulfillments/orders/bulk/create-fulfillments',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n {\n path: 'results.ordersWithFulfillments.fulfillments.createdDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateFulfillment;\n}\n","import {\n listFulfillmentsForSingleOrder as publicListFulfillmentsForSingleOrder,\n listFulfillmentsForMultipleOrders as publicListFulfillmentsForMultipleOrders,\n createFulfillment as publicCreateFulfillment,\n updateFulfillment as publicUpdateFulfillment,\n deleteFulfillment as publicDeleteFulfillment,\n bulkCreateFulfillments as publicBulkCreateFulfillments,\n} from './ecom-v1-fulfillments-order-fulfillments.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onFulfillmentsUpdated as publicOnFulfillmentsUpdated } from './ecom-v1-fulfillments-order-fulfillments.public.js';\n\nexport const listFulfillmentsForSingleOrder: MaybeContext<\n BuildRESTFunction<typeof publicListFulfillmentsForSingleOrder> &\n typeof publicListFulfillmentsForSingleOrder\n> = /*#__PURE__*/ createRESTModule(publicListFulfillmentsForSingleOrder);\nexport const listFulfillmentsForMultipleOrders: MaybeContext<\n BuildRESTFunction<typeof publicListFulfillmentsForMultipleOrders> &\n typeof publicListFulfillmentsForMultipleOrders\n> = /*#__PURE__*/ createRESTModule(publicListFulfillmentsForMultipleOrders);\nexport const createFulfillment: MaybeContext<\n BuildRESTFunction<typeof publicCreateFulfillment> &\n typeof publicCreateFulfillment\n> = /*#__PURE__*/ createRESTModule(publicCreateFulfillment);\nexport const updateFulfillment: MaybeContext<\n BuildRESTFunction<typeof publicUpdateFulfillment> &\n typeof publicUpdateFulfillment\n> = /*#__PURE__*/ createRESTModule(publicUpdateFulfillment);\nexport const deleteFulfillment: MaybeContext<\n BuildRESTFunction<typeof publicDeleteFulfillment> &\n typeof publicDeleteFulfillment\n> = /*#__PURE__*/ createRESTModule(publicDeleteFulfillment);\nexport const bulkCreateFulfillments: MaybeContext<\n BuildRESTFunction<typeof publicBulkCreateFulfillments> &\n typeof publicBulkCreateFulfillments\n> = /*#__PURE__*/ createRESTModule(publicBulkCreateFulfillments);\n/**\n * Triggered when one or more of an order's fulfillments are created, updated, or deleted.\n *\n * The response contains the order's ID and details about all of its fulfillments following the change.\n */\nexport const onFulfillmentsUpdated: BuildEventDefinition<\n typeof publicOnFulfillmentsUpdated\n> = createEventModule(publicOnFulfillmentsUpdated);\n\nexport {\n IdentityType,\n FulfillmentStatus,\n WebhookIdentityType,\n} from './ecom-v1-fulfillments-order-fulfillments.universal.js';\nexport {\n OrderWithFulfillments,\n Fulfillment,\n FulfillmentFulfillmentInfoOneOf,\n FulfillmentLineItem,\n FulfillmentTrackingInfo,\n CustomFulfillmentInfo,\n FulfillmentCreated,\n BuyerInfo,\n V2FulfillmentTrackingInfo,\n FulfillmentUpdated,\n FulfillmentDeleted,\n ListFulfillmentsForSingleOrderRequest,\n ListFulfillmentsForSingleOrderResponse,\n ListFulfillmentsForMultipleOrdersRequest,\n ListFulfillmentsForMultipleOrdersResponse,\n CreateFulfillmentRequest,\n CreateFulfillmentResponse,\n UpdateFulfillmentRequest,\n UpdateFulfillmentResponse,\n DeleteFulfillmentRequest,\n DeleteFulfillmentResponse,\n BulkCreateFulfillmentRequest,\n BulkCreateOrderWithFulfillments,\n BulkCreateFulfillmentResponse,\n BulkOrderFulfillmentsResult,\n ItemMetadata,\n ApplicationError,\n BulkActionMetadata,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n FulfillmentsUpdatedEnvelope,\n UpdateFulfillmentOptions,\n UpdateFulfillmentIdentifiers,\n DeleteFulfillmentIdentifiers,\n} from './ecom-v1-fulfillments-order-fulfillments.universal.js';\nexport {\n IdentityTypeWithLiterals,\n FulfillmentStatusWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CreateFulfillmentApplicationErrors,\n UpdateFulfillmentApplicationErrors,\n} from './ecom-v1-fulfillments-order-fulfillments.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAAA;AAAA,EAAA,yBAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,yCAAAC;AAAA,EAAA,sCAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,yBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,qDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA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sCAAkC;AAQ3B,IAAMC,kCAGK,2DAAiBA,+BAAoC;AAChE,IAAMC,qCAGK,2DAAiBA,kCAAuC;AACnE,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,0BAGK,2DAAiBA,uBAA4B;AAMxD,IAAMC,6BAET,mDAAkB,qBAA2B;","names":["bulkCreateFulfillments","createFulfillment","deleteFulfillment","listFulfillmentsForMultipleOrders","listFulfillmentsForSingleOrder","onFulfillmentsUpdated","updateFulfillment","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_timestamp","import_rest_modules","payload","IdentityType","FulfillmentStatus","WebhookIdentityType","listFulfillmentsForSingleOrder","sdkTransformError","listFulfillmentsForMultipleOrders","createFulfillment","updateFulfillment","deleteFulfillment","listFulfillmentsForSingleOrder","listFulfillmentsForMultipleOrders","createFulfillment","updateFulfillment","deleteFulfillment","bulkCreateFulfillments","import_rest_modules","listFulfillmentsForSingleOrder","listFulfillmentsForMultipleOrders","createFulfillment","updateFulfillment","deleteFulfillment","bulkCreateFulfillments","onFulfillmentsUpdated"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/ecom-v1-fulfillments-order-fulfillments.public.ts","../../src/ecom-v1-fulfillments-order-fulfillments.universal.ts","../../src/ecom-v1-fulfillments-order-fulfillments.http.ts","../../src/ecom-v1-fulfillments-order-fulfillments.context.ts"],"sourcesContent":["export * from './src/ecom-v1-fulfillments-order-fulfillments.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n BulkCreateFulfillmentResponse,\n BulkCreateOrderWithFulfillments,\n CreateFulfillmentApplicationErrors,\n CreateFulfillmentResponse,\n DeleteFulfillmentIdentifiers,\n DeleteFulfillmentResponse,\n Fulfillment,\n FulfillmentsUpdatedEnvelope,\n ListFulfillmentsForMultipleOrdersResponse,\n ListFulfillmentsForSingleOrderResponse,\n OrderWithFulfillments,\n UpdateFulfillmentApplicationErrors,\n UpdateFulfillmentIdentifiers,\n UpdateFulfillmentOptions,\n bulkCreateFulfillments as universalBulkCreateFulfillments,\n createFulfillment as universalCreateFulfillment,\n deleteFulfillment as universalDeleteFulfillment,\n listFulfillmentsForMultipleOrders as universalListFulfillmentsForMultipleOrders,\n listFulfillmentsForSingleOrder as universalListFulfillmentsForSingleOrder,\n updateFulfillment as universalUpdateFulfillment,\n} from './ecom-v1-fulfillments-order-fulfillments.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/ecom' };\n\nexport function listFulfillmentsForSingleOrder(\n httpClient: HttpClient\n): ListFulfillmentsForSingleOrderSignature {\n return (orderId: string) =>\n universalListFulfillmentsForSingleOrder(\n orderId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListFulfillmentsForSingleOrderSignature {\n /**\n * Retrieves fulfillments associated with a specified order.\n *\n *\n * The `listFulfillmentsForSingleOrder()` function returns a Promise that resolves when the fulfillments are retrieved.\n * @param - Order ID for which to retrieve fulfillments.\n */\n (orderId: string): Promise<\n NonNullablePaths<\n ListFulfillmentsForSingleOrderResponse,\n `orderWithFulfillments.orderId` | `orderWithFulfillments.fulfillments`,\n 3\n >\n >;\n}\n\nexport function listFulfillmentsForMultipleOrders(\n httpClient: HttpClient\n): ListFulfillmentsForMultipleOrdersSignature {\n return (orderIds: string[]) =>\n universalListFulfillmentsForMultipleOrders(\n orderIds,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListFulfillmentsForMultipleOrdersSignature {\n /**\n * Retrieves fulfillments associated with multiple specified orders.\n *\n *\n * The `listFulfillmentsForMultipleOrders()` function returns a Promise that resolves when the fulfillments are retrieved.\n * @param - List of order IDs for which to retrieve fulfillments.\n */\n (orderIds: string[]): Promise<\n NonNullablePaths<\n ListFulfillmentsForMultipleOrdersResponse,\n `ordersWithFulfillments` | `ordersWithFulfillments.${number}.orderId`,\n 4\n >\n >;\n}\n\nexport function createFulfillment(\n httpClient: HttpClient\n): CreateFulfillmentSignature {\n return (\n orderId: string,\n fulfillment: NonNullablePaths<\n Fulfillment,\n `lineItems` | `lineItems.${number}._id`,\n 4\n >\n ) =>\n universalCreateFulfillment(\n orderId,\n fulfillment,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateFulfillmentSignature {\n /**\n * Creates an order fulfillment.\n *\n *\n * The `createFulfillment()` function returns a Promise that resolves when the fulfillment is created.\n * @param - Order ID.\n * @param - Fulfillment info.\n */\n (\n orderId: string,\n fulfillment: NonNullablePaths<\n Fulfillment,\n `lineItems` | `lineItems.${number}._id`,\n 4\n >\n ): Promise<\n NonNullablePaths<\n CreateFulfillmentResponse,\n | `orderWithFulfillments.orderId`\n | `orderWithFulfillments.fulfillments`\n | `fulfillmentId`,\n 3\n > & {\n __applicationErrorsType?: CreateFulfillmentApplicationErrors;\n }\n >;\n}\n\nexport function updateFulfillment(\n httpClient: HttpClient\n): UpdateFulfillmentSignature {\n return (\n identifiers: NonNullablePaths<\n UpdateFulfillmentIdentifiers,\n `fulfillmentId` | `orderId`,\n 2\n >,\n options?: UpdateFulfillmentOptions\n ) =>\n universalUpdateFulfillment(\n identifiers,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateFulfillmentSignature {\n /**\n * Updates a fulfillment's properties.\n * To update a field's value, include the new value in the `fulfillment` field in the body params.\n * To remove a field's value, pass `null`.\n *\n *\n * The `updateFulfillment()` function returns a Promise that resolves when the fulfillment is updated.\n *\n * > **Note:** Updating line item IDs or fulfilled quantities is not allowed. To update line item IDs or quantities, delete the fulfillment and create it again.\n * @param - Order and fulfillment IDs to be updated.\n * @param - Available options to use when updating a fulfillment.\n * @returns Order ID and the orders' associated fulfillments after update.\n */\n (\n identifiers: NonNullablePaths<\n UpdateFulfillmentIdentifiers,\n `fulfillmentId` | `orderId`,\n 2\n >,\n options?: UpdateFulfillmentOptions\n ): Promise<\n NonNullablePaths<OrderWithFulfillments, `orderId` | `fulfillments`, 2> & {\n __applicationErrorsType?: UpdateFulfillmentApplicationErrors;\n }\n >;\n}\n\nexport function deleteFulfillment(\n httpClient: HttpClient\n): DeleteFulfillmentSignature {\n return (\n identifiers: NonNullablePaths<\n DeleteFulfillmentIdentifiers,\n `fulfillmentId` | `orderId`,\n 2\n >\n ) =>\n universalDeleteFulfillment(\n identifiers,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteFulfillmentSignature {\n /**\n * Deletes an existing order fulfillment.\n *\n *\n * The `deleteFulfillment()` function returns a Promise that resolves when the fulfillment is deleted.\n * @param - Order and fulfillment IDs.\n */\n (\n identifiers: NonNullablePaths<\n DeleteFulfillmentIdentifiers,\n `fulfillmentId` | `orderId`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n DeleteFulfillmentResponse,\n `orderWithFulfillments.orderId` | `orderWithFulfillments.fulfillments`,\n 3\n >\n >;\n}\n\nexport function bulkCreateFulfillments(\n httpClient: HttpClient\n): BulkCreateFulfillmentsSignature {\n return (\n ordersWithFulfillments: NonNullablePaths<\n BulkCreateOrderWithFulfillments,\n | `fulfillments`\n | `fulfillments.${number}.lineItems`\n | `fulfillments.${number}.lineItems.${number}._id`\n | `orderId`,\n 6\n >[]\n ) =>\n universalBulkCreateFulfillments(\n ordersWithFulfillments,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkCreateFulfillmentsSignature {\n /**\n * Creates multiple fulfillments for one or more orders.\n *\n *\n * The `bulkCreateFulfillments()` function returns a Promise that resolves when the fulfillments are created.\n * @param - List of order IDs and their associated fulfillments' info.\n */\n (\n ordersWithFulfillments: NonNullablePaths<\n BulkCreateOrderWithFulfillments,\n | `fulfillments`\n | `fulfillments.${number}.lineItems`\n | `fulfillments.${number}.lineItems.${number}._id`\n | `orderId`,\n 6\n >[]\n ): Promise<\n NonNullablePaths<\n BulkCreateFulfillmentResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.ordersWithFulfillments.orderId`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n >;\n}\n\nexport const onFulfillmentsUpdated = EventDefinition(\n 'wix.ecom.v1.fulfillments_updated',\n true,\n (event: FulfillmentsUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.fulfillments.createdDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<FulfillmentsUpdatedEnvelope>();\n\nexport {\n ActionEvent,\n ApplicationError,\n BaseEventMetadata,\n BulkActionMetadata,\n BulkCreateFulfillmentRequest,\n BulkCreateFulfillmentResponse,\n BulkCreateOrderWithFulfillments,\n BulkOrderFulfillmentsResult,\n BuyerInfo,\n CreateFulfillmentRequest,\n CreateFulfillmentResponse,\n CustomFulfillmentInfo,\n DeleteFulfillmentIdentifiers,\n DeleteFulfillmentRequest,\n DeleteFulfillmentResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n Fulfillment,\n FulfillmentCreated,\n FulfillmentDeleted,\n FulfillmentFulfillmentInfoOneOf,\n FulfillmentLineItem,\n FulfillmentStatus,\n FulfillmentTrackingInfo,\n FulfillmentUpdated,\n FulfillmentsUpdatedEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n IdentityType,\n ItemMetadata,\n ListFulfillmentsForMultipleOrdersRequest,\n ListFulfillmentsForMultipleOrdersResponse,\n ListFulfillmentsForSingleOrderRequest,\n ListFulfillmentsForSingleOrderResponse,\n MessageEnvelope,\n OrderWithFulfillments,\n RestoreInfo,\n UpdateFulfillmentIdentifiers,\n UpdateFulfillmentOptions,\n UpdateFulfillmentRequest,\n UpdateFulfillmentResponse,\n V2FulfillmentTrackingInfo,\n WebhookIdentityType,\n} from './ecom-v1-fulfillments-order-fulfillments.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixEcomV1Fulfillments from './ecom-v1-fulfillments-order-fulfillments.http.js';\n\nexport interface OrderWithFulfillments {\n /**\n * Order ID.\n * @minLength 1\n * @maxLength 100\n */\n orderId?: string;\n /** Fulfillments associated with the order. */\n fulfillments?: Fulfillment[];\n}\n\n/** for now, this is a sub-object of Orders, so can refer to order line items by id. */\nexport interface Fulfillment extends FulfillmentFulfillmentInfoOneOf {\n /** Tracking info. */\n trackingInfo?: FulfillmentTrackingInfo;\n /** Custom fulfillment info. */\n customInfo?: CustomFulfillmentInfo;\n /**\n * Fulfillment ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Fulfillment creation date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Line items being fulfilled.\n * @maxSize 300\n */\n lineItems?: FulfillmentLineItem[];\n /**\n * __Optional.__ Fulfillment status.\n *\n * Supported values:\n * + `\"Pending\"`\n * + `\"Accepted\"`\n * + `\"Ready\"`\n * + `\"In_Delivery\"`\n * + `\"Fulfilled\"`\n * @minLength 1\n * @maxLength 100\n */\n status?: string | null;\n /** Fulfillment handling complete. */\n completed?: boolean | null;\n}\n\n/** @oneof */\nexport interface FulfillmentFulfillmentInfoOneOf {\n /** Tracking info. */\n trackingInfo?: FulfillmentTrackingInfo;\n /** Custom fulfillment info. */\n customInfo?: CustomFulfillmentInfo;\n}\n\nexport interface FulfillmentLineItem {\n /**\n * Line item ID (mirrors the ID of the order line item).\n * @format GUID\n */\n _id?: string;\n /**\n * Line item quantity.\n * * If this property isn't passed on creation, it defaults to the number of items not already linked to a fulfillment.\n * * If the order does not have the requested quantity of line items available to add to this fulfillment, the fulfillment will not be created and an error is returned.\n *\n * Min: `1`\n * Max: `100000`\n * @min 1\n * @max 100000\n */\n quantity?: number | null;\n}\n\nexport interface FulfillmentTrackingInfo {\n /**\n * Shipping/delivery tracking number.\n * @minLength 1\n * @maxLength 100\n */\n trackingNumber?: string | null;\n /**\n * Shipping provider. Using one of the following shipping providers will allow for auto-filling the tracking link:\n * * `'fedex'`\n * * `'ups'`\n * * `'usps'`\n * * `'dhl'`\n * * `'canadaPost'`\n * @minLength 1\n * @maxLength 100\n */\n shippingProvider?: string | null;\n /**\n * Tracking link. Auto-filled if a predefined shipping provider is used, otherwise provided on creation.\n * @minLength 1\n * @maxLength 2048\n * @format WEB_URL\n */\n trackingLink?: string | null;\n}\n\nexport interface CustomFulfillmentInfo {\n /**\n * Custom fulfillment info in key:value form.\n * @maxSize 100\n */\n fieldsData?: Record<string, string>;\n}\n\nexport interface FulfillmentCreated {\n /**\n * Order ID (auto generated upon order creation).\n * @format GUID\n */\n orderId?: string;\n /**\n * ID of the newly created fulfillment.\n * @format GUID\n */\n fulfillmentId?: string;\n /** Fulfillment creation date and time. */\n dateCreated?: Date | null;\n /** Buyer information. */\n buyerInfo?: BuyerInfo;\n /** Order fulfillment status. */\n fulfillmentStatus?: FulfillmentStatusWithLiterals;\n /** Fulfillment tracking information. */\n trackingInfo?: V2FulfillmentTrackingInfo;\n}\n\n/** Buyer Info */\nexport interface BuyerInfo {\n /**\n * Wix customer ID\n * @format GUID\n */\n _id?: string | null;\n /**\n * Deprecated (use identityType instead)\n * @readonly\n * @deprecated\n */\n type?: IdentityTypeWithLiterals;\n /** Customer type */\n identityType?: IdentityTypeWithLiterals;\n /**\n * Customer's first name\n * @readonly\n */\n firstName?: string;\n /**\n * Customer's last name\n * @readonly\n */\n lastName?: string;\n /**\n * Customer's phone number\n * @readonly\n */\n phone?: string | null;\n /**\n * Customer's email address\n * @readonly\n */\n email?: string;\n}\n\nexport enum IdentityType {\n UNSPECIFIED_IDENTITY_TYPE = 'UNSPECIFIED_IDENTITY_TYPE',\n /** Site member */\n MEMBER = 'MEMBER',\n /** Contact */\n CONTACT = 'CONTACT',\n}\n\n/** @enumType */\nexport type IdentityTypeWithLiterals =\n | IdentityType\n | 'UNSPECIFIED_IDENTITY_TYPE'\n | 'MEMBER'\n | 'CONTACT';\n\nexport enum FulfillmentStatus {\n /** None of the order items are fulfilled */\n NOT_FULFILLED = 'NOT_FULFILLED',\n /**\n * All of the order items are fulfilled\n * Orders without shipping info are fulfilled automatically\n */\n FULFILLED = 'FULFILLED',\n /** Order is canceled */\n CANCELED = 'CANCELED',\n /** Some, but not all of the order items are fulfilled */\n PARTIALLY_FULFILLED = 'PARTIALLY_FULFILLED',\n}\n\n/** @enumType */\nexport type FulfillmentStatusWithLiterals =\n | FulfillmentStatus\n | 'NOT_FULFILLED'\n | 'FULFILLED'\n | 'CANCELED'\n | 'PARTIALLY_FULFILLED';\n\nexport interface V2FulfillmentTrackingInfo {\n /**\n * Tracking number.\n * @minLength 1\n * @maxLength 100\n */\n trackingNumber?: string;\n /**\n * Shipping provider. Using the following shipping providers will allow for autofilling the tracking link:\n * * `fedex`\n * * `ups`\n * * `usps`\n * * `dhl`\n * * `canadaPost`\n * @minLength 1\n * @maxLength 100\n */\n shippingProvider?: string;\n /**\n * Tracking link - autofilled if using a predefined shipping provider, otherwise provided on creation.\n * @minLength 1\n * @maxLength 2048\n * @format WEB_URL\n */\n trackingLink?: string | null;\n}\n\nexport interface FulfillmentUpdated {\n /**\n * Order ID (auto generated upon order creation).\n * @format GUID\n */\n orderId?: string;\n /**\n * ID of the updated fulfillment.\n * @format GUID\n */\n fulfillmentId?: string;\n /** Fulfillment tracking information. */\n trackingInfo?: V2FulfillmentTrackingInfo;\n}\n\nexport interface FulfillmentDeleted {\n /**\n * Order ID (auto generated upon order creation).\n * @format GUID\n */\n orderId?: string;\n /**\n * ID of the deleted fulfillment.\n * @format GUID\n */\n fulfillmentId?: string;\n /** Order fulfillment status. */\n fulfillmentStatus?: FulfillmentStatusWithLiterals;\n}\n\nexport interface ListFulfillmentsForSingleOrderRequest {\n /**\n * Order ID for which to retrieve fulfillments.\n * @minLength 1\n * @maxLength 100\n */\n orderId: string;\n}\n\nexport interface ListFulfillmentsForSingleOrderResponse {\n /** List of fulfillments associated with the order. */\n orderWithFulfillments?: OrderWithFulfillments;\n}\n\nexport interface ListFulfillmentsForMultipleOrdersRequest {\n /**\n * List of order IDs for which to retrieve fulfillments.\n * @minSize 1\n * @maxSize 100\n */\n orderIds: string[];\n}\n\nexport interface ListFulfillmentsForMultipleOrdersResponse {\n /** List of order IDs and their associated fulfillments. */\n ordersWithFulfillments?: OrderWithFulfillments[];\n}\n\nexport interface CreateFulfillmentRequest {\n /** Order ID. */\n orderId: string;\n /** Fulfillment info. */\n fulfillment: Fulfillment;\n}\n\nexport interface CreateFulfillmentResponse {\n /** Order ID and the orders' fulfillments. */\n orderWithFulfillments?: OrderWithFulfillments;\n /** ID of created fulfillment. */\n fulfillmentId?: string;\n}\n\nexport interface UpdateFulfillmentRequest {\n /** Order ID. */\n orderId: string;\n /** Fulfillment info to update. */\n fulfillment?: Fulfillment;\n}\n\nexport interface UpdateFulfillmentResponse {\n /** Order ID and the orders' associated fulfillments after update. */\n orderWithFulfillments?: OrderWithFulfillments;\n}\n\nexport interface DeleteFulfillmentRequest {\n /**\n * Order ID.\n * @minLength 1\n * @maxLength 100\n */\n orderId: string;\n /**\n * ID of the fulfillment to delete.\n * @format GUID\n */\n fulfillmentId: string;\n}\n\nexport interface DeleteFulfillmentResponse {\n /** Order ID and the order's associated fulfillments after deletion. */\n orderWithFulfillments?: OrderWithFulfillments;\n}\n\nexport interface BulkCreateFulfillmentRequest {\n /**\n * List of order IDs and their associated fulfillments' info.\n * @minSize 1\n * @maxSize 100\n */\n ordersWithFulfillments: BulkCreateOrderWithFulfillments[];\n}\n\nexport interface BulkCreateOrderWithFulfillments {\n /**\n * Order ID.\n * @minLength 1\n * @maxLength 100\n */\n orderId?: string;\n /**\n * Fulfillments associated with the order.\n * @minSize 1\n */\n fulfillments?: Fulfillment[];\n}\n\nexport interface BulkCreateFulfillmentResponse {\n /** Items updated by bulk action. */\n results?: BulkOrderFulfillmentsResult[];\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkOrderFulfillmentsResult {\n /** Item metadata. */\n itemMetadata?: ItemMetadata;\n /** List of order IDs and their associated fulfillments. */\n ordersWithFulfillments?: OrderWithFulfillments;\n}\n\nexport interface ItemMetadata {\n /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n/** @docsIgnore */\nexport type CreateFulfillmentApplicationErrors = {\n code?: 'TRACKING_NUMBER_ALREADY_EXISTS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type UpdateFulfillmentApplicationErrors = {\n code?: 'TRACKING_NUMBER_ALREADY_EXISTS';\n description?: string;\n data?: Record<string, any>;\n};\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface FulfillmentsUpdatedEnvelope {\n entity: OrderWithFulfillments;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when one or more of an order's fulfillments are created, updated, or deleted.\n *\n * The response contains the order's ID and details about all of its fulfillments following the change.\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Read eCommerce - all read permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS\n * @permissionScope Read Stores - all read permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @permissionId ECOM.READ_FULFILLMENTS\n * @webhook\n * @eventType wix.ecom.v1.fulfillments_updated\n * @serviceIdentifier com.wix.ecom.orders.fulfillments.v1.Fulfillments\n * @slug updated\n */\nexport declare function onFulfillmentsUpdated(\n handler: (event: FulfillmentsUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves fulfillments associated with a specified order.\n *\n *\n * The `listFulfillmentsForSingleOrder()` function returns a Promise that resolves when the fulfillments are retrieved.\n * @param orderId - Order ID for which to retrieve fulfillments.\n * @public\n * @requiredField orderId\n * @permissionId ECOM.READ_FULFILLMENTS\n * @applicableIdentity APP\n * @applicableIdentity MEMBER\n * @fqn com.wix.ecom.orders.fulfillments.v1.Fulfillments.ListFulfillmentsForSingleOrder\n */\nexport async function listFulfillmentsForSingleOrder(\n orderId: string\n): Promise<\n NonNullablePaths<\n ListFulfillmentsForSingleOrderResponse,\n `orderWithFulfillments.orderId` | `orderWithFulfillments.fulfillments`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ orderId: orderId });\n\n const reqOpts =\n ambassadorWixEcomV1Fulfillments.listFulfillmentsForSingleOrder(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { orderId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['orderId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves fulfillments associated with multiple specified orders.\n *\n *\n * The `listFulfillmentsForMultipleOrders()` function returns a Promise that resolves when the fulfillments are retrieved.\n * @param orderIds - List of order IDs for which to retrieve fulfillments.\n * @public\n * @requiredField orderIds\n * @permissionId ECOM.READ_FULFILLMENTS\n * @applicableIdentity APP\n * @applicableIdentity MEMBER\n * @fqn com.wix.ecom.orders.fulfillments.v1.Fulfillments.ListFulfillmentsForMultipleOrders\n */\nexport async function listFulfillmentsForMultipleOrders(\n orderIds: string[]\n): Promise<\n NonNullablePaths<\n ListFulfillmentsForMultipleOrdersResponse,\n `ordersWithFulfillments` | `ordersWithFulfillments.${number}.orderId`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ orderIds: orderIds });\n\n const reqOpts =\n ambassadorWixEcomV1Fulfillments.listFulfillmentsForMultipleOrders(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { orderIds: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['orderIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates an order fulfillment.\n *\n *\n * The `createFulfillment()` function returns a Promise that resolves when the fulfillment is created.\n * @param orderId - Order ID.\n * @param fulfillment - Fulfillment info.\n * @public\n * @requiredField fulfillment\n * @requiredField fulfillment.lineItems\n * @requiredField fulfillment.lineItems._id\n * @requiredField orderId\n * @permissionId ECOM.MODIFY_FULFILLMENTS\n * @applicableIdentity APP\n * @fqn com.wix.ecom.orders.fulfillments.v1.Fulfillments.CreateFulfillment\n */\nexport async function createFulfillment(\n orderId: string,\n fulfillment: NonNullablePaths<\n Fulfillment,\n `lineItems` | `lineItems.${number}._id`,\n 4\n >\n): Promise<\n NonNullablePaths<\n CreateFulfillmentResponse,\n | `orderWithFulfillments.orderId`\n | `orderWithFulfillments.fulfillments`\n | `fulfillmentId`,\n 3\n > & {\n __applicationErrorsType?: CreateFulfillmentApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n orderId: orderId,\n fulfillment: fulfillment,\n });\n\n const reqOpts = ambassadorWixEcomV1Fulfillments.createFulfillment(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { orderId: '$[0]', fulfillment: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['orderId', 'fulfillment']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a fulfillment's properties.\n * To update a field's value, include the new value in the `fulfillment` field in the body params.\n * To remove a field's value, pass `null`.\n *\n *\n * The `updateFulfillment()` function returns a Promise that resolves when the fulfillment is updated.\n *\n * > **Note:** Updating line item IDs or fulfilled quantities is not allowed. To update line item IDs or quantities, delete the fulfillment and create it again.\n * @public\n * @requiredField identifiers\n * @requiredField identifiers.fulfillmentId\n * @requiredField identifiers.orderId\n * @param identifiers - Order and fulfillment IDs to be updated.\n * @param options - Available options to use when updating a fulfillment.\n * @permissionId ECOM.MODIFY_FULFILLMENTS\n * @applicableIdentity APP\n * @returns Order ID and the orders' associated fulfillments after update.\n * @fqn com.wix.ecom.orders.fulfillments.v1.Fulfillments.UpdateFulfillment\n */\nexport async function updateFulfillment(\n identifiers: NonNullablePaths<\n UpdateFulfillmentIdentifiers,\n `fulfillmentId` | `orderId`,\n 2\n >,\n options?: UpdateFulfillmentOptions\n): Promise<\n NonNullablePaths<OrderWithFulfillments, `orderId` | `fulfillments`, 2> & {\n __applicationErrorsType?: UpdateFulfillmentApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n fulfillment: { ...options?.fulfillment, id: identifiers?.fulfillmentId },\n orderId: identifiers?.orderId,\n });\n\n const reqOpts = ambassadorWixEcomV1Fulfillments.updateFulfillment(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.orderWithFulfillments!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { fulfillment: '$[1].fulfillment' },\n explicitPathsToArguments: {\n 'fulfillment.id': '$[0].fulfillmentId',\n orderId: '$[0].orderId',\n },\n singleArgumentUnchanged: false,\n },\n ['identifiers', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateFulfillmentOptions {\n /** Fulfillment info. */\n fulfillment: {\n /** Tracking info. */\n trackingInfo?: FulfillmentTrackingInfo;\n /** Custom fulfillment info. */\n customInfo?: CustomFulfillmentInfo;\n /**\n * Fulfillment ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Fulfillment creation date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Line items being fulfilled.\n * @maxSize 300\n */\n lineItems?: FulfillmentLineItem[];\n /**\n * __Optional.__ Fulfillment status.\n *\n * Supported values:\n * + `\"Pending\"`\n * + `\"Accepted\"`\n * + `\"Ready\"`\n * + `\"In_Delivery\"`\n * + `\"Fulfilled\"`\n * @minLength 1\n * @maxLength 100\n */\n status?: string | null;\n /** Fulfillment handling complete. */\n completed?: boolean | null;\n };\n}\n\nexport interface UpdateFulfillmentIdentifiers {\n /**\n * ID of the fulfillment to be updated.\n * @format GUID\n * @readonly\n */\n fulfillmentId?: string | null;\n /** Order ID. */\n orderId: string;\n}\n\n/**\n * Deletes an existing order fulfillment.\n *\n *\n * The `deleteFulfillment()` function returns a Promise that resolves when the fulfillment is deleted.\n * @public\n * @requiredField identifiers\n * @requiredField identifiers.fulfillmentId\n * @requiredField identifiers.orderId\n * @param identifiers - Order and fulfillment IDs.\n * @permissionId ECOM.MODIFY_FULFILLMENTS\n * @applicableIdentity APP\n * @fqn com.wix.ecom.orders.fulfillments.v1.Fulfillments.DeleteFulfillment\n */\nexport async function deleteFulfillment(\n identifiers: NonNullablePaths<\n DeleteFulfillmentIdentifiers,\n `fulfillmentId` | `orderId`,\n 2\n >\n): Promise<\n NonNullablePaths<\n DeleteFulfillmentResponse,\n `orderWithFulfillments.orderId` | `orderWithFulfillments.fulfillments`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n fulfillmentId: identifiers?.fulfillmentId,\n orderId: identifiers?.orderId,\n });\n\n const reqOpts = ambassadorWixEcomV1Fulfillments.deleteFulfillment(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n fulfillmentId: '$[0].fulfillmentId',\n orderId: '$[0].orderId',\n },\n singleArgumentUnchanged: false,\n },\n ['identifiers']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteFulfillmentIdentifiers {\n /**\n * ID of the fulfillment to delete.\n * @format GUID\n */\n fulfillmentId: string;\n /**\n * Order ID.\n * @minLength 1\n * @maxLength 100\n */\n orderId: string;\n}\n\n/**\n * Creates multiple fulfillments for one or more orders.\n *\n *\n * The `bulkCreateFulfillments()` function returns a Promise that resolves when the fulfillments are created.\n * @param ordersWithFulfillments - List of order IDs and their associated fulfillments' info.\n * @public\n * @requiredField ordersWithFulfillments\n * @requiredField ordersWithFulfillments.fulfillments\n * @requiredField ordersWithFulfillments.fulfillments.lineItems\n * @requiredField ordersWithFulfillments.fulfillments.lineItems._id\n * @requiredField ordersWithFulfillments.orderId\n * @permissionId ECOM.MODIFY_FULFILLMENTS\n * @applicableIdentity APP\n * @fqn com.wix.ecom.orders.fulfillments.v1.Fulfillments.BulkCreateFulfillment\n */\nexport async function bulkCreateFulfillments(\n ordersWithFulfillments: NonNullablePaths<\n BulkCreateOrderWithFulfillments,\n | `fulfillments`\n | `fulfillments.${number}.lineItems`\n | `fulfillments.${number}.lineItems.${number}._id`\n | `orderId`,\n 6\n >[]\n): Promise<\n NonNullablePaths<\n BulkCreateFulfillmentResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.ordersWithFulfillments.orderId`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n ordersWithFulfillments: ordersWithFulfillments,\n });\n\n const reqOpts =\n ambassadorWixEcomV1Fulfillments.bulkCreateFulfillment(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { ordersWithFulfillments: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['ordersWithFulfillments']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixEcomOrdersFulfillmentsV1FulfillmentsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/ecom/v1/fulfillments',\n destPath: '/v1/fulfillments',\n },\n ],\n _: [\n {\n srcPath: '/_api/fulfillments',\n destPath: '',\n },\n {\n srcPath: '/_api/ecom-fulfillments',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/fulfillments/v1/fulfillments',\n destPath: '/v1/fulfillments',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_order-fulfillments';\n\n/**\n * Retrieves fulfillments associated with a specified order.\n *\n *\n * The `listFulfillmentsForSingleOrder()` function returns a Promise that resolves when the fulfillments are retrieved.\n */\nexport function listFulfillmentsForSingleOrder(\n payload: object\n): RequestOptionsFactory<any> {\n function __listFulfillmentsForSingleOrder({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v1.fulfillments',\n method: 'GET' as any,\n methodFqn:\n 'com.wix.ecom.orders.fulfillments.v1.Fulfillments.ListFulfillmentsForSingleOrder',\n packageName: PACKAGE_NAME,\n url: resolveComWixEcomOrdersFulfillmentsV1FulfillmentsUrl({\n protoPath: '/v1/fulfillments/orders/{orderId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'orderWithFulfillments.fulfillments.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listFulfillmentsForSingleOrder;\n}\n\n/**\n * Retrieves fulfillments associated with multiple specified orders.\n *\n *\n * The `listFulfillmentsForMultipleOrders()` function returns a Promise that resolves when the fulfillments are retrieved.\n */\nexport function listFulfillmentsForMultipleOrders(\n payload: object\n): RequestOptionsFactory<any> {\n function __listFulfillmentsForMultipleOrders({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v1.fulfillments',\n method: 'POST' as any,\n methodFqn:\n 'com.wix.ecom.orders.fulfillments.v1.Fulfillments.ListFulfillmentsForMultipleOrders',\n packageName: PACKAGE_NAME,\n url: resolveComWixEcomOrdersFulfillmentsV1FulfillmentsUrl({\n protoPath: '/v1/fulfillments/list-by-ids',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'ordersWithFulfillments.fulfillments.createdDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listFulfillmentsForMultipleOrders;\n}\n\n/**\n * Creates an order fulfillment.\n *\n *\n * The `createFulfillment()` function returns a Promise that resolves when the fulfillment is created.\n */\nexport function createFulfillment(payload: object): RequestOptionsFactory<any> {\n function __createFulfillment({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'fulfillment.createdDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.ecom.v1.fulfillments',\n method: 'POST' as any,\n methodFqn:\n 'com.wix.ecom.orders.fulfillments.v1.Fulfillments.CreateFulfillment',\n packageName: PACKAGE_NAME,\n url: resolveComWixEcomOrdersFulfillmentsV1FulfillmentsUrl({\n protoPath: '/v1/fulfillments/orders/{orderId}/create-fulfillment',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'orderWithFulfillments.fulfillments.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createFulfillment;\n}\n\n/**\n * Updates a fulfillment's properties.\n * To update a field's value, include the new value in the `fulfillment` field in the body params.\n * To remove a field's value, pass `null`.\n *\n *\n * The `updateFulfillment()` function returns a Promise that resolves when the fulfillment is updated.\n *\n * > **Note:** Updating line item IDs or fulfilled quantities is not allowed. To update line item IDs or quantities, delete the fulfillment and create it again.\n */\nexport function updateFulfillment(payload: object): RequestOptionsFactory<any> {\n function __updateFulfillment({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'fulfillment.createdDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.ecom.v1.fulfillments',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wix.ecom.orders.fulfillments.v1.Fulfillments.UpdateFulfillment',\n packageName: PACKAGE_NAME,\n url: resolveComWixEcomOrdersFulfillmentsV1FulfillmentsUrl({\n protoPath: '/v1/fulfillments/{fulfillment.id}/orders/{orderId}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'orderWithFulfillments.fulfillments.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateFulfillment;\n}\n\n/**\n * Deletes an existing order fulfillment.\n *\n *\n * The `deleteFulfillment()` function returns a Promise that resolves when the fulfillment is deleted.\n */\nexport function deleteFulfillment(payload: object): RequestOptionsFactory<any> {\n function __deleteFulfillment({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v1.fulfillments',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wix.ecom.orders.fulfillments.v1.Fulfillments.DeleteFulfillment',\n packageName: PACKAGE_NAME,\n url: resolveComWixEcomOrdersFulfillmentsV1FulfillmentsUrl({\n protoPath: '/v1/fulfillments/{fulfillmentId}/orders/{orderId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'orderWithFulfillments.fulfillments.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __deleteFulfillment;\n}\n\n/**\n * Creates multiple fulfillments for one or more orders.\n *\n *\n * The `bulkCreateFulfillments()` function returns a Promise that resolves when the fulfillments are created.\n */\nexport function bulkCreateFulfillment(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkCreateFulfillment({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'ordersWithFulfillments.fulfillments.createdDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.ecom.v1.fulfillments',\n method: 'POST' as any,\n methodFqn:\n 'com.wix.ecom.orders.fulfillments.v1.Fulfillments.BulkCreateFulfillment',\n packageName: PACKAGE_NAME,\n url: resolveComWixEcomOrdersFulfillmentsV1FulfillmentsUrl({\n protoPath: '/v1/fulfillments/orders/bulk/create-fulfillments',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n {\n path: 'results.ordersWithFulfillments.fulfillments.createdDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateFulfillment;\n}\n","import {\n listFulfillmentsForSingleOrder as publicListFulfillmentsForSingleOrder,\n listFulfillmentsForMultipleOrders as publicListFulfillmentsForMultipleOrders,\n createFulfillment as publicCreateFulfillment,\n updateFulfillment as publicUpdateFulfillment,\n deleteFulfillment as publicDeleteFulfillment,\n bulkCreateFulfillments as publicBulkCreateFulfillments,\n} from './ecom-v1-fulfillments-order-fulfillments.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onFulfillmentsUpdated as publicOnFulfillmentsUpdated } from './ecom-v1-fulfillments-order-fulfillments.public.js';\n\nexport const listFulfillmentsForSingleOrder: MaybeContext<\n BuildRESTFunction<typeof publicListFulfillmentsForSingleOrder> &\n typeof publicListFulfillmentsForSingleOrder\n> = /*#__PURE__*/ createRESTModule(publicListFulfillmentsForSingleOrder);\nexport const listFulfillmentsForMultipleOrders: MaybeContext<\n BuildRESTFunction<typeof publicListFulfillmentsForMultipleOrders> &\n typeof publicListFulfillmentsForMultipleOrders\n> = /*#__PURE__*/ createRESTModule(publicListFulfillmentsForMultipleOrders);\nexport const createFulfillment: MaybeContext<\n BuildRESTFunction<typeof publicCreateFulfillment> &\n typeof publicCreateFulfillment\n> = /*#__PURE__*/ createRESTModule(publicCreateFulfillment);\nexport const updateFulfillment: MaybeContext<\n BuildRESTFunction<typeof publicUpdateFulfillment> &\n typeof publicUpdateFulfillment\n> = /*#__PURE__*/ createRESTModule(publicUpdateFulfillment);\nexport const deleteFulfillment: MaybeContext<\n BuildRESTFunction<typeof publicDeleteFulfillment> &\n typeof publicDeleteFulfillment\n> = /*#__PURE__*/ createRESTModule(publicDeleteFulfillment);\nexport const bulkCreateFulfillments: MaybeContext<\n BuildRESTFunction<typeof publicBulkCreateFulfillments> &\n typeof publicBulkCreateFulfillments\n> = /*#__PURE__*/ createRESTModule(publicBulkCreateFulfillments);\n/**\n * Triggered when one or more of an order's fulfillments are created, updated, or deleted.\n *\n * The response contains the order's ID and details about all of its fulfillments following the change.\n */\nexport const onFulfillmentsUpdated: BuildEventDefinition<\n typeof publicOnFulfillmentsUpdated\n> = createEventModule(publicOnFulfillmentsUpdated);\n\nexport {\n IdentityType,\n FulfillmentStatus,\n WebhookIdentityType,\n} from './ecom-v1-fulfillments-order-fulfillments.universal.js';\nexport {\n OrderWithFulfillments,\n Fulfillment,\n FulfillmentFulfillmentInfoOneOf,\n FulfillmentLineItem,\n FulfillmentTrackingInfo,\n CustomFulfillmentInfo,\n FulfillmentCreated,\n BuyerInfo,\n V2FulfillmentTrackingInfo,\n FulfillmentUpdated,\n FulfillmentDeleted,\n ListFulfillmentsForSingleOrderRequest,\n ListFulfillmentsForSingleOrderResponse,\n ListFulfillmentsForMultipleOrdersRequest,\n ListFulfillmentsForMultipleOrdersResponse,\n CreateFulfillmentRequest,\n CreateFulfillmentResponse,\n UpdateFulfillmentRequest,\n UpdateFulfillmentResponse,\n DeleteFulfillmentRequest,\n DeleteFulfillmentResponse,\n BulkCreateFulfillmentRequest,\n BulkCreateOrderWithFulfillments,\n BulkCreateFulfillmentResponse,\n BulkOrderFulfillmentsResult,\n ItemMetadata,\n ApplicationError,\n BulkActionMetadata,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n FulfillmentsUpdatedEnvelope,\n UpdateFulfillmentOptions,\n UpdateFulfillmentIdentifiers,\n DeleteFulfillmentIdentifiers,\n} from './ecom-v1-fulfillments-order-fulfillments.universal.js';\nexport {\n IdentityTypeWithLiterals,\n FulfillmentStatusWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CreateFulfillmentApplicationErrors,\n UpdateFulfillmentApplicationErrors,\n} from './ecom-v1-fulfillments-order-fulfillments.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAAA;AAAA,EAAA,yBAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,yCAAAC;AAAA,EAAA,sCAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,yBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,qDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAQd,SAAS,+BACd,SAC4B;AAC5B,WAAS,iCAAiC,EAAE,KAAK,GAAQ;AACvD,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,KAAK,qDAAqD;AAAA,QACxD,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,YAAQ,uC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AA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAmBO,SAASC,mBACd,YAC4B;AAC5B,SAAO,CACL,SACA,gBAMAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA+BO,SAASC,mBACd,YAC4B;AAC5B,SAAO,CACL,aAKA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA8BO,SAASC,mBACd,YAC4B;AAC5B,SAAO,CACL,gBAMAA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAyBO,SAASC,wBACd,YACiC;AACjC,SAAO,CACL,2BASA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAoCO,IAAM,4BAAwB;AAAA,EACnC;AAAA,EACA;AAAA,EACA,CAAC,cACC;AAAA,QACE,wCAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,kCAAkC;AAAA,UAC1C,EAAE,MAAM,qBAAqB;AAAA,QAC/B;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA+B;;;AGzR/B,IAAAC,uBAAiC;AACjC,sCAAkC;AAQ3B,IAAMC,kCAGK,2DAAiBA,+BAAoC;AAChE,IAAMC,qCAGK,2DAAiBA,kCAAuC;AACnE,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,0BAGK,2DAAiBA,uBAA4B;AAMxD,IAAMC,6BAET,mDAAkB,qBAA2B;","names":["bulkCreateFulfillments","createFulfillment","deleteFulfillment","listFulfillmentsForMultipleOrders","listFulfillmentsForSingleOrder","onFulfillmentsUpdated","updateFulfillment","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_timestamp","import_rest_modules","payload","IdentityType","FulfillmentStatus","WebhookIdentityType","listFulfillmentsForSingleOrder","sdkTransformError","listFulfillmentsForMultipleOrders","createFulfillment","updateFulfillment","deleteFulfillment","listFulfillmentsForSingleOrder","listFulfillmentsForMultipleOrders","createFulfillment","updateFulfillment","deleteFulfillment","bulkCreateFulfillments","import_rest_modules","listFulfillmentsForSingleOrder","listFulfillmentsForMultipleOrders","createFulfillment","updateFulfillment","deleteFulfillment","bulkCreateFulfillments","onFulfillmentsUpdated"]}
|
|
@@ -496,11 +496,13 @@ declare enum WebhookIdentityType {
|
|
|
496
496
|
}
|
|
497
497
|
/** @enumType */
|
|
498
498
|
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
499
|
+
/** @docsIgnore */
|
|
499
500
|
type CreateFulfillmentApplicationErrors = {
|
|
500
501
|
code?: 'TRACKING_NUMBER_ALREADY_EXISTS';
|
|
501
502
|
description?: string;
|
|
502
503
|
data?: Record<string, any>;
|
|
503
504
|
};
|
|
505
|
+
/** @docsIgnore */
|
|
504
506
|
type UpdateFulfillmentApplicationErrors = {
|
|
505
507
|
code?: 'TRACKING_NUMBER_ALREADY_EXISTS';
|
|
506
508
|
description?: string;
|
|
@@ -594,7 +596,7 @@ declare function onFulfillmentsUpdated(handler: (event: FulfillmentsUpdatedEnvel
|
|
|
594
596
|
* @applicableIdentity MEMBER
|
|
595
597
|
* @fqn com.wix.ecom.orders.fulfillments.v1.Fulfillments.ListFulfillmentsForSingleOrder
|
|
596
598
|
*/
|
|
597
|
-
declare function listFulfillmentsForSingleOrder(orderId: string): Promise<NonNullablePaths<ListFulfillmentsForSingleOrderResponse, `orderWithFulfillments.orderId` | `orderWithFulfillments.fulfillments
|
|
599
|
+
declare function listFulfillmentsForSingleOrder(orderId: string): Promise<NonNullablePaths<ListFulfillmentsForSingleOrderResponse, `orderWithFulfillments.orderId` | `orderWithFulfillments.fulfillments`, 3>>;
|
|
598
600
|
/**
|
|
599
601
|
* Retrieves fulfillments associated with multiple specified orders.
|
|
600
602
|
*
|
|
@@ -608,7 +610,7 @@ declare function listFulfillmentsForSingleOrder(orderId: string): Promise<NonNul
|
|
|
608
610
|
* @applicableIdentity MEMBER
|
|
609
611
|
* @fqn com.wix.ecom.orders.fulfillments.v1.Fulfillments.ListFulfillmentsForMultipleOrders
|
|
610
612
|
*/
|
|
611
|
-
declare function listFulfillmentsForMultipleOrders(orderIds: string[]): Promise<NonNullablePaths<ListFulfillmentsForMultipleOrdersResponse, `ordersWithFulfillments` | `ordersWithFulfillments.${number}.orderId
|
|
613
|
+
declare function listFulfillmentsForMultipleOrders(orderIds: string[]): Promise<NonNullablePaths<ListFulfillmentsForMultipleOrdersResponse, `ordersWithFulfillments` | `ordersWithFulfillments.${number}.orderId`, 4>>;
|
|
612
614
|
/**
|
|
613
615
|
* Creates an order fulfillment.
|
|
614
616
|
*
|
|
@@ -625,7 +627,7 @@ declare function listFulfillmentsForMultipleOrders(orderIds: string[]): Promise<
|
|
|
625
627
|
* @applicableIdentity APP
|
|
626
628
|
* @fqn com.wix.ecom.orders.fulfillments.v1.Fulfillments.CreateFulfillment
|
|
627
629
|
*/
|
|
628
|
-
declare function createFulfillment(orderId: string, fulfillment: NonNullablePaths<Fulfillment, `lineItems` | `lineItems.${number}._id
|
|
630
|
+
declare function createFulfillment(orderId: string, fulfillment: NonNullablePaths<Fulfillment, `lineItems` | `lineItems.${number}._id`, 4>): Promise<NonNullablePaths<CreateFulfillmentResponse, `orderWithFulfillments.orderId` | `orderWithFulfillments.fulfillments` | `fulfillmentId`, 3> & {
|
|
629
631
|
__applicationErrorsType?: CreateFulfillmentApplicationErrors;
|
|
630
632
|
}>;
|
|
631
633
|
/**
|
|
@@ -648,7 +650,7 @@ declare function createFulfillment(orderId: string, fulfillment: NonNullablePath
|
|
|
648
650
|
* @returns Order ID and the orders' associated fulfillments after update.
|
|
649
651
|
* @fqn com.wix.ecom.orders.fulfillments.v1.Fulfillments.UpdateFulfillment
|
|
650
652
|
*/
|
|
651
|
-
declare function updateFulfillment(identifiers: NonNullablePaths<UpdateFulfillmentIdentifiers, `fulfillmentId` | `orderId
|
|
653
|
+
declare function updateFulfillment(identifiers: NonNullablePaths<UpdateFulfillmentIdentifiers, `fulfillmentId` | `orderId`, 2>, options?: UpdateFulfillmentOptions): Promise<NonNullablePaths<OrderWithFulfillments, `orderId` | `fulfillments`, 2> & {
|
|
652
654
|
__applicationErrorsType?: UpdateFulfillmentApplicationErrors;
|
|
653
655
|
}>;
|
|
654
656
|
interface UpdateFulfillmentOptions {
|
|
@@ -715,7 +717,7 @@ interface UpdateFulfillmentIdentifiers {
|
|
|
715
717
|
* @applicableIdentity APP
|
|
716
718
|
* @fqn com.wix.ecom.orders.fulfillments.v1.Fulfillments.DeleteFulfillment
|
|
717
719
|
*/
|
|
718
|
-
declare function deleteFulfillment(identifiers: NonNullablePaths<DeleteFulfillmentIdentifiers, `fulfillmentId` | `orderId
|
|
720
|
+
declare function deleteFulfillment(identifiers: NonNullablePaths<DeleteFulfillmentIdentifiers, `fulfillmentId` | `orderId`, 2>): Promise<NonNullablePaths<DeleteFulfillmentResponse, `orderWithFulfillments.orderId` | `orderWithFulfillments.fulfillments`, 3>>;
|
|
719
721
|
interface DeleteFulfillmentIdentifiers {
|
|
720
722
|
/**
|
|
721
723
|
* ID of the fulfillment to delete.
|
|
@@ -745,6 +747,6 @@ interface DeleteFulfillmentIdentifiers {
|
|
|
745
747
|
* @applicableIdentity APP
|
|
746
748
|
* @fqn com.wix.ecom.orders.fulfillments.v1.Fulfillments.BulkCreateFulfillment
|
|
747
749
|
*/
|
|
748
|
-
declare function bulkCreateFulfillments(ordersWithFulfillments: NonNullablePaths<BulkCreateOrderWithFulfillments, `fulfillments` | `fulfillments.${number}.lineItems` | `fulfillments.${number}.lineItems.${number}._id` | `orderId
|
|
750
|
+
declare function bulkCreateFulfillments(ordersWithFulfillments: NonNullablePaths<BulkCreateOrderWithFulfillments, `fulfillments` | `fulfillments.${number}.lineItems` | `fulfillments.${number}.lineItems.${number}._id` | `orderId`, 6>[]): Promise<NonNullablePaths<BulkCreateFulfillmentResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.ordersWithFulfillments.orderId` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
|
|
749
751
|
|
|
750
752
|
export { type ActionEvent, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, type BulkCreateFulfillmentRequest, type BulkCreateFulfillmentResponse, type BulkCreateOrderWithFulfillments, type BulkOrderFulfillmentsResult, type BuyerInfo, type CreateFulfillmentApplicationErrors, type CreateFulfillmentRequest, type CreateFulfillmentResponse, type CustomFulfillmentInfo, type DeleteFulfillmentIdentifiers, type DeleteFulfillmentRequest, type DeleteFulfillmentResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type Fulfillment, type FulfillmentCreated, type FulfillmentDeleted, type FulfillmentFulfillmentInfoOneOf, type FulfillmentLineItem, FulfillmentStatus, type FulfillmentStatusWithLiterals, type FulfillmentTrackingInfo, type FulfillmentUpdated, type FulfillmentsUpdatedEnvelope, type IdentificationData, type IdentificationDataIdOneOf, IdentityType, type IdentityTypeWithLiterals, type ItemMetadata, type ListFulfillmentsForMultipleOrdersRequest, type ListFulfillmentsForMultipleOrdersResponse, type ListFulfillmentsForSingleOrderRequest, type ListFulfillmentsForSingleOrderResponse, type MessageEnvelope, type OrderWithFulfillments, type RestoreInfo, type UpdateFulfillmentApplicationErrors, type UpdateFulfillmentIdentifiers, type UpdateFulfillmentOptions, type UpdateFulfillmentRequest, type UpdateFulfillmentResponse, type V2FulfillmentTrackingInfo, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCreateFulfillments, createFulfillment, deleteFulfillment, listFulfillmentsForMultipleOrders, listFulfillmentsForSingleOrder, onFulfillmentsUpdated, updateFulfillment };
|