@wix/auto_sdk_ecom_order-fulfillments 1.0.0

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.
Files changed (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/ecom-v1-fulfillments-order-fulfillments.context.d.ts +18 -0
  11. package/build/cjs/src/ecom-v1-fulfillments-order-fulfillments.context.js +24 -0
  12. package/build/cjs/src/ecom-v1-fulfillments-order-fulfillments.context.js.map +1 -0
  13. package/build/cjs/src/ecom-v1-fulfillments-order-fulfillments.http.d.ts +47 -0
  14. package/build/cjs/src/ecom-v1-fulfillments-order-fulfillments.http.js +256 -0
  15. package/build/cjs/src/ecom-v1-fulfillments-order-fulfillments.http.js.map +1 -0
  16. package/build/cjs/src/ecom-v1-fulfillments-order-fulfillments.meta.d.ts +28 -0
  17. package/build/cjs/src/ecom-v1-fulfillments-order-fulfillments.meta.js +148 -0
  18. package/build/cjs/src/ecom-v1-fulfillments-order-fulfillments.meta.js.map +1 -0
  19. package/build/cjs/src/ecom-v1-fulfillments-order-fulfillments.public.d.ts +80 -0
  20. package/build/cjs/src/ecom-v1-fulfillments-order-fulfillments.public.js +59 -0
  21. package/build/cjs/src/ecom-v1-fulfillments-order-fulfillments.public.js.map +1 -0
  22. package/build/cjs/src/ecom-v1-fulfillments-order-fulfillments.types.d.ts +431 -0
  23. package/build/cjs/src/ecom-v1-fulfillments-order-fulfillments.types.js +34 -0
  24. package/build/cjs/src/ecom-v1-fulfillments-order-fulfillments.types.js.map +1 -0
  25. package/build/cjs/src/ecom-v1-fulfillments-order-fulfillments.universal.d.ts +710 -0
  26. package/build/cjs/src/ecom-v1-fulfillments-order-fulfillments.universal.js +362 -0
  27. package/build/cjs/src/ecom-v1-fulfillments-order-fulfillments.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.context.d.ts +18 -0
  39. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.context.js +18 -0
  40. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.context.js.map +1 -0
  41. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.http.d.ts +47 -0
  42. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.http.js +247 -0
  43. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.http.js.map +1 -0
  44. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.meta.d.ts +28 -0
  45. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.meta.js +116 -0
  46. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.meta.js.map +1 -0
  47. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.public.d.ts +80 -0
  48. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.public.js +47 -0
  49. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.public.js.map +1 -0
  50. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.types.d.ts +431 -0
  51. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.types.js +31 -0
  52. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.types.js.map +1 -0
  53. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.universal.d.ts +710 -0
  54. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.universal.js +330 -0
  55. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.context.d.ts +18 -0
  66. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.context.js +24 -0
  67. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.context.js.map +1 -0
  68. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.http.d.ts +47 -0
  69. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.http.js +256 -0
  70. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.http.js.map +1 -0
  71. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.meta.d.ts +28 -0
  72. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.meta.js +148 -0
  73. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.meta.js.map +1 -0
  74. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.public.d.ts +80 -0
  75. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.public.js +59 -0
  76. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.public.js.map +1 -0
  77. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.types.d.ts +431 -0
  78. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.types.js +34 -0
  79. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.types.js.map +1 -0
  80. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.universal.d.ts +710 -0
  81. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.universal.js +362 -0
  82. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.context.d.ts +18 -0
  93. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.context.js +18 -0
  94. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.context.js.map +1 -0
  95. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.http.d.ts +47 -0
  96. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.http.js +247 -0
  97. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.http.js.map +1 -0
  98. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.meta.d.ts +28 -0
  99. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.meta.js +116 -0
  100. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.meta.js.map +1 -0
  101. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.public.d.ts +80 -0
  102. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.public.js +47 -0
  103. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.public.js.map +1 -0
  104. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.types.d.ts +431 -0
  105. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.types.js +31 -0
  106. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.types.js.map +1 -0
  107. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.universal.d.ts +710 -0
  108. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.universal.js +330 -0
  109. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,80 @@
1
+ import { EventDefinition, HttpClient } from '@wix/sdk-types';
2
+ import { BulkCreateFulfillmentResponse, BulkCreateFulfillmentResponseNonNullableFields, BulkCreateOrderWithFulfillments, CreateFulfillmentResponse, CreateFulfillmentResponseNonNullableFields, DeleteFulfillmentIdentifiers, DeleteFulfillmentResponse, DeleteFulfillmentResponseNonNullableFields, Fulfillment, FulfillmentsUpdatedEnvelope, ListFulfillmentsForMultipleOrdersResponse, ListFulfillmentsForMultipleOrdersResponseNonNullableFields, ListFulfillmentsForSingleOrderResponse, ListFulfillmentsForSingleOrderResponseNonNullableFields, OrderWithFulfillments, OrderWithFulfillmentsNonNullableFields, UpdateFulfillmentIdentifiers, UpdateFulfillmentOptions } from './ecom-v1-fulfillments-order-fulfillments.universal.js';
3
+ export declare const __metadata: {
4
+ PACKAGE_NAME: string;
5
+ };
6
+ export declare function listFulfillmentsForSingleOrder(httpClient: HttpClient): ListFulfillmentsForSingleOrderSignature;
7
+ interface ListFulfillmentsForSingleOrderSignature {
8
+ /**
9
+ * Retrieves fulfillments associated with a specified order.
10
+ *
11
+ *
12
+ * The `listFulfillmentsForSingleOrder()` function returns a Promise that resolves when the fulfillments are retrieved.
13
+ * @param - Order ID for which to retrieve fulfillments.
14
+ */
15
+ (orderId: string): Promise<ListFulfillmentsForSingleOrderResponse & ListFulfillmentsForSingleOrderResponseNonNullableFields>;
16
+ }
17
+ export declare function listFulfillmentsForMultipleOrders(httpClient: HttpClient): ListFulfillmentsForMultipleOrdersSignature;
18
+ interface ListFulfillmentsForMultipleOrdersSignature {
19
+ /**
20
+ * Retrieves fulfillments associated with multiple specified orders.
21
+ *
22
+ *
23
+ * The `listFulfillmentsForMultipleOrders()` function returns a Promise that resolves when the fulfillments are retrieved.
24
+ * @param - List of order IDs for which to retrieve fulfillments.
25
+ */
26
+ (orderIds: string[]): Promise<ListFulfillmentsForMultipleOrdersResponse & ListFulfillmentsForMultipleOrdersResponseNonNullableFields>;
27
+ }
28
+ export declare function createFulfillment(httpClient: HttpClient): CreateFulfillmentSignature;
29
+ interface CreateFulfillmentSignature {
30
+ /**
31
+ * Creates an order fulfillment.
32
+ *
33
+ *
34
+ * The `createFulfillment()` function returns a Promise that resolves when the fulfillment is created.
35
+ * @param - Order ID.
36
+ * @param - Fulfillment info.
37
+ */
38
+ (orderId: string, fulfillment: Fulfillment): Promise<CreateFulfillmentResponse & CreateFulfillmentResponseNonNullableFields>;
39
+ }
40
+ export declare function updateFulfillment(httpClient: HttpClient): UpdateFulfillmentSignature;
41
+ interface UpdateFulfillmentSignature {
42
+ /**
43
+ * Updates a fulfillment's properties.
44
+ * To update a field's value, include the new value in the `fulfillment` field in the body params.
45
+ * To remove a field's value, pass `null`.
46
+ *
47
+ *
48
+ * The `updateFulfillment()` function returns a Promise that resolves when the fulfillment is updated.
49
+ *
50
+ * > **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.
51
+ * @param - Order and fulfillment IDs to be updated.
52
+ * @param - Available options to use when updating a fulfillment.
53
+ * @returns Order ID and the orders' associated fulfillments after update.
54
+ */
55
+ (identifiers: UpdateFulfillmentIdentifiers, options?: UpdateFulfillmentOptions | undefined): Promise<OrderWithFulfillments & OrderWithFulfillmentsNonNullableFields>;
56
+ }
57
+ export declare function deleteFulfillment(httpClient: HttpClient): DeleteFulfillmentSignature;
58
+ interface DeleteFulfillmentSignature {
59
+ /**
60
+ * Deletes an existing order fulfillment.
61
+ *
62
+ *
63
+ * The `deleteFulfillment()` function returns a Promise that resolves when the fulfillment is deleted.
64
+ * @param - Order and fulfillment IDs.
65
+ */
66
+ (identifiers: DeleteFulfillmentIdentifiers): Promise<DeleteFulfillmentResponse & DeleteFulfillmentResponseNonNullableFields>;
67
+ }
68
+ export declare function bulkCreateFulfillments(httpClient: HttpClient): BulkCreateFulfillmentsSignature;
69
+ interface BulkCreateFulfillmentsSignature {
70
+ /**
71
+ * Creates multiple fulfillments for one or more orders.
72
+ *
73
+ *
74
+ * The `bulkCreateFulfillments()` function returns a Promise that resolves when the fulfillments are created.
75
+ * @param - List of order IDs and their associated fulfillments' info.
76
+ */
77
+ (ordersWithFulfillments: BulkCreateOrderWithFulfillments[]): Promise<BulkCreateFulfillmentResponse & BulkCreateFulfillmentResponseNonNullableFields>;
78
+ }
79
+ export declare const onFulfillmentsUpdated: EventDefinition<FulfillmentsUpdatedEnvelope, "wix.ecom.v1.fulfillments_updated">;
80
+ export { ActionEvent, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkCreateFulfillmentRequest, BulkCreateFulfillmentResponse, BulkCreateFulfillmentResponseNonNullableFields, BulkCreateOrderWithFulfillments, BulkOrderFulfillmentsResult, BuyerInfo, CreateFulfillmentRequest, CreateFulfillmentResponse, CreateFulfillmentResponseNonNullableFields, CustomFulfillmentInfo, DeleteFulfillmentIdentifiers, DeleteFulfillmentRequest, DeleteFulfillmentResponse, DeleteFulfillmentResponseNonNullableFields, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, Fulfillment, FulfillmentCreated, FulfillmentDeleted, FulfillmentFulfillmentInfoOneOf, FulfillmentLineItem, FulfillmentStatus, FulfillmentTrackingInfo, FulfillmentUpdated, FulfillmentsUpdatedEnvelope, IdentificationData, IdentificationDataIdOneOf, IdentityType, ItemMetadata, ListFulfillmentsForMultipleOrdersRequest, ListFulfillmentsForMultipleOrdersResponse, ListFulfillmentsForMultipleOrdersResponseNonNullableFields, ListFulfillmentsForSingleOrderRequest, ListFulfillmentsForSingleOrderResponse, ListFulfillmentsForSingleOrderResponseNonNullableFields, MessageEnvelope, OrderWithFulfillments, OrderWithFulfillmentsNonNullableFields, RestoreInfo, UpdateFulfillmentIdentifiers, UpdateFulfillmentOptions, UpdateFulfillmentRequest, UpdateFulfillmentResponse, UpdateFulfillmentResponseNonNullableFields, V2FulfillmentTrackingInfo, WebhookIdentityType, } from './ecom-v1-fulfillments-order-fulfillments.universal.js';
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebhookIdentityType = exports.IdentityType = exports.FulfillmentStatus = exports.onFulfillmentsUpdated = exports.bulkCreateFulfillments = exports.deleteFulfillment = exports.updateFulfillment = exports.createFulfillment = exports.listFulfillmentsForMultipleOrders = exports.listFulfillmentsForSingleOrder = exports.__metadata = void 0;
4
+ const rename_all_nested_keys_1 = require("@wix/sdk-runtime/rename-all-nested-keys");
5
+ const timestamp_1 = require("@wix/sdk-runtime/transformations/timestamp");
6
+ const transform_paths_1 = require("@wix/sdk-runtime/transformations/transform-paths");
7
+ const sdk_types_1 = require("@wix/sdk-types");
8
+ const ecom_v1_fulfillments_order_fulfillments_universal_js_1 = require("./ecom-v1-fulfillments-order-fulfillments.universal.js");
9
+ exports.__metadata = { PACKAGE_NAME: '@wix/ecom' };
10
+ function listFulfillmentsForSingleOrder(httpClient) {
11
+ return (orderId) => (0, ecom_v1_fulfillments_order_fulfillments_universal_js_1.listFulfillmentsForSingleOrder)(orderId,
12
+ // @ts-ignore
13
+ { httpClient });
14
+ }
15
+ exports.listFulfillmentsForSingleOrder = listFulfillmentsForSingleOrder;
16
+ function listFulfillmentsForMultipleOrders(httpClient) {
17
+ return (orderIds) => (0, ecom_v1_fulfillments_order_fulfillments_universal_js_1.listFulfillmentsForMultipleOrders)(orderIds,
18
+ // @ts-ignore
19
+ { httpClient });
20
+ }
21
+ exports.listFulfillmentsForMultipleOrders = listFulfillmentsForMultipleOrders;
22
+ function createFulfillment(httpClient) {
23
+ return (orderId, fulfillment) => (0, ecom_v1_fulfillments_order_fulfillments_universal_js_1.createFulfillment)(orderId, fulfillment,
24
+ // @ts-ignore
25
+ { httpClient });
26
+ }
27
+ exports.createFulfillment = createFulfillment;
28
+ function updateFulfillment(httpClient) {
29
+ return (identifiers, options) => (0, ecom_v1_fulfillments_order_fulfillments_universal_js_1.updateFulfillment)(identifiers, options,
30
+ // @ts-ignore
31
+ { httpClient });
32
+ }
33
+ exports.updateFulfillment = updateFulfillment;
34
+ function deleteFulfillment(httpClient) {
35
+ return (identifiers) => (0, ecom_v1_fulfillments_order_fulfillments_universal_js_1.deleteFulfillment)(identifiers,
36
+ // @ts-ignore
37
+ { httpClient });
38
+ }
39
+ exports.deleteFulfillment = deleteFulfillment;
40
+ function bulkCreateFulfillments(httpClient) {
41
+ return (ordersWithFulfillments) => (0, ecom_v1_fulfillments_order_fulfillments_universal_js_1.bulkCreateFulfillments)(ordersWithFulfillments,
42
+ // @ts-ignore
43
+ { httpClient });
44
+ }
45
+ exports.bulkCreateFulfillments = bulkCreateFulfillments;
46
+ exports.onFulfillmentsUpdated = (0, sdk_types_1.EventDefinition)('wix.ecom.v1.fulfillments_updated', true, (event) => (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)((0, transform_paths_1.transformPaths)(event, [
47
+ {
48
+ transformFn: timestamp_1.transformRESTTimestampToSDKTimestamp,
49
+ paths: [
50
+ { path: 'entity.fulfillments.createdDate' },
51
+ { path: 'metadata.eventTime' },
52
+ ],
53
+ },
54
+ ])))();
55
+ var ecom_v1_fulfillments_order_fulfillments_universal_js_2 = require("./ecom-v1-fulfillments-order-fulfillments.universal.js");
56
+ Object.defineProperty(exports, "FulfillmentStatus", { enumerable: true, get: function () { return ecom_v1_fulfillments_order_fulfillments_universal_js_2.FulfillmentStatus; } });
57
+ Object.defineProperty(exports, "IdentityType", { enumerable: true, get: function () { return ecom_v1_fulfillments_order_fulfillments_universal_js_2.IdentityType; } });
58
+ Object.defineProperty(exports, "WebhookIdentityType", { enumerable: true, get: function () { return ecom_v1_fulfillments_order_fulfillments_universal_js_2.WebhookIdentityType; } });
59
+ //# sourceMappingURL=ecom-v1-fulfillments-order-fulfillments.public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ecom-v1-fulfillments-order-fulfillments.public.js","sourceRoot":"","sources":["../../../src/ecom-v1-fulfillments-order-fulfillments.public.ts"],"names":[],"mappings":";;;AAAA,oFAAkG;AAClG,0EAAkG;AAClG,sFAAkF;AAClF,8CAA6D;AAC7D,iIAyBgE;AAEnD,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;AAExD,SAAgB,8BAA8B,CAC5C,UAAsB;IAEtB,OAAO,CAAC,OAAe,EAAE,EAAE,CACzB,IAAA,qFAAuC,EACrC,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AATD,wEASC;AAgBD,SAAgB,iCAAiC,CAC/C,UAAsB;IAEtB,OAAO,CAAC,QAAkB,EAAE,EAAE,CAC5B,IAAA,wFAA0C,EACxC,QAAQ;IACR,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AATD,8EASC;AAgBD,SAAgB,iBAAiB,CAC/B,UAAsB;IAEtB,OAAO,CAAC,OAAe,EAAE,WAAwB,EAAE,EAAE,CACnD,IAAA,wEAA0B,EACxB,OAAO,EACP,WAAW;IACX,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAVD,8CAUC;AAgBD,SAAgB,iBAAiB,CAC/B,UAAsB;IAEtB,OAAO,CACL,WAAyC,EACzC,OAAkC,EAClC,EAAE,CACF,IAAA,wEAA0B,EACxB,WAAW,EACX,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAbD,8CAaC;AAsBD,SAAgB,iBAAiB,CAC/B,UAAsB;IAEtB,OAAO,CAAC,WAAyC,EAAE,EAAE,CACnD,IAAA,wEAA0B,EACxB,WAAW;IACX,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AATD,8CASC;AAeD,SAAgB,sBAAsB,CACpC,UAAsB;IAEtB,OAAO,CAAC,sBAAyD,EAAE,EAAE,CACnE,IAAA,6EAA+B,EAC7B,sBAAsB;IACtB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AATD,wDASC;AAgBY,QAAA,qBAAqB,GAAG,IAAA,2BAAe,EAClD,kCAAkC,EAClC,IAAI,EACJ,CAAC,KAAkC,EAAE,EAAE,CACrC,IAAA,gEAAuC,EACrC,IAAA,gCAAc,EAAC,KAAK,EAAE;IACpB;QACE,WAAW,EAAE,gDAAoC;QACjD,KAAK,EAAE;YACL,EAAE,IAAI,EAAE,iCAAiC,EAAE;YAC3C,EAAE,IAAI,EAAE,oBAAoB,EAAE;SAC/B;KACF;CACF,CAAC,CACH,CACJ,EAA+B,CAAC;AAEjC,+HAuDgE;AAzB9D,yJAAA,iBAAiB,OAAA;AAMjB,oJAAA,YAAY,OAAA;AAkBZ,2JAAA,mBAAmB,OAAA"}
@@ -0,0 +1,431 @@
1
+ export interface OrderWithFulfillments {
2
+ /** Order ID. */
3
+ orderId?: string;
4
+ /** Fulfillments associated with the order. */
5
+ fulfillments?: Fulfillment[];
6
+ }
7
+ /** for now, this is a sub-object of Orders, so can refer to order line items by id. */
8
+ export interface Fulfillment extends FulfillmentFulfillmentInfoOneOf {
9
+ /** Tracking info. */
10
+ trackingInfo?: FulfillmentTrackingInfo;
11
+ /** Custom fulfillment info. */
12
+ customInfo?: CustomFulfillmentInfo;
13
+ /**
14
+ * Fulfillment ID.
15
+ * @readonly
16
+ */
17
+ id?: string | null;
18
+ /**
19
+ * Fulfillment creation date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
20
+ * @readonly
21
+ */
22
+ createdDate?: Date | null;
23
+ /** Line items being fulfilled. */
24
+ lineItems?: FulfillmentLineItem[];
25
+ /**
26
+ * Fulfillment status.
27
+ *
28
+ * Supported values:
29
+ * + `"Pending"`
30
+ * + `"Accepted"`
31
+ * + `"Ready"`
32
+ * + `"In_Delivery"`
33
+ * + `"Fulfilled"`
34
+ */
35
+ status?: string | null;
36
+ /** Fulfillment handling complete. */
37
+ completed?: boolean | null;
38
+ }
39
+ /** @oneof */
40
+ export interface FulfillmentFulfillmentInfoOneOf {
41
+ /** Tracking info. */
42
+ trackingInfo?: FulfillmentTrackingInfo;
43
+ /** Custom fulfillment info. */
44
+ customInfo?: CustomFulfillmentInfo;
45
+ }
46
+ export interface FulfillmentLineItem {
47
+ /** Line item ID (mirrors the ID of the order line item). */
48
+ id?: string;
49
+ /**
50
+ * Line item quantity.
51
+ * * If this property isn't passed on creation, it defaults to the number of items not already linked to a fulfillment.
52
+ * * 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.
53
+ *
54
+ * Min: `1`
55
+ * Max: `100000`
56
+ */
57
+ quantity?: number | null;
58
+ }
59
+ export interface FulfillmentTrackingInfo {
60
+ /** Shipping/delivery tracking number. */
61
+ trackingNumber?: string | null;
62
+ /**
63
+ * Shipping provider. Using one of the following shipping providers will allow for auto-filling the tracking link:
64
+ * * `'fedex'`
65
+ * * `'ups'`
66
+ * * `'usps'`
67
+ * * `'dhl'`
68
+ * * `'canadaPost'`
69
+ */
70
+ shippingProvider?: string | null;
71
+ /** Tracking link. Auto-filled if a predefined shipping provider is used, otherwise provided on creation. */
72
+ trackingLink?: string | null;
73
+ }
74
+ export interface CustomFulfillmentInfo {
75
+ /** Custom fulfillment info in key:value form. */
76
+ fieldsData?: Record<string, string>;
77
+ }
78
+ export interface FulfillmentCreated {
79
+ /** Order ID (auto generated upon order creation). */
80
+ orderId?: string;
81
+ /** ID of the newly created fulfillment. */
82
+ fulfillmentId?: string;
83
+ /** Fulfillment creation date and time. */
84
+ dateCreated?: Date | null;
85
+ /** Buyer information. */
86
+ buyerInfo?: BuyerInfo;
87
+ /** Order fulfillment status. */
88
+ fulfillmentStatus?: FulfillmentStatus;
89
+ /** Fulfillment tracking information. */
90
+ trackingInfo?: V2FulfillmentTrackingInfo;
91
+ }
92
+ /** Buyer Info */
93
+ export interface BuyerInfo {
94
+ /** Wix customer ID */
95
+ id?: string | null;
96
+ /**
97
+ * Deprecated (use identityType instead)
98
+ * @readonly
99
+ * @deprecated
100
+ */
101
+ type?: IdentityType;
102
+ /** Customer type */
103
+ identityType?: IdentityType;
104
+ /**
105
+ * Customer's first name
106
+ * @readonly
107
+ */
108
+ firstName?: string;
109
+ /**
110
+ * Customer's last name
111
+ * @readonly
112
+ */
113
+ lastName?: string;
114
+ /**
115
+ * Customer's phone number
116
+ * @readonly
117
+ */
118
+ phone?: string | null;
119
+ /**
120
+ * Customer's email address
121
+ * @readonly
122
+ */
123
+ email?: string;
124
+ }
125
+ export declare enum IdentityType {
126
+ UNSPECIFIED_IDENTITY_TYPE = "UNSPECIFIED_IDENTITY_TYPE",
127
+ /** Site member */
128
+ MEMBER = "MEMBER",
129
+ /** Contact */
130
+ CONTACT = "CONTACT"
131
+ }
132
+ export declare enum FulfillmentStatus {
133
+ /** None of the order items are fulfilled */
134
+ NOT_FULFILLED = "NOT_FULFILLED",
135
+ /**
136
+ * All of the order items are fulfilled
137
+ * Orders without shipping info are fulfilled automatically
138
+ */
139
+ FULFILLED = "FULFILLED",
140
+ /** Order is canceled */
141
+ CANCELED = "CANCELED",
142
+ /** Some, but not all of the order items are fulfilled */
143
+ PARTIALLY_FULFILLED = "PARTIALLY_FULFILLED"
144
+ }
145
+ export interface V2FulfillmentTrackingInfo {
146
+ /** Tracking number. */
147
+ trackingNumber?: string;
148
+ /**
149
+ * Shipping provider. Using the following shipping providers will allow for autofilling the tracking link:
150
+ * * `fedex`
151
+ * * `ups`
152
+ * * `usps`
153
+ * * `dhl`
154
+ * * `canadaPost`
155
+ */
156
+ shippingProvider?: string;
157
+ /** Tracking link - autofilled if using a predefined shipping provider, otherwise provided on creation. */
158
+ trackingLink?: string | null;
159
+ }
160
+ export interface FulfillmentUpdated {
161
+ /** Order ID (auto generated upon order creation). */
162
+ orderId?: string;
163
+ /** ID of the updated fulfillment. */
164
+ fulfillmentId?: string;
165
+ /** Fulfillment tracking information. */
166
+ trackingInfo?: V2FulfillmentTrackingInfo;
167
+ }
168
+ export interface FulfillmentDeleted {
169
+ /** Order ID (auto generated upon order creation). */
170
+ orderId?: string;
171
+ /** ID of the deleted fulfillment. */
172
+ fulfillmentId?: string;
173
+ /** Order fulfillment status. */
174
+ fulfillmentStatus?: FulfillmentStatus;
175
+ }
176
+ export interface ListFulfillmentsForSingleOrderRequest {
177
+ /** Order ID for which to retrieve fulfillments. */
178
+ orderId: string;
179
+ }
180
+ export interface ListFulfillmentsForSingleOrderResponse {
181
+ /** List of fulfillments associated with the order. */
182
+ orderWithFulfillments?: OrderWithFulfillments;
183
+ }
184
+ export interface ListFulfillmentsForMultipleOrdersRequest {
185
+ /** List of order IDs for which to retrieve fulfillments. */
186
+ orderIds: string[];
187
+ }
188
+ export interface ListFulfillmentsForMultipleOrdersResponse {
189
+ /** List of order IDs and their associated fulfillments. */
190
+ ordersWithFulfillments?: OrderWithFulfillments[];
191
+ }
192
+ export interface CreateFulfillmentRequest {
193
+ /** Order ID. */
194
+ orderId: string;
195
+ /** Fulfillment info. */
196
+ fulfillment: Fulfillment;
197
+ }
198
+ export interface CreateFulfillmentResponse {
199
+ /** Order ID and the orders' fulfillments. */
200
+ orderWithFulfillments?: OrderWithFulfillments;
201
+ /** ID of created fulfillment. */
202
+ fulfillmentId?: string;
203
+ }
204
+ export interface UpdateFulfillmentRequest {
205
+ /** Order ID. */
206
+ orderId: string;
207
+ /** Fulfillment info to update. */
208
+ fulfillment?: Fulfillment;
209
+ }
210
+ export interface UpdateFulfillmentResponse {
211
+ /** Order ID and the orders' associated fulfillments after update. */
212
+ orderWithFulfillments?: OrderWithFulfillments;
213
+ }
214
+ export interface DeleteFulfillmentRequest {
215
+ /** Order ID. */
216
+ orderId: string;
217
+ /** ID of the fulfillment to delete. */
218
+ fulfillmentId: string;
219
+ }
220
+ export interface DeleteFulfillmentResponse {
221
+ /** Order ID and the order's associated fulfillments after deletion. */
222
+ orderWithFulfillments?: OrderWithFulfillments;
223
+ }
224
+ export interface BulkCreateFulfillmentRequest {
225
+ /** List of order IDs and their associated fulfillments. */
226
+ ordersWithFulfillments: BulkCreateOrderWithFulfillments[];
227
+ }
228
+ export interface BulkCreateOrderWithFulfillments {
229
+ /** Order ID. */
230
+ orderId?: string;
231
+ /** Fulfillments associated with the order. */
232
+ fulfillments?: Fulfillment[];
233
+ }
234
+ export interface BulkCreateFulfillmentResponse {
235
+ /** Items updated by bulk action. */
236
+ results?: BulkOrderFulfillmentsResult[];
237
+ /** Bulk action metadata. */
238
+ bulkActionMetadata?: BulkActionMetadata;
239
+ }
240
+ export interface BulkOrderFulfillmentsResult {
241
+ /** Item metadata. */
242
+ itemMetadata?: ItemMetadata;
243
+ ordersWithFulfillments?: OrderWithFulfillments;
244
+ }
245
+ export interface ItemMetadata {
246
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
247
+ id?: string | null;
248
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
249
+ originalIndex?: number;
250
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
251
+ success?: boolean;
252
+ /** Details about the error in case of failure. */
253
+ error?: ApplicationError;
254
+ }
255
+ export interface ApplicationError {
256
+ /** Error code. */
257
+ code?: string;
258
+ /** Description of the error. */
259
+ description?: string;
260
+ /** Data related to the error. */
261
+ data?: Record<string, any> | null;
262
+ }
263
+ export interface BulkActionMetadata {
264
+ /** Number of items that were successfully processed. */
265
+ totalSuccesses?: number;
266
+ /** Number of items that couldn't be processed. */
267
+ totalFailures?: number;
268
+ /** Number of failures without details because detailed failure threshold was exceeded. */
269
+ undetailedFailures?: number;
270
+ }
271
+ export interface DomainEvent extends DomainEventBodyOneOf {
272
+ createdEvent?: EntityCreatedEvent;
273
+ updatedEvent?: EntityUpdatedEvent;
274
+ deletedEvent?: EntityDeletedEvent;
275
+ actionEvent?: ActionEvent;
276
+ /**
277
+ * Unique event ID.
278
+ * Allows clients to ignore duplicate webhooks.
279
+ */
280
+ id?: string;
281
+ /**
282
+ * Assumes actions are also always typed to an entity_type
283
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
284
+ */
285
+ entityFqdn?: string;
286
+ /**
287
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
288
+ * This is although the created/updated/deleted notion is duplication of the oneof types
289
+ * Example: created/updated/deleted/started/completed/email_opened
290
+ */
291
+ slug?: string;
292
+ /** ID of the entity associated with the event. */
293
+ entityId?: string;
294
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
295
+ eventTime?: Date | null;
296
+ /**
297
+ * Whether the event was triggered as a result of a privacy regulation application
298
+ * (for example, GDPR).
299
+ */
300
+ triggeredByAnonymizeRequest?: boolean | null;
301
+ /** If present, indicates the action that triggered the event. */
302
+ originatedFrom?: string | null;
303
+ /**
304
+ * A sequence number defining the order of updates to the underlying entity.
305
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
306
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
307
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
308
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
309
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
310
+ */
311
+ entityEventSequence?: string | null;
312
+ }
313
+ /** @oneof */
314
+ export interface DomainEventBodyOneOf {
315
+ createdEvent?: EntityCreatedEvent;
316
+ updatedEvent?: EntityUpdatedEvent;
317
+ deletedEvent?: EntityDeletedEvent;
318
+ actionEvent?: ActionEvent;
319
+ }
320
+ export interface EntityCreatedEvent {
321
+ entityAsJson?: string;
322
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
323
+ restoreInfo?: RestoreInfo;
324
+ }
325
+ export interface RestoreInfo {
326
+ deletedDate?: Date | null;
327
+ }
328
+ export interface EntityUpdatedEvent {
329
+ /**
330
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
331
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
332
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
333
+ */
334
+ currentEntityAsJson?: string;
335
+ }
336
+ export interface EntityDeletedEvent {
337
+ /** Entity that was deleted */
338
+ deletedEntityAsJson?: string | null;
339
+ }
340
+ export interface ActionEvent {
341
+ bodyAsJson?: string;
342
+ }
343
+ export interface MessageEnvelope {
344
+ /** App instance ID. */
345
+ instanceId?: string | null;
346
+ /** Event type. */
347
+ eventType?: string;
348
+ /** The identification type and identity data. */
349
+ identity?: IdentificationData;
350
+ /** Stringify payload. */
351
+ data?: string;
352
+ }
353
+ export interface IdentificationData extends IdentificationDataIdOneOf {
354
+ /** ID of a site visitor that has not logged in to the site. */
355
+ anonymousVisitorId?: string;
356
+ /** ID of a site visitor that has logged in to the site. */
357
+ memberId?: string;
358
+ /** ID of a Wix user (site owner, contributor, etc.). */
359
+ wixUserId?: string;
360
+ /** ID of an app. */
361
+ appId?: string;
362
+ /** @readonly */
363
+ identityType?: WebhookIdentityType;
364
+ }
365
+ /** @oneof */
366
+ export interface IdentificationDataIdOneOf {
367
+ /** ID of a site visitor that has not logged in to the site. */
368
+ anonymousVisitorId?: string;
369
+ /** ID of a site visitor that has logged in to the site. */
370
+ memberId?: string;
371
+ /** ID of a Wix user (site owner, contributor, etc.). */
372
+ wixUserId?: string;
373
+ /** ID of an app. */
374
+ appId?: string;
375
+ }
376
+ export declare enum WebhookIdentityType {
377
+ UNKNOWN = "UNKNOWN",
378
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
379
+ MEMBER = "MEMBER",
380
+ WIX_USER = "WIX_USER",
381
+ APP = "APP"
382
+ }
383
+ interface FulfillmentLineItemNonNullableFields {
384
+ id: string;
385
+ }
386
+ interface FulfillmentNonNullableFields {
387
+ lineItems: FulfillmentLineItemNonNullableFields[];
388
+ }
389
+ interface OrderWithFulfillmentsNonNullableFields {
390
+ orderId: string;
391
+ fulfillments: FulfillmentNonNullableFields[];
392
+ }
393
+ export interface ListFulfillmentsForSingleOrderResponseNonNullableFields {
394
+ orderWithFulfillments?: OrderWithFulfillmentsNonNullableFields;
395
+ }
396
+ export interface ListFulfillmentsForMultipleOrdersResponseNonNullableFields {
397
+ ordersWithFulfillments: OrderWithFulfillmentsNonNullableFields[];
398
+ }
399
+ export interface CreateFulfillmentResponseNonNullableFields {
400
+ orderWithFulfillments?: OrderWithFulfillmentsNonNullableFields;
401
+ fulfillmentId: string;
402
+ }
403
+ export interface UpdateFulfillmentResponseNonNullableFields {
404
+ orderWithFulfillments?: OrderWithFulfillmentsNonNullableFields;
405
+ }
406
+ export interface DeleteFulfillmentResponseNonNullableFields {
407
+ orderWithFulfillments?: OrderWithFulfillmentsNonNullableFields;
408
+ }
409
+ interface ApplicationErrorNonNullableFields {
410
+ code: string;
411
+ description: string;
412
+ }
413
+ interface ItemMetadataNonNullableFields {
414
+ originalIndex: number;
415
+ success: boolean;
416
+ error?: ApplicationErrorNonNullableFields;
417
+ }
418
+ interface BulkOrderFulfillmentsResultNonNullableFields {
419
+ itemMetadata?: ItemMetadataNonNullableFields;
420
+ ordersWithFulfillments?: OrderWithFulfillmentsNonNullableFields;
421
+ }
422
+ interface BulkActionMetadataNonNullableFields {
423
+ totalSuccesses: number;
424
+ totalFailures: number;
425
+ undetailedFailures: number;
426
+ }
427
+ export interface BulkCreateFulfillmentResponseNonNullableFields {
428
+ results: BulkOrderFulfillmentsResultNonNullableFields[];
429
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
430
+ }
431
+ export {};
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebhookIdentityType = exports.FulfillmentStatus = exports.IdentityType = void 0;
4
+ var IdentityType;
5
+ (function (IdentityType) {
6
+ IdentityType["UNSPECIFIED_IDENTITY_TYPE"] = "UNSPECIFIED_IDENTITY_TYPE";
7
+ /** Site member */
8
+ IdentityType["MEMBER"] = "MEMBER";
9
+ /** Contact */
10
+ IdentityType["CONTACT"] = "CONTACT";
11
+ })(IdentityType || (exports.IdentityType = IdentityType = {}));
12
+ var FulfillmentStatus;
13
+ (function (FulfillmentStatus) {
14
+ /** None of the order items are fulfilled */
15
+ FulfillmentStatus["NOT_FULFILLED"] = "NOT_FULFILLED";
16
+ /**
17
+ * All of the order items are fulfilled
18
+ * Orders without shipping info are fulfilled automatically
19
+ */
20
+ FulfillmentStatus["FULFILLED"] = "FULFILLED";
21
+ /** Order is canceled */
22
+ FulfillmentStatus["CANCELED"] = "CANCELED";
23
+ /** Some, but not all of the order items are fulfilled */
24
+ FulfillmentStatus["PARTIALLY_FULFILLED"] = "PARTIALLY_FULFILLED";
25
+ })(FulfillmentStatus || (exports.FulfillmentStatus = FulfillmentStatus = {}));
26
+ var WebhookIdentityType;
27
+ (function (WebhookIdentityType) {
28
+ WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
29
+ WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
30
+ WebhookIdentityType["MEMBER"] = "MEMBER";
31
+ WebhookIdentityType["WIX_USER"] = "WIX_USER";
32
+ WebhookIdentityType["APP"] = "APP";
33
+ })(WebhookIdentityType || (exports.WebhookIdentityType = WebhookIdentityType = {}));
34
+ //# sourceMappingURL=ecom-v1-fulfillments-order-fulfillments.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ecom-v1-fulfillments-order-fulfillments.types.js","sourceRoot":"","sources":["../../../src/ecom-v1-fulfillments-order-fulfillments.types.ts"],"names":[],"mappings":";;;AAoIA,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,uEAAuD,CAAA;IACvD,kBAAkB;IAClB,iCAAiB,CAAA;IACjB,cAAc;IACd,mCAAmB,CAAA;AACrB,CAAC,EANW,YAAY,4BAAZ,YAAY,QAMvB;AAED,IAAY,iBAYX;AAZD,WAAY,iBAAiB;IAC3B,4CAA4C;IAC5C,oDAA+B,CAAA;IAC/B;;;OAGG;IACH,4CAAuB,CAAA;IACvB,wBAAwB;IACxB,0CAAqB,CAAA;IACrB,yDAAyD;IACzD,gEAA2C,CAAA;AAC7C,CAAC,EAZW,iBAAiB,iCAAjB,iBAAiB,QAY5B;AAuQD,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,mCAAnB,mBAAmB,QAM9B"}