@wix/auto_sdk_ecom_order-transactions 1.0.19 → 1.0.21

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/src/ecom-v1-order-transactions-order-transactions.types.d.ts → ecom-v1-order-transactions-order-transactions.universal-DRvhf2o2.d.mts} +246 -224
  2. package/build/{internal/cjs/src/ecom-v1-order-transactions-order-transactions.types.d.ts → ecom-v1-order-transactions-order-transactions.universal-DRvhf2o2.d.ts} +246 -224
  3. package/build/index.d.mts +69 -0
  4. package/build/index.d.ts +69 -0
  5. package/build/index.js +942 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +887 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/{es/src/ecom-v1-order-transactions-order-transactions.types.d.ts → internal/ecom-v1-order-transactions-order-transactions.universal-aENRFMbJ.d.mts} +330 -224
  10. package/build/internal/{es/src/ecom-v1-order-transactions-order-transactions.types.d.ts → ecom-v1-order-transactions-order-transactions.universal-aENRFMbJ.d.ts} +330 -224
  11. package/build/internal/index.d.mts +118 -0
  12. package/build/internal/index.d.ts +118 -0
  13. package/build/internal/index.js +942 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +887 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/internal/meta.d.mts +614 -0
  18. package/build/internal/meta.d.ts +614 -0
  19. package/build/internal/meta.js +566 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +533 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/meta.d.mts +614 -0
  24. package/build/meta.d.ts +614 -0
  25. package/build/meta.js +566 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +533 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +13 -12
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.context.d.ts +0 -9
  40. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.context.js +0 -41
  41. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.context.js.map +0 -1
  42. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.http.d.ts +0 -73
  43. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.http.js +0 -466
  44. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.http.js.map +0 -1
  45. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.meta.d.ts +0 -30
  46. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.meta.js +0 -161
  47. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.meta.js.map +0 -1
  48. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.public.d.ts +0 -63
  49. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.public.js +0 -76
  50. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.public.js.map +0 -1
  51. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.types.js +0 -303
  52. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.types.js.map +0 -1
  53. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.universal.d.ts +0 -2589
  54. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.universal.js +0 -695
  55. package/build/cjs/src/ecom-v1-order-transactions-order-transactions.universal.js.map +0 -1
  56. package/build/es/index.d.ts +0 -1
  57. package/build/es/index.js +0 -2
  58. package/build/es/index.js.map +0 -1
  59. package/build/es/index.typings.d.ts +0 -1
  60. package/build/es/index.typings.js +0 -2
  61. package/build/es/index.typings.js.map +0 -1
  62. package/build/es/meta.d.ts +0 -1
  63. package/build/es/meta.js +0 -2
  64. package/build/es/meta.js.map +0 -1
  65. package/build/es/package.json +0 -3
  66. package/build/es/src/ecom-v1-order-transactions-order-transactions.context.d.ts +0 -9
  67. package/build/es/src/ecom-v1-order-transactions-order-transactions.context.js +0 -13
  68. package/build/es/src/ecom-v1-order-transactions-order-transactions.context.js.map +0 -1
  69. package/build/es/src/ecom-v1-order-transactions-order-transactions.http.d.ts +0 -73
  70. package/build/es/src/ecom-v1-order-transactions-order-transactions.http.js +0 -456
  71. package/build/es/src/ecom-v1-order-transactions-order-transactions.http.js.map +0 -1
  72. package/build/es/src/ecom-v1-order-transactions-order-transactions.meta.d.ts +0 -30
  73. package/build/es/src/ecom-v1-order-transactions-order-transactions.meta.js +0 -128
  74. package/build/es/src/ecom-v1-order-transactions-order-transactions.meta.js.map +0 -1
  75. package/build/es/src/ecom-v1-order-transactions-order-transactions.public.d.ts +0 -63
  76. package/build/es/src/ecom-v1-order-transactions-order-transactions.public.js +0 -41
  77. package/build/es/src/ecom-v1-order-transactions-order-transactions.public.js.map +0 -1
  78. package/build/es/src/ecom-v1-order-transactions-order-transactions.types.js +0 -300
  79. package/build/es/src/ecom-v1-order-transactions-order-transactions.types.js.map +0 -1
  80. package/build/es/src/ecom-v1-order-transactions-order-transactions.universal.d.ts +0 -2589
  81. package/build/es/src/ecom-v1-order-transactions-order-transactions.universal.js +0 -662
  82. package/build/es/src/ecom-v1-order-transactions-order-transactions.universal.js.map +0 -1
  83. package/build/internal/cjs/index.d.ts +0 -1
  84. package/build/internal/cjs/index.js +0 -18
  85. package/build/internal/cjs/index.js.map +0 -1
  86. package/build/internal/cjs/index.typings.d.ts +0 -1
  87. package/build/internal/cjs/index.typings.js +0 -18
  88. package/build/internal/cjs/index.typings.js.map +0 -1
  89. package/build/internal/cjs/meta.d.ts +0 -1
  90. package/build/internal/cjs/meta.js +0 -18
  91. package/build/internal/cjs/meta.js.map +0 -1
  92. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.context.d.ts +0 -13
  93. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.context.js +0 -41
  94. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.context.js.map +0 -1
  95. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.http.d.ts +0 -73
  96. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.http.js +0 -466
  97. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.http.js.map +0 -1
  98. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.meta.d.ts +0 -30
  99. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.meta.js +0 -161
  100. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.meta.js.map +0 -1
  101. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.public.d.ts +0 -108
  102. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.public.js +0 -76
  103. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.public.js.map +0 -1
  104. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.types.js +0 -303
  105. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.types.js.map +0 -1
  106. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.universal.d.ts +0 -2740
  107. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.universal.js +0 -695
  108. package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.universal.js.map +0 -1
  109. package/build/internal/es/index.d.ts +0 -1
  110. package/build/internal/es/index.js +0 -2
  111. package/build/internal/es/index.js.map +0 -1
  112. package/build/internal/es/index.typings.d.ts +0 -1
  113. package/build/internal/es/index.typings.js +0 -2
  114. package/build/internal/es/index.typings.js.map +0 -1
  115. package/build/internal/es/meta.d.ts +0 -1
  116. package/build/internal/es/meta.js +0 -2
  117. package/build/internal/es/meta.js.map +0 -1
  118. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.context.d.ts +0 -13
  119. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.context.js +0 -13
  120. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.context.js.map +0 -1
  121. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.http.d.ts +0 -73
  122. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.http.js +0 -456
  123. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.http.js.map +0 -1
  124. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.meta.d.ts +0 -30
  125. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.meta.js +0 -128
  126. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.meta.js.map +0 -1
  127. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.public.d.ts +0 -108
  128. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.public.js +0 -41
  129. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.public.js.map +0 -1
  130. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.types.js +0 -300
  131. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.types.js.map +0 -1
  132. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.universal.d.ts +0 -2740
  133. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.universal.js +0 -662
  134. package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.universal.js.map +0 -1
@@ -0,0 +1,614 @@
1
+ import { aX as ListTransactionsForSingleOrderRequest$1, L as ListTransactionsForSingleOrderResponse$1, aY as ListTransactionsForMultipleOrdersRequest$1, a as ListTransactionsForMultipleOrdersResponse$1, aZ as AddPaymentsRequest$1, A as AddPaymentsResponse$1, b0 as UpdatePaymentStatusRequest$1, c as UpdatePaymentStatusResponse$1, b1 as BulkUpdatePaymentStatusesRequest$1, e as BulkUpdatePaymentStatusesResponse$1, b8 as UpdateRefundTransactionRequest$1, b9 as UpdateRefundTransactionResponse$1, ba as UpdatePaymentsRequest$1, bc as UpdatePaymentsResponse$1 } from './ecom-v1-order-transactions-order-transactions.universal-DRvhf2o2.js';
2
+
3
+ interface OrderTransactions {
4
+ /**
5
+ * Order ID.
6
+ * @format GUID
7
+ */
8
+ orderId?: string;
9
+ /**
10
+ * Record of payments made to the merchant.
11
+ * @maxSize 100
12
+ */
13
+ payments?: Payment[];
14
+ /**
15
+ * Record of refunds made to the buyer.
16
+ * @maxSize 300
17
+ */
18
+ refunds?: Refund[];
19
+ }
20
+ interface Payment extends PaymentPaymentDetailsOneOf, PaymentReceiptInfoOneOf {
21
+ /** Regular payment details. */
22
+ regularPaymentDetails?: RegularPaymentDetails;
23
+ /** Gift card payment details. */
24
+ giftcardPaymentDetails?: GiftCardPaymentDetails;
25
+ /**
26
+ * Payment ID.
27
+ * @format GUID
28
+ * @readonly
29
+ */
30
+ id?: string | null;
31
+ /** 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. */
32
+ createdDate?: Date | null;
33
+ /**
34
+ * Date and time the payment was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
35
+ * @readonly
36
+ */
37
+ updatedDate?: Date | null;
38
+ /** Payment amount. */
39
+ amount?: Price;
40
+ /**
41
+ * Whether refunds for this payment are disabled.
42
+ * + `true`: This payment is not refundable.
43
+ * + `false`: This payment may be refunded. However, this ultimately depends on the payment provider.
44
+ */
45
+ refundDisabled?: boolean;
46
+ }
47
+ /** @oneof */
48
+ interface PaymentPaymentDetailsOneOf {
49
+ /** Regular payment details. */
50
+ regularPaymentDetails?: RegularPaymentDetails;
51
+ /** Gift card payment details. */
52
+ giftcardPaymentDetails?: GiftCardPaymentDetails;
53
+ }
54
+ /** @oneof */
55
+ interface PaymentReceiptInfoOneOf {
56
+ }
57
+ interface RegularPaymentDetails extends RegularPaymentDetailsPaymentMethodDetailsOneOf {
58
+ /** Whether regular card used */
59
+ creditCardDetails?: CreditCardPaymentMethodDetails;
60
+ /**
61
+ * Wix Payments order ID.
62
+ * @maxLength 100
63
+ */
64
+ paymentOrderId?: string | null;
65
+ /**
66
+ * Payment gateway's transaction ID.
67
+ * This field is only returned when the value of `offline_payment` is `false`.
68
+ * @maxLength 100
69
+ */
70
+ gatewayTransactionId?: string | null;
71
+ /**
72
+ * Payment method. Non-exhaustive list of supported values:
73
+ * + `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`
74
+ * @maxLength 100
75
+ */
76
+ paymentMethod?: string | null;
77
+ /**
78
+ * Transaction ID in the payment provider's system. For example, at PayPal, Square, Stripe, etc. Not returned for offline payments.
79
+ * @maxLength 100
80
+ */
81
+ providerTransactionId?: string | null;
82
+ /** Whether the payment was made offline. For example, when using cash or when marked as paid in the Business Manager. */
83
+ offlinePayment?: boolean;
84
+ /** Payment status. */
85
+ status?: TransactionStatusWithLiterals;
86
+ /**
87
+ * Whether there is a payment agreement that allows for future charges.
88
+ * @immutable
89
+ */
90
+ savedPaymentMethod?: boolean;
91
+ /** Authorization details. */
92
+ authorizationDetails?: AuthorizationDetails;
93
+ }
94
+ /** @oneof */
95
+ interface RegularPaymentDetailsPaymentMethodDetailsOneOf {
96
+ /** Whether regular card used */
97
+ creditCardDetails?: CreditCardPaymentMethodDetails;
98
+ }
99
+ declare enum TransactionStatus {
100
+ UNDEFINED = "UNDEFINED",
101
+ APPROVED = "APPROVED",
102
+ PENDING = "PENDING",
103
+ PENDING_MERCHANT = "PENDING_MERCHANT",
104
+ CANCELED = "CANCELED",
105
+ DECLINED = "DECLINED",
106
+ REFUNDED = "REFUNDED",
107
+ PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED",
108
+ AUTHORIZED = "AUTHORIZED",
109
+ VOIDED = "VOIDED"
110
+ }
111
+ /** @enumType */
112
+ type TransactionStatusWithLiterals = TransactionStatus | 'UNDEFINED' | 'APPROVED' | 'PENDING' | 'PENDING_MERCHANT' | 'CANCELED' | 'DECLINED' | 'REFUNDED' | 'PARTIALLY_REFUNDED' | 'AUTHORIZED' | 'VOIDED';
113
+ interface CreditCardPaymentMethodDetails {
114
+ /**
115
+ * The last 4 digits of the card number.
116
+ * @maxLength 4
117
+ */
118
+ lastFourDigits?: string | null;
119
+ /**
120
+ * Card issuer's brand.
121
+ * @maxLength 100
122
+ */
123
+ brand?: string | null;
124
+ }
125
+ interface AuthorizationDetails {
126
+ /**
127
+ * Whether the authorized payment is of a delayed capture.
128
+ * @readonly
129
+ */
130
+ delayedCapture?: boolean;
131
+ /** Date and time the payment was authorized in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */
132
+ authorizedDate?: Date | null;
133
+ /**
134
+ * List of captures associated with payment
135
+ * In case of failed it can be replaced with new one with PENDING or SUCCESS statuses
136
+ * @maxSize 1
137
+ */
138
+ captures?: AuthorizationCapture[];
139
+ /** Void associated with payment */
140
+ void?: AuthorizationVoid;
141
+ /** Scheduled action for this transaction */
142
+ scheduledAction?: ScheduledAction;
143
+ }
144
+ interface AuthorizationCapture {
145
+ /**
146
+ * Capture ID.
147
+ * @format GUID
148
+ * @readonly
149
+ */
150
+ id?: string | null;
151
+ /** Status of this capture action */
152
+ status?: AuthorizationCaptureStatusWithLiterals;
153
+ /**
154
+ * Amount of this capture
155
+ * @immutable
156
+ */
157
+ amount?: Price;
158
+ /** Date and time the capture was initiated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */
159
+ createdDate?: Date | null;
160
+ /** In case of status is FAILED may contain failure details */
161
+ failureDetails?: AuthorizationActionFailureDetails;
162
+ }
163
+ declare enum AuthorizationCaptureStatus {
164
+ UNKNOWN_STATUS = "UNKNOWN_STATUS",
165
+ /** Capture operation still in progress. */
166
+ PENDING = "PENDING",
167
+ /** Capture operation succeeded. */
168
+ SUCCEEDED = "SUCCEEDED",
169
+ /** Capture operation failed. */
170
+ FAILED = "FAILED"
171
+ }
172
+ /** @enumType */
173
+ type AuthorizationCaptureStatusWithLiterals = AuthorizationCaptureStatus | 'UNKNOWN_STATUS' | 'PENDING' | 'SUCCEEDED' | 'FAILED';
174
+ interface Price {
175
+ /**
176
+ * Amount.
177
+ * @decimalValue options { gte:0, lte:1000000000000000 }
178
+ */
179
+ amount?: string;
180
+ /**
181
+ * Amount formatted with currency symbol.
182
+ * @readonly
183
+ */
184
+ formattedAmount?: string;
185
+ }
186
+ interface AuthorizationActionFailureDetails {
187
+ /** @maxLength 100 */
188
+ failureCode?: string;
189
+ }
190
+ interface AuthorizationVoid {
191
+ /** Status of this void action */
192
+ status?: AuthorizationVoidStatusWithLiterals;
193
+ /** Date and time the void was initiated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */
194
+ voidedDate?: Date | null;
195
+ /** In case of status is FAILED may contain failure details */
196
+ failureDetails?: AuthorizationActionFailureDetails;
197
+ /** Reason of void action */
198
+ reason?: ReasonWithLiterals;
199
+ }
200
+ declare enum AuthorizationVoidStatus {
201
+ UNKNOWN_STATUS = "UNKNOWN_STATUS",
202
+ /** Void operation still in progress. */
203
+ PENDING = "PENDING",
204
+ /** Void operation succeeded. */
205
+ SUCCEEDED = "SUCCEEDED",
206
+ /** Void operation failed. */
207
+ FAILED = "FAILED"
208
+ }
209
+ /** @enumType */
210
+ type AuthorizationVoidStatusWithLiterals = AuthorizationVoidStatus | 'UNKNOWN_STATUS' | 'PENDING' | 'SUCCEEDED' | 'FAILED';
211
+ /** Reason the authorization was voided. */
212
+ declare enum Reason {
213
+ UNKNOWN_REASON = "UNKNOWN_REASON",
214
+ /** Authorization was voided by user. */
215
+ MANUAL = "MANUAL",
216
+ /** Authorization passed execution date. */
217
+ SCHEDULED = "SCHEDULED"
218
+ }
219
+ /** @enumType */
220
+ type ReasonWithLiterals = Reason | 'UNKNOWN_REASON' | 'MANUAL' | 'SCHEDULED';
221
+ interface ScheduledAction {
222
+ /** Type of the action. */
223
+ actionType?: ActionTypeWithLiterals;
224
+ /** The date and time of the action. */
225
+ executionDate?: Date | null;
226
+ }
227
+ declare enum ActionType {
228
+ UNKNOWN_ACTION_TYPE = "UNKNOWN_ACTION_TYPE",
229
+ VOID = "VOID",
230
+ CAPTURE = "CAPTURE"
231
+ }
232
+ /** @enumType */
233
+ type ActionTypeWithLiterals = ActionType | 'UNKNOWN_ACTION_TYPE' | 'VOID' | 'CAPTURE';
234
+ interface GiftCardPaymentDetails {
235
+ /**
236
+ * Gift card payment ID.
237
+ * @minLength 1
238
+ * @maxLength 100
239
+ */
240
+ giftCardPaymentId?: string;
241
+ /**
242
+ * ID of the app that created the gift card.
243
+ * @format GUID
244
+ */
245
+ appId?: string;
246
+ /**
247
+ * Whether the gift card is voided.
248
+ * @readonly
249
+ */
250
+ voided?: boolean;
251
+ }
252
+ interface Refund {
253
+ /**
254
+ * Refund ID.
255
+ * @format GUID
256
+ * @readonly
257
+ */
258
+ id?: string;
259
+ /**
260
+ * List of transactions.
261
+ * @maxSize 50
262
+ */
263
+ transactions?: RefundTransaction[];
264
+ /** Refund business details. */
265
+ details?: RefundDetails;
266
+ /**
267
+ * 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.
268
+ * @readonly
269
+ * @immutable
270
+ */
271
+ createdDate?: Date | null;
272
+ /**
273
+ * Aggregated refund summary.
274
+ * @readonly
275
+ */
276
+ summary?: AggregatedRefundSummary;
277
+ /**
278
+ * ID of the app that initiated this refund.
279
+ * @format GUID
280
+ * @readonly
281
+ * @immutable
282
+ */
283
+ requestingServiceAppId?: string | null;
284
+ }
285
+ interface RefundTransaction {
286
+ /**
287
+ * ID of the payment associated with this refund.
288
+ * @format GUID
289
+ * @immutable
290
+ */
291
+ paymentId?: string;
292
+ /**
293
+ * Refund amount.
294
+ * @immutable
295
+ */
296
+ amount?: Price;
297
+ /** Refund status. */
298
+ refundStatus?: RefundStatusWithLiterals;
299
+ /** Optional details of current refund status. */
300
+ refundStatusInfo?: RefundStatusInfo;
301
+ /**
302
+ * Payment gateway's refund ID.
303
+ * This field is only returned when the value of `external_refund` is `false`.
304
+ * @format GUID
305
+ */
306
+ gatewayRefundId?: string | null;
307
+ /** ID of the refund in the payment provider's system. For example, at PayPal, Square, Stripe, etc. Not returned for external refunds. */
308
+ providerRefundId?: string | null;
309
+ /**
310
+ * Whether refund was made externally and manually on the payment provider's side.
311
+ * @immutable
312
+ */
313
+ externalRefund?: boolean;
314
+ }
315
+ /** Refund transaction status. */
316
+ declare enum RefundStatus {
317
+ /** Refund was initiated on payment provider side. PENDING status was assigned by provider. */
318
+ PENDING = "PENDING",
319
+ /** Refund transaction succeeded. */
320
+ SUCCEEDED = "SUCCEEDED",
321
+ /** Refund transaction failed. */
322
+ FAILED = "FAILED",
323
+ /** Refund request acknowledged, and will be executed soon. */
324
+ SCHEDULED = "SCHEDULED",
325
+ /** Refund was initiated on payment provider side. */
326
+ STARTED = "STARTED"
327
+ }
328
+ /** @enumType */
329
+ type RefundStatusWithLiterals = RefundStatus | 'PENDING' | 'SUCCEEDED' | 'FAILED' | 'SCHEDULED' | 'STARTED';
330
+ interface RefundStatusInfo {
331
+ /**
332
+ * Reason code for the refund's current status.
333
+ *
334
+ * Learn more about [reason codes](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes).
335
+ * @minLength 1
336
+ * @maxLength 10
337
+ */
338
+ paymentGatewayReasonCode?: string | null;
339
+ /**
340
+ * Free text explanation of current refund status.
341
+ * @minLength 1
342
+ * @maxLength 1000
343
+ */
344
+ description?: string | null;
345
+ }
346
+ /** Business model of a refund request */
347
+ interface RefundDetails {
348
+ /**
349
+ * Order line item IDs and quantities that were refunded.
350
+ * @maxSize 300
351
+ */
352
+ items?: RefundItem[];
353
+ /** Whether the shipping fee was also refunded. */
354
+ shippingIncluded?: boolean;
355
+ /**
356
+ * Reason for the refund, provided by customer (optional).
357
+ * @maxLength 200
358
+ */
359
+ reason?: string | null;
360
+ /**
361
+ * Line items that were refunded.
362
+ * @maxSize 300
363
+ */
364
+ lineItems?: LineItemRefund[];
365
+ /**
366
+ * Additional fees that were refunded.
367
+ * @maxSize 100
368
+ */
369
+ additionalFees?: AdditionalFeeRefund[];
370
+ /** Shipping amount that was refunded. */
371
+ shipping?: ShippingRefund;
372
+ }
373
+ interface RefundItem {
374
+ /**
375
+ * Line item ID the refunded line item.
376
+ * @format GUID
377
+ */
378
+ lineItemId?: string;
379
+ /**
380
+ * Line item quantity refunded.
381
+ * @min 1
382
+ * @max 100000
383
+ */
384
+ quantity?: number;
385
+ }
386
+ interface LineItemRefund {
387
+ /**
388
+ * Line item ID.
389
+ * @format GUID
390
+ * @immutable
391
+ */
392
+ lineItemId?: string;
393
+ /**
394
+ * Refund quantity.
395
+ * @min 1
396
+ * @max 100000
397
+ * @immutable
398
+ */
399
+ quantity?: number;
400
+ }
401
+ interface AdditionalFeeRefund {
402
+ /**
403
+ * Additional fee ID.
404
+ * @format GUID
405
+ * @immutable
406
+ */
407
+ additionalFeeId?: string;
408
+ /**
409
+ * Refund amount.
410
+ * @immutable
411
+ */
412
+ amount?: Price;
413
+ }
414
+ interface ShippingRefund {
415
+ /**
416
+ * Refund amount.
417
+ * @immutable
418
+ */
419
+ amount?: Price;
420
+ }
421
+ interface AggregatedRefundSummary {
422
+ /** Total amount requested for refund. */
423
+ requestedRefund?: Price;
424
+ /** Pending refund amount - the portion of `requestedRefund` that is still pending. */
425
+ pendingRefund?: Price;
426
+ /** Refunded amount - the portion of `requestedRefund` that refunded successfully. */
427
+ refunded?: Price;
428
+ /** Failed refund amount - the portion of `requestedRefund` that failed. */
429
+ failedRefundAmount?: Price;
430
+ /** Whether at least one refund transaction is still in `"PENDING"` status. */
431
+ pending?: boolean;
432
+ /** Breakdown of refunded items. Available only after refund is complete. */
433
+ breakdown?: RefundItemsBreakdown;
434
+ }
435
+ interface RefundItemsBreakdown {
436
+ /**
437
+ * Refunded line items and the amount refunded for each.
438
+ * @maxSize 300
439
+ */
440
+ lineItems?: LineItemRefundSummary[];
441
+ }
442
+ interface LineItemRefundSummary {
443
+ /**
444
+ * ID of the refunded line item.
445
+ * @format GUID
446
+ */
447
+ lineItemId?: string;
448
+ /** Total refunded amount for the line item. */
449
+ totalRefundedAmount?: Price;
450
+ }
451
+ interface ListTransactionsForSingleOrderRequest {
452
+ /**
453
+ * Order ID.
454
+ * @minLength 1
455
+ * @maxLength 100
456
+ */
457
+ orderId: string;
458
+ }
459
+ interface ListTransactionsForSingleOrderResponse {
460
+ /** Order ID and its associated transactions. */
461
+ orderTransactions?: OrderTransactions;
462
+ }
463
+ interface ListTransactionsForMultipleOrdersRequest {
464
+ /**
465
+ * Order IDs for which to retrieve transactions.
466
+ * @minSize 1
467
+ * @maxSize 100
468
+ * @minLength 1
469
+ * @maxLength 100
470
+ */
471
+ orderIds: string[];
472
+ }
473
+ interface ListTransactionsForMultipleOrdersResponse {
474
+ /** List of order IDs and their associated transactions. */
475
+ orderTransactions?: OrderTransactions[];
476
+ }
477
+ interface AddPaymentsRequest {
478
+ /**
479
+ * Order ID.
480
+ * @format GUID
481
+ */
482
+ orderId: string;
483
+ /**
484
+ * Payments to be added to order.
485
+ * @minSize 1
486
+ * @maxSize 50
487
+ */
488
+ payments: Payment[];
489
+ }
490
+ interface AddPaymentsResponse {
491
+ /** Order ID and its associated transactions. */
492
+ orderTransactions?: OrderTransactions;
493
+ /** IDs of added order payments. */
494
+ paymentsIds?: string[];
495
+ }
496
+ interface UpdatePaymentStatusRequest {
497
+ /**
498
+ * Order ID.
499
+ * @format GUID
500
+ */
501
+ orderId: string;
502
+ /**
503
+ * Payment ID.
504
+ * @format GUID
505
+ */
506
+ paymentId: string;
507
+ /** Payment status. */
508
+ status?: TransactionStatusWithLiterals;
509
+ }
510
+ interface UpdatePaymentStatusResponse {
511
+ /** Order ID and its associated transactions after update. */
512
+ orderTransactions?: OrderTransactions;
513
+ }
514
+ interface BulkUpdatePaymentStatusesRequest {
515
+ /**
516
+ * Order and payment IDs for which to update payment status.
517
+ * @minSize 1
518
+ * @maxSize 300
519
+ */
520
+ paymentAndOrderIds: PaymentAndOrderId[];
521
+ /** Whether to return the full payment entity (`results.item`) in the response. */
522
+ returnFullEntity?: boolean;
523
+ /** Payment status. */
524
+ status?: TransactionStatusWithLiterals;
525
+ }
526
+ interface PaymentAndOrderId {
527
+ /**
528
+ * Order ID.
529
+ * @format GUID
530
+ */
531
+ orderId?: string;
532
+ /**
533
+ * Payment ID.
534
+ * todo: remove comment once UI will use BulkMarkOrderAsPaid
535
+ */
536
+ paymentId?: string;
537
+ }
538
+ interface BulkUpdatePaymentStatusesResponse {
539
+ /** Bulk operation results. */
540
+ results?: BulkPaymentResult[];
541
+ /** Bulk operation metadata. */
542
+ bulkActionMetadata?: BulkActionMetadata;
543
+ }
544
+ interface BulkPaymentResult {
545
+ /** Item metadata. */
546
+ itemMetadata?: ItemMetadata;
547
+ /** Updated payment. Returned if `return_full_entity` set to `true`. */
548
+ item?: Payment;
549
+ }
550
+ interface ItemMetadata {
551
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
552
+ id?: string | null;
553
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
554
+ originalIndex?: number;
555
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
556
+ success?: boolean;
557
+ /** Details about the error in case of failure. */
558
+ error?: ApplicationError;
559
+ }
560
+ interface ApplicationError {
561
+ /** Error code. */
562
+ code?: string;
563
+ /** Description of the error. */
564
+ description?: string;
565
+ /** Data related to the error. */
566
+ data?: Record<string, any> | null;
567
+ }
568
+ interface BulkActionMetadata {
569
+ /** Number of items that were successfully processed. */
570
+ totalSuccesses?: number;
571
+ /** Number of items that couldn't be processed. */
572
+ totalFailures?: number;
573
+ /** Number of failures without details because detailed failure threshold was exceeded. */
574
+ undetailedFailures?: number;
575
+ }
576
+ interface UpdateRefundTransactionRequest {
577
+ }
578
+ interface UpdateRefundTransactionResponse {
579
+ }
580
+ interface UpdatePaymentsRequest {
581
+ }
582
+ interface UpdatePaymentsResponse {
583
+ }
584
+
585
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
586
+ getUrl: (context: any) => string;
587
+ httpMethod: K;
588
+ path: string;
589
+ pathParams: M;
590
+ __requestType: T;
591
+ __originalRequestType: S;
592
+ __responseType: Q;
593
+ __originalResponseType: R;
594
+ };
595
+ declare function listTransactionsForSingleOrder(): __PublicMethodMetaInfo<'GET', {
596
+ orderId: string;
597
+ }, ListTransactionsForSingleOrderRequest$1, ListTransactionsForSingleOrderRequest, ListTransactionsForSingleOrderResponse$1, ListTransactionsForSingleOrderResponse>;
598
+ declare function listTransactionsForMultipleOrders(): __PublicMethodMetaInfo<'POST', {}, ListTransactionsForMultipleOrdersRequest$1, ListTransactionsForMultipleOrdersRequest, ListTransactionsForMultipleOrdersResponse$1, ListTransactionsForMultipleOrdersResponse>;
599
+ declare function addPayments(): __PublicMethodMetaInfo<'POST', {
600
+ orderId: string;
601
+ }, AddPaymentsRequest$1, AddPaymentsRequest, AddPaymentsResponse$1, AddPaymentsResponse>;
602
+ declare function updatePaymentStatus(): __PublicMethodMetaInfo<'POST', {
603
+ paymentId: string;
604
+ orderId: string;
605
+ }, UpdatePaymentStatusRequest$1, UpdatePaymentStatusRequest, UpdatePaymentStatusResponse$1, UpdatePaymentStatusResponse>;
606
+ declare function bulkUpdatePaymentStatuses(): __PublicMethodMetaInfo<'POST', {}, BulkUpdatePaymentStatusesRequest$1, BulkUpdatePaymentStatusesRequest, BulkUpdatePaymentStatusesResponse$1, BulkUpdatePaymentStatusesResponse>;
607
+ declare function updateRefundTransaction(): __PublicMethodMetaInfo<'POST', {
608
+ orderId: string;
609
+ }, UpdateRefundTransactionRequest$1, UpdateRefundTransactionRequest, UpdateRefundTransactionResponse$1, UpdateRefundTransactionResponse>;
610
+ declare function updatePayments(): __PublicMethodMetaInfo<'POST', {
611
+ orderId: string;
612
+ }, UpdatePaymentsRequest$1, UpdatePaymentsRequest, UpdatePaymentsResponse$1, UpdatePaymentsResponse>;
613
+
614
+ export { type __PublicMethodMetaInfo, addPayments, bulkUpdatePaymentStatuses, listTransactionsForMultipleOrders, listTransactionsForSingleOrder, updatePaymentStatus, updatePayments, updateRefundTransaction };