@cloudcommerce/api 1.0.0-alpha.8 → 2.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/.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,121 @@
|
|
|
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
|
+
* Authenticated API user
|
|
10
|
+
*/
|
|
11
|
+
export interface Authentications {
|
|
12
|
+
/**
|
|
13
|
+
* Authentication 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
|
+
* List of store IDs granted for this authentication [auto]
|
|
26
|
+
*
|
|
27
|
+
* @maxItems 500
|
|
28
|
+
*/
|
|
29
|
+
store_ids: number[];
|
|
30
|
+
/**
|
|
31
|
+
* Simple username for identification, only numbers and lowercase letters
|
|
32
|
+
*/
|
|
33
|
+
username: string;
|
|
34
|
+
/**
|
|
35
|
+
* User language two letter code, sometimes with region, eg.: pt_br, fr, en_us
|
|
36
|
+
*/
|
|
37
|
+
locale?: string;
|
|
38
|
+
/**
|
|
39
|
+
* User email address
|
|
40
|
+
*/
|
|
41
|
+
email?: string;
|
|
42
|
+
/**
|
|
43
|
+
* User full name
|
|
44
|
+
*/
|
|
45
|
+
name?: string;
|
|
46
|
+
/**
|
|
47
|
+
* User phone number
|
|
48
|
+
*/
|
|
49
|
+
phone?: string;
|
|
50
|
+
/**
|
|
51
|
+
* MD5 hash generated with the user's password
|
|
52
|
+
*/
|
|
53
|
+
pass_md5_hash?: string;
|
|
54
|
+
/**
|
|
55
|
+
* API key as a random 128 bytes hexadecimal number
|
|
56
|
+
*/
|
|
57
|
+
api_key?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Collection of resources allowed to user, each resource uri as object property
|
|
60
|
+
*/
|
|
61
|
+
permissions?: {
|
|
62
|
+
/**
|
|
63
|
+
* Resource/Subresources/Third-level/ID
|
|
64
|
+
*
|
|
65
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
66
|
+
* via the `patternProperty` "^(([^/_][a-z0-9/_@:$+]{1,60}[^/])|[*])$".
|
|
67
|
+
*/
|
|
68
|
+
[k: string]: ('all' | 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE')[];
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* List of dashboard cards chosen by user
|
|
72
|
+
*
|
|
73
|
+
* @maxItems 40
|
|
74
|
+
*/
|
|
75
|
+
panel_cards?: {
|
|
76
|
+
/**
|
|
77
|
+
* Unique identifier, card name using only lowercase, numbers and underscore
|
|
78
|
+
*/
|
|
79
|
+
card_id: string;
|
|
80
|
+
/**
|
|
81
|
+
* Card title
|
|
82
|
+
*/
|
|
83
|
+
title?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Card text, usually a brief description
|
|
86
|
+
*/
|
|
87
|
+
paragraph?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Custom card calling MongoDB aggregate
|
|
90
|
+
*/
|
|
91
|
+
custom_aggregation?: {
|
|
92
|
+
/**
|
|
93
|
+
* API resource
|
|
94
|
+
*/
|
|
95
|
+
resource: 'products' | 'categories' | 'brands' | 'collections' | 'grids' | 'customers' | 'carts' | 'orders';
|
|
96
|
+
/**
|
|
97
|
+
* Aggregation pipeline
|
|
98
|
+
*
|
|
99
|
+
* @minItems 1
|
|
100
|
+
* @maxItems 50
|
|
101
|
+
*/
|
|
102
|
+
pipeline: {
|
|
103
|
+
[k: string]: unknown;
|
|
104
|
+
}[];
|
|
105
|
+
};
|
|
106
|
+
}[];
|
|
107
|
+
/**
|
|
108
|
+
* Whether the user is able to use builder and file manager to edit storefront
|
|
109
|
+
*/
|
|
110
|
+
edit_storefront?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Flags to associate additional info
|
|
113
|
+
*
|
|
114
|
+
* @maxItems 10
|
|
115
|
+
*/
|
|
116
|
+
flags?: string[];
|
|
117
|
+
/**
|
|
118
|
+
* Optional notes with additional info about this user
|
|
119
|
+
*/
|
|
120
|
+
notes?: string;
|
|
121
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
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
|
+
* Brand object model
|
|
10
|
+
*/
|
|
11
|
+
export interface Brands {
|
|
12
|
+
/**
|
|
13
|
+
* Brand 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
|
+
* List of sales channels if brand not available in all channels
|
|
30
|
+
*
|
|
31
|
+
* @maxItems 10
|
|
32
|
+
*/
|
|
33
|
+
channel_ids?: string[];
|
|
34
|
+
/**
|
|
35
|
+
* Brand full name
|
|
36
|
+
*/
|
|
37
|
+
name: string;
|
|
38
|
+
/**
|
|
39
|
+
* Slug to complete page URL, starting with number or lowercase letter
|
|
40
|
+
*/
|
|
41
|
+
slug?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Short brand description in plain text
|
|
44
|
+
*/
|
|
45
|
+
short_description?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Full brand description, may use HTML tags
|
|
48
|
+
*/
|
|
49
|
+
body_html?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Full brand description, plain text only
|
|
52
|
+
*/
|
|
53
|
+
body_text?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Title tag for page SEO
|
|
56
|
+
*/
|
|
57
|
+
meta_title?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Meta description tag for page SEO
|
|
60
|
+
*/
|
|
61
|
+
meta_description?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Text translations for internationalization
|
|
64
|
+
*/
|
|
65
|
+
i18n?: {
|
|
66
|
+
/**
|
|
67
|
+
* Language specific text fields
|
|
68
|
+
*
|
|
69
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
70
|
+
* via the `patternProperty` "^[a-z]{2}(_[a-z]{2})?$".
|
|
71
|
+
*/
|
|
72
|
+
[k: string]: {
|
|
73
|
+
/**
|
|
74
|
+
* Brand full name
|
|
75
|
+
*/
|
|
76
|
+
name?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Short brand description in plain text
|
|
79
|
+
*/
|
|
80
|
+
short_description?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Full brand description, may use HTML tags
|
|
83
|
+
*/
|
|
84
|
+
body_html?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Full brand description, plain text only
|
|
87
|
+
*/
|
|
88
|
+
body_text?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Title tag for page SEO
|
|
91
|
+
*/
|
|
92
|
+
meta_title?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Meta description tag for page SEO
|
|
95
|
+
*/
|
|
96
|
+
meta_description?: string;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Brand logo
|
|
101
|
+
*/
|
|
102
|
+
logo?: {
|
|
103
|
+
/**
|
|
104
|
+
* Image link
|
|
105
|
+
*/
|
|
106
|
+
url: string;
|
|
107
|
+
/**
|
|
108
|
+
* Image size (width x height) in px, such as 100x50 (100px width, 50px height)
|
|
109
|
+
*/
|
|
110
|
+
size?: string;
|
|
111
|
+
/**
|
|
112
|
+
* Alternative text, HTML alt tag (important for SEO)
|
|
113
|
+
*/
|
|
114
|
+
alt?: string;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* List of brand images
|
|
118
|
+
*
|
|
119
|
+
* @maxItems 50
|
|
120
|
+
*/
|
|
121
|
+
pictures?: {
|
|
122
|
+
/**
|
|
123
|
+
* Picture ID (ObjectID) [auto]
|
|
124
|
+
*/
|
|
125
|
+
_id?: string & { length: 24 };
|
|
126
|
+
/**
|
|
127
|
+
* Tag to identify object, use only lowercase letters, digits and underscore
|
|
128
|
+
*/
|
|
129
|
+
tag?: string;
|
|
130
|
+
/**
|
|
131
|
+
* Image link
|
|
132
|
+
*/
|
|
133
|
+
url: string;
|
|
134
|
+
/**
|
|
135
|
+
* Image size (width x height) in px, such as 100x50 (100px width, 50px height)
|
|
136
|
+
*/
|
|
137
|
+
size?: string;
|
|
138
|
+
/**
|
|
139
|
+
* Alternative text, HTML alt tag (important for SEO)
|
|
140
|
+
*/
|
|
141
|
+
alt?: string;
|
|
142
|
+
}[];
|
|
143
|
+
/**
|
|
144
|
+
* List of custom attributes
|
|
145
|
+
*
|
|
146
|
+
* @maxItems 100
|
|
147
|
+
*/
|
|
148
|
+
metafields?: {
|
|
149
|
+
/**
|
|
150
|
+
* String to help distinguish who (or which app) created and can use the metafield
|
|
151
|
+
*/
|
|
152
|
+
namespace?: string;
|
|
153
|
+
/**
|
|
154
|
+
* Field name
|
|
155
|
+
*/
|
|
156
|
+
field?: string;
|
|
157
|
+
/**
|
|
158
|
+
* Custom property value
|
|
159
|
+
*/
|
|
160
|
+
value: {
|
|
161
|
+
[k: string]: unknown;
|
|
162
|
+
};
|
|
163
|
+
}[];
|
|
164
|
+
/**
|
|
165
|
+
* Flags to associate additional info
|
|
166
|
+
*
|
|
167
|
+
* @maxItems 10
|
|
168
|
+
*/
|
|
169
|
+
flags?: string[];
|
|
170
|
+
/**
|
|
171
|
+
* Optional notes with additional info about this brand
|
|
172
|
+
*/
|
|
173
|
+
notes?: string;
|
|
174
|
+
}
|
package/types/carts.d.ts
ADDED
|
@@ -0,0 +1,380 @@
|
|
|
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
|
+
* Shopping cart object model
|
|
10
|
+
*/
|
|
11
|
+
export interface Carts {
|
|
12
|
+
/**
|
|
13
|
+
* Cart 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 cart was created by staff and is trusted
|
|
30
|
+
*/
|
|
31
|
+
staff_signature?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Whether cart still available to complete checkout
|
|
34
|
+
*/
|
|
35
|
+
available?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* If the cart has been completed, generating an order
|
|
38
|
+
*/
|
|
39
|
+
completed?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* URL to this cart's page
|
|
42
|
+
*/
|
|
43
|
+
permalink?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Status defined by seller
|
|
46
|
+
*/
|
|
47
|
+
status?: string;
|
|
48
|
+
/**
|
|
49
|
+
* UTM campaign HTTP parameters
|
|
50
|
+
*/
|
|
51
|
+
utm?: {
|
|
52
|
+
/**
|
|
53
|
+
* Parameter 'utm_source', the referrer: (e.g. 'google', 'newsletter')
|
|
54
|
+
*/
|
|
55
|
+
source?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Parameter 'utm_medium', the marketing medium: (e.g. 'cpc', 'banner', 'email')
|
|
58
|
+
*/
|
|
59
|
+
medium?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Parameter 'utm_campaign', the product, promo code, or slogan (e.g. 'spring_sale')
|
|
62
|
+
*/
|
|
63
|
+
campaign?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Parameter 'utm_term', identifies the paid keywords
|
|
66
|
+
*/
|
|
67
|
+
term?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Parameter 'utm_content', used to differentiate ads
|
|
70
|
+
*/
|
|
71
|
+
content?: string;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* The website that the customer clicked on to come to the shop
|
|
75
|
+
*/
|
|
76
|
+
referring_site?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Code to identify the affiliate that referred the customer
|
|
79
|
+
*/
|
|
80
|
+
affiliate_code?: string;
|
|
81
|
+
/**
|
|
82
|
+
* List of customers associated with this cart
|
|
83
|
+
*
|
|
84
|
+
* @maxItems 3000
|
|
85
|
+
*/
|
|
86
|
+
customers?: Array<string & { length: 24 }>;
|
|
87
|
+
/**
|
|
88
|
+
* Whether cart is available for other customers too (anyone)
|
|
89
|
+
*/
|
|
90
|
+
other_customers?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Products composing the cart
|
|
93
|
+
*
|
|
94
|
+
* @maxItems 3000
|
|
95
|
+
*/
|
|
96
|
+
items: {
|
|
97
|
+
/**
|
|
98
|
+
* Cart item ID (ObjectID) [auto]
|
|
99
|
+
*/
|
|
100
|
+
_id?: string & { length: 24 };
|
|
101
|
+
/**
|
|
102
|
+
* Product ID
|
|
103
|
+
*/
|
|
104
|
+
product_id: string & { length: 24 };
|
|
105
|
+
/**
|
|
106
|
+
* ID to specify the variation added to cart, if product has variations
|
|
107
|
+
*/
|
|
108
|
+
variation_id?: string & { length: 24 };
|
|
109
|
+
/**
|
|
110
|
+
* Product or variation SKU (reference code)
|
|
111
|
+
*/
|
|
112
|
+
sku?: string;
|
|
113
|
+
/**
|
|
114
|
+
* Product or variation full name, or other label for this cart item
|
|
115
|
+
*/
|
|
116
|
+
name?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Product slug to complete page URL
|
|
119
|
+
*/
|
|
120
|
+
slug?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Product or variation picture for this cart item
|
|
123
|
+
*/
|
|
124
|
+
picture?: {
|
|
125
|
+
normal?: PictureSize;
|
|
126
|
+
big?: PictureSize1;
|
|
127
|
+
zoom?: PictureSize2;
|
|
128
|
+
small?: PictureSize3;
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* Item customization fields
|
|
132
|
+
*
|
|
133
|
+
* @maxItems 100
|
|
134
|
+
*/
|
|
135
|
+
customizations?: {
|
|
136
|
+
/**
|
|
137
|
+
* Title for this customization field, can be the grid title
|
|
138
|
+
*/
|
|
139
|
+
label?: string;
|
|
140
|
+
/**
|
|
141
|
+
* Option chosen or created by customer
|
|
142
|
+
*/
|
|
143
|
+
option: {
|
|
144
|
+
/**
|
|
145
|
+
* Option ID (ObjectID) if it was predefined (not custom value created by customer)
|
|
146
|
+
*/
|
|
147
|
+
_id?: string & { length: 24 };
|
|
148
|
+
/**
|
|
149
|
+
* Option text value displayed for the client
|
|
150
|
+
*/
|
|
151
|
+
text: string;
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* URL of file attached by customer to this field
|
|
155
|
+
*/
|
|
156
|
+
attachment?: string;
|
|
157
|
+
/**
|
|
158
|
+
* Price alteration due to this customization
|
|
159
|
+
*/
|
|
160
|
+
add_to_price?: {
|
|
161
|
+
/**
|
|
162
|
+
* Type of price addition
|
|
163
|
+
*/
|
|
164
|
+
type?: 'percentage' | 'fixed';
|
|
165
|
+
/**
|
|
166
|
+
* Additional value, could be negative
|
|
167
|
+
*/
|
|
168
|
+
addition: number;
|
|
169
|
+
};
|
|
170
|
+
}[];
|
|
171
|
+
/**
|
|
172
|
+
* Parent kit product for this item
|
|
173
|
+
*/
|
|
174
|
+
kit_product?: {
|
|
175
|
+
/**
|
|
176
|
+
* Kit product ID (ObjectID)
|
|
177
|
+
*/
|
|
178
|
+
_id: string & { length: 24 };
|
|
179
|
+
/**
|
|
180
|
+
* Kit product full name
|
|
181
|
+
*/
|
|
182
|
+
name?: string;
|
|
183
|
+
/**
|
|
184
|
+
* Total quantity of items to close a kit unit
|
|
185
|
+
*/
|
|
186
|
+
pack_quantity?: number;
|
|
187
|
+
/**
|
|
188
|
+
* Kit total pack price
|
|
189
|
+
*/
|
|
190
|
+
price?: number;
|
|
191
|
+
/**
|
|
192
|
+
* Current kit composition
|
|
193
|
+
*
|
|
194
|
+
* @maxItems 100
|
|
195
|
+
*/
|
|
196
|
+
composition?: {
|
|
197
|
+
/**
|
|
198
|
+
* Product ID (ObjectID)
|
|
199
|
+
*/
|
|
200
|
+
_id: string & { length: 24 };
|
|
201
|
+
/**
|
|
202
|
+
* Selected variation ID (ObjectID) if any
|
|
203
|
+
*/
|
|
204
|
+
variation_id?: string & { length: 24 };
|
|
205
|
+
/**
|
|
206
|
+
* Kit item quantity
|
|
207
|
+
*/
|
|
208
|
+
quantity?: number;
|
|
209
|
+
}[];
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* Item quantity in cart
|
|
213
|
+
*/
|
|
214
|
+
quantity: number;
|
|
215
|
+
/**
|
|
216
|
+
* Minimum item quantity for this cart
|
|
217
|
+
*/
|
|
218
|
+
min_quantity?: number;
|
|
219
|
+
/**
|
|
220
|
+
* Maximum item quantity for this cart
|
|
221
|
+
*/
|
|
222
|
+
max_quantity?: number;
|
|
223
|
+
/**
|
|
224
|
+
* Deadline for production or handling of pre-ordered item
|
|
225
|
+
*/
|
|
226
|
+
production_time?: {
|
|
227
|
+
/**
|
|
228
|
+
* Number of days to post the product after purchase, deadline for production or handling
|
|
229
|
+
*/
|
|
230
|
+
days: number;
|
|
231
|
+
/**
|
|
232
|
+
* If the deadline is calculated in working days
|
|
233
|
+
*/
|
|
234
|
+
working_days?: boolean;
|
|
235
|
+
/**
|
|
236
|
+
* If the production time is cumulative per item unit
|
|
237
|
+
*/
|
|
238
|
+
cumulative?: boolean;
|
|
239
|
+
/**
|
|
240
|
+
* When cumulative, increase the term proportionally up to this maximum (in days)
|
|
241
|
+
*/
|
|
242
|
+
max_time?: number;
|
|
243
|
+
};
|
|
244
|
+
/**
|
|
245
|
+
* Designator of currency according to ISO 4217 (3 uppercase letters)
|
|
246
|
+
*/
|
|
247
|
+
currency_id?: string;
|
|
248
|
+
/**
|
|
249
|
+
* Graphic symbol used as a shorthand for currency's name
|
|
250
|
+
*/
|
|
251
|
+
currency_symbol?: string;
|
|
252
|
+
/**
|
|
253
|
+
* Product sale price specifically for this cart
|
|
254
|
+
*/
|
|
255
|
+
price: number;
|
|
256
|
+
/**
|
|
257
|
+
* Final item price including additions due to customizations (auto-calculated)
|
|
258
|
+
*/
|
|
259
|
+
final_price?: number;
|
|
260
|
+
/**
|
|
261
|
+
* Item's original price for comparison, without discounts
|
|
262
|
+
*/
|
|
263
|
+
base_price?: number;
|
|
264
|
+
/**
|
|
265
|
+
* Flags to associate additional info
|
|
266
|
+
*
|
|
267
|
+
* @maxItems 10
|
|
268
|
+
*/
|
|
269
|
+
flags?: string[];
|
|
270
|
+
}[];
|
|
271
|
+
/**
|
|
272
|
+
* The sum of all items prices (auto-calculated)
|
|
273
|
+
*/
|
|
274
|
+
subtotal?: number;
|
|
275
|
+
/**
|
|
276
|
+
* List of orders completed with this cart
|
|
277
|
+
*
|
|
278
|
+
* @maxItems 3000
|
|
279
|
+
*/
|
|
280
|
+
orders?: string[];
|
|
281
|
+
/**
|
|
282
|
+
* List of custom attributes
|
|
283
|
+
*
|
|
284
|
+
* @maxItems 100
|
|
285
|
+
*/
|
|
286
|
+
metafields?: {
|
|
287
|
+
/**
|
|
288
|
+
* String to help distinguish who (or which app) created and can use the metafield
|
|
289
|
+
*/
|
|
290
|
+
namespace?: string;
|
|
291
|
+
/**
|
|
292
|
+
* Field name
|
|
293
|
+
*/
|
|
294
|
+
field?: string;
|
|
295
|
+
/**
|
|
296
|
+
* Custom property value
|
|
297
|
+
*/
|
|
298
|
+
value: {
|
|
299
|
+
[k: string]: unknown;
|
|
300
|
+
};
|
|
301
|
+
}[];
|
|
302
|
+
/**
|
|
303
|
+
* Flags to associate additional info
|
|
304
|
+
*
|
|
305
|
+
* @maxItems 10
|
|
306
|
+
*/
|
|
307
|
+
flags?: string[];
|
|
308
|
+
/**
|
|
309
|
+
* Optional notes with additional info about this brand
|
|
310
|
+
*/
|
|
311
|
+
notes?: string;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Default image size variant
|
|
315
|
+
*/
|
|
316
|
+
export interface PictureSize {
|
|
317
|
+
/**
|
|
318
|
+
* Image link
|
|
319
|
+
*/
|
|
320
|
+
url: string;
|
|
321
|
+
/**
|
|
322
|
+
* Image size (width x height) in px, such as 100x50 (100px width, 50px height)
|
|
323
|
+
*/
|
|
324
|
+
size?: string;
|
|
325
|
+
/**
|
|
326
|
+
* Alternative text, HTML alt tag (important for SEO)
|
|
327
|
+
*/
|
|
328
|
+
alt?: string;
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Image big size variant
|
|
332
|
+
*/
|
|
333
|
+
export interface PictureSize1 {
|
|
334
|
+
/**
|
|
335
|
+
* Image link
|
|
336
|
+
*/
|
|
337
|
+
url: string;
|
|
338
|
+
/**
|
|
339
|
+
* Image size (width x height) in px, such as 100x50 (100px width, 50px height)
|
|
340
|
+
*/
|
|
341
|
+
size?: string;
|
|
342
|
+
/**
|
|
343
|
+
* Alternative text, HTML alt tag (important for SEO)
|
|
344
|
+
*/
|
|
345
|
+
alt?: string;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Image zoom size variant
|
|
349
|
+
*/
|
|
350
|
+
export interface PictureSize2 {
|
|
351
|
+
/**
|
|
352
|
+
* Image link
|
|
353
|
+
*/
|
|
354
|
+
url: string;
|
|
355
|
+
/**
|
|
356
|
+
* Image size (width x height) in px, such as 100x50 (100px width, 50px height)
|
|
357
|
+
*/
|
|
358
|
+
size?: string;
|
|
359
|
+
/**
|
|
360
|
+
* Alternative text, HTML alt tag (important for SEO)
|
|
361
|
+
*/
|
|
362
|
+
alt?: string;
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Image small size variant
|
|
366
|
+
*/
|
|
367
|
+
export interface PictureSize3 {
|
|
368
|
+
/**
|
|
369
|
+
* Image link
|
|
370
|
+
*/
|
|
371
|
+
url: string;
|
|
372
|
+
/**
|
|
373
|
+
* Image size (width x height) in px, such as 100x50 (100px width, 50px height)
|
|
374
|
+
*/
|
|
375
|
+
size?: string;
|
|
376
|
+
/**
|
|
377
|
+
* Alternative text, HTML alt tag (important for SEO)
|
|
378
|
+
*/
|
|
379
|
+
alt?: string;
|
|
380
|
+
}
|