@unchainedshop/api 3.1.11 → 3.1.13
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/lib/errors.d.ts +1 -0
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -0
- package/lib/errors.js.map +1 -1
- package/lib/express/chatRouter.d.ts +3 -0
- package/lib/express/chatRouter.d.ts.map +1 -0
- package/lib/express/chatRouter.js +86 -0
- package/lib/express/chatRouter.js.map +1 -0
- package/lib/express/createApolloMiddleware.d.ts +4 -0
- package/lib/express/createApolloMiddleware.d.ts.map +1 -0
- package/lib/express/createApolloMiddleware.js +36 -0
- package/lib/express/createApolloMiddleware.js.map +1 -0
- package/lib/express/createMCPMiddleware.d.ts +4 -0
- package/lib/express/createMCPMiddleware.d.ts.map +1 -0
- package/lib/express/createMCPMiddleware.js +68 -0
- package/lib/express/createMCPMiddleware.js.map +1 -0
- package/lib/express/createSingleSignOnMiddleware.d.ts +5 -0
- package/lib/express/createSingleSignOnMiddleware.d.ts.map +1 -0
- package/lib/express/createSingleSignOnMiddleware.js +71 -0
- package/lib/express/createSingleSignOnMiddleware.js.map +1 -0
- package/lib/hashPassword.d.ts +2 -0
- package/lib/hashPassword.d.ts.map +1 -0
- package/lib/hashPassword.js +5 -0
- package/lib/hashPassword.js.map +1 -0
- package/lib/loaders/assortmentLinkLoader.d.ts +12 -0
- package/lib/loaders/assortmentLinkLoader.d.ts.map +1 -0
- package/lib/loaders/assortmentLinkLoader.js +23 -0
- package/lib/loaders/assortmentLinkLoader.js.map +1 -0
- package/lib/loaders/assortmentLinksLoader.d.ts +14 -0
- package/lib/loaders/assortmentLinksLoader.d.ts.map +1 -0
- package/lib/loaders/assortmentLinksLoader.js +38 -0
- package/lib/loaders/assortmentLinksLoader.js.map +1 -0
- package/lib/loaders/assortmentLoader.d.ts +10 -0
- package/lib/loaders/assortmentLoader.d.ts.map +1 -0
- package/lib/loaders/assortmentLoader.js +15 -0
- package/lib/loaders/assortmentLoader.js.map +1 -0
- package/lib/loaders/assortmentMediaTextLoader.d.ts +12 -0
- package/lib/loaders/assortmentMediaTextLoader.d.ts.map +1 -0
- package/lib/loaders/assortmentMediaTextLoader.js +15 -0
- package/lib/loaders/assortmentMediaTextLoader.js.map +1 -0
- package/lib/loaders/assortmentMediasLoader.d.ts +10 -0
- package/lib/loaders/assortmentMediasLoader.d.ts.map +1 -0
- package/lib/loaders/assortmentMediasLoader.js +18 -0
- package/lib/loaders/assortmentMediasLoader.js.map +1 -0
- package/lib/loaders/assortmentProductLoader.d.ts +12 -0
- package/lib/loaders/assortmentProductLoader.d.ts.map +1 -0
- package/lib/loaders/assortmentProductLoader.js +14 -0
- package/lib/loaders/assortmentProductLoader.js.map +1 -0
- package/lib/loaders/assortmentProductsLoader.d.ts +10 -0
- package/lib/loaders/assortmentProductsLoader.d.ts.map +1 -0
- package/lib/loaders/assortmentProductsLoader.js +18 -0
- package/lib/loaders/assortmentProductsLoader.js.map +1 -0
- package/lib/loaders/assortmentTextLoader.d.ts +12 -0
- package/lib/loaders/assortmentTextLoader.d.ts.map +1 -0
- package/lib/loaders/assortmentTextLoader.js +15 -0
- package/lib/loaders/assortmentTextLoader.js.map +1 -0
- package/lib/loaders/buildLocaleMap.d.ts +6 -0
- package/lib/loaders/buildLocaleMap.d.ts.map +1 -0
- package/lib/loaders/buildLocaleMap.js +38 -0
- package/lib/loaders/buildLocaleMap.js.map +1 -0
- package/lib/loaders/buildTextMap.d.ts +1 -1
- package/lib/loaders/buildTextMap.d.ts.map +1 -1
- package/lib/loaders/buildTextMap.js +16 -6
- package/lib/loaders/buildTextMap.js.map +1 -1
- package/lib/loaders/countryLoader.d.ts +10 -0
- package/lib/loaders/countryLoader.d.ts.map +1 -0
- package/lib/loaders/countryLoader.js +14 -0
- package/lib/loaders/countryLoader.js.map +1 -0
- package/lib/loaders/currencyLoader.d.ts +10 -0
- package/lib/loaders/currencyLoader.d.ts.map +1 -0
- package/lib/loaders/currencyLoader.js +14 -0
- package/lib/loaders/currencyLoader.js.map +1 -0
- package/lib/loaders/deliveryProviderLoader.d.ts +10 -0
- package/lib/loaders/deliveryProviderLoader.d.ts.map +1 -0
- package/lib/loaders/deliveryProviderLoader.js +13 -0
- package/lib/loaders/deliveryProviderLoader.js.map +1 -0
- package/lib/loaders/fileLoader.d.ts +10 -0
- package/lib/loaders/fileLoader.d.ts.map +1 -0
- package/lib/loaders/fileLoader.js +13 -0
- package/lib/loaders/fileLoader.js.map +1 -0
- package/lib/loaders/filterLoader.d.ts +10 -0
- package/lib/loaders/filterLoader.d.ts.map +1 -0
- package/lib/loaders/filterLoader.js +14 -0
- package/lib/loaders/filterLoader.js.map +1 -0
- package/lib/loaders/filterTextLoader.d.ts +14 -0
- package/lib/loaders/filterTextLoader.d.ts.map +1 -0
- package/lib/loaders/filterTextLoader.js +15 -0
- package/lib/loaders/filterTextLoader.js.map +1 -0
- package/lib/loaders/index.d.ts.map +1 -1
- package/lib/loaders/index.js +1 -29
- package/lib/loaders/index.js.map +1 -1
- package/lib/loaders/languageLoader.d.ts +10 -0
- package/lib/loaders/languageLoader.d.ts.map +1 -0
- package/lib/loaders/languageLoader.js +14 -0
- package/lib/loaders/languageLoader.js.map +1 -0
- package/lib/loaders/orderLoader.d.ts +10 -0
- package/lib/loaders/orderLoader.d.ts.map +1 -0
- package/lib/loaders/orderLoader.js +16 -0
- package/lib/loaders/orderLoader.js.map +1 -0
- package/lib/loaders/paymentProviderLoader.d.ts +10 -0
- package/lib/loaders/paymentProviderLoader.d.ts.map +1 -0
- package/lib/loaders/paymentProviderLoader.js +13 -0
- package/lib/loaders/paymentProviderLoader.js.map +1 -0
- package/lib/loaders/productLoader.d.ts +10 -0
- package/lib/loaders/productLoader.d.ts.map +1 -0
- package/lib/loaders/productLoader.js +16 -0
- package/lib/loaders/productLoader.js.map +1 -0
- package/lib/loaders/productLoaderBySKU.d.ts +10 -0
- package/lib/loaders/productLoaderBySKU.d.ts.map +1 -0
- package/lib/loaders/productLoaderBySKU.js +16 -0
- package/lib/loaders/productLoaderBySKU.js.map +1 -0
- package/lib/loaders/productMediaTextLoader.d.ts +12 -0
- package/lib/loaders/productMediaTextLoader.d.ts.map +1 -0
- package/lib/loaders/productMediaTextLoader.js +15 -0
- package/lib/loaders/productMediaTextLoader.js.map +1 -0
- package/lib/loaders/productMediasLoader.d.ts +10 -0
- package/lib/loaders/productMediasLoader.d.ts.map +1 -0
- package/lib/loaders/productMediasLoader.js +18 -0
- package/lib/loaders/productMediasLoader.js.map +1 -0
- package/lib/loaders/productTextLoader.d.ts +12 -0
- package/lib/loaders/productTextLoader.d.ts.map +1 -0
- package/lib/loaders/productTextLoader.js +15 -0
- package/lib/loaders/productTextLoader.js.map +1 -0
- package/lib/loaders/userLoader.d.ts +10 -0
- package/lib/loaders/userLoader.d.ts.map +1 -0
- package/lib/loaders/userLoader.js +17 -0
- package/lib/loaders/userLoader.js.map +1 -0
- package/lib/loaders/utils.d.ts +7 -0
- package/lib/loaders/utils.d.ts.map +1 -0
- package/lib/loaders/utils.js +29 -0
- package/lib/loaders/utils.js.map +1 -0
- package/lib/mcp/index.d.ts +4 -0
- package/lib/mcp/index.d.ts.map +1 -0
- package/lib/mcp/index.js +12 -0
- package/lib/mcp/index.js.map +1 -0
- package/lib/mcp/tools/addProductAssignmentHandler.d.ts +52 -0
- package/lib/mcp/tools/addProductAssignmentHandler.d.ts.map +1 -0
- package/lib/mcp/tools/addProductAssignmentHandler.js +97 -0
- package/lib/mcp/tools/addProductAssignmentHandler.js.map +1 -0
- package/lib/mcp/tools/countriesHandler.d.ts +60 -0
- package/lib/mcp/tools/countriesHandler.d.ts.map +1 -0
- package/lib/mcp/tools/countriesHandler.js +48 -0
- package/lib/mcp/tools/countriesHandler.js.map +1 -0
- package/lib/mcp/tools/countryHandler.d.ts +20 -0
- package/lib/mcp/tools/countryHandler.d.ts.map +1 -0
- package/lib/mcp/tools/countryHandler.js +34 -0
- package/lib/mcp/tools/countryHandler.js.map +1 -0
- package/lib/mcp/tools/createProduct.d.ts +138 -0
- package/lib/mcp/tools/createProduct.d.ts.map +1 -0
- package/lib/mcp/tools/createProduct.js +60 -0
- package/lib/mcp/tools/createProduct.js.map +1 -0
- package/lib/mcp/tools/createProductVariationHandler.d.ts +84 -0
- package/lib/mcp/tools/createProductVariationHandler.d.ts.map +1 -0
- package/lib/mcp/tools/createProductVariationHandler.js +67 -0
- package/lib/mcp/tools/createProductVariationHandler.js.map +1 -0
- package/lib/mcp/tools/currenciesHandler.d.ts +60 -0
- package/lib/mcp/tools/currenciesHandler.d.ts.map +1 -0
- package/lib/mcp/tools/currenciesHandler.js +50 -0
- package/lib/mcp/tools/currenciesHandler.js.map +1 -0
- package/lib/mcp/tools/currencyHandler.d.ts +20 -0
- package/lib/mcp/tools/currencyHandler.d.ts.map +1 -0
- package/lib/mcp/tools/currencyHandler.js +34 -0
- package/lib/mcp/tools/currencyHandler.js.map +1 -0
- package/lib/mcp/tools/getProduct.d.ts +48 -0
- package/lib/mcp/tools/getProduct.d.ts.map +1 -0
- package/lib/mcp/tools/getProduct.js +104 -0
- package/lib/mcp/tools/getProduct.js.map +1 -0
- package/lib/mcp/tools/index.d.ts +6 -0
- package/lib/mcp/tools/index.d.ts.map +1 -0
- package/lib/mcp/tools/index.js +6 -0
- package/lib/mcp/tools/index.js.map +1 -0
- package/lib/mcp/tools/languageHandler.d.ts +20 -0
- package/lib/mcp/tools/languageHandler.d.ts.map +1 -0
- package/lib/mcp/tools/languageHandler.js +31 -0
- package/lib/mcp/tools/languageHandler.js.map +1 -0
- package/lib/mcp/tools/languagesHandler.d.ts +60 -0
- package/lib/mcp/tools/languagesHandler.d.ts.map +1 -0
- package/lib/mcp/tools/languagesHandler.js +42 -0
- package/lib/mcp/tools/languagesHandler.js.map +1 -0
- package/lib/mcp/tools/listProducts.d.ts +112 -0
- package/lib/mcp/tools/listProducts.d.ts.map +1 -0
- package/lib/mcp/tools/listProducts.js +98 -0
- package/lib/mcp/tools/listProducts.js.map +1 -0
- package/lib/mcp/tools/normalizeMediaUrl.d.ts +3 -0
- package/lib/mcp/tools/normalizeMediaUrl.d.ts.map +1 -0
- package/lib/mcp/tools/normalizeMediaUrl.js +21 -0
- package/lib/mcp/tools/normalizeMediaUrl.js.map +1 -0
- package/lib/mcp/tools/productsCountHandler.d.ts +32 -0
- package/lib/mcp/tools/productsCountHandler.d.ts.map +1 -0
- package/lib/mcp/tools/productsCountHandler.js +33 -0
- package/lib/mcp/tools/productsCountHandler.js.map +1 -0
- package/lib/mcp/tools/publishProduct.d.ts +20 -0
- package/lib/mcp/tools/publishProduct.d.ts.map +1 -0
- package/lib/mcp/tools/publishProduct.js +40 -0
- package/lib/mcp/tools/publishProduct.js.map +1 -0
- package/lib/mcp/tools/removeProduct.d.ts +20 -0
- package/lib/mcp/tools/removeProduct.d.ts.map +1 -0
- package/lib/mcp/tools/removeProduct.js +34 -0
- package/lib/mcp/tools/removeProduct.js.map +1 -0
- package/lib/mcp/tools/removeProductVariationHandler.d.ts +20 -0
- package/lib/mcp/tools/removeProductVariationHandler.d.ts.map +1 -0
- package/lib/mcp/tools/removeProductVariationHandler.js +43 -0
- package/lib/mcp/tools/removeProductVariationHandler.js.map +1 -0
- package/lib/mcp/tools/unPublishProduct.d.ts +20 -0
- package/lib/mcp/tools/unPublishProduct.d.ts.map +1 -0
- package/lib/mcp/tools/unPublishProduct.js +40 -0
- package/lib/mcp/tools/unPublishProduct.js.map +1 -0
- package/lib/mcp/tools/updateProduct.d.ts +56 -0
- package/lib/mcp/tools/updateProduct.d.ts.map +1 -0
- package/lib/mcp/tools/updateProduct.js +44 -0
- package/lib/mcp/tools/updateProduct.js.map +1 -0
- package/lib/mcp/tools/updateProductCommerceHandler.d.ts +166 -0
- package/lib/mcp/tools/updateProductCommerceHandler.d.ts.map +1 -0
- package/lib/mcp/tools/updateProductCommerceHandler.js +64 -0
- package/lib/mcp/tools/updateProductCommerceHandler.js.map +1 -0
- package/lib/mcp/tools/updateProductPlanHandler.d.ts +72 -0
- package/lib/mcp/tools/updateProductPlanHandler.d.ts.map +1 -0
- package/lib/mcp/tools/updateProductPlanHandler.js +51 -0
- package/lib/mcp/tools/updateProductPlanHandler.js.map +1 -0
- package/lib/mcp/tools/updateProductSupplyHandler.d.ts +64 -0
- package/lib/mcp/tools/updateProductSupplyHandler.d.ts.map +1 -0
- package/lib/mcp/tools/updateProductSupplyHandler.js +52 -0
- package/lib/mcp/tools/updateProductSupplyHandler.js.map +1 -0
- package/lib/mcp/tools/updateProductTextsHandler.d.ts +114 -0
- package/lib/mcp/tools/updateProductTextsHandler.d.ts.map +1 -0
- package/lib/mcp/tools/updateProductTextsHandler.js +50 -0
- package/lib/mcp/tools/updateProductTextsHandler.js.map +1 -0
- package/lib/mcp/tools/updateProductTokenizationHandler.d.ts +72 -0
- package/lib/mcp/tools/updateProductTokenizationHandler.d.ts.map +1 -0
- package/lib/mcp/tools/updateProductTokenizationHandler.js +49 -0
- package/lib/mcp/tools/updateProductTokenizationHandler.js.map +1 -0
- package/lib/mcp/tools/updateProductWarehousingHandler.d.ts +48 -0
- package/lib/mcp/tools/updateProductWarehousingHandler.d.ts.map +1 -0
- package/lib/mcp/tools/updateProductWarehousingHandler.js +45 -0
- package/lib/mcp/tools/updateProductWarehousingHandler.js.map +1 -0
- package/lib/mcp/utils/getNormalizedProductDetails.d.ts +26 -0
- package/lib/mcp/utils/getNormalizedProductDetails.d.ts.map +1 -0
- package/lib/mcp/utils/getNormalizedProductDetails.js +36 -0
- package/lib/mcp/utils/getNormalizedProductDetails.js.map +1 -0
- package/lib/mcp/utils/normalizeMediaUrl.d.ts +3 -0
- package/lib/mcp/utils/normalizeMediaUrl.d.ts.map +1 -0
- package/lib/mcp/utils/normalizeMediaUrl.js +21 -0
- package/lib/mcp/utils/normalizeMediaUrl.js.map +1 -0
- package/lib/resolvers/mutations/accounts/buildSecretTOTPAuthURL.d.ts +3 -0
- package/lib/resolvers/mutations/accounts/buildSecretTOTPAuthURL.d.ts.map +1 -0
- package/lib/resolvers/mutations/accounts/buildSecretTOTPAuthURL.js +6 -0
- package/lib/resolvers/mutations/accounts/buildSecretTOTPAuthURL.js.map +1 -0
- package/lib/resolvers/mutations/accounts/disableTOTP.d.ts +6 -0
- package/lib/resolvers/mutations/accounts/disableTOTP.d.ts.map +1 -0
- package/lib/resolvers/mutations/accounts/disableTOTP.js +27 -0
- package/lib/resolvers/mutations/accounts/disableTOTP.js.map +1 -0
- package/lib/resolvers/mutations/accounts/enableTOTP.d.ts +6 -0
- package/lib/resolvers/mutations/accounts/enableTOTP.d.ts.map +1 -0
- package/lib/resolvers/mutations/accounts/enableTOTP.js +20 -0
- package/lib/resolvers/mutations/accounts/enableTOTP.js.map +1 -0
- package/lib/resolvers/mutations/accounts/linkOAuthAccount.d.ts +7 -0
- package/lib/resolvers/mutations/accounts/linkOAuthAccount.d.ts.map +1 -0
- package/lib/resolvers/mutations/accounts/linkOAuthAccount.js +30 -0
- package/lib/resolvers/mutations/accounts/linkOAuthAccount.js.map +1 -0
- package/lib/resolvers/mutations/accounts/loginWithOAuth.d.ts +8 -0
- package/lib/resolvers/mutations/accounts/loginWithOAuth.d.ts.map +1 -0
- package/lib/resolvers/mutations/accounts/loginWithOAuth.js +25 -0
- package/lib/resolvers/mutations/accounts/loginWithOAuth.js.map +1 -0
- package/lib/resolvers/mutations/accounts/logoutAllSessions.d.ts +5 -0
- package/lib/resolvers/mutations/accounts/logoutAllSessions.d.ts.map +1 -0
- package/lib/resolvers/mutations/accounts/logoutAllSessions.js +20 -0
- package/lib/resolvers/mutations/accounts/logoutAllSessions.js.map +1 -0
- package/lib/resolvers/mutations/accounts/unlinkOAuthAccount.d.ts +6 -0
- package/lib/resolvers/mutations/accounts/unlinkOAuthAccount.d.ts.map +1 -0
- package/lib/resolvers/mutations/accounts/unlinkOAuthAccount.js +13 -0
- package/lib/resolvers/mutations/accounts/unlinkOAuthAccount.js.map +1 -0
- package/lib/resolvers/mutations/assortments/addAssortmentMedia.d.ts +6 -0
- package/lib/resolvers/mutations/assortments/addAssortmentMedia.d.ts.map +1 -0
- package/lib/resolvers/mutations/assortments/addAssortmentMedia.js +18 -0
- package/lib/resolvers/mutations/assortments/addAssortmentMedia.js.map +1 -0
- package/lib/resolvers/mutations/products/addProductAssignment.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/addProductAssignment.js +3 -1
- package/lib/resolvers/mutations/products/addProductAssignment.js.map +1 -1
- package/lib/resolvers/mutations/products/addProductMedia.d.ts +6 -0
- package/lib/resolvers/mutations/products/addProductMedia.d.ts.map +1 -0
- package/lib/resolvers/mutations/products/addProductMedia.js +18 -0
- package/lib/resolvers/mutations/products/addProductMedia.js.map +1 -0
- package/lib/resolvers/mutations/users/updateUserAvatar.d.ts +6 -0
- package/lib/resolvers/mutations/users/updateUserAvatar.d.ts.map +1 -0
- package/lib/resolvers/mutations/users/updateUserAvatar.js +22 -0
- package/lib/resolvers/mutations/users/updateUserAvatar.js.map +1 -0
- package/lib/resolvers/mutations/utils/getOrderCart.d.ts +7 -0
- package/lib/resolvers/mutations/utils/getOrderCart.d.ts.map +1 -0
- package/lib/resolvers/mutations/utils/getOrderCart.js +13 -0
- package/lib/resolvers/mutations/utils/getOrderCart.js.map +1 -0
- package/lib/resolvers/type/dispatch-types.d.ts +15 -0
- package/lib/resolvers/type/dispatch-types.d.ts.map +1 -0
- package/lib/resolvers/type/dispatch-types.js +16 -0
- package/lib/resolvers/type/dispatch-types.js.map +1 -0
- package/lib/resolvers/type/oauth-account.d.ts +6 -0
- package/lib/resolvers/type/oauth-account.d.ts.map +1 -0
- package/lib/resolvers/type/oauth-account.js +7 -0
- package/lib/resolvers/type/oauth-account.js.map +1 -0
- package/lib/resolvers/type/oauth-provider.d.ts +6 -0
- package/lib/resolvers/type/oauth-provider.d.ts.map +1 -0
- package/lib/resolvers/type/oauth-provider.js +6 -0
- package/lib/resolvers/type/oauth-provider.js.map +1 -0
- package/lib/resolvers/type/stock-types.d.ts +14 -0
- package/lib/resolvers/type/stock-types.d.ts.map +1 -0
- package/lib/resolvers/type/stock-types.js +15 -0
- package/lib/resolvers/type/stock-types.js.map +1 -0
- package/lib/user-context.d.ts +7 -0
- package/lib/user-context.d.ts.map +1 -0
- package/lib/user-context.js +76 -0
- package/lib/user-context.js.map +1 -0
- package/package.json +13 -13
- package/src/errors.ts +5 -0
- package/src/loaders/buildLocaleMap.test.ts +61 -0
- package/src/loaders/buildLocaleMap.ts +39 -0
- package/src/loaders/buildTextMap.test.ts +54 -0
- package/src/loaders/buildTextMap.ts +22 -6
- package/src/loaders/index.ts +1 -32
- package/src/resolvers/mutations/products/addProductAssignment.ts +8 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Context } from '../../context.js';
|
|
3
|
+
export declare const ProductsCountSchema: {
|
|
4
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
5
|
+
slugs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
6
|
+
includeDrafts: z.ZodDefault<z.ZodBoolean>;
|
|
7
|
+
queryString: z.ZodOptional<z.ZodString>;
|
|
8
|
+
};
|
|
9
|
+
export declare const ProductsCountZodSchema: z.ZodObject<{
|
|
10
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
11
|
+
slugs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
12
|
+
includeDrafts: z.ZodDefault<z.ZodBoolean>;
|
|
13
|
+
queryString: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
slugs?: string[];
|
|
16
|
+
tags?: string[];
|
|
17
|
+
includeDrafts?: boolean;
|
|
18
|
+
queryString?: string;
|
|
19
|
+
}, {
|
|
20
|
+
slugs?: string[];
|
|
21
|
+
tags?: string[];
|
|
22
|
+
includeDrafts?: boolean;
|
|
23
|
+
queryString?: string;
|
|
24
|
+
}>;
|
|
25
|
+
export type ProductsCountParams = z.infer<typeof ProductsCountZodSchema>;
|
|
26
|
+
export declare function productsCountHandler(context: Context, params: ProductsCountParams): Promise<{
|
|
27
|
+
content: {
|
|
28
|
+
type: "text";
|
|
29
|
+
text: string;
|
|
30
|
+
}[];
|
|
31
|
+
}>;
|
|
32
|
+
//# sourceMappingURL=productsCountHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"productsCountHandler.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/productsCountHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,eAAO,MAAM,mBAAmB;;;;;CAK/B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;EAAgC,CAAC;AACpE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEzE,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,mBAAmB;;;;;GAwBvF"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const ProductsCountSchema = {
|
|
3
|
+
tags: z.array(z.string().min(1)).optional(),
|
|
4
|
+
slugs: z.array(z.string().min(1)).optional(),
|
|
5
|
+
includeDrafts: z.boolean().default(false),
|
|
6
|
+
queryString: z.string().min(1).optional(),
|
|
7
|
+
};
|
|
8
|
+
export const ProductsCountZodSchema = z.object(ProductsCountSchema);
|
|
9
|
+
export async function productsCountHandler(context, params) {
|
|
10
|
+
const { modules } = context;
|
|
11
|
+
try {
|
|
12
|
+
const count = await modules.products.count(params);
|
|
13
|
+
return {
|
|
14
|
+
content: [
|
|
15
|
+
{
|
|
16
|
+
type: 'text',
|
|
17
|
+
text: count.toString(),
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
return {
|
|
24
|
+
content: [
|
|
25
|
+
{
|
|
26
|
+
type: 'text',
|
|
27
|
+
text: `Error counting products: ${error.message}`,
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=productsCountHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"productsCountHandler.js","sourceRoot":"","sources":["../../../src/mcp/tools/productsCountHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC3C,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC5C,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACzC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC1C,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAGpE,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,OAAgB,EAAE,MAA2B;IACtF,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAE5B,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAEnD,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,KAAK,CAAC,QAAQ,EAAE;iBACvB;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,4BAA6B,KAAe,CAAC,OAAO,EAAE;iBAC7D;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Context } from '../../context.js';
|
|
3
|
+
export declare const PublishProductSchema: {
|
|
4
|
+
productId: z.ZodString;
|
|
5
|
+
};
|
|
6
|
+
export declare const PublishProductZodSchema: z.ZodObject<{
|
|
7
|
+
productId: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
productId?: string;
|
|
10
|
+
}, {
|
|
11
|
+
productId?: string;
|
|
12
|
+
}>;
|
|
13
|
+
export type PublishProductParams = z.infer<typeof PublishProductZodSchema>;
|
|
14
|
+
export declare function publishProductHandler(context: Context, params: PublishProductParams): Promise<{
|
|
15
|
+
content: {
|
|
16
|
+
type: "text";
|
|
17
|
+
text: string;
|
|
18
|
+
}[];
|
|
19
|
+
}>;
|
|
20
|
+
//# sourceMappingURL=publishProduct.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publishProduct.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/publishProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAI3C,eAAO,MAAM,oBAAoB;;CAEhC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;EAAiC,CAAC;AAEtE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE3E,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,oBAAoB;;;;;GA+BzF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ProductNotFoundError, ProductWrongStatusError } from '../../errors.js';
|
|
3
|
+
import { getNormalizedProductDetails } from '../utils/getNormalizedProductDetails.js';
|
|
4
|
+
export const PublishProductSchema = {
|
|
5
|
+
productId: z.string().min(1).describe('ID of the product to publish'),
|
|
6
|
+
};
|
|
7
|
+
export const PublishProductZodSchema = z.object(PublishProductSchema);
|
|
8
|
+
export async function publishProductHandler(context, params) {
|
|
9
|
+
const { productId } = params;
|
|
10
|
+
const { modules } = context;
|
|
11
|
+
try {
|
|
12
|
+
const product = await modules.products.findProduct({ productId });
|
|
13
|
+
if (!product)
|
|
14
|
+
throw new ProductNotFoundError({ productId });
|
|
15
|
+
if (!(await modules.products.publish(product))) {
|
|
16
|
+
throw new ProductWrongStatusError({ status: product.status });
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
content: [
|
|
20
|
+
{
|
|
21
|
+
type: 'text',
|
|
22
|
+
text: JSON.stringify({
|
|
23
|
+
product: await getNormalizedProductDetails(productId, context),
|
|
24
|
+
}),
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
return {
|
|
31
|
+
content: [
|
|
32
|
+
{
|
|
33
|
+
type: 'text',
|
|
34
|
+
text: `Error publishing product: ${error.message}`,
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=publishProduct.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publishProduct.js","sourceRoot":"","sources":["../../../src/mcp/tools/publishProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AAEtF,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,8BAA8B,CAAC;CACtE,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;AAItE,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,OAAgB,EAAE,MAA4B;IACxF,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;IAC7B,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAC5B,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;QAClE,IAAI,CAAC,OAAO;YAAE,MAAM,IAAI,oBAAoB,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;QAE5D,IAAI,CAAC,CAAC,MAAM,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;YAC/C,MAAM,IAAI,uBAAuB,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;QAChE,CAAC;QAED,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;wBACnB,OAAO,EAAE,MAAM,2BAA2B,CAAC,SAAS,EAAE,OAAO,CAAC;qBAC/D,CAAC;iBACH;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,6BAA8B,KAAe,CAAC,OAAO,EAAE;iBAC9D;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Context } from '../../context.js';
|
|
3
|
+
export declare const RemoveProductSchema: {
|
|
4
|
+
productId: z.ZodString;
|
|
5
|
+
};
|
|
6
|
+
export declare const RemoveProductZodSchema: z.ZodObject<{
|
|
7
|
+
productId: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
productId?: string;
|
|
10
|
+
}, {
|
|
11
|
+
productId?: string;
|
|
12
|
+
}>;
|
|
13
|
+
export type RemoveProductParams = z.infer<typeof RemoveProductZodSchema>;
|
|
14
|
+
export declare function removeProductHandler(context: Context, params: RemoveProductParams): Promise<{
|
|
15
|
+
content: {
|
|
16
|
+
type: "text";
|
|
17
|
+
text: string;
|
|
18
|
+
}[];
|
|
19
|
+
}>;
|
|
20
|
+
//# sourceMappingURL=removeProduct.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removeProduct.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/removeProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAG3C,eAAO,MAAM,mBAAmB;;CAE/B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;EAAgC,CAAC;AAEpE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEzE,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,mBAAmB;;;;;GA2BvF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getNormalizedProductDetails } from '../utils/getNormalizedProductDetails.js';
|
|
3
|
+
export const RemoveProductSchema = {
|
|
4
|
+
productId: z.string().min(1).describe('ID of the product to remove'),
|
|
5
|
+
};
|
|
6
|
+
export const RemoveProductZodSchema = z.object(RemoveProductSchema);
|
|
7
|
+
export async function removeProductHandler(context, params) {
|
|
8
|
+
const { productId } = params;
|
|
9
|
+
const { services } = context;
|
|
10
|
+
try {
|
|
11
|
+
await services.products.removeProduct({ productId });
|
|
12
|
+
return {
|
|
13
|
+
content: [
|
|
14
|
+
{
|
|
15
|
+
type: 'text',
|
|
16
|
+
text: JSON.stringify({
|
|
17
|
+
product: await getNormalizedProductDetails(productId, context),
|
|
18
|
+
}),
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
return {
|
|
25
|
+
content: [
|
|
26
|
+
{
|
|
27
|
+
type: 'text',
|
|
28
|
+
text: `Error removing product: ${error.message}`,
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=removeProduct.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removeProduct.js","sourceRoot":"","sources":["../../../src/mcp/tools/removeProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AAEtF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,6BAA6B,CAAC;CACrE,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAIpE,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,OAAgB,EAAE,MAA2B;IACtF,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;IAC7B,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;IAE7B,IAAI,CAAC;QACH,MAAM,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;QAErD,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;wBACnB,OAAO,EAAE,MAAM,2BAA2B,CAAC,SAAS,EAAE,OAAO,CAAC;qBAC/D,CAAC;iBACH;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,2BAA4B,KAAe,CAAC,OAAO,EAAE;iBAC5D;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Context } from '../../context.js';
|
|
3
|
+
export declare const RemoveProductVariationSchema: {
|
|
4
|
+
productVariationId: z.ZodString;
|
|
5
|
+
};
|
|
6
|
+
export declare const RemoveProductVariationZodSchema: z.ZodObject<{
|
|
7
|
+
productVariationId: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
productVariationId?: string;
|
|
10
|
+
}, {
|
|
11
|
+
productVariationId?: string;
|
|
12
|
+
}>;
|
|
13
|
+
export type RemoveProductVariationParams = z.infer<typeof RemoveProductVariationZodSchema>;
|
|
14
|
+
export declare function removeProductVariationHandler(context: Context, params: RemoveProductVariationParams): Promise<{
|
|
15
|
+
content: {
|
|
16
|
+
type: "text";
|
|
17
|
+
text: string;
|
|
18
|
+
}[];
|
|
19
|
+
}>;
|
|
20
|
+
//# sourceMappingURL=removeProductVariationHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removeProductVariationHandler.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/removeProductVariationHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAI3C,eAAO,MAAM,4BAA4B;;CAKxC,CAAC;AAEF,eAAO,MAAM,+BAA+B;;;;;;EAAyC,CAAC;AACtF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAE3F,wBAAsB,6BAA6B,CACjD,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,4BAA4B;;;;;GAiCrC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ProductVariationNotFoundError } from '../../errors.js';
|
|
3
|
+
import { getNormalizedProductDetails } from '../utils/getNormalizedProductDetails.js';
|
|
4
|
+
export const RemoveProductVariationSchema = {
|
|
5
|
+
productVariationId: z
|
|
6
|
+
.string()
|
|
7
|
+
.min(1)
|
|
8
|
+
.describe('ID of the product variation to remove. it should be a valid product variation ID'),
|
|
9
|
+
};
|
|
10
|
+
export const RemoveProductVariationZodSchema = z.object(RemoveProductVariationSchema);
|
|
11
|
+
export async function removeProductVariationHandler(context, params) {
|
|
12
|
+
const { productVariationId } = params;
|
|
13
|
+
const { modules } = context;
|
|
14
|
+
try {
|
|
15
|
+
const productVariation = await modules.products.variations.findProductVariation({
|
|
16
|
+
productVariationId,
|
|
17
|
+
});
|
|
18
|
+
if (!productVariation)
|
|
19
|
+
throw new ProductVariationNotFoundError({ productVariationId });
|
|
20
|
+
await modules.products.variations.delete(productVariationId);
|
|
21
|
+
return {
|
|
22
|
+
content: [
|
|
23
|
+
{
|
|
24
|
+
type: 'text',
|
|
25
|
+
text: JSON.stringify({
|
|
26
|
+
product: await getNormalizedProductDetails(productVariationId, context),
|
|
27
|
+
}),
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
return {
|
|
34
|
+
content: [
|
|
35
|
+
{
|
|
36
|
+
type: 'text',
|
|
37
|
+
text: `Error removing product variation: ${error.message}`,
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=removeProductVariationHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removeProductVariationHandler.js","sourceRoot":"","sources":["../../../src/mcp/tools/removeProductVariationHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AAEtF,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,kBAAkB,EAAE,CAAC;SAClB,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,kFAAkF,CAAC;CAChG,CAAC;AAEF,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC,4BAA4B,CAAC,CAAC;AAGtF,MAAM,CAAC,KAAK,UAAU,6BAA6B,CACjD,OAAgB,EAChB,MAAoC;IAEpC,MAAM,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAAC;IACtC,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAE5B,IAAI,CAAC;QACH,MAAM,gBAAgB,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC;YAC9E,kBAAkB;SACnB,CAAC,CAAC;QACH,IAAI,CAAC,gBAAgB;YAAE,MAAM,IAAI,6BAA6B,CAAC,EAAE,kBAAkB,EAAE,CAAC,CAAC;QAEvF,MAAM,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;QAE7D,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;wBACnB,OAAO,EAAE,MAAM,2BAA2B,CAAC,kBAAkB,EAAE,OAAO,CAAC;qBACxE,CAAC;iBACH;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,qCAAsC,KAAe,CAAC,OAAO,EAAE;iBACtE;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Context } from '../../context.js';
|
|
3
|
+
export declare const UnpublishProductSchema: {
|
|
4
|
+
productId: z.ZodString;
|
|
5
|
+
};
|
|
6
|
+
export declare const UnpublishProductZodSchema: z.ZodObject<{
|
|
7
|
+
productId: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
productId?: string;
|
|
10
|
+
}, {
|
|
11
|
+
productId?: string;
|
|
12
|
+
}>;
|
|
13
|
+
export type UnpublishProductParams = z.infer<typeof UnpublishProductZodSchema>;
|
|
14
|
+
export declare function unpublishProductHandler(context: Context, params: UnpublishProductParams): Promise<{
|
|
15
|
+
content: {
|
|
16
|
+
type: "text";
|
|
17
|
+
text: string;
|
|
18
|
+
}[];
|
|
19
|
+
}>;
|
|
20
|
+
//# sourceMappingURL=unPublishProduct.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unPublishProduct.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/unPublishProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAI3C,eAAO,MAAM,sBAAsB;;CAElC,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;;;;EAAmC,CAAC;AAE1E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE/E,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,sBAAsB;;;;;GAgC7F"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ProductNotFoundError, ProductWrongStatusError } from '../../errors.js';
|
|
3
|
+
import { getNormalizedProductDetails } from '../utils/getNormalizedProductDetails.js';
|
|
4
|
+
export const UnpublishProductSchema = {
|
|
5
|
+
productId: z.string().min(1).describe('ID of the product to unpublish'),
|
|
6
|
+
};
|
|
7
|
+
export const UnpublishProductZodSchema = z.object(UnpublishProductSchema);
|
|
8
|
+
export async function unpublishProductHandler(context, params) {
|
|
9
|
+
const { productId } = params;
|
|
10
|
+
const { modules } = context;
|
|
11
|
+
try {
|
|
12
|
+
const product = await modules.products.findProduct({ productId });
|
|
13
|
+
if (!product)
|
|
14
|
+
throw new ProductNotFoundError({ productId });
|
|
15
|
+
if (!(await modules.products.unpublish(product))) {
|
|
16
|
+
throw new ProductWrongStatusError({ status: product.status });
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
content: [
|
|
20
|
+
{
|
|
21
|
+
type: 'text',
|
|
22
|
+
text: JSON.stringify({
|
|
23
|
+
product: await getNormalizedProductDetails(productId, context),
|
|
24
|
+
}),
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
return {
|
|
31
|
+
content: [
|
|
32
|
+
{
|
|
33
|
+
type: 'text',
|
|
34
|
+
text: `Error unPublishing product: ${error.message}`,
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=unPublishProduct.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unPublishProduct.js","sourceRoot":"","sources":["../../../src/mcp/tools/unPublishProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AAEtF,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,gCAAgC,CAAC;CACxE,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAI1E,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,OAAgB,EAAE,MAA8B;IAC5F,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;IAC7B,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAE5B,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;QAClE,IAAI,CAAC,OAAO;YAAE,MAAM,IAAI,oBAAoB,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;QAE5D,IAAI,CAAC,CAAC,MAAM,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;YACjD,MAAM,IAAI,uBAAuB,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;QAChE,CAAC;QAED,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;wBACnB,OAAO,EAAE,MAAM,2BAA2B,CAAC,SAAS,EAAE,OAAO,CAAC;qBAC/D,CAAC;iBACH;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,+BAAgC,KAAe,CAAC,OAAO,EAAE;iBAChE;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Context } from '../../context.js';
|
|
3
|
+
export declare const UpdateProductSchema: {
|
|
4
|
+
productId: z.ZodString;
|
|
5
|
+
product: z.ZodObject<{
|
|
6
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
7
|
+
sequence: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
meta?: Record<string, unknown>;
|
|
11
|
+
sequence?: number;
|
|
12
|
+
tags?: string[];
|
|
13
|
+
}, {
|
|
14
|
+
meta?: Record<string, unknown>;
|
|
15
|
+
sequence?: number;
|
|
16
|
+
tags?: string[];
|
|
17
|
+
}>;
|
|
18
|
+
};
|
|
19
|
+
export declare const UpdateProductZodSchema: z.ZodObject<{
|
|
20
|
+
productId: z.ZodString;
|
|
21
|
+
product: z.ZodObject<{
|
|
22
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
23
|
+
sequence: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
meta?: Record<string, unknown>;
|
|
27
|
+
sequence?: number;
|
|
28
|
+
tags?: string[];
|
|
29
|
+
}, {
|
|
30
|
+
meta?: Record<string, unknown>;
|
|
31
|
+
sequence?: number;
|
|
32
|
+
tags?: string[];
|
|
33
|
+
}>;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
productId?: string;
|
|
36
|
+
product?: {
|
|
37
|
+
meta?: Record<string, unknown>;
|
|
38
|
+
sequence?: number;
|
|
39
|
+
tags?: string[];
|
|
40
|
+
};
|
|
41
|
+
}, {
|
|
42
|
+
productId?: string;
|
|
43
|
+
product?: {
|
|
44
|
+
meta?: Record<string, unknown>;
|
|
45
|
+
sequence?: number;
|
|
46
|
+
tags?: string[];
|
|
47
|
+
};
|
|
48
|
+
}>;
|
|
49
|
+
export type UpdateProductParams = z.infer<typeof UpdateProductZodSchema>;
|
|
50
|
+
export declare function updateProductHandler(context: Context, params: UpdateProductParams): Promise<{
|
|
51
|
+
content: {
|
|
52
|
+
type: "text";
|
|
53
|
+
text: string;
|
|
54
|
+
}[];
|
|
55
|
+
}>;
|
|
56
|
+
//# sourceMappingURL=updateProduct.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateProduct.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/updateProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAI3C,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;CAS/B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAgC,CAAC;AAEpE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEzE,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,mBAAmB;;;;;GA8BvF"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ProductNotFoundError } from '../../errors.js';
|
|
3
|
+
import { getNormalizedProductDetails } from '../utils/getNormalizedProductDetails.js';
|
|
4
|
+
export const UpdateProductSchema = {
|
|
5
|
+
productId: z.string().min(1).describe('ID of the product to update'),
|
|
6
|
+
product: z
|
|
7
|
+
.object({
|
|
8
|
+
tags: z.array(z.string().min(1).toLowerCase()).optional().describe('List of lowercase tags'),
|
|
9
|
+
sequence: z.number().int().optional().describe('Sorting sequence'),
|
|
10
|
+
meta: z.record(z.unknown()).optional().describe('Custom metadata as key-value pairs'),
|
|
11
|
+
})
|
|
12
|
+
.describe('Fields to update on the product'),
|
|
13
|
+
};
|
|
14
|
+
export const UpdateProductZodSchema = z.object(UpdateProductSchema);
|
|
15
|
+
export async function updateProductHandler(context, params) {
|
|
16
|
+
const { productId, product } = params;
|
|
17
|
+
const { modules } = context;
|
|
18
|
+
try {
|
|
19
|
+
if (!(await modules.products.productExists({ productId })))
|
|
20
|
+
throw new ProductNotFoundError({ productId });
|
|
21
|
+
await modules.products.update(productId, product);
|
|
22
|
+
return {
|
|
23
|
+
content: [
|
|
24
|
+
{
|
|
25
|
+
type: 'text',
|
|
26
|
+
text: JSON.stringify({
|
|
27
|
+
product: await getNormalizedProductDetails(productId, context),
|
|
28
|
+
}),
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
return {
|
|
35
|
+
content: [
|
|
36
|
+
{
|
|
37
|
+
type: 'text',
|
|
38
|
+
text: `Error updating product: ${error.message}`,
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=updateProduct.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateProduct.js","sourceRoot":"","sources":["../../../src/mcp/tools/updateProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AAEtF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,6BAA6B,CAAC;IACpE,OAAO,EAAE,CAAC;SACP,MAAM,CAAC;QACN,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QAC5F,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;QAClE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;KACtF,CAAC;SACD,QAAQ,CAAC,iCAAiC,CAAC;CAC/C,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAIpE,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,OAAgB,EAAE,MAA2B;IACtF,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;IACtC,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAE5B,IAAI,CAAC;QACH,IAAI,CAAC,CAAC,MAAM,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;YACxD,MAAM,IAAI,oBAAoB,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;QAEhD,MAAM,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAElD,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;wBACnB,OAAO,EAAE,MAAM,2BAA2B,CAAC,SAAS,EAAE,OAAO,CAAC;qBAC/D,CAAC;iBACH;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,2BAA4B,KAAe,CAAC,OAAO,EAAE;iBAC5D;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Context } from '../../context.js';
|
|
3
|
+
export declare const UpdateProductCommerceSchema: {
|
|
4
|
+
productId: z.ZodString;
|
|
5
|
+
commerce: z.ZodObject<{
|
|
6
|
+
pricing: z.ZodArray<z.ZodObject<{
|
|
7
|
+
amount: z.ZodNumber;
|
|
8
|
+
maxQuantity: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
isTaxable: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
isNetPrice: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
currencyCode: z.ZodString;
|
|
12
|
+
countryCode: z.ZodString;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
countryCode?: string;
|
|
15
|
+
currencyCode?: string;
|
|
16
|
+
isNetPrice?: boolean;
|
|
17
|
+
isTaxable?: boolean;
|
|
18
|
+
amount?: number;
|
|
19
|
+
maxQuantity?: number;
|
|
20
|
+
}, {
|
|
21
|
+
countryCode?: string;
|
|
22
|
+
currencyCode?: string;
|
|
23
|
+
isNetPrice?: boolean;
|
|
24
|
+
isTaxable?: boolean;
|
|
25
|
+
amount?: number;
|
|
26
|
+
maxQuantity?: number;
|
|
27
|
+
}>, "atleastone">;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
pricing?: [{
|
|
30
|
+
countryCode?: string;
|
|
31
|
+
currencyCode?: string;
|
|
32
|
+
isNetPrice?: boolean;
|
|
33
|
+
isTaxable?: boolean;
|
|
34
|
+
amount?: number;
|
|
35
|
+
maxQuantity?: number;
|
|
36
|
+
}, ...{
|
|
37
|
+
countryCode?: string;
|
|
38
|
+
currencyCode?: string;
|
|
39
|
+
isNetPrice?: boolean;
|
|
40
|
+
isTaxable?: boolean;
|
|
41
|
+
amount?: number;
|
|
42
|
+
maxQuantity?: number;
|
|
43
|
+
}[]];
|
|
44
|
+
}, {
|
|
45
|
+
pricing?: [{
|
|
46
|
+
countryCode?: string;
|
|
47
|
+
currencyCode?: string;
|
|
48
|
+
isNetPrice?: boolean;
|
|
49
|
+
isTaxable?: boolean;
|
|
50
|
+
amount?: number;
|
|
51
|
+
maxQuantity?: number;
|
|
52
|
+
}, ...{
|
|
53
|
+
countryCode?: string;
|
|
54
|
+
currencyCode?: string;
|
|
55
|
+
isNetPrice?: boolean;
|
|
56
|
+
isTaxable?: boolean;
|
|
57
|
+
amount?: number;
|
|
58
|
+
maxQuantity?: number;
|
|
59
|
+
}[]];
|
|
60
|
+
}>;
|
|
61
|
+
};
|
|
62
|
+
export declare const UpdateProductCommerceZodSchema: z.ZodObject<{
|
|
63
|
+
productId: z.ZodString;
|
|
64
|
+
commerce: z.ZodObject<{
|
|
65
|
+
pricing: z.ZodArray<z.ZodObject<{
|
|
66
|
+
amount: z.ZodNumber;
|
|
67
|
+
maxQuantity: z.ZodOptional<z.ZodNumber>;
|
|
68
|
+
isTaxable: z.ZodOptional<z.ZodBoolean>;
|
|
69
|
+
isNetPrice: z.ZodOptional<z.ZodBoolean>;
|
|
70
|
+
currencyCode: z.ZodString;
|
|
71
|
+
countryCode: z.ZodString;
|
|
72
|
+
}, "strip", z.ZodTypeAny, {
|
|
73
|
+
countryCode?: string;
|
|
74
|
+
currencyCode?: string;
|
|
75
|
+
isNetPrice?: boolean;
|
|
76
|
+
isTaxable?: boolean;
|
|
77
|
+
amount?: number;
|
|
78
|
+
maxQuantity?: number;
|
|
79
|
+
}, {
|
|
80
|
+
countryCode?: string;
|
|
81
|
+
currencyCode?: string;
|
|
82
|
+
isNetPrice?: boolean;
|
|
83
|
+
isTaxable?: boolean;
|
|
84
|
+
amount?: number;
|
|
85
|
+
maxQuantity?: number;
|
|
86
|
+
}>, "atleastone">;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
pricing?: [{
|
|
89
|
+
countryCode?: string;
|
|
90
|
+
currencyCode?: string;
|
|
91
|
+
isNetPrice?: boolean;
|
|
92
|
+
isTaxable?: boolean;
|
|
93
|
+
amount?: number;
|
|
94
|
+
maxQuantity?: number;
|
|
95
|
+
}, ...{
|
|
96
|
+
countryCode?: string;
|
|
97
|
+
currencyCode?: string;
|
|
98
|
+
isNetPrice?: boolean;
|
|
99
|
+
isTaxable?: boolean;
|
|
100
|
+
amount?: number;
|
|
101
|
+
maxQuantity?: number;
|
|
102
|
+
}[]];
|
|
103
|
+
}, {
|
|
104
|
+
pricing?: [{
|
|
105
|
+
countryCode?: string;
|
|
106
|
+
currencyCode?: string;
|
|
107
|
+
isNetPrice?: boolean;
|
|
108
|
+
isTaxable?: boolean;
|
|
109
|
+
amount?: number;
|
|
110
|
+
maxQuantity?: number;
|
|
111
|
+
}, ...{
|
|
112
|
+
countryCode?: string;
|
|
113
|
+
currencyCode?: string;
|
|
114
|
+
isNetPrice?: boolean;
|
|
115
|
+
isTaxable?: boolean;
|
|
116
|
+
amount?: number;
|
|
117
|
+
maxQuantity?: number;
|
|
118
|
+
}[]];
|
|
119
|
+
}>;
|
|
120
|
+
}, "strip", z.ZodTypeAny, {
|
|
121
|
+
productId?: string;
|
|
122
|
+
commerce?: {
|
|
123
|
+
pricing?: [{
|
|
124
|
+
countryCode?: string;
|
|
125
|
+
currencyCode?: string;
|
|
126
|
+
isNetPrice?: boolean;
|
|
127
|
+
isTaxable?: boolean;
|
|
128
|
+
amount?: number;
|
|
129
|
+
maxQuantity?: number;
|
|
130
|
+
}, ...{
|
|
131
|
+
countryCode?: string;
|
|
132
|
+
currencyCode?: string;
|
|
133
|
+
isNetPrice?: boolean;
|
|
134
|
+
isTaxable?: boolean;
|
|
135
|
+
amount?: number;
|
|
136
|
+
maxQuantity?: number;
|
|
137
|
+
}[]];
|
|
138
|
+
};
|
|
139
|
+
}, {
|
|
140
|
+
productId?: string;
|
|
141
|
+
commerce?: {
|
|
142
|
+
pricing?: [{
|
|
143
|
+
countryCode?: string;
|
|
144
|
+
currencyCode?: string;
|
|
145
|
+
isNetPrice?: boolean;
|
|
146
|
+
isTaxable?: boolean;
|
|
147
|
+
amount?: number;
|
|
148
|
+
maxQuantity?: number;
|
|
149
|
+
}, ...{
|
|
150
|
+
countryCode?: string;
|
|
151
|
+
currencyCode?: string;
|
|
152
|
+
isNetPrice?: boolean;
|
|
153
|
+
isTaxable?: boolean;
|
|
154
|
+
amount?: number;
|
|
155
|
+
maxQuantity?: number;
|
|
156
|
+
}[]];
|
|
157
|
+
};
|
|
158
|
+
}>;
|
|
159
|
+
export type UpdateProductCommerceParams = z.infer<typeof UpdateProductCommerceZodSchema>;
|
|
160
|
+
export declare function updateProductCommerceHandler(context: Context, params: UpdateProductCommerceParams): Promise<{
|
|
161
|
+
content: {
|
|
162
|
+
type: "text";
|
|
163
|
+
text: string;
|
|
164
|
+
}[];
|
|
165
|
+
}>;
|
|
166
|
+
//# sourceMappingURL=updateProductCommerceHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateProductCommerceHandler.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/updateProductCommerceHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAG3C,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCvC,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAwC,CAAC;AAEpF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEzF,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,2BAA2B;;;;;GA4BpC"}
|