@sixtyninecommerce/client 0.1.0 → 0.3.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.
Files changed (124) hide show
  1. package/README.md +24 -0
  2. package/dist/client.d.ts.map +1 -1
  3. package/dist/client.js +1 -0
  4. package/dist/client.js.map +1 -1
  5. package/dist/commerce/age-verification.d.ts +8 -0
  6. package/dist/commerce/age-verification.d.ts.map +1 -0
  7. package/dist/commerce/age-verification.js +47 -0
  8. package/dist/commerce/age-verification.js.map +1 -0
  9. package/dist/commerce/customer.d.ts +21 -1
  10. package/dist/commerce/customer.d.ts.map +1 -1
  11. package/dist/commerce/customer.js +92 -15
  12. package/dist/commerce/customer.js.map +1 -1
  13. package/dist/commerce/favorites.d.ts +12 -0
  14. package/dist/commerce/favorites.d.ts.map +1 -0
  15. package/dist/commerce/favorites.js +30 -0
  16. package/dist/commerce/favorites.js.map +1 -0
  17. package/dist/commerce/index.d.ts.map +1 -1
  18. package/dist/commerce/index.js +21 -0
  19. package/dist/commerce/index.js.map +1 -1
  20. package/dist/commerce/products.d.ts +9 -7
  21. package/dist/commerce/products.d.ts.map +1 -1
  22. package/dist/commerce/products.js +29 -23
  23. package/dist/commerce/products.js.map +1 -1
  24. package/dist/commerce/queries.d.ts +25 -4
  25. package/dist/commerce/queries.d.ts.map +1 -1
  26. package/dist/commerce/queries.js +263 -0
  27. package/dist/commerce/queries.js.map +1 -1
  28. package/dist/commerce/recommendations.d.ts +6 -0
  29. package/dist/commerce/recommendations.d.ts.map +1 -0
  30. package/dist/commerce/recommendations.js +10 -0
  31. package/dist/commerce/recommendations.js.map +1 -0
  32. package/dist/commerce/reviews.d.ts +21 -0
  33. package/dist/commerce/reviews.d.ts.map +1 -0
  34. package/dist/commerce/reviews.js +159 -0
  35. package/dist/commerce/reviews.js.map +1 -0
  36. package/dist/commerce/search.d.ts +2 -2
  37. package/dist/commerce/search.d.ts.map +1 -1
  38. package/dist/commerce/search.js +6 -4
  39. package/dist/commerce/search.js.map +1 -1
  40. package/dist/commerce/shipping.d.ts +8 -0
  41. package/dist/commerce/shipping.d.ts.map +1 -0
  42. package/dist/commerce/shipping.js +109 -0
  43. package/dist/commerce/shipping.js.map +1 -0
  44. package/dist/commerce/subscriptions.d.ts +6 -0
  45. package/dist/commerce/subscriptions.d.ts.map +1 -0
  46. package/dist/commerce/subscriptions.js +26 -0
  47. package/dist/commerce/subscriptions.js.map +1 -0
  48. package/dist/commerce/vat-validation.d.ts +8 -0
  49. package/dist/commerce/vat-validation.d.ts.map +1 -0
  50. package/dist/commerce/vat-validation.js +43 -0
  51. package/dist/commerce/vat-validation.js.map +1 -0
  52. package/dist/content/assets.d.ts +4 -2
  53. package/dist/content/assets.d.ts.map +1 -1
  54. package/dist/content/assets.js +15 -11
  55. package/dist/content/assets.js.map +1 -1
  56. package/dist/content/collection-pages.d.ts +6 -0
  57. package/dist/content/collection-pages.d.ts.map +1 -0
  58. package/dist/content/collection-pages.js +12 -0
  59. package/dist/content/collection-pages.js.map +1 -0
  60. package/dist/content/filtered-products.d.ts +19 -0
  61. package/dist/content/filtered-products.d.ts.map +1 -0
  62. package/dist/content/filtered-products.js +18 -0
  63. package/dist/content/filtered-products.js.map +1 -0
  64. package/dist/content/forms.d.ts +2 -2
  65. package/dist/content/forms.d.ts.map +1 -1
  66. package/dist/content/forms.js +2 -2
  67. package/dist/content/forms.js.map +1 -1
  68. package/dist/content/index.d.ts.map +1 -1
  69. package/dist/content/index.js +4 -0
  70. package/dist/content/index.js.map +1 -1
  71. package/dist/content/items.d.ts +4 -2
  72. package/dist/content/items.d.ts.map +1 -1
  73. package/dist/content/items.js +31 -16
  74. package/dist/content/items.js.map +1 -1
  75. package/dist/content/menus.d.ts +3 -3
  76. package/dist/content/menus.d.ts.map +1 -1
  77. package/dist/content/menus.js +4 -4
  78. package/dist/content/menus.js.map +1 -1
  79. package/dist/content/resolve.d.ts +2 -2
  80. package/dist/content/resolve.d.ts.map +1 -1
  81. package/dist/content/resolve.js +2 -2
  82. package/dist/content/resolve.js.map +1 -1
  83. package/dist/content/sitemap.d.ts +6 -0
  84. package/dist/content/sitemap.d.ts.map +1 -0
  85. package/dist/content/sitemap.js +12 -0
  86. package/dist/content/sitemap.js.map +1 -0
  87. package/dist/content/strings.d.ts +2 -2
  88. package/dist/content/strings.d.ts.map +1 -1
  89. package/dist/content/strings.js +3 -3
  90. package/dist/content/strings.js.map +1 -1
  91. package/dist/core/context.d.ts.map +1 -1
  92. package/dist/core/context.js +12 -33
  93. package/dist/core/context.js.map +1 -1
  94. package/dist/core/http.d.ts +8 -4
  95. package/dist/core/http.d.ts.map +1 -1
  96. package/dist/core/http.js +259 -104
  97. package/dist/core/http.js.map +1 -1
  98. package/dist/index.d.ts +2 -1
  99. package/dist/index.d.ts.map +1 -1
  100. package/dist/index.js +1 -0
  101. package/dist/index.js.map +1 -1
  102. package/dist/media/index.d.ts +2 -1
  103. package/dist/media/index.d.ts.map +1 -1
  104. package/dist/media/index.js +35 -5
  105. package/dist/media/index.js.map +1 -1
  106. package/dist/media/urls.d.ts +3 -0
  107. package/dist/media/urls.d.ts.map +1 -1
  108. package/dist/media/urls.js +15 -1
  109. package/dist/media/urls.js.map +1 -1
  110. package/dist/media/video.d.ts +22 -0
  111. package/dist/media/video.d.ts.map +1 -0
  112. package/dist/media/video.js +90 -0
  113. package/dist/media/video.js.map +1 -0
  114. package/dist/navigation/routes.d.ts +4 -4
  115. package/dist/navigation/routes.d.ts.map +1 -1
  116. package/dist/navigation/routes.js +6 -6
  117. package/dist/navigation/routes.js.map +1 -1
  118. package/dist/pricing/validation.d.ts +0 -2
  119. package/dist/pricing/validation.d.ts.map +1 -1
  120. package/dist/pricing/validation.js +0 -10
  121. package/dist/pricing/validation.js.map +1 -1
  122. package/dist/types.d.ts +487 -30
  123. package/dist/types.d.ts.map +1 -1
  124. package/package.json +12 -2
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,9 @@ 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;
9
19
  }
10
20
  export interface ChannelInfo {
11
21
  id: string;
@@ -18,6 +28,7 @@ export interface ChannelInfo {
18
28
  export interface StoreContext {
19
29
  channel: ChannelInfo;
20
30
  cdnUrl: string;
31
+ channelCdnDomain: string | null;
21
32
  vendureUrl: string;
22
33
  cmsUrl: string;
23
34
  pluginsUrl: string;
@@ -25,6 +36,12 @@ export interface StoreContext {
25
36
  currencyCode: string;
26
37
  authToken: string | null;
27
38
  fetch: typeof globalThis.fetch;
39
+ onAuthToken?: (token: string) => void;
40
+ onAuthExpired?: () => void;
41
+ retry: {
42
+ attempts: number;
43
+ baseDelayMs: number;
44
+ };
28
45
  }
29
46
  export interface GraphQLResponse<T = unknown> {
30
47
  data: T;
@@ -33,6 +50,12 @@ export interface GraphQLResponse<T = unknown> {
33
50
  path?: string[];
34
51
  }>;
35
52
  }
53
+ export interface AgeVerificationStatus {
54
+ required: boolean;
55
+ minimumAge: number | null;
56
+ verified: boolean;
57
+ dateOfBirth: string | null;
58
+ }
36
59
  export interface AssetPresetSize {
37
60
  url: string;
38
61
  webpUrl: string;
@@ -54,6 +77,32 @@ export interface Asset {
54
77
  };
55
78
  presets?: AssetPresets;
56
79
  }
80
+ export interface CmsAssetTranslation {
81
+ language_code: string;
82
+ alt_text: string | null;
83
+ }
84
+ export interface CmsAsset {
85
+ id: string;
86
+ filename: string;
87
+ mime_type: string;
88
+ file_size: number;
89
+ storage_key: string;
90
+ content_hash: string | null;
91
+ width: number | null;
92
+ height: number | null;
93
+ alt_text: string | null;
94
+ presets: Record<PresetName, {
95
+ url: string;
96
+ webp_url: string;
97
+ width: number;
98
+ height: number;
99
+ }> | null;
100
+ translations: CmsAssetTranslation[];
101
+ }
102
+ export interface VendureAssetDescriptionTranslation {
103
+ language_code: string;
104
+ description: string;
105
+ }
57
106
  export interface PriceTier {
58
107
  minQuantity: number;
59
108
  price: number;
@@ -83,7 +132,12 @@ export interface ProductVariant {
83
132
  retailPriceWithTax: number | null;
84
133
  priceTiers: PriceTier[] | null;
85
134
  options: ProductOption[];
135
+ featuredAsset: Asset | null;
86
136
  assets: Asset[];
137
+ customFields: {
138
+ minOrderQuantity: number | null;
139
+ salesUnit: number | null;
140
+ };
87
141
  }
88
142
  export interface FacetValue {
89
143
  id: string;
@@ -122,6 +176,11 @@ export interface Product {
122
176
  facetValues: FacetValue[];
123
177
  collections: CollectionRef[];
124
178
  }
179
+ export interface RecommendedProductGroup {
180
+ groupName: string;
181
+ groupSlug: string;
182
+ products: ProductSummary[];
183
+ }
125
184
  export interface ProductSummary {
126
185
  id: string;
127
186
  name: string;
@@ -136,10 +195,9 @@ export interface ProductSummary {
136
195
  priceWithTax: number;
137
196
  currencyCode: string;
138
197
  stockLevel: string;
139
- priceListName: string | null;
140
- retailPrice: number | null;
141
- retailPriceWithTax: number | null;
142
- priceTiers?: PriceTier[] | null;
198
+ b2bGroupName: string | null;
199
+ b2bRetailPrice: number | null;
200
+ b2bRetailPriceWithTax: number | null;
143
201
  }>;
144
202
  facetValues?: FacetValue[];
145
203
  collections?: CollectionRef[];
@@ -181,6 +239,10 @@ export interface CollectionDetail extends Collection {
181
239
  priceListName: string | null;
182
240
  retailPrice: number | null;
183
241
  retailPriceWithTax: number | null;
242
+ customFields: {
243
+ minOrderQuantity: number | null;
244
+ salesUnit: number | null;
245
+ };
184
246
  }>;
185
247
  totalItems: number;
186
248
  };
@@ -328,10 +390,50 @@ export interface RegisterInput {
328
390
  password: string;
329
391
  phoneNumber?: string;
330
392
  }
393
+ export interface UpdateCustomerInput {
394
+ title?: string;
395
+ firstName: string;
396
+ lastName: string;
397
+ phoneNumber?: string;
398
+ }
399
+ export interface UpdateAddressInput {
400
+ id: string;
401
+ fullName?: string;
402
+ streetLine1?: string;
403
+ streetLine2?: string;
404
+ city?: string;
405
+ province?: string;
406
+ postalCode?: string;
407
+ countryCode?: string;
408
+ phoneNumber?: string;
409
+ company?: string;
410
+ defaultShippingAddress?: boolean;
411
+ defaultBillingAddress?: boolean;
412
+ }
413
+ export interface Country {
414
+ id: string;
415
+ code: string;
416
+ name: string;
417
+ }
418
+ export interface ActiveChannel {
419
+ id: string;
420
+ code: string;
421
+ defaultLanguageCode: string;
422
+ availableLanguageCodes: string[];
423
+ defaultCurrencyCode: string;
424
+ availableCurrencyCodes: string[];
425
+ customFields: Record<string, unknown>;
426
+ }
427
+ export interface FacetValueFilterInput {
428
+ and?: string;
429
+ or?: string[];
430
+ }
331
431
  export interface SearchInput {
332
432
  term: string;
333
433
  collectionSlug?: string;
434
+ collectionId?: string;
334
435
  facetValueIds?: string[];
436
+ facetValueFilters?: FacetValueFilterInput[];
335
437
  take?: number;
336
438
  skip?: number;
337
439
  sort?: {
@@ -400,6 +502,42 @@ export interface OrderListOptions {
400
502
  take?: number;
401
503
  skip?: number;
402
504
  }
505
+ export interface FavoriteVariant {
506
+ id: string;
507
+ name: string;
508
+ sku: string;
509
+ price: number;
510
+ priceWithTax: number;
511
+ currencyCode: string;
512
+ stockLevel: string;
513
+ priceListName: string | null;
514
+ retailPrice: number | null;
515
+ retailPriceWithTax: number | null;
516
+ priceTiers: PriceTier[] | null;
517
+ product: {
518
+ id: string;
519
+ name: string;
520
+ slug: string;
521
+ featuredAsset: Asset | null;
522
+ };
523
+ options: Array<{
524
+ id: string;
525
+ name: string;
526
+ group: {
527
+ name: string;
528
+ };
529
+ }>;
530
+ customFields: {
531
+ minOrderQuantity: number | null;
532
+ salesUnit: number | null;
533
+ };
534
+ }
535
+ export interface FavoriteItem {
536
+ id: string;
537
+ productVariantId: string;
538
+ createdAt: string;
539
+ productVariant: FavoriteVariant | null;
540
+ }
403
541
  export interface PaginatedList<T> {
404
542
  items: T[];
405
543
  totalItems: number;
@@ -412,6 +550,43 @@ export interface ResolvedContent {
412
550
  }>;
413
551
  slug_translations?: Record<string, string>;
414
552
  }
553
+ export interface SitemapEntry {
554
+ id: string;
555
+ path: string;
556
+ title: string | null;
557
+ collection_slug: string | null;
558
+ updated_at: string;
559
+ type?: 'collection_page';
560
+ language_code?: string;
561
+ }
562
+ export interface ContentItemSummary {
563
+ id: string;
564
+ slug: string | null;
565
+ status: string;
566
+ collection_id: string;
567
+ collection_name: string;
568
+ collection_title_field_slug: string | null;
569
+ title: string | null;
570
+ }
571
+ export interface ContentItemWithFields {
572
+ id: string;
573
+ title: string | null;
574
+ fieldValues: Record<string, unknown>;
575
+ }
576
+ export interface CollectionFieldDefinition {
577
+ id: string;
578
+ slug: string;
579
+ label: string;
580
+ fieldType: string;
581
+ position: number;
582
+ isRequired: boolean;
583
+ isLocalizable: boolean;
584
+ config: Record<string, unknown> | null;
585
+ }
586
+ export interface CollectionPageValues {
587
+ fields: CollectionFieldDefinition[];
588
+ values: Record<string, unknown>;
589
+ }
415
590
  export interface ContentQueryOptions {
416
591
  collectionId?: string;
417
592
  collectionSlug?: string;
@@ -421,12 +596,6 @@ export interface ContentQueryOptions {
421
596
  sort?: string;
422
597
  languageCode?: string;
423
598
  }
424
- export interface AssetQueryOptions {
425
- folderId?: string;
426
- mimeType?: string;
427
- limit?: number;
428
- offset?: number;
429
- }
430
599
  export interface FormField {
431
600
  slug: string;
432
601
  label: string;
@@ -535,11 +704,66 @@ export interface OrderValidationResult {
535
704
  errors: OrderValidationError[];
536
705
  }
537
706
  export interface OrderValidationError {
538
- type: 'min_amount' | 'min_quantity';
707
+ type: 'min_amount';
539
708
  message: string;
540
709
  required: number;
541
710
  actual: number;
542
711
  }
712
+ export interface PropertyGroupTranslation {
713
+ id: string;
714
+ languageCode: string;
715
+ name: string;
716
+ }
717
+ export interface PropertyTranslation {
718
+ id: string;
719
+ languageCode: string;
720
+ name: string;
721
+ helpText: string | null;
722
+ }
723
+ export interface PropertyFieldFacet {
724
+ fieldSlug: string;
725
+ fieldType: string;
726
+ facetId: string;
727
+ }
728
+ export interface PropertyConfig {
729
+ options?: Array<{
730
+ value: string;
731
+ label: string;
732
+ }>;
733
+ min?: number;
734
+ max?: number;
735
+ maxLength?: number;
736
+ allowedCollectionIds?: string[];
737
+ filterableFieldSlugs?: string[];
738
+ }
739
+ export interface Property {
740
+ id: string;
741
+ slug: string;
742
+ fieldType: string;
743
+ isFilterable: boolean;
744
+ isRequired: boolean;
745
+ position: number;
746
+ config: PropertyConfig | null;
747
+ facetId: string | null;
748
+ fieldFacets: PropertyFieldFacet[];
749
+ translations: PropertyTranslation[];
750
+ }
751
+ export interface PropertyGroup {
752
+ id: string;
753
+ position: number;
754
+ translations: PropertyGroupTranslation[];
755
+ properties: Property[];
756
+ }
757
+ export interface PropertyValue {
758
+ id: string;
759
+ propertyId: string;
760
+ languageCode: string | null;
761
+ value: unknown;
762
+ }
763
+ export interface ProductPropertyGroupValues {
764
+ group: PropertyGroup;
765
+ values: PropertyValue[];
766
+ }
543
767
  export type PresetName = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl';
544
768
  export interface ResponsiveImageData {
545
769
  src: string;
@@ -549,12 +773,184 @@ export interface ResponsiveImageData {
549
773
  width: number;
550
774
  height: number;
551
775
  }
776
+ export interface ReviewAttribute {
777
+ id: string;
778
+ slug: string;
779
+ label: string;
780
+ inputType: 'rating' | 'selection';
781
+ options: string[] | null;
782
+ isRequired: boolean;
783
+ section: 'product' | 'demographic';
784
+ }
785
+ export interface ProductReview {
786
+ id: string;
787
+ rating: number | null;
788
+ title: string | null;
789
+ body: string | null;
790
+ variantId: string | null;
791
+ customerDisplayName: string | null;
792
+ isVerifiedPurchase: boolean;
793
+ isEdited: boolean;
794
+ attributeValues: Record<string, number | string> | null;
795
+ imageAssetIds: string[] | null;
796
+ videoAssetIds: string[] | null;
797
+ helpfulCount: number;
798
+ notHelpfulCount: number;
799
+ merchantReply: string | null;
800
+ merchantReplyAt: string | null;
801
+ myVote: boolean | null;
802
+ createdAt: string;
803
+ updatedAt: string;
804
+ }
805
+ export interface ReviewRatingDistribution {
806
+ one: number;
807
+ two: number;
808
+ three: number;
809
+ four: number;
810
+ five: number;
811
+ }
812
+ export interface ReviewRatingSummary {
813
+ averageRating: number | null;
814
+ reviewCount: number;
815
+ ratingCount: number;
816
+ distribution: ReviewRatingDistribution;
817
+ }
818
+ export interface ReviewAttributeAggregation {
819
+ attributeId: string;
820
+ label: string;
821
+ inputType: string;
822
+ averageRating: number | null;
823
+ distribution: Record<string, number> | null;
824
+ }
825
+ export interface ReviewChannelConfig {
826
+ reviewsEnabled: boolean;
827
+ reviewsRequireText: boolean;
828
+ reviewsAllowMedia: boolean;
829
+ reviewsAllowVoting: boolean;
830
+ reviewsAllowRating: boolean;
831
+ reviewMinBodyLength: number;
832
+ reviewMaxTitleLength: number;
833
+ reviewMaxImages: number;
834
+ reviewMaxVideos: number;
835
+ }
836
+ export interface CreateReviewInput {
837
+ productId: string;
838
+ variantId?: string;
839
+ rating?: number;
840
+ title?: string;
841
+ body?: string;
842
+ imageAssetIds?: string[];
843
+ videoAssetIds?: string[];
844
+ attributeValues?: Record<string, number | string>;
845
+ }
846
+ export interface UpdateReviewInput {
847
+ rating?: number;
848
+ title?: string;
849
+ body?: string;
850
+ imageAssetIds?: string[];
851
+ videoAssetIds?: string[];
852
+ attributeValues?: Record<string, number | string>;
853
+ }
854
+ export interface ReviewListOptions {
855
+ take?: number;
856
+ cursor?: string;
857
+ sort?: 'NEWEST' | 'OLDEST' | 'HIGHEST_RATING' | 'LOWEST_RATING' | 'MOST_HELPFUL';
858
+ rating?: number;
859
+ }
860
+ export interface CreateReviewResult {
861
+ review: ProductReview;
862
+ requiresModeration: boolean;
863
+ }
864
+ export interface ReviewMediaUploadResult {
865
+ id: string;
866
+ preview: string;
867
+ mimeType: string;
868
+ }
869
+ export type CustomerSubscriptionStatus = 'TRIAL' | 'ACTIVE' | 'PAUSED' | 'PAST_DUE' | 'CANCELLED' | 'EXPIRED' | 'COMPLETED';
870
+ export interface CustomerSubscription {
871
+ id: string;
872
+ planName: string;
873
+ currencyCode: string;
874
+ recurringPrice: number;
875
+ billingInterval: string;
876
+ currentStatus: CustomerSubscriptionStatus | null;
877
+ currentPeriodStart: string | null;
878
+ currentPeriodEnd: string | null;
879
+ nextRenewalAt: string | null;
880
+ cancelAtPeriodEnd: boolean;
881
+ createdAt: string;
882
+ }
883
+ export interface VatValidationResult {
884
+ status: string;
885
+ vatNumber: string;
886
+ countryCode: string;
887
+ companyName: string | null;
888
+ companyAddress: string | null;
889
+ validatedAt: string | null;
890
+ error: string | null;
891
+ }
892
+ export interface DropOffPointInput {
893
+ postalCode: string;
894
+ countryCode?: string;
895
+ carrierId?: string;
896
+ }
897
+ export interface DropOffPoint {
898
+ locationCode: string;
899
+ locationName: string;
900
+ street: string;
901
+ number: string;
902
+ numberSuffix: string | null;
903
+ postalCode: string;
904
+ city: string;
905
+ countryCode: string;
906
+ phone: string | null;
907
+ reference: string | null;
908
+ longitude: string | null;
909
+ latitude: string | null;
910
+ availableDays: number[] | null;
911
+ cutOffTime: string | null;
912
+ carrierId: number | null;
913
+ distance: number | null;
914
+ }
915
+ export interface DeliveryOptionsInput {
916
+ postalCode: string;
917
+ countryCode?: string;
918
+ carrierId?: number;
919
+ deliveryDate?: string;
920
+ cutoffTime?: string;
921
+ mondayDelivery?: boolean;
922
+ saturdayDelivery?: boolean;
923
+ dropoffDays?: string;
924
+ }
925
+ export interface DeliveryTimeFrame {
926
+ start: string;
927
+ end: string;
928
+ priceComment: string | null;
929
+ }
930
+ export interface DeliveryOption {
931
+ date: string;
932
+ time: DeliveryTimeFrame[];
933
+ }
934
+ export interface ShipmentTrackingHistoryEntry {
935
+ status: number;
936
+ time: string;
937
+ }
938
+ export interface ShipmentTrackingInfo {
939
+ shipmentId: number;
940
+ status: {
941
+ current: number;
942
+ final: boolean;
943
+ };
944
+ history: ShipmentTrackingHistoryEntry[];
945
+ barcode: string;
946
+ consumerPortalLink: string | null;
947
+ }
552
948
  export interface CommerceModule {
553
- getProduct(slug: string): Promise<Product>;
554
- getProductById(id: string): Promise<Product>;
555
- getProducts(options?: ProductListOptions): Promise<PaginatedList<ProductSummary>>;
556
- getFacets(): Promise<Facet[]>;
557
- searchProducts(input: SearchInput): Promise<SearchResult>;
949
+ getProduct(slug: string, options?: RequestOptions): Promise<Product>;
950
+ getProductById(id: string, options?: RequestOptions): Promise<Product>;
951
+ getProducts(listOptions?: ProductListOptions, options?: RequestOptions): Promise<PaginatedList<ProductSummary>>;
952
+ getFacets(options?: RequestOptions): Promise<Facet[]>;
953
+ searchProducts(input: SearchInput, options?: RequestOptions): Promise<SearchResult>;
558
954
  getActiveOrder(): Promise<Order | null>;
559
955
  addToCart(variantId: string, quantity: number): Promise<Order>;
560
956
  updateCartLine(lineId: string, quantity: number): Promise<Order>;
@@ -579,23 +975,85 @@ export interface CommerceModule {
579
975
  logout(): Promise<void>;
580
976
  getCurrentCustomer(): Promise<Customer | null>;
581
977
  getCustomerOrders(options?: OrderListOptions): Promise<PaginatedList<OrderSummary>>;
582
- getCollections(options?: CollectionListOptions): Promise<Collection[]>;
583
- getCollection(slug: string): Promise<CollectionDetail>;
978
+ getCollections(listOptions?: CollectionListOptions, options?: RequestOptions): Promise<Collection[]>;
979
+ getCollection(slug: string, options?: RequestOptions): Promise<CollectionDetail>;
980
+ updateCustomer(input: UpdateCustomerInput): Promise<Customer>;
981
+ updatePassword(currentPassword: string, newPassword: string): Promise<void>;
982
+ requestPasswordReset(emailAddress: string): Promise<void>;
983
+ resetPassword(token: string, password: string): Promise<{
984
+ id: string;
985
+ identifier: string;
986
+ }>;
987
+ requestEmailUpdate(password: string, newEmailAddress: string): Promise<void>;
988
+ updateEmail(token: string): Promise<void>;
989
+ verifyAccount(token: string, password?: string): Promise<{
990
+ id: string;
991
+ identifier: string;
992
+ }>;
993
+ refreshVerification(emailAddress: string): Promise<void>;
994
+ createAddress(input: AddressInput): Promise<CustomerAddress>;
995
+ updateAddress(input: UpdateAddressInput): Promise<CustomerAddress>;
996
+ deleteAddress(id: string): Promise<void>;
997
+ getAvailableCountries(): Promise<Country[]>;
998
+ getOrderByCode(code: string): Promise<Order>;
999
+ getActiveChannel(): Promise<ActiveChannel>;
1000
+ getPropertyGroups(options?: RequestOptions): Promise<PropertyGroup[]>;
1001
+ getProductProperties(productId: string, options?: RequestOptions): Promise<ProductPropertyGroupValues[]>;
1002
+ getFavoriteVariantIds(): Promise<string[]>;
1003
+ getMyFavorites(options?: {
1004
+ take?: number;
1005
+ skip?: number;
1006
+ }): Promise<PaginatedList<FavoriteItem>>;
1007
+ toggleFavorite(productVariantId: string): Promise<boolean>;
1008
+ removeFavorite(productVariantId: string): Promise<boolean>;
1009
+ getProductRecommendations(productId: string, groupSlug?: string): Promise<RecommendedProductGroup[]>;
1010
+ getAgeVerificationStatus(): Promise<AgeVerificationStatus>;
1011
+ submitDateOfBirth(dateOfBirth: string): Promise<AgeVerificationStatus>;
1012
+ confirmAge(): Promise<AgeVerificationStatus>;
1013
+ getProductReviews(productId: string, options?: ReviewListOptions): Promise<{
1014
+ items: ProductReview[];
1015
+ totalItems: number;
1016
+ nextCursor: string | null;
1017
+ }>;
1018
+ getReviewRatingSummary(productId: string): Promise<ReviewRatingSummary>;
1019
+ getReviewAttributeAggregations(productId: string): Promise<ReviewAttributeAggregation[]>;
1020
+ getReviewAttributes(productId?: string): Promise<ReviewAttribute[]>;
1021
+ getMyReview(productId: string): Promise<ProductReview | null>;
1022
+ getReviewChannelConfig(): Promise<ReviewChannelConfig>;
1023
+ createReview(input: CreateReviewInput): Promise<CreateReviewResult>;
1024
+ updateReview(id: string, input: UpdateReviewInput): Promise<ProductReview>;
1025
+ deleteReview(id: string): Promise<boolean>;
1026
+ voteReview(reviewId: string, isHelpful: boolean): Promise<boolean>;
1027
+ reportReview(reviewId: string, reason: string): Promise<boolean>;
1028
+ uploadReviewMedia(files: File[]): Promise<ReviewMediaUploadResult[]>;
1029
+ getMySubscriptions(): Promise<CustomerSubscription[]>;
1030
+ getMyVatValidationStatus(): Promise<VatValidationResult | null>;
1031
+ setMyVatNumber(vatNumber: string): Promise<VatValidationResult>;
1032
+ clearMyVatNumber(): Promise<boolean>;
1033
+ getDropOffPoints(input: DropOffPointInput): Promise<DropOffPoint[]>;
1034
+ getDeliveryOptions(input: DeliveryOptionsInput): Promise<DeliveryOption[]>;
1035
+ trackShipment(barcode: string, postalCode: string): Promise<ShipmentTrackingInfo | null>;
584
1036
  }
585
1037
  export interface ContentModule {
586
- resolvePath(path: string, locale?: string): Promise<ResolvedContent>;
587
- getContent(options: ContentQueryOptions): Promise<Record<string, unknown>>;
588
- getAssets(options?: AssetQueryOptions): Promise<Record<string, unknown>>;
589
- getForm(id: string): Promise<FormDefinition>;
1038
+ resolvePath(path: string, locale?: string, options?: RequestOptions): Promise<ResolvedContent>;
1039
+ getContent(queryOptions: ContentQueryOptions, options?: RequestOptions): Promise<Record<string, unknown>>;
1040
+ getAsset(id: string, options?: RequestOptions): Promise<CmsAsset>;
1041
+ lookupAssets(ids: string[], options?: RequestOptions): Promise<CmsAsset[]>;
1042
+ lookupVendureAssetDescriptions(vendureAssetIds: string[], options?: RequestOptions): Promise<Record<string, VendureAssetDescriptionTranslation[]>>;
1043
+ getForm(id: string, options?: RequestOptions): Promise<FormDefinition>;
590
1044
  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>;
1045
+ getContentStrings(format?: 'list' | 'export', options?: RequestOptions): Promise<ContentStrings>;
1046
+ getMenus(options?: RequestOptions): Promise<Menu[]>;
1047
+ getMenu(slugOrId: string, options?: RequestOptions): Promise<Menu>;
1048
+ getSitemap(languageCode?: string, options?: RequestOptions): Promise<SitemapEntry[]>;
1049
+ lookupContentItems(ids: string[], options?: RequestOptions): Promise<ContentItemSummary[]>;
1050
+ lookupContentItemsWithFields(ids: string[], fieldSlugs: string[], options?: RequestOptions): Promise<ContentItemWithFields[]>;
1051
+ getCollectionPageValues(collectionId: string, languageCode?: string, options?: RequestOptions): Promise<CollectionPageValues>;
594
1052
  }
595
1053
  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[]>;
1054
+ getRoutes(languageCode?: string, options?: RequestOptions): Promise<RoutesResponse>;
1055
+ findRoute(path: string, languageCode?: string, options?: RequestOptions): Promise<RouteEntry | null>;
1056
+ getRoutesByType(type: 'cms' | 'collection' | 'product', languageCode?: string, options?: RequestOptions): Promise<RouteEntry[]>;
599
1057
  }
600
1058
  export interface PricingModule {
601
1059
  formatPrice(amount: number, currencyCode?: string, locale?: string): string;
@@ -605,11 +1063,9 @@ export interface PricingModule {
605
1063
  getPriceDisplay(variant: VariantPriceData): PriceDisplay;
606
1064
  validateOrderMinimums(order: {
607
1065
  totalWithTax: number;
608
- totalQuantity: number;
609
1066
  currencyCode: string;
610
1067
  }, constraints: {
611
1068
  minOrderAmount?: number;
612
- minOrderQuantity?: number;
613
1069
  }): OrderValidationResult;
614
1070
  }
615
1071
  export interface MediaModule {
@@ -629,6 +1085,7 @@ export interface StorefrontClient {
629
1085
  readonly pricing: PricingModule;
630
1086
  readonly media: MediaModule;
631
1087
  readonly currency: CurrencyModule;
1088
+ readonly maintenanceMode: boolean;
632
1089
  setLanguage(code: string): void;
633
1090
  getLanguage(): string;
634
1091
  setAuthToken(token: string): void;