@faststore/api 2.0.157-alpha.0 → 2.0.162-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.
- package/dist/__generated__/schema.d.ts +86 -2
- package/dist/api.cjs.development.js +113 -21
- package/dist/api.cjs.development.js.map +1 -1
- package/dist/api.cjs.production.min.js +1 -1
- package/dist/api.cjs.production.min.js.map +1 -1
- package/dist/api.esm.js +113 -21
- package/dist/api.esm.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/platforms/vtex/clients/commerce/index.d.ts +10 -2
- package/dist/platforms/vtex/clients/commerce/types/OrderForm.d.ts +8 -1
- package/dist/platforms/vtex/clients/commerce/types/Region.d.ts +2 -2
- package/dist/platforms/vtex/clients/commerce/types/ShippingData.d.ts +9 -0
- package/dist/platforms/vtex/clients/index.d.ts +9 -1
- package/dist/platforms/vtex/index.d.ts +4 -0
- package/dist/platforms/vtex/resolvers/query.d.ts +5 -1
- package/package.json +2 -2
- package/src/__generated__/schema.ts +112 -19
- package/src/platforms/vtex/clients/commerce/index.ts +108 -36
- package/src/platforms/vtex/clients/commerce/types/OrderForm.ts +9 -1
- package/src/platforms/vtex/clients/commerce/types/Region.ts +2 -2
- package/src/platforms/vtex/clients/commerce/types/ShippingData.ts +11 -0
- package/src/platforms/vtex/resolvers/query.ts +22 -3
- package/src/platforms/vtex/resolvers/validateCart.ts +56 -26
- package/src/typeDefs/query.graphql +66 -0
- package/src/typeDefs/session.graphql +71 -2
- 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. */
|
|
@@ -145,6 +164,21 @@ export declare type IStoreCurrency = {
|
|
|
145
164
|
/** Currency symbol (e.g: $). */
|
|
146
165
|
symbol: Scalars['String'];
|
|
147
166
|
};
|
|
167
|
+
export declare type IStoreDeliveryMode = {
|
|
168
|
+
/** The delivery channel information of the session. */
|
|
169
|
+
deliveryChannel: Scalars['String'];
|
|
170
|
+
/** The delivery method information of the session. */
|
|
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'];
|
|
181
|
+
};
|
|
148
182
|
export declare type IStoreGeoCoordinates = {
|
|
149
183
|
/** The latitude of the geographic coordinates. */
|
|
150
184
|
latitude: Scalars['Float'];
|
|
@@ -226,7 +260,7 @@ export declare type IStoreSelectedFacet = {
|
|
|
226
260
|
};
|
|
227
261
|
/** Session input. */
|
|
228
262
|
export declare type IStoreSession = {
|
|
229
|
-
/** Session input address
|
|
263
|
+
/** Session input address type. */
|
|
230
264
|
addressType?: Maybe<Scalars['String']>;
|
|
231
265
|
/** Session input channel. */
|
|
232
266
|
channel?: Maybe<Scalars['String']>;
|
|
@@ -234,6 +268,8 @@ export declare type IStoreSession = {
|
|
|
234
268
|
country: Scalars['String'];
|
|
235
269
|
/** Session input currency. */
|
|
236
270
|
currency: IStoreCurrency;
|
|
271
|
+
/** Session input delivery mode. */
|
|
272
|
+
deliveryMode?: Maybe<IStoreDeliveryMode>;
|
|
237
273
|
/** Session input geoCoordinates. */
|
|
238
274
|
geoCoordinates?: Maybe<IStoreGeoCoordinates>;
|
|
239
275
|
/** Session input locale. */
|
|
@@ -383,6 +419,8 @@ export declare type Query = {
|
|
|
383
419
|
product: StoreProduct;
|
|
384
420
|
/** Returns the result of a product, facet, or suggestion search. */
|
|
385
421
|
search: StoreSearchResult;
|
|
422
|
+
/** Returns a list of sellers available for a specific localization. */
|
|
423
|
+
sellers?: Maybe<SellersData>;
|
|
386
424
|
/** Returns information about shipping simulation. */
|
|
387
425
|
shipping?: Maybe<ShippingData>;
|
|
388
426
|
};
|
|
@@ -407,6 +445,12 @@ export declare type QuerySearchArgs = {
|
|
|
407
445
|
sort?: Maybe<StoreSort>;
|
|
408
446
|
term?: Maybe<Scalars['String']>;
|
|
409
447
|
};
|
|
448
|
+
export declare type QuerySellersArgs = {
|
|
449
|
+
country: Scalars['String'];
|
|
450
|
+
geoCoordinates?: Maybe<IGeoCoordinates>;
|
|
451
|
+
postalCode?: Maybe<Scalars['String']>;
|
|
452
|
+
salesChannel?: Maybe<Scalars['String']>;
|
|
453
|
+
};
|
|
410
454
|
export declare type QueryShippingArgs = {
|
|
411
455
|
country: Scalars['String'];
|
|
412
456
|
items: Array<IShippingItem>;
|
|
@@ -420,6 +464,24 @@ export declare type SearchMetadata = {
|
|
|
420
464
|
/** Logical operator used to run the search. */
|
|
421
465
|
logicalOperator: Scalars['String'];
|
|
422
466
|
};
|
|
467
|
+
/** Information of sellers. */
|
|
468
|
+
export declare type SellerInfo = {
|
|
469
|
+
__typename?: 'SellerInfo';
|
|
470
|
+
/** Identification of the seller */
|
|
471
|
+
id?: Maybe<Scalars['String']>;
|
|
472
|
+
/** Logo of the seller */
|
|
473
|
+
logo?: Maybe<Scalars['String']>;
|
|
474
|
+
/** Name of the seller */
|
|
475
|
+
name?: Maybe<Scalars['String']>;
|
|
476
|
+
};
|
|
477
|
+
/** Regionalization with sellers information. */
|
|
478
|
+
export declare type SellersData = {
|
|
479
|
+
__typename?: 'SellersData';
|
|
480
|
+
/** Identification of region. */
|
|
481
|
+
id?: Maybe<Scalars['String']>;
|
|
482
|
+
/** List of sellers. */
|
|
483
|
+
sellers?: Maybe<Array<Maybe<SellerInfo>>>;
|
|
484
|
+
};
|
|
423
485
|
/** Shipping Simulation information. */
|
|
424
486
|
export declare type ShippingData = {
|
|
425
487
|
__typename?: 'ShippingData';
|
|
@@ -434,6 +496,8 @@ export declare type ShippingData = {
|
|
|
434
496
|
};
|
|
435
497
|
export declare type ShippingSla = {
|
|
436
498
|
__typename?: 'ShippingSLA';
|
|
499
|
+
/** ShippingSLA available delivery windows. */
|
|
500
|
+
availableDeliveryWindows?: Maybe<Array<Maybe<AvailableDeliveryWindows>>>;
|
|
437
501
|
/** ShippingSLA carrier. */
|
|
438
502
|
carrier?: Maybe<Scalars['String']>;
|
|
439
503
|
/** ShippingSLA delivery channel. */
|
|
@@ -621,6 +685,24 @@ export declare type StoreCurrency = {
|
|
|
621
685
|
/** Currency symbol (e.g: $). */
|
|
622
686
|
symbol: Scalars['String'];
|
|
623
687
|
};
|
|
688
|
+
/** Delivery mode information. */
|
|
689
|
+
export declare type StoreDeliveryMode = {
|
|
690
|
+
__typename?: 'StoreDeliveryMode';
|
|
691
|
+
/** The delivery channel information of the session. */
|
|
692
|
+
deliveryChannel: Scalars['String'];
|
|
693
|
+
/** The delivery method information of the session. */
|
|
694
|
+
deliveryMethod: Scalars['String'];
|
|
695
|
+
/** The delivery window information of the session. */
|
|
696
|
+
deliveryWindow?: Maybe<StoreDeliveryWindow>;
|
|
697
|
+
};
|
|
698
|
+
/** Delivery window information. */
|
|
699
|
+
export declare type StoreDeliveryWindow = {
|
|
700
|
+
__typename?: 'StoreDeliveryWindow';
|
|
701
|
+
/** The delivery window end date information. */
|
|
702
|
+
endDate: Scalars['String'];
|
|
703
|
+
/** The delivery window start date information. */
|
|
704
|
+
startDate: Scalars['String'];
|
|
705
|
+
};
|
|
624
706
|
export declare type StoreFacet = StoreFacetBoolean | StoreFacetRange;
|
|
625
707
|
/** Search facet boolean information. */
|
|
626
708
|
export declare type StoreFacetBoolean = {
|
|
@@ -886,7 +968,7 @@ export declare type StoreSeo = {
|
|
|
886
968
|
/** Session information. */
|
|
887
969
|
export declare type StoreSession = {
|
|
888
970
|
__typename?: 'StoreSession';
|
|
889
|
-
/** Session address
|
|
971
|
+
/** Session address type. */
|
|
890
972
|
addressType?: Maybe<Scalars['String']>;
|
|
891
973
|
/** Session channel. */
|
|
892
974
|
channel?: Maybe<Scalars['String']>;
|
|
@@ -894,6 +976,8 @@ export declare type StoreSession = {
|
|
|
894
976
|
country: Scalars['String'];
|
|
895
977
|
/** Session currency. */
|
|
896
978
|
currency: StoreCurrency;
|
|
979
|
+
/** Session delivery mode. */
|
|
980
|
+
deliveryMode?: Maybe<StoreDeliveryMode>;
|
|
897
981
|
/** Session input geoCoordinates. */
|
|
898
982
|
geoCoordinates?: Maybe<StoreGeoCoordinates>;
|
|
899
983
|
/** Session locale. */
|