@sixtyninecommerce/client 0.2.2 → 0.4.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/README.md +141 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +6 -1
- package/dist/client.js.map +1 -1
- package/dist/commerce/age-verification.d.ts +8 -0
- package/dist/commerce/age-verification.d.ts.map +1 -0
- package/dist/commerce/age-verification.js +47 -0
- package/dist/commerce/age-verification.js.map +1 -0
- package/dist/commerce/branding.d.ts +6 -0
- package/dist/commerce/branding.d.ts.map +1 -0
- package/dist/commerce/branding.js +138 -0
- package/dist/commerce/branding.js.map +1 -0
- package/dist/commerce/checkout.d.ts.map +1 -1
- package/dist/commerce/checkout.js +5 -1
- package/dist/commerce/checkout.js.map +1 -1
- package/dist/commerce/customer.d.ts +26 -1
- package/dist/commerce/customer.d.ts.map +1 -1
- package/dist/commerce/customer.js +122 -15
- package/dist/commerce/customer.js.map +1 -1
- package/dist/commerce/favorites.d.ts +12 -0
- package/dist/commerce/favorites.d.ts.map +1 -0
- package/dist/commerce/favorites.js +30 -0
- package/dist/commerce/favorites.js.map +1 -0
- package/dist/commerce/index.d.ts +2 -2
- package/dist/commerce/index.d.ts.map +1 -1
- package/dist/commerce/index.js +34 -1
- package/dist/commerce/index.js.map +1 -1
- package/dist/commerce/payments.d.ts +8 -0
- package/dist/commerce/payments.d.ts.map +1 -0
- package/dist/commerce/payments.js +30 -0
- package/dist/commerce/payments.js.map +1 -0
- package/dist/commerce/products.d.ts +9 -7
- package/dist/commerce/products.d.ts.map +1 -1
- package/dist/commerce/products.js +93 -26
- package/dist/commerce/products.js.map +1 -1
- package/dist/commerce/queries.d.ts +41 -11
- package/dist/commerce/queries.d.ts.map +1 -1
- package/dist/commerce/queries.js +443 -81
- package/dist/commerce/queries.js.map +1 -1
- package/dist/commerce/quotes.d.ts +10 -0
- package/dist/commerce/quotes.d.ts.map +1 -0
- package/dist/commerce/quotes.js +33 -0
- package/dist/commerce/quotes.js.map +1 -0
- package/dist/commerce/recommendations.d.ts +6 -0
- package/dist/commerce/recommendations.d.ts.map +1 -0
- package/dist/commerce/recommendations.js +10 -0
- package/dist/commerce/recommendations.js.map +1 -0
- package/dist/commerce/reviews.d.ts +22 -0
- package/dist/commerce/reviews.d.ts.map +1 -0
- package/dist/commerce/reviews.js +168 -0
- package/dist/commerce/reviews.js.map +1 -0
- package/dist/commerce/search.d.ts +2 -2
- package/dist/commerce/search.d.ts.map +1 -1
- package/dist/commerce/search.js +6 -4
- package/dist/commerce/search.js.map +1 -1
- package/dist/commerce/shipping.d.ts +8 -0
- package/dist/commerce/shipping.d.ts.map +1 -0
- package/dist/commerce/shipping.js +109 -0
- package/dist/commerce/shipping.js.map +1 -0
- package/dist/commerce/stock-notifications.d.ts +7 -0
- package/dist/commerce/stock-notifications.d.ts.map +1 -0
- package/dist/commerce/stock-notifications.js +48 -0
- package/dist/commerce/stock-notifications.js.map +1 -0
- package/dist/commerce/subscriptions.d.ts +12 -0
- package/dist/commerce/subscriptions.d.ts.map +1 -0
- package/dist/commerce/subscriptions.js +54 -0
- package/dist/commerce/subscriptions.js.map +1 -0
- package/dist/commerce/vat-validation.d.ts +8 -0
- package/dist/commerce/vat-validation.d.ts.map +1 -0
- package/dist/commerce/vat-validation.js +43 -0
- package/dist/commerce/vat-validation.js.map +1 -0
- package/dist/constants.d.ts +2 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +12 -0
- package/dist/constants.js.map +1 -1
- package/dist/content/assets.d.ts +4 -2
- package/dist/content/assets.d.ts.map +1 -1
- package/dist/content/assets.js +15 -11
- package/dist/content/assets.js.map +1 -1
- package/dist/content/collection-pages.d.ts +6 -0
- package/dist/content/collection-pages.d.ts.map +1 -0
- package/dist/content/collection-pages.js +12 -0
- package/dist/content/collection-pages.js.map +1 -0
- package/dist/content/filtered-products.d.ts +19 -0
- package/dist/content/filtered-products.d.ts.map +1 -0
- package/dist/content/filtered-products.js +18 -0
- package/dist/content/filtered-products.js.map +1 -0
- package/dist/content/forms.d.ts +2 -2
- package/dist/content/forms.d.ts.map +1 -1
- package/dist/content/forms.js +2 -2
- package/dist/content/forms.js.map +1 -1
- package/dist/content/index.d.ts.map +1 -1
- package/dist/content/index.js +4 -0
- package/dist/content/index.js.map +1 -1
- package/dist/content/items.d.ts +5 -2
- package/dist/content/items.d.ts.map +1 -1
- package/dist/content/items.js +51 -16
- package/dist/content/items.js.map +1 -1
- package/dist/content/menus.d.ts +3 -3
- package/dist/content/menus.d.ts.map +1 -1
- package/dist/content/menus.js +29 -11
- package/dist/content/menus.js.map +1 -1
- package/dist/content/resolve.d.ts +2 -2
- package/dist/content/resolve.d.ts.map +1 -1
- package/dist/content/resolve.js +2 -2
- package/dist/content/resolve.js.map +1 -1
- package/dist/content/sitemap.d.ts +6 -0
- package/dist/content/sitemap.d.ts.map +1 -0
- package/dist/content/sitemap.js +12 -0
- package/dist/content/sitemap.js.map +1 -0
- package/dist/content/strings.d.ts +2 -2
- package/dist/content/strings.d.ts.map +1 -1
- package/dist/content/strings.js +3 -3
- package/dist/content/strings.js.map +1 -1
- package/dist/core/context.d.ts.map +1 -1
- package/dist/core/context.js +12 -33
- package/dist/core/context.js.map +1 -1
- package/dist/core/http.d.ts +8 -4
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +259 -104
- package/dist/core/http.js.map +1 -1
- package/dist/credit/credit-status.d.ts +6 -0
- package/dist/credit/credit-status.d.ts.map +1 -0
- package/dist/credit/credit-status.js +26 -0
- package/dist/credit/credit-status.js.map +1 -0
- package/dist/credit/index.d.ts +4 -0
- package/dist/credit/index.d.ts.map +1 -0
- package/dist/credit/index.js +5 -0
- package/dist/credit/index.js.map +1 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/media/index.d.ts +2 -1
- package/dist/media/index.d.ts.map +1 -1
- package/dist/media/index.js +35 -5
- package/dist/media/index.js.map +1 -1
- package/dist/media/urls.d.ts +3 -0
- package/dist/media/urls.d.ts.map +1 -1
- package/dist/media/urls.js +15 -1
- package/dist/media/urls.js.map +1 -1
- package/dist/media/video.d.ts +25 -0
- package/dist/media/video.d.ts.map +1 -0
- package/dist/media/video.js +109 -0
- package/dist/media/video.js.map +1 -0
- package/dist/navigation/routes.d.ts +4 -4
- package/dist/navigation/routes.d.ts.map +1 -1
- package/dist/navigation/routes.js +8 -8
- package/dist/navigation/routes.js.map +1 -1
- package/dist/pricing/validation.d.ts +0 -2
- package/dist/pricing/validation.d.ts.map +1 -1
- package/dist/pricing/validation.js +0 -10
- package/dist/pricing/validation.js.map +1 -1
- package/dist/seo/ai.d.ts +17 -0
- package/dist/seo/ai.d.ts.map +1 -0
- package/dist/seo/ai.js +32 -0
- package/dist/seo/ai.js.map +1 -0
- package/dist/seo/alternates.d.ts +4 -0
- package/dist/seo/alternates.d.ts.map +1 -0
- package/dist/seo/alternates.js +29 -0
- package/dist/seo/alternates.js.map +1 -0
- package/dist/seo/canonical.d.ts +4 -0
- package/dist/seo/canonical.d.ts.map +1 -0
- package/dist/seo/canonical.js +49 -0
- package/dist/seo/canonical.js.map +1 -0
- package/dist/seo/index.d.ts +9 -0
- package/dist/seo/index.d.ts.map +1 -0
- package/dist/seo/index.js +54 -0
- package/dist/seo/index.js.map +1 -0
- package/dist/seo/json-ld.d.ts +25 -0
- package/dist/seo/json-ld.d.ts.map +1 -0
- package/dist/seo/json-ld.js +113 -0
- package/dist/seo/json-ld.js.map +1 -0
- package/dist/seo/meta-tags.d.ts +58 -0
- package/dist/seo/meta-tags.d.ts.map +1 -0
- package/dist/seo/meta-tags.js +194 -0
- package/dist/seo/meta-tags.js.map +1 -0
- package/dist/seo/metadata-parser.d.ts +31 -0
- package/dist/seo/metadata-parser.d.ts.map +1 -0
- package/dist/seo/metadata-parser.js +180 -0
- package/dist/seo/metadata-parser.js.map +1 -0
- package/dist/seo/metadata-types.d.ts +63 -0
- package/dist/seo/metadata-types.d.ts.map +1 -0
- package/dist/seo/metadata-types.js +2 -0
- package/dist/seo/metadata-types.js.map +1 -0
- package/dist/seo/robots.d.ts +21 -0
- package/dist/seo/robots.d.ts.map +1 -0
- package/dist/seo/robots.js +39 -0
- package/dist/seo/robots.js.map +1 -0
- package/dist/seo/types.d.ts +54 -0
- package/dist/seo/types.d.ts.map +1 -0
- package/dist/seo/types.js +2 -0
- package/dist/seo/types.js.map +1 -0
- package/dist/seo/url-builder.d.ts +11 -0
- package/dist/seo/url-builder.d.ts.map +1 -0
- package/dist/seo/url-builder.js +40 -0
- package/dist/seo/url-builder.js.map +1 -0
- package/dist/types.d.ts +843 -32
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -3
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
export interface RetryConfig {
|
|
2
|
+
attempts?: number;
|
|
3
|
+
baseDelayMs?: number;
|
|
4
|
+
}
|
|
5
|
+
export interface RequestOptions {
|
|
6
|
+
signal?: AbortSignal;
|
|
7
|
+
}
|
|
1
8
|
export interface StorefrontClientConfig {
|
|
2
9
|
storeCode: string;
|
|
3
10
|
cdnUrl: string;
|
|
@@ -6,6 +13,115 @@ export interface StorefrontClientConfig {
|
|
|
6
13
|
pluginsUrl?: string;
|
|
7
14
|
defaultLanguageCode?: string;
|
|
8
15
|
fetch?: typeof globalThis.fetch;
|
|
16
|
+
onAuthToken?: (token: string) => void;
|
|
17
|
+
onAuthExpired?: () => void;
|
|
18
|
+
retry?: RetryConfig;
|
|
19
|
+
}
|
|
20
|
+
export interface ChannelCustomFields {
|
|
21
|
+
maintenanceMode?: boolean;
|
|
22
|
+
cdnDomain?: string | null;
|
|
23
|
+
storefrontUrl?: string;
|
|
24
|
+
urlLocaleStrategy?: 'path-prefix' | 'subdomain' | 'none';
|
|
25
|
+
urlLocalePrefixDefault?: boolean;
|
|
26
|
+
businessName?: string | null;
|
|
27
|
+
businessDescription?: string | null;
|
|
28
|
+
logoAssetId?: string | null;
|
|
29
|
+
darkLogoAssetId?: string | null;
|
|
30
|
+
coverAssetId?: string | null;
|
|
31
|
+
faviconAssetId?: string | null;
|
|
32
|
+
websiteUrl?: string | null;
|
|
33
|
+
primaryColor?: string | null;
|
|
34
|
+
contactEmail?: string | null;
|
|
35
|
+
contactPhone?: string | null;
|
|
36
|
+
legalName?: string | null;
|
|
37
|
+
vatNumber?: string | null;
|
|
38
|
+
registrationNumber?: string | null;
|
|
39
|
+
addressLine1?: string | null;
|
|
40
|
+
addressLine2?: string | null;
|
|
41
|
+
city?: string | null;
|
|
42
|
+
postalCode?: string | null;
|
|
43
|
+
province?: string | null;
|
|
44
|
+
country?: string | null;
|
|
45
|
+
socialLinks?: string | null;
|
|
46
|
+
commercePathPrefix?: string | null;
|
|
47
|
+
commercePathPrefixTranslations?: string | null;
|
|
48
|
+
twitterHandle?: string | null;
|
|
49
|
+
defaultOgImageId?: string | null;
|
|
50
|
+
llmsTxtEnabled?: boolean;
|
|
51
|
+
[key: string]: unknown;
|
|
52
|
+
}
|
|
53
|
+
export interface BrandingAssetRef {
|
|
54
|
+
id: string;
|
|
55
|
+
url: string;
|
|
56
|
+
preview?: string | null;
|
|
57
|
+
mimeType?: string | null;
|
|
58
|
+
}
|
|
59
|
+
export interface BrandingFontResource {
|
|
60
|
+
id: string;
|
|
61
|
+
identifier: string;
|
|
62
|
+
kind: 'google' | 'self_hosted';
|
|
63
|
+
family: string;
|
|
64
|
+
weights: number[];
|
|
65
|
+
files: BrandingAssetRef[];
|
|
66
|
+
}
|
|
67
|
+
export interface BrandingSocialLinks {
|
|
68
|
+
facebook?: string | null;
|
|
69
|
+
instagram?: string | null;
|
|
70
|
+
twitter?: string | null;
|
|
71
|
+
linkedin?: string | null;
|
|
72
|
+
youtube?: string | null;
|
|
73
|
+
tiktok?: string | null;
|
|
74
|
+
}
|
|
75
|
+
export interface BrandingIdentity {
|
|
76
|
+
storeCode: string;
|
|
77
|
+
businessName: string | null;
|
|
78
|
+
businessDescription: string | null;
|
|
79
|
+
websiteUrl: string | null;
|
|
80
|
+
logoLight: BrandingAssetRef | null;
|
|
81
|
+
logoDark: BrandingAssetRef | null;
|
|
82
|
+
cover: BrandingAssetRef | null;
|
|
83
|
+
favicon: BrandingAssetRef | null;
|
|
84
|
+
}
|
|
85
|
+
export interface BrandingTheme {
|
|
86
|
+
primaryColor: string | null;
|
|
87
|
+
}
|
|
88
|
+
export interface BrandingContact {
|
|
89
|
+
email: string | null;
|
|
90
|
+
phone: string | null;
|
|
91
|
+
}
|
|
92
|
+
export interface BrandingLegalAddress {
|
|
93
|
+
line1: string | null;
|
|
94
|
+
line2: string | null;
|
|
95
|
+
city: string | null;
|
|
96
|
+
postalCode: string | null;
|
|
97
|
+
province: string | null;
|
|
98
|
+
country: string | null;
|
|
99
|
+
}
|
|
100
|
+
export interface BrandingLegal {
|
|
101
|
+
name: string | null;
|
|
102
|
+
vatNumber: string | null;
|
|
103
|
+
registrationNumber: string | null;
|
|
104
|
+
address: BrandingLegalAddress;
|
|
105
|
+
}
|
|
106
|
+
export interface BrandingStorefrontConfig {
|
|
107
|
+
url: string | null;
|
|
108
|
+
cdnUrl: string;
|
|
109
|
+
urlLocaleStrategy: 'path-prefix' | 'subdomain' | 'none';
|
|
110
|
+
urlLocalePrefixDefault: boolean;
|
|
111
|
+
commercePathPrefix: string | null;
|
|
112
|
+
commercePathPrefixTranslations: Record<string, string> | null;
|
|
113
|
+
maintenanceMode: boolean;
|
|
114
|
+
defaultLanguage: string;
|
|
115
|
+
defaultCurrency: string;
|
|
116
|
+
}
|
|
117
|
+
export interface BrandingInfo {
|
|
118
|
+
identity: BrandingIdentity;
|
|
119
|
+
theme: BrandingTheme;
|
|
120
|
+
fonts: BrandingFontResource[];
|
|
121
|
+
contact: BrandingContact;
|
|
122
|
+
legal: BrandingLegal;
|
|
123
|
+
social: BrandingSocialLinks;
|
|
124
|
+
storefront: BrandingStorefrontConfig;
|
|
9
125
|
}
|
|
10
126
|
export interface ChannelInfo {
|
|
11
127
|
id: string;
|
|
@@ -13,11 +129,12 @@ export interface ChannelInfo {
|
|
|
13
129
|
token: string;
|
|
14
130
|
defaultLanguageCode: string;
|
|
15
131
|
defaultCurrencyCode: string;
|
|
16
|
-
customFields:
|
|
132
|
+
customFields: ChannelCustomFields;
|
|
17
133
|
}
|
|
18
134
|
export interface StoreContext {
|
|
19
135
|
channel: ChannelInfo;
|
|
20
136
|
cdnUrl: string;
|
|
137
|
+
channelCdnDomain: string | null;
|
|
21
138
|
vendureUrl: string;
|
|
22
139
|
cmsUrl: string;
|
|
23
140
|
pluginsUrl: string;
|
|
@@ -25,6 +142,12 @@ export interface StoreContext {
|
|
|
25
142
|
currencyCode: string;
|
|
26
143
|
authToken: string | null;
|
|
27
144
|
fetch: typeof globalThis.fetch;
|
|
145
|
+
onAuthToken?: (token: string) => void;
|
|
146
|
+
onAuthExpired?: () => void;
|
|
147
|
+
retry: {
|
|
148
|
+
attempts: number;
|
|
149
|
+
baseDelayMs: number;
|
|
150
|
+
};
|
|
28
151
|
}
|
|
29
152
|
export interface GraphQLResponse<T = unknown> {
|
|
30
153
|
data: T;
|
|
@@ -33,6 +156,12 @@ export interface GraphQLResponse<T = unknown> {
|
|
|
33
156
|
path?: string[];
|
|
34
157
|
}>;
|
|
35
158
|
}
|
|
159
|
+
export interface AgeVerificationStatus {
|
|
160
|
+
required: boolean;
|
|
161
|
+
minimumAge: number | null;
|
|
162
|
+
verified: boolean;
|
|
163
|
+
dateOfBirth: string | null;
|
|
164
|
+
}
|
|
36
165
|
export interface AssetPresetSize {
|
|
37
166
|
url: string;
|
|
38
167
|
webpUrl: string;
|
|
@@ -54,12 +183,43 @@ export interface Asset {
|
|
|
54
183
|
};
|
|
55
184
|
presets?: AssetPresets;
|
|
56
185
|
}
|
|
186
|
+
export interface CmsAssetTranslation {
|
|
187
|
+
language_code: string;
|
|
188
|
+
alt_text: string | null;
|
|
189
|
+
}
|
|
190
|
+
export interface CmsAsset {
|
|
191
|
+
id: string;
|
|
192
|
+
filename: string;
|
|
193
|
+
mime_type: string;
|
|
194
|
+
file_size: number;
|
|
195
|
+
storage_key: string;
|
|
196
|
+
content_hash: string | null;
|
|
197
|
+
width: number | null;
|
|
198
|
+
height: number | null;
|
|
199
|
+
alt_text: string | null;
|
|
200
|
+
presets: Record<PresetName, {
|
|
201
|
+
url: string;
|
|
202
|
+
webp_url: string;
|
|
203
|
+
width: number;
|
|
204
|
+
height: number;
|
|
205
|
+
}> | null;
|
|
206
|
+
translations: CmsAssetTranslation[];
|
|
207
|
+
}
|
|
208
|
+
export interface VendureAssetDescriptionTranslation {
|
|
209
|
+
language_code: string;
|
|
210
|
+
description: string;
|
|
211
|
+
}
|
|
57
212
|
export interface PriceTier {
|
|
58
213
|
minQuantity: number;
|
|
59
214
|
price: number;
|
|
60
215
|
priceWithTax: number;
|
|
61
216
|
discountLabel: string | null;
|
|
62
217
|
}
|
|
218
|
+
export interface VariantLocationAvailability {
|
|
219
|
+
locationId: string;
|
|
220
|
+
locationName: string;
|
|
221
|
+
inStock: boolean;
|
|
222
|
+
}
|
|
63
223
|
export interface ProductOption {
|
|
64
224
|
id: string;
|
|
65
225
|
code: string;
|
|
@@ -82,8 +242,15 @@ export interface ProductVariant {
|
|
|
82
242
|
retailPrice: number | null;
|
|
83
243
|
retailPriceWithTax: number | null;
|
|
84
244
|
priceTiers: PriceTier[] | null;
|
|
245
|
+
availabilityByLocation: VariantLocationAvailability[];
|
|
85
246
|
options: ProductOption[];
|
|
247
|
+
featuredAsset: Asset | null;
|
|
86
248
|
assets: Asset[];
|
|
249
|
+
customFields: {
|
|
250
|
+
minOrderQuantity: number | null;
|
|
251
|
+
salesUnit: number | null;
|
|
252
|
+
position: number | null;
|
|
253
|
+
};
|
|
87
254
|
}
|
|
88
255
|
export interface FacetValue {
|
|
89
256
|
id: string;
|
|
@@ -99,6 +266,25 @@ export interface CollectionRef {
|
|
|
99
266
|
id: string;
|
|
100
267
|
name: string;
|
|
101
268
|
slug: string;
|
|
269
|
+
position?: number;
|
|
270
|
+
parent?: {
|
|
271
|
+
id: string;
|
|
272
|
+
} | null;
|
|
273
|
+
translations?: Array<{
|
|
274
|
+
languageCode: string;
|
|
275
|
+
name: string;
|
|
276
|
+
slug: string;
|
|
277
|
+
}>;
|
|
278
|
+
customFields?: {
|
|
279
|
+
isRoutable?: boolean | null;
|
|
280
|
+
isCanonical?: boolean | null;
|
|
281
|
+
} | null;
|
|
282
|
+
}
|
|
283
|
+
export interface ProductTranslation {
|
|
284
|
+
languageCode: string;
|
|
285
|
+
name: string;
|
|
286
|
+
slug: string;
|
|
287
|
+
description?: string;
|
|
102
288
|
}
|
|
103
289
|
export interface OptionGroup {
|
|
104
290
|
id: string;
|
|
@@ -110,6 +296,17 @@ export interface OptionGroup {
|
|
|
110
296
|
code: string;
|
|
111
297
|
}>;
|
|
112
298
|
}
|
|
299
|
+
export interface PublicProductDocument {
|
|
300
|
+
id: string;
|
|
301
|
+
position: number;
|
|
302
|
+
title: string;
|
|
303
|
+
description: string | null;
|
|
304
|
+
fileUrl: string;
|
|
305
|
+
fileMimeType: string;
|
|
306
|
+
fileSize: number;
|
|
307
|
+
fileName: string;
|
|
308
|
+
requiresAuth: boolean;
|
|
309
|
+
}
|
|
113
310
|
export interface Product {
|
|
114
311
|
id: string;
|
|
115
312
|
name: string;
|
|
@@ -121,6 +318,14 @@ export interface Product {
|
|
|
121
318
|
optionGroups: OptionGroup[];
|
|
122
319
|
facetValues: FacetValue[];
|
|
123
320
|
collections: CollectionRef[];
|
|
321
|
+
translations?: ProductTranslation[];
|
|
322
|
+
documents?: PublicProductDocument[];
|
|
323
|
+
metadata?: import('./seo/metadata-types.js').ProductMetadata | null;
|
|
324
|
+
}
|
|
325
|
+
export interface RecommendedProductGroup {
|
|
326
|
+
groupName: string;
|
|
327
|
+
groupSlug: string;
|
|
328
|
+
products: ProductSummary[];
|
|
124
329
|
}
|
|
125
330
|
export interface ProductSummary {
|
|
126
331
|
id: string;
|
|
@@ -136,10 +341,7 @@ export interface ProductSummary {
|
|
|
136
341
|
priceWithTax: number;
|
|
137
342
|
currencyCode: string;
|
|
138
343
|
stockLevel: string;
|
|
139
|
-
|
|
140
|
-
retailPrice: number | null;
|
|
141
|
-
retailPriceWithTax: number | null;
|
|
142
|
-
priceTiers?: PriceTier[] | null;
|
|
344
|
+
availabilityByLocation?: VariantLocationAvailability[];
|
|
143
345
|
}>;
|
|
144
346
|
facetValues?: FacetValue[];
|
|
145
347
|
collections?: CollectionRef[];
|
|
@@ -181,10 +383,37 @@ export interface CollectionDetail extends Collection {
|
|
|
181
383
|
priceListName: string | null;
|
|
182
384
|
retailPrice: number | null;
|
|
183
385
|
retailPriceWithTax: number | null;
|
|
386
|
+
priceTiers: PriceTier[] | null;
|
|
387
|
+
availabilityByLocation: VariantLocationAvailability[];
|
|
388
|
+
customFields: {
|
|
389
|
+
minOrderQuantity: number | null;
|
|
390
|
+
salesUnit: number | null;
|
|
391
|
+
position: number | null;
|
|
392
|
+
};
|
|
184
393
|
}>;
|
|
185
394
|
totalItems: number;
|
|
186
395
|
};
|
|
187
396
|
}
|
|
397
|
+
export type AdjustmentType = 'PROMOTION' | 'DISTRIBUTED_ORDER_PROMOTION' | 'OTHER';
|
|
398
|
+
export interface Discount {
|
|
399
|
+
adjustmentSource: string;
|
|
400
|
+
type: AdjustmentType | string;
|
|
401
|
+
description: string;
|
|
402
|
+
amount: number;
|
|
403
|
+
amountWithTax: number;
|
|
404
|
+
}
|
|
405
|
+
export interface OrderTaxSummary {
|
|
406
|
+
description: string;
|
|
407
|
+
taxRate: number;
|
|
408
|
+
taxBase: number;
|
|
409
|
+
taxTotal: number;
|
|
410
|
+
}
|
|
411
|
+
export interface OrderPromotion {
|
|
412
|
+
id: string;
|
|
413
|
+
name: string;
|
|
414
|
+
description: string;
|
|
415
|
+
couponCode: string | null;
|
|
416
|
+
}
|
|
188
417
|
export interface OrderLine {
|
|
189
418
|
id: string;
|
|
190
419
|
quantity: number;
|
|
@@ -192,6 +421,9 @@ export interface OrderLine {
|
|
|
192
421
|
unitPriceWithTax: number;
|
|
193
422
|
linePrice: number;
|
|
194
423
|
linePriceWithTax: number;
|
|
424
|
+
discountedLinePrice: number;
|
|
425
|
+
discountedLinePriceWithTax: number;
|
|
426
|
+
discounts: Discount[];
|
|
195
427
|
productVariant: {
|
|
196
428
|
id: string;
|
|
197
429
|
name: string;
|
|
@@ -234,6 +466,9 @@ export interface Order {
|
|
|
234
466
|
totalWithTax: number;
|
|
235
467
|
currencyCode: string;
|
|
236
468
|
lines: OrderLine[];
|
|
469
|
+
discounts: Discount[];
|
|
470
|
+
taxSummary: OrderTaxSummary[];
|
|
471
|
+
promotions: OrderPromotion[];
|
|
237
472
|
shippingAddress?: OrderAddress;
|
|
238
473
|
customer?: {
|
|
239
474
|
id: string;
|
|
@@ -300,6 +535,17 @@ export interface OrderSummary {
|
|
|
300
535
|
};
|
|
301
536
|
}>;
|
|
302
537
|
}
|
|
538
|
+
export interface ReorderSkipped {
|
|
539
|
+
variantId: string;
|
|
540
|
+
quantity: number;
|
|
541
|
+
errorCode: string;
|
|
542
|
+
message: string;
|
|
543
|
+
}
|
|
544
|
+
export interface ReorderResult {
|
|
545
|
+
order: Order;
|
|
546
|
+
addedLines: number;
|
|
547
|
+
skipped: ReorderSkipped[];
|
|
548
|
+
}
|
|
303
549
|
export interface CustomerInput {
|
|
304
550
|
firstName: string;
|
|
305
551
|
lastName: string;
|
|
@@ -321,6 +567,38 @@ export interface PaymentInput {
|
|
|
321
567
|
method: string;
|
|
322
568
|
metadata?: Record<string, unknown>;
|
|
323
569
|
}
|
|
570
|
+
export interface StripePaymentIntentResult {
|
|
571
|
+
clientSecret: string;
|
|
572
|
+
}
|
|
573
|
+
export interface MolliePaymentMethodsInput {
|
|
574
|
+
paymentMethodCode: string;
|
|
575
|
+
}
|
|
576
|
+
export interface MolliePaymentMethodAmount {
|
|
577
|
+
value: number;
|
|
578
|
+
currency: string;
|
|
579
|
+
}
|
|
580
|
+
export interface MolliePaymentMethod {
|
|
581
|
+
id: string;
|
|
582
|
+
code: string;
|
|
583
|
+
description: string;
|
|
584
|
+
minimumAmount: MolliePaymentMethodAmount;
|
|
585
|
+
maximumAmount: MolliePaymentMethodAmount | null;
|
|
586
|
+
image: {
|
|
587
|
+
size1x: string;
|
|
588
|
+
size2x: string;
|
|
589
|
+
svg: string;
|
|
590
|
+
};
|
|
591
|
+
}
|
|
592
|
+
export interface CreateMolliePaymentIntentInput {
|
|
593
|
+
paymentMethodCode: string;
|
|
594
|
+
redirectUrl?: string;
|
|
595
|
+
molliePaymentMethodCode?: string;
|
|
596
|
+
locale?: string;
|
|
597
|
+
immediateCapture?: boolean;
|
|
598
|
+
}
|
|
599
|
+
export interface MolliePaymentIntentResult {
|
|
600
|
+
url: string;
|
|
601
|
+
}
|
|
324
602
|
export interface RegisterInput {
|
|
325
603
|
firstName: string;
|
|
326
604
|
lastName: string;
|
|
@@ -328,10 +606,50 @@ export interface RegisterInput {
|
|
|
328
606
|
password: string;
|
|
329
607
|
phoneNumber?: string;
|
|
330
608
|
}
|
|
609
|
+
export interface UpdateCustomerInput {
|
|
610
|
+
title?: string;
|
|
611
|
+
firstName: string;
|
|
612
|
+
lastName: string;
|
|
613
|
+
phoneNumber?: string;
|
|
614
|
+
}
|
|
615
|
+
export interface UpdateAddressInput {
|
|
616
|
+
id: string;
|
|
617
|
+
fullName?: string;
|
|
618
|
+
streetLine1?: string;
|
|
619
|
+
streetLine2?: string;
|
|
620
|
+
city?: string;
|
|
621
|
+
province?: string;
|
|
622
|
+
postalCode?: string;
|
|
623
|
+
countryCode?: string;
|
|
624
|
+
phoneNumber?: string;
|
|
625
|
+
company?: string;
|
|
626
|
+
defaultShippingAddress?: boolean;
|
|
627
|
+
defaultBillingAddress?: boolean;
|
|
628
|
+
}
|
|
629
|
+
export interface Country {
|
|
630
|
+
id: string;
|
|
631
|
+
code: string;
|
|
632
|
+
name: string;
|
|
633
|
+
}
|
|
634
|
+
export interface ActiveChannel {
|
|
635
|
+
id: string;
|
|
636
|
+
code: string;
|
|
637
|
+
defaultLanguageCode: string;
|
|
638
|
+
availableLanguageCodes: string[];
|
|
639
|
+
defaultCurrencyCode: string;
|
|
640
|
+
availableCurrencyCodes: string[];
|
|
641
|
+
customFields: ChannelCustomFields;
|
|
642
|
+
}
|
|
643
|
+
export interface FacetValueFilterInput {
|
|
644
|
+
and?: string;
|
|
645
|
+
or?: string[];
|
|
646
|
+
}
|
|
331
647
|
export interface SearchInput {
|
|
332
648
|
term: string;
|
|
333
649
|
collectionSlug?: string;
|
|
650
|
+
collectionId?: string;
|
|
334
651
|
facetValueIds?: string[];
|
|
652
|
+
facetValueFilters?: FacetValueFilterInput[];
|
|
335
653
|
take?: number;
|
|
336
654
|
skip?: number;
|
|
337
655
|
sort?: {
|
|
@@ -363,6 +681,7 @@ export interface SearchResultItem {
|
|
|
363
681
|
};
|
|
364
682
|
} | null;
|
|
365
683
|
collectionIds: string[];
|
|
684
|
+
inStock: boolean;
|
|
366
685
|
}
|
|
367
686
|
export interface SearchFacetValue {
|
|
368
687
|
facetValue: {
|
|
@@ -400,6 +719,50 @@ export interface OrderListOptions {
|
|
|
400
719
|
take?: number;
|
|
401
720
|
skip?: number;
|
|
402
721
|
}
|
|
722
|
+
export interface FavoriteVariant {
|
|
723
|
+
id: string;
|
|
724
|
+
name: string;
|
|
725
|
+
sku: string;
|
|
726
|
+
price: number;
|
|
727
|
+
priceWithTax: number;
|
|
728
|
+
currencyCode: string;
|
|
729
|
+
stockLevel: string;
|
|
730
|
+
priceListName: string | null;
|
|
731
|
+
retailPrice: number | null;
|
|
732
|
+
retailPriceWithTax: number | null;
|
|
733
|
+
priceTiers: PriceTier[] | null;
|
|
734
|
+
availabilityByLocation: VariantLocationAvailability[];
|
|
735
|
+
product: {
|
|
736
|
+
id: string;
|
|
737
|
+
name: string;
|
|
738
|
+
slug: string;
|
|
739
|
+
featuredAsset: Asset | null;
|
|
740
|
+
};
|
|
741
|
+
options: Array<{
|
|
742
|
+
id: string;
|
|
743
|
+
name: string;
|
|
744
|
+
group: {
|
|
745
|
+
name: string;
|
|
746
|
+
};
|
|
747
|
+
}>;
|
|
748
|
+
customFields: {
|
|
749
|
+
minOrderQuantity: number | null;
|
|
750
|
+
salesUnit: number | null;
|
|
751
|
+
position: number | null;
|
|
752
|
+
};
|
|
753
|
+
}
|
|
754
|
+
export interface FavoriteItem {
|
|
755
|
+
id: string;
|
|
756
|
+
productVariantId: string;
|
|
757
|
+
createdAt: string;
|
|
758
|
+
productVariant: FavoriteVariant | null;
|
|
759
|
+
}
|
|
760
|
+
export interface StockNotificationSubscriptionResult {
|
|
761
|
+
id: string;
|
|
762
|
+
productVariantId: string;
|
|
763
|
+
emailAddress: string;
|
|
764
|
+
createdAt: string;
|
|
765
|
+
}
|
|
403
766
|
export interface PaginatedList<T> {
|
|
404
767
|
items: T[];
|
|
405
768
|
totalItems: number;
|
|
@@ -412,20 +775,83 @@ export interface ResolvedContent {
|
|
|
412
775
|
}>;
|
|
413
776
|
slug_translations?: Record<string, string>;
|
|
414
777
|
}
|
|
415
|
-
export interface
|
|
778
|
+
export interface SitemapEntry {
|
|
779
|
+
id: string;
|
|
780
|
+
path: string;
|
|
781
|
+
title: string | null;
|
|
782
|
+
collection_slug: string | null;
|
|
783
|
+
updated_at: string;
|
|
784
|
+
type?: 'collection_page';
|
|
785
|
+
language_code?: string;
|
|
786
|
+
}
|
|
787
|
+
export interface ContentItemSummary {
|
|
788
|
+
id: string;
|
|
789
|
+
slug: string | null;
|
|
790
|
+
status: string;
|
|
791
|
+
collection_id: string;
|
|
792
|
+
collection_name: string;
|
|
793
|
+
collection_title_field_slug: string | null;
|
|
794
|
+
title: string | null;
|
|
795
|
+
}
|
|
796
|
+
export interface ContentSearchQuery {
|
|
797
|
+
q?: string;
|
|
416
798
|
collectionId?: string;
|
|
417
799
|
collectionSlug?: string;
|
|
418
|
-
|
|
800
|
+
parentId?: string;
|
|
419
801
|
limit?: number;
|
|
420
802
|
offset?: number;
|
|
421
803
|
sort?: string;
|
|
422
804
|
languageCode?: string;
|
|
423
805
|
}
|
|
424
|
-
export interface
|
|
425
|
-
|
|
426
|
-
|
|
806
|
+
export interface ContentSearchHit {
|
|
807
|
+
id: string;
|
|
808
|
+
channel_id: string;
|
|
809
|
+
collection_id: string;
|
|
810
|
+
collection_slug: string;
|
|
811
|
+
slug: string | null;
|
|
812
|
+
path: string | null;
|
|
813
|
+
parent_id: string | null;
|
|
814
|
+
position: number;
|
|
815
|
+
status: string;
|
|
816
|
+
created_at: number;
|
|
817
|
+
updated_at: number;
|
|
818
|
+
published_at: number | null;
|
|
819
|
+
[fieldSlug: string]: unknown;
|
|
820
|
+
}
|
|
821
|
+
export interface ContentSearchResult {
|
|
822
|
+
hits: ContentSearchHit[];
|
|
823
|
+
total: number;
|
|
824
|
+
limit: number;
|
|
825
|
+
offset: number;
|
|
826
|
+
processing_time_ms: number;
|
|
827
|
+
}
|
|
828
|
+
export interface ContentItemWithFields {
|
|
829
|
+
id: string;
|
|
830
|
+
title: string | null;
|
|
831
|
+
fieldValues: Record<string, unknown>;
|
|
832
|
+
}
|
|
833
|
+
export interface CollectionFieldDefinition {
|
|
834
|
+
id: string;
|
|
835
|
+
slug: string;
|
|
836
|
+
label: string;
|
|
837
|
+
fieldType: string;
|
|
838
|
+
position: number;
|
|
839
|
+
isRequired: boolean;
|
|
840
|
+
isLocalizable: boolean;
|
|
841
|
+
config: Record<string, unknown> | null;
|
|
842
|
+
}
|
|
843
|
+
export interface CollectionPageValues {
|
|
844
|
+
fields: CollectionFieldDefinition[];
|
|
845
|
+
values: Record<string, unknown>;
|
|
846
|
+
}
|
|
847
|
+
export interface ContentQueryOptions {
|
|
848
|
+
collectionId?: string;
|
|
849
|
+
collectionSlug?: string;
|
|
850
|
+
q?: string;
|
|
427
851
|
limit?: number;
|
|
428
852
|
offset?: number;
|
|
853
|
+
sort?: string;
|
|
854
|
+
languageCode?: string;
|
|
429
855
|
}
|
|
430
856
|
export interface FormField {
|
|
431
857
|
slug: string;
|
|
@@ -483,11 +909,17 @@ export interface RouteEntry {
|
|
|
483
909
|
id: string;
|
|
484
910
|
title: string;
|
|
485
911
|
slug?: string;
|
|
486
|
-
|
|
912
|
+
updated_at?: string;
|
|
487
913
|
source?: string;
|
|
488
914
|
}
|
|
915
|
+
export interface RoutesMetadata {
|
|
916
|
+
default_language: string;
|
|
917
|
+
available_languages: string[];
|
|
918
|
+
generated_at: string;
|
|
919
|
+
}
|
|
489
920
|
export interface RoutesResponse {
|
|
490
|
-
|
|
921
|
+
data: Record<string, RouteEntry[]>;
|
|
922
|
+
metadata: RoutesMetadata;
|
|
491
923
|
}
|
|
492
924
|
export interface ExchangeRate {
|
|
493
925
|
baseCurrency: string;
|
|
@@ -535,11 +967,73 @@ export interface OrderValidationResult {
|
|
|
535
967
|
errors: OrderValidationError[];
|
|
536
968
|
}
|
|
537
969
|
export interface OrderValidationError {
|
|
538
|
-
type: 'min_amount'
|
|
970
|
+
type: 'min_amount';
|
|
539
971
|
message: string;
|
|
540
972
|
required: number;
|
|
541
973
|
actual: number;
|
|
542
974
|
}
|
|
975
|
+
export interface PropertyGroupTranslation {
|
|
976
|
+
id: string;
|
|
977
|
+
languageCode: string;
|
|
978
|
+
name: string;
|
|
979
|
+
}
|
|
980
|
+
export interface PropertyTranslation {
|
|
981
|
+
id: string;
|
|
982
|
+
languageCode: string;
|
|
983
|
+
name: string;
|
|
984
|
+
helpText: string | null;
|
|
985
|
+
}
|
|
986
|
+
export interface PropertyFieldFacet {
|
|
987
|
+
fieldSlug: string;
|
|
988
|
+
fieldType: string;
|
|
989
|
+
facetId: string;
|
|
990
|
+
}
|
|
991
|
+
export interface PropertyConfig {
|
|
992
|
+
options?: Array<{
|
|
993
|
+
value: string;
|
|
994
|
+
label: string;
|
|
995
|
+
}>;
|
|
996
|
+
min?: number;
|
|
997
|
+
max?: number;
|
|
998
|
+
maxLength?: number;
|
|
999
|
+
allowedCollectionIds?: string[];
|
|
1000
|
+
filterableFieldSlugs?: string[];
|
|
1001
|
+
productFilter?: {
|
|
1002
|
+
filters?: Array<{
|
|
1003
|
+
property_slug: string;
|
|
1004
|
+
facet_value_ids: string[];
|
|
1005
|
+
}>;
|
|
1006
|
+
collection_id?: string | null;
|
|
1007
|
+
};
|
|
1008
|
+
}
|
|
1009
|
+
export interface Property {
|
|
1010
|
+
id: string;
|
|
1011
|
+
slug: string;
|
|
1012
|
+
fieldType: string;
|
|
1013
|
+
isFilterable: boolean;
|
|
1014
|
+
isRequired: boolean;
|
|
1015
|
+
position: number;
|
|
1016
|
+
config: PropertyConfig | null;
|
|
1017
|
+
facetId: string | null;
|
|
1018
|
+
fieldFacets: PropertyFieldFacet[];
|
|
1019
|
+
translations: PropertyTranslation[];
|
|
1020
|
+
}
|
|
1021
|
+
export interface PropertyGroup {
|
|
1022
|
+
id: string;
|
|
1023
|
+
position: number;
|
|
1024
|
+
translations: PropertyGroupTranslation[];
|
|
1025
|
+
properties: Property[];
|
|
1026
|
+
}
|
|
1027
|
+
export interface PropertyValue {
|
|
1028
|
+
id: string;
|
|
1029
|
+
propertyId: string;
|
|
1030
|
+
languageCode: string | null;
|
|
1031
|
+
value: unknown;
|
|
1032
|
+
}
|
|
1033
|
+
export interface ProductPropertyGroupValues {
|
|
1034
|
+
group: PropertyGroup;
|
|
1035
|
+
values: PropertyValue[];
|
|
1036
|
+
}
|
|
543
1037
|
export type PresetName = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
544
1038
|
export interface ResponsiveImageData {
|
|
545
1039
|
src: string;
|
|
@@ -549,12 +1043,243 @@ export interface ResponsiveImageData {
|
|
|
549
1043
|
width: number;
|
|
550
1044
|
height: number;
|
|
551
1045
|
}
|
|
1046
|
+
export interface ReviewAttribute {
|
|
1047
|
+
id: string;
|
|
1048
|
+
slug: string;
|
|
1049
|
+
label: string;
|
|
1050
|
+
inputType: 'rating' | 'selection';
|
|
1051
|
+
options: string[] | null;
|
|
1052
|
+
isRequired: boolean;
|
|
1053
|
+
section: 'product' | 'demographic';
|
|
1054
|
+
}
|
|
1055
|
+
export interface ProductReview {
|
|
1056
|
+
id: string;
|
|
1057
|
+
rating: number | null;
|
|
1058
|
+
title: string | null;
|
|
1059
|
+
body: string | null;
|
|
1060
|
+
variantId: string | null;
|
|
1061
|
+
customerDisplayName: string | null;
|
|
1062
|
+
isVerifiedPurchase: boolean;
|
|
1063
|
+
isEdited: boolean;
|
|
1064
|
+
attributeValues: Record<string, number | string> | null;
|
|
1065
|
+
imageAssetIds: string[] | null;
|
|
1066
|
+
videoAssetIds: string[] | null;
|
|
1067
|
+
helpfulCount: number;
|
|
1068
|
+
notHelpfulCount: number;
|
|
1069
|
+
merchantReply: string | null;
|
|
1070
|
+
merchantReplyAt: string | null;
|
|
1071
|
+
myVote: boolean | null;
|
|
1072
|
+
createdAt: string;
|
|
1073
|
+
updatedAt: string;
|
|
1074
|
+
}
|
|
1075
|
+
export interface ReviewRatingDistribution {
|
|
1076
|
+
one: number;
|
|
1077
|
+
two: number;
|
|
1078
|
+
three: number;
|
|
1079
|
+
four: number;
|
|
1080
|
+
five: number;
|
|
1081
|
+
}
|
|
1082
|
+
export interface ReviewRatingSummary {
|
|
1083
|
+
averageRating: number | null;
|
|
1084
|
+
reviewCount: number;
|
|
1085
|
+
ratingCount: number;
|
|
1086
|
+
distribution: ReviewRatingDistribution;
|
|
1087
|
+
}
|
|
1088
|
+
export interface ReviewAttributeAggregation {
|
|
1089
|
+
attributeId: string;
|
|
1090
|
+
label: string;
|
|
1091
|
+
inputType: string;
|
|
1092
|
+
averageRating: number | null;
|
|
1093
|
+
distribution: Record<string, number> | null;
|
|
1094
|
+
}
|
|
1095
|
+
export interface ReviewChannelConfig {
|
|
1096
|
+
reviewsEnabled: boolean;
|
|
1097
|
+
reviewsRequireText: boolean;
|
|
1098
|
+
reviewsAllowMedia: boolean;
|
|
1099
|
+
reviewsAllowVoting: boolean;
|
|
1100
|
+
reviewsAllowRating: boolean;
|
|
1101
|
+
reviewMinBodyLength: number;
|
|
1102
|
+
reviewMaxTitleLength: number;
|
|
1103
|
+
reviewMaxImages: number;
|
|
1104
|
+
reviewMaxVideos: number;
|
|
1105
|
+
}
|
|
1106
|
+
export interface CreateReviewInput {
|
|
1107
|
+
productId: string;
|
|
1108
|
+
variantId?: string;
|
|
1109
|
+
rating?: number;
|
|
1110
|
+
title?: string;
|
|
1111
|
+
body?: string;
|
|
1112
|
+
imageAssetIds?: string[];
|
|
1113
|
+
videoAssetIds?: string[];
|
|
1114
|
+
attributeValues?: Record<string, number | string>;
|
|
1115
|
+
}
|
|
1116
|
+
export interface UpdateReviewInput {
|
|
1117
|
+
rating?: number;
|
|
1118
|
+
title?: string;
|
|
1119
|
+
body?: string;
|
|
1120
|
+
imageAssetIds?: string[];
|
|
1121
|
+
videoAssetIds?: string[];
|
|
1122
|
+
attributeValues?: Record<string, number | string>;
|
|
1123
|
+
}
|
|
1124
|
+
export interface ReviewListOptions {
|
|
1125
|
+
take?: number;
|
|
1126
|
+
cursor?: string;
|
|
1127
|
+
sort?: 'NEWEST' | 'OLDEST' | 'HIGHEST_RATING' | 'LOWEST_RATING' | 'MOST_HELPFUL';
|
|
1128
|
+
rating?: number;
|
|
1129
|
+
}
|
|
1130
|
+
export interface RecentReviewsOptions {
|
|
1131
|
+
limit?: number;
|
|
1132
|
+
minRating?: number;
|
|
1133
|
+
languageCode?: string;
|
|
1134
|
+
}
|
|
1135
|
+
export interface CreateReviewResult {
|
|
1136
|
+
review: ProductReview;
|
|
1137
|
+
requiresModeration: boolean;
|
|
1138
|
+
}
|
|
1139
|
+
export interface ReviewMediaUploadResult {
|
|
1140
|
+
id: string;
|
|
1141
|
+
preview: string;
|
|
1142
|
+
mimeType: string;
|
|
1143
|
+
}
|
|
1144
|
+
export type CustomerSubscriptionStatus = 'TRIAL' | 'ACTIVE' | 'PAUSED' | 'PAST_DUE' | 'CANCELLED' | 'EXPIRED' | 'COMPLETED';
|
|
1145
|
+
export interface CustomerSubscription {
|
|
1146
|
+
id: string;
|
|
1147
|
+
planName: string;
|
|
1148
|
+
currencyCode: string;
|
|
1149
|
+
recurringPrice: number;
|
|
1150
|
+
billingInterval: string;
|
|
1151
|
+
currentStatus: CustomerSubscriptionStatus | null;
|
|
1152
|
+
currentPeriodStart: string | null;
|
|
1153
|
+
currentPeriodEnd: string | null;
|
|
1154
|
+
nextRenewalAt: string | null;
|
|
1155
|
+
cancelAtPeriodEnd: boolean;
|
|
1156
|
+
createdAt: string;
|
|
1157
|
+
}
|
|
1158
|
+
export type QuoteStatus = 'draft' | 'requested' | 'in_review' | 'approved' | 'declined' | 'expired' | 'converted_to_order' | 'cancelled';
|
|
1159
|
+
export interface QuoteLine {
|
|
1160
|
+
id: string;
|
|
1161
|
+
productVariantId: string;
|
|
1162
|
+
quantity: number;
|
|
1163
|
+
unitPrice: number | null;
|
|
1164
|
+
discountLabel: string | null;
|
|
1165
|
+
position: number;
|
|
1166
|
+
createdAt: string;
|
|
1167
|
+
updatedAt: string;
|
|
1168
|
+
}
|
|
1169
|
+
export interface Quote {
|
|
1170
|
+
id: string;
|
|
1171
|
+
code: string;
|
|
1172
|
+
channelId: string;
|
|
1173
|
+
customerId: string;
|
|
1174
|
+
currencyCode: string;
|
|
1175
|
+
status: QuoteStatus;
|
|
1176
|
+
expiresAt: string | null;
|
|
1177
|
+
salesRepUserId: string | null;
|
|
1178
|
+
customerNotes: string | null;
|
|
1179
|
+
convertedOrderId: string | null;
|
|
1180
|
+
lines: QuoteLine[];
|
|
1181
|
+
createdAt: string;
|
|
1182
|
+
updatedAt: string;
|
|
1183
|
+
}
|
|
1184
|
+
export interface QuoteList {
|
|
1185
|
+
items: Quote[];
|
|
1186
|
+
totalItems: number;
|
|
1187
|
+
}
|
|
1188
|
+
export interface QuoteListOptions {
|
|
1189
|
+
take?: number;
|
|
1190
|
+
skip?: number;
|
|
1191
|
+
status?: QuoteStatus;
|
|
1192
|
+
}
|
|
1193
|
+
export interface CreateQuoteRequestInput {
|
|
1194
|
+
items: Array<{
|
|
1195
|
+
productVariantId: string;
|
|
1196
|
+
quantity: number;
|
|
1197
|
+
}>;
|
|
1198
|
+
customerNotes?: string;
|
|
1199
|
+
}
|
|
1200
|
+
export interface B2bCreditStatus {
|
|
1201
|
+
customerId: string;
|
|
1202
|
+
currencyCode: string;
|
|
1203
|
+
balance: number;
|
|
1204
|
+
uninvoicedOrdersTotal: number;
|
|
1205
|
+
exposure: number;
|
|
1206
|
+
creditLimit: number | null;
|
|
1207
|
+
available: number | null;
|
|
1208
|
+
overdueInvoiceCount: number;
|
|
1209
|
+
overLimit: boolean;
|
|
1210
|
+
hasOverdue: boolean;
|
|
1211
|
+
}
|
|
1212
|
+
export interface VatValidationResult {
|
|
1213
|
+
status: string;
|
|
1214
|
+
vatNumber: string;
|
|
1215
|
+
countryCode: string;
|
|
1216
|
+
companyName: string | null;
|
|
1217
|
+
companyAddress: string | null;
|
|
1218
|
+
validatedAt: string | null;
|
|
1219
|
+
error: string | null;
|
|
1220
|
+
}
|
|
1221
|
+
export interface DropOffPointInput {
|
|
1222
|
+
postalCode: string;
|
|
1223
|
+
countryCode?: string;
|
|
1224
|
+
carrierId?: string;
|
|
1225
|
+
}
|
|
1226
|
+
export interface DropOffPoint {
|
|
1227
|
+
locationCode: string;
|
|
1228
|
+
locationName: string;
|
|
1229
|
+
street: string;
|
|
1230
|
+
number: string;
|
|
1231
|
+
numberSuffix: string | null;
|
|
1232
|
+
postalCode: string;
|
|
1233
|
+
city: string;
|
|
1234
|
+
countryCode: string;
|
|
1235
|
+
phone: string | null;
|
|
1236
|
+
reference: string | null;
|
|
1237
|
+
longitude: string | null;
|
|
1238
|
+
latitude: string | null;
|
|
1239
|
+
availableDays: number[] | null;
|
|
1240
|
+
cutOffTime: string | null;
|
|
1241
|
+
carrierId: number | null;
|
|
1242
|
+
distance: number | null;
|
|
1243
|
+
}
|
|
1244
|
+
export interface DeliveryOptionsInput {
|
|
1245
|
+
postalCode: string;
|
|
1246
|
+
countryCode?: string;
|
|
1247
|
+
carrierId?: number;
|
|
1248
|
+
deliveryDate?: string;
|
|
1249
|
+
cutoffTime?: string;
|
|
1250
|
+
mondayDelivery?: boolean;
|
|
1251
|
+
saturdayDelivery?: boolean;
|
|
1252
|
+
dropoffDays?: string;
|
|
1253
|
+
}
|
|
1254
|
+
export interface DeliveryTimeFrame {
|
|
1255
|
+
start: string;
|
|
1256
|
+
end: string;
|
|
1257
|
+
priceComment: string | null;
|
|
1258
|
+
}
|
|
1259
|
+
export interface DeliveryOption {
|
|
1260
|
+
date: string;
|
|
1261
|
+
time: DeliveryTimeFrame[];
|
|
1262
|
+
}
|
|
1263
|
+
export interface ShipmentTrackingHistoryEntry {
|
|
1264
|
+
status: number;
|
|
1265
|
+
time: string;
|
|
1266
|
+
}
|
|
1267
|
+
export interface ShipmentTrackingInfo {
|
|
1268
|
+
shipmentId: number;
|
|
1269
|
+
status: {
|
|
1270
|
+
current: number;
|
|
1271
|
+
final: boolean;
|
|
1272
|
+
};
|
|
1273
|
+
history: ShipmentTrackingHistoryEntry[];
|
|
1274
|
+
barcode: string;
|
|
1275
|
+
consumerPortalLink: string | null;
|
|
1276
|
+
}
|
|
552
1277
|
export interface CommerceModule {
|
|
553
|
-
getProduct(slug: string): Promise<Product>;
|
|
554
|
-
getProductById(id: string): Promise<Product>;
|
|
555
|
-
getProducts(options?:
|
|
556
|
-
getFacets(): Promise<Facet[]>;
|
|
557
|
-
searchProducts(input: SearchInput): Promise<SearchResult>;
|
|
1278
|
+
getProduct(slug: string, options?: RequestOptions): Promise<Product>;
|
|
1279
|
+
getProductById(id: string, options?: RequestOptions): Promise<Product>;
|
|
1280
|
+
getProducts(listOptions?: ProductListOptions, options?: RequestOptions): Promise<PaginatedList<ProductSummary>>;
|
|
1281
|
+
getFacets(options?: RequestOptions): Promise<Facet[]>;
|
|
1282
|
+
searchProducts(input: SearchInput, options?: RequestOptions): Promise<SearchResult>;
|
|
558
1283
|
getActiveOrder(): Promise<Order | null>;
|
|
559
1284
|
addToCart(variantId: string, quantity: number): Promise<Order>;
|
|
560
1285
|
updateCartLine(lineId: string, quantity: number): Promise<Order>;
|
|
@@ -569,6 +1294,9 @@ export interface CommerceModule {
|
|
|
569
1294
|
getEligiblePaymentMethods(): Promise<PaymentMethod[]>;
|
|
570
1295
|
transitionToArrangingPayment(): Promise<Order>;
|
|
571
1296
|
addPayment(input: PaymentInput): Promise<Order>;
|
|
1297
|
+
createStripePaymentIntent(options?: RequestOptions): Promise<StripePaymentIntentResult>;
|
|
1298
|
+
getMolliePaymentMethods(input: MolliePaymentMethodsInput, options?: RequestOptions): Promise<MolliePaymentMethod[]>;
|
|
1299
|
+
createMolliePaymentIntent(input: CreateMolliePaymentIntentInput, options?: RequestOptions): Promise<MolliePaymentIntentResult>;
|
|
572
1300
|
login(email: string, password: string): Promise<{
|
|
573
1301
|
id: string;
|
|
574
1302
|
identifier: string;
|
|
@@ -579,23 +1307,102 @@ export interface CommerceModule {
|
|
|
579
1307
|
logout(): Promise<void>;
|
|
580
1308
|
getCurrentCustomer(): Promise<Customer | null>;
|
|
581
1309
|
getCustomerOrders(options?: OrderListOptions): Promise<PaginatedList<OrderSummary>>;
|
|
582
|
-
|
|
583
|
-
|
|
1310
|
+
reorder(orderCode: string): Promise<ReorderResult>;
|
|
1311
|
+
getCollections(listOptions?: CollectionListOptions, options?: RequestOptions): Promise<Collection[]>;
|
|
1312
|
+
getCollection(slug: string, options?: RequestOptions): Promise<CollectionDetail>;
|
|
1313
|
+
updateCustomer(input: UpdateCustomerInput): Promise<Customer>;
|
|
1314
|
+
updatePassword(currentPassword: string, newPassword: string): Promise<void>;
|
|
1315
|
+
requestPasswordReset(emailAddress: string): Promise<void>;
|
|
1316
|
+
resetPassword(token: string, password: string): Promise<{
|
|
1317
|
+
id: string;
|
|
1318
|
+
identifier: string;
|
|
1319
|
+
}>;
|
|
1320
|
+
requestEmailUpdate(password: string, newEmailAddress: string): Promise<void>;
|
|
1321
|
+
updateEmail(token: string): Promise<void>;
|
|
1322
|
+
verifyAccount(token: string, password?: string): Promise<{
|
|
1323
|
+
id: string;
|
|
1324
|
+
identifier: string;
|
|
1325
|
+
}>;
|
|
1326
|
+
refreshVerification(emailAddress: string): Promise<void>;
|
|
1327
|
+
createAddress(input: AddressInput): Promise<CustomerAddress>;
|
|
1328
|
+
updateAddress(input: UpdateAddressInput): Promise<CustomerAddress>;
|
|
1329
|
+
deleteAddress(id: string): Promise<void>;
|
|
1330
|
+
getAvailableCountries(): Promise<Country[]>;
|
|
1331
|
+
getOrderByCode(code: string): Promise<Order>;
|
|
1332
|
+
getActiveChannel(): Promise<ActiveChannel>;
|
|
1333
|
+
getPropertyGroups(options?: RequestOptions): Promise<PropertyGroup[]>;
|
|
1334
|
+
getProductProperties(productId: string, options?: RequestOptions): Promise<ProductPropertyGroupValues[]>;
|
|
1335
|
+
getFavoriteVariantIds(): Promise<string[]>;
|
|
1336
|
+
getMyFavorites(options?: {
|
|
1337
|
+
take?: number;
|
|
1338
|
+
skip?: number;
|
|
1339
|
+
}): Promise<PaginatedList<FavoriteItem>>;
|
|
1340
|
+
toggleFavorite(productVariantId: string): Promise<boolean>;
|
|
1341
|
+
removeFavorite(productVariantId: string): Promise<boolean>;
|
|
1342
|
+
subscribeToStockNotification(productVariantId: string, emailAddress?: string): Promise<StockNotificationSubscriptionResult>;
|
|
1343
|
+
unsubscribeFromStockNotification(token: string): Promise<boolean>;
|
|
1344
|
+
getProductRecommendations(productId: string, groupSlug?: string): Promise<RecommendedProductGroup[]>;
|
|
1345
|
+
getAgeVerificationStatus(): Promise<AgeVerificationStatus>;
|
|
1346
|
+
submitDateOfBirth(dateOfBirth: string): Promise<AgeVerificationStatus>;
|
|
1347
|
+
confirmAge(): Promise<AgeVerificationStatus>;
|
|
1348
|
+
getProductReviews(productId: string, options?: ReviewListOptions): Promise<{
|
|
1349
|
+
items: ProductReview[];
|
|
1350
|
+
totalItems: number;
|
|
1351
|
+
nextCursor: string | null;
|
|
1352
|
+
}>;
|
|
1353
|
+
getRecentProductReviews(options?: RecentReviewsOptions): Promise<ProductReview[]>;
|
|
1354
|
+
getReviewRatingSummary(productId: string): Promise<ReviewRatingSummary>;
|
|
1355
|
+
getReviewAttributeAggregations(productId: string): Promise<ReviewAttributeAggregation[]>;
|
|
1356
|
+
getReviewAttributes(productId?: string): Promise<ReviewAttribute[]>;
|
|
1357
|
+
getMyReview(productId: string): Promise<ProductReview | null>;
|
|
1358
|
+
getReviewChannelConfig(): Promise<ReviewChannelConfig>;
|
|
1359
|
+
createReview(input: CreateReviewInput): Promise<CreateReviewResult>;
|
|
1360
|
+
updateReview(id: string, input: UpdateReviewInput): Promise<ProductReview>;
|
|
1361
|
+
deleteReview(id: string): Promise<boolean>;
|
|
1362
|
+
voteReview(reviewId: string, isHelpful: boolean): Promise<boolean>;
|
|
1363
|
+
reportReview(reviewId: string, reason: string): Promise<boolean>;
|
|
1364
|
+
uploadReviewMedia(files: File[]): Promise<ReviewMediaUploadResult[]>;
|
|
1365
|
+
getMySubscriptions(): Promise<CustomerSubscription[]>;
|
|
1366
|
+
pauseMySubscription(id: string, reason?: string): Promise<CustomerSubscription>;
|
|
1367
|
+
resumeMySubscription(id: string): Promise<CustomerSubscription>;
|
|
1368
|
+
cancelMySubscription(id: string, options?: {
|
|
1369
|
+
reason?: string;
|
|
1370
|
+
immediate?: boolean;
|
|
1371
|
+
}): Promise<CustomerSubscription>;
|
|
1372
|
+
getMyQuotes(options?: QuoteListOptions): Promise<QuoteList>;
|
|
1373
|
+
getMyQuote(id: string): Promise<Quote | null>;
|
|
1374
|
+
createQuoteRequest(input: CreateQuoteRequestInput): Promise<Quote>;
|
|
1375
|
+
acceptQuote(id: string): Promise<Order>;
|
|
1376
|
+
cancelMyQuote(id: string, reason?: string): Promise<Quote>;
|
|
1377
|
+
getMyVatValidationStatus(): Promise<VatValidationResult | null>;
|
|
1378
|
+
setMyVatNumber(vatNumber: string): Promise<VatValidationResult>;
|
|
1379
|
+
clearMyVatNumber(): Promise<boolean>;
|
|
1380
|
+
getDropOffPoints(input: DropOffPointInput): Promise<DropOffPoint[]>;
|
|
1381
|
+
getDeliveryOptions(input: DeliveryOptionsInput): Promise<DeliveryOption[]>;
|
|
1382
|
+
trackShipment(barcode: string, postalCode: string): Promise<ShipmentTrackingInfo | null>;
|
|
1383
|
+
getBranding(options?: RequestOptions): Promise<BrandingInfo>;
|
|
584
1384
|
}
|
|
585
1385
|
export interface ContentModule {
|
|
586
|
-
resolvePath(path: string, locale?: string): Promise<ResolvedContent>;
|
|
587
|
-
getContent(
|
|
588
|
-
|
|
589
|
-
|
|
1386
|
+
resolvePath(path: string, locale?: string, options?: RequestOptions): Promise<ResolvedContent>;
|
|
1387
|
+
getContent(queryOptions: ContentQueryOptions, options?: RequestOptions): Promise<Record<string, unknown>>;
|
|
1388
|
+
searchContent(query: ContentSearchQuery, options?: RequestOptions): Promise<ContentSearchResult>;
|
|
1389
|
+
getAsset(id: string, options?: RequestOptions): Promise<CmsAsset>;
|
|
1390
|
+
lookupAssets(ids: string[], options?: RequestOptions): Promise<CmsAsset[]>;
|
|
1391
|
+
lookupVendureAssetDescriptions(vendureAssetIds: string[], options?: RequestOptions): Promise<Record<string, VendureAssetDescriptionTranslation[]>>;
|
|
1392
|
+
getForm(id: string, options?: RequestOptions): Promise<FormDefinition>;
|
|
590
1393
|
submitForm(id: string, values: Record<string, unknown>): Promise<FormSubmissionResult>;
|
|
591
|
-
getContentStrings(format?: 'list' | 'export'): Promise<ContentStrings>;
|
|
592
|
-
getMenus(): Promise<Menu[]>;
|
|
593
|
-
getMenu(slugOrId: string): Promise<Menu>;
|
|
1394
|
+
getContentStrings(format?: 'list' | 'export', options?: RequestOptions): Promise<ContentStrings>;
|
|
1395
|
+
getMenus(options?: RequestOptions): Promise<Menu[]>;
|
|
1396
|
+
getMenu(slugOrId: string, options?: RequestOptions): Promise<Menu>;
|
|
1397
|
+
getSitemap(languageCode?: string, options?: RequestOptions): Promise<SitemapEntry[]>;
|
|
1398
|
+
lookupContentItems(ids: string[], options?: RequestOptions): Promise<ContentItemSummary[]>;
|
|
1399
|
+
lookupContentItemsWithFields(ids: string[], fieldSlugs: string[], options?: RequestOptions): Promise<ContentItemWithFields[]>;
|
|
1400
|
+
getCollectionPageValues(collectionId: string, languageCode?: string, options?: RequestOptions): Promise<CollectionPageValues>;
|
|
594
1401
|
}
|
|
595
1402
|
export interface NavigationModule {
|
|
596
|
-
getRoutes(languageCode?: string): Promise<RoutesResponse>;
|
|
597
|
-
findRoute(path: string, languageCode?: string): Promise<RouteEntry | null>;
|
|
598
|
-
getRoutesByType(type: 'cms' | 'collection' | 'product', languageCode?: string): Promise<RouteEntry[]>;
|
|
1403
|
+
getRoutes(languageCode?: string, options?: RequestOptions): Promise<RoutesResponse>;
|
|
1404
|
+
findRoute(path: string, languageCode?: string, options?: RequestOptions): Promise<RouteEntry | null>;
|
|
1405
|
+
getRoutesByType(type: 'cms' | 'collection' | 'product', languageCode?: string, options?: RequestOptions): Promise<RouteEntry[]>;
|
|
599
1406
|
}
|
|
600
1407
|
export interface PricingModule {
|
|
601
1408
|
formatPrice(amount: number, currencyCode?: string, locale?: string): string;
|
|
@@ -605,11 +1412,9 @@ export interface PricingModule {
|
|
|
605
1412
|
getPriceDisplay(variant: VariantPriceData): PriceDisplay;
|
|
606
1413
|
validateOrderMinimums(order: {
|
|
607
1414
|
totalWithTax: number;
|
|
608
|
-
totalQuantity: number;
|
|
609
1415
|
currencyCode: string;
|
|
610
1416
|
}, constraints: {
|
|
611
1417
|
minOrderAmount?: number;
|
|
612
|
-
minOrderQuantity?: number;
|
|
613
1418
|
}): OrderValidationResult;
|
|
614
1419
|
}
|
|
615
1420
|
export interface MediaModule {
|
|
@@ -621,6 +1426,9 @@ export interface CurrencyModule {
|
|
|
621
1426
|
getExchangeRates(): Promise<ExchangeRate[]>;
|
|
622
1427
|
convertCurrency(amount: string, fromCurrency: string, toCurrency: string): Promise<ConvertedAmount>;
|
|
623
1428
|
}
|
|
1429
|
+
export interface CreditModule {
|
|
1430
|
+
getCreditStatus(options?: RequestOptions): Promise<B2bCreditStatus | null>;
|
|
1431
|
+
}
|
|
624
1432
|
export interface StorefrontClient {
|
|
625
1433
|
readonly context: StoreContext;
|
|
626
1434
|
readonly commerce: CommerceModule;
|
|
@@ -629,6 +1437,9 @@ export interface StorefrontClient {
|
|
|
629
1437
|
readonly pricing: PricingModule;
|
|
630
1438
|
readonly media: MediaModule;
|
|
631
1439
|
readonly currency: CurrencyModule;
|
|
1440
|
+
readonly credit: CreditModule;
|
|
1441
|
+
readonly seo: import('./seo/types.js').SeoModule;
|
|
1442
|
+
readonly maintenanceMode: boolean;
|
|
632
1443
|
setLanguage(code: string): void;
|
|
633
1444
|
getLanguage(): string;
|
|
634
1445
|
setAuthToken(token: string): void;
|