@wix/auto_sdk_ecom_order-fulfillments 1.0.9 → 1.0.11

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 (133) 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/{ecom-v1-fulfillments-order-fulfillments.universal-D89xmwPL.d.mts → cjs/src/ecom-v1-fulfillments-order-fulfillments.types.d.ts} +54 -174
  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 +813 -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/src/ecom-v1-fulfillments-order-fulfillments.context.d.ts +18 -0
  38. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.context.js +18 -0
  39. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.context.js.map +1 -0
  40. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.http.d.ts +47 -0
  41. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.http.js +247 -0
  42. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.http.js.map +1 -0
  43. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.meta.d.ts +28 -0
  44. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.meta.js +116 -0
  45. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.meta.js.map +1 -0
  46. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.public.d.ts +80 -0
  47. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.public.js +47 -0
  48. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.public.js.map +1 -0
  49. package/build/{ecom-v1-fulfillments-order-fulfillments.universal-D89xmwPL.d.ts → es/src/ecom-v1-fulfillments-order-fulfillments.types.d.ts} +54 -174
  50. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.types.js +31 -0
  51. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.types.js.map +1 -0
  52. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.universal.d.ts +813 -0
  53. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.universal.js +330 -0
  54. package/build/es/src/ecom-v1-fulfillments-order-fulfillments.universal.js.map +1 -0
  55. package/build/internal/cjs/index.d.ts +1 -0
  56. package/build/internal/cjs/index.js +18 -0
  57. package/build/internal/cjs/index.js.map +1 -0
  58. package/build/internal/cjs/index.typings.d.ts +1 -0
  59. package/build/internal/cjs/index.typings.js +18 -0
  60. package/build/internal/cjs/index.typings.js.map +1 -0
  61. package/build/internal/cjs/meta.d.ts +1 -0
  62. package/build/internal/cjs/meta.js +18 -0
  63. package/build/internal/cjs/meta.js.map +1 -0
  64. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.context.d.ts +18 -0
  65. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.context.js +24 -0
  66. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.context.js.map +1 -0
  67. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.http.d.ts +47 -0
  68. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.http.js +256 -0
  69. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.http.js.map +1 -0
  70. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.meta.d.ts +28 -0
  71. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.meta.js +148 -0
  72. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.meta.js.map +1 -0
  73. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.public.d.ts +80 -0
  74. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.public.js +59 -0
  75. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.public.js.map +1 -0
  76. package/build/internal/{ecom-v1-fulfillments-order-fulfillments.universal-D89xmwPL.d.mts → cjs/src/ecom-v1-fulfillments-order-fulfillments.types.d.ts} +54 -174
  77. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.types.js +34 -0
  78. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.types.js.map +1 -0
  79. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.universal.d.ts +813 -0
  80. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.universal.js +362 -0
  81. package/build/internal/cjs/src/ecom-v1-fulfillments-order-fulfillments.universal.js.map +1 -0
  82. package/build/internal/es/index.d.ts +1 -0
  83. package/build/internal/es/index.js +2 -0
  84. package/build/internal/es/index.js.map +1 -0
  85. package/build/internal/es/index.typings.d.ts +1 -0
  86. package/build/internal/es/index.typings.js +2 -0
  87. package/build/internal/es/index.typings.js.map +1 -0
  88. package/build/internal/es/meta.d.ts +1 -0
  89. package/build/internal/es/meta.js +2 -0
  90. package/build/internal/es/meta.js.map +1 -0
  91. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.context.d.ts +18 -0
  92. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.context.js +18 -0
  93. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.context.js.map +1 -0
  94. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.http.d.ts +47 -0
  95. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.http.js +247 -0
  96. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.http.js.map +1 -0
  97. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.meta.d.ts +28 -0
  98. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.meta.js +116 -0
  99. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.meta.js.map +1 -0
  100. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.public.d.ts +80 -0
  101. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.public.js +47 -0
  102. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.public.js.map +1 -0
  103. package/build/internal/{ecom-v1-fulfillments-order-fulfillments.universal-D89xmwPL.d.ts → es/src/ecom-v1-fulfillments-order-fulfillments.types.d.ts} +54 -174
  104. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.types.js +31 -0
  105. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.types.js.map +1 -0
  106. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.universal.d.ts +813 -0
  107. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.universal.js +330 -0
  108. package/build/internal/es/src/ecom-v1-fulfillments-order-fulfillments.universal.js.map +1 -0
  109. package/package.json +11 -12
  110. package/build/index.d.mts +0 -93
  111. package/build/index.d.ts +0 -93
  112. package/build/index.js +0 -516
  113. package/build/index.js.map +0 -1
  114. package/build/index.mjs +0 -483
  115. package/build/index.mjs.map +0 -1
  116. package/build/internal/index.d.mts +0 -93
  117. package/build/internal/index.d.ts +0 -93
  118. package/build/internal/index.js +0 -516
  119. package/build/internal/index.js.map +0 -1
  120. package/build/internal/index.mjs +0 -483
  121. package/build/internal/index.mjs.map +0 -1
  122. package/build/internal/meta.d.mts +0 -258
  123. package/build/internal/meta.d.ts +0 -258
  124. package/build/internal/meta.js +0 -364
  125. package/build/internal/meta.js.map +0 -1
  126. package/build/internal/meta.mjs +0 -332
  127. package/build/internal/meta.mjs.map +0 -1
  128. package/build/meta.d.mts +0 -258
  129. package/build/meta.d.ts +0 -258
  130. package/build/meta.js +0 -364
  131. package/build/meta.js.map +0 -1
  132. package/build/meta.mjs +0 -332
  133. package/build/meta.mjs.map +0 -1
@@ -0,0 +1,813 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+ export interface OrderWithFulfillments {
3
+ /**
4
+ * Order ID.
5
+ * @minLength 1
6
+ * @maxLength 100
7
+ */
8
+ orderId?: string;
9
+ /** Fulfillments associated with the order. */
10
+ fulfillments?: Fulfillment[];
11
+ }
12
+ /** for now, this is a sub-object of Orders, so can refer to order line items by id. */
13
+ export interface Fulfillment extends FulfillmentFulfillmentInfoOneOf {
14
+ /** Tracking info. */
15
+ trackingInfo?: FulfillmentTrackingInfo;
16
+ /** Custom fulfillment info. */
17
+ customInfo?: CustomFulfillmentInfo;
18
+ /**
19
+ * Fulfillment ID.
20
+ * @format GUID
21
+ * @readonly
22
+ */
23
+ _id?: string | null;
24
+ /**
25
+ * Fulfillment creation date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
26
+ * @readonly
27
+ */
28
+ _createdDate?: Date | null;
29
+ /**
30
+ * Line items being fulfilled.
31
+ * @maxSize 300
32
+ */
33
+ lineItems?: FulfillmentLineItem[];
34
+ /**
35
+ * __Optional.__ Fulfillment status.
36
+ *
37
+ * Supported values:
38
+ * + `"Pending"`
39
+ * + `"Accepted"`
40
+ * + `"Ready"`
41
+ * + `"In_Delivery"`
42
+ * + `"Fulfilled"`
43
+ * @minLength 1
44
+ * @maxLength 100
45
+ */
46
+ status?: string | null;
47
+ /** Fulfillment handling complete. */
48
+ completed?: boolean | null;
49
+ }
50
+ /** @oneof */
51
+ export interface FulfillmentFulfillmentInfoOneOf {
52
+ /** Tracking info. */
53
+ trackingInfo?: FulfillmentTrackingInfo;
54
+ /** Custom fulfillment info. */
55
+ customInfo?: CustomFulfillmentInfo;
56
+ }
57
+ export interface FulfillmentLineItem {
58
+ /**
59
+ * Line item ID (mirrors the ID of the order line item).
60
+ * @format GUID
61
+ */
62
+ _id?: string;
63
+ /**
64
+ * Line item quantity.
65
+ * * If this property isn't passed on creation, it defaults to the number of items not already linked to a fulfillment.
66
+ * * 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.
67
+ *
68
+ * Min: `1`
69
+ * Max: `100000`
70
+ * @min 1
71
+ * @max 100000
72
+ */
73
+ quantity?: number | null;
74
+ }
75
+ export interface FulfillmentTrackingInfo {
76
+ /**
77
+ * Shipping/delivery tracking number.
78
+ * @minLength 1
79
+ * @maxLength 100
80
+ */
81
+ trackingNumber?: string | null;
82
+ /**
83
+ * Shipping provider. Using one of the following shipping providers will allow for auto-filling the tracking link:
84
+ * * `'fedex'`
85
+ * * `'ups'`
86
+ * * `'usps'`
87
+ * * `'dhl'`
88
+ * * `'canadaPost'`
89
+ * @minLength 1
90
+ * @maxLength 100
91
+ */
92
+ shippingProvider?: string | null;
93
+ /**
94
+ * Tracking link. Auto-filled if a predefined shipping provider is used, otherwise provided on creation.
95
+ * @minLength 1
96
+ * @maxLength 2048
97
+ * @format WEB_URL
98
+ */
99
+ trackingLink?: string | null;
100
+ }
101
+ export interface CustomFulfillmentInfo {
102
+ /**
103
+ * Custom fulfillment info in key:value form.
104
+ * @maxSize 100
105
+ */
106
+ fieldsData?: Record<string, string>;
107
+ }
108
+ export interface FulfillmentCreated {
109
+ /**
110
+ * Order ID (auto generated upon order creation).
111
+ * @format GUID
112
+ */
113
+ orderId?: string;
114
+ /**
115
+ * ID of the newly created fulfillment.
116
+ * @format GUID
117
+ */
118
+ fulfillmentId?: string;
119
+ /** Fulfillment creation date and time. */
120
+ dateCreated?: Date | null;
121
+ /** Buyer information. */
122
+ buyerInfo?: BuyerInfo;
123
+ /** Order fulfillment status. */
124
+ fulfillmentStatus?: FulfillmentStatus;
125
+ /** Fulfillment tracking information. */
126
+ trackingInfo?: V2FulfillmentTrackingInfo;
127
+ }
128
+ /** Buyer Info */
129
+ export interface BuyerInfo {
130
+ /**
131
+ * Wix customer ID
132
+ * @format GUID
133
+ */
134
+ _id?: string | null;
135
+ /**
136
+ * Deprecated (use identityType instead)
137
+ * @readonly
138
+ * @deprecated
139
+ */
140
+ type?: IdentityType;
141
+ /** Customer type */
142
+ identityType?: IdentityType;
143
+ /**
144
+ * Customer's first name
145
+ * @readonly
146
+ */
147
+ firstName?: string;
148
+ /**
149
+ * Customer's last name
150
+ * @readonly
151
+ */
152
+ lastName?: string;
153
+ /**
154
+ * Customer's phone number
155
+ * @readonly
156
+ */
157
+ phone?: string | null;
158
+ /**
159
+ * Customer's email address
160
+ * @readonly
161
+ */
162
+ email?: string;
163
+ }
164
+ export declare enum IdentityType {
165
+ UNSPECIFIED_IDENTITY_TYPE = "UNSPECIFIED_IDENTITY_TYPE",
166
+ /** Site member */
167
+ MEMBER = "MEMBER",
168
+ /** Contact */
169
+ CONTACT = "CONTACT"
170
+ }
171
+ export declare enum FulfillmentStatus {
172
+ /** None of the order items are fulfilled */
173
+ NOT_FULFILLED = "NOT_FULFILLED",
174
+ /**
175
+ * All of the order items are fulfilled
176
+ * Orders without shipping info are fulfilled automatically
177
+ */
178
+ FULFILLED = "FULFILLED",
179
+ /** Order is canceled */
180
+ CANCELED = "CANCELED",
181
+ /** Some, but not all of the order items are fulfilled */
182
+ PARTIALLY_FULFILLED = "PARTIALLY_FULFILLED"
183
+ }
184
+ export interface V2FulfillmentTrackingInfo {
185
+ /**
186
+ * Tracking number.
187
+ * @minLength 1
188
+ * @maxLength 100
189
+ */
190
+ trackingNumber?: string;
191
+ /**
192
+ * Shipping provider. Using the following shipping providers will allow for autofilling the tracking link:
193
+ * * `fedex`
194
+ * * `ups`
195
+ * * `usps`
196
+ * * `dhl`
197
+ * * `canadaPost`
198
+ * @minLength 1
199
+ * @maxLength 100
200
+ */
201
+ shippingProvider?: string;
202
+ /**
203
+ * Tracking link - autofilled if using a predefined shipping provider, otherwise provided on creation.
204
+ * @minLength 1
205
+ * @maxLength 2048
206
+ * @format WEB_URL
207
+ */
208
+ trackingLink?: string | null;
209
+ }
210
+ export interface FulfillmentUpdated {
211
+ /**
212
+ * Order ID (auto generated upon order creation).
213
+ * @format GUID
214
+ */
215
+ orderId?: string;
216
+ /**
217
+ * ID of the updated fulfillment.
218
+ * @format GUID
219
+ */
220
+ fulfillmentId?: string;
221
+ /** Fulfillment tracking information. */
222
+ trackingInfo?: V2FulfillmentTrackingInfo;
223
+ }
224
+ export interface FulfillmentDeleted {
225
+ /**
226
+ * Order ID (auto generated upon order creation).
227
+ * @format GUID
228
+ */
229
+ orderId?: string;
230
+ /**
231
+ * ID of the deleted fulfillment.
232
+ * @format GUID
233
+ */
234
+ fulfillmentId?: string;
235
+ /** Order fulfillment status. */
236
+ fulfillmentStatus?: FulfillmentStatus;
237
+ }
238
+ export interface ListFulfillmentsForSingleOrderRequest {
239
+ /**
240
+ * Order ID for which to retrieve fulfillments.
241
+ * @minLength 1
242
+ * @maxLength 100
243
+ */
244
+ orderId: string;
245
+ }
246
+ export interface ListFulfillmentsForSingleOrderResponse {
247
+ /** List of fulfillments associated with the order. */
248
+ orderWithFulfillments?: OrderWithFulfillments;
249
+ }
250
+ export interface ListFulfillmentsForMultipleOrdersRequest {
251
+ /**
252
+ * List of order IDs for which to retrieve fulfillments.
253
+ * @minSize 1
254
+ * @maxSize 100
255
+ */
256
+ orderIds: string[];
257
+ }
258
+ export interface ListFulfillmentsForMultipleOrdersResponse {
259
+ /** List of order IDs and their associated fulfillments. */
260
+ ordersWithFulfillments?: OrderWithFulfillments[];
261
+ }
262
+ export interface CreateFulfillmentRequest {
263
+ /** Order ID. */
264
+ orderId: string;
265
+ /** Fulfillment info. */
266
+ fulfillment: Fulfillment;
267
+ }
268
+ export interface CreateFulfillmentResponse {
269
+ /** Order ID and the orders' fulfillments. */
270
+ orderWithFulfillments?: OrderWithFulfillments;
271
+ /** ID of created fulfillment. */
272
+ fulfillmentId?: string;
273
+ }
274
+ export interface UpdateFulfillmentRequest {
275
+ /** Order ID. */
276
+ orderId: string;
277
+ /** Fulfillment info to update. */
278
+ fulfillment?: Fulfillment;
279
+ }
280
+ export interface UpdateFulfillmentResponse {
281
+ /** Order ID and the orders' associated fulfillments after update. */
282
+ orderWithFulfillments?: OrderWithFulfillments;
283
+ }
284
+ export interface DeleteFulfillmentRequest {
285
+ /**
286
+ * Order ID.
287
+ * @minLength 1
288
+ * @maxLength 100
289
+ */
290
+ orderId: string;
291
+ /**
292
+ * ID of the fulfillment to delete.
293
+ * @format GUID
294
+ */
295
+ fulfillmentId: string;
296
+ }
297
+ export interface DeleteFulfillmentResponse {
298
+ /** Order ID and the order's associated fulfillments after deletion. */
299
+ orderWithFulfillments?: OrderWithFulfillments;
300
+ }
301
+ export interface BulkCreateFulfillmentRequest {
302
+ /**
303
+ * List of order IDs and their associated fulfillments' info.
304
+ * @minSize 1
305
+ * @maxSize 100
306
+ */
307
+ ordersWithFulfillments: BulkCreateOrderWithFulfillments[];
308
+ }
309
+ export interface BulkCreateOrderWithFulfillments {
310
+ /**
311
+ * Order ID.
312
+ * @minLength 1
313
+ * @maxLength 100
314
+ */
315
+ orderId?: string;
316
+ /**
317
+ * Fulfillments associated with the order.
318
+ * @minSize 1
319
+ */
320
+ fulfillments?: Fulfillment[];
321
+ }
322
+ export interface BulkCreateFulfillmentResponse {
323
+ /** Items updated by bulk action. */
324
+ results?: BulkOrderFulfillmentsResult[];
325
+ /** Bulk action metadata. */
326
+ bulkActionMetadata?: BulkActionMetadata;
327
+ }
328
+ export interface BulkOrderFulfillmentsResult {
329
+ /** Item metadata. */
330
+ itemMetadata?: ItemMetadata;
331
+ /** List of order IDs and their associated fulfillments. */
332
+ ordersWithFulfillments?: OrderWithFulfillments;
333
+ }
334
+ export interface ItemMetadata {
335
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
336
+ _id?: string | null;
337
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
338
+ originalIndex?: number;
339
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
340
+ success?: boolean;
341
+ /** Details about the error in case of failure. */
342
+ error?: ApplicationError;
343
+ }
344
+ export interface ApplicationError {
345
+ /** Error code. */
346
+ code?: string;
347
+ /** Description of the error. */
348
+ description?: string;
349
+ /** Data related to the error. */
350
+ data?: Record<string, any> | null;
351
+ }
352
+ export interface BulkActionMetadata {
353
+ /** Number of items that were successfully processed. */
354
+ totalSuccesses?: number;
355
+ /** Number of items that couldn't be processed. */
356
+ totalFailures?: number;
357
+ /** Number of failures without details because detailed failure threshold was exceeded. */
358
+ undetailedFailures?: number;
359
+ }
360
+ export interface DomainEvent extends DomainEventBodyOneOf {
361
+ createdEvent?: EntityCreatedEvent;
362
+ updatedEvent?: EntityUpdatedEvent;
363
+ deletedEvent?: EntityDeletedEvent;
364
+ actionEvent?: ActionEvent;
365
+ /**
366
+ * Unique event ID.
367
+ * Allows clients to ignore duplicate webhooks.
368
+ */
369
+ _id?: string;
370
+ /**
371
+ * Assumes actions are also always typed to an entity_type
372
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
373
+ */
374
+ entityFqdn?: string;
375
+ /**
376
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
377
+ * This is although the created/updated/deleted notion is duplication of the oneof types
378
+ * Example: created/updated/deleted/started/completed/email_opened
379
+ */
380
+ slug?: string;
381
+ /** ID of the entity associated with the event. */
382
+ entityId?: string;
383
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
384
+ eventTime?: Date | null;
385
+ /**
386
+ * Whether the event was triggered as a result of a privacy regulation application
387
+ * (for example, GDPR).
388
+ */
389
+ triggeredByAnonymizeRequest?: boolean | null;
390
+ /** If present, indicates the action that triggered the event. */
391
+ originatedFrom?: string | null;
392
+ /**
393
+ * A sequence number defining the order of updates to the underlying entity.
394
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
395
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
396
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
397
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
398
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
399
+ */
400
+ entityEventSequence?: string | null;
401
+ }
402
+ /** @oneof */
403
+ export interface DomainEventBodyOneOf {
404
+ createdEvent?: EntityCreatedEvent;
405
+ updatedEvent?: EntityUpdatedEvent;
406
+ deletedEvent?: EntityDeletedEvent;
407
+ actionEvent?: ActionEvent;
408
+ }
409
+ export interface EntityCreatedEvent {
410
+ entity?: string;
411
+ }
412
+ export interface RestoreInfo {
413
+ deletedDate?: Date | null;
414
+ }
415
+ export interface EntityUpdatedEvent {
416
+ /**
417
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
418
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
419
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
420
+ */
421
+ currentEntity?: string;
422
+ }
423
+ export interface EntityDeletedEvent {
424
+ /** Entity that was deleted */
425
+ deletedEntity?: string | null;
426
+ }
427
+ export interface ActionEvent {
428
+ body?: string;
429
+ }
430
+ export interface MessageEnvelope {
431
+ /**
432
+ * App instance ID.
433
+ * @format GUID
434
+ */
435
+ instanceId?: string | null;
436
+ /**
437
+ * Event type.
438
+ * @maxLength 150
439
+ */
440
+ eventType?: string;
441
+ /** The identification type and identity data. */
442
+ identity?: IdentificationData;
443
+ /** Stringify payload. */
444
+ data?: string;
445
+ }
446
+ export interface IdentificationData extends IdentificationDataIdOneOf {
447
+ /**
448
+ * ID of a site visitor that has not logged in to the site.
449
+ * @format GUID
450
+ */
451
+ anonymousVisitorId?: string;
452
+ /**
453
+ * ID of a site visitor that has logged in to the site.
454
+ * @format GUID
455
+ */
456
+ memberId?: string;
457
+ /**
458
+ * ID of a Wix user (site owner, contributor, etc.).
459
+ * @format GUID
460
+ */
461
+ wixUserId?: string;
462
+ /**
463
+ * ID of an app.
464
+ * @format GUID
465
+ */
466
+ appId?: string;
467
+ /** @readonly */
468
+ identityType?: WebhookIdentityType;
469
+ }
470
+ /** @oneof */
471
+ export interface IdentificationDataIdOneOf {
472
+ /**
473
+ * ID of a site visitor that has not logged in to the site.
474
+ * @format GUID
475
+ */
476
+ anonymousVisitorId?: string;
477
+ /**
478
+ * ID of a site visitor that has logged in to the site.
479
+ * @format GUID
480
+ */
481
+ memberId?: string;
482
+ /**
483
+ * ID of a Wix user (site owner, contributor, etc.).
484
+ * @format GUID
485
+ */
486
+ wixUserId?: string;
487
+ /**
488
+ * ID of an app.
489
+ * @format GUID
490
+ */
491
+ appId?: string;
492
+ }
493
+ export declare enum WebhookIdentityType {
494
+ UNKNOWN = "UNKNOWN",
495
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
496
+ MEMBER = "MEMBER",
497
+ WIX_USER = "WIX_USER",
498
+ APP = "APP"
499
+ }
500
+ export interface BaseEventMetadata {
501
+ /**
502
+ * App instance ID.
503
+ * @format GUID
504
+ */
505
+ instanceId?: string | null;
506
+ /**
507
+ * Event type.
508
+ * @maxLength 150
509
+ */
510
+ eventType?: string;
511
+ /** The identification type and identity data. */
512
+ identity?: IdentificationData;
513
+ }
514
+ export interface EventMetadata extends BaseEventMetadata {
515
+ /**
516
+ * Unique event ID.
517
+ * Allows clients to ignore duplicate webhooks.
518
+ */
519
+ _id?: string;
520
+ /**
521
+ * Assumes actions are also always typed to an entity_type
522
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
523
+ */
524
+ entityFqdn?: string;
525
+ /**
526
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
527
+ * This is although the created/updated/deleted notion is duplication of the oneof types
528
+ * Example: created/updated/deleted/started/completed/email_opened
529
+ */
530
+ slug?: string;
531
+ /** ID of the entity associated with the event. */
532
+ entityId?: string;
533
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
534
+ eventTime?: Date | null;
535
+ /**
536
+ * Whether the event was triggered as a result of a privacy regulation application
537
+ * (for example, GDPR).
538
+ */
539
+ triggeredByAnonymizeRequest?: boolean | null;
540
+ /** If present, indicates the action that triggered the event. */
541
+ originatedFrom?: string | null;
542
+ /**
543
+ * A sequence number defining the order of updates to the underlying entity.
544
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
545
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
546
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
547
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
548
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
549
+ */
550
+ entityEventSequence?: string | null;
551
+ }
552
+ export interface FulfillmentsUpdatedEnvelope {
553
+ entity: OrderWithFulfillments;
554
+ metadata: EventMetadata;
555
+ }
556
+ /**
557
+ * Triggered when one or more of an order's fulfillments are created, updated, or deleted.
558
+ *
559
+ * The response contains the order's ID and details about all of its fulfillments following the change.
560
+ * @permissionScope Manage Stores - all permissions
561
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
562
+ * @permissionScope Read eCommerce - all read permissions
563
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
564
+ * @permissionScope Read Orders
565
+ * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
566
+ * @permissionScope Read Stores - all read permissions
567
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
568
+ * @permissionScope Manage Restaurants - all permissions
569
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
570
+ * @permissionScope Manage eCommerce - all permissions
571
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
572
+ * @permissionScope Manage Orders
573
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
574
+ * @permissionId ECOM.READ_FULFILLMENTS
575
+ * @webhook
576
+ * @eventType wix.ecom.v1.fulfillments_updated
577
+ * @serviceIdentifier com.wix.ecom.orders.fulfillments.v1.Fulfillments
578
+ * @slug updated
579
+ */
580
+ export declare function onFulfillmentsUpdated(handler: (event: FulfillmentsUpdatedEnvelope) => void | Promise<void>): void;
581
+ type FulfillmentsNonNullablePaths = `orderId` | `fulfillments`;
582
+ /**
583
+ * Retrieves fulfillments associated with a specified order.
584
+ *
585
+ *
586
+ * The `listFulfillmentsForSingleOrder()` function returns a Promise that resolves when the fulfillments are retrieved.
587
+ * @param orderId - Order ID for which to retrieve fulfillments.
588
+ * @public
589
+ * @requiredField orderId
590
+ * @permissionId ECOM.READ_FULFILLMENTS
591
+ * @permissionScope Manage Stores - all permissions
592
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
593
+ * @permissionScope Read eCommerce - all read permissions
594
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
595
+ * @permissionScope Read Orders
596
+ * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
597
+ * @permissionScope Read Stores - all read permissions
598
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
599
+ * @permissionScope Manage Restaurants - all permissions
600
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
601
+ * @permissionScope Manage eCommerce - all permissions
602
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
603
+ * @permissionScope Manage Orders
604
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
605
+ * @applicableIdentity APP
606
+ * @applicableIdentity MEMBER
607
+ * @fqn com.wix.ecom.orders.fulfillments.v1.Fulfillments.ListFulfillmentsForSingleOrder
608
+ */
609
+ export declare function listFulfillmentsForSingleOrder(orderId: string): Promise<NonNullablePaths<ListFulfillmentsForSingleOrderResponse, {
610
+ [P in FulfillmentsNonNullablePaths]: `orderWithFulfillments.${P}`;
611
+ }[FulfillmentsNonNullablePaths]>>;
612
+ /**
613
+ * Retrieves fulfillments associated with multiple specified orders.
614
+ *
615
+ *
616
+ * The `listFulfillmentsForMultipleOrders()` function returns a Promise that resolves when the fulfillments are retrieved.
617
+ * @param orderIds - List of order IDs for which to retrieve fulfillments.
618
+ * @public
619
+ * @requiredField orderIds
620
+ * @permissionId ECOM.READ_FULFILLMENTS
621
+ * @permissionScope Manage Stores - all permissions
622
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
623
+ * @permissionScope Read eCommerce - all read permissions
624
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
625
+ * @permissionScope Read Orders
626
+ * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
627
+ * @permissionScope Read Stores - all read permissions
628
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
629
+ * @permissionScope Manage Restaurants - all permissions
630
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
631
+ * @permissionScope Manage eCommerce - all permissions
632
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
633
+ * @permissionScope Manage Orders
634
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
635
+ * @applicableIdentity APP
636
+ * @applicableIdentity MEMBER
637
+ * @fqn com.wix.ecom.orders.fulfillments.v1.Fulfillments.ListFulfillmentsForMultipleOrders
638
+ */
639
+ export declare function listFulfillmentsForMultipleOrders(orderIds: string[]): Promise<NonNullablePaths<ListFulfillmentsForMultipleOrdersResponse, {
640
+ [P in FulfillmentsNonNullablePaths]: `ordersWithFulfillments.${number}.${P}`;
641
+ }[FulfillmentsNonNullablePaths]>>;
642
+ /**
643
+ * Creates an order fulfillment.
644
+ *
645
+ *
646
+ * The `createFulfillment()` function returns a Promise that resolves when the fulfillment is created.
647
+ * @param orderId - Order ID.
648
+ * @param fulfillment - Fulfillment info.
649
+ * @public
650
+ * @requiredField fulfillment
651
+ * @requiredField fulfillment.lineItems
652
+ * @requiredField fulfillment.lineItems._id
653
+ * @requiredField orderId
654
+ * @permissionId ECOM.MODIFY_FULFILLMENTS
655
+ * @permissionScope Manage Stores - all permissions
656
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
657
+ * @permissionScope Manage Restaurants - all permissions
658
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
659
+ * @permissionScope Manage eCommerce - all permissions
660
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
661
+ * @permissionScope Manage Orders
662
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
663
+ * @applicableIdentity APP
664
+ * @fqn com.wix.ecom.orders.fulfillments.v1.Fulfillments.CreateFulfillment
665
+ */
666
+ export declare function createFulfillment(orderId: string, fulfillment: NonNullablePaths<Fulfillment, `lineItems` | `lineItems.${number}._id`>): Promise<NonNullablePaths<CreateFulfillmentResponse, {
667
+ [P in FulfillmentsNonNullablePaths]: `orderWithFulfillments.${P}`;
668
+ }[FulfillmentsNonNullablePaths] | `fulfillmentId`>>;
669
+ /**
670
+ * Updates a fulfillment's properties.
671
+ * To update a field's value, include the new value in the `fulfillment` field in the body params.
672
+ * To remove a field's value, pass `null`.
673
+ *
674
+ *
675
+ * The `updateFulfillment()` function returns a Promise that resolves when the fulfillment is updated.
676
+ *
677
+ * > **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.
678
+ * @public
679
+ * @requiredField identifiers
680
+ * @requiredField identifiers.fulfillmentId
681
+ * @requiredField identifiers.orderId
682
+ * @param identifiers - Order and fulfillment IDs to be updated.
683
+ * @param options - Available options to use when updating a fulfillment.
684
+ * @permissionId ECOM.MODIFY_FULFILLMENTS
685
+ * @permissionScope Manage Stores - all permissions
686
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
687
+ * @permissionScope Manage Restaurants - all permissions
688
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
689
+ * @permissionScope Manage eCommerce - all permissions
690
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
691
+ * @permissionScope Manage Orders
692
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
693
+ * @applicableIdentity APP
694
+ * @returns Order ID and the orders' associated fulfillments after update.
695
+ * @fqn com.wix.ecom.orders.fulfillments.v1.Fulfillments.UpdateFulfillment
696
+ */
697
+ export declare function updateFulfillment(identifiers: NonNullablePaths<UpdateFulfillmentIdentifiers, `fulfillmentId` | `orderId`>, options?: UpdateFulfillmentOptions): Promise<NonNullablePaths<OrderWithFulfillments, FulfillmentsNonNullablePaths>>;
698
+ export interface UpdateFulfillmentOptions {
699
+ /** Fulfillment info. */
700
+ fulfillment: {
701
+ /** Tracking info. */
702
+ trackingInfo?: FulfillmentTrackingInfo;
703
+ /** Custom fulfillment info. */
704
+ customInfo?: CustomFulfillmentInfo;
705
+ /**
706
+ * Fulfillment ID.
707
+ * @format GUID
708
+ * @readonly
709
+ */
710
+ _id?: string | null;
711
+ /**
712
+ * Fulfillment creation date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
713
+ * @readonly
714
+ */
715
+ _createdDate?: Date | null;
716
+ /**
717
+ * Line items being fulfilled.
718
+ * @maxSize 300
719
+ */
720
+ lineItems?: FulfillmentLineItem[];
721
+ /**
722
+ * __Optional.__ Fulfillment status.
723
+ *
724
+ * Supported values:
725
+ * + `"Pending"`
726
+ * + `"Accepted"`
727
+ * + `"Ready"`
728
+ * + `"In_Delivery"`
729
+ * + `"Fulfilled"`
730
+ * @minLength 1
731
+ * @maxLength 100
732
+ */
733
+ status?: string | null;
734
+ /** Fulfillment handling complete. */
735
+ completed?: boolean | null;
736
+ };
737
+ }
738
+ export interface UpdateFulfillmentIdentifiers {
739
+ /**
740
+ * ID of the fulfillment to be updated.
741
+ * @format GUID
742
+ * @readonly
743
+ */
744
+ fulfillmentId?: string | null;
745
+ /** Order ID. */
746
+ orderId: string;
747
+ }
748
+ /**
749
+ * Deletes an existing order fulfillment.
750
+ *
751
+ *
752
+ * The `deleteFulfillment()` function returns a Promise that resolves when the fulfillment is deleted.
753
+ * @public
754
+ * @requiredField identifiers
755
+ * @requiredField identifiers.fulfillmentId
756
+ * @requiredField identifiers.orderId
757
+ * @param identifiers - Order and fulfillment IDs.
758
+ * @permissionId ECOM.MODIFY_FULFILLMENTS
759
+ * @permissionScope Manage Stores - all permissions
760
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
761
+ * @permissionScope Manage Restaurants - all permissions
762
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
763
+ * @permissionScope Manage eCommerce - all permissions
764
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
765
+ * @permissionScope Manage Orders
766
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
767
+ * @applicableIdentity APP
768
+ * @fqn com.wix.ecom.orders.fulfillments.v1.Fulfillments.DeleteFulfillment
769
+ */
770
+ export declare function deleteFulfillment(identifiers: NonNullablePaths<DeleteFulfillmentIdentifiers, `fulfillmentId` | `orderId`>): Promise<NonNullablePaths<DeleteFulfillmentResponse, {
771
+ [P in FulfillmentsNonNullablePaths]: `orderWithFulfillments.${P}`;
772
+ }[FulfillmentsNonNullablePaths]>>;
773
+ export interface DeleteFulfillmentIdentifiers {
774
+ /**
775
+ * ID of the fulfillment to delete.
776
+ * @format GUID
777
+ */
778
+ fulfillmentId: string;
779
+ /**
780
+ * Order ID.
781
+ * @minLength 1
782
+ * @maxLength 100
783
+ */
784
+ orderId: string;
785
+ }
786
+ /**
787
+ * Creates multiple fulfillments for one or more orders.
788
+ *
789
+ *
790
+ * The `bulkCreateFulfillments()` function returns a Promise that resolves when the fulfillments are created.
791
+ * @param ordersWithFulfillments - List of order IDs and their associated fulfillments' info.
792
+ * @public
793
+ * @requiredField ordersWithFulfillments
794
+ * @requiredField ordersWithFulfillments.fulfillments
795
+ * @requiredField ordersWithFulfillments.fulfillments.lineItems
796
+ * @requiredField ordersWithFulfillments.fulfillments.lineItems._id
797
+ * @requiredField ordersWithFulfillments.orderId
798
+ * @permissionId ECOM.MODIFY_FULFILLMENTS
799
+ * @permissionScope Manage Stores - all permissions
800
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
801
+ * @permissionScope Manage Restaurants - all permissions
802
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
803
+ * @permissionScope Manage eCommerce - all permissions
804
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
805
+ * @permissionScope Manage Orders
806
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
807
+ * @applicableIdentity APP
808
+ * @fqn com.wix.ecom.orders.fulfillments.v1.Fulfillments.BulkCreateFulfillment
809
+ */
810
+ export declare function bulkCreateFulfillments(ordersWithFulfillments: NonNullablePaths<BulkCreateOrderWithFulfillments, `fulfillments` | `fulfillments.${number}.lineItems` | `fulfillments.${number}.lineItems.${number}._id` | `orderId`>[]): Promise<NonNullablePaths<BulkCreateFulfillmentResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | {
811
+ [P in FulfillmentsNonNullablePaths]: `results.${number}.ordersWithFulfillments.${P}`;
812
+ }[FulfillmentsNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
813
+ export {};