@wix/auto_sdk_ecom_order-transactions 1.0.11 → 1.0.13

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 (134) 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-order-transactions-order-transactions.context.d.ts +9 -0
  11. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.context.js +41 -0
  12. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.context.js.map +1 -0
  13. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.http.d.ts +73 -0
  14. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.http.js +466 -0
  15. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.http.js.map +1 -0
  16. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.meta.d.ts +30 -0
  17. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.meta.js +161 -0
  18. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.meta.js.map +1 -0
  19. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.public.d.ts +63 -0
  20. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.public.js +76 -0
  21. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.public.js.map +1 -0
  22. package/build/{ecom-v1-order-transactions-order-transactions.universal-DgIVKgiJ.d.mts → cjs/src/ecom-v1-order-transactions-order-transactions.types.d.ts} +199 -221
  23. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.types.js +303 -0
  24. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.types.js.map +1 -0
  25. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.universal.d.ts +2537 -0
  26. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.universal.js +681 -0
  27. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.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-order-transactions-order-transactions.context.d.ts +9 -0
  39. package/build/es/src/ecom-v1-order-transactions-order-transactions.context.js +13 -0
  40. package/build/es/src/ecom-v1-order-transactions-order-transactions.context.js.map +1 -0
  41. package/build/es/src/ecom-v1-order-transactions-order-transactions.http.d.ts +73 -0
  42. package/build/es/src/ecom-v1-order-transactions-order-transactions.http.js +456 -0
  43. package/build/es/src/ecom-v1-order-transactions-order-transactions.http.js.map +1 -0
  44. package/build/es/src/ecom-v1-order-transactions-order-transactions.meta.d.ts +30 -0
  45. package/build/es/src/ecom-v1-order-transactions-order-transactions.meta.js +128 -0
  46. package/build/es/src/ecom-v1-order-transactions-order-transactions.meta.js.map +1 -0
  47. package/build/es/src/ecom-v1-order-transactions-order-transactions.public.d.ts +63 -0
  48. package/build/es/src/ecom-v1-order-transactions-order-transactions.public.js +41 -0
  49. package/build/es/src/ecom-v1-order-transactions-order-transactions.public.js.map +1 -0
  50. package/build/{ecom-v1-order-transactions-order-transactions.universal-DgIVKgiJ.d.ts → es/src/ecom-v1-order-transactions-order-transactions.types.d.ts} +199 -221
  51. package/build/es/src/ecom-v1-order-transactions-order-transactions.types.js +300 -0
  52. package/build/es/src/ecom-v1-order-transactions-order-transactions.types.js.map +1 -0
  53. package/build/es/src/ecom-v1-order-transactions-order-transactions.universal.d.ts +2537 -0
  54. package/build/es/src/ecom-v1-order-transactions-order-transactions.universal.js +648 -0
  55. package/build/es/src/ecom-v1-order-transactions-order-transactions.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-order-transactions-order-transactions.context.d.ts +13 -0
  66. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.context.js +41 -0
  67. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.context.js.map +1 -0
  68. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.http.d.ts +73 -0
  69. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.http.js +466 -0
  70. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.http.js.map +1 -0
  71. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.meta.d.ts +30 -0
  72. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.meta.js +161 -0
  73. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.meta.js.map +1 -0
  74. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.public.d.ts +108 -0
  75. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.public.js +76 -0
  76. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.public.js.map +1 -0
  77. package/build/internal/{ecom-v1-order-transactions-order-transactions.universal-CQewkK3E.d.mts → cjs/src/ecom-v1-order-transactions-order-transactions.types.d.ts} +199 -305
  78. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.types.js +303 -0
  79. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.types.js.map +1 -0
  80. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.universal.d.ts +2684 -0
  81. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.universal.js +681 -0
  82. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.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-order-transactions-order-transactions.context.d.ts +13 -0
  93. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.context.js +13 -0
  94. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.context.js.map +1 -0
  95. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.http.d.ts +73 -0
  96. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.http.js +456 -0
  97. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.http.js.map +1 -0
  98. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.meta.d.ts +30 -0
  99. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.meta.js +128 -0
  100. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.meta.js.map +1 -0
  101. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.public.d.ts +108 -0
  102. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.public.js +41 -0
  103. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.public.js.map +1 -0
  104. package/build/internal/{ecom-v1-order-transactions-order-transactions.universal-CQewkK3E.d.ts → es/src/ecom-v1-order-transactions-order-transactions.types.d.ts} +199 -305
  105. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.types.js +300 -0
  106. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.types.js.map +1 -0
  107. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.universal.d.ts +2684 -0
  108. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.universal.js +648 -0
  109. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.universal.js.map +1 -0
  110. package/package.json +11 -12
  111. package/build/index.d.mts +0 -69
  112. package/build/index.d.ts +0 -69
  113. package/build/index.js +0 -942
  114. package/build/index.js.map +0 -1
  115. package/build/index.mjs +0 -887
  116. package/build/index.mjs.map +0 -1
  117. package/build/internal/index.d.mts +0 -118
  118. package/build/internal/index.d.ts +0 -118
  119. package/build/internal/index.js +0 -942
  120. package/build/internal/index.js.map +0 -1
  121. package/build/internal/index.mjs +0 -887
  122. package/build/internal/index.mjs.map +0 -1
  123. package/build/internal/meta.d.mts +0 -602
  124. package/build/internal/meta.d.ts +0 -602
  125. package/build/internal/meta.js +0 -566
  126. package/build/internal/meta.js.map +0 -1
  127. package/build/internal/meta.mjs +0 -533
  128. package/build/internal/meta.mjs.map +0 -1
  129. package/build/meta.d.mts +0 -602
  130. package/build/meta.d.ts +0 -602
  131. package/build/meta.js +0 -566
  132. package/build/meta.js.map +0 -1
  133. package/build/meta.mjs +0 -533
  134. package/build/meta.mjs.map +0 -1
@@ -0,0 +1,2684 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+ export interface OrderTransactions {
3
+ /**
4
+ * Order ID.
5
+ * @format GUID
6
+ */
7
+ orderId?: string;
8
+ /**
9
+ * Record of payments made to the merchant.
10
+ * @maxSize 100
11
+ */
12
+ payments?: Payment[];
13
+ /**
14
+ * Record of refunds made to the buyer.
15
+ * @maxSize 300
16
+ */
17
+ refunds?: Refund[];
18
+ }
19
+ export interface Payment extends PaymentPaymentDetailsOneOf, PaymentReceiptInfoOneOf {
20
+ /** Regular payment details. */
21
+ regularPaymentDetails?: RegularPaymentDetails;
22
+ /** Gift card payment details. */
23
+ giftcardPaymentDetails?: GiftCardPaymentDetails;
24
+ /**
25
+ * Receipt created by Wix
26
+ * @internal
27
+ */
28
+ wixReceipt?: WixReceiptInfo;
29
+ /**
30
+ * Receipt created by an external system.
31
+ * @internal
32
+ */
33
+ externalReceipt?: ExternalReceiptInfo;
34
+ /**
35
+ * Payment ID.
36
+ * @format GUID
37
+ * @readonly
38
+ */
39
+ _id?: string | null;
40
+ /** Date and time the payment was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. Defaults to current time when not provided. */
41
+ _createdDate?: Date | null;
42
+ /**
43
+ * Date and time the payment was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
44
+ * @readonly
45
+ */
46
+ _updatedDate?: Date | null;
47
+ /** Payment amount. */
48
+ amount?: Price;
49
+ /**
50
+ * Whether refunds for this payment are disabled.
51
+ * + `true`: This payment is not refundable.
52
+ * + `false`: This payment may be refunded. However, this ultimately depends on the payment provider.
53
+ */
54
+ refundDisabled?: boolean;
55
+ /**
56
+ * Whether receipt generation for this payment are allowed.
57
+ * + `true`: This payment supports receipt generation.
58
+ * + `false`: This payment not supports receipt generation, or receipt already generated
59
+ * @internal
60
+ * @readonly
61
+ */
62
+ supportReceiptGeneration?: boolean;
63
+ }
64
+ /** @oneof */
65
+ export interface PaymentPaymentDetailsOneOf {
66
+ /** Regular payment details. */
67
+ regularPaymentDetails?: RegularPaymentDetails;
68
+ /** Gift card payment details. */
69
+ giftcardPaymentDetails?: GiftCardPaymentDetails;
70
+ }
71
+ /** @oneof */
72
+ export interface PaymentReceiptInfoOneOf {
73
+ /**
74
+ * Receipt created by Wix
75
+ * @internal
76
+ */
77
+ wixReceipt?: WixReceiptInfo;
78
+ /**
79
+ * Receipt created by an external system.
80
+ * @internal
81
+ */
82
+ externalReceipt?: ExternalReceiptInfo;
83
+ }
84
+ export interface RegularPaymentDetails extends RegularPaymentDetailsPaymentMethodDetailsOneOf {
85
+ /** Whether regular card used */
86
+ creditCardDetails?: CreditCardPaymentMethodDetails;
87
+ /**
88
+ * Wix Payments order ID.
89
+ * @maxLength 100
90
+ */
91
+ paymentOrderId?: string | null;
92
+ /**
93
+ * Payment gateway's transaction ID.
94
+ * This field is only returned when the value of `offline_payment` is `false`.
95
+ * @maxLength 100
96
+ */
97
+ gatewayTransactionId?: string | null;
98
+ /**
99
+ * Payment method. Non-exhaustive list of supported values:
100
+ * + `CreditCard`, `Alipay`, `AstropayCash`, `AstropayDBT`, `AstropayMBT`, `Bitcoin`, `BitPay`, `Cash`, `ConvenienceStore`, `EPay`, `Fake`, `Giropay`, `IDeal`, `InPerson`, `Klarna`, `MercadoPago`, `Netpay`, `NordeaSolo`, `Offline`, `PagSeguro`, `PayEasy`, `PayPal`, `Paysafecard`, `Paysafecash`, `PointOfSale`, `Poli`, `Privat24`, `Przelewy24`, `RapidTransfer`, `Sepa`, `Skrill`, `Sofort`, `Trustly`, `Neteller`, `Unionpay`, `UniPay`, `Yandex`
101
+ * @maxLength 100
102
+ */
103
+ paymentMethod?: string | null;
104
+ /**
105
+ * Transaction ID in the payment provider's system. For example, at PayPal, Square, Stripe, etc. Not returned for offline payments.
106
+ * @maxLength 100
107
+ */
108
+ providerTransactionId?: string | null;
109
+ /** Whether the payment was made offline. For example, when using cash or when marked as paid in the Business Manager. */
110
+ offlinePayment?: boolean;
111
+ /** Payment status. */
112
+ status?: TransactionStatus;
113
+ /**
114
+ * Whether there is a payment agreement that allows for future charges.
115
+ * @immutable
116
+ */
117
+ savedPaymentMethod?: boolean;
118
+ /** Authorization details. */
119
+ authorizationDetails?: AuthorizationDetails;
120
+ /**
121
+ * Payment service provider display name. Non-exhaustive list of supported values: Wix Payments, PayPal, Square, Stripe, etc.
122
+ * @internal
123
+ * @maxLength 300
124
+ */
125
+ paymentProvider?: string | null;
126
+ }
127
+ /** @oneof */
128
+ export interface RegularPaymentDetailsPaymentMethodDetailsOneOf {
129
+ /** Whether regular card used */
130
+ creditCardDetails?: CreditCardPaymentMethodDetails;
131
+ }
132
+ export declare enum TransactionStatus {
133
+ UNDEFINED = "UNDEFINED",
134
+ APPROVED = "APPROVED",
135
+ PENDING = "PENDING",
136
+ PENDING_MERCHANT = "PENDING_MERCHANT",
137
+ CANCELED = "CANCELED",
138
+ DECLINED = "DECLINED",
139
+ REFUNDED = "REFUNDED",
140
+ PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED",
141
+ AUTHORIZED = "AUTHORIZED",
142
+ VOIDED = "VOIDED"
143
+ }
144
+ export interface CreditCardPaymentMethodDetails {
145
+ /**
146
+ * The last 4 digits of the card number.
147
+ * @maxLength 4
148
+ */
149
+ lastFourDigits?: string | null;
150
+ /**
151
+ * Card issuer's brand.
152
+ * @maxLength 100
153
+ */
154
+ brand?: string | null;
155
+ }
156
+ export interface AuthorizationDetails {
157
+ /**
158
+ * Whether the authorized payment is of a delayed capture.
159
+ * @readonly
160
+ */
161
+ delayedCapture?: boolean;
162
+ /** Date and time the payment was authorized in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */
163
+ authorizedDate?: Date | null;
164
+ /**
165
+ * List of captures associated with payment
166
+ * In case of failed it can be replaced with new one with PENDING or SUCCESS statuses
167
+ * @maxSize 1
168
+ */
169
+ captures?: AuthorizationCapture[];
170
+ /** Void associated with payment */
171
+ void?: AuthorizationVoid;
172
+ /** Scheduled action for this transaction */
173
+ scheduledAction?: ScheduledAction;
174
+ }
175
+ export interface AuthorizationCapture {
176
+ /**
177
+ * Capture ID.
178
+ * @format GUID
179
+ * @readonly
180
+ */
181
+ _id?: string | null;
182
+ /** Status of this capture action */
183
+ status?: AuthorizationCaptureStatus;
184
+ /**
185
+ * Amount of this capture
186
+ * @immutable
187
+ */
188
+ amount?: Price;
189
+ /** Date and time the capture was initiated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */
190
+ _createdDate?: Date | null;
191
+ /** In case of status is FAILED may contain failure details */
192
+ failureDetails?: AuthorizationActionFailureDetails;
193
+ }
194
+ export declare enum AuthorizationCaptureStatus {
195
+ UNKNOWN_STATUS = "UNKNOWN_STATUS",
196
+ /** Capture operation still in progress. */
197
+ PENDING = "PENDING",
198
+ /** Capture operation succeeded. */
199
+ SUCCEEDED = "SUCCEEDED",
200
+ /** Capture operation failed. */
201
+ FAILED = "FAILED"
202
+ }
203
+ export interface Price {
204
+ /**
205
+ * Amount.
206
+ * @decimalValue options { gte:0, lte:1000000000000000 }
207
+ */
208
+ amount?: string;
209
+ /**
210
+ * Amount formatted with currency symbol.
211
+ * @readonly
212
+ */
213
+ formattedAmount?: string;
214
+ }
215
+ export interface AuthorizationActionFailureDetails {
216
+ /** @maxLength 100 */
217
+ failureCode?: string;
218
+ }
219
+ export interface AuthorizationVoid {
220
+ /** Status of this void action */
221
+ status?: AuthorizationVoidStatus;
222
+ /** Date and time the void was initiated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */
223
+ voidedDate?: Date | null;
224
+ /** In case of status is FAILED may contain failure details */
225
+ failureDetails?: AuthorizationActionFailureDetails;
226
+ /** Reason of void action */
227
+ reason?: Reason;
228
+ }
229
+ export declare enum AuthorizationVoidStatus {
230
+ UNKNOWN_STATUS = "UNKNOWN_STATUS",
231
+ /** Void operation still in progress. */
232
+ PENDING = "PENDING",
233
+ /** Void operation succeeded. */
234
+ SUCCEEDED = "SUCCEEDED",
235
+ /** Void operation failed. */
236
+ FAILED = "FAILED"
237
+ }
238
+ /** Reason the authorization was voided. */
239
+ export declare enum Reason {
240
+ UNKNOWN_REASON = "UNKNOWN_REASON",
241
+ /** Authorization was voided by user. */
242
+ MANUAL = "MANUAL",
243
+ /** Authorization passed execution date. */
244
+ SCHEDULED = "SCHEDULED"
245
+ }
246
+ export interface ScheduledAction {
247
+ /** Type of the action. */
248
+ actionType?: ActionType;
249
+ /** The date and time of the action. */
250
+ executionDate?: Date | null;
251
+ }
252
+ export declare enum ActionType {
253
+ UNKNOWN_ACTION_TYPE = "UNKNOWN_ACTION_TYPE",
254
+ VOID = "VOID",
255
+ CAPTURE = "CAPTURE"
256
+ }
257
+ export interface GiftCardPaymentDetails {
258
+ /**
259
+ * Gift card payment ID.
260
+ * @minLength 1
261
+ * @maxLength 100
262
+ */
263
+ giftCardPaymentId?: string;
264
+ /**
265
+ * ID of the app that created the gift card.
266
+ * @format GUID
267
+ */
268
+ appId?: string;
269
+ /**
270
+ * Whether the gift card is voided.
271
+ * @readonly
272
+ */
273
+ voided?: boolean;
274
+ /**
275
+ * Gift card obfuscated code.
276
+ * @internal
277
+ * @maxLength 30
278
+ * @immutable
279
+ */
280
+ obfuscatedCode?: string | null;
281
+ }
282
+ export interface MembershipPaymentDetails {
283
+ /**
284
+ * Membership ID.
285
+ * @minLength 1
286
+ * @maxLength 100
287
+ */
288
+ membershipId?: string;
289
+ /**
290
+ * ID of the line item this membership applies to.
291
+ * @minLength 1
292
+ * @maxLength 100
293
+ */
294
+ lineItemId?: string;
295
+ /** Payment status. */
296
+ status?: MembershipPaymentStatus;
297
+ /** Membership name. */
298
+ name?: MembershipName;
299
+ /**
300
+ * The transaction ID in the membership system. Can be used to void the transaction.
301
+ * @minLength 1
302
+ * @maxLength 100
303
+ */
304
+ externalTransactionId?: string | null;
305
+ /**
306
+ * Whether the membership is voided.
307
+ * @readonly
308
+ */
309
+ voided?: boolean;
310
+ /**
311
+ * ID of the application providing this payment option.
312
+ * @format GUID
313
+ */
314
+ providerAppId?: string;
315
+ }
316
+ export declare enum MembershipPaymentStatus {
317
+ /** Payment was charged. */
318
+ CHARGED = "CHARGED",
319
+ /** The attempt to charge the payment failed, for example, due to lack of credits. */
320
+ CHARGE_FAILED = "CHARGE_FAILED"
321
+ }
322
+ export interface MembershipName {
323
+ /**
324
+ * Membership name.
325
+ * @maxLength 100
326
+ */
327
+ original?: string;
328
+ /**
329
+ * Translated membership name. Defaults to `original` when not provided.
330
+ * @maxLength 100
331
+ */
332
+ translated?: string | null;
333
+ }
334
+ export interface WixReceiptInfo {
335
+ /**
336
+ * Receipt ID
337
+ * @format GUID
338
+ */
339
+ receiptId?: string;
340
+ /**
341
+ * Display number of receipt
342
+ * @minLength 1
343
+ * @maxLength 40
344
+ */
345
+ displayNumber?: string | null;
346
+ }
347
+ export interface ExternalReceiptInfo {
348
+ /**
349
+ * External receipt ID
350
+ * @maxLength 100
351
+ */
352
+ receiptId?: string | null;
353
+ /**
354
+ * ID of the app providing the receipt
355
+ * @format GUID
356
+ */
357
+ appId?: string | null;
358
+ /**
359
+ * Display number of receipt
360
+ * @minLength 1
361
+ * @maxLength 40
362
+ */
363
+ displayNumber?: string | null;
364
+ }
365
+ export interface Refund {
366
+ /**
367
+ * Refund ID.
368
+ * @format GUID
369
+ * @readonly
370
+ */
371
+ _id?: string;
372
+ /**
373
+ * List of transactions.
374
+ * @maxSize 50
375
+ */
376
+ transactions?: RefundTransaction[];
377
+ /** Refund business details. */
378
+ details?: RefundDetails;
379
+ /**
380
+ * Date and time the refund was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. Defaults to current time when not provided.
381
+ * @readonly
382
+ * @immutable
383
+ */
384
+ _createdDate?: Date | null;
385
+ /**
386
+ * Aggregated refund summary.
387
+ * @readonly
388
+ */
389
+ summary?: AggregatedRefundSummary;
390
+ /**
391
+ * ID of the app that initiated this refund.
392
+ * @format GUID
393
+ * @readonly
394
+ * @immutable
395
+ */
396
+ requestingServiceAppId?: string | null;
397
+ }
398
+ export interface RefundTransaction {
399
+ /**
400
+ * ID of the payment associated with this refund.
401
+ * @format GUID
402
+ * @immutable
403
+ */
404
+ paymentId?: string;
405
+ /**
406
+ * Refund amount.
407
+ * @immutable
408
+ */
409
+ amount?: Price;
410
+ /** Refund status. */
411
+ refundStatus?: RefundStatus;
412
+ /** Optional details of current refund status. */
413
+ refundStatusInfo?: RefundStatusInfo;
414
+ /**
415
+ * Payment gateway's refund ID.
416
+ * This field is only returned when the value of `external_refund` is `false`.
417
+ * @format GUID
418
+ */
419
+ gatewayRefundId?: string | null;
420
+ /** ID of the refund in the payment provider's system. For example, at PayPal, Square, Stripe, etc. Not returned for external refunds. */
421
+ providerRefundId?: string | null;
422
+ /**
423
+ * Whether refund was made externally and manually on the payment provider's side.
424
+ * @immutable
425
+ */
426
+ externalRefund?: boolean;
427
+ }
428
+ /** Refund transaction status. */
429
+ export declare enum RefundStatus {
430
+ /** Refund was initiated on payment provider side. PENDING status was assigned by provider. */
431
+ PENDING = "PENDING",
432
+ /** Refund transaction succeeded. */
433
+ SUCCEEDED = "SUCCEEDED",
434
+ /** Refund transaction failed. */
435
+ FAILED = "FAILED",
436
+ /** Refund request acknowledged, and will be executed soon. */
437
+ SCHEDULED = "SCHEDULED",
438
+ /** Refund was initiated on payment provider side. */
439
+ STARTED = "STARTED"
440
+ }
441
+ export interface RefundStatusInfo {
442
+ /**
443
+ * Reason code for the refund's current status.
444
+ *
445
+ * Learn more about [reason codes](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes).
446
+ * @minLength 1
447
+ * @maxLength 10
448
+ */
449
+ paymentGatewayReasonCode?: string | null;
450
+ /**
451
+ * Free text explanation of current refund status.
452
+ * @minLength 1
453
+ * @maxLength 1000
454
+ */
455
+ description?: string | null;
456
+ }
457
+ /** Business model of a refund request */
458
+ export interface RefundDetails {
459
+ /**
460
+ * Order line item IDs and quantities that were refunded.
461
+ * @maxSize 300
462
+ */
463
+ items?: RefundItem[];
464
+ /** Whether the shipping fee was also refunded. */
465
+ shippingIncluded?: boolean;
466
+ /**
467
+ * Reason for the refund, provided by customer (optional).
468
+ * @maxLength 200
469
+ */
470
+ reason?: string | null;
471
+ /**
472
+ * Line items that were refunded.
473
+ * @maxSize 300
474
+ */
475
+ lineItems?: LineItemRefund[];
476
+ /**
477
+ * Additional fees that were refunded.
478
+ * @maxSize 100
479
+ */
480
+ additionalFees?: AdditionalFeeRefund[];
481
+ /** Shipping amount that was refunded. */
482
+ shipping?: ShippingRefund;
483
+ }
484
+ export interface RefundItem {
485
+ /**
486
+ * Line item ID the refunded line item.
487
+ * @format GUID
488
+ */
489
+ lineItemId?: string;
490
+ /**
491
+ * Line item quantity refunded.
492
+ * @min 1
493
+ * @max 100000
494
+ */
495
+ quantity?: number;
496
+ }
497
+ export interface LineItemRefund {
498
+ /**
499
+ * Line item ID.
500
+ * @format GUID
501
+ * @immutable
502
+ */
503
+ lineItemId?: string;
504
+ /**
505
+ * Refund quantity.
506
+ * @min 1
507
+ * @max 100000
508
+ * @immutable
509
+ */
510
+ quantity?: number;
511
+ }
512
+ export interface AdditionalFeeRefund {
513
+ /**
514
+ * Additional fee ID.
515
+ * @format GUID
516
+ * @immutable
517
+ */
518
+ additionalFeeId?: string;
519
+ /**
520
+ * Refund amount.
521
+ * @immutable
522
+ */
523
+ amount?: Price;
524
+ }
525
+ export interface ShippingRefund {
526
+ /**
527
+ * Refund amount.
528
+ * @immutable
529
+ */
530
+ amount?: Price;
531
+ }
532
+ export interface AggregatedRefundSummary {
533
+ /** Total amount requested for refund. */
534
+ requestedRefund?: Price;
535
+ /** Pending refund amount - the portion of `requestedRefund` that is still pending. */
536
+ pendingRefund?: Price;
537
+ /** Refunded amount - the portion of `requestedRefund` that refunded successfully. */
538
+ refunded?: Price;
539
+ /** Failed refund amount - the portion of `requestedRefund` that failed. */
540
+ failedRefundAmount?: Price;
541
+ /** Whether at least one refund transaction is still in `"PENDING"` status. */
542
+ pending?: boolean;
543
+ /** Breakdown of refunded items. Available only after refund is complete. */
544
+ breakdown?: RefundItemsBreakdown;
545
+ }
546
+ export interface RefundItemsBreakdown {
547
+ /**
548
+ * Refunded line items and the amount refunded for each.
549
+ * @maxSize 300
550
+ */
551
+ lineItems?: LineItemRefundSummary[];
552
+ }
553
+ export interface LineItemRefundSummary {
554
+ /**
555
+ * ID of the refunded line item.
556
+ * @format GUID
557
+ */
558
+ lineItemId?: string;
559
+ /** Total refunded amount for the line item. */
560
+ totalRefundedAmount?: Price;
561
+ }
562
+ export interface SnapshotMessage {
563
+ _id?: string;
564
+ opType?: number;
565
+ }
566
+ export interface IndexingMessage {
567
+ _id?: string;
568
+ opType?: number;
569
+ requiredVersions?: string[];
570
+ }
571
+ export interface DiffmatokyPayload {
572
+ left?: string;
573
+ right?: string;
574
+ compareChannel?: string;
575
+ entityId?: string;
576
+ errorInformation?: ErrorInformation;
577
+ tags?: string[];
578
+ }
579
+ export interface ErrorInformation {
580
+ stackTrace?: string;
581
+ }
582
+ export interface OrderRefunded {
583
+ /**
584
+ * Refund ID.
585
+ * @readonly
586
+ */
587
+ refundId?: string;
588
+ /**
589
+ * Refunded order data.
590
+ * @readonly
591
+ */
592
+ order?: Order;
593
+ }
594
+ export interface Order {
595
+ /**
596
+ * Order ID (auto-generated upon order creation).
597
+ * @format GUID
598
+ * @readonly
599
+ */
600
+ _id?: string | null;
601
+ /**
602
+ * Order number displayed in the owner's store (auto-generated).
603
+ * @readonly
604
+ */
605
+ number?: number;
606
+ /**
607
+ * Order creation date and time.
608
+ * @readonly
609
+ */
610
+ dateCreated?: Date | null;
611
+ /** Buyer information. */
612
+ buyerInfo?: BuyerInfo;
613
+ /**
614
+ * Currency used for the pricing of this order in [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) format.
615
+ * @format CURRENCY
616
+ */
617
+ currency?: string | null;
618
+ /** Weight unit used in this store. */
619
+ weightUnit?: WeightUnit;
620
+ /** Totals for order's line items. */
621
+ totals?: Totals;
622
+ /** Billing information. */
623
+ billingInfo?: BillingInfo;
624
+ /** Shipping information. */
625
+ shippingInfo?: ShippingInfo;
626
+ /**
627
+ * A note added by the buyer.
628
+ * @maxLength 1000
629
+ */
630
+ buyerNote?: string | null;
631
+ /**
632
+ * Deprecated.
633
+ * @readonly
634
+ * @deprecated
635
+ */
636
+ read?: boolean;
637
+ /**
638
+ * Whether or not the order was archived.
639
+ * @readonly
640
+ */
641
+ archived?: boolean;
642
+ /** Current status of the payment. */
643
+ paymentStatus?: PaymentStatus;
644
+ /**
645
+ * Order's current fulfillment status (whether the order received a tracking number or was delivered/picked up).
646
+ * @readonly
647
+ */
648
+ fulfillmentStatus?: FulfillmentStatus;
649
+ /**
650
+ * Line items ordered.
651
+ * @minSize 1
652
+ * @maxSize 300
653
+ */
654
+ lineItems?: LineItem[];
655
+ /**
656
+ * Log of updates related to the order.
657
+ * @readonly
658
+ */
659
+ activities?: Activity[];
660
+ /** Invoice information. */
661
+ invoiceInfo?: V2InvoiceInfo;
662
+ /**
663
+ * Order fulfillment information.
664
+ * @readonly
665
+ */
666
+ fulfillments?: Fulfillment[];
667
+ /** Discount information. */
668
+ discount?: Discount;
669
+ /** Custom field information. */
670
+ customField?: CustomField;
671
+ /**
672
+ * Shopping cart ID.
673
+ * @format GUID
674
+ */
675
+ cartId?: string | null;
676
+ /**
677
+ * Language for communication with the buyer. Defaults to the site language.
678
+ * For a site that supports multiple languages, this is the language the buyer selected.
679
+ * @maxLength 10
680
+ */
681
+ buyerLanguage?: string | null;
682
+ /** Information about the sales channel that submitted this order. */
683
+ channelInfo?: ChannelInfo;
684
+ /**
685
+ * Identity of the order's initiator.
686
+ * @readonly
687
+ */
688
+ enteredBy?: EnteredBy;
689
+ /**
690
+ * Date and time of latest update.
691
+ * @readonly
692
+ */
693
+ lastUpdated?: Date | null;
694
+ /** Subscription information. */
695
+ subscriptionInfo?: SubscriptionInfo;
696
+ /**
697
+ * Order’s unique numeric ID.
698
+ * Primarily used for sorting and filtering when crawling all orders.
699
+ * @readonly
700
+ */
701
+ numericId?: string;
702
+ /**
703
+ * Refund information.
704
+ * @readonly
705
+ */
706
+ refunds?: V2Refund[];
707
+ }
708
+ /** Buyer Info */
709
+ export interface BuyerInfo {
710
+ /**
711
+ * Wix customer ID
712
+ * @format GUID
713
+ */
714
+ _id?: string | null;
715
+ /**
716
+ * Deprecated (use identityType instead)
717
+ * @readonly
718
+ * @deprecated
719
+ */
720
+ type?: IdentityType;
721
+ /** Customer type */
722
+ identityType?: IdentityType;
723
+ /**
724
+ * Customer's first name
725
+ * @readonly
726
+ */
727
+ firstName?: string;
728
+ /**
729
+ * Customer's last name
730
+ * @readonly
731
+ */
732
+ lastName?: string;
733
+ /**
734
+ * Customer's phone number
735
+ * @readonly
736
+ */
737
+ phone?: string | null;
738
+ /**
739
+ * Customer's email address
740
+ * @readonly
741
+ */
742
+ email?: string;
743
+ }
744
+ export declare enum IdentityType {
745
+ UNSPECIFIED_IDENTITY_TYPE = "UNSPECIFIED_IDENTITY_TYPE",
746
+ /** Site member */
747
+ MEMBER = "MEMBER",
748
+ /** Contact */
749
+ CONTACT = "CONTACT"
750
+ }
751
+ export declare enum WeightUnit {
752
+ /** Weight unit can't be classified due to an error. */
753
+ UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
754
+ /** Kilograms. */
755
+ KG = "KG",
756
+ /** Pounds. */
757
+ LB = "LB"
758
+ }
759
+ export interface Totals {
760
+ /**
761
+ * Subtotal of all the line items, before tax.
762
+ * @format DECIMAL_VALUE
763
+ */
764
+ subtotal?: string;
765
+ /**
766
+ * Total shipping price, before tax.
767
+ * @format DECIMAL_VALUE
768
+ */
769
+ shipping?: string | null;
770
+ /**
771
+ * Total tax.
772
+ * @format DECIMAL_VALUE
773
+ */
774
+ tax?: string | null;
775
+ /**
776
+ * Total calculated discount value.
777
+ * @format DECIMAL_VALUE
778
+ */
779
+ discount?: string | null;
780
+ /**
781
+ * Total price charged.
782
+ * @format DECIMAL_VALUE
783
+ */
784
+ total?: string;
785
+ /**
786
+ * Total items weight.
787
+ * @readonly
788
+ */
789
+ weight?: string;
790
+ /**
791
+ * Total number of line items.
792
+ * @readonly
793
+ */
794
+ quantity?: number;
795
+ /**
796
+ * Total refund.
797
+ * @format DECIMAL_VALUE
798
+ * @readonly
799
+ */
800
+ refund?: string | null;
801
+ /**
802
+ * Total calculated gift card value.
803
+ * @format DECIMAL_VALUE
804
+ */
805
+ giftCard?: string | null;
806
+ }
807
+ export interface BillingInfo {
808
+ /**
809
+ * Payment method used for this order
810
+ * @maxLength 50
811
+ */
812
+ paymentMethod?: string | null;
813
+ /**
814
+ * Deprecated (use paymentProviderTransactionId instead)
815
+ * @readonly
816
+ * @deprecated
817
+ */
818
+ externalTransactionId?: string | null;
819
+ /**
820
+ * Transaction ID from payment provider (e.g., PayPal, Square, Stripe) transaction ID
821
+ * @maxLength 100
822
+ */
823
+ paymentProviderTransactionId?: string | null;
824
+ /**
825
+ * Transaction ID from payment gateway (e.g., Wix Payments)
826
+ * @maxLength 100
827
+ */
828
+ paymentGatewayTransactionId?: string | null;
829
+ /** Full billing address */
830
+ address?: Address;
831
+ /**
832
+ * Payment date
833
+ * @readonly
834
+ */
835
+ paidDate?: Date | null;
836
+ /** Whether order can be refunded by payment provider (manually or automatic) */
837
+ refundableByPaymentProvider?: boolean | null;
838
+ }
839
+ export interface Address extends AddressAddressLine1OptionsOneOf {
840
+ /**
841
+ * Address line 1 (free text)
842
+ * @maxLength 1000
843
+ */
844
+ addressLine1?: string;
845
+ /** Address line 1 (street) */
846
+ street?: Street;
847
+ /** Addressee name */
848
+ fullName?: FullName;
849
+ /**
850
+ * Country code (2 letters)
851
+ * @format COUNTRY
852
+ */
853
+ country?: string | null;
854
+ /**
855
+ * State or district
856
+ * @maxLength 50
857
+ */
858
+ subdivision?: string | null;
859
+ /**
860
+ * City name
861
+ * @maxLength 150
862
+ */
863
+ city?: string | null;
864
+ /**
865
+ * ZIP/postal code
866
+ * @maxLength 200
867
+ */
868
+ zipCode?: string | null;
869
+ /**
870
+ * Phone number
871
+ * @maxLength 200
872
+ */
873
+ phone?: string | null;
874
+ /**
875
+ * Company name
876
+ * @maxLength 500
877
+ */
878
+ company?: string | null;
879
+ /**
880
+ * Email address
881
+ * @maxLength 500
882
+ */
883
+ email?: string | null;
884
+ /**
885
+ * address line
886
+ * @maxLength 250
887
+ */
888
+ addressLine2?: string | null;
889
+ /** Tax information (for Brazil only) */
890
+ vatId?: VatId;
891
+ }
892
+ /** @oneof */
893
+ export interface AddressAddressLine1OptionsOneOf {
894
+ /**
895
+ * Address line 1 (free text)
896
+ * @maxLength 1000
897
+ */
898
+ addressLine1?: string;
899
+ /** Address line 1 (street) */
900
+ street?: Street;
901
+ }
902
+ export interface FullName {
903
+ /**
904
+ * Customer's first name
905
+ * @maxLength 1000
906
+ */
907
+ firstName?: string;
908
+ /**
909
+ * Customer's last name
910
+ * @maxLength 1000
911
+ */
912
+ lastName?: string;
913
+ }
914
+ export interface Street {
915
+ /**
916
+ * Street number
917
+ * @maxLength 500
918
+ */
919
+ number?: string;
920
+ /**
921
+ * Street name
922
+ * @maxLength 1000
923
+ */
924
+ name?: string;
925
+ }
926
+ export interface VatId {
927
+ /**
928
+ * Customer's tax ID.
929
+ * @maxLength 50
930
+ */
931
+ number?: string;
932
+ /**
933
+ * Tax type.
934
+ * + `CPF`: For individual tax payers.
935
+ * + `CNPJ`: For corporations.
936
+ */
937
+ type?: VatType;
938
+ }
939
+ /** Brazilian tax info types */
940
+ export declare enum VatType {
941
+ /** When the tax info type can't be classified, due to an error */
942
+ UNSPECIFIED_TAX_TYPE = "UNSPECIFIED_TAX_TYPE",
943
+ /** CPF - for individual tax payers */
944
+ CPF = "CPF",
945
+ /** CNPJ - for corporations */
946
+ CNPJ = "CNPJ"
947
+ }
948
+ export interface ShippingInfo extends ShippingInfoDetailsOneOf {
949
+ /** Shipment details (when this object describes shipment). */
950
+ shipmentDetails?: ShipmentDetails;
951
+ /** Pickup details (when this object describes pickup). */
952
+ pickupDetails?: PickupDetails;
953
+ /**
954
+ * Shipping option name.
955
+ * @maxLength 1000
956
+ */
957
+ deliveryOption?: string;
958
+ /**
959
+ * Shipping option delivery time.
960
+ * @maxLength 500
961
+ */
962
+ estimatedDeliveryTime?: string | null;
963
+ /**
964
+ * Deprecated - Latest expected delivery date.
965
+ * @deprecated
966
+ */
967
+ deliverByDate?: Date | null;
968
+ /**
969
+ * Shipping region.
970
+ * @maxLength 100
971
+ */
972
+ shippingRegion?: string | null;
973
+ /**
974
+ * Unique code of provided shipping option. For example, `"usps_std_overnight"`.
975
+ * @maxLength 100
976
+ * @readonly
977
+ */
978
+ code?: string | null;
979
+ }
980
+ /** @oneof */
981
+ export interface ShippingInfoDetailsOneOf {
982
+ /** Shipment details (when this object describes shipment). */
983
+ shipmentDetails?: ShipmentDetails;
984
+ /** Pickup details (when this object describes pickup). */
985
+ pickupDetails?: PickupDetails;
986
+ }
987
+ export interface ShipmentDetails {
988
+ /** Shipping destination address. */
989
+ address?: Address;
990
+ /**
991
+ * Deprecated (use fulfillments instead).
992
+ * @readonly
993
+ * @deprecated
994
+ */
995
+ trackingInfo?: TrackingInfo;
996
+ /**
997
+ * Discount applied for shipping.
998
+ * @format DECIMAL_VALUE
999
+ */
1000
+ discount?: string | null;
1001
+ /**
1002
+ * Tax applied for shipping.
1003
+ * @format DECIMAL_VALUE
1004
+ */
1005
+ tax?: string | null;
1006
+ /** Price data. */
1007
+ priceData?: ShippingPriceData;
1008
+ }
1009
+ export interface TrackingInfo {
1010
+ /**
1011
+ * Tracking number
1012
+ * @maxLength 100
1013
+ * @readonly
1014
+ */
1015
+ trackingNumber?: string | null;
1016
+ /**
1017
+ * Shipping provider
1018
+ * @maxLength 100
1019
+ * @readonly
1020
+ */
1021
+ shippingProvider?: string | null;
1022
+ /**
1023
+ * Tracking link
1024
+ * @format WEB_URL
1025
+ * @readonly
1026
+ */
1027
+ trackingLink?: string | null;
1028
+ }
1029
+ export interface ShippingPriceData {
1030
+ /** Whether tax is included in the price. */
1031
+ taxIncludedInPrice?: boolean;
1032
+ /**
1033
+ * Shipping price.
1034
+ * @format DECIMAL_VALUE
1035
+ */
1036
+ price?: string | null;
1037
+ }
1038
+ export interface PickupDetails {
1039
+ /** Pickup address. */
1040
+ pickupAddress?: PickupAddress;
1041
+ /**
1042
+ * Deprecated (use billingInfo instead).
1043
+ * @readonly
1044
+ * @deprecated
1045
+ */
1046
+ buyerDetails?: BuyerDetails;
1047
+ /**
1048
+ * Store owner's pickup instructions.
1049
+ * @maxLength 1000
1050
+ */
1051
+ pickupInstructions?: string | null;
1052
+ }
1053
+ export interface PickupAddress {
1054
+ /** Country code (3 letters) */
1055
+ country?: string;
1056
+ /**
1057
+ * State/District
1058
+ * @maxLength 50
1059
+ */
1060
+ subdivision?: string | null;
1061
+ /**
1062
+ * Address
1063
+ * @maxLength 250
1064
+ */
1065
+ addressLine1?: string;
1066
+ /**
1067
+ * City
1068
+ * @maxLength 100
1069
+ */
1070
+ city?: string;
1071
+ /**
1072
+ * ZIP/postal code
1073
+ * @maxLength 50
1074
+ */
1075
+ zipCode?: string;
1076
+ }
1077
+ export interface BuyerDetails {
1078
+ /** Addressee name */
1079
+ fullName?: FullName;
1080
+ /**
1081
+ * Email address
1082
+ * @maxLength 100
1083
+ * @format EMAIL
1084
+ */
1085
+ email?: string;
1086
+ /**
1087
+ * Phone number
1088
+ * @maxLength 30
1089
+ * @format PHONE
1090
+ */
1091
+ phone?: string;
1092
+ }
1093
+ /** This might be extended in the future with pending orders statuses */
1094
+ export declare enum PaymentStatus {
1095
+ /** Payment status can't be classified, due to an error */
1096
+ UNSPECIFIED_PAYMENT_STATUS = "UNSPECIFIED_PAYMENT_STATUS",
1097
+ /** Order is pending response from the payment provider */
1098
+ PENDING = "PENDING",
1099
+ /** Order is marked as not paid, and can be marked as paid later on. This is relevant for POS and offline orders */
1100
+ NOT_PAID = "NOT_PAID",
1101
+ /** The order is marked as paid */
1102
+ PAID = "PAID",
1103
+ /** Order was refunded, refund amount less than order total price */
1104
+ PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED",
1105
+ /** Full order total price was refunded */
1106
+ FULLY_REFUNDED = "FULLY_REFUNDED",
1107
+ /** At least one payment was received and approved, covering less than total price amount */
1108
+ PARTIALLY_PAID = "PARTIALLY_PAID"
1109
+ }
1110
+ export declare enum FulfillmentStatus {
1111
+ /** None of the order items are fulfilled */
1112
+ NOT_FULFILLED = "NOT_FULFILLED",
1113
+ /**
1114
+ * All of the order items are fulfilled
1115
+ * Orders without shipping info are fulfilled automatically
1116
+ */
1117
+ FULFILLED = "FULFILLED",
1118
+ /** Order is canceled */
1119
+ CANCELED = "CANCELED",
1120
+ /** Some, but not all of the order items are fulfilled */
1121
+ PARTIALLY_FULFILLED = "PARTIALLY_FULFILLED"
1122
+ }
1123
+ export interface LineItem {
1124
+ /**
1125
+ * Line item ID (auto-generated, stable within this order only)
1126
+ * @readonly
1127
+ */
1128
+ index?: number | null;
1129
+ /**
1130
+ * Line item quantity
1131
+ * @min 1
1132
+ * @max 100000
1133
+ */
1134
+ quantity?: number;
1135
+ /**
1136
+ * Deprecated (use priceData instead)
1137
+ * @format DECIMAL_VALUE
1138
+ * @readonly
1139
+ * @deprecated
1140
+ */
1141
+ price?: string | null;
1142
+ /**
1143
+ * Line item name
1144
+ * @minLength 1
1145
+ * @maxLength 200
1146
+ */
1147
+ name?: string | null;
1148
+ /** Product name, translated into the customer's language */
1149
+ translatedName?: string | null;
1150
+ /**
1151
+ * Line item product ID (optional for POS orders)
1152
+ * @minLength 1
1153
+ */
1154
+ productId?: string | null;
1155
+ /**
1156
+ * Deprecated (use priceData instead)
1157
+ * @format DECIMAL_VALUE
1158
+ * @readonly
1159
+ * @deprecated
1160
+ */
1161
+ totalPrice?: string | null;
1162
+ /** Line item type (may be extended) */
1163
+ lineItemType?: LineItemType;
1164
+ /**
1165
+ * Line item options ordered
1166
+ * @maxSize 500
1167
+ */
1168
+ options?: OptionSelection[];
1169
+ /**
1170
+ * Line item custom text field entry
1171
+ * @maxSize 500
1172
+ */
1173
+ customTextFields?: CustomTextFieldSelection[];
1174
+ /**
1175
+ * Line item weight
1176
+ * @format DECIMAL_VALUE
1177
+ */
1178
+ weight?: string | null;
1179
+ /** Primary media for preview of the line item */
1180
+ mediaItem?: MediaItem;
1181
+ /**
1182
+ * Line item SKU
1183
+ * @maxLength 40
1184
+ */
1185
+ sku?: string | null;
1186
+ /**
1187
+ * Line item notes
1188
+ * @maxLength 1000
1189
+ */
1190
+ notes?: string | null;
1191
+ /** Line item variantId (from Stores Catalog) */
1192
+ variantId?: string | null;
1193
+ /**
1194
+ * Line item fulfillerId from stores fulfillers. No value equals self fulfilled
1195
+ * @format GUID
1196
+ */
1197
+ fulfillerId?: string | null;
1198
+ /**
1199
+ * Discount applied for this line item
1200
+ * @format DECIMAL_VALUE
1201
+ */
1202
+ discount?: string | null;
1203
+ /**
1204
+ * Tax applied for this line item
1205
+ * @format DECIMAL_VALUE
1206
+ */
1207
+ tax?: string | null;
1208
+ /**
1209
+ * Deprecated (use priceData instead)
1210
+ * @readonly
1211
+ * @deprecated
1212
+ */
1213
+ taxIncludedInPrice?: boolean;
1214
+ /**
1215
+ * Tax group ID
1216
+ * @format GUID
1217
+ */
1218
+ taxGroupId?: string | null;
1219
+ /** Price data */
1220
+ priceData?: LineItemPriceData;
1221
+ }
1222
+ export declare enum LineItemType {
1223
+ /** Line item type can't be classified, due to an error */
1224
+ UNSPECIFIED_LINE_ITEM_TYPE = "UNSPECIFIED_LINE_ITEM_TYPE",
1225
+ /** Physical item type */
1226
+ PHYSICAL = "PHYSICAL",
1227
+ /** Digital item type */
1228
+ DIGITAL = "DIGITAL",
1229
+ /** Custom item price */
1230
+ CUSTOM_AMOUNT_ITEM = "CUSTOM_AMOUNT_ITEM"
1231
+ }
1232
+ export interface OptionSelection {
1233
+ /**
1234
+ * Option name
1235
+ * @maxLength 1000
1236
+ */
1237
+ option?: string;
1238
+ /**
1239
+ * Selected choice for this option
1240
+ * @maxLength 16000
1241
+ */
1242
+ selection?: string;
1243
+ }
1244
+ export interface CustomTextFieldSelection {
1245
+ /**
1246
+ * Custom text field name
1247
+ * @maxLength 1000
1248
+ */
1249
+ title?: string;
1250
+ /**
1251
+ * Custom text field value
1252
+ * @maxLength 16000
1253
+ */
1254
+ value?: string;
1255
+ }
1256
+ export interface MediaItem {
1257
+ /**
1258
+ * Media type
1259
+ * @readonly
1260
+ */
1261
+ mediaType?: MediaItemType;
1262
+ /**
1263
+ * Media URL
1264
+ * @format WEB_URL
1265
+ * @readonly
1266
+ */
1267
+ url?: string;
1268
+ /**
1269
+ * Media item width
1270
+ * @readonly
1271
+ */
1272
+ width?: number;
1273
+ /**
1274
+ * Media item height
1275
+ * @readonly
1276
+ */
1277
+ height?: number;
1278
+ /**
1279
+ * Deprecated
1280
+ * @deprecated
1281
+ */
1282
+ mediaId?: string | null;
1283
+ /** Media ID (for media items previously saved in Wix Media) */
1284
+ _id?: string | null;
1285
+ /** Media external URL */
1286
+ externalImageUrl?: string | null;
1287
+ /**
1288
+ * Alternative text for presentation when media cannot be displayed
1289
+ * @maxLength 256
1290
+ */
1291
+ altText?: string | null;
1292
+ }
1293
+ export declare enum MediaItemType {
1294
+ /** Media item type can't be classified, due to an error */
1295
+ UNSPECIFIED_MEDIA_TYPE_ITEM = "UNSPECIFIED_MEDIA_TYPE_ITEM",
1296
+ /** Image item type */
1297
+ IMAGE = "IMAGE"
1298
+ }
1299
+ export interface LineItemPriceData {
1300
+ /** Whether tax is included in the price set for this line item */
1301
+ taxIncludedInPrice?: boolean;
1302
+ /**
1303
+ * Line item price
1304
+ * @format DECIMAL_VALUE
1305
+ */
1306
+ price?: string;
1307
+ /**
1308
+ * Total price charged to the customer (per line item) after computation of quantity and discount
1309
+ * @format DECIMAL_VALUE
1310
+ * @readonly
1311
+ */
1312
+ totalPrice?: string | null;
1313
+ }
1314
+ export interface DigitalFile {
1315
+ /**
1316
+ * id of the secure file in media
1317
+ * @minLength 1
1318
+ * @maxLength 100
1319
+ */
1320
+ fileId?: string;
1321
+ }
1322
+ export interface Activity {
1323
+ /**
1324
+ * Activity item type
1325
+ * @readonly
1326
+ */
1327
+ type?: ActivityType;
1328
+ /**
1329
+ * Activity item author
1330
+ * @maxLength 50
1331
+ * @readonly
1332
+ */
1333
+ author?: string | null;
1334
+ /**
1335
+ * Comment added to activity item
1336
+ * @maxLength 1000
1337
+ * @readonly
1338
+ */
1339
+ message?: string | null;
1340
+ /**
1341
+ * Activity item timestamp
1342
+ * @readonly
1343
+ */
1344
+ timestamp?: Date | null;
1345
+ }
1346
+ export declare enum ActivityType {
1347
+ /** Activity item type can't be classified, due to an error */
1348
+ UNSPECIFIED_ORDER_HISTORY_ITEM_TYPE = "UNSPECIFIED_ORDER_HISTORY_ITEM_TYPE",
1349
+ /** Store owner added a comment */
1350
+ MERCHANT_COMMENT = "MERCHANT_COMMENT",
1351
+ /** Order placed */
1352
+ ORDER_PLACED = "ORDER_PLACED",
1353
+ /** Order marked as paid, either by the store owner (for offline orders), or when an online transaction was confirmed */
1354
+ ORDER_PAID = "ORDER_PAID",
1355
+ /** Order shipping status set as fulfilled */
1356
+ ORDER_FULFILLED = "ORDER_FULFILLED",
1357
+ /** Order shipping status set as not fulfilled */
1358
+ ORDER_NOT_FULFILLED = "ORDER_NOT_FULFILLED",
1359
+ /** A download link was sent (relevant for orders with digital line items) */
1360
+ DOWNLOAD_LINK_SENT = "DOWNLOAD_LINK_SENT",
1361
+ /** An email notification for pickup was sent */
1362
+ PICKUP_READY_EMAIL_SENT = "PICKUP_READY_EMAIL_SENT",
1363
+ /** Shipping tracking number was set */
1364
+ TRACKING_NUMBER_ADDED = "TRACKING_NUMBER_ADDED",
1365
+ /** Shipping tracking number was edited */
1366
+ TRACKING_NUMBER_EDITED = "TRACKING_NUMBER_EDITED",
1367
+ /** Shipping tracking link was set */
1368
+ TRACKING_LINK_WAS_SET = "TRACKING_LINK_WAS_SET",
1369
+ /** An email confirmation of order shipment was sent */
1370
+ SHIPPING_CONFIRMATION_EMAIL_SENT = "SHIPPING_CONFIRMATION_EMAIL_SENT",
1371
+ /** Invoice was set in the order */
1372
+ INVOICE_WAS_SET = "INVOICE_WAS_SET",
1373
+ /** Invoice was removed from the order */
1374
+ INVOICE_WAS_REMOVED = "INVOICE_WAS_REMOVED",
1375
+ /** Invoice was sent to customer via email */
1376
+ INVOICE_WAS_SENT = "INVOICE_WAS_SENT",
1377
+ /** Email was sent to fulfiller */
1378
+ FULFILLER_EMAIL_SENT = "FULFILLER_EMAIL_SENT",
1379
+ /** Shipping address was updated */
1380
+ SHIPPING_ADDRESS_EDITED = "SHIPPING_ADDRESS_EDITED",
1381
+ /** Order email was updated */
1382
+ EMAIL_EDITED = "EMAIL_EDITED",
1383
+ /** Order partially paid. During the checkout for orders with deposit items. */
1384
+ ORDER_PARTIALLY_PAID = "ORDER_PARTIALLY_PAID"
1385
+ }
1386
+ export interface V2InvoiceInfo {
1387
+ /**
1388
+ * Invoice ID
1389
+ * @maxLength 100
1390
+ */
1391
+ _id?: string;
1392
+ /** Invoice source */
1393
+ source?: InvoiceSource;
1394
+ }
1395
+ export declare enum InvoiceSource {
1396
+ /** Invoice source can't be classified, due to an error */
1397
+ UNSPECIFIED_INVOICE_SOURCE = "UNSPECIFIED_INVOICE_SOURCE",
1398
+ /** Invoice created using the Invoices API */
1399
+ WIX = "WIX"
1400
+ }
1401
+ export interface Fulfillment {
1402
+ /**
1403
+ * Fulfillment ID (auto generated upon fulfillment creation).
1404
+ * @format GUID
1405
+ * @readonly
1406
+ */
1407
+ _id?: string | null;
1408
+ /**
1409
+ * Fulfillment creation date and time.
1410
+ * @readonly
1411
+ */
1412
+ dateCreated?: Date | null;
1413
+ /**
1414
+ * Information about the line items in the fulfilled order.
1415
+ * @minSize 1
1416
+ * @maxSize 300
1417
+ */
1418
+ lineItems?: FulfillmentLineItem[];
1419
+ /** Tracking information. */
1420
+ trackingInfo?: FulfillmentTrackingInfo;
1421
+ }
1422
+ export interface FulfillmentLineItem {
1423
+ /**
1424
+ * Line item ID (mirrors the line item index of the order).
1425
+ * @min 1
1426
+ * @max 200
1427
+ */
1428
+ index?: number;
1429
+ /**
1430
+ * Line item quantity.
1431
+ * On creation, if this parameter isn't passed, the new fulfillment will automatically include all items of this line item that have not already been linked to a fulfillment.
1432
+ * 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 will be returned.
1433
+ * This property will always have a value when returned.
1434
+ * @min 1
1435
+ * @max 100000
1436
+ */
1437
+ quantity?: number | null;
1438
+ }
1439
+ export interface FulfillmentTrackingInfo {
1440
+ /**
1441
+ * Tracking number.
1442
+ * @minLength 1
1443
+ * @maxLength 100
1444
+ */
1445
+ trackingNumber?: string;
1446
+ /**
1447
+ * Shipping provider. Using the following shipping providers will allow for autofilling the tracking link:
1448
+ * * `fedex`
1449
+ * * `ups`
1450
+ * * `usps`
1451
+ * * `dhl`
1452
+ * * `canadaPost`
1453
+ * @minLength 1
1454
+ * @maxLength 100
1455
+ */
1456
+ shippingProvider?: string;
1457
+ /**
1458
+ * Tracking link - autofilled if using a predefined shipping provider, otherwise provided on creation.
1459
+ * @minLength 1
1460
+ * @maxLength 2048
1461
+ * @format WEB_URL
1462
+ */
1463
+ trackingLink?: string | null;
1464
+ }
1465
+ export interface Discount {
1466
+ /**
1467
+ * Deprecated (use Totals.discount instead)
1468
+ * @readonly
1469
+ * @deprecated
1470
+ */
1471
+ value?: string;
1472
+ /** Applied coupon */
1473
+ appliedCoupon?: AppliedCoupon;
1474
+ }
1475
+ export interface AppliedCoupon {
1476
+ /**
1477
+ * Coupon ID
1478
+ * @minLength 1
1479
+ * @maxLength 100
1480
+ */
1481
+ couponId?: string;
1482
+ /**
1483
+ * Coupon name
1484
+ * @maxLength 100
1485
+ */
1486
+ name?: string;
1487
+ /**
1488
+ * Coupon code
1489
+ * @maxLength 100
1490
+ */
1491
+ code?: string;
1492
+ }
1493
+ /** Custom field */
1494
+ export interface CustomField {
1495
+ /**
1496
+ * Free text that the customer entered in the custom field during the checkout process
1497
+ * @maxLength 2000
1498
+ */
1499
+ value?: string;
1500
+ /**
1501
+ * Title for the custom field
1502
+ * @maxLength 1000
1503
+ */
1504
+ title?: string;
1505
+ /**
1506
+ * The title translated according to the buyer language
1507
+ * @maxLength 1000
1508
+ */
1509
+ translatedTitle?: string;
1510
+ }
1511
+ export interface ChannelInfo {
1512
+ /** Sales channel that submitted the order */
1513
+ type?: ChannelType;
1514
+ /**
1515
+ * Reference to an order ID from an external system, as defined in channelInfo (e.g., eBay or Amazon)
1516
+ * @maxLength 100
1517
+ */
1518
+ externalOrderId?: string | null;
1519
+ /**
1520
+ * URL to the order in the external system, as defined in channelInfo (e.g., eBay or Amazon)
1521
+ * @maxLength 300
1522
+ */
1523
+ externalOrderUrl?: string | null;
1524
+ }
1525
+ export declare enum ChannelType {
1526
+ UNSPECIFIED = "UNSPECIFIED",
1527
+ WEB = "WEB",
1528
+ POS = "POS",
1529
+ EBAY = "EBAY",
1530
+ AMAZON = "AMAZON",
1531
+ OTHER_PLATFORM = "OTHER_PLATFORM",
1532
+ WIX_APP_STORE = "WIX_APP_STORE",
1533
+ WIX_INVOICES = "WIX_INVOICES",
1534
+ BACKOFFICE_MERCHANT = "BACKOFFICE_MERCHANT",
1535
+ WISH = "WISH",
1536
+ CLASS_PASS = "CLASS_PASS",
1537
+ GLOBAL_E = "GLOBAL_E",
1538
+ FACEBOOK = "FACEBOOK",
1539
+ ETSY = "ETSY",
1540
+ TIKTOK = "TIKTOK",
1541
+ FAIRE_COM = "FAIRE_COM"
1542
+ }
1543
+ export interface EnteredBy {
1544
+ /** @format GUID */
1545
+ _id?: string;
1546
+ identityType?: EnteredByIdentityType;
1547
+ }
1548
+ export declare enum EnteredByIdentityType {
1549
+ USER = "USER",
1550
+ MEMBER = "MEMBER",
1551
+ CONTACT = "CONTACT",
1552
+ APP = "APP"
1553
+ }
1554
+ export interface SubscriptionInfo {
1555
+ /**
1556
+ * Subscription ID.
1557
+ * @format GUID
1558
+ */
1559
+ _id?: string | null;
1560
+ /**
1561
+ * Current cycle number. For example, if the subscription is in the 3rd month of a 4-month subscription, the value will be `3`.
1562
+ * @min 1
1563
+ */
1564
+ cycleNumber?: number;
1565
+ /** Subscription settings. */
1566
+ subscriptionSettings?: SubscriptionSettings;
1567
+ /** Subscription options info. */
1568
+ subscriptionOptionInfo?: SubscriptionOptionInfo;
1569
+ }
1570
+ export interface SubscriptionSettings {
1571
+ /** Frequency of recurring payment. */
1572
+ frequency?: SubscriptionFrequency;
1573
+ /** Whether subscription is renewed automatically at the end of each period. */
1574
+ autoRenewal?: boolean;
1575
+ /**
1576
+ * Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`.
1577
+ * @min 2
1578
+ * @max 999
1579
+ */
1580
+ billingCycles?: number | null;
1581
+ }
1582
+ /** Frequency unit of recurring payment */
1583
+ export declare enum SubscriptionFrequency {
1584
+ UNDEFINED = "UNDEFINED",
1585
+ DAY = "DAY",
1586
+ WEEK = "WEEK",
1587
+ MONTH = "MONTH",
1588
+ YEAR = "YEAR"
1589
+ }
1590
+ export interface SubscriptionOptionInfo {
1591
+ /**
1592
+ * Subscription option title.
1593
+ * @minLength 1
1594
+ * @maxLength 150
1595
+ */
1596
+ title?: string;
1597
+ /**
1598
+ * Subscription option description.
1599
+ * @maxLength 500
1600
+ */
1601
+ description?: string | null;
1602
+ }
1603
+ export interface V2Refund {
1604
+ /** Refund created timestamp. */
1605
+ dateCreated?: Date | null;
1606
+ /**
1607
+ * Refund amount.
1608
+ * @format DECIMAL_VALUE
1609
+ */
1610
+ amount?: string;
1611
+ /** Reason for refund, given by user (optional). */
1612
+ reason?: string | null;
1613
+ /** Payment provider transaction ID. Used to find refund transaction info on the payment provider's side. */
1614
+ paymentProviderTransactionId?: string | null;
1615
+ /**
1616
+ * Refund ID.
1617
+ * @format GUID
1618
+ */
1619
+ _id?: string;
1620
+ /** Whether refund was made externally (on the payment provider's side). */
1621
+ externalRefund?: boolean;
1622
+ }
1623
+ export interface GiftCard {
1624
+ /**
1625
+ * @minLength 1
1626
+ * @maxLength 100
1627
+ */
1628
+ transactionId?: string;
1629
+ /**
1630
+ * giftcard internal ID
1631
+ * @maxLength 36
1632
+ * @deprecated giftcard internal ID
1633
+ * @targetRemovalDate 2024-12-31
1634
+ */
1635
+ _id?: string;
1636
+ /**
1637
+ * giftcard provider appid
1638
+ * @format GUID
1639
+ */
1640
+ providerId?: string;
1641
+ /**
1642
+ * giftcard amount
1643
+ * @format DECIMAL_VALUE
1644
+ */
1645
+ amount?: string;
1646
+ }
1647
+ /** Triggered when a payment is updated. */
1648
+ export interface PaymentsUpdated {
1649
+ /** Updated order transactions. */
1650
+ orderTransactions?: OrderTransactions;
1651
+ /**
1652
+ * List of IDs of the updated payments.
1653
+ * @maxSize 100
1654
+ */
1655
+ paymentIds?: string[];
1656
+ /**
1657
+ * List of IDs of the updated refunds.
1658
+ * @maxSize 300
1659
+ */
1660
+ refundIds?: string[];
1661
+ }
1662
+ /** Triggered when a payment is updated. */
1663
+ export interface PaymentDetailsUpdated {
1664
+ /** Updated order transactions. */
1665
+ orderTransactions?: OrderTransactions;
1666
+ /**
1667
+ * List of IDs of the updated payments.
1668
+ * @format GUID
1669
+ * @maxSize 100
1670
+ */
1671
+ paymentIds?: string[];
1672
+ /**
1673
+ * List of IDs of the updated refunds.
1674
+ * @format GUID
1675
+ * @maxSize 300
1676
+ */
1677
+ refundIds?: string[];
1678
+ }
1679
+ /** Triggered when a refund is created. */
1680
+ export interface RefundCreated {
1681
+ /** Updated order transactions. */
1682
+ orderTransactions?: OrderTransactions;
1683
+ /** ID of the created refund. */
1684
+ refundId?: string;
1685
+ /** Inventory restock details as part of this refund.. */
1686
+ restockInfo?: RestockInfo;
1687
+ /** Whether to send a refund confirmation email to the customer. */
1688
+ sendOrderRefundedEmail?: boolean;
1689
+ /** Custom message added to the refund confirmation email. */
1690
+ customMessage?: string | null;
1691
+ /** Refunded line items and quantities that are part of the created refund. */
1692
+ refundItems?: RefundItem[];
1693
+ }
1694
+ export interface RestockInfo {
1695
+ /** Restock type. */
1696
+ type?: RestockType;
1697
+ /**
1698
+ * Restocked line items and quantities. Only relevant for `{"type": "SOME_ITEMS"}`.
1699
+ * @maxSize 300
1700
+ */
1701
+ items?: RestockItem[];
1702
+ }
1703
+ export declare enum RestockType {
1704
+ NO_ITEMS = "NO_ITEMS",
1705
+ ALL_ITEMS = "ALL_ITEMS",
1706
+ SOME_ITEMS = "SOME_ITEMS"
1707
+ }
1708
+ export interface RestockItem {
1709
+ /**
1710
+ * ID of the line item being restocked.
1711
+ * @format GUID
1712
+ */
1713
+ lineItemId?: string;
1714
+ /**
1715
+ * Line item quantity being restocked.
1716
+ * @min 1
1717
+ * @max 100000
1718
+ */
1719
+ quantity?: number;
1720
+ }
1721
+ export interface RefundCompleted {
1722
+ /**
1723
+ * Order ID.
1724
+ * @format GUID
1725
+ */
1726
+ orderId?: string;
1727
+ /** Completed refund. */
1728
+ refund?: Refund;
1729
+ /** Refund side effects. */
1730
+ sideEffects?: RefundSideEffects;
1731
+ /** Order transactions after refund is completed. */
1732
+ orderTransactions?: OrderTransactions;
1733
+ }
1734
+ export interface RefundSideEffects {
1735
+ /** Inventory restock details as part of this refund. */
1736
+ restockInfo?: RestockInfo;
1737
+ /** Whether to send a refund confirmation email to the customer. */
1738
+ sendOrderRefundedEmail?: boolean;
1739
+ /**
1740
+ * Custom message added to the refund confirmation email.
1741
+ * @minLength 1
1742
+ * @maxLength 1000
1743
+ */
1744
+ customMessage?: string | null;
1745
+ }
1746
+ export interface ListTransactionsForSingleOrderRequest {
1747
+ /**
1748
+ * Order ID.
1749
+ * @minLength 1
1750
+ * @maxLength 100
1751
+ */
1752
+ orderId: string;
1753
+ }
1754
+ export interface ListTransactionsForSingleOrderResponse {
1755
+ /** Order ID and its associated transactions. */
1756
+ orderTransactions?: OrderTransactions;
1757
+ }
1758
+ export interface ListTransactionsForMultipleOrdersRequest {
1759
+ /**
1760
+ * Order IDs for which to retrieve transactions.
1761
+ * @minSize 1
1762
+ * @maxSize 100
1763
+ * @minLength 1
1764
+ * @maxLength 100
1765
+ */
1766
+ orderIds: string[];
1767
+ }
1768
+ export interface ListTransactionsForMultipleOrdersResponse {
1769
+ /** List of order IDs and their associated transactions. */
1770
+ orderTransactions?: OrderTransactions[];
1771
+ }
1772
+ export interface AddPaymentsRequest {
1773
+ /**
1774
+ * Order ID.
1775
+ * @format GUID
1776
+ */
1777
+ orderId: string;
1778
+ /**
1779
+ * Payments to be added to order.
1780
+ * @minSize 1
1781
+ * @maxSize 50
1782
+ */
1783
+ payments: Payment[];
1784
+ }
1785
+ export interface AddPaymentsResponse {
1786
+ /** Order ID and its associated transactions. */
1787
+ orderTransactions?: OrderTransactions;
1788
+ /** IDs of added order payments. */
1789
+ paymentsIds?: string[];
1790
+ }
1791
+ export interface AddRefundRequest {
1792
+ /**
1793
+ * Order ID this refunds related to
1794
+ * @minLength 1
1795
+ * @maxLength 100
1796
+ */
1797
+ orderId?: string;
1798
+ /** Refund with refund transactions to be added to order. */
1799
+ refund?: Refund;
1800
+ /** Side effect details related to refund */
1801
+ sideEffects?: RefundSideEffects;
1802
+ }
1803
+ export interface AddRefundResponse {
1804
+ /** Order ID and its associated transactions. */
1805
+ orderTransactions?: OrderTransactions;
1806
+ /** Created refund ID */
1807
+ refundId?: string;
1808
+ }
1809
+ export interface UpdatePaymentStatusRequest {
1810
+ /**
1811
+ * Order ID.
1812
+ * @format GUID
1813
+ */
1814
+ orderId: string;
1815
+ /**
1816
+ * Payment ID.
1817
+ * @format GUID
1818
+ */
1819
+ paymentId: string;
1820
+ /** Payment status. */
1821
+ status?: TransactionStatus;
1822
+ }
1823
+ export interface UpdatePaymentStatusResponse {
1824
+ /** Order ID and its associated transactions after update. */
1825
+ orderTransactions?: OrderTransactions;
1826
+ }
1827
+ export interface BulkUpdatePaymentStatusesRequest {
1828
+ /**
1829
+ * Order and payment IDs for which to update payment status.
1830
+ * @minSize 1
1831
+ * @maxSize 300
1832
+ */
1833
+ paymentAndOrderIds: PaymentAndOrderId[];
1834
+ /** Whether to return the full payment entity (`results.item`) in the response. */
1835
+ returnFullEntity?: boolean;
1836
+ /** Payment status. */
1837
+ status?: TransactionStatus;
1838
+ }
1839
+ export interface PaymentAndOrderId {
1840
+ /**
1841
+ * Order ID.
1842
+ * @format GUID
1843
+ */
1844
+ orderId?: string;
1845
+ /**
1846
+ * Payment ID.
1847
+ * todo: remove comment once UI will use BulkMarkOrderAsPaid
1848
+ */
1849
+ paymentId?: string;
1850
+ }
1851
+ export interface BulkUpdatePaymentStatusesResponse {
1852
+ /** Bulk operation results. */
1853
+ results?: BulkPaymentResult[];
1854
+ /** Bulk operation metadata. */
1855
+ bulkActionMetadata?: BulkActionMetadata;
1856
+ }
1857
+ export interface BulkPaymentResult {
1858
+ /** Item metadata. */
1859
+ itemMetadata?: ItemMetadata;
1860
+ /** Updated payment. Returned if `return_full_entity` set to `true`. */
1861
+ item?: Payment;
1862
+ }
1863
+ export interface ItemMetadata {
1864
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
1865
+ _id?: string | null;
1866
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
1867
+ originalIndex?: number;
1868
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
1869
+ success?: boolean;
1870
+ /** Details about the error in case of failure. */
1871
+ error?: ApplicationError;
1872
+ }
1873
+ export interface ApplicationError {
1874
+ /** Error code. */
1875
+ code?: string;
1876
+ /** Description of the error. */
1877
+ description?: string;
1878
+ /** Data related to the error. */
1879
+ data?: Record<string, any> | null;
1880
+ }
1881
+ export interface BulkActionMetadata {
1882
+ /** Number of items that were successfully processed. */
1883
+ totalSuccesses?: number;
1884
+ /** Number of items that couldn't be processed. */
1885
+ totalFailures?: number;
1886
+ /** Number of failures without details because detailed failure threshold was exceeded. */
1887
+ undetailedFailures?: number;
1888
+ }
1889
+ export interface UpdateRefundRequest {
1890
+ /**
1891
+ * Order ID.
1892
+ * @format GUID
1893
+ */
1894
+ orderId?: string;
1895
+ /** Refund with updated field values. */
1896
+ refund?: Refund;
1897
+ }
1898
+ export interface UpdateRefundResponse {
1899
+ /** Refund after update. */
1900
+ refund?: Refund;
1901
+ /** Order transactions after update. */
1902
+ orderTransactions?: OrderTransactions;
1903
+ }
1904
+ export interface UpdateRefundTransactionRequest {
1905
+ /**
1906
+ * Order ID.
1907
+ * @internal
1908
+ * @format GUID
1909
+ */
1910
+ orderId: string;
1911
+ /**
1912
+ * Payment ID.
1913
+ * @internal
1914
+ * @format GUID
1915
+ */
1916
+ refundId: string;
1917
+ /**
1918
+ * Updated refund transaction
1919
+ * @internal
1920
+ */
1921
+ transaction: RefundTransaction;
1922
+ }
1923
+ export interface UpdateRefundTransactionResponse {
1924
+ /**
1925
+ * OrderTransactions with updated refund transaction
1926
+ * @internal
1927
+ */
1928
+ orderTransactions?: OrderTransactions;
1929
+ }
1930
+ export interface UpdatePaymentsRequest {
1931
+ }
1932
+ export interface MaskedPayment {
1933
+ }
1934
+ export interface UpdatePaymentsResponse {
1935
+ /**
1936
+ * OrderTransactions with updated payments
1937
+ * @internal
1938
+ */
1939
+ orderTransactions?: OrderTransactions;
1940
+ }
1941
+ export interface QueryOrderTransactionsRequest {
1942
+ /**
1943
+ * Query options.
1944
+ * @internal
1945
+ */
1946
+ query?: CursorQuery;
1947
+ }
1948
+ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
1949
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
1950
+ cursorPaging?: CursorPaging;
1951
+ /** A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf) */
1952
+ filter?: Record<string, any> | null;
1953
+ /**
1954
+ * Sort object in the following format:
1955
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
1956
+ * @maxSize 5
1957
+ */
1958
+ sort?: Sorting[];
1959
+ }
1960
+ /** @oneof */
1961
+ export interface CursorQueryPagingMethodOneOf {
1962
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
1963
+ cursorPaging?: CursorPaging;
1964
+ }
1965
+ export interface Sorting {
1966
+ /**
1967
+ * Name of the field to sort by.
1968
+ * @maxLength 512
1969
+ */
1970
+ fieldName?: string;
1971
+ /** Sort order. */
1972
+ order?: SortOrder;
1973
+ }
1974
+ export declare enum SortOrder {
1975
+ /** Ascending order. */
1976
+ ASC = "ASC",
1977
+ /** Descending order. */
1978
+ DESC = "DESC"
1979
+ }
1980
+ export interface CursorPaging {
1981
+ /**
1982
+ * Maximum number of items to return in the results.
1983
+ * @max 100
1984
+ */
1985
+ limit?: number | null;
1986
+ /**
1987
+ * Pointer to the next or previous page in the list of results.
1988
+ *
1989
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
1990
+ * Not relevant for the first request.
1991
+ * @maxLength 16000
1992
+ */
1993
+ cursor?: string | null;
1994
+ }
1995
+ export interface QueryOrderTransactionsResponse {
1996
+ /**
1997
+ * Order transactions.
1998
+ * @internal
1999
+ * @maxSize 100
2000
+ */
2001
+ orderTransactions?: OrderTransactions[];
2002
+ /**
2003
+ * Details on the paged set of results returned.
2004
+ * @internal
2005
+ */
2006
+ metadata?: CursorPagingMetadata;
2007
+ }
2008
+ export interface CursorPagingMetadata {
2009
+ /** Number of items returned in the response. */
2010
+ count?: number | null;
2011
+ /** Cursor strings that point to the next page, previous page, or both. */
2012
+ cursors?: Cursors;
2013
+ /**
2014
+ * Whether there are more pages to retrieve following the current page.
2015
+ *
2016
+ * + `true`: Another page of results can be retrieved.
2017
+ * + `false`: This is the last page.
2018
+ */
2019
+ hasNext?: boolean | null;
2020
+ }
2021
+ export interface Cursors {
2022
+ /**
2023
+ * Cursor string pointing to the next page in the list of results.
2024
+ * @maxLength 16000
2025
+ */
2026
+ next?: string | null;
2027
+ /**
2028
+ * Cursor pointing to the previous page in the list of results.
2029
+ * @maxLength 16000
2030
+ */
2031
+ prev?: string | null;
2032
+ }
2033
+ export interface TriggerRefundRequest {
2034
+ /**
2035
+ * The order this refund related to
2036
+ * @minLength 1
2037
+ * @maxLength 100
2038
+ */
2039
+ orderId?: string;
2040
+ /**
2041
+ * Refund operations information
2042
+ * Currently, only *one* payment refund is supported per request
2043
+ * @minSize 1
2044
+ * @maxSize 1
2045
+ */
2046
+ payments?: PaymentRefund[];
2047
+ /** Business model of a refund */
2048
+ details?: RefundDetails;
2049
+ /** How to restock items as part of this refund */
2050
+ restockInfo?: RestockInfo;
2051
+ /** Should send a confirmation mail to the customer */
2052
+ sendOrderRefundedEmail?: boolean;
2053
+ /**
2054
+ * Personal note added to the email
2055
+ * @minLength 1
2056
+ * @maxLength 1000
2057
+ */
2058
+ customMessage?: string | null;
2059
+ }
2060
+ export interface PaymentRefund {
2061
+ /**
2062
+ * Specific payment within the order to refund
2063
+ * @format GUID
2064
+ */
2065
+ paymentId?: string;
2066
+ /** Refund amount. Not relevant for membership and gift card refunds. */
2067
+ amount?: Price;
2068
+ /**
2069
+ * Whether refund is made externally and manually (on the payment provider's side)
2070
+ * When false (default), the payment gateway will be called in order to make an actual refund, and then the payment will be marked as refunded.
2071
+ * When true, the payment will only be *marked* as refunded, and no actual refund will be performed.
2072
+ */
2073
+ externalRefund?: boolean;
2074
+ }
2075
+ export interface TriggerRefundResponse {
2076
+ /** All order's transactions after the refunds were added */
2077
+ orderTransactions?: OrderTransactions;
2078
+ /** Created refund ID */
2079
+ refundId?: string;
2080
+ }
2081
+ export interface CalculateRefundRequest {
2082
+ /**
2083
+ * Order ID
2084
+ * @minLength 1
2085
+ * @maxLength 100
2086
+ */
2087
+ orderId?: string;
2088
+ /**
2089
+ * Refunded line items and quantity
2090
+ * @maxSize 300
2091
+ */
2092
+ refundItems?: CalculateRefundItemRequest[];
2093
+ /** Should include shipping in refund calculation */
2094
+ refundShipping?: boolean;
2095
+ }
2096
+ export interface CalculateRefundItemRequest {
2097
+ /**
2098
+ * ID of the line item being refunded
2099
+ * @format GUID
2100
+ */
2101
+ lineItemId?: string;
2102
+ /**
2103
+ * How much of that line item is being refunded
2104
+ * @min 1
2105
+ * @max 100000
2106
+ */
2107
+ quantity?: number;
2108
+ /** Should this item be restocked (used for validation purposes) */
2109
+ restock?: boolean;
2110
+ }
2111
+ export interface CalculateRefundResponse {
2112
+ /**
2113
+ * Total refundable amount
2114
+ * @format DECIMAL_VALUE
2115
+ */
2116
+ total?: string;
2117
+ /**
2118
+ * Tax cost of the order
2119
+ * @format DECIMAL_VALUE
2120
+ */
2121
+ tax?: string;
2122
+ /**
2123
+ * Discount given for this order
2124
+ * @format DECIMAL_VALUE
2125
+ */
2126
+ discount?: string;
2127
+ /**
2128
+ * Total cost of the order (without tax)
2129
+ * @format DECIMAL_VALUE
2130
+ */
2131
+ subtotal?: string;
2132
+ /**
2133
+ * Previous refund given on that order
2134
+ * @format DECIMAL_VALUE
2135
+ */
2136
+ previouslyRefundedAmount?: string | null;
2137
+ /** The refundable items of that order */
2138
+ items?: CalculateRefundItemResponse[];
2139
+ }
2140
+ export interface CalculateRefundItemResponse {
2141
+ /** Line item ID */
2142
+ lineItemId?: string;
2143
+ /** The line item's price */
2144
+ lineItemPrice?: number;
2145
+ }
2146
+ export interface GetRefundabilityStatusRequest {
2147
+ /**
2148
+ * Order ID.
2149
+ * @minLength 1
2150
+ * @maxLength 100
2151
+ */
2152
+ orderId?: string;
2153
+ }
2154
+ export interface GetRefundabilityStatusResponse {
2155
+ /**
2156
+ * Refundability details.
2157
+ * @maxSize 1
2158
+ */
2159
+ refundabilities?: Refundability[];
2160
+ /** Whether the order supports refunding per item. */
2161
+ refundablePerItem?: boolean;
2162
+ }
2163
+ export interface Refundability extends RefundabilityAdditionalRefundabilityInfoOneOf {
2164
+ /** Reason why payment is not refundable. */
2165
+ nonRefundableReason?: NonRefundableReason;
2166
+ /** Reason why payment is only refundable manually. */
2167
+ manuallyRefundableReason?: ManuallyRefundableReason;
2168
+ /** Payment ID. */
2169
+ paymentId?: string;
2170
+ /** Payment refundability status. */
2171
+ refundabilityStatus?: RefundableStatus;
2172
+ /** Link to payment provider dashboard. */
2173
+ providerLink?: string | null;
2174
+ }
2175
+ /** @oneof */
2176
+ export interface RefundabilityAdditionalRefundabilityInfoOneOf {
2177
+ /** Reason why payment is not refundable. */
2178
+ nonRefundableReason?: NonRefundableReason;
2179
+ /** Reason why payment is only refundable manually. */
2180
+ manuallyRefundableReason?: ManuallyRefundableReason;
2181
+ }
2182
+ export declare enum RefundableStatus {
2183
+ /** Not refundable. */
2184
+ NOT_REFUNDABLE = "NOT_REFUNDABLE",
2185
+ /** Refundable manually. */
2186
+ MANUAL = "MANUAL",
2187
+ /** Refundable. */
2188
+ REFUNDABLE = "REFUNDABLE"
2189
+ }
2190
+ export declare enum NonRefundableReason {
2191
+ /** No reason. */
2192
+ NONE = "NONE",
2193
+ /** Payment already refunded. */
2194
+ ALREADY_REFUNDED = "ALREADY_REFUNDED",
2195
+ /** Payment provider is down. */
2196
+ PROVIDER_IS_DOWN = "PROVIDER_IS_DOWN",
2197
+ /** Internal error occurred. */
2198
+ INTERNAL_ERROR = "INTERNAL_ERROR",
2199
+ /** Payment not made. */
2200
+ NOT_PAID = "NOT_PAID",
2201
+ /** Access denied. */
2202
+ ACCESS_DENIED = "ACCESS_DENIED",
2203
+ /** Payment amount is zero. */
2204
+ ZERO_PRICE = "ZERO_PRICE",
2205
+ /** Disabled by provider. */
2206
+ DISABLED_BY_PROVIDER = "DISABLED_BY_PROVIDER",
2207
+ /** Payment partially paid. */
2208
+ PARTIALLY_PAID = "PARTIALLY_PAID",
2209
+ /** Deposit for online item. */
2210
+ DEPOSIT_ONLINE_ITEM = "DEPOSIT_ONLINE_ITEM",
2211
+ /** Refund is pending. */
2212
+ PENDING_REFUND = "PENDING_REFUND",
2213
+ /** Action forbidden. */
2214
+ FORBIDDEN = "FORBIDDEN"
2215
+ }
2216
+ export declare enum ManuallyRefundableReason {
2217
+ /** Payment expired. */
2218
+ EXPIRED = "EXPIRED",
2219
+ /** Payment method not supported. */
2220
+ NOT_SUPPORTED = "NOT_SUPPORTED",
2221
+ /** Payment not found. */
2222
+ NOT_FOUND = "NOT_FOUND",
2223
+ /** Payment made offline. */
2224
+ OFFLINE = "OFFLINE",
2225
+ /** Refund requires interaction with card reader. */
2226
+ REQUIRES_CARD_READER = "REQUIRES_CARD_READER"
2227
+ }
2228
+ export interface ListInvoicesForSingleOrderRequest {
2229
+ /**
2230
+ * Order ID.
2231
+ * @minLength 1
2232
+ * @maxLength 100
2233
+ */
2234
+ orderId?: string;
2235
+ }
2236
+ export interface ListInvoicesForSingleOrderResponse {
2237
+ /** List of invoices. */
2238
+ invoices?: InvoiceInfo[];
2239
+ }
2240
+ export interface InvoiceInfo {
2241
+ /** Invoice ID. */
2242
+ _id?: string;
2243
+ /** ID of the app that set the invoice. */
2244
+ appId?: string;
2245
+ /**
2246
+ * Invoice URL.
2247
+ * @deprecated
2248
+ */
2249
+ url?: string | null;
2250
+ /**
2251
+ * Invoice creation date and time.
2252
+ * @deprecated
2253
+ */
2254
+ _createdDate?: Date | null;
2255
+ }
2256
+ export interface ListInvoicesForMultipleOrdersRequest {
2257
+ /**
2258
+ * Order IDs for which to retrieve invoices.
2259
+ * @maxSize 300
2260
+ * @minLength 1
2261
+ * @maxLength 100
2262
+ */
2263
+ orderIds?: string[];
2264
+ }
2265
+ export interface ListInvoicesForMultipleOrdersResponse {
2266
+ /** List of order IDs and their associated invoices. */
2267
+ invoicesForOrder?: InvoicesForOrder[];
2268
+ }
2269
+ export interface InvoicesForOrder {
2270
+ /** Order ID. */
2271
+ orderId?: string;
2272
+ /** Invoices info. */
2273
+ invoicesInfo?: InvoiceInfo[];
2274
+ }
2275
+ export interface GenerateInvoiceRequest {
2276
+ /**
2277
+ * Order ID.
2278
+ * @minLength 1
2279
+ * @maxLength 100
2280
+ */
2281
+ orderId?: string;
2282
+ }
2283
+ export interface GenerateInvoiceResponse {
2284
+ /** Invoice ID. */
2285
+ invoiceId?: string;
2286
+ }
2287
+ export interface BulkGenerateInvoicesRequest {
2288
+ /**
2289
+ * Order IDs.
2290
+ * @minSize 1
2291
+ * @maxSize 100
2292
+ * @minLength 1
2293
+ * @maxLength 100
2294
+ */
2295
+ orderIds?: string[];
2296
+ }
2297
+ export interface BulkGenerateInvoicesResponse {
2298
+ results?: BulkInvoiceResult[];
2299
+ bulkActionMetadata?: BulkActionMetadata;
2300
+ }
2301
+ export interface BulkInvoiceResult {
2302
+ itemMetadata?: ItemMetadata;
2303
+ item?: InvoiceForOrder;
2304
+ }
2305
+ export interface InvoiceForOrder {
2306
+ /** Order ID. */
2307
+ orderId?: string;
2308
+ /** Invoice ID. */
2309
+ invoiceId?: string;
2310
+ }
2311
+ export interface AddInvoiceToOrderRequest {
2312
+ /**
2313
+ * Order ID.
2314
+ * @minLength 1
2315
+ * @maxLength 100
2316
+ */
2317
+ orderId?: string;
2318
+ /** Invoice info. */
2319
+ invoiceInfo?: InvoiceInfo;
2320
+ }
2321
+ export interface AddInvoiceToOrderResponse {
2322
+ /** List of order invoices. */
2323
+ orderInvoices?: InvoiceInfo[];
2324
+ }
2325
+ export interface DomainEvent extends DomainEventBodyOneOf {
2326
+ createdEvent?: EntityCreatedEvent;
2327
+ updatedEvent?: EntityUpdatedEvent;
2328
+ deletedEvent?: EntityDeletedEvent;
2329
+ actionEvent?: ActionEvent;
2330
+ /**
2331
+ * Unique event ID.
2332
+ * Allows clients to ignore duplicate webhooks.
2333
+ */
2334
+ _id?: string;
2335
+ /**
2336
+ * Assumes actions are also always typed to an entity_type
2337
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
2338
+ */
2339
+ entityFqdn?: string;
2340
+ /**
2341
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
2342
+ * This is although the created/updated/deleted notion is duplication of the oneof types
2343
+ * Example: created/updated/deleted/started/completed/email_opened
2344
+ */
2345
+ slug?: string;
2346
+ /** ID of the entity associated with the event. */
2347
+ entityId?: string;
2348
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
2349
+ eventTime?: Date | null;
2350
+ /**
2351
+ * Whether the event was triggered as a result of a privacy regulation application
2352
+ * (for example, GDPR).
2353
+ */
2354
+ triggeredByAnonymizeRequest?: boolean | null;
2355
+ /** If present, indicates the action that triggered the event. */
2356
+ originatedFrom?: string | null;
2357
+ /**
2358
+ * A sequence number defining the order of updates to the underlying entity.
2359
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
2360
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
2361
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
2362
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
2363
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
2364
+ */
2365
+ entityEventSequence?: string | null;
2366
+ }
2367
+ /** @oneof */
2368
+ export interface DomainEventBodyOneOf {
2369
+ createdEvent?: EntityCreatedEvent;
2370
+ updatedEvent?: EntityUpdatedEvent;
2371
+ deletedEvent?: EntityDeletedEvent;
2372
+ actionEvent?: ActionEvent;
2373
+ }
2374
+ export interface EntityCreatedEvent {
2375
+ entity?: string;
2376
+ }
2377
+ export interface RestoreInfo {
2378
+ deletedDate?: Date | null;
2379
+ }
2380
+ export interface EntityUpdatedEvent {
2381
+ /**
2382
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
2383
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
2384
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
2385
+ */
2386
+ currentEntity?: string;
2387
+ }
2388
+ export interface EntityDeletedEvent {
2389
+ /** Entity that was deleted */
2390
+ deletedEntity?: string | null;
2391
+ }
2392
+ export interface ActionEvent {
2393
+ body?: string;
2394
+ }
2395
+ export interface MessageEnvelope {
2396
+ /**
2397
+ * App instance ID.
2398
+ * @format GUID
2399
+ */
2400
+ instanceId?: string | null;
2401
+ /**
2402
+ * Event type.
2403
+ * @maxLength 150
2404
+ */
2405
+ eventType?: string;
2406
+ /** The identification type and identity data. */
2407
+ identity?: IdentificationData;
2408
+ /** Stringify payload. */
2409
+ data?: string;
2410
+ }
2411
+ export interface IdentificationData extends IdentificationDataIdOneOf {
2412
+ /**
2413
+ * ID of a site visitor that has not logged in to the site.
2414
+ * @format GUID
2415
+ */
2416
+ anonymousVisitorId?: string;
2417
+ /**
2418
+ * ID of a site visitor that has logged in to the site.
2419
+ * @format GUID
2420
+ */
2421
+ memberId?: string;
2422
+ /**
2423
+ * ID of a Wix user (site owner, contributor, etc.).
2424
+ * @format GUID
2425
+ */
2426
+ wixUserId?: string;
2427
+ /**
2428
+ * ID of an app.
2429
+ * @format GUID
2430
+ */
2431
+ appId?: string;
2432
+ /** @readonly */
2433
+ identityType?: WebhookIdentityType;
2434
+ }
2435
+ /** @oneof */
2436
+ export interface IdentificationDataIdOneOf {
2437
+ /**
2438
+ * ID of a site visitor that has not logged in to the site.
2439
+ * @format GUID
2440
+ */
2441
+ anonymousVisitorId?: string;
2442
+ /**
2443
+ * ID of a site visitor that has logged in to the site.
2444
+ * @format GUID
2445
+ */
2446
+ memberId?: string;
2447
+ /**
2448
+ * ID of a Wix user (site owner, contributor, etc.).
2449
+ * @format GUID
2450
+ */
2451
+ wixUserId?: string;
2452
+ /**
2453
+ * ID of an app.
2454
+ * @format GUID
2455
+ */
2456
+ appId?: string;
2457
+ }
2458
+ export declare enum WebhookIdentityType {
2459
+ UNKNOWN = "UNKNOWN",
2460
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
2461
+ MEMBER = "MEMBER",
2462
+ WIX_USER = "WIX_USER",
2463
+ APP = "APP"
2464
+ }
2465
+ type OrderTransactionsNonNullablePaths = `orderId` | `payments` | `payments.${number}.regularPaymentDetails.offlinePayment` | `payments.${number}.regularPaymentDetails.status` | `payments.${number}.regularPaymentDetails.savedPaymentMethod` | `payments.${number}.regularPaymentDetails.authorizationDetails.delayedCapture` | `payments.${number}.regularPaymentDetails.authorizationDetails.captures` | `payments.${number}.regularPaymentDetails.authorizationDetails.captures.${number}.status` | `payments.${number}.regularPaymentDetails.authorizationDetails.captures.${number}.amount.amount` | `payments.${number}.regularPaymentDetails.authorizationDetails.captures.${number}.amount.formattedAmount` | `payments.${number}.regularPaymentDetails.authorizationDetails.captures.${number}.failureDetails.failureCode` | `payments.${number}.regularPaymentDetails.authorizationDetails.void.status` | `payments.${number}.regularPaymentDetails.authorizationDetails.void.reason` | `payments.${number}.regularPaymentDetails.authorizationDetails.scheduledAction.actionType` | `payments.${number}.giftcardPaymentDetails.giftCardPaymentId` | `payments.${number}.giftcardPaymentDetails.appId` | `payments.${number}.giftcardPaymentDetails.voided` | `payments.${number}.refundDisabled` | `refunds` | `refunds.${number}._id` | `refunds.${number}.transactions` | `refunds.${number}.transactions.${number}.paymentId` | `refunds.${number}.transactions.${number}.amount.amount` | `refunds.${number}.transactions.${number}.amount.formattedAmount` | `refunds.${number}.transactions.${number}.refundStatus` | `refunds.${number}.transactions.${number}.externalRefund` | `refunds.${number}.details.items` | `refunds.${number}.details.items.${number}.lineItemId` | `refunds.${number}.details.items.${number}.quantity` | `refunds.${number}.details.shippingIncluded` | `refunds.${number}.details.lineItems` | `refunds.${number}.details.lineItems.${number}.lineItemId` | `refunds.${number}.details.lineItems.${number}.quantity` | `refunds.${number}.details.additionalFees` | `refunds.${number}.details.additionalFees.${number}.additionalFeeId` | `refunds.${number}.summary.pending` | `refunds.${number}.summary.breakdown.lineItems` | `refunds.${number}.summary.breakdown.lineItems.${number}.lineItemId`;
2466
+ /**
2467
+ * Retrieves information about payments and refunds associated with a specified order.
2468
+ *
2469
+ *
2470
+ * The `listTransactionsForSingleOrder()` function returns a Promise that resolves when the specified order's transaction records are retrieved.
2471
+ * @param orderId - Order ID.
2472
+ * @public
2473
+ * @requiredField orderId
2474
+ * @permissionId ECOM.READ_TRANSACTIONS
2475
+ * @permissionScope Manage Stores - all permissions
2476
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2477
+ * @permissionScope Read eCommerce - all read permissions
2478
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
2479
+ * @permissionScope Read Orders
2480
+ * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
2481
+ * @permissionScope Read Stores - all read permissions
2482
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
2483
+ * @permissionScope Manage Restaurants - all permissions
2484
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2485
+ * @permissionScope Manage eCommerce - all permissions
2486
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2487
+ * @permissionScope Manage Orders
2488
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
2489
+ * @applicableIdentity APP
2490
+ * @fqn com.wix.ecom.orders.payments.v1.Payments.ListTransactionsForSingleOrder
2491
+ */
2492
+ export declare function listTransactionsForSingleOrder(orderId: string): Promise<NonNullablePaths<ListTransactionsForSingleOrderResponse, {
2493
+ [P in OrderTransactionsNonNullablePaths]: `orderTransactions.${P}`;
2494
+ }[OrderTransactionsNonNullablePaths]>>;
2495
+ /**
2496
+ * Retrieves information about payments and refunds associated with all specified orders.
2497
+ *
2498
+ *
2499
+ * The `listTransactionsForMultipleOrders()` function returns a Promise that resolves when the specified orders' transaction records are retrieved.
2500
+ * @param orderIds - Order IDs for which to retrieve transactions.
2501
+ * @public
2502
+ * @requiredField orderIds
2503
+ * @permissionId ECOM.READ_TRANSACTIONS
2504
+ * @permissionScope Manage Stores - all permissions
2505
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2506
+ * @permissionScope Read eCommerce - all read permissions
2507
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
2508
+ * @permissionScope Read Orders
2509
+ * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
2510
+ * @permissionScope Read Stores - all read permissions
2511
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
2512
+ * @permissionScope Manage Restaurants - all permissions
2513
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2514
+ * @permissionScope Manage eCommerce - all permissions
2515
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2516
+ * @permissionScope Manage Orders
2517
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
2518
+ * @applicableIdentity APP
2519
+ * @fqn com.wix.ecom.orders.payments.v1.Payments.ListTransactionsForMultipleOrders
2520
+ */
2521
+ export declare function listTransactionsForMultipleOrders(orderIds: string[]): Promise<NonNullablePaths<ListTransactionsForMultipleOrdersResponse, {
2522
+ [P in OrderTransactionsNonNullablePaths]: `orderTransactions.${number}.${P}`;
2523
+ }[OrderTransactionsNonNullablePaths]>>;
2524
+ /**
2525
+ * Adds up to 50 payment records to an order.
2526
+ *
2527
+ *
2528
+ * The `addPayments()` function returns a Promise that resolves when the payment records are added to an order.
2529
+ *
2530
+ * > **Note:** This does **NOT** perform the actual charging - the order is only updated with records of the payments.
2531
+ * @param orderId - Order ID.
2532
+ * @param payments - Payments to be added to order.
2533
+ * @public
2534
+ * @requiredField orderId
2535
+ * @requiredField payments
2536
+ * @requiredField payments.amount
2537
+ * @requiredField payments.paymentDetails
2538
+ * @requiredField payments.paymentDetails.giftcardPaymentDetails.giftCardPaymentId
2539
+ * @permissionId ECOM.MODIFY_TRANSACTIONS
2540
+ * @permissionScope Manage Stores - all permissions
2541
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2542
+ * @permissionScope Manage Restaurants - all permissions
2543
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2544
+ * @permissionScope Manage eCommerce - all permissions
2545
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2546
+ * @permissionScope Manage Orders
2547
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
2548
+ * @applicableIdentity APP
2549
+ * @fqn com.wix.ecom.orders.payments.v1.Payments.AddPayments
2550
+ */
2551
+ export declare function addPayments(orderId: string, payments: NonNullablePaths<Payment, `amount` | `giftcardPaymentDetails.giftCardPaymentId`>[]): Promise<NonNullablePaths<AddPaymentsResponse, {
2552
+ [P in OrderTransactionsNonNullablePaths]: `orderTransactions.${P}`;
2553
+ }[OrderTransactionsNonNullablePaths] | `paymentsIds`>>;
2554
+ /**
2555
+ * Updates the status of an order's payment.
2556
+ *
2557
+ *
2558
+ * The `updatePaymentStatus()` function returns a Promise that resolves when the payment status is updated.
2559
+ * @public
2560
+ * @requiredField identifiers
2561
+ * @requiredField identifiers.orderId
2562
+ * @requiredField identifiers.paymentId
2563
+ * @permissionId ECOM.MODIFY_TRANSACTIONS
2564
+ * @permissionScope Manage Stores - all permissions
2565
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2566
+ * @permissionScope Manage Restaurants - all permissions
2567
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2568
+ * @permissionScope Manage eCommerce - all permissions
2569
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2570
+ * @permissionScope Manage Orders
2571
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
2572
+ * @applicableIdentity APP
2573
+ * @fqn com.wix.ecom.orders.payments.v1.Payments.UpdatePaymentStatus
2574
+ */
2575
+ export declare function updatePaymentStatus(identifiers: NonNullablePaths<UpdatePaymentStatusIdentifiers, `orderId` | `paymentId`>, options?: UpdatePaymentStatusOptions): Promise<NonNullablePaths<UpdatePaymentStatusResponse, {
2576
+ [P in OrderTransactionsNonNullablePaths]: `orderTransactions.${P}`;
2577
+ }[OrderTransactionsNonNullablePaths]>>;
2578
+ export interface UpdatePaymentStatusIdentifiers {
2579
+ /**
2580
+ * Payment ID.
2581
+ * @format GUID
2582
+ */
2583
+ paymentId: string;
2584
+ /**
2585
+ * Order ID.
2586
+ * @format GUID
2587
+ */
2588
+ orderId: string;
2589
+ }
2590
+ export interface UpdatePaymentStatusOptions {
2591
+ /** Payment status. */
2592
+ status?: TransactionStatus;
2593
+ }
2594
+ /**
2595
+ * Updates multiple order payments with a specified status.
2596
+ *
2597
+ *
2598
+ * The `bulkUpdatePaymentStatus()` function returns a Promise that resolves when the payment statuses are updated.
2599
+ * @param paymentAndOrderIds - Order and payment IDs for which to update payment status.
2600
+ * @public
2601
+ * @requiredField paymentAndOrderIds
2602
+ * @permissionId ECOM.MODIFY_TRANSACTIONS
2603
+ * @permissionScope Manage Stores - all permissions
2604
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2605
+ * @permissionScope Manage Restaurants - all permissions
2606
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2607
+ * @permissionScope Manage eCommerce - all permissions
2608
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2609
+ * @permissionScope Manage Orders
2610
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
2611
+ * @applicableIdentity APP
2612
+ * @fqn com.wix.ecom.orders.payments.v1.Payments.BulkUpdatePaymentStatuses
2613
+ */
2614
+ export declare function bulkUpdatePaymentStatuses(paymentAndOrderIds: PaymentAndOrderId[], options?: BulkUpdatePaymentStatusesOptions): Promise<NonNullablePaths<BulkUpdatePaymentStatusesResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.regularPaymentDetails.offlinePayment` | `results.${number}.item.regularPaymentDetails.status` | `results.${number}.item.regularPaymentDetails.savedPaymentMethod` | `results.${number}.item.regularPaymentDetails.authorizationDetails.delayedCapture` | `results.${number}.item.regularPaymentDetails.authorizationDetails.captures` | `results.${number}.item.regularPaymentDetails.authorizationDetails.captures.${number}.status` | `results.${number}.item.regularPaymentDetails.authorizationDetails.captures.${number}.amount.amount` | `results.${number}.item.regularPaymentDetails.authorizationDetails.captures.${number}.amount.formattedAmount` | `results.${number}.item.regularPaymentDetails.authorizationDetails.captures.${number}.failureDetails.failureCode` | `results.${number}.item.regularPaymentDetails.authorizationDetails.void.status` | `results.${number}.item.regularPaymentDetails.authorizationDetails.void.reason` | `results.${number}.item.regularPaymentDetails.authorizationDetails.scheduledAction.actionType` | `results.${number}.item.giftcardPaymentDetails.giftCardPaymentId` | `results.${number}.item.giftcardPaymentDetails.appId` | `results.${number}.item.giftcardPaymentDetails.voided` | `results.${number}.item.refundDisabled` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
2615
+ export interface BulkUpdatePaymentStatusesOptions {
2616
+ /** Whether to return the full payment entity (`results.item`) in the response. */
2617
+ returnFullEntity?: boolean;
2618
+ /** Payment status. */
2619
+ status?: TransactionStatus;
2620
+ }
2621
+ /**
2622
+ * Updates OrderTransactions.refunds.transactions properties
2623
+ * @internal
2624
+ * @documentationMaturity preview
2625
+ * @permissionId ECOM.MODIFY_TRANSACTIONS
2626
+ * @permissionScope Manage Stores - all permissions
2627
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2628
+ * @permissionScope Manage Restaurants - all permissions
2629
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2630
+ * @permissionScope Manage eCommerce - all permissions
2631
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2632
+ * @permissionScope Manage Orders
2633
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
2634
+ * @applicableIdentity APP
2635
+ * @fqn com.wix.ecom.orders.payments.v1.Payments.UpdateRefundTransaction
2636
+ */
2637
+ export declare function updateRefundTransaction(): Promise<void>;
2638
+ /**
2639
+ * Updates properties of payments associated to order.
2640
+ *
2641
+ * Currently, the following fields can be updated:
2642
+ * + `payment.payment_details.regular_payment_details.provider_transaction_id`
2643
+ * + `payment.payment_details.regular_payment_details.status`
2644
+ * + `payment.payment_details.regular_payment_details.payment_method_details.credit_card_details`
2645
+ * + `payment.payment_details.regular_payment_details.authorization_details`
2646
+ * + `payment.payment_details.regular_payment_details.authorization_details.scheduled_action`
2647
+ * + `payment.payment_details.regular_payment_details.authorization_details.authorized_date`
2648
+ * + `payment.payment_details.regular_payment_details.authorization_details.captures`
2649
+ * + `payment.payment_details.regular_payment_details.authorization_details.captures.status`
2650
+ * + `payment.payment_details.regular_payment_details.authorization_details.captures.created_date`
2651
+ * + `payment.payment_details.regular_payment_details.authorization_details.captures.failure_details`
2652
+ * + `payment.payment_details.regular_payment_details.authorization_details.void`
2653
+ * + `payment.payment_details.regular_payment_details.authorization_details.void.status`
2654
+ * + `payment.payment_details.regular_payment_details.authorization_details.void.voided_date`
2655
+ * + `payment.payment_details.regular_payment_details.authorization_details.void.reason`
2656
+ * + `payment.payment_details.regular_payment_details.authorization_details.void.failure_details`
2657
+ * + `payment.receipt_info`
2658
+ * + `payment.receipt_info.wix_receipt`
2659
+ * + `payment.receipt_info.wix_receipt.receipt_id`
2660
+ * + `payment.receipt_info.wix_receipt.display_number`
2661
+ * + `payment.receipt_info.external_receipt`
2662
+ * + `payment.receipt_info.external_receipt.receipt_id`
2663
+ * + `payment.receipt_info.external_receipt.display_number`
2664
+ * + `payment.receipt_info.external_receipt.app_id`
2665
+ *
2666
+ * To update a field's value, include the new value in the `payment` object in the body params.
2667
+ *
2668
+ * > **Note:** Removing fields value results in an error.
2669
+ * @internal
2670
+ * @documentationMaturity preview
2671
+ * @permissionId ECOM.MODIFY_TRANSACTIONS
2672
+ * @permissionScope Manage Stores - all permissions
2673
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
2674
+ * @permissionScope Manage Restaurants - all permissions
2675
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2676
+ * @permissionScope Manage eCommerce - all permissions
2677
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
2678
+ * @permissionScope Manage Orders
2679
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
2680
+ * @applicableIdentity APP
2681
+ * @fqn com.wix.ecom.orders.payments.v1.Payments.UpdatePayments
2682
+ */
2683
+ export declare function updatePayments(): Promise<void>;
2684
+ export {};