@faststore/api 2.0.158-alpha.0 → 2.0.163-alpha.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 (28) hide show
  1. package/dist/__generated__/schema.d.ts +85 -4
  2. package/dist/api.cjs.development.js +126 -23
  3. package/dist/api.cjs.development.js.map +1 -1
  4. package/dist/api.cjs.production.min.js +1 -1
  5. package/dist/api.cjs.production.min.js.map +1 -1
  6. package/dist/api.esm.js +126 -23
  7. package/dist/api.esm.js.map +1 -1
  8. package/dist/index.d.ts +7 -0
  9. package/dist/platforms/vtex/clients/commerce/index.d.ts +6 -0
  10. package/dist/platforms/vtex/clients/commerce/types/OrderForm.d.ts +8 -1
  11. package/dist/platforms/vtex/clients/commerce/types/Region.d.ts +2 -2
  12. package/dist/platforms/vtex/clients/commerce/types/ShippingData.d.ts +5 -0
  13. package/dist/platforms/vtex/clients/index.d.ts +6 -0
  14. package/dist/platforms/vtex/clients/search/types/ProductSearchResult.d.ts +1 -0
  15. package/dist/platforms/vtex/index.d.ts +7 -0
  16. package/dist/platforms/vtex/resolvers/query.d.ts +11 -4
  17. package/package.json +2 -2
  18. package/src/__generated__/schema.ts +112 -21
  19. package/src/platforms/vtex/clients/commerce/index.ts +105 -40
  20. package/src/platforms/vtex/clients/commerce/types/OrderForm.ts +9 -1
  21. package/src/platforms/vtex/clients/commerce/types/Region.ts +2 -2
  22. package/src/platforms/vtex/clients/commerce/types/ShippingData.ts +6 -0
  23. package/src/platforms/vtex/clients/search/types/ProductSearchResult.ts +1 -0
  24. package/src/platforms/vtex/resolvers/query.ts +76 -23
  25. package/src/platforms/vtex/resolvers/validateCart.ts +54 -27
  26. package/src/typeDefs/query.graphql +92 -0
  27. package/src/typeDefs/session.graphql +40 -6
  28. package/src/typeDefs/shipping.graphql +27 -0
@@ -105,6 +105,19 @@ export declare type Address = {
105
105
  /** Address street */
106
106
  street?: Maybe<Scalars['String']>;
107
107
  };
108
+ export declare type AvailableDeliveryWindows = {
109
+ __typename?: 'AvailableDeliveryWindows';
110
+ /** Available delivery window end date in UTC */
111
+ endDateUtc?: Maybe<Scalars['String']>;
112
+ /** Available delivery window list price */
113
+ listPrice?: Maybe<Scalars['Int']>;
114
+ /** Available delivery window price */
115
+ price?: Maybe<Scalars['Int']>;
116
+ /** Available delivery window start date in UTC */
117
+ startDateUtc?: Maybe<Scalars['String']>;
118
+ /** Available delivery window tax */
119
+ tax?: Maybe<Scalars['Int']>;
120
+ };
108
121
  export declare type DeliveryIds = {
109
122
  __typename?: 'DeliveryIds';
110
123
  /** DeliveryIds courier id */
@@ -118,6 +131,12 @@ export declare type DeliveryIds = {
118
131
  /** DeliveryIds warehouse id */
119
132
  warehouseId?: Maybe<Scalars['String']>;
120
133
  };
134
+ export declare type IGeoCoordinates = {
135
+ /** The latitude of the geographic coordinates. */
136
+ latitude: Scalars['Float'];
137
+ /** The longitude of the geographic coordinates. */
138
+ longitude: Scalars['Float'];
139
+ };
121
140
  /** Person data input to the newsletter. */
122
141
  export declare type IPersonNewsletter = {
123
142
  /** Person's email. */
@@ -146,10 +165,19 @@ export declare type IStoreCurrency = {
146
165
  symbol: Scalars['String'];
147
166
  };
148
167
  export declare type IStoreDeliveryMode = {
149
- /** The latitude of the geographic coordinates. */
168
+ /** The delivery channel information of the session. */
150
169
  deliveryChannel: Scalars['String'];
151
- /** The longitude of the geographic coordinates. */
170
+ /** The delivery method information of the session. */
152
171
  deliveryMethod: Scalars['String'];
172
+ /** The delivery window information of the session. */
173
+ deliveryWindow?: Maybe<IStoreDeliveryWindow>;
174
+ };
175
+ /** Delivery window information. */
176
+ export declare type IStoreDeliveryWindow = {
177
+ /** The delivery window end date information. */
178
+ endDate: Scalars['String'];
179
+ /** The delivery window start date information. */
180
+ startDate: Scalars['String'];
153
181
  };
154
182
  export declare type IStoreGeoCoordinates = {
155
183
  /** The latitude of the geographic coordinates. */
@@ -389,8 +417,12 @@ export declare type Query = {
389
417
  collection: StoreCollection;
390
418
  /** Returns the details of a product based on the specified locator. */
391
419
  product: StoreProduct;
420
+ /** Returns if there's a redirect for a search. */
421
+ redirect?: Maybe<StoreRedirect>;
392
422
  /** Returns the result of a product, facet, or suggestion search. */
393
423
  search: StoreSearchResult;
424
+ /** Returns a list of sellers available for a specific localization. */
425
+ sellers?: Maybe<SellersData>;
394
426
  /** Returns information about shipping simulation. */
395
427
  shipping?: Maybe<ShippingData>;
396
428
  };
@@ -408,6 +440,10 @@ export declare type QueryCollectionArgs = {
408
440
  export declare type QueryProductArgs = {
409
441
  locator: Array<IStoreSelectedFacet>;
410
442
  };
443
+ export declare type QueryRedirectArgs = {
444
+ selectedFacets?: Maybe<Array<IStoreSelectedFacet>>;
445
+ term?: Maybe<Scalars['String']>;
446
+ };
411
447
  export declare type QuerySearchArgs = {
412
448
  after?: Maybe<Scalars['String']>;
413
449
  first: Scalars['Int'];
@@ -415,6 +451,12 @@ export declare type QuerySearchArgs = {
415
451
  sort?: Maybe<StoreSort>;
416
452
  term?: Maybe<Scalars['String']>;
417
453
  };
454
+ export declare type QuerySellersArgs = {
455
+ country: Scalars['String'];
456
+ geoCoordinates?: Maybe<IGeoCoordinates>;
457
+ postalCode?: Maybe<Scalars['String']>;
458
+ salesChannel?: Maybe<Scalars['String']>;
459
+ };
418
460
  export declare type QueryShippingArgs = {
419
461
  country: Scalars['String'];
420
462
  items: Array<IShippingItem>;
@@ -428,6 +470,24 @@ export declare type SearchMetadata = {
428
470
  /** Logical operator used to run the search. */
429
471
  logicalOperator: Scalars['String'];
430
472
  };
473
+ /** Information of sellers. */
474
+ export declare type SellerInfo = {
475
+ __typename?: 'SellerInfo';
476
+ /** Identification of the seller */
477
+ id?: Maybe<Scalars['String']>;
478
+ /** Logo of the seller */
479
+ logo?: Maybe<Scalars['String']>;
480
+ /** Name of the seller */
481
+ name?: Maybe<Scalars['String']>;
482
+ };
483
+ /** Regionalization with sellers information. */
484
+ export declare type SellersData = {
485
+ __typename?: 'SellersData';
486
+ /** Identification of region. */
487
+ id?: Maybe<Scalars['String']>;
488
+ /** List of sellers. */
489
+ sellers?: Maybe<Array<Maybe<SellerInfo>>>;
490
+ };
431
491
  /** Shipping Simulation information. */
432
492
  export declare type ShippingData = {
433
493
  __typename?: 'ShippingData';
@@ -442,6 +502,8 @@ export declare type ShippingData = {
442
502
  };
443
503
  export declare type ShippingSla = {
444
504
  __typename?: 'ShippingSLA';
505
+ /** ShippingSLA available delivery windows. */
506
+ availableDeliveryWindows?: Maybe<Array<Maybe<AvailableDeliveryWindows>>>;
445
507
  /** ShippingSLA carrier. */
446
508
  carrier?: Maybe<Scalars['String']>;
447
509
  /** ShippingSLA delivery channel. */
@@ -632,10 +694,20 @@ export declare type StoreCurrency = {
632
694
  /** Delivery mode information. */
633
695
  export declare type StoreDeliveryMode = {
634
696
  __typename?: 'StoreDeliveryMode';
635
- /** The latitude of the geographic coordinates. */
697
+ /** The delivery channel information of the session. */
636
698
  deliveryChannel: Scalars['String'];
637
- /** The longitude of the geographic coordinates. */
699
+ /** The delivery method information of the session. */
638
700
  deliveryMethod: Scalars['String'];
701
+ /** The delivery window information of the session. */
702
+ deliveryWindow?: Maybe<StoreDeliveryWindow>;
703
+ };
704
+ /** Delivery window information. */
705
+ export declare type StoreDeliveryWindow = {
706
+ __typename?: 'StoreDeliveryWindow';
707
+ /** The delivery window end date information. */
708
+ endDate: Scalars['String'];
709
+ /** The delivery window start date information. */
710
+ startDate: Scalars['String'];
639
711
  };
640
712
  export declare type StoreFacet = StoreFacetBoolean | StoreFacetRange;
641
713
  /** Search facet boolean information. */
@@ -859,6 +931,15 @@ export declare type StorePropertyValue = {
859
931
  /** Specifies the nature of the value */
860
932
  valueReference: Scalars['String'];
861
933
  };
934
+ /**
935
+ * Redirect informations, including url returned by the query.
936
+ * https://schema.org/Thing
937
+ */
938
+ export declare type StoreRedirect = {
939
+ __typename?: 'StoreRedirect';
940
+ /** URL to redirect */
941
+ url?: Maybe<Scalars['String']>;
942
+ };
862
943
  /** Information of a given review. */
863
944
  export declare type StoreReview = {
864
945
  __typename?: 'StoreReview';