@soma-vertical-web/multi-lib 0.0.29 → 0.0.30
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/data/api/catalog/index.d.ts +3 -0
- package/data/api/catalog/kit/index.d.ts +11 -0
- package/data/api/catalog/product/info/index.d.ts +10 -0
- package/data/api/catalog/product/similars/index.d.ts +11 -22
- package/data/api/checkout/address/index.d.ts +1 -1
- package/data/api/checkout/order-form/attachments/index.d.ts +1 -1
- package/data/api/checkout/order-form/attachments/marketing-data/index.d.ts +1 -1
- package/data/api/checkout/order-form/attachments/open-text-field/index.d.ts +1 -1
- package/data/api/checkout/order-form/coupon/index.d.ts +1 -1
- package/data/api/checkout/order-form/custom-data/index.d.ts +1 -1
- package/data/api/checkout/order-form/items/remove-all/index.d.ts +1 -1
- package/data/api/checkout/order-form/items/update/index.d.ts +1 -1
- package/data/api/checkout/order-form/messages/remove-all/index.d.ts +1 -1
- package/data/api/checkout/order-form/offerings/index.d.ts +1 -1
- package/data/api/checkout/order-form/orderform/index.d.ts +1 -1
- package/data/api/checkout/order-form/profile/index.d.ts +1 -1
- package/data/api/checkout/order-form/seller-code/index.d.ts +1 -1
- package/data/api/checkout/order-form/shipping/index.d.ts +1 -1
- package/data/api/checkout/order-form/shipping/update/index.d.ts +1 -1
- package/data/api/checkout/region/index.d.ts +1 -1
- package/data/api/checkout/simulation/index.d.ts +1 -1
- package/data/api/fetchVtex.d.ts +2 -1
- package/data/helpers/catalog/index.d.ts +38 -0
- package/index.js +12 -12
- package/index.mjs +1954 -1949
- package/index2.js +1 -1
- package/index2.mjs +504 -338
- package/package.json +1 -1
- package/server.d.ts +11 -155
- package/types/data/api/catalog/kit/index.d.ts +0 -0
- package/types/data/api/catalog/portal/index.d.ts +26 -0
- package/types/data/api/catalog/product/index.d.ts +50 -0
- package/types/data/api/index.d.ts +3 -6
- package/types/layout/team-components/ProductCard/Selectors/index.d.ts +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FetchFunctionsProps } from '../../../../types/data/api';
|
|
2
|
+
|
|
3
|
+
import * as yup from 'yup';
|
|
4
|
+
declare const schema: yup.ObjectSchema<{
|
|
5
|
+
skuId: string | undefined;
|
|
6
|
+
}, yup.AnyObject, {
|
|
7
|
+
skuId: undefined;
|
|
8
|
+
}, "">;
|
|
9
|
+
type SchemaType = yup.InferType<typeof schema>;
|
|
10
|
+
export declare function getCatalogKitProducts({ apiUrl, body, fetchOptions }: FetchFunctionsProps<SchemaType>): Promise<any>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FetchFunctionsProps } from '../../../../../types/data/api';
|
|
2
|
+
import * as yup from 'yup';
|
|
3
|
+
declare const schema: yup.ObjectSchema<{
|
|
4
|
+
ids: string[];
|
|
5
|
+
}, yup.AnyObject, {
|
|
6
|
+
ids: "";
|
|
7
|
+
}, "">;
|
|
8
|
+
type SchemaType = yup.InferType<typeof schema>;
|
|
9
|
+
export declare function getCatalogProducts({ apiUrl, body, fetchOptions }: FetchFunctionsProps<SchemaType>): Promise<any>;
|
|
10
|
+
export {};
|
|
@@ -1,22 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
}>;
|
|
14
|
-
images: Array<{
|
|
15
|
-
imageLabel: string;
|
|
16
|
-
imageUrl: string;
|
|
17
|
-
imageText: string;
|
|
18
|
-
}>;
|
|
19
|
-
}>;
|
|
20
|
-
productId: string;
|
|
21
|
-
linkText: string;
|
|
22
|
-
}
|
|
1
|
+
import { FetchFunctionsProps } from '../../../../../types/data/api';
|
|
2
|
+
|
|
3
|
+
import * as yup from 'yup';
|
|
4
|
+
declare const schema: yup.ObjectSchema<{
|
|
5
|
+
productId: number;
|
|
6
|
+
}, yup.AnyObject, {
|
|
7
|
+
productId: undefined;
|
|
8
|
+
}, "">;
|
|
9
|
+
type SchemaType = yup.InferType<typeof schema>;
|
|
10
|
+
export declare function getCatalogSimilars({ apiUrl, body, fetchOptions }: FetchFunctionsProps<SchemaType>): Promise<any>;
|
|
11
|
+
export {};
|
|
@@ -17,5 +17,5 @@ type SchemaType = yup.InferType<typeof schemaAddress>;
|
|
|
17
17
|
* @returns Address information corresponding to the provided postal code and country.
|
|
18
18
|
* This request is useful for implementing auto-complete functionality when a customer needs to fill in an address.
|
|
19
19
|
*/
|
|
20
|
-
export declare function postOrderformAddress({ apiUrl, body, fetchOptions }: FetchFunctionsProps<SchemaType>): Promise<
|
|
20
|
+
export declare function postOrderformAddress({ apiUrl, body, fetchOptions }: FetchFunctionsProps<SchemaType>): Promise<any>;
|
|
21
21
|
export {};
|
|
@@ -13,5 +13,5 @@ type SchemaType = yup.InferType<typeof schemaAttachments>;
|
|
|
13
13
|
/**
|
|
14
14
|
* Attach marketing and open text field data to a shopping cart.
|
|
15
15
|
*/
|
|
16
|
-
export declare function postOrderFormAttachOrderFormData({ apiUrl, body, fetchOptions }: FetchFunctionsProps<SchemaType>): Promise<
|
|
16
|
+
export declare function postOrderFormAttachOrderFormData({ apiUrl, body, fetchOptions }: FetchFunctionsProps<SchemaType>): Promise<any>;
|
|
17
17
|
export {};
|
|
@@ -17,5 +17,5 @@ type SchemaType = yup.InferType<typeof schemaMarketingData>;
|
|
|
17
17
|
* @returns A list of sellers that cater to the specified region or address.
|
|
18
18
|
* This endpoint provides flexibility in accessing seller information based on region or address, allowing you to choose between path parameters or query parameters.
|
|
19
19
|
*/
|
|
20
|
-
export declare function postOrderFormAttachmentsMarketingData({ apiUrl, body, fetchOptions }: FetchFunctionsProps<SchemaType>): Promise<
|
|
20
|
+
export declare function postOrderFormAttachmentsMarketingData({ apiUrl, body, fetchOptions }: FetchFunctionsProps<SchemaType>): Promise<any>;
|
|
21
21
|
export {};
|
|
@@ -14,5 +14,5 @@ type SchemaType = yup.InferType<typeof schemaOpenTextField>;
|
|
|
14
14
|
* Use this request to include open text field information to a given shopping cart.
|
|
15
15
|
* https://developers.vtex.com/docs/api-reference/checkout-api#post-/api/checkout/pub/orderForm/-orderFormId-/attachments/openTextField
|
|
16
16
|
*/
|
|
17
|
-
export declare function postOrderFormAttachmentsOpenTextField({ apiUrl, body, fetchOptions, }: FetchFunctionsProps<SchemaType>): Promise<
|
|
17
|
+
export declare function postOrderFormAttachmentsOpenTextField({ apiUrl, body, fetchOptions, }: FetchFunctionsProps<SchemaType>): Promise<any>;
|
|
18
18
|
export {};
|
|
@@ -11,5 +11,5 @@ type SchemaType = yup.InferType<typeof schemaCoupon>;
|
|
|
11
11
|
/**
|
|
12
12
|
* Add a coupon to a given shopping cart.
|
|
13
13
|
*/
|
|
14
|
-
export declare function postOrderFormAddCoupon({ apiUrl, body, fetchOptions, }: FetchFunctionsProps<SchemaType>): Promise<
|
|
14
|
+
export declare function postOrderFormAddCoupon({ apiUrl, body, fetchOptions, }: FetchFunctionsProps<SchemaType>): Promise<any>;
|
|
15
15
|
export {};
|
|
@@ -13,5 +13,5 @@ type SchemaType = yup.InferType<typeof schemaCustomData>;
|
|
|
13
13
|
/**
|
|
14
14
|
* Update custom data for an order form app.
|
|
15
15
|
*/
|
|
16
|
-
export declare function putOrderFormCustomData({ apiUrl, body, fetchOptions, }: FetchFunctionsProps<SchemaType>): Promise<
|
|
16
|
+
export declare function putOrderFormCustomData({ apiUrl, body, fetchOptions, }: FetchFunctionsProps<SchemaType>): Promise<any>;
|
|
17
17
|
export {};
|
|
@@ -9,5 +9,5 @@ type SchemaType = yup.InferType<typeof schemaItems>;
|
|
|
9
9
|
/**
|
|
10
10
|
* Remove all items from the shopping cart.
|
|
11
11
|
*/
|
|
12
|
-
export declare function postOrderFormRemoveAllItems({ apiUrl, body, fetchOptions, }: FetchFunctionsProps<SchemaType>): Promise<
|
|
12
|
+
export declare function postOrderFormRemoveAllItems({ apiUrl, body, fetchOptions, }: FetchFunctionsProps<SchemaType>): Promise<any>;
|
|
13
13
|
export {};
|
|
@@ -39,5 +39,5 @@ type SchemaType = yup.InferType<typeof schemaItems>;
|
|
|
39
39
|
/**
|
|
40
40
|
* Update items in the shopping cart.
|
|
41
41
|
*/
|
|
42
|
-
export declare function postOrderFormUpdateItems({ apiUrl, body, fetchOptions, }: FetchFunctionsProps<SchemaType>): Promise<
|
|
42
|
+
export declare function postOrderFormUpdateItems({ apiUrl, body, fetchOptions, }: FetchFunctionsProps<SchemaType>): Promise<any>;
|
|
43
43
|
export {};
|
|
@@ -9,5 +9,5 @@ type SchemaType = yup.InferType<typeof schemaMessage>;
|
|
|
9
9
|
/**
|
|
10
10
|
* Remove all messages from the orderForm messages field.
|
|
11
11
|
*/
|
|
12
|
-
export declare function postOrderFormClearMessages({ apiUrl, body, fetchOptions, }: FetchFunctionsProps<SchemaType>): Promise<
|
|
12
|
+
export declare function postOrderFormClearMessages({ apiUrl, body, fetchOptions, }: FetchFunctionsProps<SchemaType>): Promise<any>;
|
|
13
13
|
export {};
|
|
@@ -15,5 +15,5 @@ type SchemaType = yup.InferType<typeof schemaOffering>;
|
|
|
15
15
|
/**
|
|
16
16
|
* Add or remove a service (offering) to a specific item in the shopping cart.
|
|
17
17
|
*/
|
|
18
|
-
export declare function updateOrderFormOffering({ apiUrl, body, fetchOptions }: FetchFunctionsProps<SchemaType>): Promise<
|
|
18
|
+
export declare function updateOrderFormOffering({ apiUrl, body, fetchOptions }: FetchFunctionsProps<SchemaType>): Promise<any>;
|
|
19
19
|
export {};
|
|
@@ -10,5 +10,5 @@ type SchemaType = yup.InferType<typeof schemaOrderForm>;
|
|
|
10
10
|
* Retrieves all information associated with a given shopping cart.
|
|
11
11
|
* https://developers.vtex.com/docs/api-reference/checkout-api#get-/api/checkout/pub/orderForm/-orderFormId-
|
|
12
12
|
*/
|
|
13
|
-
export declare function getOrderForm({ apiUrl, body, fetchOptions, extraData, }: FetchFunctionsProps<SchemaType>): Promise<
|
|
13
|
+
export declare function getOrderForm({ apiUrl, body, fetchOptions, extraData, }: FetchFunctionsProps<SchemaType>): Promise<any>;
|
|
14
14
|
export {};
|
|
@@ -21,5 +21,5 @@ type SchemaType = yup.InferType<typeof schemaProfile>;
|
|
|
21
21
|
/**
|
|
22
22
|
* Attach client profile data to a shopping cart.
|
|
23
23
|
*/
|
|
24
|
-
export declare function postOrderFormAttachClientProfileData({ apiUrl, body, fetchOptions, }: FetchFunctionsProps<SchemaType>): Promise<
|
|
24
|
+
export declare function postOrderFormAttachClientProfileData({ apiUrl, body, fetchOptions, }: FetchFunctionsProps<SchemaType>): Promise<any>;
|
|
25
25
|
export {};
|
|
@@ -9,5 +9,5 @@ type SchemaType = yup.InferType<typeof schemaSellerCode>;
|
|
|
9
9
|
/**
|
|
10
10
|
* Fetch seller code data from VTEX data entities.
|
|
11
11
|
*/
|
|
12
|
-
export declare function getMasterDataSellerCode({ apiUrl, body, fetchOptions, }: FetchFunctionsProps<SchemaType>): Promise<
|
|
12
|
+
export declare function getMasterDataSellerCode({ apiUrl, body, fetchOptions, }: FetchFunctionsProps<SchemaType>): Promise<any>;
|
|
13
13
|
export {};
|
|
@@ -13,5 +13,5 @@ type SchemaType = yup.InferType<typeof schemaShipping>;
|
|
|
13
13
|
/**
|
|
14
14
|
* Attach shipping data to a shopping cart.
|
|
15
15
|
*/
|
|
16
|
-
export declare function postOrderFormAttachShippingData({ apiUrl, body, fetchOptions, }: FetchFunctionsProps<SchemaType>): Promise<
|
|
16
|
+
export declare function postOrderFormAttachShippingData({ apiUrl, body, fetchOptions, }: FetchFunctionsProps<SchemaType>): Promise<any>;
|
|
17
17
|
export {};
|
|
@@ -32,5 +32,5 @@ type SchemaType = yup.InferType<typeof schemaShipping>;
|
|
|
32
32
|
/**
|
|
33
33
|
* Attach shipping data with options and addresses to a shopping cart.
|
|
34
34
|
*/
|
|
35
|
-
export declare function postOrderFormUpdateShippingData({ apiUrl, body, fetchOptions }: FetchFunctionsProps<SchemaType>): Promise<
|
|
35
|
+
export declare function postOrderFormUpdateShippingData({ apiUrl, body, fetchOptions }: FetchFunctionsProps<SchemaType>): Promise<any>;
|
|
36
36
|
export {};
|
|
@@ -29,5 +29,5 @@ type SchemaType = yup.InferType<typeof schemaRegion>;
|
|
|
29
29
|
* @returns A list of sellers that cater to the specified region or address.
|
|
30
30
|
* This endpoint provides flexibility in accessing seller information based on region or address, allowing you to choose between path parameters or query parameters.
|
|
31
31
|
*/
|
|
32
|
-
export declare function postOrderFormRegion({ apiUrl, body, fetchOptions }: FetchFunctionsProps<SchemaType>): Promise<
|
|
32
|
+
export declare function postOrderFormRegion({ apiUrl, body, fetchOptions }: FetchFunctionsProps<SchemaType>): Promise<any>;
|
|
33
33
|
export {};
|
|
@@ -26,5 +26,5 @@ type SchemaType = yup.InferType<typeof schemaSimulation>;
|
|
|
26
26
|
* @returns All information about the cart, including selling price of each item, pricing and promotion data, payment and logistics info.
|
|
27
27
|
* This request is useful whenever you need to know the availability of fulfilling an order for a specific cart setting, since the API response will let you know the updated price, inventory, and shipping data.
|
|
28
28
|
*/
|
|
29
|
-
export declare function postOrderFormFreightSimulation({ apiUrl, body, fetchOptions }: FetchFunctionsProps<SchemaType>): Promise<
|
|
29
|
+
export declare function postOrderFormFreightSimulation({ apiUrl, body, fetchOptions }: FetchFunctionsProps<SchemaType>): Promise<any>;
|
|
30
30
|
export {};
|
package/data/api/fetchVtex.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { FetchOptions } from '../../types/data/api';
|
|
2
2
|
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const fetchVtexOrderForm: (url: string, options?: FetchOptions) => Promise<Record<string, any>>;
|
|
4
|
+
export declare const fetchVtex: (url: string, options?: FetchOptions) => Promise<any>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { CreateEmptySeoCategoryProps, CreateSeoCategoryProps, FindCategoryProps, SimilarsResponseData, SimilarType } from '../../../types/data/api/catalog/product';
|
|
2
|
+
import { CollectionPageType } from '../../../types/data/api/catalog/portal';
|
|
3
|
+
import { ProductType_APICatalog } from '../../../types/global/product';
|
|
4
|
+
import { TEXTURE_IMAGEType } from '../../../types/constants';
|
|
5
|
+
|
|
6
|
+
export declare const createEmptySeoCategory: ({ canonical, seo, slug }: CreateEmptySeoCategoryProps) => {
|
|
7
|
+
id: number;
|
|
8
|
+
Title: string;
|
|
9
|
+
MetaTagDescription: string;
|
|
10
|
+
name: string;
|
|
11
|
+
hasChildren: boolean;
|
|
12
|
+
url: string;
|
|
13
|
+
children: never[];
|
|
14
|
+
};
|
|
15
|
+
export declare const createSeoCategory: ({ canonical, category, previousImages, seo }: CreateSeoCategoryProps) => {
|
|
16
|
+
category: string;
|
|
17
|
+
title: string;
|
|
18
|
+
description: string;
|
|
19
|
+
alternates: {
|
|
20
|
+
canonical: string;
|
|
21
|
+
};
|
|
22
|
+
openGraph: {
|
|
23
|
+
type: string;
|
|
24
|
+
title: string;
|
|
25
|
+
description: string;
|
|
26
|
+
images: any[];
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export declare const findCategory: ({ items, parent, apiUrl, find }: FindCategoryProps) => import('../../../types/data/api/catalog/product').CategoryTree | undefined;
|
|
30
|
+
export declare const notFindCategoryError: (error: Error) => void;
|
|
31
|
+
export declare const isCollectionPageType: (x: any) => x is CollectionPageType;
|
|
32
|
+
export declare const responseAdapter: (data: ProductType_APICatalog) => {
|
|
33
|
+
collection: string[];
|
|
34
|
+
categoryId: string;
|
|
35
|
+
current_collection: string[];
|
|
36
|
+
items: import('../../../types/global/product').ItemType_APICatalog[];
|
|
37
|
+
};
|
|
38
|
+
export declare const formattedSimilars: (data: SimilarsResponseData[], filterTexture: TEXTURE_IMAGEType) => SimilarType[];
|