@cloudcommerce/api 1.0.0-alpha.8 → 2.0.1
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/.turbo/turbo-build.log +4 -5
- package/.turbo/turbo-test.log +18 -0
- package/LICENSE.md +230 -0
- package/lib/api.d.ts +125 -0
- package/lib/api.js +215 -0
- package/lib/api.js.map +1 -0
- package/package.json +10 -3
- package/src/api.ts +298 -0
- package/tests/index.test.ts +82 -0
- package/tsconfig.json +2 -97
- package/types/applications.d.ts +180 -0
- package/types/authentications.d.ts +121 -0
- package/types/brands.d.ts +174 -0
- package/types/carts.d.ts +380 -0
- package/types/categories.d.ts +216 -0
- package/types/collections.d.ts +174 -0
- package/types/customers.d.ts +535 -0
- package/types/grids.d.ts +172 -0
- package/types/orders.d.ts +1743 -0
- package/types/products.d.ts +1441 -0
- package/types/stores.d.ts +138 -0
- package/types.d.ts +509 -0
- package/types.ts +2 -0
- package/dist/index.js +0 -22
- package/dist/index.js.map +0 -1
- package/src/index.ts +0 -27
|
@@ -0,0 +1,535 @@
|
|
|
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
|
+
* Customer object model
|
|
10
|
+
*/
|
|
11
|
+
export interface Customers {
|
|
12
|
+
/**
|
|
13
|
+
* Customer ID (ObjectID) [auto]
|
|
14
|
+
*/
|
|
15
|
+
_id: string & { length: 24 };
|
|
16
|
+
/**
|
|
17
|
+
* When object was seted (POST/PUT), date and time in ISO 8601 standard representation [auto]
|
|
18
|
+
*/
|
|
19
|
+
created_at: string;
|
|
20
|
+
/**
|
|
21
|
+
* When was it last changed, date and time in ISO 8601 standard representation [auto]
|
|
22
|
+
*/
|
|
23
|
+
updated_at: string;
|
|
24
|
+
/**
|
|
25
|
+
* ID of store [auto]
|
|
26
|
+
*/
|
|
27
|
+
store_id: number;
|
|
28
|
+
/**
|
|
29
|
+
* Whether customer was registered by staff and is trusted
|
|
30
|
+
*/
|
|
31
|
+
staff_signature?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* The state of registration, if completed, invited and waiting, or declined by customer
|
|
34
|
+
*/
|
|
35
|
+
state?: 'invited' | 'registered' | 'declined';
|
|
36
|
+
/**
|
|
37
|
+
* Whether customer account is enabled to make orders
|
|
38
|
+
*/
|
|
39
|
+
enabled?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Whether the customer can sign in to the store with this account
|
|
42
|
+
*/
|
|
43
|
+
login?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Status defined by seller, such as active or blocked
|
|
46
|
+
*/
|
|
47
|
+
status?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Code to identify the affiliate that referred the customer
|
|
50
|
+
*/
|
|
51
|
+
affiliate_code?: string;
|
|
52
|
+
/**
|
|
53
|
+
* UTM campaign HTTP parameters associated with this customer's first access
|
|
54
|
+
*/
|
|
55
|
+
utm?: {
|
|
56
|
+
/**
|
|
57
|
+
* Parameter 'utm_source', the referrer: (e.g. 'google', 'newsletter')
|
|
58
|
+
*/
|
|
59
|
+
source?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Parameter 'utm_medium', the marketing medium: (e.g. 'cpc', 'banner', 'email')
|
|
62
|
+
*/
|
|
63
|
+
medium?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Parameter 'utm_campaign', the product, promo code, or slogan (e.g. 'spring_sale')
|
|
66
|
+
*/
|
|
67
|
+
campaign?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Parameter 'utm_term', identifies the paid keywords
|
|
70
|
+
*/
|
|
71
|
+
term?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Parameter 'utm_content', used to differentiate ads
|
|
74
|
+
*/
|
|
75
|
+
content?: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Providers for OAuth authentication
|
|
79
|
+
*
|
|
80
|
+
* @maxItems 20
|
|
81
|
+
*/
|
|
82
|
+
oauth_providers?: {
|
|
83
|
+
/**
|
|
84
|
+
* The provider with which the user authenticated, e.g.: 'facebook'
|
|
85
|
+
*/
|
|
86
|
+
provider: string;
|
|
87
|
+
/**
|
|
88
|
+
* Unique ID for the user generated by the service provider
|
|
89
|
+
*/
|
|
90
|
+
user_id: string;
|
|
91
|
+
}[];
|
|
92
|
+
/**
|
|
93
|
+
* Customer language two letters code, sometimes with region, e.g.: 'pt_br', 'fr', 'en_us'
|
|
94
|
+
*/
|
|
95
|
+
locale?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Customer main email address
|
|
98
|
+
*/
|
|
99
|
+
main_email: string;
|
|
100
|
+
/**
|
|
101
|
+
* Customer email addresses list
|
|
102
|
+
*
|
|
103
|
+
* @maxItems 20
|
|
104
|
+
*/
|
|
105
|
+
emails?: {
|
|
106
|
+
/**
|
|
107
|
+
* The actual email address
|
|
108
|
+
*/
|
|
109
|
+
address: string;
|
|
110
|
+
/**
|
|
111
|
+
* The type of email
|
|
112
|
+
*/
|
|
113
|
+
type?: 'home' | 'personal' | 'work' | 'other';
|
|
114
|
+
/**
|
|
115
|
+
* States whether or not the email address has been verified
|
|
116
|
+
*/
|
|
117
|
+
verified?: boolean;
|
|
118
|
+
}[];
|
|
119
|
+
/**
|
|
120
|
+
* Indicates whether customer would like to receive email updates from the shop
|
|
121
|
+
*/
|
|
122
|
+
accepts_marketing?: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* The name of this Customer, suitable for display
|
|
125
|
+
*/
|
|
126
|
+
display_name: string;
|
|
127
|
+
/**
|
|
128
|
+
* Customer name object
|
|
129
|
+
*/
|
|
130
|
+
name?: {
|
|
131
|
+
/**
|
|
132
|
+
* The family name of this user, or "last name"
|
|
133
|
+
*/
|
|
134
|
+
family_name?: string;
|
|
135
|
+
/**
|
|
136
|
+
* The "first name" of this user
|
|
137
|
+
*/
|
|
138
|
+
given_name?: string;
|
|
139
|
+
/**
|
|
140
|
+
* The middle name(s) of this user
|
|
141
|
+
*/
|
|
142
|
+
middle_name?: string;
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* Date of customer birth
|
|
146
|
+
*/
|
|
147
|
+
birth_date?: {
|
|
148
|
+
/**
|
|
149
|
+
* Day of birth
|
|
150
|
+
*/
|
|
151
|
+
day?: number;
|
|
152
|
+
/**
|
|
153
|
+
* Number of month of birth
|
|
154
|
+
*/
|
|
155
|
+
month?: number;
|
|
156
|
+
/**
|
|
157
|
+
* Year of birth
|
|
158
|
+
*/
|
|
159
|
+
year?: number;
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* Customer preferred pronoun
|
|
163
|
+
*/
|
|
164
|
+
pronoun?: 'he' | 'she';
|
|
165
|
+
/**
|
|
166
|
+
* User profile pictures
|
|
167
|
+
*
|
|
168
|
+
* @maxItems 20
|
|
169
|
+
*/
|
|
170
|
+
photos?: string[];
|
|
171
|
+
/**
|
|
172
|
+
* List of customer phone numbers
|
|
173
|
+
*
|
|
174
|
+
* @maxItems 20
|
|
175
|
+
*/
|
|
176
|
+
phones?: {
|
|
177
|
+
/**
|
|
178
|
+
* Country calling code (without +), defined by standards E.123 and E.164
|
|
179
|
+
*/
|
|
180
|
+
country_code?: number;
|
|
181
|
+
/**
|
|
182
|
+
* The actual phone number, digits only
|
|
183
|
+
*/
|
|
184
|
+
number: string;
|
|
185
|
+
/**
|
|
186
|
+
* The type of phone
|
|
187
|
+
*/
|
|
188
|
+
type?: 'home' | 'personal' | 'work' | 'other';
|
|
189
|
+
}[];
|
|
190
|
+
/**
|
|
191
|
+
* Physical or juridical (company) person
|
|
192
|
+
*/
|
|
193
|
+
registry_type?: 'p' | 'j';
|
|
194
|
+
/**
|
|
195
|
+
* Country of document origin, an ISO 3166-2 code
|
|
196
|
+
*/
|
|
197
|
+
doc_country?: string;
|
|
198
|
+
/**
|
|
199
|
+
* Responsible person or organization document number (only numbers)
|
|
200
|
+
*/
|
|
201
|
+
doc_number?: string;
|
|
202
|
+
/**
|
|
203
|
+
* Municipal or state registration if exists
|
|
204
|
+
*/
|
|
205
|
+
inscription_type?: 'State' | 'Municipal';
|
|
206
|
+
/**
|
|
207
|
+
* Municipal or state registration number (with characters) if exists
|
|
208
|
+
*/
|
|
209
|
+
inscription_number?: string;
|
|
210
|
+
/**
|
|
211
|
+
* Registered company name or responsible fullname
|
|
212
|
+
*/
|
|
213
|
+
corporate_name?: string;
|
|
214
|
+
/**
|
|
215
|
+
* List of customer shipping addresses
|
|
216
|
+
*
|
|
217
|
+
* @maxItems 40
|
|
218
|
+
*/
|
|
219
|
+
addresses?: {
|
|
220
|
+
/**
|
|
221
|
+
* ZIP (CEP, postal...) code
|
|
222
|
+
*/
|
|
223
|
+
zip: string;
|
|
224
|
+
/**
|
|
225
|
+
* Street or public place name
|
|
226
|
+
*/
|
|
227
|
+
street?: string;
|
|
228
|
+
/**
|
|
229
|
+
* House or building street number
|
|
230
|
+
*/
|
|
231
|
+
number?: number;
|
|
232
|
+
/**
|
|
233
|
+
* Address complement or second line, such as apartment number
|
|
234
|
+
*/
|
|
235
|
+
complement?: string;
|
|
236
|
+
/**
|
|
237
|
+
* Borough name
|
|
238
|
+
*/
|
|
239
|
+
borough?: string;
|
|
240
|
+
/**
|
|
241
|
+
* Some optional other reference for this address
|
|
242
|
+
*/
|
|
243
|
+
near_to?: string;
|
|
244
|
+
/**
|
|
245
|
+
* Full in line mailing address, should include street, number and borough
|
|
246
|
+
*/
|
|
247
|
+
line_address?: string;
|
|
248
|
+
/**
|
|
249
|
+
* City name
|
|
250
|
+
*/
|
|
251
|
+
city?: string;
|
|
252
|
+
/**
|
|
253
|
+
* Country name
|
|
254
|
+
*/
|
|
255
|
+
country?: string;
|
|
256
|
+
/**
|
|
257
|
+
* An ISO 3166-2 country code
|
|
258
|
+
*/
|
|
259
|
+
country_code?: string;
|
|
260
|
+
/**
|
|
261
|
+
* Province or state name
|
|
262
|
+
*/
|
|
263
|
+
province?: string;
|
|
264
|
+
/**
|
|
265
|
+
* The two-letter code for the province or state
|
|
266
|
+
*/
|
|
267
|
+
province_code?: string;
|
|
268
|
+
/**
|
|
269
|
+
* The name of recipient, generally is the customer's name
|
|
270
|
+
*/
|
|
271
|
+
name?: string;
|
|
272
|
+
/**
|
|
273
|
+
* The recipient's last name
|
|
274
|
+
*/
|
|
275
|
+
last_name?: string;
|
|
276
|
+
/**
|
|
277
|
+
* Customer phone number for this mailing address
|
|
278
|
+
*/
|
|
279
|
+
phone?: {
|
|
280
|
+
/**
|
|
281
|
+
* Country calling code (without +), defined by standards E.123 and E.164
|
|
282
|
+
*/
|
|
283
|
+
country_code?: number;
|
|
284
|
+
/**
|
|
285
|
+
* The actual phone number, digits only
|
|
286
|
+
*/
|
|
287
|
+
number: string;
|
|
288
|
+
};
|
|
289
|
+
/**
|
|
290
|
+
* Indicates whether this address is the default address for the customer
|
|
291
|
+
*/
|
|
292
|
+
default?: boolean;
|
|
293
|
+
}[];
|
|
294
|
+
/**
|
|
295
|
+
* Products marked as favorites
|
|
296
|
+
*
|
|
297
|
+
* @maxItems 3000
|
|
298
|
+
*/
|
|
299
|
+
favorites?: string[];
|
|
300
|
+
/**
|
|
301
|
+
* Last products visited by the customer
|
|
302
|
+
*
|
|
303
|
+
* @maxItems 100
|
|
304
|
+
*/
|
|
305
|
+
last_visited_products?: string[];
|
|
306
|
+
/**
|
|
307
|
+
* Last terms searched on shop by the customer
|
|
308
|
+
*
|
|
309
|
+
* @maxItems 100
|
|
310
|
+
*/
|
|
311
|
+
last_searched_terms?: string[];
|
|
312
|
+
/**
|
|
313
|
+
* Default currency for the user, designator according to ISO 4217 (3 uppercase letters)
|
|
314
|
+
*/
|
|
315
|
+
currency_id?: string;
|
|
316
|
+
/**
|
|
317
|
+
* Graphic symbol used as a shorthand for currency's name
|
|
318
|
+
*/
|
|
319
|
+
currency_symbol?: string;
|
|
320
|
+
/**
|
|
321
|
+
* Total number of orders completed by this customer
|
|
322
|
+
*/
|
|
323
|
+
orders_count?: number;
|
|
324
|
+
/**
|
|
325
|
+
* The total amount in orders completed by this customer
|
|
326
|
+
*/
|
|
327
|
+
orders_total_value?: number;
|
|
328
|
+
/**
|
|
329
|
+
* List of customer accumulated loyalty points by program and expiration
|
|
330
|
+
*
|
|
331
|
+
* @maxItems 1000
|
|
332
|
+
*/
|
|
333
|
+
loyalty_points_entries?: {
|
|
334
|
+
/**
|
|
335
|
+
* The name of the loyalty points program
|
|
336
|
+
*/
|
|
337
|
+
name?: string;
|
|
338
|
+
/**
|
|
339
|
+
* Unique identifier, program name using only lowercase, numbers and underscore
|
|
340
|
+
*/
|
|
341
|
+
program_id: string;
|
|
342
|
+
/**
|
|
343
|
+
* Number of loyalty points earned
|
|
344
|
+
*/
|
|
345
|
+
earned_points?: number;
|
|
346
|
+
/**
|
|
347
|
+
* Number of active (not yet used) loyalty points
|
|
348
|
+
*/
|
|
349
|
+
active_points: number;
|
|
350
|
+
/**
|
|
351
|
+
* The ratio of a point when converted to currency
|
|
352
|
+
*/
|
|
353
|
+
ratio?: number;
|
|
354
|
+
/**
|
|
355
|
+
* Validity of the points entry, until this date the active points can be converted
|
|
356
|
+
*/
|
|
357
|
+
valid_thru?: string;
|
|
358
|
+
/**
|
|
359
|
+
* Points origin order ID (ObjectID)
|
|
360
|
+
*/
|
|
361
|
+
order_id?: string & { length: 24 };
|
|
362
|
+
}[];
|
|
363
|
+
/**
|
|
364
|
+
* The total amount of money that this customer has spent at the store
|
|
365
|
+
*/
|
|
366
|
+
total_spent?: number;
|
|
367
|
+
/**
|
|
368
|
+
* The total amount in cancelled orders
|
|
369
|
+
*/
|
|
370
|
+
total_cancelled?: number;
|
|
371
|
+
/**
|
|
372
|
+
* List of customer orders
|
|
373
|
+
*
|
|
374
|
+
* @maxItems 1000
|
|
375
|
+
*/
|
|
376
|
+
orders?: {
|
|
377
|
+
/**
|
|
378
|
+
* Order ID (ObjectID)
|
|
379
|
+
*/
|
|
380
|
+
_id: string & { length: 24 };
|
|
381
|
+
/**
|
|
382
|
+
* When order was saved, date and time in ISO 8601 standard representation
|
|
383
|
+
*/
|
|
384
|
+
created_at?: string;
|
|
385
|
+
/**
|
|
386
|
+
* Auto incremented order number
|
|
387
|
+
*/
|
|
388
|
+
number?: number;
|
|
389
|
+
/**
|
|
390
|
+
* Designator of currency according to ISO 4217 (3 uppercase letters)
|
|
391
|
+
*/
|
|
392
|
+
currency_id?: string;
|
|
393
|
+
/**
|
|
394
|
+
* Graphic symbol used as a shorthand for currency's name
|
|
395
|
+
*/
|
|
396
|
+
currency_symbol?: string;
|
|
397
|
+
/**
|
|
398
|
+
* Object with sums of values
|
|
399
|
+
*/
|
|
400
|
+
amount?: {
|
|
401
|
+
/**
|
|
402
|
+
* Order total amount
|
|
403
|
+
*/
|
|
404
|
+
total: number;
|
|
405
|
+
/**
|
|
406
|
+
* The sum of all items prices
|
|
407
|
+
*/
|
|
408
|
+
subtotal?: number;
|
|
409
|
+
/**
|
|
410
|
+
* Order freight cost
|
|
411
|
+
*/
|
|
412
|
+
freight?: number;
|
|
413
|
+
/**
|
|
414
|
+
* Applied discount value
|
|
415
|
+
*/
|
|
416
|
+
discount?: number;
|
|
417
|
+
/**
|
|
418
|
+
* Value deducted via balance in wallet or loyalty points
|
|
419
|
+
*/
|
|
420
|
+
balance?: number;
|
|
421
|
+
/**
|
|
422
|
+
* The sum of all the taxes applied to the order
|
|
423
|
+
*/
|
|
424
|
+
tax?: number;
|
|
425
|
+
/**
|
|
426
|
+
* Sum of optional extra costs applied
|
|
427
|
+
*/
|
|
428
|
+
extra?: number;
|
|
429
|
+
};
|
|
430
|
+
/**
|
|
431
|
+
* Name or summary of order payment method(s)
|
|
432
|
+
*/
|
|
433
|
+
payment_method_label?: string;
|
|
434
|
+
/**
|
|
435
|
+
* Name of order shipping method(s)
|
|
436
|
+
*/
|
|
437
|
+
shipping_method_label?: string;
|
|
438
|
+
}[];
|
|
439
|
+
/**
|
|
440
|
+
* List of customer saved credit cards
|
|
441
|
+
*
|
|
442
|
+
* @maxItems 40
|
|
443
|
+
*/
|
|
444
|
+
credit_cards?: {
|
|
445
|
+
/**
|
|
446
|
+
* Full name of the holder, as it is on the credit card
|
|
447
|
+
*/
|
|
448
|
+
holder_name?: string;
|
|
449
|
+
/**
|
|
450
|
+
* Issuer identification number (IIN), known as bank identification number (BIN)
|
|
451
|
+
*/
|
|
452
|
+
bin?: number;
|
|
453
|
+
/**
|
|
454
|
+
* Credit card issuer name, eg.: Visa, American Express, MasterCard
|
|
455
|
+
*/
|
|
456
|
+
company?: string;
|
|
457
|
+
/**
|
|
458
|
+
* Last digits (up to 4) of credit card number
|
|
459
|
+
*/
|
|
460
|
+
last_digits: string;
|
|
461
|
+
/**
|
|
462
|
+
* Unique credit card token
|
|
463
|
+
*/
|
|
464
|
+
token: string;
|
|
465
|
+
/**
|
|
466
|
+
* Payment intermediator
|
|
467
|
+
*/
|
|
468
|
+
intermediator: {
|
|
469
|
+
/**
|
|
470
|
+
* Gateway name standardized as identification code
|
|
471
|
+
*/
|
|
472
|
+
code: string;
|
|
473
|
+
/**
|
|
474
|
+
* ID of respective customer account in the intermediator
|
|
475
|
+
*/
|
|
476
|
+
buyer_id?: string;
|
|
477
|
+
};
|
|
478
|
+
}[];
|
|
479
|
+
/**
|
|
480
|
+
* List of custom attributes
|
|
481
|
+
*
|
|
482
|
+
* @maxItems 100
|
|
483
|
+
*/
|
|
484
|
+
metafields?: {
|
|
485
|
+
/**
|
|
486
|
+
* String to help distinguish who (or which app) created and can use the metafield
|
|
487
|
+
*/
|
|
488
|
+
namespace?: string;
|
|
489
|
+
/**
|
|
490
|
+
* Field name
|
|
491
|
+
*/
|
|
492
|
+
field?: string;
|
|
493
|
+
/**
|
|
494
|
+
* Custom property value
|
|
495
|
+
*/
|
|
496
|
+
value: {
|
|
497
|
+
[k: string]: unknown;
|
|
498
|
+
};
|
|
499
|
+
}[];
|
|
500
|
+
/**
|
|
501
|
+
* List of custom attributes
|
|
502
|
+
*
|
|
503
|
+
* @maxItems 100
|
|
504
|
+
*/
|
|
505
|
+
hidden_metafields?: {
|
|
506
|
+
/**
|
|
507
|
+
* String to help distinguish who (or which app) created and can use the metafield
|
|
508
|
+
*/
|
|
509
|
+
namespace?: string;
|
|
510
|
+
/**
|
|
511
|
+
* Field name
|
|
512
|
+
*/
|
|
513
|
+
field?: string;
|
|
514
|
+
/**
|
|
515
|
+
* Custom property value
|
|
516
|
+
*/
|
|
517
|
+
value: {
|
|
518
|
+
[k: string]: unknown;
|
|
519
|
+
};
|
|
520
|
+
}[];
|
|
521
|
+
/**
|
|
522
|
+
* Flags to associate additional info
|
|
523
|
+
*
|
|
524
|
+
* @maxItems 10
|
|
525
|
+
*/
|
|
526
|
+
flags?: string[];
|
|
527
|
+
/**
|
|
528
|
+
* Optional notes with additional info about this customer
|
|
529
|
+
*/
|
|
530
|
+
notes?: string;
|
|
531
|
+
/**
|
|
532
|
+
* Description and notes about this customer, available only for shop administrators
|
|
533
|
+
*/
|
|
534
|
+
staff_notes?: string;
|
|
535
|
+
}
|
package/types/grids.d.ts
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
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
|
+
* Grid object model
|
|
10
|
+
*/
|
|
11
|
+
export interface Grids {
|
|
12
|
+
/**
|
|
13
|
+
* Grid ID (ObjectID) [auto]
|
|
14
|
+
*/
|
|
15
|
+
_id: string & { length: 24 };
|
|
16
|
+
/**
|
|
17
|
+
* When object was seted (POST/PUT), date and time in ISO 8601 standard representation [auto]
|
|
18
|
+
*/
|
|
19
|
+
created_at: string;
|
|
20
|
+
/**
|
|
21
|
+
* When was it last changed, date and time in ISO 8601 standard representation [auto]
|
|
22
|
+
*/
|
|
23
|
+
updated_at: string;
|
|
24
|
+
/**
|
|
25
|
+
* ID of store [auto]
|
|
26
|
+
*/
|
|
27
|
+
store_id: number;
|
|
28
|
+
/**
|
|
29
|
+
* Grid title
|
|
30
|
+
*/
|
|
31
|
+
title: string;
|
|
32
|
+
/**
|
|
33
|
+
* Text translations for internationalization
|
|
34
|
+
*/
|
|
35
|
+
i18n?: {
|
|
36
|
+
/**
|
|
37
|
+
* Language specific text fields
|
|
38
|
+
*
|
|
39
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
40
|
+
* via the `patternProperty` "^[a-z]{2}(_[a-z]{2})?$".
|
|
41
|
+
*/
|
|
42
|
+
[k: string]: {
|
|
43
|
+
/**
|
|
44
|
+
* Grid title
|
|
45
|
+
*/
|
|
46
|
+
title?: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Identifier for integrations and syncronizations, generally the grid name normalized
|
|
51
|
+
*/
|
|
52
|
+
grid_id?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Pre-defined options for this grid, used in specifications, customization and variations
|
|
55
|
+
*
|
|
56
|
+
* @maxItems 3000
|
|
57
|
+
*/
|
|
58
|
+
options?: {
|
|
59
|
+
/**
|
|
60
|
+
* Option ID (ObjectID) [auto]
|
|
61
|
+
*/
|
|
62
|
+
_id?: string & { length: 24 };
|
|
63
|
+
/**
|
|
64
|
+
* Option text value displayed for the client
|
|
65
|
+
*/
|
|
66
|
+
text: string;
|
|
67
|
+
/**
|
|
68
|
+
* Text translations for internationalization
|
|
69
|
+
*/
|
|
70
|
+
i18n?: {
|
|
71
|
+
/**
|
|
72
|
+
* Language specific text fields
|
|
73
|
+
*
|
|
74
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
75
|
+
* via the `patternProperty` "^[a-z]{2}(_[a-z]{2})?$".
|
|
76
|
+
*/
|
|
77
|
+
[k: string]: {
|
|
78
|
+
/**
|
|
79
|
+
* Option text value displayed for the client
|
|
80
|
+
*/
|
|
81
|
+
text?: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Default normalized value to use in integrations
|
|
86
|
+
*/
|
|
87
|
+
value?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Normalized values to use in specific integrations (ID in property)
|
|
90
|
+
*/
|
|
91
|
+
external_values?: {
|
|
92
|
+
/**
|
|
93
|
+
* Attribute text value
|
|
94
|
+
*
|
|
95
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
96
|
+
* via the `patternProperty` "^[a-z0-9_]{2,30}$".
|
|
97
|
+
*/
|
|
98
|
+
[k: string]: string;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Option color palette (if the grid involves colors), starting by main color
|
|
102
|
+
*
|
|
103
|
+
* @maxItems 6
|
|
104
|
+
*/
|
|
105
|
+
colors?: string[];
|
|
106
|
+
/**
|
|
107
|
+
* Default price alteration for product with this option for customization or variations
|
|
108
|
+
*/
|
|
109
|
+
add_to_price?: {
|
|
110
|
+
/**
|
|
111
|
+
* Type of price addition
|
|
112
|
+
*/
|
|
113
|
+
type?: 'percentage' | 'fixed';
|
|
114
|
+
/**
|
|
115
|
+
* Additional value, could be negative
|
|
116
|
+
*/
|
|
117
|
+
addition: number;
|
|
118
|
+
};
|
|
119
|
+
}[];
|
|
120
|
+
/**
|
|
121
|
+
* If this grid accept custom value defined by customer (product customization)
|
|
122
|
+
*/
|
|
123
|
+
custom_value?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* If this grid accept customer file attachment
|
|
126
|
+
*/
|
|
127
|
+
attachment?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Default price alteration for product with this grid for customization or variations
|
|
130
|
+
*/
|
|
131
|
+
add_to_price?: {
|
|
132
|
+
/**
|
|
133
|
+
* Type of price addition
|
|
134
|
+
*/
|
|
135
|
+
type?: 'percentage' | 'fixed';
|
|
136
|
+
/**
|
|
137
|
+
* Additional value, could be negative
|
|
138
|
+
*/
|
|
139
|
+
addition: number;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* List of custom attributes
|
|
143
|
+
*
|
|
144
|
+
* @maxItems 100
|
|
145
|
+
*/
|
|
146
|
+
metafields?: {
|
|
147
|
+
/**
|
|
148
|
+
* String to help distinguish who (or which app) created and can use the metafield
|
|
149
|
+
*/
|
|
150
|
+
namespace?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Field name
|
|
153
|
+
*/
|
|
154
|
+
field?: string;
|
|
155
|
+
/**
|
|
156
|
+
* Custom property value
|
|
157
|
+
*/
|
|
158
|
+
value: {
|
|
159
|
+
[k: string]: unknown;
|
|
160
|
+
};
|
|
161
|
+
}[];
|
|
162
|
+
/**
|
|
163
|
+
* Flags to associate additional info
|
|
164
|
+
*
|
|
165
|
+
* @maxItems 10
|
|
166
|
+
*/
|
|
167
|
+
flags?: string[];
|
|
168
|
+
/**
|
|
169
|
+
* Optional notes with additional info about this product
|
|
170
|
+
*/
|
|
171
|
+
notes?: string;
|
|
172
|
+
}
|