@wix/auto_sdk_ecom_order-transactions 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/ecom-v1-order-transactions-order-transactions.context.d.ts +11 -0
- package/build/cjs/src/ecom-v1-order-transactions-order-transactions.context.js +39 -0
- package/build/cjs/src/ecom-v1-order-transactions-order-transactions.context.js.map +1 -0
- package/build/cjs/src/ecom-v1-order-transactions-order-transactions.http.d.ts +73 -0
- package/build/cjs/src/ecom-v1-order-transactions-order-transactions.http.js +466 -0
- package/build/cjs/src/ecom-v1-order-transactions-order-transactions.http.js.map +1 -0
- package/build/cjs/src/ecom-v1-order-transactions-order-transactions.meta.d.ts +30 -0
- package/build/cjs/src/ecom-v1-order-transactions-order-transactions.meta.js +161 -0
- package/build/cjs/src/ecom-v1-order-transactions-order-transactions.meta.js.map +1 -0
- package/build/cjs/src/ecom-v1-order-transactions-order-transactions.public.d.ts +63 -0
- package/build/cjs/src/ecom-v1-order-transactions-order-transactions.public.js +76 -0
- package/build/cjs/src/ecom-v1-order-transactions-order-transactions.public.js.map +1 -0
- package/build/cjs/src/ecom-v1-order-transactions-order-transactions.types.d.ts +1816 -0
- package/build/cjs/src/ecom-v1-order-transactions-order-transactions.types.js +303 -0
- package/build/cjs/src/ecom-v1-order-transactions-order-transactions.types.js.map +1 -0
- package/build/cjs/src/ecom-v1-order-transactions-order-transactions.universal.d.ts +1954 -0
- package/build/cjs/src/ecom-v1-order-transactions-order-transactions.universal.js +680 -0
- package/build/cjs/src/ecom-v1-order-transactions-order-transactions.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/ecom-v1-order-transactions-order-transactions.context.d.ts +11 -0
- package/build/es/src/ecom-v1-order-transactions-order-transactions.context.js +11 -0
- package/build/es/src/ecom-v1-order-transactions-order-transactions.context.js.map +1 -0
- package/build/es/src/ecom-v1-order-transactions-order-transactions.http.d.ts +73 -0
- package/build/es/src/ecom-v1-order-transactions-order-transactions.http.js +456 -0
- package/build/es/src/ecom-v1-order-transactions-order-transactions.http.js.map +1 -0
- package/build/es/src/ecom-v1-order-transactions-order-transactions.meta.d.ts +30 -0
- package/build/es/src/ecom-v1-order-transactions-order-transactions.meta.js +128 -0
- package/build/es/src/ecom-v1-order-transactions-order-transactions.meta.js.map +1 -0
- package/build/es/src/ecom-v1-order-transactions-order-transactions.public.d.ts +63 -0
- package/build/es/src/ecom-v1-order-transactions-order-transactions.public.js +41 -0
- package/build/es/src/ecom-v1-order-transactions-order-transactions.public.js.map +1 -0
- package/build/es/src/ecom-v1-order-transactions-order-transactions.types.d.ts +1816 -0
- package/build/es/src/ecom-v1-order-transactions-order-transactions.types.js +300 -0
- package/build/es/src/ecom-v1-order-transactions-order-transactions.types.js.map +1 -0
- package/build/es/src/ecom-v1-order-transactions-order-transactions.universal.d.ts +1954 -0
- package/build/es/src/ecom-v1-order-transactions-order-transactions.universal.js +647 -0
- package/build/es/src/ecom-v1-order-transactions-order-transactions.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.context.d.ts +11 -0
- package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.context.js +39 -0
- package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.context.js.map +1 -0
- package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.http.d.ts +73 -0
- package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.http.js +466 -0
- package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.http.js.map +1 -0
- package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.meta.d.ts +30 -0
- package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.meta.js +161 -0
- package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.meta.js.map +1 -0
- package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.public.d.ts +108 -0
- package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.public.js +76 -0
- package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.public.js.map +1 -0
- package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.types.d.ts +1863 -0
- package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.types.js +303 -0
- package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.types.js.map +1 -0
- package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.universal.d.ts +2231 -0
- package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.universal.js +680 -0
- package/build/internal/cjs/src/ecom-v1-order-transactions-order-transactions.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.context.d.ts +11 -0
- package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.context.js +11 -0
- package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.context.js.map +1 -0
- package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.http.d.ts +73 -0
- package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.http.js +456 -0
- package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.http.js.map +1 -0
- package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.meta.d.ts +30 -0
- package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.meta.js +128 -0
- package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.meta.js.map +1 -0
- package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.public.d.ts +108 -0
- package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.public.js +41 -0
- package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.public.js.map +1 -0
- package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.types.d.ts +1863 -0
- package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.types.js +300 -0
- package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.types.js.map +1 -0
- package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.universal.d.ts +2231 -0
- package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.universal.js +647 -0
- package/build/internal/es/src/ecom-v1-order-transactions-order-transactions.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,1816 @@
|
|
|
1
|
+
export interface OrderTransactions {
|
|
2
|
+
/** Order ID. */
|
|
3
|
+
orderId?: string;
|
|
4
|
+
/** Record of payments made to the merchant. */
|
|
5
|
+
payments?: Payment[];
|
|
6
|
+
/** Record of refunds made to the buyer. */
|
|
7
|
+
refunds?: Refund[];
|
|
8
|
+
}
|
|
9
|
+
export interface Payment extends PaymentPaymentDetailsOneOf, PaymentReceiptInfoOneOf {
|
|
10
|
+
/** Regular payment details. */
|
|
11
|
+
regularPaymentDetails?: RegularPaymentDetails;
|
|
12
|
+
/** Gift card payment details. */
|
|
13
|
+
giftcardPaymentDetails?: GiftCardPaymentDetails;
|
|
14
|
+
/**
|
|
15
|
+
* Payment ID.
|
|
16
|
+
* @readonly
|
|
17
|
+
*/
|
|
18
|
+
id?: string | null;
|
|
19
|
+
/** 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. */
|
|
20
|
+
createdDate?: Date | null;
|
|
21
|
+
/**
|
|
22
|
+
* Date and time the payment was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
|
|
23
|
+
* @readonly
|
|
24
|
+
*/
|
|
25
|
+
updatedDate?: Date | null;
|
|
26
|
+
/** Payment amount. */
|
|
27
|
+
amount?: Price;
|
|
28
|
+
/**
|
|
29
|
+
* Whether refunds for this payment are disabled.
|
|
30
|
+
* + `true`: This payment is not refundable.
|
|
31
|
+
* + `false`: This payment may be refunded. However, this ultimately depends on the payment provider.
|
|
32
|
+
*/
|
|
33
|
+
refundDisabled?: boolean;
|
|
34
|
+
}
|
|
35
|
+
/** @oneof */
|
|
36
|
+
export interface PaymentPaymentDetailsOneOf {
|
|
37
|
+
/** Regular payment details. */
|
|
38
|
+
regularPaymentDetails?: RegularPaymentDetails;
|
|
39
|
+
/** Gift card payment details. */
|
|
40
|
+
giftcardPaymentDetails?: GiftCardPaymentDetails;
|
|
41
|
+
}
|
|
42
|
+
/** @oneof */
|
|
43
|
+
export interface PaymentReceiptInfoOneOf {
|
|
44
|
+
}
|
|
45
|
+
export interface RegularPaymentDetails extends RegularPaymentDetailsPaymentMethodDetailsOneOf {
|
|
46
|
+
/** Whether regular card used */
|
|
47
|
+
creditCardDetails?: CreditCardPaymentMethodDetails;
|
|
48
|
+
/** Wix Payments order ID. */
|
|
49
|
+
paymentOrderId?: string | null;
|
|
50
|
+
/**
|
|
51
|
+
* Payment gateway's transaction ID. This ID can be used with the Wix Payments [Transactions API](https://dev.wix.com/docs/rest/api-reference/wix-payments/transactions/introduction).
|
|
52
|
+
* This field is only returned when the value of `offline_payment` is `false`.
|
|
53
|
+
*/
|
|
54
|
+
gatewayTransactionId?: string | null;
|
|
55
|
+
/**
|
|
56
|
+
* Payment method. Non-exhaustive list of supported values:
|
|
57
|
+
* + `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`
|
|
58
|
+
*/
|
|
59
|
+
paymentMethod?: string | null;
|
|
60
|
+
/** Transaction ID in the payment provider's system. For example, at PayPal, Square, Stripe, etc. Not returned for offline payments. */
|
|
61
|
+
providerTransactionId?: string | null;
|
|
62
|
+
/** Whether the payment was made offline. For example, when using cash or when marked as paid in the Business Manager. */
|
|
63
|
+
offlinePayment?: boolean;
|
|
64
|
+
/** Payment status. */
|
|
65
|
+
status?: TransactionStatus;
|
|
66
|
+
/** Whether there is a payment agreement that allows for future charges. */
|
|
67
|
+
savedPaymentMethod?: boolean;
|
|
68
|
+
/** Authorization details. */
|
|
69
|
+
authorizationDetails?: AuthorizationDetails;
|
|
70
|
+
}
|
|
71
|
+
/** @oneof */
|
|
72
|
+
export interface RegularPaymentDetailsPaymentMethodDetailsOneOf {
|
|
73
|
+
/** Whether regular card used */
|
|
74
|
+
creditCardDetails?: CreditCardPaymentMethodDetails;
|
|
75
|
+
}
|
|
76
|
+
export declare enum TransactionStatus {
|
|
77
|
+
UNDEFINED = "UNDEFINED",
|
|
78
|
+
APPROVED = "APPROVED",
|
|
79
|
+
PENDING = "PENDING",
|
|
80
|
+
PENDING_MERCHANT = "PENDING_MERCHANT",
|
|
81
|
+
CANCELED = "CANCELED",
|
|
82
|
+
DECLINED = "DECLINED",
|
|
83
|
+
REFUNDED = "REFUNDED",
|
|
84
|
+
PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED",
|
|
85
|
+
AUTHORIZED = "AUTHORIZED",
|
|
86
|
+
VOIDED = "VOIDED"
|
|
87
|
+
}
|
|
88
|
+
export interface CreditCardPaymentMethodDetails {
|
|
89
|
+
/** The last 4 digits of the card number. */
|
|
90
|
+
lastFourDigits?: string | null;
|
|
91
|
+
/** Card issuer's brand. */
|
|
92
|
+
brand?: string | null;
|
|
93
|
+
}
|
|
94
|
+
export interface AuthorizationDetails {
|
|
95
|
+
/**
|
|
96
|
+
* Whether the authorized payment is of a delayed capture.
|
|
97
|
+
* @readonly
|
|
98
|
+
*/
|
|
99
|
+
delayedCapture?: boolean;
|
|
100
|
+
/** Date and time the payment was authorized in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */
|
|
101
|
+
authorizedDate?: Date | null;
|
|
102
|
+
/**
|
|
103
|
+
* List of captures associated with payment
|
|
104
|
+
* In case of failed it can be replaced with new one with PENDING or SUCCESS statuses
|
|
105
|
+
*/
|
|
106
|
+
captures?: AuthorizationCapture[];
|
|
107
|
+
/** Void associated with payment */
|
|
108
|
+
void?: AuthorizationVoid;
|
|
109
|
+
/** Scheduled action for this transaction */
|
|
110
|
+
scheduledAction?: ScheduledAction;
|
|
111
|
+
}
|
|
112
|
+
export interface AuthorizationCapture {
|
|
113
|
+
/**
|
|
114
|
+
* Capture ID.
|
|
115
|
+
* @readonly
|
|
116
|
+
*/
|
|
117
|
+
id?: string | null;
|
|
118
|
+
/** Status of this capture action */
|
|
119
|
+
status?: AuthorizationCaptureStatus;
|
|
120
|
+
/** Amount of this capture */
|
|
121
|
+
amount?: Price;
|
|
122
|
+
/** Date and time the capture was initiated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */
|
|
123
|
+
createdDate?: Date | null;
|
|
124
|
+
/** In case of status is FAILED may contain failure details */
|
|
125
|
+
failureDetails?: AuthorizationActionFailureDetails;
|
|
126
|
+
}
|
|
127
|
+
export declare enum AuthorizationCaptureStatus {
|
|
128
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
129
|
+
/** Capture operation still in progress. */
|
|
130
|
+
PENDING = "PENDING",
|
|
131
|
+
/** Capture operation succeeded. */
|
|
132
|
+
SUCCEEDED = "SUCCEEDED",
|
|
133
|
+
/** Capture operation failed. */
|
|
134
|
+
FAILED = "FAILED"
|
|
135
|
+
}
|
|
136
|
+
export interface Price {
|
|
137
|
+
/** Amount. */
|
|
138
|
+
amount?: string;
|
|
139
|
+
/**
|
|
140
|
+
* Amount formatted with currency symbol.
|
|
141
|
+
* @readonly
|
|
142
|
+
*/
|
|
143
|
+
formattedAmount?: string;
|
|
144
|
+
}
|
|
145
|
+
export interface AuthorizationActionFailureDetails {
|
|
146
|
+
failureCode?: string;
|
|
147
|
+
}
|
|
148
|
+
export interface AuthorizationVoid {
|
|
149
|
+
/** Status of this void action */
|
|
150
|
+
status?: AuthorizationVoidStatus;
|
|
151
|
+
/** Date and time the void was initiated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */
|
|
152
|
+
voidedDate?: Date | null;
|
|
153
|
+
/** In case of status is FAILED may contain failure details */
|
|
154
|
+
failureDetails?: AuthorizationActionFailureDetails;
|
|
155
|
+
/** Reason of void action */
|
|
156
|
+
reason?: Reason;
|
|
157
|
+
}
|
|
158
|
+
export declare enum AuthorizationVoidStatus {
|
|
159
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
160
|
+
/** Void operation still in progress. */
|
|
161
|
+
PENDING = "PENDING",
|
|
162
|
+
/** Void operation succeeded. */
|
|
163
|
+
SUCCEEDED = "SUCCEEDED",
|
|
164
|
+
/** Void operation failed. */
|
|
165
|
+
FAILED = "FAILED"
|
|
166
|
+
}
|
|
167
|
+
/** Reason the authorization was voided. */
|
|
168
|
+
export declare enum Reason {
|
|
169
|
+
UNKNOWN_REASON = "UNKNOWN_REASON",
|
|
170
|
+
/** Authorization was voided by user. */
|
|
171
|
+
MANUAL = "MANUAL",
|
|
172
|
+
/** Authorization passed execution date. */
|
|
173
|
+
SCHEDULED = "SCHEDULED"
|
|
174
|
+
}
|
|
175
|
+
export interface ScheduledAction {
|
|
176
|
+
/** Type of the action. */
|
|
177
|
+
actionType?: ActionType;
|
|
178
|
+
/** The date and time of the action. */
|
|
179
|
+
executionDate?: Date | null;
|
|
180
|
+
}
|
|
181
|
+
export declare enum ActionType {
|
|
182
|
+
UNKNOWN_ACTION_TYPE = "UNKNOWN_ACTION_TYPE",
|
|
183
|
+
VOID = "VOID",
|
|
184
|
+
CAPTURE = "CAPTURE"
|
|
185
|
+
}
|
|
186
|
+
export interface GiftCardPaymentDetails {
|
|
187
|
+
/** Gift card payment ID. */
|
|
188
|
+
giftCardPaymentId?: string;
|
|
189
|
+
/** ID of the app that created the gift card. */
|
|
190
|
+
appId?: string;
|
|
191
|
+
/**
|
|
192
|
+
* Whether the gift card is voided.
|
|
193
|
+
* @readonly
|
|
194
|
+
*/
|
|
195
|
+
voided?: boolean;
|
|
196
|
+
}
|
|
197
|
+
export interface MembershipPaymentDetails {
|
|
198
|
+
/** Membership ID. */
|
|
199
|
+
membershipId?: string;
|
|
200
|
+
/** ID of the line item this membership applies to. */
|
|
201
|
+
lineItemId?: string;
|
|
202
|
+
/** Payment status. */
|
|
203
|
+
status?: MembershipPaymentStatus;
|
|
204
|
+
/** Membership name. */
|
|
205
|
+
name?: MembershipName;
|
|
206
|
+
/** The transaction ID in the membership system. Can be used to void the transaction. */
|
|
207
|
+
externalTransactionId?: string | null;
|
|
208
|
+
/**
|
|
209
|
+
* Whether the membership is voided.
|
|
210
|
+
* @readonly
|
|
211
|
+
*/
|
|
212
|
+
voided?: boolean;
|
|
213
|
+
/** ID of the application providing this payment option. */
|
|
214
|
+
providerAppId?: string;
|
|
215
|
+
}
|
|
216
|
+
export declare enum MembershipPaymentStatus {
|
|
217
|
+
/** Payment was charged. */
|
|
218
|
+
CHARGED = "CHARGED",
|
|
219
|
+
/** The attempt to charge the payment failed, for example, due to lack of credits. */
|
|
220
|
+
CHARGE_FAILED = "CHARGE_FAILED"
|
|
221
|
+
}
|
|
222
|
+
export interface MembershipName {
|
|
223
|
+
/** Membership name. */
|
|
224
|
+
original?: string;
|
|
225
|
+
/** Translated membership name. Defaults to `original` when not provided. */
|
|
226
|
+
translated?: string | null;
|
|
227
|
+
}
|
|
228
|
+
export interface WixReceiptInfo {
|
|
229
|
+
/** Receipt ID */
|
|
230
|
+
receiptId?: string;
|
|
231
|
+
/** Display number of receipt */
|
|
232
|
+
displayNumber?: string | null;
|
|
233
|
+
}
|
|
234
|
+
export interface ExternalReceiptInfo {
|
|
235
|
+
/** External receipt ID */
|
|
236
|
+
receiptId?: string | null;
|
|
237
|
+
/** ID of the app providing the receipt */
|
|
238
|
+
appId?: string | null;
|
|
239
|
+
/** Display number of receipt */
|
|
240
|
+
displayNumber?: string | null;
|
|
241
|
+
}
|
|
242
|
+
export interface Refund {
|
|
243
|
+
/**
|
|
244
|
+
* Refund ID.
|
|
245
|
+
* @readonly
|
|
246
|
+
*/
|
|
247
|
+
id?: string;
|
|
248
|
+
/** List of transactions. */
|
|
249
|
+
transactions?: RefundTransaction[];
|
|
250
|
+
/** Refund business details. */
|
|
251
|
+
details?: RefundDetails;
|
|
252
|
+
/**
|
|
253
|
+
* 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.
|
|
254
|
+
* @readonly
|
|
255
|
+
*/
|
|
256
|
+
createdDate?: Date | null;
|
|
257
|
+
}
|
|
258
|
+
export interface RefundTransaction {
|
|
259
|
+
/** ID of the payment associated with this refund. */
|
|
260
|
+
paymentId?: string;
|
|
261
|
+
/** Refund amount. */
|
|
262
|
+
amount?: Price;
|
|
263
|
+
/** Refund status. */
|
|
264
|
+
refundStatus?: RefundStatus;
|
|
265
|
+
/** Optional details of current refund status. */
|
|
266
|
+
refundStatusInfo?: RefundStatusInfo;
|
|
267
|
+
/**
|
|
268
|
+
* Payment gateway's refund ID. This ID can be used with the Wix Payments [Transactions API](https://dev.wix.com/docs/rest/api-reference/wix-payments/transactions/introduction).
|
|
269
|
+
* This field is only returned when the value of `external_refund` is `false`.
|
|
270
|
+
*/
|
|
271
|
+
gatewayRefundId?: string | null;
|
|
272
|
+
/** ID of the refund in the payment provider's system. For example, at PayPal, Square, Stripe, etc. Not returned for external refunds. */
|
|
273
|
+
providerRefundId?: string | null;
|
|
274
|
+
/** Whether refund was made externally and manually on the payment provider's side. */
|
|
275
|
+
externalRefund?: boolean;
|
|
276
|
+
}
|
|
277
|
+
/** Refund transaction status. */
|
|
278
|
+
export declare enum RefundStatus {
|
|
279
|
+
/** Refund was initiated on payment provider side. PENDING status was assigned by provider. */
|
|
280
|
+
PENDING = "PENDING",
|
|
281
|
+
/** Refund transaction succeeded. */
|
|
282
|
+
SUCCEEDED = "SUCCEEDED",
|
|
283
|
+
/** Refund transaction failed. */
|
|
284
|
+
FAILED = "FAILED",
|
|
285
|
+
/** Refund request acknowledged, and will be executed soon. */
|
|
286
|
+
SCHEDULED = "SCHEDULED",
|
|
287
|
+
/** Refund was initiated on payment provider side. */
|
|
288
|
+
STARTED = "STARTED"
|
|
289
|
+
}
|
|
290
|
+
export interface RefundStatusInfo {
|
|
291
|
+
}
|
|
292
|
+
/** Business model of a refund request */
|
|
293
|
+
export interface RefundDetails {
|
|
294
|
+
/** Order line item IDs and quantities that were refunded. */
|
|
295
|
+
items?: RefundItem[];
|
|
296
|
+
/** Whether the shipping fee was also refunded. */
|
|
297
|
+
shippingIncluded?: boolean;
|
|
298
|
+
/** Reason for the refund, provided by customer (optional). */
|
|
299
|
+
reason?: string | null;
|
|
300
|
+
}
|
|
301
|
+
export interface RefundItem {
|
|
302
|
+
/** Line item ID the refunded line item. */
|
|
303
|
+
lineItemId?: string;
|
|
304
|
+
/** Line item quantity refunded. */
|
|
305
|
+
quantity?: number;
|
|
306
|
+
}
|
|
307
|
+
export interface LineItemRefund {
|
|
308
|
+
}
|
|
309
|
+
export interface AdditionalFeeRefund {
|
|
310
|
+
}
|
|
311
|
+
export interface ShippingRefund {
|
|
312
|
+
}
|
|
313
|
+
export interface AggregatedRefundSummary {
|
|
314
|
+
}
|
|
315
|
+
export interface SnapshotMessage {
|
|
316
|
+
id?: string;
|
|
317
|
+
opType?: number;
|
|
318
|
+
}
|
|
319
|
+
export interface IndexingMessage {
|
|
320
|
+
id?: string;
|
|
321
|
+
opType?: number;
|
|
322
|
+
requiredVersions?: string[];
|
|
323
|
+
}
|
|
324
|
+
export interface DiffmatokyPayload {
|
|
325
|
+
left?: string;
|
|
326
|
+
right?: string;
|
|
327
|
+
compareChannel?: string;
|
|
328
|
+
entityId?: string;
|
|
329
|
+
errorInformation?: ErrorInformation;
|
|
330
|
+
tags?: string[];
|
|
331
|
+
}
|
|
332
|
+
export interface ErrorInformation {
|
|
333
|
+
stackTrace?: string;
|
|
334
|
+
}
|
|
335
|
+
export interface OrderRefunded {
|
|
336
|
+
/**
|
|
337
|
+
* Refund ID.
|
|
338
|
+
* @readonly
|
|
339
|
+
*/
|
|
340
|
+
refundId?: string;
|
|
341
|
+
/**
|
|
342
|
+
* Refunded order data.
|
|
343
|
+
* @readonly
|
|
344
|
+
*/
|
|
345
|
+
order?: Order;
|
|
346
|
+
}
|
|
347
|
+
export interface Order {
|
|
348
|
+
/**
|
|
349
|
+
* Order ID (auto-generated upon order creation).
|
|
350
|
+
* @readonly
|
|
351
|
+
*/
|
|
352
|
+
id?: string | null;
|
|
353
|
+
/**
|
|
354
|
+
* Order number displayed in the owner's store (auto-generated).
|
|
355
|
+
* @readonly
|
|
356
|
+
*/
|
|
357
|
+
number?: number;
|
|
358
|
+
/**
|
|
359
|
+
* Order creation date and time.
|
|
360
|
+
* @readonly
|
|
361
|
+
*/
|
|
362
|
+
dateCreated?: Date | null;
|
|
363
|
+
/** Buyer information. */
|
|
364
|
+
buyerInfo?: BuyerInfo;
|
|
365
|
+
/** 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. */
|
|
366
|
+
currency?: string | null;
|
|
367
|
+
/** Weight unit used in this store. */
|
|
368
|
+
weightUnit?: WeightUnit;
|
|
369
|
+
/** Totals for order's line items. */
|
|
370
|
+
totals?: Totals;
|
|
371
|
+
/** Billing information. */
|
|
372
|
+
billingInfo?: BillingInfo;
|
|
373
|
+
/** Shipping information. */
|
|
374
|
+
shippingInfo?: ShippingInfo;
|
|
375
|
+
/** A note added by the buyer. */
|
|
376
|
+
buyerNote?: string | null;
|
|
377
|
+
/**
|
|
378
|
+
* Deprecated.
|
|
379
|
+
* @readonly
|
|
380
|
+
* @deprecated
|
|
381
|
+
*/
|
|
382
|
+
read?: boolean;
|
|
383
|
+
/**
|
|
384
|
+
* Whether or not the order was archived.
|
|
385
|
+
* @readonly
|
|
386
|
+
*/
|
|
387
|
+
archived?: boolean;
|
|
388
|
+
/** Current status of the payment. */
|
|
389
|
+
paymentStatus?: PaymentStatus;
|
|
390
|
+
/**
|
|
391
|
+
* Order's current fulfillment status (whether the order received a tracking number or was delivered/picked up).
|
|
392
|
+
* @readonly
|
|
393
|
+
*/
|
|
394
|
+
fulfillmentStatus?: FulfillmentStatus;
|
|
395
|
+
/** Line items ordered. */
|
|
396
|
+
lineItems?: LineItem[];
|
|
397
|
+
/**
|
|
398
|
+
* Log of updates related to the order.
|
|
399
|
+
* @readonly
|
|
400
|
+
*/
|
|
401
|
+
activities?: Activity[];
|
|
402
|
+
/** Invoice information. */
|
|
403
|
+
invoiceInfo?: V2InvoiceInfo;
|
|
404
|
+
/**
|
|
405
|
+
* Order fulfillment information.
|
|
406
|
+
* @readonly
|
|
407
|
+
*/
|
|
408
|
+
fulfillments?: Fulfillment[];
|
|
409
|
+
/** Discount information. */
|
|
410
|
+
discount?: Discount;
|
|
411
|
+
/** Custom field information. */
|
|
412
|
+
customField?: CustomField;
|
|
413
|
+
/** Shopping cart ID. */
|
|
414
|
+
cartId?: string | null;
|
|
415
|
+
/**
|
|
416
|
+
* Language for communication with the buyer. Defaults to the site language.
|
|
417
|
+
* For a site that supports multiple languages, this is the language the buyer selected.
|
|
418
|
+
*/
|
|
419
|
+
buyerLanguage?: string | null;
|
|
420
|
+
/** Information about the sales channel that submitted this order. */
|
|
421
|
+
channelInfo?: ChannelInfo;
|
|
422
|
+
/**
|
|
423
|
+
* Identity of the order's initiator.
|
|
424
|
+
* @readonly
|
|
425
|
+
*/
|
|
426
|
+
enteredBy?: EnteredBy;
|
|
427
|
+
/**
|
|
428
|
+
* Date and time of latest update.
|
|
429
|
+
* @readonly
|
|
430
|
+
*/
|
|
431
|
+
lastUpdated?: Date | null;
|
|
432
|
+
/** Subscription information. */
|
|
433
|
+
subscriptionInfo?: SubscriptionInfo;
|
|
434
|
+
/**
|
|
435
|
+
* Order’s unique numeric ID.
|
|
436
|
+
* Primarily used for sorting and filtering when crawling all orders.
|
|
437
|
+
* @readonly
|
|
438
|
+
*/
|
|
439
|
+
numericId?: string;
|
|
440
|
+
/**
|
|
441
|
+
* Refund information.
|
|
442
|
+
* @readonly
|
|
443
|
+
*/
|
|
444
|
+
refunds?: V2Refund[];
|
|
445
|
+
}
|
|
446
|
+
/** Buyer Info */
|
|
447
|
+
export interface BuyerInfo {
|
|
448
|
+
/** Wix customer ID */
|
|
449
|
+
id?: string | null;
|
|
450
|
+
/**
|
|
451
|
+
* Deprecated (use identityType instead)
|
|
452
|
+
* @readonly
|
|
453
|
+
* @deprecated
|
|
454
|
+
*/
|
|
455
|
+
type?: IdentityType;
|
|
456
|
+
/** Customer type */
|
|
457
|
+
identityType?: IdentityType;
|
|
458
|
+
/**
|
|
459
|
+
* Customer's first name
|
|
460
|
+
* @readonly
|
|
461
|
+
*/
|
|
462
|
+
firstName?: string;
|
|
463
|
+
/**
|
|
464
|
+
* Customer's last name
|
|
465
|
+
* @readonly
|
|
466
|
+
*/
|
|
467
|
+
lastName?: string;
|
|
468
|
+
/**
|
|
469
|
+
* Customer's phone number
|
|
470
|
+
* @readonly
|
|
471
|
+
*/
|
|
472
|
+
phone?: string | null;
|
|
473
|
+
/**
|
|
474
|
+
* Customer's email address
|
|
475
|
+
* @readonly
|
|
476
|
+
*/
|
|
477
|
+
email?: string;
|
|
478
|
+
}
|
|
479
|
+
export declare enum IdentityType {
|
|
480
|
+
UNSPECIFIED_IDENTITY_TYPE = "UNSPECIFIED_IDENTITY_TYPE",
|
|
481
|
+
/** Site member */
|
|
482
|
+
MEMBER = "MEMBER",
|
|
483
|
+
/** Contact */
|
|
484
|
+
CONTACT = "CONTACT"
|
|
485
|
+
}
|
|
486
|
+
export declare enum WeightUnit {
|
|
487
|
+
/** Weight unit can't be classified, due to an error */
|
|
488
|
+
UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
|
|
489
|
+
/** Kilograms */
|
|
490
|
+
KG = "KG",
|
|
491
|
+
/** Pounds */
|
|
492
|
+
LB = "LB"
|
|
493
|
+
}
|
|
494
|
+
export interface Totals {
|
|
495
|
+
/** Subtotal of all the line items, before tax. */
|
|
496
|
+
subtotal?: string;
|
|
497
|
+
/** Total shipping price, before tax. */
|
|
498
|
+
shipping?: string | null;
|
|
499
|
+
/** Total tax. */
|
|
500
|
+
tax?: string | null;
|
|
501
|
+
/** Total calculated discount value. */
|
|
502
|
+
discount?: string | null;
|
|
503
|
+
/** Total price charged. */
|
|
504
|
+
total?: string;
|
|
505
|
+
/**
|
|
506
|
+
* Total items weight.
|
|
507
|
+
* @readonly
|
|
508
|
+
*/
|
|
509
|
+
weight?: string;
|
|
510
|
+
/**
|
|
511
|
+
* Total number of line items.
|
|
512
|
+
* @readonly
|
|
513
|
+
*/
|
|
514
|
+
quantity?: number;
|
|
515
|
+
/**
|
|
516
|
+
* Total refund.
|
|
517
|
+
* @readonly
|
|
518
|
+
*/
|
|
519
|
+
refund?: string | null;
|
|
520
|
+
/** Total calculated gift card value. */
|
|
521
|
+
giftCard?: string | null;
|
|
522
|
+
}
|
|
523
|
+
export interface BillingInfo {
|
|
524
|
+
/** Payment method used for this order */
|
|
525
|
+
paymentMethod?: string | null;
|
|
526
|
+
/**
|
|
527
|
+
* Deprecated (use paymentProviderTransactionId instead)
|
|
528
|
+
* @readonly
|
|
529
|
+
* @deprecated
|
|
530
|
+
*/
|
|
531
|
+
externalTransactionId?: string | null;
|
|
532
|
+
/** Transaction ID from payment provider (e.g., PayPal, Square, Stripe) transaction ID */
|
|
533
|
+
paymentProviderTransactionId?: string | null;
|
|
534
|
+
/** Transaction ID from payment gateway (e.g., Wix Payments) */
|
|
535
|
+
paymentGatewayTransactionId?: string | null;
|
|
536
|
+
/** Full billing address */
|
|
537
|
+
address?: Address;
|
|
538
|
+
/**
|
|
539
|
+
* Payment date
|
|
540
|
+
* @readonly
|
|
541
|
+
*/
|
|
542
|
+
paidDate?: Date | null;
|
|
543
|
+
/** Whether order can be refunded by payment provider (manually or automatic) */
|
|
544
|
+
refundableByPaymentProvider?: boolean | null;
|
|
545
|
+
}
|
|
546
|
+
export interface Address extends AddressAddressLine1OptionsOneOf {
|
|
547
|
+
/** Address line 1 (free text) */
|
|
548
|
+
addressLine1?: string;
|
|
549
|
+
/** Address line 1 (street) */
|
|
550
|
+
street?: Street;
|
|
551
|
+
/** Addressee name */
|
|
552
|
+
fullName?: FullName;
|
|
553
|
+
/** Country code (2 letters) */
|
|
554
|
+
country?: string | null;
|
|
555
|
+
/** State or district */
|
|
556
|
+
subdivision?: string | null;
|
|
557
|
+
/** City name */
|
|
558
|
+
city?: string | null;
|
|
559
|
+
/** ZIP/postal code */
|
|
560
|
+
zipCode?: string | null;
|
|
561
|
+
/** Phone number */
|
|
562
|
+
phone?: string | null;
|
|
563
|
+
/** Company name */
|
|
564
|
+
company?: string | null;
|
|
565
|
+
/** Email address */
|
|
566
|
+
email?: string | null;
|
|
567
|
+
/** address line */
|
|
568
|
+
addressLine2?: string | null;
|
|
569
|
+
/** Tax information (for Brazil only) */
|
|
570
|
+
vatId?: VatId;
|
|
571
|
+
}
|
|
572
|
+
/** @oneof */
|
|
573
|
+
export interface AddressAddressLine1OptionsOneOf {
|
|
574
|
+
/** Address line 1 (free text) */
|
|
575
|
+
addressLine1?: string;
|
|
576
|
+
/** Address line 1 (street) */
|
|
577
|
+
street?: Street;
|
|
578
|
+
}
|
|
579
|
+
export interface FullName {
|
|
580
|
+
/** Customer's first name */
|
|
581
|
+
firstName?: string;
|
|
582
|
+
/** Customer's last name */
|
|
583
|
+
lastName?: string;
|
|
584
|
+
}
|
|
585
|
+
export interface Street {
|
|
586
|
+
/** Street number */
|
|
587
|
+
number?: string;
|
|
588
|
+
/** Street name */
|
|
589
|
+
name?: string;
|
|
590
|
+
}
|
|
591
|
+
export interface VatId {
|
|
592
|
+
/** Customer's tax ID. */
|
|
593
|
+
number?: string;
|
|
594
|
+
/**
|
|
595
|
+
* Tax type.
|
|
596
|
+
* + `CPF`: For individual tax payers.
|
|
597
|
+
* + `CNPJ`: For corporations.
|
|
598
|
+
*/
|
|
599
|
+
type?: VatType;
|
|
600
|
+
}
|
|
601
|
+
/** Brazilian tax info types */
|
|
602
|
+
export declare enum VatType {
|
|
603
|
+
/** When the tax info type can't be classified, due to an error */
|
|
604
|
+
UNSPECIFIED_TAX_TYPE = "UNSPECIFIED_TAX_TYPE",
|
|
605
|
+
/** CPF - for individual tax payers */
|
|
606
|
+
CPF = "CPF",
|
|
607
|
+
/** CNPJ - for corporations */
|
|
608
|
+
CNPJ = "CNPJ"
|
|
609
|
+
}
|
|
610
|
+
export interface ShippingInfo extends ShippingInfoDetailsOneOf {
|
|
611
|
+
/** Shipment details (when this object describes shipment). */
|
|
612
|
+
shipmentDetails?: ShipmentDetails;
|
|
613
|
+
/** Pickup details (when this object describes pickup). */
|
|
614
|
+
pickupDetails?: PickupDetails;
|
|
615
|
+
/** Shipping option name. */
|
|
616
|
+
deliveryOption?: string;
|
|
617
|
+
/** Shipping option delivery time. */
|
|
618
|
+
estimatedDeliveryTime?: string | null;
|
|
619
|
+
/**
|
|
620
|
+
* Deprecated - Latest expected delivery date.
|
|
621
|
+
* @deprecated
|
|
622
|
+
*/
|
|
623
|
+
deliverByDate?: Date | null;
|
|
624
|
+
/** Shipping region. */
|
|
625
|
+
shippingRegion?: string | null;
|
|
626
|
+
/**
|
|
627
|
+
* Unique code of provided shipping option. For example, `"usps_std_overnight"`.
|
|
628
|
+
* @readonly
|
|
629
|
+
*/
|
|
630
|
+
code?: string | null;
|
|
631
|
+
}
|
|
632
|
+
/** @oneof */
|
|
633
|
+
export interface ShippingInfoDetailsOneOf {
|
|
634
|
+
/** Shipment details (when this object describes shipment). */
|
|
635
|
+
shipmentDetails?: ShipmentDetails;
|
|
636
|
+
/** Pickup details (when this object describes pickup). */
|
|
637
|
+
pickupDetails?: PickupDetails;
|
|
638
|
+
}
|
|
639
|
+
export interface ShipmentDetails {
|
|
640
|
+
/** Shipping destination address. */
|
|
641
|
+
address?: Address;
|
|
642
|
+
/**
|
|
643
|
+
* Deprecated (use fulfillments instead).
|
|
644
|
+
* @readonly
|
|
645
|
+
* @deprecated
|
|
646
|
+
*/
|
|
647
|
+
trackingInfo?: TrackingInfo;
|
|
648
|
+
/** Discount applied for shipping. */
|
|
649
|
+
discount?: string | null;
|
|
650
|
+
/** Tax applied for shipping. */
|
|
651
|
+
tax?: string | null;
|
|
652
|
+
/** Price data. */
|
|
653
|
+
priceData?: ShippingPriceData;
|
|
654
|
+
}
|
|
655
|
+
export interface TrackingInfo {
|
|
656
|
+
/**
|
|
657
|
+
* Tracking number
|
|
658
|
+
* @readonly
|
|
659
|
+
*/
|
|
660
|
+
trackingNumber?: string | null;
|
|
661
|
+
/**
|
|
662
|
+
* Shipping provider
|
|
663
|
+
* @readonly
|
|
664
|
+
*/
|
|
665
|
+
shippingProvider?: string | null;
|
|
666
|
+
/**
|
|
667
|
+
* Tracking link
|
|
668
|
+
* @readonly
|
|
669
|
+
*/
|
|
670
|
+
trackingLink?: string | null;
|
|
671
|
+
}
|
|
672
|
+
export interface ShippingPriceData {
|
|
673
|
+
/** Whether tax is included in the price. */
|
|
674
|
+
taxIncludedInPrice?: boolean;
|
|
675
|
+
/** Shipping price. */
|
|
676
|
+
price?: string | null;
|
|
677
|
+
}
|
|
678
|
+
export interface PickupDetails {
|
|
679
|
+
/** Pickup address. */
|
|
680
|
+
pickupAddress?: PickupAddress;
|
|
681
|
+
/**
|
|
682
|
+
* Deprecated (use billingInfo instead).
|
|
683
|
+
* @readonly
|
|
684
|
+
* @deprecated
|
|
685
|
+
*/
|
|
686
|
+
buyerDetails?: BuyerDetails;
|
|
687
|
+
/** Store owner's pickup instructions. */
|
|
688
|
+
pickupInstructions?: string | null;
|
|
689
|
+
}
|
|
690
|
+
export interface PickupAddress {
|
|
691
|
+
/** Country code (3 letters) */
|
|
692
|
+
country?: string;
|
|
693
|
+
/** State/District */
|
|
694
|
+
subdivision?: string | null;
|
|
695
|
+
/** Address */
|
|
696
|
+
addressLine1?: string;
|
|
697
|
+
/** City */
|
|
698
|
+
city?: string;
|
|
699
|
+
/** ZIP/postal code */
|
|
700
|
+
zipCode?: string;
|
|
701
|
+
}
|
|
702
|
+
export interface BuyerDetails {
|
|
703
|
+
/** Addressee name */
|
|
704
|
+
fullName?: FullName;
|
|
705
|
+
/** Email address */
|
|
706
|
+
email?: string;
|
|
707
|
+
/** Phone number */
|
|
708
|
+
phone?: string;
|
|
709
|
+
}
|
|
710
|
+
/** This might be extended in the future with pending orders statuses */
|
|
711
|
+
export declare enum PaymentStatus {
|
|
712
|
+
/** Payment status can't be classified, due to an error */
|
|
713
|
+
UNSPECIFIED_PAYMENT_STATUS = "UNSPECIFIED_PAYMENT_STATUS",
|
|
714
|
+
/** Order is pending response from the payment provider */
|
|
715
|
+
PENDING = "PENDING",
|
|
716
|
+
/** Order is marked as not paid, and can be marked as paid later on. This is relevant for POS and offline orders */
|
|
717
|
+
NOT_PAID = "NOT_PAID",
|
|
718
|
+
/** The order is marked as paid */
|
|
719
|
+
PAID = "PAID",
|
|
720
|
+
/** Order was refunded, refund amount less than order total price */
|
|
721
|
+
PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED",
|
|
722
|
+
/** Full order total price was refunded */
|
|
723
|
+
FULLY_REFUNDED = "FULLY_REFUNDED",
|
|
724
|
+
/** At least one payment was received and approved, covering less than total price amount */
|
|
725
|
+
PARTIALLY_PAID = "PARTIALLY_PAID"
|
|
726
|
+
}
|
|
727
|
+
export declare enum FulfillmentStatus {
|
|
728
|
+
/** None of the order items are fulfilled */
|
|
729
|
+
NOT_FULFILLED = "NOT_FULFILLED",
|
|
730
|
+
/**
|
|
731
|
+
* All of the order items are fulfilled
|
|
732
|
+
* Orders without shipping info are fulfilled automatically
|
|
733
|
+
*/
|
|
734
|
+
FULFILLED = "FULFILLED",
|
|
735
|
+
/** Order is canceled */
|
|
736
|
+
CANCELED = "CANCELED",
|
|
737
|
+
/** Some, but not all of the order items are fulfilled */
|
|
738
|
+
PARTIALLY_FULFILLED = "PARTIALLY_FULFILLED"
|
|
739
|
+
}
|
|
740
|
+
export interface LineItem {
|
|
741
|
+
/**
|
|
742
|
+
* Line item ID (auto-generated, stable within this order only)
|
|
743
|
+
* @readonly
|
|
744
|
+
*/
|
|
745
|
+
index?: number | null;
|
|
746
|
+
/** Line item quantity */
|
|
747
|
+
quantity?: number;
|
|
748
|
+
/**
|
|
749
|
+
* Deprecated (use priceData instead)
|
|
750
|
+
* @readonly
|
|
751
|
+
* @deprecated
|
|
752
|
+
*/
|
|
753
|
+
price?: string | null;
|
|
754
|
+
/** Line item name */
|
|
755
|
+
name?: string | null;
|
|
756
|
+
/** Product name, translated into the customer's language */
|
|
757
|
+
translatedName?: string | null;
|
|
758
|
+
/** Line item product ID (optional for POS orders) */
|
|
759
|
+
productId?: string | null;
|
|
760
|
+
/**
|
|
761
|
+
* Deprecated (use priceData instead)
|
|
762
|
+
* @readonly
|
|
763
|
+
* @deprecated
|
|
764
|
+
*/
|
|
765
|
+
totalPrice?: string | null;
|
|
766
|
+
/** Line item type (may be extended) */
|
|
767
|
+
lineItemType?: LineItemType;
|
|
768
|
+
/** Line item options ordered */
|
|
769
|
+
options?: OptionSelection[];
|
|
770
|
+
/** Line item custom text field entry */
|
|
771
|
+
customTextFields?: CustomTextFieldSelection[];
|
|
772
|
+
/** Line item weight */
|
|
773
|
+
weight?: string | null;
|
|
774
|
+
/** Primary media for preview of the line item */
|
|
775
|
+
mediaItem?: MediaItem;
|
|
776
|
+
/** Line item SKU */
|
|
777
|
+
sku?: string | null;
|
|
778
|
+
/** Line item notes */
|
|
779
|
+
notes?: string | null;
|
|
780
|
+
/** Line item variantId (from Stores Catalog) */
|
|
781
|
+
variantId?: string | null;
|
|
782
|
+
/** Line item fulfillerId from stores fulfillers. No value equals self fulfilled */
|
|
783
|
+
fulfillerId?: string | null;
|
|
784
|
+
/** Discount applied for this line item */
|
|
785
|
+
discount?: string | null;
|
|
786
|
+
/** Tax applied for this line item */
|
|
787
|
+
tax?: string | null;
|
|
788
|
+
/**
|
|
789
|
+
* Deprecated (use priceData instead)
|
|
790
|
+
* @readonly
|
|
791
|
+
* @deprecated
|
|
792
|
+
*/
|
|
793
|
+
taxIncludedInPrice?: boolean;
|
|
794
|
+
/** Tax group ID */
|
|
795
|
+
taxGroupId?: string | null;
|
|
796
|
+
/** Price data */
|
|
797
|
+
priceData?: LineItemPriceData;
|
|
798
|
+
}
|
|
799
|
+
export declare enum LineItemType {
|
|
800
|
+
/** Line item type can't be classified, due to an error */
|
|
801
|
+
UNSPECIFIED_LINE_ITEM_TYPE = "UNSPECIFIED_LINE_ITEM_TYPE",
|
|
802
|
+
/** Physical item type */
|
|
803
|
+
PHYSICAL = "PHYSICAL",
|
|
804
|
+
/** Digital item type */
|
|
805
|
+
DIGITAL = "DIGITAL",
|
|
806
|
+
/** Custom item price */
|
|
807
|
+
CUSTOM_AMOUNT_ITEM = "CUSTOM_AMOUNT_ITEM"
|
|
808
|
+
}
|
|
809
|
+
export interface OptionSelection {
|
|
810
|
+
/** Option name */
|
|
811
|
+
option?: string;
|
|
812
|
+
/** Selected choice for this option */
|
|
813
|
+
selection?: string;
|
|
814
|
+
}
|
|
815
|
+
export interface CustomTextFieldSelection {
|
|
816
|
+
/** Custom text field name */
|
|
817
|
+
title?: string;
|
|
818
|
+
/** Custom text field value */
|
|
819
|
+
value?: string;
|
|
820
|
+
}
|
|
821
|
+
export interface MediaItem {
|
|
822
|
+
/**
|
|
823
|
+
* Media type
|
|
824
|
+
* @readonly
|
|
825
|
+
*/
|
|
826
|
+
mediaType?: MediaItemType;
|
|
827
|
+
/**
|
|
828
|
+
* Media URL
|
|
829
|
+
* @readonly
|
|
830
|
+
*/
|
|
831
|
+
url?: string;
|
|
832
|
+
/**
|
|
833
|
+
* Media item width
|
|
834
|
+
* @readonly
|
|
835
|
+
*/
|
|
836
|
+
width?: number;
|
|
837
|
+
/**
|
|
838
|
+
* Media item height
|
|
839
|
+
* @readonly
|
|
840
|
+
*/
|
|
841
|
+
height?: number;
|
|
842
|
+
/**
|
|
843
|
+
* Deprecated
|
|
844
|
+
* @deprecated
|
|
845
|
+
*/
|
|
846
|
+
mediaId?: string | null;
|
|
847
|
+
/** Media ID (for media items previously saved in Wix Media) */
|
|
848
|
+
id?: string | null;
|
|
849
|
+
/** Media external URL */
|
|
850
|
+
externalImageUrl?: string | null;
|
|
851
|
+
/** Alternative text for presentation when media cannot be displayed */
|
|
852
|
+
altText?: string | null;
|
|
853
|
+
}
|
|
854
|
+
export declare enum MediaItemType {
|
|
855
|
+
/** Media item type can't be classified, due to an error */
|
|
856
|
+
UNSPECIFIED_MEDIA_TYPE_ITEM = "UNSPECIFIED_MEDIA_TYPE_ITEM",
|
|
857
|
+
/** Image item type */
|
|
858
|
+
IMAGE = "IMAGE"
|
|
859
|
+
}
|
|
860
|
+
export interface LineItemPriceData {
|
|
861
|
+
/** Whether tax is included in the price set for this line item */
|
|
862
|
+
taxIncludedInPrice?: boolean;
|
|
863
|
+
/** Line item price */
|
|
864
|
+
price?: string;
|
|
865
|
+
/**
|
|
866
|
+
* Total price charged to the customer (per line item) after computation of quantity and discount
|
|
867
|
+
* @readonly
|
|
868
|
+
*/
|
|
869
|
+
totalPrice?: string | null;
|
|
870
|
+
}
|
|
871
|
+
export interface DigitalFile {
|
|
872
|
+
/** id of the secure file in media */
|
|
873
|
+
fileId?: string;
|
|
874
|
+
}
|
|
875
|
+
export interface Activity {
|
|
876
|
+
/**
|
|
877
|
+
* Activity item type
|
|
878
|
+
* @readonly
|
|
879
|
+
*/
|
|
880
|
+
type?: ActivityType;
|
|
881
|
+
/**
|
|
882
|
+
* Activity item author
|
|
883
|
+
* @readonly
|
|
884
|
+
*/
|
|
885
|
+
author?: string | null;
|
|
886
|
+
/**
|
|
887
|
+
* Comment added to activity item
|
|
888
|
+
* @readonly
|
|
889
|
+
*/
|
|
890
|
+
message?: string | null;
|
|
891
|
+
/**
|
|
892
|
+
* Activity item timestamp
|
|
893
|
+
* @readonly
|
|
894
|
+
*/
|
|
895
|
+
timestamp?: Date | null;
|
|
896
|
+
}
|
|
897
|
+
export declare enum ActivityType {
|
|
898
|
+
/** Activity item type can't be classified, due to an error */
|
|
899
|
+
UNSPECIFIED_ORDER_HISTORY_ITEM_TYPE = "UNSPECIFIED_ORDER_HISTORY_ITEM_TYPE",
|
|
900
|
+
/** Store owner added a comment */
|
|
901
|
+
MERCHANT_COMMENT = "MERCHANT_COMMENT",
|
|
902
|
+
/** Order placed */
|
|
903
|
+
ORDER_PLACED = "ORDER_PLACED",
|
|
904
|
+
/** Order marked as paid, either by the store owner (for offline orders), or when an online transaction was confirmed */
|
|
905
|
+
ORDER_PAID = "ORDER_PAID",
|
|
906
|
+
/** Order shipping status set as fulfilled */
|
|
907
|
+
ORDER_FULFILLED = "ORDER_FULFILLED",
|
|
908
|
+
/** Order shipping status set as not fulfilled */
|
|
909
|
+
ORDER_NOT_FULFILLED = "ORDER_NOT_FULFILLED",
|
|
910
|
+
/** A download link was sent (relevant for orders with digital line items) */
|
|
911
|
+
DOWNLOAD_LINK_SENT = "DOWNLOAD_LINK_SENT",
|
|
912
|
+
/** An email notification for pickup was sent */
|
|
913
|
+
PICKUP_READY_EMAIL_SENT = "PICKUP_READY_EMAIL_SENT",
|
|
914
|
+
/** Shipping tracking number was set */
|
|
915
|
+
TRACKING_NUMBER_ADDED = "TRACKING_NUMBER_ADDED",
|
|
916
|
+
/** Shipping tracking number was edited */
|
|
917
|
+
TRACKING_NUMBER_EDITED = "TRACKING_NUMBER_EDITED",
|
|
918
|
+
/** Shipping tracking link was set */
|
|
919
|
+
TRACKING_LINK_WAS_SET = "TRACKING_LINK_WAS_SET",
|
|
920
|
+
/** An email confirmation of order shipment was sent */
|
|
921
|
+
SHIPPING_CONFIRMATION_EMAIL_SENT = "SHIPPING_CONFIRMATION_EMAIL_SENT",
|
|
922
|
+
/** Invoice was set in the order */
|
|
923
|
+
INVOICE_WAS_SET = "INVOICE_WAS_SET",
|
|
924
|
+
/** Invoice was removed from the order */
|
|
925
|
+
INVOICE_WAS_REMOVED = "INVOICE_WAS_REMOVED",
|
|
926
|
+
/** Invoice was sent to customer via email */
|
|
927
|
+
INVOICE_WAS_SENT = "INVOICE_WAS_SENT",
|
|
928
|
+
/** Email was sent to fulfiller */
|
|
929
|
+
FULFILLER_EMAIL_SENT = "FULFILLER_EMAIL_SENT",
|
|
930
|
+
/** Shipping address was updated */
|
|
931
|
+
SHIPPING_ADDRESS_EDITED = "SHIPPING_ADDRESS_EDITED",
|
|
932
|
+
/** Order email was updated */
|
|
933
|
+
EMAIL_EDITED = "EMAIL_EDITED",
|
|
934
|
+
/** Order partially paid. During the checkout for orders with deposit items. */
|
|
935
|
+
ORDER_PARTIALLY_PAID = "ORDER_PARTIALLY_PAID"
|
|
936
|
+
}
|
|
937
|
+
export interface V2InvoiceInfo {
|
|
938
|
+
/** Invoice ID */
|
|
939
|
+
id?: string;
|
|
940
|
+
/** Invoice source */
|
|
941
|
+
source?: InvoiceSource;
|
|
942
|
+
}
|
|
943
|
+
export declare enum InvoiceSource {
|
|
944
|
+
/** Invoice source can't be classified, due to an error */
|
|
945
|
+
UNSPECIFIED_INVOICE_SOURCE = "UNSPECIFIED_INVOICE_SOURCE",
|
|
946
|
+
/** Invoice created using the Invoices API */
|
|
947
|
+
WIX = "WIX"
|
|
948
|
+
}
|
|
949
|
+
export interface Fulfillment {
|
|
950
|
+
/**
|
|
951
|
+
* Fulfillment ID (auto generated upon fulfillment creation).
|
|
952
|
+
* @readonly
|
|
953
|
+
*/
|
|
954
|
+
id?: string | null;
|
|
955
|
+
/**
|
|
956
|
+
* Fulfillment creation date and time.
|
|
957
|
+
* @readonly
|
|
958
|
+
*/
|
|
959
|
+
dateCreated?: Date | null;
|
|
960
|
+
/** Information about the line items in the fulfilled order. */
|
|
961
|
+
lineItems?: FulfillmentLineItem[];
|
|
962
|
+
/** Tracking information. */
|
|
963
|
+
trackingInfo?: FulfillmentTrackingInfo;
|
|
964
|
+
}
|
|
965
|
+
export interface FulfillmentLineItem {
|
|
966
|
+
/** Line item ID (mirrors the line item index of the order). */
|
|
967
|
+
index?: number;
|
|
968
|
+
/**
|
|
969
|
+
* Line item quantity.
|
|
970
|
+
* 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.
|
|
971
|
+
* 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.
|
|
972
|
+
* This property will always have a value when returned.
|
|
973
|
+
*/
|
|
974
|
+
quantity?: number | null;
|
|
975
|
+
}
|
|
976
|
+
export interface FulfillmentTrackingInfo {
|
|
977
|
+
/** Tracking number. */
|
|
978
|
+
trackingNumber?: string;
|
|
979
|
+
/**
|
|
980
|
+
* Shipping provider. Using the following shipping providers will allow for autofilling the tracking link:
|
|
981
|
+
* * `fedex`
|
|
982
|
+
* * `ups`
|
|
983
|
+
* * `usps`
|
|
984
|
+
* * `dhl`
|
|
985
|
+
* * `canadaPost`
|
|
986
|
+
*/
|
|
987
|
+
shippingProvider?: string;
|
|
988
|
+
/** Tracking link - autofilled if using a predefined shipping provider, otherwise provided on creation. */
|
|
989
|
+
trackingLink?: string | null;
|
|
990
|
+
}
|
|
991
|
+
export interface Discount {
|
|
992
|
+
/**
|
|
993
|
+
* Deprecated (use Totals.discount instead)
|
|
994
|
+
* @readonly
|
|
995
|
+
* @deprecated
|
|
996
|
+
*/
|
|
997
|
+
value?: string;
|
|
998
|
+
/** Applied coupon */
|
|
999
|
+
appliedCoupon?: AppliedCoupon;
|
|
1000
|
+
}
|
|
1001
|
+
export interface AppliedCoupon {
|
|
1002
|
+
/** Coupon ID */
|
|
1003
|
+
couponId?: string;
|
|
1004
|
+
/** Coupon name */
|
|
1005
|
+
name?: string;
|
|
1006
|
+
/** Coupon code */
|
|
1007
|
+
code?: string;
|
|
1008
|
+
}
|
|
1009
|
+
/** Custom field */
|
|
1010
|
+
export interface CustomField {
|
|
1011
|
+
/** Free text that the customer entered in the custom field during the checkout process */
|
|
1012
|
+
value?: string;
|
|
1013
|
+
/** Title for the custom field */
|
|
1014
|
+
title?: string;
|
|
1015
|
+
/** The title translated according to the buyer language */
|
|
1016
|
+
translatedTitle?: string;
|
|
1017
|
+
}
|
|
1018
|
+
export interface ChannelInfo {
|
|
1019
|
+
/** Sales channel that submitted the order */
|
|
1020
|
+
type?: ChannelType;
|
|
1021
|
+
/** Reference to an order ID from an external system, as defined in channelInfo (e.g., eBay or Amazon) */
|
|
1022
|
+
externalOrderId?: string | null;
|
|
1023
|
+
/** URL to the order in the external system, as defined in channelInfo (e.g., eBay or Amazon) */
|
|
1024
|
+
externalOrderUrl?: string | null;
|
|
1025
|
+
}
|
|
1026
|
+
export declare enum ChannelType {
|
|
1027
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
1028
|
+
WEB = "WEB",
|
|
1029
|
+
POS = "POS",
|
|
1030
|
+
EBAY = "EBAY",
|
|
1031
|
+
AMAZON = "AMAZON",
|
|
1032
|
+
OTHER_PLATFORM = "OTHER_PLATFORM",
|
|
1033
|
+
WIX_APP_STORE = "WIX_APP_STORE",
|
|
1034
|
+
WIX_INVOICES = "WIX_INVOICES",
|
|
1035
|
+
BACKOFFICE_MERCHANT = "BACKOFFICE_MERCHANT",
|
|
1036
|
+
WISH = "WISH",
|
|
1037
|
+
CLASS_PASS = "CLASS_PASS",
|
|
1038
|
+
GLOBAL_E = "GLOBAL_E",
|
|
1039
|
+
FACEBOOK = "FACEBOOK",
|
|
1040
|
+
ETSY = "ETSY",
|
|
1041
|
+
TIKTOK = "TIKTOK",
|
|
1042
|
+
FAIRE_COM = "FAIRE_COM"
|
|
1043
|
+
}
|
|
1044
|
+
export interface EnteredBy {
|
|
1045
|
+
id?: string;
|
|
1046
|
+
identityType?: EnteredByIdentityType;
|
|
1047
|
+
}
|
|
1048
|
+
export declare enum EnteredByIdentityType {
|
|
1049
|
+
USER = "USER",
|
|
1050
|
+
MEMBER = "MEMBER",
|
|
1051
|
+
CONTACT = "CONTACT",
|
|
1052
|
+
APP = "APP"
|
|
1053
|
+
}
|
|
1054
|
+
export interface SubscriptionInfo {
|
|
1055
|
+
/** Subscription ID. */
|
|
1056
|
+
id?: string | null;
|
|
1057
|
+
/** Current cycle number. For example, if the subscription is in the 3rd month of a 4-month subscription, the value will be `3`. */
|
|
1058
|
+
cycleNumber?: number;
|
|
1059
|
+
/** Subscription settings. */
|
|
1060
|
+
subscriptionSettings?: SubscriptionSettings;
|
|
1061
|
+
/** Subscription options info. */
|
|
1062
|
+
subscriptionOptionInfo?: SubscriptionOptionInfo;
|
|
1063
|
+
}
|
|
1064
|
+
export interface SubscriptionSettings {
|
|
1065
|
+
/** Frequency of recurring payment. */
|
|
1066
|
+
frequency?: SubscriptionFrequency;
|
|
1067
|
+
/** Whether subscription is renewed automatically at the end of each period. */
|
|
1068
|
+
autoRenewal?: boolean;
|
|
1069
|
+
/** Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */
|
|
1070
|
+
billingCycles?: number | null;
|
|
1071
|
+
}
|
|
1072
|
+
/** Frequency unit of recurring payment */
|
|
1073
|
+
export declare enum SubscriptionFrequency {
|
|
1074
|
+
UNDEFINED = "UNDEFINED",
|
|
1075
|
+
DAY = "DAY",
|
|
1076
|
+
WEEK = "WEEK",
|
|
1077
|
+
MONTH = "MONTH",
|
|
1078
|
+
YEAR = "YEAR"
|
|
1079
|
+
}
|
|
1080
|
+
export interface SubscriptionOptionInfo {
|
|
1081
|
+
/** Subscription option title. */
|
|
1082
|
+
title?: string;
|
|
1083
|
+
/** Subscription option description. */
|
|
1084
|
+
description?: string | null;
|
|
1085
|
+
}
|
|
1086
|
+
export interface V2Refund {
|
|
1087
|
+
/** Refund created timestamp. */
|
|
1088
|
+
dateCreated?: Date | null;
|
|
1089
|
+
/** Refund amount. */
|
|
1090
|
+
amount?: string;
|
|
1091
|
+
/** Reason for refund, given by user (optional). */
|
|
1092
|
+
reason?: string | null;
|
|
1093
|
+
/** Payment provider transaction ID. Used to find refund transaction info on the payment provider's side. */
|
|
1094
|
+
paymentProviderTransactionId?: string | null;
|
|
1095
|
+
/** Refund ID. */
|
|
1096
|
+
id?: string;
|
|
1097
|
+
/** Whether refund was made externally (on the payment provider's side). */
|
|
1098
|
+
externalRefund?: boolean;
|
|
1099
|
+
}
|
|
1100
|
+
export interface GiftCard {
|
|
1101
|
+
transactionId?: string;
|
|
1102
|
+
/**
|
|
1103
|
+
* giftcard internal ID
|
|
1104
|
+
* @deprecated giftcard internal ID
|
|
1105
|
+
* @targetRemovalDate 2024-12-31
|
|
1106
|
+
*/
|
|
1107
|
+
id?: string;
|
|
1108
|
+
/** giftcard provider appid */
|
|
1109
|
+
providerId?: string;
|
|
1110
|
+
/** giftcard amount */
|
|
1111
|
+
amount?: string;
|
|
1112
|
+
}
|
|
1113
|
+
/** Triggered when a payment is updated. */
|
|
1114
|
+
export interface PaymentsUpdated {
|
|
1115
|
+
/** Updated order transactions. */
|
|
1116
|
+
orderTransactions?: OrderTransactions;
|
|
1117
|
+
/** List of IDs of the updated payments. */
|
|
1118
|
+
paymentIds?: string[];
|
|
1119
|
+
/** List of IDs of the updated refunds. */
|
|
1120
|
+
refundIds?: string[];
|
|
1121
|
+
}
|
|
1122
|
+
/** Triggered when a refund is created. */
|
|
1123
|
+
export interface RefundCreated {
|
|
1124
|
+
/** Updated order transactions. */
|
|
1125
|
+
orderTransactions?: OrderTransactions;
|
|
1126
|
+
/** ID of the created refund. */
|
|
1127
|
+
refundId?: string;
|
|
1128
|
+
/** Inventory restock details as part of this refund.. */
|
|
1129
|
+
restockInfo?: RestockInfo;
|
|
1130
|
+
/** Whether to send a refund confirmation email to the customer. */
|
|
1131
|
+
sendOrderRefundedEmail?: boolean;
|
|
1132
|
+
/** Custom message added to the refund confirmation email. */
|
|
1133
|
+
customMessage?: string | null;
|
|
1134
|
+
/** Refunded line items and quantities that are part of the created refund. */
|
|
1135
|
+
refundItems?: RefundItem[];
|
|
1136
|
+
}
|
|
1137
|
+
export interface RestockInfo {
|
|
1138
|
+
/** Restock type. */
|
|
1139
|
+
type?: RestockType;
|
|
1140
|
+
/** Restocked line items and quantities. Only relevant for `{"type": "SOME_ITEMS"}`. */
|
|
1141
|
+
items?: RestockItem[];
|
|
1142
|
+
}
|
|
1143
|
+
export declare enum RestockType {
|
|
1144
|
+
NO_ITEMS = "NO_ITEMS",
|
|
1145
|
+
ALL_ITEMS = "ALL_ITEMS",
|
|
1146
|
+
SOME_ITEMS = "SOME_ITEMS"
|
|
1147
|
+
}
|
|
1148
|
+
export interface RestockItem {
|
|
1149
|
+
/** ID of the line item being restocked. */
|
|
1150
|
+
lineItemId?: string;
|
|
1151
|
+
/** Line item quantity being restocked. */
|
|
1152
|
+
quantity?: number;
|
|
1153
|
+
}
|
|
1154
|
+
export interface RefundCompleted {
|
|
1155
|
+
/** Order ID. */
|
|
1156
|
+
orderId?: string;
|
|
1157
|
+
/** Completed refund. */
|
|
1158
|
+
refund?: Refund;
|
|
1159
|
+
/** Refund side effects. */
|
|
1160
|
+
sideEffects?: RefundSideEffects;
|
|
1161
|
+
/** Order transactions after refund is completed. */
|
|
1162
|
+
orderTransactions?: OrderTransactions;
|
|
1163
|
+
}
|
|
1164
|
+
export interface RefundSideEffects {
|
|
1165
|
+
/** Inventory restock details as part of this refund. */
|
|
1166
|
+
restockInfo?: RestockInfo;
|
|
1167
|
+
/** Whether to send a refund confirmation email to the customer. */
|
|
1168
|
+
sendOrderRefundedEmail?: boolean;
|
|
1169
|
+
/** Custom message added to the refund confirmation email. */
|
|
1170
|
+
customMessage?: string | null;
|
|
1171
|
+
}
|
|
1172
|
+
export interface ListTransactionsForSingleOrderRequest {
|
|
1173
|
+
/** Order ID. */
|
|
1174
|
+
orderId: string;
|
|
1175
|
+
}
|
|
1176
|
+
export interface ListTransactionsForSingleOrderResponse {
|
|
1177
|
+
/** Order ID and its associated transactions. */
|
|
1178
|
+
orderTransactions?: OrderTransactions;
|
|
1179
|
+
}
|
|
1180
|
+
export interface ListTransactionsForMultipleOrdersRequest {
|
|
1181
|
+
/** Order IDs for which to retrieve transactions. */
|
|
1182
|
+
orderIds: string[];
|
|
1183
|
+
}
|
|
1184
|
+
export interface ListTransactionsForMultipleOrdersResponse {
|
|
1185
|
+
/** List of order IDs and their associated transactions. */
|
|
1186
|
+
orderTransactions?: OrderTransactions[];
|
|
1187
|
+
}
|
|
1188
|
+
export interface AddPaymentsRequest {
|
|
1189
|
+
/** Order ID. */
|
|
1190
|
+
orderId: string;
|
|
1191
|
+
/** Payments to be added to order. */
|
|
1192
|
+
payments: Payment[];
|
|
1193
|
+
}
|
|
1194
|
+
export interface AddPaymentsResponse {
|
|
1195
|
+
/** Order ID and its associated transactions. */
|
|
1196
|
+
orderTransactions?: OrderTransactions;
|
|
1197
|
+
/** IDs of added order payments. */
|
|
1198
|
+
paymentsIds?: string[];
|
|
1199
|
+
}
|
|
1200
|
+
export interface AddRefundRequest {
|
|
1201
|
+
/** Order ID this refunds related to */
|
|
1202
|
+
orderId?: string;
|
|
1203
|
+
/** Refund with refund transactions to be added to order. */
|
|
1204
|
+
refund?: Refund;
|
|
1205
|
+
/** Side effect details related to refund */
|
|
1206
|
+
sideEffects?: RefundSideEffects;
|
|
1207
|
+
}
|
|
1208
|
+
export interface AddRefundResponse {
|
|
1209
|
+
/** Order ID and its associated transactions. */
|
|
1210
|
+
orderTransactions?: OrderTransactions;
|
|
1211
|
+
/** Created refund ID */
|
|
1212
|
+
refundId?: string;
|
|
1213
|
+
}
|
|
1214
|
+
export interface UpdatePaymentStatusRequest {
|
|
1215
|
+
/** Order ID. */
|
|
1216
|
+
orderId: string;
|
|
1217
|
+
/** Payment ID. */
|
|
1218
|
+
paymentId: string;
|
|
1219
|
+
/** Payment status. */
|
|
1220
|
+
status?: TransactionStatus;
|
|
1221
|
+
}
|
|
1222
|
+
export interface UpdatePaymentStatusResponse {
|
|
1223
|
+
/** Order ID and its associated transactions after update. */
|
|
1224
|
+
orderTransactions?: OrderTransactions;
|
|
1225
|
+
}
|
|
1226
|
+
export interface BulkUpdatePaymentStatusesRequest {
|
|
1227
|
+
/** Order and payment IDs for which to update payment status. */
|
|
1228
|
+
paymentAndOrderIds: PaymentAndOrderId[];
|
|
1229
|
+
/** Whether to return the full payment entity (`results.item`) in the response. */
|
|
1230
|
+
returnFullEntity?: boolean;
|
|
1231
|
+
/** Payment status. */
|
|
1232
|
+
status?: TransactionStatus;
|
|
1233
|
+
}
|
|
1234
|
+
export interface PaymentAndOrderId {
|
|
1235
|
+
/** Order ID. */
|
|
1236
|
+
orderId?: string;
|
|
1237
|
+
/**
|
|
1238
|
+
* Payment ID.
|
|
1239
|
+
* todo: remove comment once UI will use BulkMarkOrderAsPaid
|
|
1240
|
+
*/
|
|
1241
|
+
paymentId?: string;
|
|
1242
|
+
}
|
|
1243
|
+
export interface BulkUpdatePaymentStatusesResponse {
|
|
1244
|
+
/** Bulk operation results. */
|
|
1245
|
+
results?: BulkPaymentResult[];
|
|
1246
|
+
/** Bulk operation metadata. */
|
|
1247
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
1248
|
+
}
|
|
1249
|
+
export interface BulkPaymentResult {
|
|
1250
|
+
/** Item metadata. */
|
|
1251
|
+
itemMetadata?: ItemMetadata;
|
|
1252
|
+
/** Updated payment. Returned if `return_full_entity` set to `true`. */
|
|
1253
|
+
item?: Payment;
|
|
1254
|
+
}
|
|
1255
|
+
export interface ItemMetadata {
|
|
1256
|
+
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
1257
|
+
id?: string | null;
|
|
1258
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
1259
|
+
originalIndex?: number;
|
|
1260
|
+
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
1261
|
+
success?: boolean;
|
|
1262
|
+
/** Details about the error in case of failure. */
|
|
1263
|
+
error?: ApplicationError;
|
|
1264
|
+
}
|
|
1265
|
+
export interface ApplicationError {
|
|
1266
|
+
/** Error code. */
|
|
1267
|
+
code?: string;
|
|
1268
|
+
/** Description of the error. */
|
|
1269
|
+
description?: string;
|
|
1270
|
+
/** Data related to the error. */
|
|
1271
|
+
data?: Record<string, any> | null;
|
|
1272
|
+
}
|
|
1273
|
+
export interface BulkActionMetadata {
|
|
1274
|
+
/** Number of items that were successfully processed. */
|
|
1275
|
+
totalSuccesses?: number;
|
|
1276
|
+
/** Number of items that couldn't be processed. */
|
|
1277
|
+
totalFailures?: number;
|
|
1278
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
1279
|
+
undetailedFailures?: number;
|
|
1280
|
+
}
|
|
1281
|
+
export interface UpdateRefundRequest {
|
|
1282
|
+
/** Order ID. */
|
|
1283
|
+
orderId?: string;
|
|
1284
|
+
/** Refund with updated field values. */
|
|
1285
|
+
refund?: Refund;
|
|
1286
|
+
}
|
|
1287
|
+
export interface UpdateRefundResponse {
|
|
1288
|
+
/** Refund after update. */
|
|
1289
|
+
refund?: Refund;
|
|
1290
|
+
/** Order transactions after update. */
|
|
1291
|
+
orderTransactions?: OrderTransactions;
|
|
1292
|
+
}
|
|
1293
|
+
export interface UpdateRefundTransactionRequest {
|
|
1294
|
+
}
|
|
1295
|
+
export interface UpdateRefundTransactionResponse {
|
|
1296
|
+
}
|
|
1297
|
+
export interface UpdatePaymentsRequest {
|
|
1298
|
+
}
|
|
1299
|
+
export interface MaskedPayment {
|
|
1300
|
+
}
|
|
1301
|
+
export interface UpdatePaymentsResponse {
|
|
1302
|
+
}
|
|
1303
|
+
export interface QueryOrderTransactionsRequest {
|
|
1304
|
+
}
|
|
1305
|
+
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
1306
|
+
/** 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`. */
|
|
1307
|
+
cursorPaging?: CursorPaging;
|
|
1308
|
+
/** 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) */
|
|
1309
|
+
filter?: Record<string, any> | null;
|
|
1310
|
+
/**
|
|
1311
|
+
* Sort object in the following format:
|
|
1312
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
1313
|
+
*/
|
|
1314
|
+
sort?: Sorting[];
|
|
1315
|
+
}
|
|
1316
|
+
/** @oneof */
|
|
1317
|
+
export interface CursorQueryPagingMethodOneOf {
|
|
1318
|
+
/** 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`. */
|
|
1319
|
+
cursorPaging?: CursorPaging;
|
|
1320
|
+
}
|
|
1321
|
+
export interface Sorting {
|
|
1322
|
+
/** Name of the field to sort by. */
|
|
1323
|
+
fieldName?: string;
|
|
1324
|
+
/** Sort order. */
|
|
1325
|
+
order?: SortOrder;
|
|
1326
|
+
}
|
|
1327
|
+
export declare enum SortOrder {
|
|
1328
|
+
/** Ascending order. */
|
|
1329
|
+
ASC = "ASC",
|
|
1330
|
+
/** Descending order. */
|
|
1331
|
+
DESC = "DESC"
|
|
1332
|
+
}
|
|
1333
|
+
export interface CursorPaging {
|
|
1334
|
+
/** Maximum number of items to return in the results. */
|
|
1335
|
+
limit?: number | null;
|
|
1336
|
+
/**
|
|
1337
|
+
* Pointer to the next or previous page in the list of results.
|
|
1338
|
+
*
|
|
1339
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
1340
|
+
* Not relevant for the first request.
|
|
1341
|
+
*/
|
|
1342
|
+
cursor?: string | null;
|
|
1343
|
+
}
|
|
1344
|
+
export interface QueryOrderTransactionsResponse {
|
|
1345
|
+
}
|
|
1346
|
+
export interface CursorPagingMetadata {
|
|
1347
|
+
/** Number of items returned in the response. */
|
|
1348
|
+
count?: number | null;
|
|
1349
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
1350
|
+
cursors?: Cursors;
|
|
1351
|
+
/**
|
|
1352
|
+
* Whether there are more pages to retrieve following the current page.
|
|
1353
|
+
*
|
|
1354
|
+
* + `true`: Another page of results can be retrieved.
|
|
1355
|
+
* + `false`: This is the last page.
|
|
1356
|
+
*/
|
|
1357
|
+
hasNext?: boolean | null;
|
|
1358
|
+
}
|
|
1359
|
+
export interface Cursors {
|
|
1360
|
+
/** Cursor string pointing to the next page in the list of results. */
|
|
1361
|
+
next?: string | null;
|
|
1362
|
+
/** Cursor pointing to the previous page in the list of results. */
|
|
1363
|
+
prev?: string | null;
|
|
1364
|
+
}
|
|
1365
|
+
export interface TriggerRefundRequest {
|
|
1366
|
+
/** The order this refund related to */
|
|
1367
|
+
orderId?: string;
|
|
1368
|
+
/**
|
|
1369
|
+
* Refund operations information
|
|
1370
|
+
* Currently, only *one* payment refund is supported per request
|
|
1371
|
+
*/
|
|
1372
|
+
payments?: PaymentRefund[];
|
|
1373
|
+
/** Business model of a refund */
|
|
1374
|
+
details?: RefundDetails;
|
|
1375
|
+
/** How to restock items as part of this refund */
|
|
1376
|
+
restockInfo?: RestockInfo;
|
|
1377
|
+
/** Should send a confirmation mail to the customer */
|
|
1378
|
+
sendOrderRefundedEmail?: boolean;
|
|
1379
|
+
/** Personal note added to the email */
|
|
1380
|
+
customMessage?: string | null;
|
|
1381
|
+
}
|
|
1382
|
+
export interface PaymentRefund {
|
|
1383
|
+
/** Specific payment within the order to refund */
|
|
1384
|
+
paymentId?: string;
|
|
1385
|
+
/** Refund amount. Not relevant for membership and gift card refunds. */
|
|
1386
|
+
amount?: Price;
|
|
1387
|
+
/**
|
|
1388
|
+
* Whether refund is made externally and manually (on the payment provider's side)
|
|
1389
|
+
* 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.
|
|
1390
|
+
* When true, the payment will only be *marked* as refunded, and no actual refund will be performed.
|
|
1391
|
+
*/
|
|
1392
|
+
externalRefund?: boolean;
|
|
1393
|
+
}
|
|
1394
|
+
export interface TriggerRefundResponse {
|
|
1395
|
+
/** All order's transactions after the refunds were added */
|
|
1396
|
+
orderTransactions?: OrderTransactions;
|
|
1397
|
+
/** Created refund ID */
|
|
1398
|
+
refundId?: string;
|
|
1399
|
+
}
|
|
1400
|
+
export interface CalculateRefundRequest {
|
|
1401
|
+
/** Order ID */
|
|
1402
|
+
orderId?: string;
|
|
1403
|
+
/** Refunded line items and quantity */
|
|
1404
|
+
refundItems?: CalculateRefundItemRequest[];
|
|
1405
|
+
/** Should include shipping in refund calculation */
|
|
1406
|
+
refundShipping?: boolean;
|
|
1407
|
+
}
|
|
1408
|
+
export interface CalculateRefundItemRequest {
|
|
1409
|
+
/** ID of the line item being refunded */
|
|
1410
|
+
lineItemId?: string;
|
|
1411
|
+
/** How much of that line item is being refunded */
|
|
1412
|
+
quantity?: number;
|
|
1413
|
+
/** Should this item be restocked (used for validation purposes) */
|
|
1414
|
+
restock?: boolean;
|
|
1415
|
+
}
|
|
1416
|
+
export interface CalculateRefundResponse {
|
|
1417
|
+
/** Total refundable amount */
|
|
1418
|
+
total?: string;
|
|
1419
|
+
/** Tax cost of the order */
|
|
1420
|
+
tax?: string;
|
|
1421
|
+
/** Discount given for this order */
|
|
1422
|
+
discount?: string;
|
|
1423
|
+
/** Total cost of the order (without tax) */
|
|
1424
|
+
subtotal?: string;
|
|
1425
|
+
/** Previous refund given on that order */
|
|
1426
|
+
previouslyRefundedAmount?: string | null;
|
|
1427
|
+
/** The refundable items of that order */
|
|
1428
|
+
items?: CalculateRefundItemResponse[];
|
|
1429
|
+
}
|
|
1430
|
+
export interface CalculateRefundItemResponse {
|
|
1431
|
+
/** Line item ID */
|
|
1432
|
+
lineItemId?: string;
|
|
1433
|
+
/** The line item's price */
|
|
1434
|
+
lineItemPrice?: number;
|
|
1435
|
+
}
|
|
1436
|
+
export interface GetRefundabilityStatusRequest {
|
|
1437
|
+
/** Order ID. */
|
|
1438
|
+
orderId?: string;
|
|
1439
|
+
}
|
|
1440
|
+
export interface GetRefundabilityStatusResponse {
|
|
1441
|
+
/** Refundability details. */
|
|
1442
|
+
refundabilities?: Refundability[];
|
|
1443
|
+
/** Whether the order supports refunding per item. */
|
|
1444
|
+
refundablePerItem?: boolean;
|
|
1445
|
+
}
|
|
1446
|
+
export interface Refundability extends RefundabilityAdditionalRefundabilityInfoOneOf {
|
|
1447
|
+
/** Reason why payment is not refundable. */
|
|
1448
|
+
nonRefundableReason?: NonRefundableReason;
|
|
1449
|
+
/** Reason why payment is only refundable manually. */
|
|
1450
|
+
manuallyRefundableReason?: ManuallyRefundableReason;
|
|
1451
|
+
/** Payment ID. */
|
|
1452
|
+
paymentId?: string;
|
|
1453
|
+
/** Payment refundability status. */
|
|
1454
|
+
refundabilityStatus?: RefundableStatus;
|
|
1455
|
+
/** Link to payment provider dashboard. */
|
|
1456
|
+
providerLink?: string | null;
|
|
1457
|
+
}
|
|
1458
|
+
/** @oneof */
|
|
1459
|
+
export interface RefundabilityAdditionalRefundabilityInfoOneOf {
|
|
1460
|
+
/** Reason why payment is not refundable. */
|
|
1461
|
+
nonRefundableReason?: NonRefundableReason;
|
|
1462
|
+
/** Reason why payment is only refundable manually. */
|
|
1463
|
+
manuallyRefundableReason?: ManuallyRefundableReason;
|
|
1464
|
+
}
|
|
1465
|
+
export declare enum RefundableStatus {
|
|
1466
|
+
/** Not refundable. */
|
|
1467
|
+
NOT_REFUNDABLE = "NOT_REFUNDABLE",
|
|
1468
|
+
/** Refundable manually. */
|
|
1469
|
+
MANUAL = "MANUAL",
|
|
1470
|
+
/** Refundable. */
|
|
1471
|
+
REFUNDABLE = "REFUNDABLE"
|
|
1472
|
+
}
|
|
1473
|
+
export declare enum NonRefundableReason {
|
|
1474
|
+
/** No reason. */
|
|
1475
|
+
NONE = "NONE",
|
|
1476
|
+
/** Payment already refunded. */
|
|
1477
|
+
ALREADY_REFUNDED = "ALREADY_REFUNDED",
|
|
1478
|
+
/** Payment provider is down. */
|
|
1479
|
+
PROVIDER_IS_DOWN = "PROVIDER_IS_DOWN",
|
|
1480
|
+
/** Internal error occurred. */
|
|
1481
|
+
INTERNAL_ERROR = "INTERNAL_ERROR",
|
|
1482
|
+
/** Payment not made. */
|
|
1483
|
+
NOT_PAID = "NOT_PAID",
|
|
1484
|
+
/** Access denied. */
|
|
1485
|
+
ACCESS_DENIED = "ACCESS_DENIED",
|
|
1486
|
+
/** Payment amount is zero. */
|
|
1487
|
+
ZERO_PRICE = "ZERO_PRICE",
|
|
1488
|
+
/** Disabled by provider. */
|
|
1489
|
+
DISABLED_BY_PROVIDER = "DISABLED_BY_PROVIDER",
|
|
1490
|
+
/** Payment partially paid. */
|
|
1491
|
+
PARTIALLY_PAID = "PARTIALLY_PAID",
|
|
1492
|
+
/** Deposit for online item. */
|
|
1493
|
+
DEPOSIT_ONLINE_ITEM = "DEPOSIT_ONLINE_ITEM",
|
|
1494
|
+
/** Refund is pending. */
|
|
1495
|
+
PENDING_REFUND = "PENDING_REFUND",
|
|
1496
|
+
/** Action forbidden. */
|
|
1497
|
+
FORBIDDEN = "FORBIDDEN"
|
|
1498
|
+
}
|
|
1499
|
+
export declare enum ManuallyRefundableReason {
|
|
1500
|
+
/** Payment expired. */
|
|
1501
|
+
EXPIRED = "EXPIRED",
|
|
1502
|
+
/** Payment method not supported. */
|
|
1503
|
+
NOT_SUPPORTED = "NOT_SUPPORTED",
|
|
1504
|
+
/** Payment not found. */
|
|
1505
|
+
NOT_FOUND = "NOT_FOUND",
|
|
1506
|
+
/** Payment made offline. */
|
|
1507
|
+
OFFLINE = "OFFLINE",
|
|
1508
|
+
/** Refund requires interaction with card reader. */
|
|
1509
|
+
REQUIRES_CARD_READER = "REQUIRES_CARD_READER"
|
|
1510
|
+
}
|
|
1511
|
+
export interface ListInvoicesForSingleOrderRequest {
|
|
1512
|
+
/** Order ID. */
|
|
1513
|
+
orderId?: string;
|
|
1514
|
+
}
|
|
1515
|
+
export interface ListInvoicesForSingleOrderResponse {
|
|
1516
|
+
/** List of invoices. */
|
|
1517
|
+
invoices?: InvoiceInfo[];
|
|
1518
|
+
}
|
|
1519
|
+
export interface InvoiceInfo {
|
|
1520
|
+
/** Invoice ID. */
|
|
1521
|
+
id?: string;
|
|
1522
|
+
/** ID of the app that set the invoice. */
|
|
1523
|
+
appId?: string;
|
|
1524
|
+
/**
|
|
1525
|
+
* Invoice URL.
|
|
1526
|
+
* @deprecated
|
|
1527
|
+
*/
|
|
1528
|
+
url?: string | null;
|
|
1529
|
+
/**
|
|
1530
|
+
* Invoice creation date and time.
|
|
1531
|
+
* @deprecated
|
|
1532
|
+
*/
|
|
1533
|
+
createdDate?: Date | null;
|
|
1534
|
+
}
|
|
1535
|
+
export interface ListInvoicesForMultipleOrdersRequest {
|
|
1536
|
+
/** Order IDs for which to retrieve invoices. */
|
|
1537
|
+
orderIds?: string[];
|
|
1538
|
+
}
|
|
1539
|
+
export interface ListInvoicesForMultipleOrdersResponse {
|
|
1540
|
+
/** List of order IDs and their associated invoices. */
|
|
1541
|
+
invoicesForOrder?: InvoicesForOrder[];
|
|
1542
|
+
}
|
|
1543
|
+
export interface InvoicesForOrder {
|
|
1544
|
+
/** Order ID. */
|
|
1545
|
+
orderId?: string;
|
|
1546
|
+
/** Invoices info. */
|
|
1547
|
+
invoicesInfo?: InvoiceInfo[];
|
|
1548
|
+
}
|
|
1549
|
+
export interface GenerateInvoiceRequest {
|
|
1550
|
+
/** Order ID. */
|
|
1551
|
+
orderId?: string;
|
|
1552
|
+
}
|
|
1553
|
+
export interface GenerateInvoiceResponse {
|
|
1554
|
+
/** Invoice ID. */
|
|
1555
|
+
invoiceId?: string;
|
|
1556
|
+
}
|
|
1557
|
+
export interface BulkGenerateInvoicesRequest {
|
|
1558
|
+
/** Order IDs. */
|
|
1559
|
+
orderIds?: string[];
|
|
1560
|
+
}
|
|
1561
|
+
export interface BulkGenerateInvoicesResponse {
|
|
1562
|
+
results?: BulkInvoiceResult[];
|
|
1563
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
1564
|
+
}
|
|
1565
|
+
export interface BulkInvoiceResult {
|
|
1566
|
+
itemMetadata?: ItemMetadata;
|
|
1567
|
+
item?: InvoiceForOrder;
|
|
1568
|
+
}
|
|
1569
|
+
export interface InvoiceForOrder {
|
|
1570
|
+
/** Order ID. */
|
|
1571
|
+
orderId?: string;
|
|
1572
|
+
/** Invoice ID. */
|
|
1573
|
+
invoiceId?: string;
|
|
1574
|
+
}
|
|
1575
|
+
export interface AddInvoiceToOrderRequest {
|
|
1576
|
+
/** Order ID. */
|
|
1577
|
+
orderId?: string;
|
|
1578
|
+
/** Invoice info. */
|
|
1579
|
+
invoiceInfo?: InvoiceInfo;
|
|
1580
|
+
}
|
|
1581
|
+
export interface AddInvoiceToOrderResponse {
|
|
1582
|
+
/** List of order invoices. */
|
|
1583
|
+
orderInvoices?: InvoiceInfo[];
|
|
1584
|
+
}
|
|
1585
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
1586
|
+
createdEvent?: EntityCreatedEvent;
|
|
1587
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
1588
|
+
deletedEvent?: EntityDeletedEvent;
|
|
1589
|
+
actionEvent?: ActionEvent;
|
|
1590
|
+
/**
|
|
1591
|
+
* Unique event ID.
|
|
1592
|
+
* Allows clients to ignore duplicate webhooks.
|
|
1593
|
+
*/
|
|
1594
|
+
id?: string;
|
|
1595
|
+
/**
|
|
1596
|
+
* Assumes actions are also always typed to an entity_type
|
|
1597
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
1598
|
+
*/
|
|
1599
|
+
entityFqdn?: string;
|
|
1600
|
+
/**
|
|
1601
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
1602
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
1603
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
1604
|
+
*/
|
|
1605
|
+
slug?: string;
|
|
1606
|
+
/** ID of the entity associated with the event. */
|
|
1607
|
+
entityId?: string;
|
|
1608
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
1609
|
+
eventTime?: Date | null;
|
|
1610
|
+
/**
|
|
1611
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
1612
|
+
* (for example, GDPR).
|
|
1613
|
+
*/
|
|
1614
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
1615
|
+
/** If present, indicates the action that triggered the event. */
|
|
1616
|
+
originatedFrom?: string | null;
|
|
1617
|
+
/**
|
|
1618
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
1619
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
1620
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
1621
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
1622
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
1623
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
1624
|
+
*/
|
|
1625
|
+
entityEventSequence?: string | null;
|
|
1626
|
+
}
|
|
1627
|
+
/** @oneof */
|
|
1628
|
+
export interface DomainEventBodyOneOf {
|
|
1629
|
+
createdEvent?: EntityCreatedEvent;
|
|
1630
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
1631
|
+
deletedEvent?: EntityDeletedEvent;
|
|
1632
|
+
actionEvent?: ActionEvent;
|
|
1633
|
+
}
|
|
1634
|
+
export interface EntityCreatedEvent {
|
|
1635
|
+
entityAsJson?: string;
|
|
1636
|
+
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
1637
|
+
restoreInfo?: RestoreInfo;
|
|
1638
|
+
}
|
|
1639
|
+
export interface RestoreInfo {
|
|
1640
|
+
deletedDate?: Date | null;
|
|
1641
|
+
}
|
|
1642
|
+
export interface EntityUpdatedEvent {
|
|
1643
|
+
/**
|
|
1644
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
1645
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
1646
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
1647
|
+
*/
|
|
1648
|
+
currentEntityAsJson?: string;
|
|
1649
|
+
}
|
|
1650
|
+
export interface EntityDeletedEvent {
|
|
1651
|
+
/** Entity that was deleted */
|
|
1652
|
+
deletedEntityAsJson?: string | null;
|
|
1653
|
+
}
|
|
1654
|
+
export interface ActionEvent {
|
|
1655
|
+
bodyAsJson?: string;
|
|
1656
|
+
}
|
|
1657
|
+
export interface MessageEnvelope {
|
|
1658
|
+
/** App instance ID. */
|
|
1659
|
+
instanceId?: string | null;
|
|
1660
|
+
/** Event type. */
|
|
1661
|
+
eventType?: string;
|
|
1662
|
+
/** The identification type and identity data. */
|
|
1663
|
+
identity?: IdentificationData;
|
|
1664
|
+
/** Stringify payload. */
|
|
1665
|
+
data?: string;
|
|
1666
|
+
}
|
|
1667
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1668
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
1669
|
+
anonymousVisitorId?: string;
|
|
1670
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
1671
|
+
memberId?: string;
|
|
1672
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1673
|
+
wixUserId?: string;
|
|
1674
|
+
/** ID of an app. */
|
|
1675
|
+
appId?: string;
|
|
1676
|
+
/** @readonly */
|
|
1677
|
+
identityType?: WebhookIdentityType;
|
|
1678
|
+
}
|
|
1679
|
+
/** @oneof */
|
|
1680
|
+
export interface IdentificationDataIdOneOf {
|
|
1681
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
1682
|
+
anonymousVisitorId?: string;
|
|
1683
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
1684
|
+
memberId?: string;
|
|
1685
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1686
|
+
wixUserId?: string;
|
|
1687
|
+
/** ID of an app. */
|
|
1688
|
+
appId?: string;
|
|
1689
|
+
}
|
|
1690
|
+
export declare enum WebhookIdentityType {
|
|
1691
|
+
UNKNOWN = "UNKNOWN",
|
|
1692
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1693
|
+
MEMBER = "MEMBER",
|
|
1694
|
+
WIX_USER = "WIX_USER",
|
|
1695
|
+
APP = "APP"
|
|
1696
|
+
}
|
|
1697
|
+
interface PriceNonNullableFields {
|
|
1698
|
+
amount: string;
|
|
1699
|
+
formattedAmount: string;
|
|
1700
|
+
}
|
|
1701
|
+
interface AuthorizationActionFailureDetailsNonNullableFields {
|
|
1702
|
+
failureCode: string;
|
|
1703
|
+
}
|
|
1704
|
+
interface AuthorizationCaptureNonNullableFields {
|
|
1705
|
+
status: AuthorizationCaptureStatus;
|
|
1706
|
+
amount?: PriceNonNullableFields;
|
|
1707
|
+
failureDetails?: AuthorizationActionFailureDetailsNonNullableFields;
|
|
1708
|
+
}
|
|
1709
|
+
interface AuthorizationVoidNonNullableFields {
|
|
1710
|
+
status: AuthorizationVoidStatus;
|
|
1711
|
+
failureDetails?: AuthorizationActionFailureDetailsNonNullableFields;
|
|
1712
|
+
reason: Reason;
|
|
1713
|
+
}
|
|
1714
|
+
interface ScheduledActionNonNullableFields {
|
|
1715
|
+
actionType: ActionType;
|
|
1716
|
+
}
|
|
1717
|
+
interface AuthorizationDetailsNonNullableFields {
|
|
1718
|
+
delayedCapture: boolean;
|
|
1719
|
+
captures: AuthorizationCaptureNonNullableFields[];
|
|
1720
|
+
void?: AuthorizationVoidNonNullableFields;
|
|
1721
|
+
scheduledAction?: ScheduledActionNonNullableFields;
|
|
1722
|
+
}
|
|
1723
|
+
interface RegularPaymentDetailsNonNullableFields {
|
|
1724
|
+
offlinePayment: boolean;
|
|
1725
|
+
status: TransactionStatus;
|
|
1726
|
+
savedPaymentMethod: boolean;
|
|
1727
|
+
authorizationDetails?: AuthorizationDetailsNonNullableFields;
|
|
1728
|
+
}
|
|
1729
|
+
interface GiftCardPaymentDetailsNonNullableFields {
|
|
1730
|
+
giftCardPaymentId: string;
|
|
1731
|
+
giftCardId: string;
|
|
1732
|
+
appId: string;
|
|
1733
|
+
voided: boolean;
|
|
1734
|
+
}
|
|
1735
|
+
interface MembershipNameNonNullableFields {
|
|
1736
|
+
original: string;
|
|
1737
|
+
}
|
|
1738
|
+
interface MembershipPaymentDetailsNonNullableFields {
|
|
1739
|
+
membershipId: string;
|
|
1740
|
+
lineItemId: string;
|
|
1741
|
+
status: MembershipPaymentStatus;
|
|
1742
|
+
name?: MembershipNameNonNullableFields;
|
|
1743
|
+
voided: boolean;
|
|
1744
|
+
providerAppId: string;
|
|
1745
|
+
}
|
|
1746
|
+
interface PaymentNonNullableFields {
|
|
1747
|
+
regularPaymentDetails?: RegularPaymentDetailsNonNullableFields;
|
|
1748
|
+
giftcardPaymentDetails?: GiftCardPaymentDetailsNonNullableFields;
|
|
1749
|
+
membershipPaymentDetails?: MembershipPaymentDetailsNonNullableFields;
|
|
1750
|
+
amount?: PriceNonNullableFields;
|
|
1751
|
+
refundDisabled: boolean;
|
|
1752
|
+
}
|
|
1753
|
+
interface RefundTransactionNonNullableFields {
|
|
1754
|
+
paymentId: string;
|
|
1755
|
+
amount?: PriceNonNullableFields;
|
|
1756
|
+
refundStatus: RefundStatus;
|
|
1757
|
+
externalRefund: boolean;
|
|
1758
|
+
}
|
|
1759
|
+
interface RefundItemNonNullableFields {
|
|
1760
|
+
lineItemId: string;
|
|
1761
|
+
quantity: number;
|
|
1762
|
+
}
|
|
1763
|
+
interface RefundDetailsNonNullableFields {
|
|
1764
|
+
items: RefundItemNonNullableFields[];
|
|
1765
|
+
shippingIncluded: boolean;
|
|
1766
|
+
}
|
|
1767
|
+
interface RefundNonNullableFields {
|
|
1768
|
+
id: string;
|
|
1769
|
+
transactions: RefundTransactionNonNullableFields[];
|
|
1770
|
+
details?: RefundDetailsNonNullableFields;
|
|
1771
|
+
}
|
|
1772
|
+
interface OrderTransactionsNonNullableFields {
|
|
1773
|
+
orderId: string;
|
|
1774
|
+
payments: PaymentNonNullableFields[];
|
|
1775
|
+
refunds: RefundNonNullableFields[];
|
|
1776
|
+
}
|
|
1777
|
+
export interface ListTransactionsForSingleOrderResponseNonNullableFields {
|
|
1778
|
+
orderTransactions?: OrderTransactionsNonNullableFields;
|
|
1779
|
+
}
|
|
1780
|
+
export interface ListTransactionsForMultipleOrdersResponseNonNullableFields {
|
|
1781
|
+
orderTransactions: OrderTransactionsNonNullableFields[];
|
|
1782
|
+
}
|
|
1783
|
+
export interface AddPaymentsResponseNonNullableFields {
|
|
1784
|
+
orderTransactions?: OrderTransactionsNonNullableFields;
|
|
1785
|
+
paymentsIds: string[];
|
|
1786
|
+
}
|
|
1787
|
+
export interface UpdatePaymentStatusResponseNonNullableFields {
|
|
1788
|
+
orderTransactions?: OrderTransactionsNonNullableFields;
|
|
1789
|
+
}
|
|
1790
|
+
interface ApplicationErrorNonNullableFields {
|
|
1791
|
+
code: string;
|
|
1792
|
+
description: string;
|
|
1793
|
+
}
|
|
1794
|
+
interface ItemMetadataNonNullableFields {
|
|
1795
|
+
originalIndex: number;
|
|
1796
|
+
success: boolean;
|
|
1797
|
+
error?: ApplicationErrorNonNullableFields;
|
|
1798
|
+
}
|
|
1799
|
+
interface BulkPaymentResultNonNullableFields {
|
|
1800
|
+
itemMetadata?: ItemMetadataNonNullableFields;
|
|
1801
|
+
item?: PaymentNonNullableFields;
|
|
1802
|
+
}
|
|
1803
|
+
interface BulkActionMetadataNonNullableFields {
|
|
1804
|
+
totalSuccesses: number;
|
|
1805
|
+
totalFailures: number;
|
|
1806
|
+
undetailedFailures: number;
|
|
1807
|
+
}
|
|
1808
|
+
export interface BulkUpdatePaymentStatusesResponseNonNullableFields {
|
|
1809
|
+
results: BulkPaymentResultNonNullableFields[];
|
|
1810
|
+
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
|
|
1811
|
+
}
|
|
1812
|
+
export interface UpdateRefundTransactionResponseNonNullableFields {
|
|
1813
|
+
}
|
|
1814
|
+
export interface UpdatePaymentsResponseNonNullableFields {
|
|
1815
|
+
}
|
|
1816
|
+
export {};
|