@sixtyninecommerce/client 0.3.0 → 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 +117 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +5 -1
- package/dist/client.js.map +1 -1
- 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 +6 -1
- package/dist/commerce/customer.d.ts.map +1 -1
- package/dist/commerce/customer.js +31 -1
- package/dist/commerce/customer.js.map +1 -1
- package/dist/commerce/index.d.ts +2 -2
- package/dist/commerce/index.d.ts.map +1 -1
- package/dist/commerce/index.js +13 -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.map +1 -1
- package/dist/commerce/products.js +67 -6
- package/dist/commerce/products.js.map +1 -1
- package/dist/commerce/queries.d.ts +24 -15
- package/dist/commerce/queries.d.ts.map +1 -1
- package/dist/commerce/queries.js +211 -112
- 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/reviews.d.ts +2 -1
- package/dist/commerce/reviews.d.ts.map +1 -1
- package/dist/commerce/reviews.js +9 -0
- package/dist/commerce/reviews.js.map +1 -1
- 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 +6 -0
- package/dist/commerce/subscriptions.d.ts.map +1 -1
- package/dist/commerce/subscriptions.js +41 -13
- package/dist/commerce/subscriptions.js.map +1 -1
- 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/items.d.ts +2 -1
- package/dist/content/items.d.ts.map +1 -1
- package/dist/content/items.js +20 -0
- package/dist/content/items.js.map +1 -1
- package/dist/content/menus.d.ts.map +1 -1
- package/dist/content/menus.js +25 -7
- package/dist/content/menus.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 +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/media/video.d.ts +4 -1
- package/dist/media/video.d.ts.map +1 -1
- package/dist/media/video.js +20 -1
- package/dist/media/video.js.map +1 -1
- package/dist/navigation/routes.js +2 -2
- package/dist/navigation/routes.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 +361 -7
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/types.d.ts
CHANGED
|
@@ -17,13 +17,119 @@ export interface StorefrontClientConfig {
|
|
|
17
17
|
onAuthExpired?: () => void;
|
|
18
18
|
retry?: RetryConfig;
|
|
19
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;
|
|
125
|
+
}
|
|
20
126
|
export interface ChannelInfo {
|
|
21
127
|
id: string;
|
|
22
128
|
code: string;
|
|
23
129
|
token: string;
|
|
24
130
|
defaultLanguageCode: string;
|
|
25
131
|
defaultCurrencyCode: string;
|
|
26
|
-
customFields:
|
|
132
|
+
customFields: ChannelCustomFields;
|
|
27
133
|
}
|
|
28
134
|
export interface StoreContext {
|
|
29
135
|
channel: ChannelInfo;
|
|
@@ -109,6 +215,11 @@ export interface PriceTier {
|
|
|
109
215
|
priceWithTax: number;
|
|
110
216
|
discountLabel: string | null;
|
|
111
217
|
}
|
|
218
|
+
export interface VariantLocationAvailability {
|
|
219
|
+
locationId: string;
|
|
220
|
+
locationName: string;
|
|
221
|
+
inStock: boolean;
|
|
222
|
+
}
|
|
112
223
|
export interface ProductOption {
|
|
113
224
|
id: string;
|
|
114
225
|
code: string;
|
|
@@ -131,12 +242,14 @@ export interface ProductVariant {
|
|
|
131
242
|
retailPrice: number | null;
|
|
132
243
|
retailPriceWithTax: number | null;
|
|
133
244
|
priceTiers: PriceTier[] | null;
|
|
245
|
+
availabilityByLocation: VariantLocationAvailability[];
|
|
134
246
|
options: ProductOption[];
|
|
135
247
|
featuredAsset: Asset | null;
|
|
136
248
|
assets: Asset[];
|
|
137
249
|
customFields: {
|
|
138
250
|
minOrderQuantity: number | null;
|
|
139
251
|
salesUnit: number | null;
|
|
252
|
+
position: number | null;
|
|
140
253
|
};
|
|
141
254
|
}
|
|
142
255
|
export interface FacetValue {
|
|
@@ -153,6 +266,25 @@ export interface CollectionRef {
|
|
|
153
266
|
id: string;
|
|
154
267
|
name: string;
|
|
155
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;
|
|
156
288
|
}
|
|
157
289
|
export interface OptionGroup {
|
|
158
290
|
id: string;
|
|
@@ -164,6 +296,17 @@ export interface OptionGroup {
|
|
|
164
296
|
code: string;
|
|
165
297
|
}>;
|
|
166
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
|
+
}
|
|
167
310
|
export interface Product {
|
|
168
311
|
id: string;
|
|
169
312
|
name: string;
|
|
@@ -175,6 +318,9 @@ export interface Product {
|
|
|
175
318
|
optionGroups: OptionGroup[];
|
|
176
319
|
facetValues: FacetValue[];
|
|
177
320
|
collections: CollectionRef[];
|
|
321
|
+
translations?: ProductTranslation[];
|
|
322
|
+
documents?: PublicProductDocument[];
|
|
323
|
+
metadata?: import('./seo/metadata-types.js').ProductMetadata | null;
|
|
178
324
|
}
|
|
179
325
|
export interface RecommendedProductGroup {
|
|
180
326
|
groupName: string;
|
|
@@ -195,9 +341,7 @@ export interface ProductSummary {
|
|
|
195
341
|
priceWithTax: number;
|
|
196
342
|
currencyCode: string;
|
|
197
343
|
stockLevel: string;
|
|
198
|
-
|
|
199
|
-
b2bRetailPrice: number | null;
|
|
200
|
-
b2bRetailPriceWithTax: number | null;
|
|
344
|
+
availabilityByLocation?: VariantLocationAvailability[];
|
|
201
345
|
}>;
|
|
202
346
|
facetValues?: FacetValue[];
|
|
203
347
|
collections?: CollectionRef[];
|
|
@@ -239,14 +383,37 @@ export interface CollectionDetail extends Collection {
|
|
|
239
383
|
priceListName: string | null;
|
|
240
384
|
retailPrice: number | null;
|
|
241
385
|
retailPriceWithTax: number | null;
|
|
386
|
+
priceTiers: PriceTier[] | null;
|
|
387
|
+
availabilityByLocation: VariantLocationAvailability[];
|
|
242
388
|
customFields: {
|
|
243
389
|
minOrderQuantity: number | null;
|
|
244
390
|
salesUnit: number | null;
|
|
391
|
+
position: number | null;
|
|
245
392
|
};
|
|
246
393
|
}>;
|
|
247
394
|
totalItems: number;
|
|
248
395
|
};
|
|
249
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
|
+
}
|
|
250
417
|
export interface OrderLine {
|
|
251
418
|
id: string;
|
|
252
419
|
quantity: number;
|
|
@@ -254,6 +421,9 @@ export interface OrderLine {
|
|
|
254
421
|
unitPriceWithTax: number;
|
|
255
422
|
linePrice: number;
|
|
256
423
|
linePriceWithTax: number;
|
|
424
|
+
discountedLinePrice: number;
|
|
425
|
+
discountedLinePriceWithTax: number;
|
|
426
|
+
discounts: Discount[];
|
|
257
427
|
productVariant: {
|
|
258
428
|
id: string;
|
|
259
429
|
name: string;
|
|
@@ -296,6 +466,9 @@ export interface Order {
|
|
|
296
466
|
totalWithTax: number;
|
|
297
467
|
currencyCode: string;
|
|
298
468
|
lines: OrderLine[];
|
|
469
|
+
discounts: Discount[];
|
|
470
|
+
taxSummary: OrderTaxSummary[];
|
|
471
|
+
promotions: OrderPromotion[];
|
|
299
472
|
shippingAddress?: OrderAddress;
|
|
300
473
|
customer?: {
|
|
301
474
|
id: string;
|
|
@@ -362,6 +535,17 @@ export interface OrderSummary {
|
|
|
362
535
|
};
|
|
363
536
|
}>;
|
|
364
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
|
+
}
|
|
365
549
|
export interface CustomerInput {
|
|
366
550
|
firstName: string;
|
|
367
551
|
lastName: string;
|
|
@@ -383,6 +567,38 @@ export interface PaymentInput {
|
|
|
383
567
|
method: string;
|
|
384
568
|
metadata?: Record<string, unknown>;
|
|
385
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
|
+
}
|
|
386
602
|
export interface RegisterInput {
|
|
387
603
|
firstName: string;
|
|
388
604
|
lastName: string;
|
|
@@ -422,7 +638,7 @@ export interface ActiveChannel {
|
|
|
422
638
|
availableLanguageCodes: string[];
|
|
423
639
|
defaultCurrencyCode: string;
|
|
424
640
|
availableCurrencyCodes: string[];
|
|
425
|
-
customFields:
|
|
641
|
+
customFields: ChannelCustomFields;
|
|
426
642
|
}
|
|
427
643
|
export interface FacetValueFilterInput {
|
|
428
644
|
and?: string;
|
|
@@ -465,6 +681,7 @@ export interface SearchResultItem {
|
|
|
465
681
|
};
|
|
466
682
|
} | null;
|
|
467
683
|
collectionIds: string[];
|
|
684
|
+
inStock: boolean;
|
|
468
685
|
}
|
|
469
686
|
export interface SearchFacetValue {
|
|
470
687
|
facetValue: {
|
|
@@ -514,6 +731,7 @@ export interface FavoriteVariant {
|
|
|
514
731
|
retailPrice: number | null;
|
|
515
732
|
retailPriceWithTax: number | null;
|
|
516
733
|
priceTiers: PriceTier[] | null;
|
|
734
|
+
availabilityByLocation: VariantLocationAvailability[];
|
|
517
735
|
product: {
|
|
518
736
|
id: string;
|
|
519
737
|
name: string;
|
|
@@ -530,6 +748,7 @@ export interface FavoriteVariant {
|
|
|
530
748
|
customFields: {
|
|
531
749
|
minOrderQuantity: number | null;
|
|
532
750
|
salesUnit: number | null;
|
|
751
|
+
position: number | null;
|
|
533
752
|
};
|
|
534
753
|
}
|
|
535
754
|
export interface FavoriteItem {
|
|
@@ -538,6 +757,12 @@ export interface FavoriteItem {
|
|
|
538
757
|
createdAt: string;
|
|
539
758
|
productVariant: FavoriteVariant | null;
|
|
540
759
|
}
|
|
760
|
+
export interface StockNotificationSubscriptionResult {
|
|
761
|
+
id: string;
|
|
762
|
+
productVariantId: string;
|
|
763
|
+
emailAddress: string;
|
|
764
|
+
createdAt: string;
|
|
765
|
+
}
|
|
541
766
|
export interface PaginatedList<T> {
|
|
542
767
|
items: T[];
|
|
543
768
|
totalItems: number;
|
|
@@ -568,6 +793,38 @@ export interface ContentItemSummary {
|
|
|
568
793
|
collection_title_field_slug: string | null;
|
|
569
794
|
title: string | null;
|
|
570
795
|
}
|
|
796
|
+
export interface ContentSearchQuery {
|
|
797
|
+
q?: string;
|
|
798
|
+
collectionId?: string;
|
|
799
|
+
collectionSlug?: string;
|
|
800
|
+
parentId?: string;
|
|
801
|
+
limit?: number;
|
|
802
|
+
offset?: number;
|
|
803
|
+
sort?: string;
|
|
804
|
+
languageCode?: string;
|
|
805
|
+
}
|
|
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
|
+
}
|
|
571
828
|
export interface ContentItemWithFields {
|
|
572
829
|
id: string;
|
|
573
830
|
title: string | null;
|
|
@@ -652,11 +909,17 @@ export interface RouteEntry {
|
|
|
652
909
|
id: string;
|
|
653
910
|
title: string;
|
|
654
911
|
slug?: string;
|
|
655
|
-
|
|
912
|
+
updated_at?: string;
|
|
656
913
|
source?: string;
|
|
657
914
|
}
|
|
915
|
+
export interface RoutesMetadata {
|
|
916
|
+
default_language: string;
|
|
917
|
+
available_languages: string[];
|
|
918
|
+
generated_at: string;
|
|
919
|
+
}
|
|
658
920
|
export interface RoutesResponse {
|
|
659
|
-
|
|
921
|
+
data: Record<string, RouteEntry[]>;
|
|
922
|
+
metadata: RoutesMetadata;
|
|
660
923
|
}
|
|
661
924
|
export interface ExchangeRate {
|
|
662
925
|
baseCurrency: string;
|
|
@@ -735,6 +998,13 @@ export interface PropertyConfig {
|
|
|
735
998
|
maxLength?: number;
|
|
736
999
|
allowedCollectionIds?: string[];
|
|
737
1000
|
filterableFieldSlugs?: string[];
|
|
1001
|
+
productFilter?: {
|
|
1002
|
+
filters?: Array<{
|
|
1003
|
+
property_slug: string;
|
|
1004
|
+
facet_value_ids: string[];
|
|
1005
|
+
}>;
|
|
1006
|
+
collection_id?: string | null;
|
|
1007
|
+
};
|
|
738
1008
|
}
|
|
739
1009
|
export interface Property {
|
|
740
1010
|
id: string;
|
|
@@ -857,6 +1127,11 @@ export interface ReviewListOptions {
|
|
|
857
1127
|
sort?: 'NEWEST' | 'OLDEST' | 'HIGHEST_RATING' | 'LOWEST_RATING' | 'MOST_HELPFUL';
|
|
858
1128
|
rating?: number;
|
|
859
1129
|
}
|
|
1130
|
+
export interface RecentReviewsOptions {
|
|
1131
|
+
limit?: number;
|
|
1132
|
+
minRating?: number;
|
|
1133
|
+
languageCode?: string;
|
|
1134
|
+
}
|
|
860
1135
|
export interface CreateReviewResult {
|
|
861
1136
|
review: ProductReview;
|
|
862
1137
|
requiresModeration: boolean;
|
|
@@ -880,6 +1155,60 @@ export interface CustomerSubscription {
|
|
|
880
1155
|
cancelAtPeriodEnd: boolean;
|
|
881
1156
|
createdAt: string;
|
|
882
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
|
+
}
|
|
883
1212
|
export interface VatValidationResult {
|
|
884
1213
|
status: string;
|
|
885
1214
|
vatNumber: string;
|
|
@@ -965,6 +1294,9 @@ export interface CommerceModule {
|
|
|
965
1294
|
getEligiblePaymentMethods(): Promise<PaymentMethod[]>;
|
|
966
1295
|
transitionToArrangingPayment(): Promise<Order>;
|
|
967
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>;
|
|
968
1300
|
login(email: string, password: string): Promise<{
|
|
969
1301
|
id: string;
|
|
970
1302
|
identifier: string;
|
|
@@ -975,6 +1307,7 @@ export interface CommerceModule {
|
|
|
975
1307
|
logout(): Promise<void>;
|
|
976
1308
|
getCurrentCustomer(): Promise<Customer | null>;
|
|
977
1309
|
getCustomerOrders(options?: OrderListOptions): Promise<PaginatedList<OrderSummary>>;
|
|
1310
|
+
reorder(orderCode: string): Promise<ReorderResult>;
|
|
978
1311
|
getCollections(listOptions?: CollectionListOptions, options?: RequestOptions): Promise<Collection[]>;
|
|
979
1312
|
getCollection(slug: string, options?: RequestOptions): Promise<CollectionDetail>;
|
|
980
1313
|
updateCustomer(input: UpdateCustomerInput): Promise<Customer>;
|
|
@@ -1006,6 +1339,8 @@ export interface CommerceModule {
|
|
|
1006
1339
|
}): Promise<PaginatedList<FavoriteItem>>;
|
|
1007
1340
|
toggleFavorite(productVariantId: string): Promise<boolean>;
|
|
1008
1341
|
removeFavorite(productVariantId: string): Promise<boolean>;
|
|
1342
|
+
subscribeToStockNotification(productVariantId: string, emailAddress?: string): Promise<StockNotificationSubscriptionResult>;
|
|
1343
|
+
unsubscribeFromStockNotification(token: string): Promise<boolean>;
|
|
1009
1344
|
getProductRecommendations(productId: string, groupSlug?: string): Promise<RecommendedProductGroup[]>;
|
|
1010
1345
|
getAgeVerificationStatus(): Promise<AgeVerificationStatus>;
|
|
1011
1346
|
submitDateOfBirth(dateOfBirth: string): Promise<AgeVerificationStatus>;
|
|
@@ -1015,6 +1350,7 @@ export interface CommerceModule {
|
|
|
1015
1350
|
totalItems: number;
|
|
1016
1351
|
nextCursor: string | null;
|
|
1017
1352
|
}>;
|
|
1353
|
+
getRecentProductReviews(options?: RecentReviewsOptions): Promise<ProductReview[]>;
|
|
1018
1354
|
getReviewRatingSummary(productId: string): Promise<ReviewRatingSummary>;
|
|
1019
1355
|
getReviewAttributeAggregations(productId: string): Promise<ReviewAttributeAggregation[]>;
|
|
1020
1356
|
getReviewAttributes(productId?: string): Promise<ReviewAttribute[]>;
|
|
@@ -1027,16 +1363,29 @@ export interface CommerceModule {
|
|
|
1027
1363
|
reportReview(reviewId: string, reason: string): Promise<boolean>;
|
|
1028
1364
|
uploadReviewMedia(files: File[]): Promise<ReviewMediaUploadResult[]>;
|
|
1029
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>;
|
|
1030
1377
|
getMyVatValidationStatus(): Promise<VatValidationResult | null>;
|
|
1031
1378
|
setMyVatNumber(vatNumber: string): Promise<VatValidationResult>;
|
|
1032
1379
|
clearMyVatNumber(): Promise<boolean>;
|
|
1033
1380
|
getDropOffPoints(input: DropOffPointInput): Promise<DropOffPoint[]>;
|
|
1034
1381
|
getDeliveryOptions(input: DeliveryOptionsInput): Promise<DeliveryOption[]>;
|
|
1035
1382
|
trackShipment(barcode: string, postalCode: string): Promise<ShipmentTrackingInfo | null>;
|
|
1383
|
+
getBranding(options?: RequestOptions): Promise<BrandingInfo>;
|
|
1036
1384
|
}
|
|
1037
1385
|
export interface ContentModule {
|
|
1038
1386
|
resolvePath(path: string, locale?: string, options?: RequestOptions): Promise<ResolvedContent>;
|
|
1039
1387
|
getContent(queryOptions: ContentQueryOptions, options?: RequestOptions): Promise<Record<string, unknown>>;
|
|
1388
|
+
searchContent(query: ContentSearchQuery, options?: RequestOptions): Promise<ContentSearchResult>;
|
|
1040
1389
|
getAsset(id: string, options?: RequestOptions): Promise<CmsAsset>;
|
|
1041
1390
|
lookupAssets(ids: string[], options?: RequestOptions): Promise<CmsAsset[]>;
|
|
1042
1391
|
lookupVendureAssetDescriptions(vendureAssetIds: string[], options?: RequestOptions): Promise<Record<string, VendureAssetDescriptionTranslation[]>>;
|
|
@@ -1077,6 +1426,9 @@ export interface CurrencyModule {
|
|
|
1077
1426
|
getExchangeRates(): Promise<ExchangeRate[]>;
|
|
1078
1427
|
convertCurrency(amount: string, fromCurrency: string, toCurrency: string): Promise<ConvertedAmount>;
|
|
1079
1428
|
}
|
|
1429
|
+
export interface CreditModule {
|
|
1430
|
+
getCreditStatus(options?: RequestOptions): Promise<B2bCreditStatus | null>;
|
|
1431
|
+
}
|
|
1080
1432
|
export interface StorefrontClient {
|
|
1081
1433
|
readonly context: StoreContext;
|
|
1082
1434
|
readonly commerce: CommerceModule;
|
|
@@ -1085,6 +1437,8 @@ export interface StorefrontClient {
|
|
|
1085
1437
|
readonly pricing: PricingModule;
|
|
1086
1438
|
readonly media: MediaModule;
|
|
1087
1439
|
readonly currency: CurrencyModule;
|
|
1440
|
+
readonly credit: CreditModule;
|
|
1441
|
+
readonly seo: import('./seo/types.js').SeoModule;
|
|
1088
1442
|
readonly maintenanceMode: boolean;
|
|
1089
1443
|
setLanguage(code: string): void;
|
|
1090
1444
|
getLanguage(): string;
|