cloudcommerce 0.0.2 → 0.0.3
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/{.eslintrc.js → .eslintrc.cjs} +4 -4
- package/.github/renovate.json +2 -1
- package/CHANGELOG.md +13 -0
- package/README.md +2 -2
- package/package.json +7 -6
- package/packages/api/dist/index.d.ts +65 -0
- package/packages/api/dist/index.js +42 -24
- package/packages/api/dist/index.js.map +1 -1
- package/packages/api/dist/types/applications.d.ts +208 -0
- package/packages/api/dist/types/authentications.d.ts +97 -0
- package/packages/api/dist/types/brands.d.ts +148 -0
- package/packages/api/dist/types/carts.d.ts +292 -0
- package/packages/api/dist/types/categories.d.ts +190 -0
- package/packages/api/dist/types/collections.d.ts +151 -0
- package/packages/api/dist/types/customers.d.ts +495 -0
- package/packages/api/dist/types/grids.d.ts +149 -0
- package/packages/api/dist/types/orders.d.ts +1588 -0
- package/packages/api/dist/types/procedures.d.ts +139 -0
- package/packages/api/dist/types/products.d.ts +1284 -0
- package/packages/api/dist/types/stores.d.ts +120 -0
- package/packages/api/dist/types/triggers.d.ts +79 -0
- package/packages/api/dist/types.d.ts +65 -0
- package/packages/api/dist/types.js +2 -0
- package/packages/api/dist/types.js.map +1 -0
- package/packages/api/package.json +4 -2
- package/packages/api/scripts/build.mjs +5 -0
- package/packages/api/src/index.ts +46 -55
- package/packages/api/src/types/applications.d.ts +208 -0
- package/packages/api/src/types/authentications.d.ts +97 -0
- package/packages/api/src/types/brands.d.ts +148 -0
- package/packages/api/src/types/carts.d.ts +292 -0
- package/packages/api/src/types/categories.d.ts +190 -0
- package/packages/api/src/types/collections.d.ts +151 -0
- package/packages/api/src/types/customers.d.ts +495 -0
- package/packages/api/src/types/grids.d.ts +149 -0
- package/packages/api/src/types/orders.d.ts +1588 -0
- package/packages/api/src/types/procedures.d.ts +139 -0
- package/packages/api/src/types/products.d.ts +1284 -0
- package/packages/api/src/types/stores.d.ts +120 -0
- package/packages/api/src/types/triggers.d.ts +79 -0
- package/packages/api/src/types.ts +74 -0
- package/packages/api/tests/types.test.ts +13 -0
- package/packages/apps/discounts/package.json +1 -1
- package/packages/storefront/package.json +1 -1
- package/{packages/api/tsconfig.json → tsconfig.json} +8 -3
- package/turbo.json +3 -0
|
@@ -0,0 +1,1588 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated by json-schema-to-typescript.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
5
|
+
* and run json-schema-to-typescript to regenerate this file.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Order object model
|
|
10
|
+
*/
|
|
11
|
+
export interface Orders {
|
|
12
|
+
_id: string;
|
|
13
|
+
created_at: string;
|
|
14
|
+
updated_at: string;
|
|
15
|
+
store_id: number;
|
|
16
|
+
/**
|
|
17
|
+
* Whether order was created by staff and is trusted
|
|
18
|
+
*/
|
|
19
|
+
staff_signature?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* URL to checkout page, if necessary, use `(_id)` where order unique ID must appear at URL
|
|
22
|
+
*/
|
|
23
|
+
checkout_link?: string;
|
|
24
|
+
/**
|
|
25
|
+
* URL to order status page, if necessary, use `(_id)` where order unique ID must appear
|
|
26
|
+
*/
|
|
27
|
+
status_link?: string;
|
|
28
|
+
/**
|
|
29
|
+
* UTM campaign HTTP parameters
|
|
30
|
+
*/
|
|
31
|
+
utm?: {
|
|
32
|
+
/**
|
|
33
|
+
* Parameter 'utm_source', the referrer: (e.g. 'google', 'newsletter')
|
|
34
|
+
*/
|
|
35
|
+
source?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Parameter 'utm_medium', the marketing medium: (e.g. 'cpc', 'banner', 'email')
|
|
38
|
+
*/
|
|
39
|
+
medium?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Parameter 'utm_campaign', the product, promo code, or slogan (e.g. 'spring_sale')
|
|
42
|
+
*/
|
|
43
|
+
campaign?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Parameter 'utm_term', identifies the paid keywords
|
|
46
|
+
*/
|
|
47
|
+
term?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Parameter 'utm_content', used to differentiate ads
|
|
50
|
+
*/
|
|
51
|
+
content?: string;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* The website that the customer clicked on to come to the shop
|
|
55
|
+
*/
|
|
56
|
+
referring_site?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Code to identify the affiliate that referred the customer
|
|
59
|
+
*/
|
|
60
|
+
affiliate_code?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Initial URL of the session that originated the order
|
|
63
|
+
*/
|
|
64
|
+
origin_url?: string;
|
|
65
|
+
/**
|
|
66
|
+
* IP address of the device used by the customer when placing the order
|
|
67
|
+
*/
|
|
68
|
+
client_ip?: string;
|
|
69
|
+
/**
|
|
70
|
+
* User-Agent of the browser (if any) used by the customer
|
|
71
|
+
*/
|
|
72
|
+
client_user_agent?: string;
|
|
73
|
+
channel_id?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Channel type or source
|
|
76
|
+
*/
|
|
77
|
+
channel_type?: 'ecommerce' | 'mobile' | 'pos' | 'button' | 'social' | 'chatbot' | 'live';
|
|
78
|
+
/**
|
|
79
|
+
* Store domain name (numbers and lowercase letters, eg.: www.myshop.sample)
|
|
80
|
+
*/
|
|
81
|
+
domain?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Order number, if not specified will be filled auto incrementing
|
|
84
|
+
*/
|
|
85
|
+
number?: number;
|
|
86
|
+
/**
|
|
87
|
+
* Order code used by seller and customer for identification, should be unique
|
|
88
|
+
*/
|
|
89
|
+
code?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Order main status
|
|
92
|
+
*/
|
|
93
|
+
status?: 'open' | 'closed' | 'cancelled';
|
|
94
|
+
/**
|
|
95
|
+
* Date and time when order was opened, in ISO 8601 standard representation [auto]
|
|
96
|
+
*/
|
|
97
|
+
opened_at?: string;
|
|
98
|
+
/**
|
|
99
|
+
* If the order is closed, specify the date and time it occurred
|
|
100
|
+
*/
|
|
101
|
+
closed_at?: string;
|
|
102
|
+
/**
|
|
103
|
+
* If the order is cancelled, specify the date and time it occurred
|
|
104
|
+
*/
|
|
105
|
+
cancelled_at?: string;
|
|
106
|
+
/**
|
|
107
|
+
* If the order is cancelled, specify the reason why it was cancelled
|
|
108
|
+
*/
|
|
109
|
+
cancel_reason?: 'customer' | 'fraud' | 'inventory' | 'declined' | 'other';
|
|
110
|
+
/**
|
|
111
|
+
* Order status created by seller
|
|
112
|
+
*/
|
|
113
|
+
seller_status?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Financial status and date of change
|
|
116
|
+
*/
|
|
117
|
+
financial_status?: {
|
|
118
|
+
/**
|
|
119
|
+
* Last status change, date and time in ISO 8601 standard representation [auto]
|
|
120
|
+
*/
|
|
121
|
+
updated_at?: string;
|
|
122
|
+
/**
|
|
123
|
+
* Order financial status
|
|
124
|
+
*/
|
|
125
|
+
current:
|
|
126
|
+
| 'pending'
|
|
127
|
+
| 'under_analysis'
|
|
128
|
+
| 'authorized'
|
|
129
|
+
| 'unauthorized'
|
|
130
|
+
| 'partially_paid'
|
|
131
|
+
| 'paid'
|
|
132
|
+
| 'in_dispute'
|
|
133
|
+
| 'partially_refunded'
|
|
134
|
+
| 'refunded'
|
|
135
|
+
| 'voided'
|
|
136
|
+
| 'unknown';
|
|
137
|
+
/**
|
|
138
|
+
* Flags to associate additional info
|
|
139
|
+
*/
|
|
140
|
+
flags?: string[];
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* Fulfillment status and date of change
|
|
144
|
+
*/
|
|
145
|
+
fulfillment_status?: {
|
|
146
|
+
/**
|
|
147
|
+
* Last status change, date and time in ISO 8601 standard representation [auto]
|
|
148
|
+
*/
|
|
149
|
+
updated_at?: string;
|
|
150
|
+
/**
|
|
151
|
+
* Order fulfillment (shipping) status
|
|
152
|
+
*/
|
|
153
|
+
current:
|
|
154
|
+
| 'invoice_issued'
|
|
155
|
+
| 'in_production'
|
|
156
|
+
| 'in_separation'
|
|
157
|
+
| 'ready_for_shipping'
|
|
158
|
+
| 'partially_shipped'
|
|
159
|
+
| 'shipped'
|
|
160
|
+
| 'partially_delivered'
|
|
161
|
+
| 'delivered'
|
|
162
|
+
| 'returned_for_exchange'
|
|
163
|
+
| 'received_for_exchange'
|
|
164
|
+
| 'returned';
|
|
165
|
+
/**
|
|
166
|
+
* Flags to associate additional info
|
|
167
|
+
*/
|
|
168
|
+
flags?: string[];
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* Designator of currency according to ISO 4217 (3 uppercase letters)
|
|
172
|
+
*/
|
|
173
|
+
currency_id?: string;
|
|
174
|
+
/**
|
|
175
|
+
* Graphic symbol used as a shorthand for currency's name
|
|
176
|
+
*/
|
|
177
|
+
currency_symbol?: string;
|
|
178
|
+
/**
|
|
179
|
+
* Object with sums of values
|
|
180
|
+
*/
|
|
181
|
+
amount: {
|
|
182
|
+
/**
|
|
183
|
+
* Order total amount
|
|
184
|
+
*/
|
|
185
|
+
total: number;
|
|
186
|
+
/**
|
|
187
|
+
* The sum of all items prices
|
|
188
|
+
*/
|
|
189
|
+
subtotal?: number;
|
|
190
|
+
/**
|
|
191
|
+
* Order freight cost
|
|
192
|
+
*/
|
|
193
|
+
freight?: number;
|
|
194
|
+
/**
|
|
195
|
+
* Final discount value applied
|
|
196
|
+
*/
|
|
197
|
+
discount?: number;
|
|
198
|
+
/**
|
|
199
|
+
* Value deducted via balance in wallet or loyalty points
|
|
200
|
+
*/
|
|
201
|
+
balance?: number;
|
|
202
|
+
/**
|
|
203
|
+
* The sum of all the taxes applied to the order
|
|
204
|
+
*/
|
|
205
|
+
tax?: number;
|
|
206
|
+
/**
|
|
207
|
+
* Sum of optional extra costs applied
|
|
208
|
+
*/
|
|
209
|
+
extra?: number;
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* Name or summary of order payment method(s)
|
|
213
|
+
*/
|
|
214
|
+
payment_method_label?: string;
|
|
215
|
+
/**
|
|
216
|
+
* Name of order shipping method(s)
|
|
217
|
+
*/
|
|
218
|
+
shipping_method_label?: string;
|
|
219
|
+
/**
|
|
220
|
+
* List of order customers
|
|
221
|
+
*/
|
|
222
|
+
buyers?: {
|
|
223
|
+
/**
|
|
224
|
+
* Customer ID (ObjectID)
|
|
225
|
+
*/
|
|
226
|
+
_id: string;
|
|
227
|
+
/**
|
|
228
|
+
* Customer language two letter code, sometimes with region, e.g. 'pt_br', 'fr', 'en_us'
|
|
229
|
+
*/
|
|
230
|
+
locale?: string;
|
|
231
|
+
/**
|
|
232
|
+
* Customer main email address
|
|
233
|
+
*/
|
|
234
|
+
main_email?: string;
|
|
235
|
+
/**
|
|
236
|
+
* List of customer email addresses
|
|
237
|
+
*/
|
|
238
|
+
emails?: {
|
|
239
|
+
/**
|
|
240
|
+
* The actual email address
|
|
241
|
+
*/
|
|
242
|
+
address: string;
|
|
243
|
+
/**
|
|
244
|
+
* The type of email
|
|
245
|
+
*/
|
|
246
|
+
type?: 'work' | 'home' | 'other';
|
|
247
|
+
/**
|
|
248
|
+
* States whether or not the email address has been verified
|
|
249
|
+
*/
|
|
250
|
+
verified?: boolean;
|
|
251
|
+
}[];
|
|
252
|
+
/**
|
|
253
|
+
* The name of this Customer, suitable for display
|
|
254
|
+
*/
|
|
255
|
+
display_name?: string;
|
|
256
|
+
/**
|
|
257
|
+
* Customer name object
|
|
258
|
+
*/
|
|
259
|
+
name?: {
|
|
260
|
+
/**
|
|
261
|
+
* The family name of this user, or "last name"
|
|
262
|
+
*/
|
|
263
|
+
family_name?: string;
|
|
264
|
+
/**
|
|
265
|
+
* The "first name" of this user
|
|
266
|
+
*/
|
|
267
|
+
given_name?: string;
|
|
268
|
+
/**
|
|
269
|
+
* The middle name(s) of this user
|
|
270
|
+
*/
|
|
271
|
+
middle_name?: string;
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* Customer preferred pronoun
|
|
275
|
+
*/
|
|
276
|
+
pronoun?: 'he' | 'she';
|
|
277
|
+
/**
|
|
278
|
+
* List of customer phone numbers
|
|
279
|
+
*/
|
|
280
|
+
phones?: {
|
|
281
|
+
/**
|
|
282
|
+
* Country calling code (without +), defined by standards E.123 and E.164
|
|
283
|
+
*/
|
|
284
|
+
country_code?: number;
|
|
285
|
+
/**
|
|
286
|
+
* The actual phone number, digits only
|
|
287
|
+
*/
|
|
288
|
+
number: string;
|
|
289
|
+
/**
|
|
290
|
+
* The type of phone
|
|
291
|
+
*/
|
|
292
|
+
type?: 'home' | 'personal' | 'work' | 'other';
|
|
293
|
+
}[];
|
|
294
|
+
/**
|
|
295
|
+
* Physical or juridical (company) person
|
|
296
|
+
*/
|
|
297
|
+
registry_type?: 'p' | 'j';
|
|
298
|
+
/**
|
|
299
|
+
* Country of document origin, an ISO 3166-2 code
|
|
300
|
+
*/
|
|
301
|
+
doc_country?: string;
|
|
302
|
+
/**
|
|
303
|
+
* Responsible person or organization document number (only numbers)
|
|
304
|
+
*/
|
|
305
|
+
doc_number?: string;
|
|
306
|
+
/**
|
|
307
|
+
* Municipal or state registration if exists
|
|
308
|
+
*/
|
|
309
|
+
inscription_type?: 'State' | 'Municipal';
|
|
310
|
+
/**
|
|
311
|
+
* Municipal or state registration number (with characters) if exists
|
|
312
|
+
*/
|
|
313
|
+
inscription_number?: string;
|
|
314
|
+
/**
|
|
315
|
+
* Registered company name or responsible fullname
|
|
316
|
+
*/
|
|
317
|
+
corporate_name?: string;
|
|
318
|
+
}[];
|
|
319
|
+
/**
|
|
320
|
+
* Whether the order is only budget, without payment transactions
|
|
321
|
+
*/
|
|
322
|
+
budget_only?: boolean;
|
|
323
|
+
/**
|
|
324
|
+
* List of shipping methods and address for this order
|
|
325
|
+
*/
|
|
326
|
+
shipping_lines?: {
|
|
327
|
+
/**
|
|
328
|
+
* Shipping line ID (ObjectID) [auto]
|
|
329
|
+
*/
|
|
330
|
+
_id?: string;
|
|
331
|
+
/**
|
|
332
|
+
* Sender's address
|
|
333
|
+
*/
|
|
334
|
+
from: {
|
|
335
|
+
/**
|
|
336
|
+
* ZIP (CEP, postal...) code
|
|
337
|
+
*/
|
|
338
|
+
zip: string;
|
|
339
|
+
/**
|
|
340
|
+
* Street or public place name
|
|
341
|
+
*/
|
|
342
|
+
street?: string;
|
|
343
|
+
/**
|
|
344
|
+
* House or building street number
|
|
345
|
+
*/
|
|
346
|
+
number?: number;
|
|
347
|
+
/**
|
|
348
|
+
* Address complement or second line, such as apartment number
|
|
349
|
+
*/
|
|
350
|
+
complement?: string;
|
|
351
|
+
/**
|
|
352
|
+
* Borough name
|
|
353
|
+
*/
|
|
354
|
+
borough?: string;
|
|
355
|
+
/**
|
|
356
|
+
* Some optional other reference for this address
|
|
357
|
+
*/
|
|
358
|
+
near_to?: string;
|
|
359
|
+
/**
|
|
360
|
+
* Full in line mailing address, should include street, number and borough
|
|
361
|
+
*/
|
|
362
|
+
line_address?: string;
|
|
363
|
+
/**
|
|
364
|
+
* City name
|
|
365
|
+
*/
|
|
366
|
+
city?: string;
|
|
367
|
+
/**
|
|
368
|
+
* Country name
|
|
369
|
+
*/
|
|
370
|
+
country?: string;
|
|
371
|
+
/**
|
|
372
|
+
* An ISO 3166-2 country code
|
|
373
|
+
*/
|
|
374
|
+
country_code?: string;
|
|
375
|
+
/**
|
|
376
|
+
* Province or state name
|
|
377
|
+
*/
|
|
378
|
+
province?: string;
|
|
379
|
+
/**
|
|
380
|
+
* The two-letter code for the province or state
|
|
381
|
+
*/
|
|
382
|
+
province_code?: string;
|
|
383
|
+
/**
|
|
384
|
+
* The name of recipient, generally is the customer's name
|
|
385
|
+
*/
|
|
386
|
+
name?: string;
|
|
387
|
+
/**
|
|
388
|
+
* The recipient's last name
|
|
389
|
+
*/
|
|
390
|
+
last_name?: string;
|
|
391
|
+
/**
|
|
392
|
+
* Customer phone number for this mailing address
|
|
393
|
+
*/
|
|
394
|
+
phone?: {
|
|
395
|
+
/**
|
|
396
|
+
* Country calling code (without +), defined by standards E.123 and E.164
|
|
397
|
+
*/
|
|
398
|
+
country_code?: number;
|
|
399
|
+
/**
|
|
400
|
+
* The actual phone number, digits only
|
|
401
|
+
*/
|
|
402
|
+
number: string;
|
|
403
|
+
};
|
|
404
|
+
};
|
|
405
|
+
/**
|
|
406
|
+
* Shipping address (recipient)
|
|
407
|
+
*/
|
|
408
|
+
to: {
|
|
409
|
+
/**
|
|
410
|
+
* ZIP (CEP, postal...) code
|
|
411
|
+
*/
|
|
412
|
+
zip: string;
|
|
413
|
+
/**
|
|
414
|
+
* Street or public place name
|
|
415
|
+
*/
|
|
416
|
+
street?: string;
|
|
417
|
+
/**
|
|
418
|
+
* House or building street number
|
|
419
|
+
*/
|
|
420
|
+
number?: number;
|
|
421
|
+
/**
|
|
422
|
+
* Address complement or second line, such as apartment number
|
|
423
|
+
*/
|
|
424
|
+
complement?: string;
|
|
425
|
+
/**
|
|
426
|
+
* Borough name
|
|
427
|
+
*/
|
|
428
|
+
borough?: string;
|
|
429
|
+
/**
|
|
430
|
+
* Some optional other reference for this address
|
|
431
|
+
*/
|
|
432
|
+
near_to?: string;
|
|
433
|
+
/**
|
|
434
|
+
* Full in line mailing address, should include street, number and borough
|
|
435
|
+
*/
|
|
436
|
+
line_address?: string;
|
|
437
|
+
/**
|
|
438
|
+
* City name
|
|
439
|
+
*/
|
|
440
|
+
city?: string;
|
|
441
|
+
/**
|
|
442
|
+
* Country name
|
|
443
|
+
*/
|
|
444
|
+
country?: string;
|
|
445
|
+
/**
|
|
446
|
+
* An ISO 3166-2 country code
|
|
447
|
+
*/
|
|
448
|
+
country_code?: string;
|
|
449
|
+
/**
|
|
450
|
+
* Province or state name
|
|
451
|
+
*/
|
|
452
|
+
province?: string;
|
|
453
|
+
/**
|
|
454
|
+
* The two-letter code for the province or state
|
|
455
|
+
*/
|
|
456
|
+
province_code?: string;
|
|
457
|
+
/**
|
|
458
|
+
* The name of recipient, generally is the customer's name
|
|
459
|
+
*/
|
|
460
|
+
name?: string;
|
|
461
|
+
/**
|
|
462
|
+
* The recipient's last name
|
|
463
|
+
*/
|
|
464
|
+
last_name?: string;
|
|
465
|
+
/**
|
|
466
|
+
* Customer phone number for this mailing address
|
|
467
|
+
*/
|
|
468
|
+
phone?: {
|
|
469
|
+
/**
|
|
470
|
+
* Country calling code (without +), defined by standards E.123 and E.164
|
|
471
|
+
*/
|
|
472
|
+
country_code?: number;
|
|
473
|
+
/**
|
|
474
|
+
* The actual phone number, digits only
|
|
475
|
+
*/
|
|
476
|
+
number: string;
|
|
477
|
+
};
|
|
478
|
+
};
|
|
479
|
+
/**
|
|
480
|
+
* Shipping object information
|
|
481
|
+
*/
|
|
482
|
+
package?: {
|
|
483
|
+
/**
|
|
484
|
+
* Package dimensions
|
|
485
|
+
*/
|
|
486
|
+
dimensions?: {
|
|
487
|
+
/**
|
|
488
|
+
* Package width, height and length
|
|
489
|
+
*
|
|
490
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
491
|
+
* via the `patternProperty` "^width|height|length$".
|
|
492
|
+
*/
|
|
493
|
+
[k: string]: {
|
|
494
|
+
/**
|
|
495
|
+
* Size in specified unit
|
|
496
|
+
*/
|
|
497
|
+
value: number;
|
|
498
|
+
/**
|
|
499
|
+
* Unit of measurement
|
|
500
|
+
*/
|
|
501
|
+
unit?: 'mm' | 'cm' | 'm' | 'ft' | 'in' | 'yd' | 'mi';
|
|
502
|
+
};
|
|
503
|
+
};
|
|
504
|
+
/**
|
|
505
|
+
* Package weight for freight calculation
|
|
506
|
+
*/
|
|
507
|
+
weight?: {
|
|
508
|
+
/**
|
|
509
|
+
* Size in specified unit
|
|
510
|
+
*/
|
|
511
|
+
value: number;
|
|
512
|
+
/**
|
|
513
|
+
* Unit of measurement
|
|
514
|
+
*/
|
|
515
|
+
unit?: 'mg' | 'g' | 'kg' | 'lb' | 'oz';
|
|
516
|
+
};
|
|
517
|
+
};
|
|
518
|
+
/**
|
|
519
|
+
* Shipping method (by application) chosen by customer
|
|
520
|
+
*/
|
|
521
|
+
app?: {
|
|
522
|
+
/**
|
|
523
|
+
* Application ID (ObjectID)
|
|
524
|
+
*/
|
|
525
|
+
_id?: string;
|
|
526
|
+
/**
|
|
527
|
+
* Name of shipping method shown to customers
|
|
528
|
+
*/
|
|
529
|
+
label?: string;
|
|
530
|
+
/**
|
|
531
|
+
* Carrier name
|
|
532
|
+
*/
|
|
533
|
+
carrier?: string;
|
|
534
|
+
/**
|
|
535
|
+
* Carrier document number (only numbers)
|
|
536
|
+
*/
|
|
537
|
+
carrier_doc_number?: string;
|
|
538
|
+
/**
|
|
539
|
+
* Name of service (shipping method) defined by carrier
|
|
540
|
+
*/
|
|
541
|
+
service_name?: string;
|
|
542
|
+
/**
|
|
543
|
+
* Code of service defined by carrier
|
|
544
|
+
*/
|
|
545
|
+
service_code?: string;
|
|
546
|
+
/**
|
|
547
|
+
* Contract number of the shop with carrier, if exists
|
|
548
|
+
*/
|
|
549
|
+
contract?: string;
|
|
550
|
+
/**
|
|
551
|
+
* Shipping method icon image URI
|
|
552
|
+
*/
|
|
553
|
+
icon?: string;
|
|
554
|
+
/**
|
|
555
|
+
* URI to carrier website to get package tracking status
|
|
556
|
+
*/
|
|
557
|
+
tracking_url?: string;
|
|
558
|
+
};
|
|
559
|
+
/**
|
|
560
|
+
* Pick up option when no (or optional) freight
|
|
561
|
+
*/
|
|
562
|
+
pick_up?: 'store' | 'locker' | 'point' | 'other';
|
|
563
|
+
/**
|
|
564
|
+
* Freight cost for this shipping line, without additionals
|
|
565
|
+
*/
|
|
566
|
+
price?: number;
|
|
567
|
+
/**
|
|
568
|
+
* The package value declared to carrier, generally the sum of all items prices
|
|
569
|
+
*/
|
|
570
|
+
declared_value?: number;
|
|
571
|
+
/**
|
|
572
|
+
* Cost for the "declared value" additional service
|
|
573
|
+
*/
|
|
574
|
+
declared_value_price?: number;
|
|
575
|
+
/**
|
|
576
|
+
* Whether the package must be delivered with additional service "own hand"
|
|
577
|
+
*/
|
|
578
|
+
own_hand?: boolean;
|
|
579
|
+
/**
|
|
580
|
+
* Cost for the "own hand" additional service
|
|
581
|
+
*/
|
|
582
|
+
own_hand_price?: number;
|
|
583
|
+
/**
|
|
584
|
+
* If the package will be delivered with acknowledgment of receipt
|
|
585
|
+
*/
|
|
586
|
+
receipt?: boolean;
|
|
587
|
+
/**
|
|
588
|
+
* Cost for the "acknowledgment of receipt" additional service
|
|
589
|
+
*/
|
|
590
|
+
receipt_price?: number;
|
|
591
|
+
/**
|
|
592
|
+
* List of other additional services for this shipping line
|
|
593
|
+
*/
|
|
594
|
+
other_additionals?: {
|
|
595
|
+
/**
|
|
596
|
+
* Tag to identify object, use only lowercase letters, digits and underscore
|
|
597
|
+
*/
|
|
598
|
+
tag?: string;
|
|
599
|
+
/**
|
|
600
|
+
* Name of the additional service
|
|
601
|
+
*/
|
|
602
|
+
label: string;
|
|
603
|
+
/**
|
|
604
|
+
* Cost for this additional service
|
|
605
|
+
*/
|
|
606
|
+
price?: number;
|
|
607
|
+
}[];
|
|
608
|
+
/**
|
|
609
|
+
* List of taxes or other additional services for this shipping line
|
|
610
|
+
*/
|
|
611
|
+
taxes?: {
|
|
612
|
+
/**
|
|
613
|
+
* Tag to identify object, use only lowercase letters, digits and underscore
|
|
614
|
+
*/
|
|
615
|
+
tag?: string;
|
|
616
|
+
/**
|
|
617
|
+
* Tax title
|
|
618
|
+
*/
|
|
619
|
+
label: string;
|
|
620
|
+
/**
|
|
621
|
+
* Tax value applied
|
|
622
|
+
*/
|
|
623
|
+
price?: number;
|
|
624
|
+
/**
|
|
625
|
+
* Tax rate as a function of package value
|
|
626
|
+
*/
|
|
627
|
+
rate?: number;
|
|
628
|
+
}[];
|
|
629
|
+
/**
|
|
630
|
+
* Discount on shipping price, negative if value was additionated (not discounted)
|
|
631
|
+
*/
|
|
632
|
+
discount?: number;
|
|
633
|
+
/**
|
|
634
|
+
* Total cost for this shipping line, with additionals and taxes
|
|
635
|
+
*/
|
|
636
|
+
total_price?: number;
|
|
637
|
+
/**
|
|
638
|
+
* Deadline for sending the package
|
|
639
|
+
*/
|
|
640
|
+
posting_deadline?: {
|
|
641
|
+
/**
|
|
642
|
+
* Number of days to post the product after purchase
|
|
643
|
+
*/
|
|
644
|
+
days: number;
|
|
645
|
+
/**
|
|
646
|
+
* If the deadline is calculated in working days
|
|
647
|
+
*/
|
|
648
|
+
working_days?: boolean;
|
|
649
|
+
/**
|
|
650
|
+
* Whether days will be counted after payment approval
|
|
651
|
+
*/
|
|
652
|
+
after_approval?: boolean;
|
|
653
|
+
};
|
|
654
|
+
/**
|
|
655
|
+
* Estimated delivery time
|
|
656
|
+
*/
|
|
657
|
+
delivery_time?: {
|
|
658
|
+
/**
|
|
659
|
+
* Number of days for delivery after shipping
|
|
660
|
+
*/
|
|
661
|
+
days: number;
|
|
662
|
+
/**
|
|
663
|
+
* If the deadline is calculated in working days
|
|
664
|
+
*/
|
|
665
|
+
working_days?: boolean;
|
|
666
|
+
};
|
|
667
|
+
/**
|
|
668
|
+
* Date range when delivery will be made
|
|
669
|
+
*/
|
|
670
|
+
scheduled_delivery?: {
|
|
671
|
+
/**
|
|
672
|
+
* Scheduled date and time on the ISO 8601 representation
|
|
673
|
+
*
|
|
674
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
675
|
+
* via the `patternProperty` "^start|end$".
|
|
676
|
+
*/
|
|
677
|
+
[k: string]: string;
|
|
678
|
+
};
|
|
679
|
+
/**
|
|
680
|
+
* Additional text instructions for pick up or custom delivery process
|
|
681
|
+
*/
|
|
682
|
+
delivery_instructions?: string;
|
|
683
|
+
/**
|
|
684
|
+
* List of codes for delivery status follow-up
|
|
685
|
+
*/
|
|
686
|
+
tracking_codes?: {
|
|
687
|
+
/**
|
|
688
|
+
* Tag to identify object, use only lowercase letters, digits and underscore
|
|
689
|
+
*/
|
|
690
|
+
tag?: string;
|
|
691
|
+
/**
|
|
692
|
+
* Tracking code string
|
|
693
|
+
*/
|
|
694
|
+
code: string;
|
|
695
|
+
/**
|
|
696
|
+
* URI for carrier website to get the tracking status with this code
|
|
697
|
+
*/
|
|
698
|
+
link?: string;
|
|
699
|
+
}[];
|
|
700
|
+
/**
|
|
701
|
+
* List of invoices
|
|
702
|
+
*/
|
|
703
|
+
invoices?: {
|
|
704
|
+
/**
|
|
705
|
+
* Company that issued this invoice, usually the store company
|
|
706
|
+
*/
|
|
707
|
+
issuer?: {
|
|
708
|
+
/**
|
|
709
|
+
* Organization document number (only numbers)
|
|
710
|
+
*/
|
|
711
|
+
doc_number?: string;
|
|
712
|
+
/**
|
|
713
|
+
* Municipal or state registration if exists
|
|
714
|
+
*/
|
|
715
|
+
inscription_type?: 'State' | 'Municipal';
|
|
716
|
+
/**
|
|
717
|
+
* Municipal or state registration number (with characters) if exists
|
|
718
|
+
*/
|
|
719
|
+
inscription_number?: string;
|
|
720
|
+
/**
|
|
721
|
+
* Registered company name
|
|
722
|
+
*/
|
|
723
|
+
corporate_name?: string;
|
|
724
|
+
};
|
|
725
|
+
/**
|
|
726
|
+
* Invoice number
|
|
727
|
+
*/
|
|
728
|
+
number: string;
|
|
729
|
+
/**
|
|
730
|
+
* Invoice serial number
|
|
731
|
+
*/
|
|
732
|
+
serial_number?: string;
|
|
733
|
+
/**
|
|
734
|
+
* Date and time of issue, in ISO 8601 standard representation [auto]
|
|
735
|
+
*/
|
|
736
|
+
issued_at?: string;
|
|
737
|
+
/**
|
|
738
|
+
* URI to invoice file
|
|
739
|
+
*/
|
|
740
|
+
link?: string;
|
|
741
|
+
/**
|
|
742
|
+
* Invoice access key (BR)
|
|
743
|
+
*/
|
|
744
|
+
access_key?: string;
|
|
745
|
+
/**
|
|
746
|
+
* URI to DANFE (BR)
|
|
747
|
+
*/
|
|
748
|
+
link_danfe?: string;
|
|
749
|
+
}[];
|
|
750
|
+
/**
|
|
751
|
+
* Fulfillment status and date of change
|
|
752
|
+
*/
|
|
753
|
+
status?: {
|
|
754
|
+
/**
|
|
755
|
+
* Last status change, date and time in ISO 8601 standard representation [auto]
|
|
756
|
+
*/
|
|
757
|
+
updated_at?: string;
|
|
758
|
+
/**
|
|
759
|
+
* Shipping status
|
|
760
|
+
*/
|
|
761
|
+
current:
|
|
762
|
+
| 'invoice_issued'
|
|
763
|
+
| 'in_production'
|
|
764
|
+
| 'in_separation'
|
|
765
|
+
| 'ready_for_shipping'
|
|
766
|
+
| 'shipped'
|
|
767
|
+
| 'delivered'
|
|
768
|
+
| 'returned_for_exchange'
|
|
769
|
+
| 'received_for_exchange'
|
|
770
|
+
| 'returned';
|
|
771
|
+
};
|
|
772
|
+
/**
|
|
773
|
+
* For multi DC, set warehouse where the stock will be handled
|
|
774
|
+
*/
|
|
775
|
+
warehouse_code?: string;
|
|
776
|
+
/**
|
|
777
|
+
* List of order items related with this shipping line, use only if items are divided
|
|
778
|
+
*/
|
|
779
|
+
items?: string[];
|
|
780
|
+
/**
|
|
781
|
+
* Flags to associate additional info
|
|
782
|
+
*/
|
|
783
|
+
flags?: string[];
|
|
784
|
+
/**
|
|
785
|
+
* List of custom fields
|
|
786
|
+
*/
|
|
787
|
+
custom_fields?: {
|
|
788
|
+
/**
|
|
789
|
+
* Field name
|
|
790
|
+
*/
|
|
791
|
+
field: string;
|
|
792
|
+
/**
|
|
793
|
+
* Field value
|
|
794
|
+
*/
|
|
795
|
+
value: string;
|
|
796
|
+
}[];
|
|
797
|
+
/**
|
|
798
|
+
* Optional notes with additional info about this shipping line
|
|
799
|
+
*/
|
|
800
|
+
notes?: string;
|
|
801
|
+
}[];
|
|
802
|
+
/**
|
|
803
|
+
* List of payment transactions for this order
|
|
804
|
+
*/
|
|
805
|
+
transactions?: {
|
|
806
|
+
/**
|
|
807
|
+
* Transaction ID (ObjectID) [auto]
|
|
808
|
+
*/
|
|
809
|
+
_id?: string;
|
|
810
|
+
/**
|
|
811
|
+
* Date and time of transaction creation, in ISO 8601 standard representation [auto]
|
|
812
|
+
*/
|
|
813
|
+
created_at?: string;
|
|
814
|
+
/**
|
|
815
|
+
* Transaction type
|
|
816
|
+
*/
|
|
817
|
+
type?: 'payment' | 'recurrence';
|
|
818
|
+
/**
|
|
819
|
+
* Payment method object
|
|
820
|
+
*/
|
|
821
|
+
payment_method: {
|
|
822
|
+
/**
|
|
823
|
+
* Standardized payment method code
|
|
824
|
+
*/
|
|
825
|
+
code:
|
|
826
|
+
| 'credit_card'
|
|
827
|
+
| 'banking_billet'
|
|
828
|
+
| 'online_debit'
|
|
829
|
+
| 'account_deposit'
|
|
830
|
+
| 'debit_card'
|
|
831
|
+
| 'balance_on_intermediary'
|
|
832
|
+
| 'loyalty_points'
|
|
833
|
+
| 'other';
|
|
834
|
+
/**
|
|
835
|
+
* Short description for payment method
|
|
836
|
+
*/
|
|
837
|
+
name?: string;
|
|
838
|
+
};
|
|
839
|
+
/**
|
|
840
|
+
* Direct link to pay current transaction
|
|
841
|
+
*/
|
|
842
|
+
payment_link?: string;
|
|
843
|
+
/**
|
|
844
|
+
* Additional text instructions for manual payments
|
|
845
|
+
*/
|
|
846
|
+
payment_instructions?: string;
|
|
847
|
+
/**
|
|
848
|
+
* Transation payer info
|
|
849
|
+
*/
|
|
850
|
+
payer?: {
|
|
851
|
+
/**
|
|
852
|
+
* Payer full name or company corporate name
|
|
853
|
+
*/
|
|
854
|
+
fullname?: string;
|
|
855
|
+
/**
|
|
856
|
+
* Date of payer birth
|
|
857
|
+
*/
|
|
858
|
+
birth_date?: {
|
|
859
|
+
/**
|
|
860
|
+
* Day of birth
|
|
861
|
+
*/
|
|
862
|
+
day?: number;
|
|
863
|
+
/**
|
|
864
|
+
* Number of month of birth
|
|
865
|
+
*/
|
|
866
|
+
month?: number;
|
|
867
|
+
/**
|
|
868
|
+
* Year of birth
|
|
869
|
+
*/
|
|
870
|
+
year?: number;
|
|
871
|
+
};
|
|
872
|
+
/**
|
|
873
|
+
* Payer contact phone
|
|
874
|
+
*/
|
|
875
|
+
phone?: {
|
|
876
|
+
/**
|
|
877
|
+
* Country calling code (without +), defined by standards E.123 and E.164
|
|
878
|
+
*/
|
|
879
|
+
country_code?: number;
|
|
880
|
+
/**
|
|
881
|
+
* The actual phone number, digits only
|
|
882
|
+
*/
|
|
883
|
+
number: string;
|
|
884
|
+
/**
|
|
885
|
+
* The type of phone
|
|
886
|
+
*/
|
|
887
|
+
type?: 'home' | 'personal' | 'work' | 'other';
|
|
888
|
+
};
|
|
889
|
+
/**
|
|
890
|
+
* Physical or juridical (company) person
|
|
891
|
+
*/
|
|
892
|
+
registry_type?: 'p' | 'j';
|
|
893
|
+
/**
|
|
894
|
+
* Country of document origin, an ISO 3166-2 code
|
|
895
|
+
*/
|
|
896
|
+
doc_country?: string;
|
|
897
|
+
/**
|
|
898
|
+
* Responsible person or organization document number (only numbers)
|
|
899
|
+
*/
|
|
900
|
+
doc_number?: string;
|
|
901
|
+
};
|
|
902
|
+
/**
|
|
903
|
+
* The mailing address associated with the payment method
|
|
904
|
+
*/
|
|
905
|
+
billing_address?: {
|
|
906
|
+
/**
|
|
907
|
+
* ZIP (CEP, postal...) code
|
|
908
|
+
*/
|
|
909
|
+
zip: string;
|
|
910
|
+
/**
|
|
911
|
+
* Street or public place name
|
|
912
|
+
*/
|
|
913
|
+
street?: string;
|
|
914
|
+
/**
|
|
915
|
+
* House or building street number
|
|
916
|
+
*/
|
|
917
|
+
number?: number;
|
|
918
|
+
/**
|
|
919
|
+
* Address complement or second line, such as apartment number
|
|
920
|
+
*/
|
|
921
|
+
complement?: string;
|
|
922
|
+
/**
|
|
923
|
+
* Borough name
|
|
924
|
+
*/
|
|
925
|
+
borough?: string;
|
|
926
|
+
/**
|
|
927
|
+
* Some optional other reference for this address
|
|
928
|
+
*/
|
|
929
|
+
near_to?: string;
|
|
930
|
+
/**
|
|
931
|
+
* Full in line mailing address, should include street, number and borough
|
|
932
|
+
*/
|
|
933
|
+
line_address?: string;
|
|
934
|
+
/**
|
|
935
|
+
* City name
|
|
936
|
+
*/
|
|
937
|
+
city?: string;
|
|
938
|
+
/**
|
|
939
|
+
* Country name
|
|
940
|
+
*/
|
|
941
|
+
country?: string;
|
|
942
|
+
/**
|
|
943
|
+
* An ISO 3166-2 country code
|
|
944
|
+
*/
|
|
945
|
+
country_code?: string;
|
|
946
|
+
/**
|
|
947
|
+
* Province or state name
|
|
948
|
+
*/
|
|
949
|
+
province?: string;
|
|
950
|
+
/**
|
|
951
|
+
* The two-letter code for the province or state
|
|
952
|
+
*/
|
|
953
|
+
province_code?: string;
|
|
954
|
+
/**
|
|
955
|
+
* The name of recipient, generally is the customer's name
|
|
956
|
+
*/
|
|
957
|
+
name?: string;
|
|
958
|
+
/**
|
|
959
|
+
* The recipient's last name
|
|
960
|
+
*/
|
|
961
|
+
last_name?: string;
|
|
962
|
+
/**
|
|
963
|
+
* Customer phone number for this mailing address
|
|
964
|
+
*/
|
|
965
|
+
phone?: {
|
|
966
|
+
/**
|
|
967
|
+
* Country calling code (without +), defined by standards E.123 and E.164
|
|
968
|
+
*/
|
|
969
|
+
country_code?: number;
|
|
970
|
+
/**
|
|
971
|
+
* The actual phone number, digits only
|
|
972
|
+
*/
|
|
973
|
+
number: string;
|
|
974
|
+
};
|
|
975
|
+
};
|
|
976
|
+
/**
|
|
977
|
+
* Payment method (by application) chosen by customer
|
|
978
|
+
*/
|
|
979
|
+
app?: {
|
|
980
|
+
/**
|
|
981
|
+
* Application ID (ObjectID)
|
|
982
|
+
*/
|
|
983
|
+
_id?: string;
|
|
984
|
+
/**
|
|
985
|
+
* Name of payment method shown to customers
|
|
986
|
+
*/
|
|
987
|
+
label?: string;
|
|
988
|
+
/**
|
|
989
|
+
* Payment icon image URI
|
|
990
|
+
*/
|
|
991
|
+
icon?: string;
|
|
992
|
+
/**
|
|
993
|
+
* Payment intermediator
|
|
994
|
+
*/
|
|
995
|
+
intermediator?: {
|
|
996
|
+
/**
|
|
997
|
+
* Name of payment intermediator
|
|
998
|
+
*/
|
|
999
|
+
name?: string;
|
|
1000
|
+
/**
|
|
1001
|
+
* URI to intermediator website
|
|
1002
|
+
*/
|
|
1003
|
+
link?: string;
|
|
1004
|
+
/**
|
|
1005
|
+
* Gateway name standardized as identification code
|
|
1006
|
+
*/
|
|
1007
|
+
code: string;
|
|
1008
|
+
};
|
|
1009
|
+
/**
|
|
1010
|
+
* Base URI to payments
|
|
1011
|
+
*/
|
|
1012
|
+
payment_url?: string;
|
|
1013
|
+
};
|
|
1014
|
+
/**
|
|
1015
|
+
* Transaction properties in the intermediator
|
|
1016
|
+
*/
|
|
1017
|
+
intermediator?: {
|
|
1018
|
+
/**
|
|
1019
|
+
* Transaction ID in the intermediator
|
|
1020
|
+
*/
|
|
1021
|
+
transaction_id?: string;
|
|
1022
|
+
/**
|
|
1023
|
+
* Transaction code in the intermediator
|
|
1024
|
+
*/
|
|
1025
|
+
transaction_code?: string;
|
|
1026
|
+
/**
|
|
1027
|
+
* Transaction reference code
|
|
1028
|
+
*/
|
|
1029
|
+
transaction_reference?: string;
|
|
1030
|
+
/**
|
|
1031
|
+
* Payment method as defined by intermediator
|
|
1032
|
+
*/
|
|
1033
|
+
payment_method?: {
|
|
1034
|
+
/**
|
|
1035
|
+
* Payment method code
|
|
1036
|
+
*/
|
|
1037
|
+
code: string;
|
|
1038
|
+
/**
|
|
1039
|
+
* Short description for payment method
|
|
1040
|
+
*/
|
|
1041
|
+
name?: string;
|
|
1042
|
+
};
|
|
1043
|
+
/**
|
|
1044
|
+
* ID of customer account in the intermediator
|
|
1045
|
+
*/
|
|
1046
|
+
buyer_id?: string;
|
|
1047
|
+
};
|
|
1048
|
+
/**
|
|
1049
|
+
* Credit card data, if payment was done with credit card
|
|
1050
|
+
*/
|
|
1051
|
+
credit_card?: {
|
|
1052
|
+
/**
|
|
1053
|
+
* Full name of the holder, as it is on the credit card
|
|
1054
|
+
*/
|
|
1055
|
+
holder_name?: string;
|
|
1056
|
+
/**
|
|
1057
|
+
* Response code from AVS: http://www.emsecommerce.net/avs_cvv2_response_codes.htm
|
|
1058
|
+
*/
|
|
1059
|
+
avs_result_code?: string | null;
|
|
1060
|
+
/**
|
|
1061
|
+
* Response code from credit card company, such as AVS result code
|
|
1062
|
+
*/
|
|
1063
|
+
cvv_result_code?: string | null;
|
|
1064
|
+
/**
|
|
1065
|
+
* Issuer identification number (IIN), known as bank identification number (BIN)
|
|
1066
|
+
*/
|
|
1067
|
+
bin?: number;
|
|
1068
|
+
/**
|
|
1069
|
+
* Credit card issuer name, eg.: Visa, American Express, MasterCard
|
|
1070
|
+
*/
|
|
1071
|
+
company?: string;
|
|
1072
|
+
/**
|
|
1073
|
+
* Last digits (up to 4) of credit card number
|
|
1074
|
+
*/
|
|
1075
|
+
last_digits?: string;
|
|
1076
|
+
/**
|
|
1077
|
+
* Unique credit card token
|
|
1078
|
+
*/
|
|
1079
|
+
token?: string;
|
|
1080
|
+
/**
|
|
1081
|
+
* Credit card processing standardized error code
|
|
1082
|
+
*/
|
|
1083
|
+
error_code?:
|
|
1084
|
+
| 'incorrect_number'
|
|
1085
|
+
| 'invalid_number'
|
|
1086
|
+
| 'invalid_expiry_date'
|
|
1087
|
+
| 'invalid_cvc'
|
|
1088
|
+
| 'expired_card'
|
|
1089
|
+
| 'incorrect_cvc'
|
|
1090
|
+
| 'incorrect_zip'
|
|
1091
|
+
| 'incorrect_address'
|
|
1092
|
+
| 'card_declined'
|
|
1093
|
+
| 'processing_error'
|
|
1094
|
+
| 'call_issuer'
|
|
1095
|
+
| 'pick_up_card';
|
|
1096
|
+
};
|
|
1097
|
+
/**
|
|
1098
|
+
* Banking billet data, if payment was done with banking billet
|
|
1099
|
+
*/
|
|
1100
|
+
banking_billet?: {
|
|
1101
|
+
/**
|
|
1102
|
+
* Ticket code, generally a barcode number
|
|
1103
|
+
*/
|
|
1104
|
+
code?: string;
|
|
1105
|
+
/**
|
|
1106
|
+
* Date and time of expiration, in ISO 8601 standard representation
|
|
1107
|
+
*/
|
|
1108
|
+
valid_thru?: string;
|
|
1109
|
+
/**
|
|
1110
|
+
* Text lines on ticket
|
|
1111
|
+
*/
|
|
1112
|
+
text_lines?: string[];
|
|
1113
|
+
/**
|
|
1114
|
+
* Direct link (URI) to banking billet
|
|
1115
|
+
*/
|
|
1116
|
+
link?: string;
|
|
1117
|
+
};
|
|
1118
|
+
/**
|
|
1119
|
+
* If paid with loyalty points, specify how many points and what program was consumed
|
|
1120
|
+
*/
|
|
1121
|
+
loyalty_points?: {
|
|
1122
|
+
/**
|
|
1123
|
+
* The name of the loyalty points program
|
|
1124
|
+
*/
|
|
1125
|
+
name?: string;
|
|
1126
|
+
/**
|
|
1127
|
+
* Unique identifier, program name using only lowercase, numbers and underscore
|
|
1128
|
+
*/
|
|
1129
|
+
program_id: string;
|
|
1130
|
+
/**
|
|
1131
|
+
* Number of loyalty points applied from customer account
|
|
1132
|
+
*/
|
|
1133
|
+
points_value: number;
|
|
1134
|
+
/**
|
|
1135
|
+
* The ratio of a point when converted to currency
|
|
1136
|
+
*/
|
|
1137
|
+
ratio?: number;
|
|
1138
|
+
};
|
|
1139
|
+
/**
|
|
1140
|
+
* Currency ID specific for this transaction, if different of order currency ID
|
|
1141
|
+
*/
|
|
1142
|
+
currency_id?: string;
|
|
1143
|
+
/**
|
|
1144
|
+
* Currency symbol specific for this transaction
|
|
1145
|
+
*/
|
|
1146
|
+
currency_symbol?: string;
|
|
1147
|
+
/**
|
|
1148
|
+
* Discount by payment method, negative if value was additionated (not discounted)
|
|
1149
|
+
*/
|
|
1150
|
+
discount?: number;
|
|
1151
|
+
/**
|
|
1152
|
+
* Transaction amount, disregarding installment rates
|
|
1153
|
+
*/
|
|
1154
|
+
amount: number;
|
|
1155
|
+
/**
|
|
1156
|
+
* Installments option
|
|
1157
|
+
*/
|
|
1158
|
+
installments?: {
|
|
1159
|
+
/**
|
|
1160
|
+
* Number of installments
|
|
1161
|
+
*/
|
|
1162
|
+
number: number;
|
|
1163
|
+
/**
|
|
1164
|
+
* Installment value
|
|
1165
|
+
*/
|
|
1166
|
+
value?: number;
|
|
1167
|
+
/**
|
|
1168
|
+
* Tax applied
|
|
1169
|
+
*/
|
|
1170
|
+
tax?: boolean;
|
|
1171
|
+
/**
|
|
1172
|
+
* Total value, sum of all plots
|
|
1173
|
+
*/
|
|
1174
|
+
total?: number;
|
|
1175
|
+
};
|
|
1176
|
+
/**
|
|
1177
|
+
* Financial status and date of change
|
|
1178
|
+
*/
|
|
1179
|
+
status?: {
|
|
1180
|
+
/**
|
|
1181
|
+
* Last status change, date and time in ISO 8601 standard representation [auto]
|
|
1182
|
+
*/
|
|
1183
|
+
updated_at?: string;
|
|
1184
|
+
/**
|
|
1185
|
+
* Payment status
|
|
1186
|
+
*/
|
|
1187
|
+
current:
|
|
1188
|
+
| 'pending'
|
|
1189
|
+
| 'under_analysis'
|
|
1190
|
+
| 'authorized'
|
|
1191
|
+
| 'unauthorized'
|
|
1192
|
+
| 'paid'
|
|
1193
|
+
| 'in_dispute'
|
|
1194
|
+
| 'refunded'
|
|
1195
|
+
| 'voided'
|
|
1196
|
+
| 'unknown';
|
|
1197
|
+
};
|
|
1198
|
+
/**
|
|
1199
|
+
* List of order items related with this transaction, use only if items are divided
|
|
1200
|
+
*/
|
|
1201
|
+
items?: string[];
|
|
1202
|
+
/**
|
|
1203
|
+
* Flags to associate additional info
|
|
1204
|
+
*/
|
|
1205
|
+
flags?: string[];
|
|
1206
|
+
/**
|
|
1207
|
+
* List of custom fields
|
|
1208
|
+
*/
|
|
1209
|
+
custom_fields?: {
|
|
1210
|
+
/**
|
|
1211
|
+
* Field name
|
|
1212
|
+
*/
|
|
1213
|
+
field: string;
|
|
1214
|
+
/**
|
|
1215
|
+
* Field value
|
|
1216
|
+
*/
|
|
1217
|
+
value: string;
|
|
1218
|
+
}[];
|
|
1219
|
+
/**
|
|
1220
|
+
* Optional notes with additional info about this transaction
|
|
1221
|
+
*/
|
|
1222
|
+
notes?: string;
|
|
1223
|
+
}[];
|
|
1224
|
+
/**
|
|
1225
|
+
* Historical of payments and financial status changes
|
|
1226
|
+
*/
|
|
1227
|
+
payments_history?: {
|
|
1228
|
+
/**
|
|
1229
|
+
* Payment status ID (ObjectID) [auto]
|
|
1230
|
+
*/
|
|
1231
|
+
_id?: string;
|
|
1232
|
+
/**
|
|
1233
|
+
* ID of transaction related with this event
|
|
1234
|
+
*/
|
|
1235
|
+
transaction_id?: string;
|
|
1236
|
+
/**
|
|
1237
|
+
* Date and time of the event, in ISO 8601 standard representation [auto]
|
|
1238
|
+
*/
|
|
1239
|
+
date_time?: string;
|
|
1240
|
+
/**
|
|
1241
|
+
* Payment status
|
|
1242
|
+
*/
|
|
1243
|
+
status:
|
|
1244
|
+
| 'pending'
|
|
1245
|
+
| 'under_analysis'
|
|
1246
|
+
| 'authorized'
|
|
1247
|
+
| 'unauthorized'
|
|
1248
|
+
| 'paid'
|
|
1249
|
+
| 'in_dispute'
|
|
1250
|
+
| 'refunded'
|
|
1251
|
+
| 'voided'
|
|
1252
|
+
| 'unknown';
|
|
1253
|
+
/**
|
|
1254
|
+
* Code of received notification with this status change
|
|
1255
|
+
*/
|
|
1256
|
+
notification_code?: string;
|
|
1257
|
+
/**
|
|
1258
|
+
* If customer was already notified of this event
|
|
1259
|
+
*/
|
|
1260
|
+
customer_notified?: boolean;
|
|
1261
|
+
/**
|
|
1262
|
+
* Flags to associate additional info
|
|
1263
|
+
*/
|
|
1264
|
+
flags?: string[];
|
|
1265
|
+
}[];
|
|
1266
|
+
/**
|
|
1267
|
+
* Fulfillment and tracking events
|
|
1268
|
+
*/
|
|
1269
|
+
fulfillments?: {
|
|
1270
|
+
/**
|
|
1271
|
+
* Fulfillment status ID (ObjectID) [auto]
|
|
1272
|
+
*/
|
|
1273
|
+
_id?: string;
|
|
1274
|
+
/**
|
|
1275
|
+
* ID of shipping line related with this event
|
|
1276
|
+
*/
|
|
1277
|
+
shipping_line_id?: string;
|
|
1278
|
+
/**
|
|
1279
|
+
* Date and time of the event, in ISO 8601 standard representation [auto]
|
|
1280
|
+
*/
|
|
1281
|
+
date_time?: string;
|
|
1282
|
+
/**
|
|
1283
|
+
* Fulfillment status
|
|
1284
|
+
*/
|
|
1285
|
+
status:
|
|
1286
|
+
| 'invoice_issued'
|
|
1287
|
+
| 'in_production'
|
|
1288
|
+
| 'in_separation'
|
|
1289
|
+
| 'ready_for_shipping'
|
|
1290
|
+
| 'shipped'
|
|
1291
|
+
| 'delivered'
|
|
1292
|
+
| 'returned_for_exchange'
|
|
1293
|
+
| 'received_for_exchange'
|
|
1294
|
+
| 'returned';
|
|
1295
|
+
/**
|
|
1296
|
+
* Code of received notification with this status change
|
|
1297
|
+
*/
|
|
1298
|
+
notification_code?: string;
|
|
1299
|
+
/**
|
|
1300
|
+
* If customer was already notified of this event
|
|
1301
|
+
*/
|
|
1302
|
+
customer_notified?: boolean;
|
|
1303
|
+
/**
|
|
1304
|
+
* Flags to associate additional info
|
|
1305
|
+
*/
|
|
1306
|
+
flags?: string[];
|
|
1307
|
+
}[];
|
|
1308
|
+
/**
|
|
1309
|
+
* Products composing the order
|
|
1310
|
+
*/
|
|
1311
|
+
items?: {
|
|
1312
|
+
/**
|
|
1313
|
+
* Order item ID (ObjectID) [auto]
|
|
1314
|
+
*/
|
|
1315
|
+
_id?: string;
|
|
1316
|
+
/**
|
|
1317
|
+
* Product ID
|
|
1318
|
+
*/
|
|
1319
|
+
product_id: string;
|
|
1320
|
+
/**
|
|
1321
|
+
* ID to specify the variation added to cart, if product has variations
|
|
1322
|
+
*/
|
|
1323
|
+
variation_id?: string;
|
|
1324
|
+
/**
|
|
1325
|
+
* Product or variation unique reference code
|
|
1326
|
+
*/
|
|
1327
|
+
sku?: string;
|
|
1328
|
+
/**
|
|
1329
|
+
* Product or variation full name, or other label for this cart item
|
|
1330
|
+
*/
|
|
1331
|
+
name?: string;
|
|
1332
|
+
/**
|
|
1333
|
+
* Product or variation picture for this cart item
|
|
1334
|
+
*/
|
|
1335
|
+
picture?: {
|
|
1336
|
+
/**
|
|
1337
|
+
* Image size variation
|
|
1338
|
+
*
|
|
1339
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
1340
|
+
* via the `patternProperty` "^small|normal|big|zoom|custom$".
|
|
1341
|
+
*/
|
|
1342
|
+
[k: string]: {
|
|
1343
|
+
/**
|
|
1344
|
+
* Image link
|
|
1345
|
+
*/
|
|
1346
|
+
url: string;
|
|
1347
|
+
/**
|
|
1348
|
+
* Image size (width x height) in px, such as 100x50 (100px width, 50px height)
|
|
1349
|
+
*/
|
|
1350
|
+
size?: string;
|
|
1351
|
+
/**
|
|
1352
|
+
* Alternative text, HTML alt tag (important for SEO)
|
|
1353
|
+
*/
|
|
1354
|
+
alt?: string;
|
|
1355
|
+
};
|
|
1356
|
+
};
|
|
1357
|
+
/**
|
|
1358
|
+
* Item customization fields
|
|
1359
|
+
*/
|
|
1360
|
+
customizations?: {
|
|
1361
|
+
/**
|
|
1362
|
+
* Title for this customization field, can be the grid title
|
|
1363
|
+
*/
|
|
1364
|
+
label?: string;
|
|
1365
|
+
/**
|
|
1366
|
+
* Option chosen or created by customer
|
|
1367
|
+
*/
|
|
1368
|
+
option: {
|
|
1369
|
+
/**
|
|
1370
|
+
* Option ID (ObjectID) if it was predefined (not custom value created by customer)
|
|
1371
|
+
*/
|
|
1372
|
+
_id?: string;
|
|
1373
|
+
/**
|
|
1374
|
+
* Option text value displayed for the client
|
|
1375
|
+
*/
|
|
1376
|
+
text: string;
|
|
1377
|
+
};
|
|
1378
|
+
/**
|
|
1379
|
+
* URL of file attached by customer to this field
|
|
1380
|
+
*/
|
|
1381
|
+
attachment?: string;
|
|
1382
|
+
/**
|
|
1383
|
+
* Price alteration due to this customization
|
|
1384
|
+
*/
|
|
1385
|
+
add_to_price?: {
|
|
1386
|
+
/**
|
|
1387
|
+
* Type of price addition
|
|
1388
|
+
*/
|
|
1389
|
+
type?: 'percentage' | 'fixed';
|
|
1390
|
+
/**
|
|
1391
|
+
* Additional value, could be negative
|
|
1392
|
+
*/
|
|
1393
|
+
addition: number;
|
|
1394
|
+
};
|
|
1395
|
+
}[];
|
|
1396
|
+
/**
|
|
1397
|
+
* Parent kit product for this item
|
|
1398
|
+
*/
|
|
1399
|
+
kit_product?: {
|
|
1400
|
+
/**
|
|
1401
|
+
* Kit product ID (ObjectID)
|
|
1402
|
+
*/
|
|
1403
|
+
_id: string;
|
|
1404
|
+
/**
|
|
1405
|
+
* Kit product full name
|
|
1406
|
+
*/
|
|
1407
|
+
name?: string;
|
|
1408
|
+
/**
|
|
1409
|
+
* Total quantity of items to close a kit unit
|
|
1410
|
+
*/
|
|
1411
|
+
pack_quantity?: number;
|
|
1412
|
+
/**
|
|
1413
|
+
* Kit total pack price
|
|
1414
|
+
*/
|
|
1415
|
+
price?: number;
|
|
1416
|
+
/**
|
|
1417
|
+
* Current kit composition
|
|
1418
|
+
*/
|
|
1419
|
+
composition?: {
|
|
1420
|
+
/**
|
|
1421
|
+
* Product ID (ObjectID)
|
|
1422
|
+
*/
|
|
1423
|
+
_id: string;
|
|
1424
|
+
/**
|
|
1425
|
+
* Selected variation ID (ObjectID) if any
|
|
1426
|
+
*/
|
|
1427
|
+
variation_id?: string;
|
|
1428
|
+
/**
|
|
1429
|
+
* Kit item quantity
|
|
1430
|
+
*/
|
|
1431
|
+
quantity?: number;
|
|
1432
|
+
}[];
|
|
1433
|
+
};
|
|
1434
|
+
/**
|
|
1435
|
+
* Gift wrap chosen by customer
|
|
1436
|
+
*/
|
|
1437
|
+
gift_wrap?: {
|
|
1438
|
+
/**
|
|
1439
|
+
* Tag to identify object, use only lowercase letters, digits and underscore
|
|
1440
|
+
*/
|
|
1441
|
+
tag?: string;
|
|
1442
|
+
/**
|
|
1443
|
+
* Title describing this gift wrap
|
|
1444
|
+
*/
|
|
1445
|
+
label: string;
|
|
1446
|
+
/**
|
|
1447
|
+
* Additional value due to this gift wrap
|
|
1448
|
+
*/
|
|
1449
|
+
add_to_price?: number;
|
|
1450
|
+
};
|
|
1451
|
+
/**
|
|
1452
|
+
* Item quantity in cart
|
|
1453
|
+
*/
|
|
1454
|
+
quantity: number;
|
|
1455
|
+
/**
|
|
1456
|
+
* Item stock management state respective to order status
|
|
1457
|
+
*/
|
|
1458
|
+
stock_status?: 'pending' | 'released' | 'returned' | 'unmanaged' | 'out_of_stock' | '__releasing';
|
|
1459
|
+
/**
|
|
1460
|
+
* Product sale price specifically for this cart
|
|
1461
|
+
*/
|
|
1462
|
+
price: number;
|
|
1463
|
+
/**
|
|
1464
|
+
* Final item price including additions due to customizations and gift wrap
|
|
1465
|
+
*/
|
|
1466
|
+
final_price?: number;
|
|
1467
|
+
/**
|
|
1468
|
+
* Flags to associate additional info
|
|
1469
|
+
*/
|
|
1470
|
+
flags?: string[];
|
|
1471
|
+
}[];
|
|
1472
|
+
/**
|
|
1473
|
+
* Extra discount applied by coupon or UTM campaign
|
|
1474
|
+
*/
|
|
1475
|
+
extra_discount?: {
|
|
1476
|
+
/**
|
|
1477
|
+
* Text of discount coupon applied by customer
|
|
1478
|
+
*/
|
|
1479
|
+
discount_coupon?: string;
|
|
1480
|
+
/**
|
|
1481
|
+
* Extra discount value
|
|
1482
|
+
*/
|
|
1483
|
+
value: number;
|
|
1484
|
+
/**
|
|
1485
|
+
* Extra discount rule (by application)
|
|
1486
|
+
*/
|
|
1487
|
+
app?: {
|
|
1488
|
+
/**
|
|
1489
|
+
* Application ID (ObjectID)
|
|
1490
|
+
*/
|
|
1491
|
+
_id?: string;
|
|
1492
|
+
/**
|
|
1493
|
+
* Name of the discount rule, can be the coupon or campaign name
|
|
1494
|
+
*/
|
|
1495
|
+
label?: string;
|
|
1496
|
+
/**
|
|
1497
|
+
* Additional text description for the discount rule
|
|
1498
|
+
*/
|
|
1499
|
+
description?: string;
|
|
1500
|
+
};
|
|
1501
|
+
/**
|
|
1502
|
+
* Flags to associate additional info
|
|
1503
|
+
*/
|
|
1504
|
+
flags?: string[];
|
|
1505
|
+
};
|
|
1506
|
+
/**
|
|
1507
|
+
* Original subscription (recurrence) order
|
|
1508
|
+
*/
|
|
1509
|
+
subscription_order?: {
|
|
1510
|
+
/**
|
|
1511
|
+
* Subscription order ID (ObjectID)
|
|
1512
|
+
*/
|
|
1513
|
+
_id: string;
|
|
1514
|
+
/**
|
|
1515
|
+
* Subscription order number
|
|
1516
|
+
*/
|
|
1517
|
+
number?: number;
|
|
1518
|
+
};
|
|
1519
|
+
/**
|
|
1520
|
+
* List of custom attributes
|
|
1521
|
+
*/
|
|
1522
|
+
metafields?: {
|
|
1523
|
+
/**
|
|
1524
|
+
* String to help distinguish who (or which app) created and can use the metafield
|
|
1525
|
+
*/
|
|
1526
|
+
namespace?: string;
|
|
1527
|
+
/**
|
|
1528
|
+
* Field name
|
|
1529
|
+
*/
|
|
1530
|
+
field?: string;
|
|
1531
|
+
/**
|
|
1532
|
+
* Custom property value
|
|
1533
|
+
*/
|
|
1534
|
+
value: {
|
|
1535
|
+
[k: string]: unknown;
|
|
1536
|
+
};
|
|
1537
|
+
}[];
|
|
1538
|
+
/**
|
|
1539
|
+
* List of custom attributes
|
|
1540
|
+
*/
|
|
1541
|
+
hidden_metafields?: {
|
|
1542
|
+
/**
|
|
1543
|
+
* String to help distinguish who (or which app) created and can use the metafield
|
|
1544
|
+
*/
|
|
1545
|
+
namespace?: string;
|
|
1546
|
+
/**
|
|
1547
|
+
* Field name
|
|
1548
|
+
*/
|
|
1549
|
+
field?: string;
|
|
1550
|
+
/**
|
|
1551
|
+
* Custom property value
|
|
1552
|
+
*/
|
|
1553
|
+
value: {
|
|
1554
|
+
[k: string]: unknown;
|
|
1555
|
+
};
|
|
1556
|
+
}[];
|
|
1557
|
+
/**
|
|
1558
|
+
* List of custom attributes, hidden by default, visible for the order buyers
|
|
1559
|
+
*/
|
|
1560
|
+
private_metafields?: {
|
|
1561
|
+
/**
|
|
1562
|
+
* String to help distinguish who (or which app) created and can use the metafield
|
|
1563
|
+
*/
|
|
1564
|
+
namespace?: string;
|
|
1565
|
+
/**
|
|
1566
|
+
* Field name
|
|
1567
|
+
*/
|
|
1568
|
+
field?: string;
|
|
1569
|
+
/**
|
|
1570
|
+
* Custom property value
|
|
1571
|
+
*/
|
|
1572
|
+
value: {
|
|
1573
|
+
[k: string]: unknown;
|
|
1574
|
+
};
|
|
1575
|
+
}[];
|
|
1576
|
+
/**
|
|
1577
|
+
* Flags to associate additional info
|
|
1578
|
+
*/
|
|
1579
|
+
flags?: string[];
|
|
1580
|
+
/**
|
|
1581
|
+
* Optional notes with additional info about this order
|
|
1582
|
+
*/
|
|
1583
|
+
notes?: string;
|
|
1584
|
+
/**
|
|
1585
|
+
* Description and notes about this order, available only for shop administrators
|
|
1586
|
+
*/
|
|
1587
|
+
staff_notes?: string;
|
|
1588
|
+
}
|