@wix/auto_sdk_get-paid_receipts 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/receipts-v1-receipt-receipts.context.d.ts +11 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.context.js +21 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.context.js.map +1 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.http.d.ts +28 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.http.js +286 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.http.js.map +1 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.meta.d.ts +27 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.meta.js +161 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.meta.js.map +1 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.public.d.ts +72 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.public.js +56 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.public.js.map +1 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.types.d.ts +915 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.types.js +60 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.types.js.map +1 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.universal.d.ts +1072 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.universal.js +446 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.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/receipts-v1-receipt-receipts.context.d.ts +11 -0
- package/build/es/src/receipts-v1-receipt-receipts.context.js +11 -0
- package/build/es/src/receipts-v1-receipt-receipts.context.js.map +1 -0
- package/build/es/src/receipts-v1-receipt-receipts.http.d.ts +28 -0
- package/build/es/src/receipts-v1-receipt-receipts.http.js +276 -0
- package/build/es/src/receipts-v1-receipt-receipts.http.js.map +1 -0
- package/build/es/src/receipts-v1-receipt-receipts.meta.d.ts +27 -0
- package/build/es/src/receipts-v1-receipt-receipts.meta.js +128 -0
- package/build/es/src/receipts-v1-receipt-receipts.meta.js.map +1 -0
- package/build/es/src/receipts-v1-receipt-receipts.public.d.ts +72 -0
- package/build/es/src/receipts-v1-receipt-receipts.public.js +39 -0
- package/build/es/src/receipts-v1-receipt-receipts.public.js.map +1 -0
- package/build/es/src/receipts-v1-receipt-receipts.types.d.ts +915 -0
- package/build/es/src/receipts-v1-receipt-receipts.types.js +57 -0
- package/build/es/src/receipts-v1-receipt-receipts.types.js.map +1 -0
- package/build/es/src/receipts-v1-receipt-receipts.universal.d.ts +1072 -0
- package/build/es/src/receipts-v1-receipt-receipts.universal.js +413 -0
- package/build/es/src/receipts-v1-receipt-receipts.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/receipts-v1-receipt-receipts.context.d.ts +11 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.context.js +21 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.context.js.map +1 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.http.d.ts +28 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.http.js +286 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.http.js.map +1 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.meta.d.ts +27 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.meta.js +161 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.meta.js.map +1 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.public.d.ts +72 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.public.js +56 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.public.js.map +1 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.types.d.ts +915 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.types.js +60 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.types.js.map +1 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.universal.d.ts +1072 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.universal.js +446 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.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/receipts-v1-receipt-receipts.context.d.ts +11 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.context.js +11 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.context.js.map +1 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.http.d.ts +28 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.http.js +276 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.http.js.map +1 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.meta.d.ts +27 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.meta.js +128 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.meta.js.map +1 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.public.d.ts +72 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.public.js +39 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.public.js.map +1 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.types.d.ts +915 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.types.js +57 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.types.js.map +1 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.universal.d.ts +1072 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.universal.js +413 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,1072 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A Receipt is a document acknowledging that a person has received money or property in payment following a sale or
|
|
3
|
+
* other transfer of goods or provision of a service.
|
|
4
|
+
* Read more about Receipts
|
|
5
|
+
* in this [article](https://support.wix.com/en/article/wix-receipts-adding-and-setting-up-your-receipts).
|
|
6
|
+
*/
|
|
7
|
+
export interface Receipt {
|
|
8
|
+
/**
|
|
9
|
+
* Receipt Id.
|
|
10
|
+
* @readonly
|
|
11
|
+
*/
|
|
12
|
+
_id?: string | null;
|
|
13
|
+
/**
|
|
14
|
+
* Revision number, which increments by 1 each time the Receipt is updated.
|
|
15
|
+
* To prevent conflicting changes,
|
|
16
|
+
* the current revision must be passed when updating the Receipt.
|
|
17
|
+
*
|
|
18
|
+
* Ignored when creating a Receipt.
|
|
19
|
+
* @readonly
|
|
20
|
+
*/
|
|
21
|
+
revision?: string | null;
|
|
22
|
+
/**
|
|
23
|
+
* Date and time the Receipt was created.
|
|
24
|
+
* @readonly
|
|
25
|
+
*/
|
|
26
|
+
_createdDate?: Date | null;
|
|
27
|
+
/**
|
|
28
|
+
* Date and time the Receipt was last updated.
|
|
29
|
+
* Receipt updates are only related to number allocation, document generation but not related to the receipt financial
|
|
30
|
+
* document information changes.
|
|
31
|
+
* @readonly
|
|
32
|
+
*/
|
|
33
|
+
_updatedDate?: Date | null;
|
|
34
|
+
/**
|
|
35
|
+
* Receipt numbering.
|
|
36
|
+
* @readonly
|
|
37
|
+
*/
|
|
38
|
+
numbering?: Numbering;
|
|
39
|
+
/**
|
|
40
|
+
* Regional properties pertaining to the receipt.
|
|
41
|
+
* The defaults are taken from the site properties if regional properties are not populated.
|
|
42
|
+
*/
|
|
43
|
+
regionalProperties?: RegionalProperties;
|
|
44
|
+
/** Currency code in [ISO-4217 alphabetic](https://www.iso.org/iso-4217-currency-codes.html) format. */
|
|
45
|
+
currency?: string;
|
|
46
|
+
/** Source reference text. */
|
|
47
|
+
sourceReference?: SourceReference;
|
|
48
|
+
/**
|
|
49
|
+
* Business details.
|
|
50
|
+
* The defaults are taken from the site properties if business details are not populated.
|
|
51
|
+
*/
|
|
52
|
+
businessDetails?: BusinessDetails;
|
|
53
|
+
/** Customer for which this receipt was issued. */
|
|
54
|
+
customer?: Customer;
|
|
55
|
+
/** Line items. */
|
|
56
|
+
lineItems?: LineItem[];
|
|
57
|
+
/** Shipping info. */
|
|
58
|
+
shippingInfo?: ShippingInfo;
|
|
59
|
+
/** Additional fees. */
|
|
60
|
+
additionalFees?: AdditionalFee[];
|
|
61
|
+
/** Discounts. */
|
|
62
|
+
discounts?: Discount[];
|
|
63
|
+
/** Payment. */
|
|
64
|
+
payment?: Payment;
|
|
65
|
+
/** Summaries of totals including tax, shipping, additional fees and discounts. */
|
|
66
|
+
totals?: Totals;
|
|
67
|
+
/** Tax and taxable amounts breakdowns. */
|
|
68
|
+
taxBreakdown?: Tax[];
|
|
69
|
+
/**
|
|
70
|
+
* Receipt Preset Id.
|
|
71
|
+
* Fallbacks to the default Receipt Preset Id if not present.
|
|
72
|
+
*/
|
|
73
|
+
presetId?: string | null;
|
|
74
|
+
/** Custom fields. */
|
|
75
|
+
customFields?: CustomFields;
|
|
76
|
+
/**
|
|
77
|
+
* Receipt document file.
|
|
78
|
+
* @readonly
|
|
79
|
+
*/
|
|
80
|
+
document?: Document;
|
|
81
|
+
/** Data Extensions. */
|
|
82
|
+
extendedFields?: ExtendedFields;
|
|
83
|
+
}
|
|
84
|
+
export interface Numbering {
|
|
85
|
+
/** Receipt number. */
|
|
86
|
+
number?: number | null;
|
|
87
|
+
/** Receipt prefix. */
|
|
88
|
+
prefix?: string | null;
|
|
89
|
+
/** Receipt suffix. */
|
|
90
|
+
suffix?: string | null;
|
|
91
|
+
/**
|
|
92
|
+
* Receipt display number. E.g. `[prefix][number][suffix]`
|
|
93
|
+
* @readonly
|
|
94
|
+
*/
|
|
95
|
+
displayNumber?: string;
|
|
96
|
+
}
|
|
97
|
+
export interface RegionalProperties {
|
|
98
|
+
/** The locale determines the format of numbers, dates and times. */
|
|
99
|
+
locale?: Locale;
|
|
100
|
+
/** The time zone determines the offset of dates and times. */
|
|
101
|
+
timeZone?: string | null;
|
|
102
|
+
}
|
|
103
|
+
export interface Locale {
|
|
104
|
+
/**
|
|
105
|
+
* Locale language code, 2 letters [ISO-639-1](https://en.wikipedia.org/wiki/ISO_639-1).
|
|
106
|
+
* Examples: en, de, ja.
|
|
107
|
+
*/
|
|
108
|
+
languageCode?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Locale country code, 2 letters ISO-3166-1.
|
|
111
|
+
* Examples: US, DE, JP.
|
|
112
|
+
*/
|
|
113
|
+
country?: string | null;
|
|
114
|
+
}
|
|
115
|
+
export interface SourceReference extends SourceReferenceOrderOneOf {
|
|
116
|
+
/** Regular payments order. */
|
|
117
|
+
wixPaymentOrder?: WixPayment;
|
|
118
|
+
/** Wix eCommerce order. */
|
|
119
|
+
wixEcomOrder?: WixEcom;
|
|
120
|
+
/** App Id of the vertical/third-party application that generated the receipt. */
|
|
121
|
+
appId?: string;
|
|
122
|
+
/**
|
|
123
|
+
* External reference Id.
|
|
124
|
+
* Example: orderId, eventId.
|
|
125
|
+
*/
|
|
126
|
+
externalReferenceId?: string;
|
|
127
|
+
/** Specifies the type of order. */
|
|
128
|
+
receiptOrderType?: ReceiptOrderType;
|
|
129
|
+
}
|
|
130
|
+
/** @oneof */
|
|
131
|
+
export interface SourceReferenceOrderOneOf {
|
|
132
|
+
/** Regular payments order. */
|
|
133
|
+
wixPaymentOrder?: WixPayment;
|
|
134
|
+
/** Wix eCommerce order. */
|
|
135
|
+
wixEcomOrder?: WixEcom;
|
|
136
|
+
}
|
|
137
|
+
export declare enum ReceiptOrderType {
|
|
138
|
+
UNKNOWN_ORDER_TYPE = "UNKNOWN_ORDER_TYPE",
|
|
139
|
+
WIX_PAYMENT = "WIX_PAYMENT",
|
|
140
|
+
WIX_ECOM = "WIX_ECOM"
|
|
141
|
+
}
|
|
142
|
+
export interface WixPayment {
|
|
143
|
+
/** Payment order Id. */
|
|
144
|
+
orderId?: string;
|
|
145
|
+
/** Payment transaction Id. */
|
|
146
|
+
transactionId?: string;
|
|
147
|
+
}
|
|
148
|
+
export interface WixEcom {
|
|
149
|
+
/** Wix eCommerce order Id. */
|
|
150
|
+
orderId?: string;
|
|
151
|
+
/** Payment transaction Id. */
|
|
152
|
+
transactionId?: string;
|
|
153
|
+
}
|
|
154
|
+
export interface BusinessDetails {
|
|
155
|
+
/** Business name. */
|
|
156
|
+
name?: string | null;
|
|
157
|
+
/** Business email. */
|
|
158
|
+
email?: string | null;
|
|
159
|
+
/** Business phone. */
|
|
160
|
+
phone?: string | null;
|
|
161
|
+
/** Business address. */
|
|
162
|
+
address?: Address;
|
|
163
|
+
/** Business logo. */
|
|
164
|
+
logo?: string;
|
|
165
|
+
}
|
|
166
|
+
/** Physical address */
|
|
167
|
+
export interface Address extends AddressStreetOneOf {
|
|
168
|
+
/** Street name and number. */
|
|
169
|
+
streetAddress?: StreetAddress;
|
|
170
|
+
/** Main address line, usually street and number as free text. */
|
|
171
|
+
addressLine1?: string | null;
|
|
172
|
+
/** Country code. */
|
|
173
|
+
country?: string | null;
|
|
174
|
+
/** Subdivision shorthand. Usually, a short code (2 or 3 letters) that represents a state, region, prefecture, or province. e.g. NY */
|
|
175
|
+
subdivision?: string | null;
|
|
176
|
+
/** City name. */
|
|
177
|
+
city?: string | null;
|
|
178
|
+
/** Zip/postal code. */
|
|
179
|
+
postalCode?: string | null;
|
|
180
|
+
/** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
|
|
181
|
+
addressLine2?: string | null;
|
|
182
|
+
}
|
|
183
|
+
/** @oneof */
|
|
184
|
+
export interface AddressStreetOneOf {
|
|
185
|
+
/** Street name and number. */
|
|
186
|
+
streetAddress?: StreetAddress;
|
|
187
|
+
/** Main address line, usually street and number as free text. */
|
|
188
|
+
addressLine?: string | null;
|
|
189
|
+
}
|
|
190
|
+
export interface StreetAddress {
|
|
191
|
+
/** Street number. */
|
|
192
|
+
number?: string;
|
|
193
|
+
/** Street name. */
|
|
194
|
+
name?: string;
|
|
195
|
+
}
|
|
196
|
+
export interface AddressLocation {
|
|
197
|
+
/** Address latitude. */
|
|
198
|
+
latitude?: number | null;
|
|
199
|
+
/** Address longitude. */
|
|
200
|
+
longitude?: number | null;
|
|
201
|
+
}
|
|
202
|
+
export interface Subdivision {
|
|
203
|
+
/** Short subdivision code. */
|
|
204
|
+
code?: string;
|
|
205
|
+
/** Subdivision full name. */
|
|
206
|
+
name?: string;
|
|
207
|
+
}
|
|
208
|
+
export declare enum SubdivisionType {
|
|
209
|
+
UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE",
|
|
210
|
+
/** State */
|
|
211
|
+
ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1",
|
|
212
|
+
/** County */
|
|
213
|
+
ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2",
|
|
214
|
+
/** City/town */
|
|
215
|
+
ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3",
|
|
216
|
+
/** Neighborhood/quarter */
|
|
217
|
+
ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4",
|
|
218
|
+
/** Street/block */
|
|
219
|
+
ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5",
|
|
220
|
+
/** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
|
|
221
|
+
COUNTRY = "COUNTRY"
|
|
222
|
+
}
|
|
223
|
+
/** Subdivision Concordance values */
|
|
224
|
+
export interface StandardDetails {
|
|
225
|
+
/** subdivision iso-3166-2 code according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). e.g. US-NY, GB-SCT, NO-30 */
|
|
226
|
+
iso31662?: string | null;
|
|
227
|
+
}
|
|
228
|
+
export interface Customer {
|
|
229
|
+
/** Contact Id. */
|
|
230
|
+
contactId?: string | null;
|
|
231
|
+
/** Customer's contact details. */
|
|
232
|
+
contactDetails?: FullAddressContactDetails;
|
|
233
|
+
/** Customer's billing address. */
|
|
234
|
+
billingAddress?: Address;
|
|
235
|
+
/** Customer's shipping address. */
|
|
236
|
+
shippingAddress?: Address;
|
|
237
|
+
}
|
|
238
|
+
/** Full contact details for an address */
|
|
239
|
+
export interface FullAddressContactDetails {
|
|
240
|
+
/** Contact's first name. */
|
|
241
|
+
firstName?: string | null;
|
|
242
|
+
/** Contact's last name. */
|
|
243
|
+
lastName?: string | null;
|
|
244
|
+
/** Contact's phone number. */
|
|
245
|
+
phone?: string | null;
|
|
246
|
+
/** Contact's company name. */
|
|
247
|
+
company?: string | null;
|
|
248
|
+
/** Email associated with the address. */
|
|
249
|
+
email?: string | null;
|
|
250
|
+
/** Tax info. Currently usable only in Brazil. */
|
|
251
|
+
vatId?: VatId;
|
|
252
|
+
}
|
|
253
|
+
export interface VatId {
|
|
254
|
+
/** Customer's tax ID. */
|
|
255
|
+
_id?: string;
|
|
256
|
+
/**
|
|
257
|
+
* Tax type.
|
|
258
|
+
*
|
|
259
|
+
* Supported values:
|
|
260
|
+
* + `CPF`: for individual tax payers
|
|
261
|
+
* + `CNPJ`: for corporations
|
|
262
|
+
*/
|
|
263
|
+
type?: VatType;
|
|
264
|
+
}
|
|
265
|
+
/** tax info types */
|
|
266
|
+
export declare enum VatType {
|
|
267
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
268
|
+
/** CPF - for individual tax payers. */
|
|
269
|
+
CPF = "CPF",
|
|
270
|
+
/** CNPJ - for corporations */
|
|
271
|
+
CNPJ = "CNPJ"
|
|
272
|
+
}
|
|
273
|
+
export interface LineItem {
|
|
274
|
+
/** Line item Id. */
|
|
275
|
+
_id?: string | null;
|
|
276
|
+
/** Line item name. */
|
|
277
|
+
name?: string | null;
|
|
278
|
+
/** Line item description. */
|
|
279
|
+
description?: string | null;
|
|
280
|
+
/** Line item quantity. */
|
|
281
|
+
quantity?: string | null;
|
|
282
|
+
/** Line item unit price amount after discounts. */
|
|
283
|
+
price?: string | null;
|
|
284
|
+
/** Line item unit price amount before discounts. */
|
|
285
|
+
priceBeforeDiscounts?: string | null;
|
|
286
|
+
/** Line item tax breakdown. */
|
|
287
|
+
taxBreakdown?: LineItemTax[];
|
|
288
|
+
/** Line item totals. */
|
|
289
|
+
totals?: LineItemTotals;
|
|
290
|
+
}
|
|
291
|
+
export interface LineItemTax {
|
|
292
|
+
/** Tax name. */
|
|
293
|
+
taxName?: string;
|
|
294
|
+
/**
|
|
295
|
+
* Tax rate percentage.
|
|
296
|
+
* Example: 0.1000 signifies 10% tax and 2.1000 signifies 210% tax.
|
|
297
|
+
*/
|
|
298
|
+
taxRate?: string;
|
|
299
|
+
/** Taxable amount of the line item price. */
|
|
300
|
+
taxableAmount?: string;
|
|
301
|
+
/** Amount of tax calculated for this line item. */
|
|
302
|
+
taxAmount?: string;
|
|
303
|
+
}
|
|
304
|
+
export interface LineItemTotals {
|
|
305
|
+
/** Line item total discount. */
|
|
306
|
+
totalDiscount?: string | null;
|
|
307
|
+
/** Line item total price after discounts and before taxes. */
|
|
308
|
+
totalPriceBeforeTax?: string | null;
|
|
309
|
+
/** Line item total applied tax. */
|
|
310
|
+
totalTax?: string | null;
|
|
311
|
+
/** Line item total after taxes and discounts. */
|
|
312
|
+
totalPriceAfterTax?: string | null;
|
|
313
|
+
}
|
|
314
|
+
export interface ShippingInfo {
|
|
315
|
+
/** Shipping title. */
|
|
316
|
+
title?: string;
|
|
317
|
+
/** Shipping amount after discounts (when relevant), and before tax. */
|
|
318
|
+
priceBeforeTax?: string;
|
|
319
|
+
/** Shipping price after all discounts (if any exist), and after tax. */
|
|
320
|
+
priceAfterTax?: string;
|
|
321
|
+
/** Shipping tax breakdown. */
|
|
322
|
+
taxBreakdown?: ShippingTax[];
|
|
323
|
+
}
|
|
324
|
+
export interface ShippingTax {
|
|
325
|
+
/** Tax name. */
|
|
326
|
+
name?: string;
|
|
327
|
+
/**
|
|
328
|
+
* Tax rate percentage.
|
|
329
|
+
* Example: 0.1000 signifies 10% tax and 2.1000 signifies 210% tax.
|
|
330
|
+
*/
|
|
331
|
+
rate?: string;
|
|
332
|
+
/** Tax amount. */
|
|
333
|
+
amount?: string;
|
|
334
|
+
}
|
|
335
|
+
export interface AdditionalFee {
|
|
336
|
+
/** Additional fee's name. */
|
|
337
|
+
name?: string;
|
|
338
|
+
/** Additional fee's price before taxes. */
|
|
339
|
+
priceBeforeTax?: string;
|
|
340
|
+
/**
|
|
341
|
+
* Additional fee's amount after taxes.
|
|
342
|
+
* Should be the same as price before taxes if no taxes apply to this fee.
|
|
343
|
+
*/
|
|
344
|
+
priceAfterTax?: string;
|
|
345
|
+
/** Additional fee's tax breakdown. */
|
|
346
|
+
taxBreakdown?: AdditionalFeeTax[];
|
|
347
|
+
}
|
|
348
|
+
export interface AdditionalFeeTax {
|
|
349
|
+
/** Tax name. */
|
|
350
|
+
name?: string;
|
|
351
|
+
/**
|
|
352
|
+
* Tax rate.
|
|
353
|
+
* Example: 0.1000 signifies 10% tax and 2.1000 signifies 210% tax.
|
|
354
|
+
*/
|
|
355
|
+
rate?: string;
|
|
356
|
+
/** Tax amount. */
|
|
357
|
+
amount?: string;
|
|
358
|
+
}
|
|
359
|
+
export interface Discount {
|
|
360
|
+
/** Discount name. */
|
|
361
|
+
name?: string;
|
|
362
|
+
/** Discount amount. */
|
|
363
|
+
amount?: string;
|
|
364
|
+
}
|
|
365
|
+
export interface Payment {
|
|
366
|
+
/** Payment method. */
|
|
367
|
+
paymentMethod?: string;
|
|
368
|
+
/** Payment details. */
|
|
369
|
+
paymentMethodDetails?: string | null;
|
|
370
|
+
/** Payment amount. */
|
|
371
|
+
amount?: string;
|
|
372
|
+
/** Payment transaction date. */
|
|
373
|
+
transactionDate?: Date | null;
|
|
374
|
+
}
|
|
375
|
+
export interface Totals {
|
|
376
|
+
/** Subtotal of all line items, before discounts and before taxes. */
|
|
377
|
+
subtotal?: string | null;
|
|
378
|
+
/** Shipping price, before discounts and tax. */
|
|
379
|
+
shipping?: string | null;
|
|
380
|
+
/** Discount amount. */
|
|
381
|
+
discount?: string | null;
|
|
382
|
+
/** Additional fee amount, before discounts and tax. */
|
|
383
|
+
additionalFees?: string | null;
|
|
384
|
+
/** Tax amount. */
|
|
385
|
+
tax?: string | null;
|
|
386
|
+
/** Total amount. After all the calculations: subtotal - discounts + taxes + shipping + additional_fees. */
|
|
387
|
+
total?: string | null;
|
|
388
|
+
}
|
|
389
|
+
export interface Tax {
|
|
390
|
+
/** Tax name. */
|
|
391
|
+
name?: string;
|
|
392
|
+
/** Tax rate percentage, as a positive decimal numeral. For example, "0.13". */
|
|
393
|
+
rate?: string;
|
|
394
|
+
/** Tax amount. */
|
|
395
|
+
taxAmount?: string;
|
|
396
|
+
/** Taxable amount this tax applies to. */
|
|
397
|
+
taxableAmount?: string;
|
|
398
|
+
}
|
|
399
|
+
export interface CustomFields {
|
|
400
|
+
/**
|
|
401
|
+
* Header custom fields.
|
|
402
|
+
* Order will be persisted in the receipt document.
|
|
403
|
+
*/
|
|
404
|
+
headerCustomFields?: CustomField[];
|
|
405
|
+
/**
|
|
406
|
+
* Business custom fields.
|
|
407
|
+
* Order will be persisted in the receipt document.
|
|
408
|
+
*/
|
|
409
|
+
businessCustomFields?: CustomField[];
|
|
410
|
+
/**
|
|
411
|
+
* Customer custom fields.
|
|
412
|
+
* Order will be persisted in the receipt document.
|
|
413
|
+
*/
|
|
414
|
+
customerCustomFields?: CustomField[];
|
|
415
|
+
/**
|
|
416
|
+
* Footer custom fields.
|
|
417
|
+
* Order will be persisted in the receipt document.
|
|
418
|
+
*/
|
|
419
|
+
footerCustomFields?: FooterCustomField[];
|
|
420
|
+
}
|
|
421
|
+
export interface CustomField {
|
|
422
|
+
/** Title. */
|
|
423
|
+
title?: string | null;
|
|
424
|
+
/** Value. */
|
|
425
|
+
value?: string;
|
|
426
|
+
}
|
|
427
|
+
export interface FooterCustomField {
|
|
428
|
+
/** Title. */
|
|
429
|
+
title?: string;
|
|
430
|
+
/** Value. */
|
|
431
|
+
value?: string | null;
|
|
432
|
+
}
|
|
433
|
+
export interface Document {
|
|
434
|
+
/** Document status. */
|
|
435
|
+
status?: DocumentStatus;
|
|
436
|
+
/** Document download URL. */
|
|
437
|
+
downloadUrl?: string | null;
|
|
438
|
+
}
|
|
439
|
+
export declare enum DocumentStatus {
|
|
440
|
+
UNKNOWN_DOCUMENT_STATUS = "UNKNOWN_DOCUMENT_STATUS",
|
|
441
|
+
PROCESSING = "PROCESSING",
|
|
442
|
+
AVAILABLE = "AVAILABLE",
|
|
443
|
+
FAILED = "FAILED"
|
|
444
|
+
}
|
|
445
|
+
export interface ExtendedFields {
|
|
446
|
+
/**
|
|
447
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
448
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
449
|
+
*
|
|
450
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
451
|
+
*
|
|
452
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
453
|
+
*/
|
|
454
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
455
|
+
}
|
|
456
|
+
export interface ReceiptDocumentProcess {
|
|
457
|
+
/** Receipt Id. */
|
|
458
|
+
receiptId?: string;
|
|
459
|
+
/** Media Document Id. */
|
|
460
|
+
documentId?: string;
|
|
461
|
+
}
|
|
462
|
+
export interface ReceiptNumberingProcess {
|
|
463
|
+
/** Receipt Id. */
|
|
464
|
+
receiptId?: string;
|
|
465
|
+
}
|
|
466
|
+
export interface ReceiptDocumentHandled extends ReceiptDocumentHandledResultOneOf {
|
|
467
|
+
/** Populated only if receipt document handling has succeeded. */
|
|
468
|
+
succeeded?: Succeeded;
|
|
469
|
+
/** Populated only if receipt document handling has failed. */
|
|
470
|
+
failed?: Failed;
|
|
471
|
+
}
|
|
472
|
+
/** @oneof */
|
|
473
|
+
export interface ReceiptDocumentHandledResultOneOf {
|
|
474
|
+
/** Populated only if receipt document handling has succeeded. */
|
|
475
|
+
succeeded?: Succeeded;
|
|
476
|
+
/** Populated only if receipt document handling has failed. */
|
|
477
|
+
failed?: Failed;
|
|
478
|
+
}
|
|
479
|
+
export interface Succeeded {
|
|
480
|
+
/** Receipt Id. */
|
|
481
|
+
receiptId?: string;
|
|
482
|
+
/** Media file Id. */
|
|
483
|
+
mediaFileId?: string;
|
|
484
|
+
/** Download URL. */
|
|
485
|
+
downloadUrl?: string;
|
|
486
|
+
}
|
|
487
|
+
export interface Failed {
|
|
488
|
+
/** Receipt Id. */
|
|
489
|
+
receiptId?: string;
|
|
490
|
+
}
|
|
491
|
+
export interface GenerateReceiptDocument {
|
|
492
|
+
/** Receipt Id. */
|
|
493
|
+
receiptId?: string;
|
|
494
|
+
/** Shows how request for document generation was made. */
|
|
495
|
+
requestOrigin?: RequestOrigin;
|
|
496
|
+
}
|
|
497
|
+
export declare enum RequestOrigin {
|
|
498
|
+
INITIAL = "INITIAL",
|
|
499
|
+
MANUAL = "MANUAL"
|
|
500
|
+
}
|
|
501
|
+
export interface Sent {
|
|
502
|
+
/** Receipt that was sent. */
|
|
503
|
+
receipt?: Receipt;
|
|
504
|
+
/** Receipt was sent in automatic or manual flow. */
|
|
505
|
+
automatic?: boolean;
|
|
506
|
+
}
|
|
507
|
+
export interface CreateReceiptRequest {
|
|
508
|
+
/** Receipt to be created. */
|
|
509
|
+
receipt: Receipt;
|
|
510
|
+
}
|
|
511
|
+
export interface CreateReceiptResponse {
|
|
512
|
+
/** The created Receipt. */
|
|
513
|
+
receipt?: Receipt;
|
|
514
|
+
}
|
|
515
|
+
export interface GetReceiptRequest {
|
|
516
|
+
/** Id of the Receipt to retrieve. */
|
|
517
|
+
receiptId: string;
|
|
518
|
+
}
|
|
519
|
+
export interface GetReceiptResponse {
|
|
520
|
+
/** The requested Receipt. */
|
|
521
|
+
receipt?: Receipt;
|
|
522
|
+
}
|
|
523
|
+
export interface QueryReceiptsRequest {
|
|
524
|
+
/** [WQL](https://dev.wix.com/api/rest/getting-started/api-query-language) expression. */
|
|
525
|
+
query?: CursorQuery;
|
|
526
|
+
}
|
|
527
|
+
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
528
|
+
/** 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`. */
|
|
529
|
+
cursorPaging?: CursorPaging;
|
|
530
|
+
/**
|
|
531
|
+
* Filter object in the following format:
|
|
532
|
+
* `"filter" : {
|
|
533
|
+
* "fieldName1": "value1",
|
|
534
|
+
* "fieldName2":{"$operator":"value2"}
|
|
535
|
+
* }`
|
|
536
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
537
|
+
*/
|
|
538
|
+
filter?: Record<string, any> | null;
|
|
539
|
+
/**
|
|
540
|
+
* Sort object in the following format:
|
|
541
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
542
|
+
*/
|
|
543
|
+
sort?: Sorting[];
|
|
544
|
+
}
|
|
545
|
+
/** @oneof */
|
|
546
|
+
export interface CursorQueryPagingMethodOneOf {
|
|
547
|
+
/** 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`. */
|
|
548
|
+
cursorPaging?: CursorPaging;
|
|
549
|
+
}
|
|
550
|
+
export interface Sorting {
|
|
551
|
+
/** Name of the field to sort by. */
|
|
552
|
+
fieldName?: string;
|
|
553
|
+
/** Sort order. */
|
|
554
|
+
order?: SortOrder;
|
|
555
|
+
}
|
|
556
|
+
export declare enum SortOrder {
|
|
557
|
+
ASC = "ASC",
|
|
558
|
+
DESC = "DESC"
|
|
559
|
+
}
|
|
560
|
+
export interface CursorPaging {
|
|
561
|
+
/** Maximum number of items to return in the results. */
|
|
562
|
+
limit?: number | null;
|
|
563
|
+
/**
|
|
564
|
+
* Pointer to the next or previous page in the list of results.
|
|
565
|
+
*
|
|
566
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
567
|
+
* Not relevant for the first request.
|
|
568
|
+
*/
|
|
569
|
+
cursor?: string | null;
|
|
570
|
+
}
|
|
571
|
+
export interface QueryReceiptsResponse {
|
|
572
|
+
/** List of Receipts. */
|
|
573
|
+
receipts?: Receipt[];
|
|
574
|
+
/** Paging metadata. */
|
|
575
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
576
|
+
}
|
|
577
|
+
export interface CursorPagingMetadata {
|
|
578
|
+
/** Number of items returned in the response. */
|
|
579
|
+
count?: number | null;
|
|
580
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
581
|
+
cursors?: Cursors;
|
|
582
|
+
/**
|
|
583
|
+
* Whether there are more pages to retrieve following the current page.
|
|
584
|
+
*
|
|
585
|
+
* + `true`: Another page of results can be retrieved.
|
|
586
|
+
* + `false`: This is the last page.
|
|
587
|
+
*/
|
|
588
|
+
hasNext?: boolean | null;
|
|
589
|
+
}
|
|
590
|
+
export interface Cursors {
|
|
591
|
+
/** Cursor string pointing to the next page in the list of results. */
|
|
592
|
+
next?: string | null;
|
|
593
|
+
/** Cursor pointing to the previous page in the list of results. */
|
|
594
|
+
prev?: string | null;
|
|
595
|
+
}
|
|
596
|
+
export interface RegenerateReceiptDocumentRequest {
|
|
597
|
+
/** Receipt id. */
|
|
598
|
+
receiptId: string;
|
|
599
|
+
}
|
|
600
|
+
export interface RegenerateReceiptDocumentResponse {
|
|
601
|
+
}
|
|
602
|
+
export interface SendReceiptEmailRequest {
|
|
603
|
+
/** Id of the receipt to send to recipients. */
|
|
604
|
+
receiptId: string;
|
|
605
|
+
/** Contact Id to send the email to. */
|
|
606
|
+
contactId?: string | null;
|
|
607
|
+
}
|
|
608
|
+
export interface SendReceiptEmailResponse {
|
|
609
|
+
}
|
|
610
|
+
export interface GetLatestReceiptNumberRequest {
|
|
611
|
+
/** Receipt prefix. */
|
|
612
|
+
prefix?: string | null;
|
|
613
|
+
}
|
|
614
|
+
export interface GetLatestReceiptNumberResponse {
|
|
615
|
+
/** Receipt number. */
|
|
616
|
+
number?: number | null;
|
|
617
|
+
}
|
|
618
|
+
export interface UpdateExtendedFieldsRequest {
|
|
619
|
+
/** ID of the entity to update. */
|
|
620
|
+
_id: string;
|
|
621
|
+
/** Identifier for the app whose extended fields are being updated. */
|
|
622
|
+
namespace: string;
|
|
623
|
+
/** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
|
|
624
|
+
namespaceData: Record<string, any> | null;
|
|
625
|
+
}
|
|
626
|
+
export interface UpdateExtendedFieldsResponse {
|
|
627
|
+
/** Updated Receipt. */
|
|
628
|
+
receipt?: Receipt;
|
|
629
|
+
}
|
|
630
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
631
|
+
createdEvent?: EntityCreatedEvent;
|
|
632
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
633
|
+
deletedEvent?: EntityDeletedEvent;
|
|
634
|
+
actionEvent?: ActionEvent;
|
|
635
|
+
/**
|
|
636
|
+
* Unique event ID.
|
|
637
|
+
* Allows clients to ignore duplicate webhooks.
|
|
638
|
+
*/
|
|
639
|
+
_id?: string;
|
|
640
|
+
/**
|
|
641
|
+
* Assumes actions are also always typed to an entity_type
|
|
642
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
643
|
+
*/
|
|
644
|
+
entityFqdn?: string;
|
|
645
|
+
/**
|
|
646
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
647
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
648
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
649
|
+
*/
|
|
650
|
+
slug?: string;
|
|
651
|
+
/** ID of the entity associated with the event. */
|
|
652
|
+
entityId?: string;
|
|
653
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
654
|
+
eventTime?: Date | null;
|
|
655
|
+
/**
|
|
656
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
657
|
+
* (for example, GDPR).
|
|
658
|
+
*/
|
|
659
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
660
|
+
/** If present, indicates the action that triggered the event. */
|
|
661
|
+
originatedFrom?: string | null;
|
|
662
|
+
/**
|
|
663
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
664
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
665
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
666
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
667
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
668
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
669
|
+
*/
|
|
670
|
+
entityEventSequence?: string | null;
|
|
671
|
+
}
|
|
672
|
+
/** @oneof */
|
|
673
|
+
export interface DomainEventBodyOneOf {
|
|
674
|
+
createdEvent?: EntityCreatedEvent;
|
|
675
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
676
|
+
deletedEvent?: EntityDeletedEvent;
|
|
677
|
+
actionEvent?: ActionEvent;
|
|
678
|
+
}
|
|
679
|
+
export interface EntityCreatedEvent {
|
|
680
|
+
entity?: string;
|
|
681
|
+
}
|
|
682
|
+
export interface RestoreInfo {
|
|
683
|
+
deletedDate?: Date | null;
|
|
684
|
+
}
|
|
685
|
+
export interface EntityUpdatedEvent {
|
|
686
|
+
/**
|
|
687
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
688
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
689
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
690
|
+
*/
|
|
691
|
+
currentEntity?: string;
|
|
692
|
+
}
|
|
693
|
+
export interface EntityDeletedEvent {
|
|
694
|
+
/** Entity that was deleted */
|
|
695
|
+
deletedEntity?: string | null;
|
|
696
|
+
}
|
|
697
|
+
export interface ActionEvent {
|
|
698
|
+
body?: string;
|
|
699
|
+
}
|
|
700
|
+
export interface Empty {
|
|
701
|
+
}
|
|
702
|
+
export interface MessageEnvelope {
|
|
703
|
+
/** App instance ID. */
|
|
704
|
+
instanceId?: string | null;
|
|
705
|
+
/** Event type. */
|
|
706
|
+
eventType?: string;
|
|
707
|
+
/** The identification type and identity data. */
|
|
708
|
+
identity?: IdentificationData;
|
|
709
|
+
/** Stringify payload. */
|
|
710
|
+
data?: string;
|
|
711
|
+
}
|
|
712
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
713
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
714
|
+
anonymousVisitorId?: string;
|
|
715
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
716
|
+
memberId?: string;
|
|
717
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
718
|
+
wixUserId?: string;
|
|
719
|
+
/** ID of an app. */
|
|
720
|
+
appId?: string;
|
|
721
|
+
/** @readonly */
|
|
722
|
+
identityType?: WebhookIdentityType;
|
|
723
|
+
}
|
|
724
|
+
/** @oneof */
|
|
725
|
+
export interface IdentificationDataIdOneOf {
|
|
726
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
727
|
+
anonymousVisitorId?: string;
|
|
728
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
729
|
+
memberId?: string;
|
|
730
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
731
|
+
wixUserId?: string;
|
|
732
|
+
/** ID of an app. */
|
|
733
|
+
appId?: string;
|
|
734
|
+
}
|
|
735
|
+
export declare enum WebhookIdentityType {
|
|
736
|
+
UNKNOWN = "UNKNOWN",
|
|
737
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
738
|
+
MEMBER = "MEMBER",
|
|
739
|
+
WIX_USER = "WIX_USER",
|
|
740
|
+
APP = "APP"
|
|
741
|
+
}
|
|
742
|
+
interface NumberingNonNullableFields {
|
|
743
|
+
displayNumber: string;
|
|
744
|
+
}
|
|
745
|
+
interface LocaleNonNullableFields {
|
|
746
|
+
languageCode: string;
|
|
747
|
+
}
|
|
748
|
+
interface RegionalPropertiesNonNullableFields {
|
|
749
|
+
locale?: LocaleNonNullableFields;
|
|
750
|
+
}
|
|
751
|
+
interface WixPaymentNonNullableFields {
|
|
752
|
+
orderId: string;
|
|
753
|
+
transactionId: string;
|
|
754
|
+
}
|
|
755
|
+
interface WixEcomNonNullableFields {
|
|
756
|
+
orderId: string;
|
|
757
|
+
transactionId: string;
|
|
758
|
+
}
|
|
759
|
+
interface SourceReferenceNonNullableFields {
|
|
760
|
+
wixPaymentOrder?: WixPaymentNonNullableFields;
|
|
761
|
+
wixEcomOrder?: WixEcomNonNullableFields;
|
|
762
|
+
appId: string;
|
|
763
|
+
externalReferenceId: string;
|
|
764
|
+
receiptOrderType: ReceiptOrderType;
|
|
765
|
+
}
|
|
766
|
+
interface StreetAddressNonNullableFields {
|
|
767
|
+
number: string;
|
|
768
|
+
name: string;
|
|
769
|
+
apt: string;
|
|
770
|
+
}
|
|
771
|
+
interface SubdivisionNonNullableFields {
|
|
772
|
+
name: string;
|
|
773
|
+
}
|
|
774
|
+
interface AddressNonNullableFields {
|
|
775
|
+
streetAddress?: StreetAddressNonNullableFields;
|
|
776
|
+
subdivisions: SubdivisionNonNullableFields[];
|
|
777
|
+
}
|
|
778
|
+
interface BusinessDetailsNonNullableFields {
|
|
779
|
+
address?: AddressNonNullableFields;
|
|
780
|
+
logo: string;
|
|
781
|
+
}
|
|
782
|
+
interface VatIdNonNullableFields {
|
|
783
|
+
_id: string;
|
|
784
|
+
type: VatType;
|
|
785
|
+
}
|
|
786
|
+
interface FullAddressContactDetailsNonNullableFields {
|
|
787
|
+
vatId?: VatIdNonNullableFields;
|
|
788
|
+
}
|
|
789
|
+
interface CustomerNonNullableFields {
|
|
790
|
+
contactDetails?: FullAddressContactDetailsNonNullableFields;
|
|
791
|
+
billingAddress?: AddressNonNullableFields;
|
|
792
|
+
shippingAddress?: AddressNonNullableFields;
|
|
793
|
+
}
|
|
794
|
+
interface LineItemTaxNonNullableFields {
|
|
795
|
+
taxName: string;
|
|
796
|
+
taxRate: string;
|
|
797
|
+
taxableAmount: string;
|
|
798
|
+
taxAmount: string;
|
|
799
|
+
}
|
|
800
|
+
interface LineItemNonNullableFields {
|
|
801
|
+
taxBreakdown: LineItemTaxNonNullableFields[];
|
|
802
|
+
}
|
|
803
|
+
interface ShippingTaxNonNullableFields {
|
|
804
|
+
name: string;
|
|
805
|
+
rate: string;
|
|
806
|
+
amount: string;
|
|
807
|
+
}
|
|
808
|
+
interface ShippingInfoNonNullableFields {
|
|
809
|
+
title: string;
|
|
810
|
+
priceBeforeTax: string;
|
|
811
|
+
priceAfterTax: string;
|
|
812
|
+
taxBreakdown: ShippingTaxNonNullableFields[];
|
|
813
|
+
}
|
|
814
|
+
interface AdditionalFeeTaxNonNullableFields {
|
|
815
|
+
name: string;
|
|
816
|
+
rate: string;
|
|
817
|
+
amount: string;
|
|
818
|
+
}
|
|
819
|
+
interface AdditionalFeeNonNullableFields {
|
|
820
|
+
name: string;
|
|
821
|
+
priceBeforeTax: string;
|
|
822
|
+
priceAfterTax: string;
|
|
823
|
+
taxBreakdown: AdditionalFeeTaxNonNullableFields[];
|
|
824
|
+
}
|
|
825
|
+
interface DiscountNonNullableFields {
|
|
826
|
+
name: string;
|
|
827
|
+
amount: string;
|
|
828
|
+
}
|
|
829
|
+
interface PaymentNonNullableFields {
|
|
830
|
+
paymentMethod: string;
|
|
831
|
+
amount: string;
|
|
832
|
+
}
|
|
833
|
+
interface TaxNonNullableFields {
|
|
834
|
+
name: string;
|
|
835
|
+
rate: string;
|
|
836
|
+
taxAmount: string;
|
|
837
|
+
taxableAmount: string;
|
|
838
|
+
}
|
|
839
|
+
interface CustomFieldNonNullableFields {
|
|
840
|
+
value: string;
|
|
841
|
+
}
|
|
842
|
+
interface FooterCustomFieldNonNullableFields {
|
|
843
|
+
title: string;
|
|
844
|
+
}
|
|
845
|
+
interface CustomFieldsNonNullableFields {
|
|
846
|
+
headerCustomFields: CustomFieldNonNullableFields[];
|
|
847
|
+
businessCustomFields: CustomFieldNonNullableFields[];
|
|
848
|
+
customerCustomFields: CustomFieldNonNullableFields[];
|
|
849
|
+
footerCustomFields: FooterCustomFieldNonNullableFields[];
|
|
850
|
+
}
|
|
851
|
+
interface DocumentNonNullableFields {
|
|
852
|
+
status: DocumentStatus;
|
|
853
|
+
}
|
|
854
|
+
export interface ReceiptNonNullableFields {
|
|
855
|
+
numbering?: NumberingNonNullableFields;
|
|
856
|
+
regionalProperties?: RegionalPropertiesNonNullableFields;
|
|
857
|
+
currency: string;
|
|
858
|
+
sourceReference?: SourceReferenceNonNullableFields;
|
|
859
|
+
businessDetails?: BusinessDetailsNonNullableFields;
|
|
860
|
+
customer?: CustomerNonNullableFields;
|
|
861
|
+
lineItems: LineItemNonNullableFields[];
|
|
862
|
+
shippingInfo?: ShippingInfoNonNullableFields;
|
|
863
|
+
additionalFees: AdditionalFeeNonNullableFields[];
|
|
864
|
+
discounts: DiscountNonNullableFields[];
|
|
865
|
+
payment?: PaymentNonNullableFields;
|
|
866
|
+
taxBreakdown: TaxNonNullableFields[];
|
|
867
|
+
customFields?: CustomFieldsNonNullableFields;
|
|
868
|
+
document?: DocumentNonNullableFields;
|
|
869
|
+
}
|
|
870
|
+
export interface CreateReceiptResponseNonNullableFields {
|
|
871
|
+
receipt?: ReceiptNonNullableFields;
|
|
872
|
+
}
|
|
873
|
+
export interface GetReceiptResponseNonNullableFields {
|
|
874
|
+
receipt?: ReceiptNonNullableFields;
|
|
875
|
+
}
|
|
876
|
+
export interface QueryReceiptsResponseNonNullableFields {
|
|
877
|
+
receipts: ReceiptNonNullableFields[];
|
|
878
|
+
}
|
|
879
|
+
export interface UpdateExtendedFieldsResponseNonNullableFields {
|
|
880
|
+
receipt?: ReceiptNonNullableFields;
|
|
881
|
+
}
|
|
882
|
+
/**
|
|
883
|
+
* Creates a Receipt.
|
|
884
|
+
*
|
|
885
|
+
* The request body must include: currency, source reference, line items, payment, totals.
|
|
886
|
+
* Receipt number will not be assigned on the create response. Number will be assigned eventually but before the
|
|
887
|
+
* document file is created.
|
|
888
|
+
* @param receipt - Receipt to be created.
|
|
889
|
+
* @public
|
|
890
|
+
* @documentationMaturity preview
|
|
891
|
+
* @requiredField receipt
|
|
892
|
+
* @requiredField receipt.currency
|
|
893
|
+
* @requiredField receipt.lineItems
|
|
894
|
+
* @requiredField receipt.lineItems._id
|
|
895
|
+
* @requiredField receipt.lineItems.price
|
|
896
|
+
* @requiredField receipt.lineItems.quantity
|
|
897
|
+
* @requiredField receipt.lineItems.totals
|
|
898
|
+
* @requiredField receipt.lineItems.totals.totalPriceBeforeTax
|
|
899
|
+
* @requiredField receipt.payment
|
|
900
|
+
* @requiredField receipt.payment.amount
|
|
901
|
+
* @requiredField receipt.payment.paymentMethod
|
|
902
|
+
* @requiredField receipt.payment.transactionDate
|
|
903
|
+
* @requiredField receipt.sourceReference
|
|
904
|
+
* @requiredField receipt.sourceReference.appId
|
|
905
|
+
* @requiredField receipt.sourceReference.externalReferenceId
|
|
906
|
+
* @requiredField receipt.sourceReference.receiptOrderType
|
|
907
|
+
* @requiredField receipt.sourceReference.wixEcomOrder.transactionId
|
|
908
|
+
* @requiredField receipt.sourceReference.wixPaymentOrder.transactionId
|
|
909
|
+
* @requiredField receipt.totals
|
|
910
|
+
* @requiredField receipt.totals.subtotal
|
|
911
|
+
* @requiredField receipt.totals.total
|
|
912
|
+
* @permissionId RECEIPTS.RECEIPT_CREATE
|
|
913
|
+
* @returns The created Receipt.
|
|
914
|
+
* @fqn wix.receipts.v1.Receipts.CreateReceipt
|
|
915
|
+
*/
|
|
916
|
+
export declare function createReceipt(receipt: Receipt): Promise<Receipt & ReceiptNonNullableFields>;
|
|
917
|
+
/**
|
|
918
|
+
* Retrieves a Receipt.
|
|
919
|
+
* @param receiptId - Id of the Receipt to retrieve.
|
|
920
|
+
* @public
|
|
921
|
+
* @documentationMaturity preview
|
|
922
|
+
* @requiredField receiptId
|
|
923
|
+
* @permissionId RECEIPTS.RECEIPT_READ
|
|
924
|
+
* @returns The requested Receipt.
|
|
925
|
+
* @fqn wix.receipts.v1.Receipts.GetReceipt
|
|
926
|
+
*/
|
|
927
|
+
export declare function getReceipt(receiptId: string): Promise<Receipt & ReceiptNonNullableFields>;
|
|
928
|
+
/**
|
|
929
|
+
* Retrieves a list of up to 100 Receipts, given the provided [paging, filtering, and sorting][1].
|
|
930
|
+
*
|
|
931
|
+
* Define queries using WQL - Wix Query Language. To learn how to query Receipts, see [API Query Language][2].
|
|
932
|
+
*
|
|
933
|
+
* [1]: https://dev.wix.com/api/rest/getting-started/sorting-and-paging
|
|
934
|
+
* [2]: https://dev.wix.com/api/rest/getting-started/api-query-language
|
|
935
|
+
* @public
|
|
936
|
+
* @documentationMaturity preview
|
|
937
|
+
* @permissionId RECEIPTS.RECEIPT_READ
|
|
938
|
+
* @fqn wix.receipts.v1.Receipts.QueryReceipts
|
|
939
|
+
*/
|
|
940
|
+
export declare function queryReceipts(): ReceiptsQueryBuilder;
|
|
941
|
+
interface QueryCursorResult {
|
|
942
|
+
cursors: Cursors;
|
|
943
|
+
hasNext: () => boolean;
|
|
944
|
+
hasPrev: () => boolean;
|
|
945
|
+
length: number;
|
|
946
|
+
pageSize: number;
|
|
947
|
+
}
|
|
948
|
+
export interface ReceiptsQueryResult extends QueryCursorResult {
|
|
949
|
+
items: Receipt[];
|
|
950
|
+
query: ReceiptsQueryBuilder;
|
|
951
|
+
next: () => Promise<ReceiptsQueryResult>;
|
|
952
|
+
prev: () => Promise<ReceiptsQueryResult>;
|
|
953
|
+
}
|
|
954
|
+
export interface ReceiptsQueryBuilder {
|
|
955
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
956
|
+
* @param value - Value to compare against.
|
|
957
|
+
* @documentationMaturity preview
|
|
958
|
+
*/
|
|
959
|
+
eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'numbering.number' | 'numbering.prefix' | 'numbering.suffix' | 'sourceReference.appId' | 'sourceReference.externalReferenceId', value: any) => ReceiptsQueryBuilder;
|
|
960
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
961
|
+
* @param value - Value to compare against.
|
|
962
|
+
* @documentationMaturity preview
|
|
963
|
+
*/
|
|
964
|
+
ne: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'numbering.number' | 'numbering.prefix' | 'numbering.suffix' | 'sourceReference.appId' | 'sourceReference.externalReferenceId', value: any) => ReceiptsQueryBuilder;
|
|
965
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
966
|
+
* @param value - Value to compare against.
|
|
967
|
+
* @documentationMaturity preview
|
|
968
|
+
*/
|
|
969
|
+
ge: (propertyName: '_createdDate' | '_updatedDate' | 'numbering.number', value: any) => ReceiptsQueryBuilder;
|
|
970
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
971
|
+
* @param value - Value to compare against.
|
|
972
|
+
* @documentationMaturity preview
|
|
973
|
+
*/
|
|
974
|
+
gt: (propertyName: '_createdDate' | '_updatedDate' | 'numbering.number', value: any) => ReceiptsQueryBuilder;
|
|
975
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
976
|
+
* @param value - Value to compare against.
|
|
977
|
+
* @documentationMaturity preview
|
|
978
|
+
*/
|
|
979
|
+
le: (propertyName: '_createdDate' | '_updatedDate' | 'numbering.number', value: any) => ReceiptsQueryBuilder;
|
|
980
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
981
|
+
* @param value - Value to compare against.
|
|
982
|
+
* @documentationMaturity preview
|
|
983
|
+
*/
|
|
984
|
+
lt: (propertyName: '_createdDate' | '_updatedDate' | 'numbering.number', value: any) => ReceiptsQueryBuilder;
|
|
985
|
+
/** @param propertyName - Property whose value is compared with `string`.
|
|
986
|
+
* @param string - String to compare against. Case-insensitive.
|
|
987
|
+
* @documentationMaturity preview
|
|
988
|
+
*/
|
|
989
|
+
startsWith: (propertyName: '_id' | 'numbering.prefix' | 'numbering.suffix' | 'sourceReference.appId' | 'sourceReference.externalReferenceId', value: string) => ReceiptsQueryBuilder;
|
|
990
|
+
/** @param propertyName - Property whose value is compared with `values`.
|
|
991
|
+
* @param values - List of values to compare against.
|
|
992
|
+
* @documentationMaturity preview
|
|
993
|
+
*/
|
|
994
|
+
hasSome: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'numbering.number' | 'numbering.prefix' | 'numbering.suffix' | 'sourceReference.appId' | 'sourceReference.externalReferenceId', value: any[]) => ReceiptsQueryBuilder;
|
|
995
|
+
/** @documentationMaturity preview */
|
|
996
|
+
in: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'numbering.number' | 'numbering.prefix' | 'numbering.suffix' | 'sourceReference.appId' | 'sourceReference.externalReferenceId', value: any) => ReceiptsQueryBuilder;
|
|
997
|
+
/** @documentationMaturity preview */
|
|
998
|
+
exists: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'numbering.number' | 'numbering.prefix' | 'numbering.suffix' | 'sourceReference.appId' | 'sourceReference.externalReferenceId', value: boolean) => ReceiptsQueryBuilder;
|
|
999
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
1000
|
+
* @documentationMaturity preview
|
|
1001
|
+
*/
|
|
1002
|
+
ascending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'numbering.number' | 'numbering.prefix' | 'numbering.suffix' | 'sourceReference.appId' | 'sourceReference.externalReferenceId'>) => ReceiptsQueryBuilder;
|
|
1003
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
1004
|
+
* @documentationMaturity preview
|
|
1005
|
+
*/
|
|
1006
|
+
descending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'numbering.number' | 'numbering.prefix' | 'numbering.suffix' | 'sourceReference.appId' | 'sourceReference.externalReferenceId'>) => ReceiptsQueryBuilder;
|
|
1007
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
1008
|
+
* @documentationMaturity preview
|
|
1009
|
+
*/
|
|
1010
|
+
limit: (limit: number) => ReceiptsQueryBuilder;
|
|
1011
|
+
/** @param cursor - A pointer to specific record
|
|
1012
|
+
* @documentationMaturity preview
|
|
1013
|
+
*/
|
|
1014
|
+
skipTo: (cursor: string) => ReceiptsQueryBuilder;
|
|
1015
|
+
/** @documentationMaturity preview */
|
|
1016
|
+
find: () => Promise<ReceiptsQueryResult>;
|
|
1017
|
+
}
|
|
1018
|
+
/**
|
|
1019
|
+
* Retries generating document if its status is FAILED.
|
|
1020
|
+
* @param receiptId - Receipt id.
|
|
1021
|
+
* @public
|
|
1022
|
+
* @documentationMaturity preview
|
|
1023
|
+
* @requiredField receiptId
|
|
1024
|
+
* @permissionId RECEIPTS.RECEIPT_UPDATE
|
|
1025
|
+
* @fqn wix.receipts.v1.Receipts.RegenerateReceiptDocument
|
|
1026
|
+
*/
|
|
1027
|
+
export declare function regenerateReceiptDocument(receiptId: string): Promise<void>;
|
|
1028
|
+
/**
|
|
1029
|
+
* Sends email with Receipt.
|
|
1030
|
+
* @param receiptId - Id of the receipt to send to recipients.
|
|
1031
|
+
* @public
|
|
1032
|
+
* @documentationMaturity preview
|
|
1033
|
+
* @requiredField receiptId
|
|
1034
|
+
* @permissionId RECEIPTS.RECEIPT_SEND
|
|
1035
|
+
* @fqn wix.receipts.v1.Receipts.SendReceiptEmail
|
|
1036
|
+
*/
|
|
1037
|
+
export declare function sendReceiptEmail(receiptId: string, options?: SendReceiptEmailOptions): Promise<void>;
|
|
1038
|
+
export interface SendReceiptEmailOptions {
|
|
1039
|
+
/** Contact Id to send the email to. */
|
|
1040
|
+
contactId?: string | null;
|
|
1041
|
+
}
|
|
1042
|
+
/**
|
|
1043
|
+
* Returns latest number for a given prefix.
|
|
1044
|
+
* @public
|
|
1045
|
+
* @documentationMaturity preview
|
|
1046
|
+
* @permissionId RECEIPTS.RECEIPT_READ
|
|
1047
|
+
* @fqn wix.receipts.v1.Receipts.GetLatestReceiptNumber
|
|
1048
|
+
*/
|
|
1049
|
+
export declare function getLatestReceiptNumber(options?: GetLatestReceiptNumberOptions): Promise<GetLatestReceiptNumberResponse>;
|
|
1050
|
+
export interface GetLatestReceiptNumberOptions {
|
|
1051
|
+
/** Receipt prefix. */
|
|
1052
|
+
prefix?: string | null;
|
|
1053
|
+
}
|
|
1054
|
+
/**
|
|
1055
|
+
* Updates extended fields of a Receipt without incrementing revision.
|
|
1056
|
+
* @param _id - ID of the entity to update.
|
|
1057
|
+
* @param namespace - Identifier for the app whose extended fields are being updated.
|
|
1058
|
+
* @public
|
|
1059
|
+
* @documentationMaturity preview
|
|
1060
|
+
* @requiredField _id
|
|
1061
|
+
* @requiredField namespace
|
|
1062
|
+
* @requiredField options
|
|
1063
|
+
* @requiredField options.namespaceData
|
|
1064
|
+
* @permissionId RECEIPTS.RECEIPT_UPDATE
|
|
1065
|
+
* @fqn wix.receipts.v1.Receipts.UpdateExtendedFields
|
|
1066
|
+
*/
|
|
1067
|
+
export declare function updateExtendedFields(_id: string, namespace: string, options: UpdateExtendedFieldsOptions): Promise<UpdateExtendedFieldsResponse & UpdateExtendedFieldsResponseNonNullableFields>;
|
|
1068
|
+
export interface UpdateExtendedFieldsOptions {
|
|
1069
|
+
/** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
|
|
1070
|
+
namespaceData: Record<string, any> | null;
|
|
1071
|
+
}
|
|
1072
|
+
export {};
|