@unchainedshop/api 4.0.0-rc.14 → 4.0.0-rc.16
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/chat/defaultSystemPrompt.d.ts +3 -0
- package/lib/chat/defaultSystemPrompt.d.ts.map +1 -0
- package/lib/chat/defaultSystemPrompt.js +7 -0
- package/lib/chat/defaultSystemPrompt.js.map +1 -0
- package/lib/chat/generateImageHandler.d.ts +7 -0
- package/lib/chat/generateImageHandler.d.ts.map +1 -0
- package/lib/chat/generateImageHandler.js +64 -0
- package/lib/chat/generateImageHandler.js.map +1 -0
- package/lib/chat/normalizeToolsIndex.d.ts +7 -0
- package/lib/chat/normalizeToolsIndex.d.ts.map +1 -0
- package/lib/chat/normalizeToolsIndex.js +11 -0
- package/lib/chat/normalizeToolsIndex.js.map +1 -0
- package/lib/chat/utils.d.ts +13 -0
- package/lib/chat/utils.d.ts.map +1 -0
- package/lib/chat/utils.js +32 -0
- package/lib/chat/utils.js.map +1 -0
- package/lib/context.d.ts +3 -0
- package/lib/context.d.ts.map +1 -1
- package/lib/context.js.map +1 -1
- package/lib/express/chatHandler.d.ts +5 -0
- package/lib/express/chatHandler.d.ts.map +1 -0
- package/lib/express/chatHandler.js +116 -0
- package/lib/express/chatHandler.js.map +1 -0
- package/lib/express/createBulkImportMiddleware.d.ts.map +1 -1
- package/lib/express/createBulkImportMiddleware.js +6 -7
- package/lib/express/createBulkImportMiddleware.js.map +1 -1
- package/lib/express/createERCMetadataMiddleware.d.ts.map +1 -1
- package/lib/express/createERCMetadataMiddleware.js +12 -15
- package/lib/express/createERCMetadataMiddleware.js.map +1 -1
- package/lib/express/createTempUploadMiddleware.d.ts.map +1 -1
- package/lib/express/createTempUploadMiddleware.js +4 -8
- package/lib/express/createTempUploadMiddleware.js.map +1 -1
- package/lib/express/index.d.ts +1 -0
- package/lib/express/index.d.ts.map +1 -1
- package/lib/express/index.js +1 -0
- package/lib/express/index.js.map +1 -1
- package/lib/fastify/bulkImportHandler.js +5 -6
- package/lib/fastify/bulkImportHandler.js.map +1 -1
- package/lib/fastify/chatHandler.d.ts +4 -0
- package/lib/fastify/chatHandler.d.ts.map +1 -0
- package/lib/fastify/chatHandler.js +110 -0
- package/lib/fastify/chatHandler.js.map +1 -0
- package/lib/fastify/ercMetadataHandler.d.ts.map +1 -1
- package/lib/fastify/ercMetadataHandler.js +3 -6
- package/lib/fastify/ercMetadataHandler.js.map +1 -1
- package/lib/fastify/index.d.ts +6 -1
- package/lib/fastify/index.d.ts.map +1 -1
- package/lib/fastify/index.js +28 -0
- package/lib/fastify/index.js.map +1 -1
- package/lib/fastify/mcpHandler.js +2 -2
- package/lib/fastify/mcpHandler.js.map +1 -1
- package/lib/fastify/tempUploadHandler.d.ts.map +1 -1
- package/lib/fastify/tempUploadHandler.js +3 -6
- package/lib/fastify/tempUploadHandler.js.map +1 -1
- package/lib/mcp/tools/order/schemas.d.ts +2 -2
- package/lib/mcp/tools/product/handlers/addProductMedia.d.ts +26 -1
- package/lib/mcp/tools/product/handlers/addProductMedia.d.ts.map +1 -1
- package/lib/mcp/tools/product/handlers/addProductMedia.js +4 -4
- package/lib/mcp/tools/product/handlers/addProductMedia.js.map +1 -1
- package/lib/mcp/tools/product/handlers/updateProduct.d.ts.map +1 -1
- package/lib/mcp/tools/product/handlers/updateProduct.js +10 -2
- package/lib/mcp/tools/product/handlers/updateProduct.js.map +1 -1
- package/lib/mcp/tools/product/schemas.d.ts +62 -62
- package/lib/mcp/tools/product/schemas.d.ts.map +1 -1
- package/lib/mcp/tools/product/schemas.js +3 -3
- package/lib/mcp/tools/product/schemas.js.map +1 -1
- package/lib/mcp/tools/users/schemas.d.ts +16 -16
- package/lib/mcp/utils/getNormalizedProductDetails.d.ts.map +1 -1
- package/lib/mcp/utils/getNormalizedProductDetails.js +3 -1
- package/lib/mcp/utils/getNormalizedProductDetails.js.map +1 -1
- package/lib/resolvers/mutations/index.d.ts +4 -1
- package/lib/resolvers/mutations/index.d.ts.map +1 -1
- package/lib/resolvers/mutations/index.js +8 -2
- package/lib/resolvers/mutations/index.js.map +1 -1
- package/lib/resolvers/mutations/orders/checkoutCart.js +1 -1
- package/lib/resolvers/mutations/orders/checkoutCart.js.map +1 -1
- package/lib/resolvers/mutations/orders/updateCart.js +6 -6
- package/lib/resolvers/mutations/orders/updateCart.js.map +1 -1
- package/lib/resolvers/mutations/orders/updateCartDeliveryPickUp.d.ts +8 -0
- package/lib/resolvers/mutations/orders/updateCartDeliveryPickUp.d.ts.map +1 -0
- package/lib/resolvers/mutations/orders/updateCartDeliveryPickUp.js +38 -0
- package/lib/resolvers/mutations/orders/updateCartDeliveryPickUp.js.map +1 -0
- package/lib/resolvers/mutations/orders/updateCartDeliveryShipping.d.ts +8 -0
- package/lib/resolvers/mutations/orders/updateCartDeliveryShipping.d.ts.map +1 -0
- package/lib/resolvers/mutations/orders/updateCartDeliveryShipping.js +38 -0
- package/lib/resolvers/mutations/orders/updateCartDeliveryShipping.js.map +1 -0
- package/lib/resolvers/mutations/orders/updateCartPaymentGeneric.d.ts +7 -0
- package/lib/resolvers/mutations/orders/updateCartPaymentGeneric.d.ts.map +1 -0
- package/lib/resolvers/mutations/orders/updateCartPaymentGeneric.js +37 -0
- package/lib/resolvers/mutations/orders/updateCartPaymentGeneric.js.map +1 -0
- package/lib/resolvers/mutations/orders/updateCartPaymentInvoice.d.ts +7 -0
- package/lib/resolvers/mutations/orders/updateCartPaymentInvoice.d.ts.map +1 -0
- package/lib/resolvers/mutations/orders/updateCartPaymentInvoice.js +37 -0
- package/lib/resolvers/mutations/orders/updateCartPaymentInvoice.js.map +1 -0
- package/lib/resolvers/mutations/products/updateProductCommerce.d.ts.map +1 -1
- package/lib/resolvers/mutations/products/updateProductCommerce.js +11 -2
- package/lib/resolvers/mutations/products/updateProductCommerce.js.map +1 -1
- package/lib/resolvers/queries/shopInfo.d.ts.map +1 -1
- package/lib/resolvers/queries/shopInfo.js +49 -3
- package/lib/resolvers/queries/shopInfo.js.map +1 -1
- package/lib/resolvers/type/index.d.ts +21 -1
- package/lib/resolvers/type/index.d.ts.map +1 -1
- package/lib/resolvers/type/media-types.d.ts.map +1 -1
- package/lib/resolvers/type/media-types.js +3 -1
- package/lib/resolvers/type/media-types.js.map +1 -1
- package/lib/resolvers/type/order/order-payment-types.d.ts.map +1 -1
- package/lib/resolvers/type/order/order-payment-types.js +0 -1
- package/lib/resolvers/type/order/order-payment-types.js.map +1 -1
- package/lib/resolvers/type/price-types.d.ts +1 -1
- package/lib/resolvers/type/price-types.d.ts.map +1 -1
- package/lib/resolvers/type/price-types.js +5 -2
- package/lib/resolvers/type/price-types.js.map +1 -1
- package/lib/resolvers/type/product/product-bundle-types.d.ts +20 -0
- package/lib/resolvers/type/product/product-bundle-types.d.ts.map +1 -1
- package/lib/resolvers/type/product/product-bundle-types.js +2 -2
- package/lib/resolvers/type/product/product-bundle-types.js.map +1 -1
- package/lib/resolvers/type/shop-types.d.ts.map +1 -1
- package/lib/resolvers/type/shop-types.js.map +1 -1
- package/lib/schema/mutation.d.ts.map +1 -1
- package/lib/schema/mutation.js +36 -7
- package/lib/schema/mutation.js.map +1 -1
- package/lib/schema/query.d.ts.map +1 -1
- package/lib/schema/query.js +2 -0
- package/lib/schema/query.js.map +1 -1
- package/lib/schema/types/payment.d.ts.map +1 -1
- package/lib/schema/types/payment.js +0 -5
- package/lib/schema/types/payment.js.map +1 -1
- package/lib/schema/types/product/bundle-product.d.ts.map +1 -1
- package/lib/schema/types/product/bundle-product.js +18 -7
- package/lib/schema/types/product/bundle-product.js.map +1 -1
- package/lib/schema/types/shop.d.ts.map +1 -1
- package/lib/schema/types/shop.js +3 -0
- package/lib/schema/types/shop.js.map +1 -1
- package/package.json +18 -8
- package/src/chat/defaultSystemPrompt.ts +7 -0
- package/src/chat/generateImageHandler.ts +78 -0
- package/src/chat/normalizeToolsIndex.ts +11 -0
- package/src/chat/utils.ts +31 -0
- package/src/context.ts +3 -0
- package/src/express/chatHandler.ts +147 -0
- package/src/express/createBulkImportMiddleware.ts +7 -7
- package/src/express/createERCMetadataMiddleware.ts +13 -15
- package/src/express/createTempUploadMiddleware.ts +4 -9
- package/src/express/index.ts +2 -0
- package/src/fastify/bulkImportHandler.ts +6 -6
- package/src/fastify/chatHandler.ts +140 -0
- package/src/fastify/ercMetadataHandler.ts +3 -6
- package/src/fastify/index.ts +37 -1
- package/src/fastify/mcpHandler.ts +2 -2
- package/src/fastify/tempUploadHandler.ts +3 -6
- package/src/mcp/tools/product/handlers/addProductMedia.ts +4 -5
- package/src/mcp/tools/product/handlers/updateProduct.ts +12 -1
- package/src/mcp/tools/product/schemas.ts +7 -3
- package/src/mcp/utils/getNormalizedProductDetails.ts +4 -1
- package/src/resolvers/mutations/index.ts +8 -2
- package/src/resolvers/mutations/orders/checkoutCart.ts +1 -1
- package/src/resolvers/mutations/orders/updateCart.ts +6 -6
- package/src/resolvers/mutations/orders/updateCartDeliveryPickUp.ts +51 -0
- package/src/resolvers/mutations/orders/updateCartDeliveryShipping.ts +51 -0
- package/src/resolvers/mutations/orders/updateCartPaymentGeneric.ts +50 -0
- package/src/resolvers/mutations/orders/updateCartPaymentInvoice.ts +50 -0
- package/src/resolvers/mutations/products/updateProductCommerce.ts +12 -4
- package/src/resolvers/queries/shopInfo.ts +49 -3
- package/src/resolvers/type/media-types.ts +4 -1
- package/src/resolvers/type/order/order-payment-types.ts +0 -1
- package/src/resolvers/type/price-types.ts +5 -3
- package/src/resolvers/type/product/product-bundle-types.ts +2 -2
- package/src/resolvers/type/shop-types.ts +0 -1
- package/src/schema/mutation.ts +36 -7
- package/src/schema/query.ts +2 -0
- package/src/schema/types/payment.ts +0 -5
- package/src/schema/types/product/bundle-product.ts +18 -7
- package/src/schema/types/shop.ts +3 -0
- package/src/resolvers/mutations/orders/updateOrderPaymentCard.ts +0 -37
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import { log } from '@unchainedshop/logger';
|
|
2
|
-
import {
|
|
2
|
+
import { ProductTypes } from '@unchainedshop/core-products';
|
|
3
|
+
import { ProductNotFoundError, InvalidIdError, ProductWrongTypeError } from '../../../errors.js';
|
|
3
4
|
export default async function updateProductCommerce(root, { commerce, productId }, { modules, userId }) {
|
|
4
5
|
log(`mutation updateProductCommerce ${productId}`, { userId });
|
|
5
6
|
if (!productId)
|
|
6
7
|
throw new InvalidIdError({ productId });
|
|
7
|
-
|
|
8
|
+
const product = await modules.products.findProduct({ productId });
|
|
9
|
+
if (!product)
|
|
8
10
|
throw new ProductNotFoundError({ productId });
|
|
11
|
+
if (product.type === ProductTypes.ConfigurableProduct) {
|
|
12
|
+
throw new ProductWrongTypeError({
|
|
13
|
+
productId: productId,
|
|
14
|
+
received: product.type,
|
|
15
|
+
required: { not: ProductTypes.ConfigurableProduct },
|
|
16
|
+
});
|
|
17
|
+
}
|
|
9
18
|
await modules.products.update(productId, { commerce });
|
|
10
19
|
return modules.products.findProduct({ productId });
|
|
11
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateProductCommerce.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/products/updateProductCommerce.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"updateProductCommerce.js","sourceRoot":"","sources":["../../../../src/resolvers/mutations/products/updateProductCommerce.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAmB,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAGjG,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,qBAAqB,CACjD,IAAW,EACX,EAAE,QAAQ,EAAE,SAAS,EAAoD,EACzE,EAAE,OAAO,EAAE,MAAM,EAAW;IAE5B,GAAG,CAAC,kCAAkC,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAE/D,IAAI,CAAC,SAAS;QAAE,MAAM,IAAI,cAAc,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAExD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAClE,IAAI,CAAC,OAAO;QAAE,MAAM,IAAI,oBAAoB,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAE5D,IAAI,OAAO,CAAC,IAAI,KAAK,YAAY,CAAC,mBAAmB,EAAE,CAAC;QACtD,MAAM,IAAI,qBAAqB,CAAC;YAC9B,SAAS,EAAE,SAAS;YACpB,QAAQ,EAAE,OAAO,CAAC,IAAI;YACtB,QAAQ,EAAE,EAAE,GAAG,EAAE,YAAY,CAAC,mBAAmB,EAAE;SACpD,CAAC,CAAC;IACL,CAAC;IAED,MAAM,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;IAEvD,OAAO,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shopInfo.d.ts","sourceRoot":"","sources":["../../../src/resolvers/queries/shopInfo.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shopInfo.d.ts","sourceRoot":"","sources":["../../../src/resolvers/queries/shopInfo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAG3C,MAAM,CAAC,OAAO,UAAU,QAAQ,CAC9B,IAAI,EAAE,KAAK,EACX,CAAC,EAAE,KAAK,EACR,OAAO,EAAE,OAAO,GACf;IACD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACpC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAiEA"}
|
|
@@ -1,12 +1,22 @@
|
|
|
1
|
+
import { readFile } from 'fs/promises';
|
|
1
2
|
import { log } from '@unchainedshop/logger';
|
|
2
3
|
export default function shopInfo(root, _, context) {
|
|
3
|
-
const { adminUiConfig } = context;
|
|
4
|
+
const { adminUiConfig, modules } = context;
|
|
4
5
|
log('query shopInfo', { userId: context.userId });
|
|
5
6
|
return {
|
|
6
7
|
version: context.version,
|
|
7
8
|
adminUiConfig: {
|
|
8
|
-
customProperties:
|
|
9
|
-
|
|
9
|
+
customProperties: async () => {
|
|
10
|
+
try {
|
|
11
|
+
const raw = await readFile(process.env.UNCHAINED_ADMIN_UI_CUSTOM_PROPERTIES, 'utf-8');
|
|
12
|
+
const parsed = JSON.parse(raw);
|
|
13
|
+
return parsed;
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
return adminUiConfig?.customProperties ?? [];
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
singleSignOnURL: process.env.UNCHAINED_ADMIN_UI_SINGLE_SIGN_ON_URL || adminUiConfig?.singleSignOnURL,
|
|
10
20
|
externalLinks: () => {
|
|
11
21
|
try {
|
|
12
22
|
const parsed = JSON.parse(process.env.EXTERNAL_LINKS);
|
|
@@ -16,6 +26,42 @@ export default function shopInfo(root, _, context) {
|
|
|
16
26
|
return [];
|
|
17
27
|
}
|
|
18
28
|
},
|
|
29
|
+
productTags: async () => {
|
|
30
|
+
const existingProductTags = await modules.products.existingTags();
|
|
31
|
+
const envTags = (process.env.UNCHAINED_ADMIN_UI_DEFAULT_PRODUCT_TAGS || '')
|
|
32
|
+
.split(',')
|
|
33
|
+
.map((t) => t.trim())
|
|
34
|
+
.filter(Boolean);
|
|
35
|
+
const normalizedDefaultTags = envTags?.length
|
|
36
|
+
? envTags
|
|
37
|
+
: (adminUiConfig?.defaultProductTags || []).filter(Boolean);
|
|
38
|
+
const normalizedTags = Array.from(new Set(normalizedDefaultTags.concat(existingProductTags)));
|
|
39
|
+
return normalizedTags;
|
|
40
|
+
},
|
|
41
|
+
assortmentTags: async () => {
|
|
42
|
+
const existingAssortmentTags = await modules.assortments.existingTags();
|
|
43
|
+
const envTags = (process.env.UNCHAINED_ADMIN_UI_DEFAULT_ASSORTMENT_TAGS || '')
|
|
44
|
+
.split(',')
|
|
45
|
+
.map((t) => t.trim())
|
|
46
|
+
.filter(Boolean);
|
|
47
|
+
const normalizedDefaultTags = envTags?.length
|
|
48
|
+
? envTags
|
|
49
|
+
: (adminUiConfig?.defaultAssortmentTags || []).filter(Boolean);
|
|
50
|
+
const normalizedTags = Array.from(new Set(normalizedDefaultTags.concat(existingAssortmentTags)));
|
|
51
|
+
return normalizedTags;
|
|
52
|
+
},
|
|
53
|
+
userTags: async () => {
|
|
54
|
+
const existingUserTags = await modules.users.existingTags();
|
|
55
|
+
const envTags = (process.env.UNCHAINED_ADMIN_UI_DEFAULT_USER_TAGS || '')
|
|
56
|
+
.split(',')
|
|
57
|
+
.map((t) => t.trim())
|
|
58
|
+
.filter(Boolean);
|
|
59
|
+
const normalizedDefaultTags = envTags?.length
|
|
60
|
+
? envTags
|
|
61
|
+
: (adminUiConfig?.defaultUserTags || []).filter(Boolean);
|
|
62
|
+
const normalizedTags = Array.from(new Set(normalizedDefaultTags.concat(existingUserTags)));
|
|
63
|
+
return normalizedTags;
|
|
64
|
+
},
|
|
19
65
|
},
|
|
20
66
|
vapidPublicKey: process.env?.PUSH_NOTIFICATION_PUBLIC_KEY,
|
|
21
67
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shopInfo.js","sourceRoot":"","sources":["../../../src/resolvers/queries/shopInfo.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shopInfo.js","sourceRoot":"","sources":["../../../src/resolvers/queries/shopInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,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gBAC5D,MAAM,OAAO,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,oCAAoC,IAAI,EAAE,CAAC;qBACrE,KAAK,CAAC,GAAG,CAAC;qBACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;qBACpB,MAAM,CAAC,OAAO,CAAC,CAAC;gBACnB,MAAM,qBAAqB,GAAG,OAAO,EAAE,MAAM;oBAC3C,CAAC,CAAC,OAAO;oBACT,CAAC,CAAC,CAAC,aAAa,EAAE,eAAe,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBAC3D,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,qBAAqB,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;gBAC3F,OAAO,cAAc,CAAC;YACxB,CAAC;SACF;QACD,cAAc,EAAE,OAAO,CAAC,GAAG,EAAE,4BAA4B;KAC1D,CAAC;AACJ,CAAC;AAED,EAAE"}
|
|
@@ -50,6 +50,26 @@ declare const types: {
|
|
|
50
50
|
Bookmark: import("./bookmark-types.js").BookmarkHelperTypes;
|
|
51
51
|
BundleProduct: {
|
|
52
52
|
bundleItems(product: any): import("@unchainedshop/core-products").ProductBundleItem[];
|
|
53
|
+
catalogPrice(product: import("@unchainedshop/core-products").Product, { quantity, currencyCode: forcedCurrencyCode }: {
|
|
54
|
+
quantity?: number;
|
|
55
|
+
currencyCode?: string;
|
|
56
|
+
}, requestContext: import("../../context.js").Context): Promise<import("@unchainedshop/core-products").ProductPrice>;
|
|
57
|
+
simulatedPrice(product: import("@unchainedshop/core-products").Product, { currencyCode: forcedCurrencyCode, quantity, useNetPrice, configuration, }: {
|
|
58
|
+
quantity?: number;
|
|
59
|
+
currencyCode?: string;
|
|
60
|
+
useNetPrice?: boolean;
|
|
61
|
+
configuration?: import("@unchainedshop/core-products").ProductConfiguration[];
|
|
62
|
+
}, requestContext: import("../../context.js").Context): Promise<import("@unchainedshop/core-products").ProductPrice>;
|
|
63
|
+
leveledCatalogPrices(product: import("@unchainedshop/core-products").Product, { currencyCode: forcedCurrencyCode }: {
|
|
64
|
+
currencyCode?: string;
|
|
65
|
+
}, requestContext: import("../../context.js").Context): Promise<{
|
|
66
|
+
minQuantity: number;
|
|
67
|
+
maxQuantity: number;
|
|
68
|
+
price: import("@unchainedshop/core-products").ProductPrice;
|
|
69
|
+
}[]>;
|
|
70
|
+
salesUnit({ commerce }: import("@unchainedshop/core-products").Product): string;
|
|
71
|
+
salesQuantityPerUnit({ commerce }: import("@unchainedshop/core-products").Product): string;
|
|
72
|
+
defaultOrderQuantity({ commerce }: import("@unchainedshop/core-products").Product): number;
|
|
53
73
|
__resolveType: (product: import("@unchainedshop/core-products").Product) => string;
|
|
54
74
|
proxies(product: import("@unchainedshop/core-products").Product, _: never, context: import("../../context.js").Context): Promise<import("@unchainedshop/core-products").Product[]>;
|
|
55
75
|
assortmentPaths(product: import("@unchainedshop/core-products").Product, params: {
|
|
@@ -535,7 +555,7 @@ declare const types: {
|
|
|
535
555
|
isTaxable({ isTaxable }: import("./price-types.js").PriceType): boolean;
|
|
536
556
|
isNetPrice({ isNetPrice }: import("./price-types.js").PriceType): boolean;
|
|
537
557
|
currencyCode(obj: import("./price-types.js").PriceType): string;
|
|
538
|
-
amount(obj: import("./price-types.js").PriceType):
|
|
558
|
+
amount(obj: import("./price-types.js").PriceType): string | 0;
|
|
539
559
|
};
|
|
540
560
|
Product: {
|
|
541
561
|
__resolveType: (product: import("@unchainedshop/core-products").Product) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resolvers/type/index.ts"],"names":[],"mappings":"AAuEA,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;gBA1C+C,CAAC;;;;uBAW1D,CAAC;;;uBAKO,CAAC;uBAA2B,CAAC;;;mBAC6B,CAAC;;;;;;;;;;;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C;;;;;;;uBAaA,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyF1D,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-types.d.ts","sourceRoot":"","sources":["../../../src/resolvers/type/media-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAkB,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"media-types.d.ts","sourceRoot":"","sources":["../../../src/resolvers/type/media-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAkB,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAM3C,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CAC7F;AAED,eAAO,MAAM,KAAK,EAAE,gBAcnB,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { getFileAdapter } from '@unchainedshop/core-files';
|
|
2
2
|
import { checkAction } from '../../acl.js';
|
|
3
3
|
import { actions } from '../../roles/index.js';
|
|
4
|
+
import { createLogger } from '@unchainedshop/logger';
|
|
5
|
+
const logger = createLogger('unchained:api');
|
|
4
6
|
export const Media = {
|
|
5
7
|
url: async (file, params, context) => {
|
|
6
8
|
const { modules } = context;
|
|
@@ -13,7 +15,7 @@ export const Media = {
|
|
|
13
15
|
return modules.files.normalizeUrl(url, params);
|
|
14
16
|
}
|
|
15
17
|
catch (e) {
|
|
16
|
-
|
|
18
|
+
logger.error(e);
|
|
17
19
|
return null;
|
|
18
20
|
}
|
|
19
21
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-types.js","sourceRoot":"","sources":["../../../src/resolvers/type/media-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE7E,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"media-types.js","sourceRoot":"","sources":["../../../src/resolvers/type/media-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE7E,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,MAAM,MAAM,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;AAK7C,MAAM,CAAC,MAAM,KAAK,GAAqB;IACrC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;QACnC,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;QAC5B,IAAI,CAAC;YACH,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;YACjE,IAAI,CAAC,IAAI;gBAAE,OAAO,IAAI,CAAC;YACvB,MAAM,iBAAiB,GAAG,cAAc,EAAE,CAAC;YAC3C,MAAM,GAAG,GAAG,MAAM,iBAAiB,CAAC,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;YAC7E,OAAO,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QACjD,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAChB,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-payment-types.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/type/order/order-payment-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"order-payment-types.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/type/order/order-payment-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAS9E,eAAO,MAAM,YAAY;yBACI,gBAAgB,eAAe,OAAO;CAWlE,CAAC"}
|
|
@@ -2,7 +2,6 @@ import { PaymentProviderType } from '@unchainedshop/core-payment';
|
|
|
2
2
|
import { objectInvert } from '@unchainedshop/utils';
|
|
3
3
|
const OrderPaymentMap = {
|
|
4
4
|
OrderPaymentGeneric: PaymentProviderType.GENERIC,
|
|
5
|
-
OrderPaymentCard: PaymentProviderType.CARD,
|
|
6
5
|
OrderPaymentInvoice: PaymentProviderType.INVOICE,
|
|
7
6
|
};
|
|
8
7
|
export const OrderPayment = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-payment-types.js","sourceRoot":"","sources":["../../../../src/resolvers/type/order/order-payment-types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,MAAM,eAAe,GAAG;IACtB,mBAAmB,EAAE,mBAAmB,CAAC,OAAO;IAChD,
|
|
1
|
+
{"version":3,"file":"order-payment-types.js","sourceRoot":"","sources":["../../../../src/resolvers/type/order/order-payment-types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,MAAM,eAAe,GAAG;IACtB,mBAAmB,EAAE,mBAAmB,CAAC,OAAO;IAChD,mBAAmB,EAAE,mBAAmB,CAAC,OAAO;CACjD,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,aAAa,EAAE,KAAK,EAAE,GAAqB,EAAE,EAAE,OAAO,EAAW,EAAE,EAAE;QACnE,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,qBAAqB,CAAC,IAAI,CAAC;YACxD,iBAAiB,EAAE,GAAG,CAAC,iBAAiB;SACzC,CAAC,CAAC;QAEH,MAAM,oBAAoB,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;QAC3D,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,oBAAoB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC7C,CAAC;QACD,OAAO,oBAAoB,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;CACF,CAAC"}
|
|
@@ -10,6 +10,6 @@ export declare const Price: {
|
|
|
10
10
|
isTaxable({ isTaxable }: PriceType): boolean;
|
|
11
11
|
isNetPrice({ isNetPrice }: PriceType): boolean;
|
|
12
12
|
currencyCode(obj: PriceType): string;
|
|
13
|
-
amount(obj: PriceType):
|
|
13
|
+
amount(obj: PriceType): string | 0;
|
|
14
14
|
};
|
|
15
15
|
//# sourceMappingURL=price-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"price-types.d.ts","sourceRoot":"","sources":["../../../src/resolvers/type/price-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"price-types.d.ts","sourceRoot":"","sources":["../../../src/resolvers/type/price-types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,KAAK;6BACS,SAAS;+BAGP,SAAS;sBAGlB,SAAS;gBAGf,SAAS;CAUtB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import accounting from 'accounting';
|
|
2
1
|
export const Price = {
|
|
3
2
|
isTaxable({ isTaxable }) {
|
|
4
3
|
return isTaxable || false;
|
|
@@ -11,7 +10,11 @@ export const Price = {
|
|
|
11
10
|
},
|
|
12
11
|
amount(obj) {
|
|
13
12
|
if (obj.amount) {
|
|
14
|
-
return
|
|
13
|
+
return Number(obj.amount).toLocaleString(undefined, {
|
|
14
|
+
minimumFractionDigits: 0,
|
|
15
|
+
maximumFractionDigits: 0,
|
|
16
|
+
useGrouping: false,
|
|
17
|
+
});
|
|
15
18
|
}
|
|
16
19
|
return 0;
|
|
17
20
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"price-types.js","sourceRoot":"","sources":["../../../src/resolvers/type/price-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"price-types.js","sourceRoot":"","sources":["../../../src/resolvers/type/price-types.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,SAAS,CAAC,EAAE,SAAS,EAAa;QAChC,OAAO,SAAS,IAAI,KAAK,CAAC;IAC5B,CAAC;IACD,UAAU,CAAC,EAAE,UAAU,EAAa;QAClC,OAAO,UAAU,IAAI,KAAK,CAAC;IAC7B,CAAC;IACD,YAAY,CAAC,GAAc;QACzB,OAAO,GAAG,EAAE,YAAY,CAAC;IAC3B,CAAC;IACD,MAAM,CAAC,GAAc;QACnB,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;YACf,OAAO,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,SAAS,EAAE;gBAClD,qBAAqB,EAAE,CAAC;gBACxB,qBAAqB,EAAE,CAAC;gBACxB,WAAW,EAAE,KAAK;aACnB,CAAC,CAAC;QACL,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;CACF,CAAC"}
|
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
import { ProductBundleItem } from '@unchainedshop/core-products';
|
|
2
2
|
export declare const BundleProduct: {
|
|
3
3
|
bundleItems(product: any): ProductBundleItem[];
|
|
4
|
+
catalogPrice(product: import("@unchainedshop/core-products").Product, { quantity, currencyCode: forcedCurrencyCode }: {
|
|
5
|
+
quantity?: number;
|
|
6
|
+
currencyCode?: string;
|
|
7
|
+
}, requestContext: import("../../../context.js").Context): Promise<import("@unchainedshop/core-products").ProductPrice>;
|
|
8
|
+
simulatedPrice(product: import("@unchainedshop/core-products").Product, { currencyCode: forcedCurrencyCode, quantity, useNetPrice, configuration, }: {
|
|
9
|
+
quantity?: number;
|
|
10
|
+
currencyCode?: string;
|
|
11
|
+
useNetPrice?: boolean;
|
|
12
|
+
configuration?: import("@unchainedshop/core-products").ProductConfiguration[];
|
|
13
|
+
}, requestContext: import("../../../context.js").Context): Promise<import("@unchainedshop/core-products").ProductPrice>;
|
|
14
|
+
leveledCatalogPrices(product: import("@unchainedshop/core-products").Product, { currencyCode: forcedCurrencyCode }: {
|
|
15
|
+
currencyCode?: string;
|
|
16
|
+
}, requestContext: import("../../../context.js").Context): Promise<{
|
|
17
|
+
minQuantity: number;
|
|
18
|
+
maxQuantity: number;
|
|
19
|
+
price: import("@unchainedshop/core-products").ProductPrice;
|
|
20
|
+
}[]>;
|
|
21
|
+
salesUnit({ commerce }: import("@unchainedshop/core-products").Product): string;
|
|
22
|
+
salesQuantityPerUnit({ commerce }: import("@unchainedshop/core-products").Product): string;
|
|
23
|
+
defaultOrderQuantity({ commerce }: import("@unchainedshop/core-products").Product): number;
|
|
4
24
|
__resolveType: (product: import("@unchainedshop/core-products").Product) => string;
|
|
5
25
|
proxies(product: import("@unchainedshop/core-products").Product, _: never, context: import("../../../context.js").Context): Promise<import("@unchainedshop/core-products").Product[]>;
|
|
6
26
|
assortmentPaths(product: import("@unchainedshop/core-products").Product, params: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-bundle-types.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-bundle-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGjE,eAAO,MAAM,aAAa;+BAGF,iBAAiB,EAAE
|
|
1
|
+
{"version":3,"file":"product-bundle-types.d.ts","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-bundle-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGjE,eAAO,MAAM,aAAa;+BAGF,iBAAiB,EAAE;;gBAIkC,CAAC;oBAAsB,CAAC;;;gBAA+e,CAAC;oBAA4B,CAAC;mBAA2B,CAAC;qBAA8B,CAAC;;;oBAA4yB,CAAC;;;;;;;;;;;;mBAAxzB,CAAC;;;;;;;YAAwoB,CAAC;;;mBAAmiB,CAAC;aAAqB,CAAC;cAAsB,CAAC;YAAoB,CAAC;;;mBAA8T,CAAC;;;oBAAuP,CAAC;;;;;;;mBAAu6B,CAAC;;CADh3G,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-bundle-types.js","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-bundle-types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"product-bundle-types.js","sourceRoot":"","sources":["../../../../src/resolvers/type/product/product-bundle-types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,GAAG,WAAW;IAEd,WAAW,CAAC,OAAO;QACjB,OAAO,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;IACxD,CAAC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shop-types.d.ts","sourceRoot":"","sources":["../../../src/resolvers/type/shop-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAIzD,KAAK,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"shop-types.d.ts","sourceRoot":"","sources":["../../../src/resolvers/type/shop-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAIzD,KAAK,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;AAClF,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,MAAM,CAAC;IAClB,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC7B,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC/B,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;CACjC;AAED,eAAO,MAAM,IAAI,EAAE,eAkBlB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shop-types.js","sourceRoot":"","sources":["../../../src/resolvers/type/shop-types.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"shop-types.js","sourceRoot":"","sources":["../../../src/resolvers/type/shop-types.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAUzD,MAAM,CAAC,MAAM,IAAI,GAAoB;IACnC,GAAG;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;QACtD,OAAO,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;IACnE,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,EAAE;QAC1D,OAAO,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;QAC3C,MAAM,WAAW,CAAC,OAAO,EAAG,OAAe,CAAC,WAAW,CAAC,CAAC;QACzD,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;aAC3B,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC;aACvB,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC;IACrD,CAAC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutation.d.ts","sourceRoot":"","sources":["../../src/schema/mutation.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"mutation.d.ts","sourceRoot":"","sources":["../../src/schema/mutation.ts"],"names":[],"mappings":";AAAA,wBAm5BE"}
|
package/lib/schema/mutation.js
CHANGED
|
@@ -226,12 +226,44 @@ export default [
|
|
|
226
226
|
doesn’t exists new delivery provider will be created with the provided ID.
|
|
227
227
|
"""
|
|
228
228
|
setOrderDeliveryProvider(orderId: ID!, deliveryProviderId: ID!): Order!
|
|
229
|
+
@deprecated(reason: "Use updateCart or updateCartDelivery* mutations instead")
|
|
229
230
|
|
|
230
231
|
"""
|
|
231
232
|
Change the payment method/provider to an order. If the payment provider
|
|
232
233
|
doesn’t exists new payment provider will be created with the provided ID.
|
|
233
234
|
"""
|
|
234
235
|
setOrderPaymentProvider(orderId: ID!, paymentProviderId: ID!): Order!
|
|
236
|
+
@deprecated(reason: "Use updateCart or updateCartPayment* mutations instead")
|
|
237
|
+
|
|
238
|
+
"""
|
|
239
|
+
Update the cart by changing the delivery provider and using a shipping specific configuration
|
|
240
|
+
"""
|
|
241
|
+
updateCartDeliveryShipping(
|
|
242
|
+
orderId: ID
|
|
243
|
+
deliveryProviderId: ID!
|
|
244
|
+
address: AddressInput
|
|
245
|
+
meta: JSON
|
|
246
|
+
): Order!
|
|
247
|
+
|
|
248
|
+
"""
|
|
249
|
+
Update the cart by changing the delivery provider and using a pick up specific configuration
|
|
250
|
+
"""
|
|
251
|
+
updateCartDeliveryPickUp(
|
|
252
|
+
orderId: ID
|
|
253
|
+
deliveryProviderId: ID!
|
|
254
|
+
orderPickUpLocationId: ID!
|
|
255
|
+
meta: JSON
|
|
256
|
+
): Order!
|
|
257
|
+
|
|
258
|
+
"""
|
|
259
|
+
Update the cart by changing the payment provider and using an invoice-type specific configuration
|
|
260
|
+
"""
|
|
261
|
+
updateCartPaymentInvoice(orderId: ID, paymentProviderId: ID!, meta: JSON): Order!
|
|
262
|
+
|
|
263
|
+
"""
|
|
264
|
+
Update the cart by changing the payment provider and using a generic specific configuration
|
|
265
|
+
"""
|
|
266
|
+
updateCartPaymentGeneric(orderId: ID, paymentProviderId: ID!, meta: JSON): Order!
|
|
235
267
|
|
|
236
268
|
"""
|
|
237
269
|
Update a Shipping Delivery Provider's specific configuration
|
|
@@ -240,7 +272,7 @@ export default [
|
|
|
240
272
|
orderDeliveryId: ID!
|
|
241
273
|
address: AddressInput
|
|
242
274
|
meta: JSON
|
|
243
|
-
): OrderDeliveryShipping!
|
|
275
|
+
): OrderDeliveryShipping! @deprecated(reason: "Use updateCartDeliveryShipping instead")
|
|
244
276
|
|
|
245
277
|
"""
|
|
246
278
|
Update a Pick Up Delivery Provider's specific configuration
|
|
@@ -249,22 +281,19 @@ export default [
|
|
|
249
281
|
orderDeliveryId: ID!
|
|
250
282
|
orderPickUpLocationId: ID!
|
|
251
283
|
meta: JSON
|
|
252
|
-
): OrderDeliveryPickUp!
|
|
253
|
-
|
|
254
|
-
"""
|
|
255
|
-
Update a Card Payment Provider's specific configuration
|
|
256
|
-
"""
|
|
257
|
-
updateOrderPaymentCard(orderPaymentId: ID!, meta: JSON): OrderPaymentCard!
|
|
284
|
+
): OrderDeliveryPickUp! @deprecated(reason: "Use updateCartDeliveryPickUp instead")
|
|
258
285
|
|
|
259
286
|
"""
|
|
260
287
|
Update an Invoice Payment Provider's specific configuration
|
|
261
288
|
"""
|
|
262
289
|
updateOrderPaymentInvoice(orderPaymentId: ID!, meta: JSON): OrderPaymentInvoice!
|
|
290
|
+
@deprecated(reason: "Use updateCartPaymentInvoice instead")
|
|
263
291
|
|
|
264
292
|
"""
|
|
265
293
|
Update a Generic Payment Provider's specific configuration
|
|
266
294
|
"""
|
|
267
295
|
updateOrderPaymentGeneric(orderPaymentId: ID!, meta: JSON): OrderPaymentGeneric!
|
|
296
|
+
@deprecated(reason: "Use updateCartPaymentGeneric instead")
|
|
268
297
|
|
|
269
298
|
"""
|
|
270
299
|
Remove an order while it's still open
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutation.js","sourceRoot":"","sources":["../../src/schema/mutation.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,aAAa,CAAC
|
|
1
|
+
{"version":3,"file":"mutation.js","sourceRoot":"","sources":["../../src/schema/mutation.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAi5Bb;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/schema/query.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/schema/query.ts"],"names":[],"mappings":";AAAA,wBAqgBE"}
|
package/lib/schema/query.js
CHANGED
|
@@ -22,6 +22,7 @@ export default [
|
|
|
22
22
|
sort: [SortOptionInput!]
|
|
23
23
|
emailVerified: Boolean
|
|
24
24
|
lastLogin: DateFilterInput
|
|
25
|
+
tags: [LowerCaseString!]
|
|
25
26
|
): [User!]!
|
|
26
27
|
|
|
27
28
|
"""
|
|
@@ -32,6 +33,7 @@ export default [
|
|
|
32
33
|
queryString: String
|
|
33
34
|
emailVerified: Boolean
|
|
34
35
|
lastLogin: DateFilterInput
|
|
36
|
+
tags: [LowerCaseString!]
|
|
35
37
|
): Int!
|
|
36
38
|
|
|
37
39
|
"""
|
package/lib/schema/query.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../src/schema/query.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,aAAa,CAAC
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../src/schema/query.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmgBb;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../../src/schema/types/payment.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../../src/schema/types/payment.ts"],"names":[],"mappings":";AAAA,wBAuDE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment.js","sourceRoot":"","sources":["../../../src/schema/types/payment.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,aAAa,CAAC
|
|
1
|
+
{"version":3,"file":"payment.js","sourceRoot":"","sources":["../../../src/schema/types/payment.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDb;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle-product.d.ts","sourceRoot":"","sources":["../../../../src/schema/types/product/bundle-product.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"bundle-product.d.ts","sourceRoot":"","sources":["../../../../src/schema/types/product/bundle-product.ts"],"names":[],"mappings":";AAAA,wBAkDE"}
|
|
@@ -13,14 +13,18 @@ export default [
|
|
|
13
13
|
published: DateTime
|
|
14
14
|
media(limit: Int = 10, offset: Int = 0, tags: [LowerCaseString!]): [ProductMedia!]!
|
|
15
15
|
texts(forceLocale: Locale): ProductTexts
|
|
16
|
+
catalogPrice(quantity: Int = 1, currencyCode: String): Price
|
|
17
|
+
leveledCatalogPrices(currencyCode: String): [PriceLevel!]!
|
|
18
|
+
simulatedPrice(
|
|
19
|
+
currencyCode: String
|
|
20
|
+
useNetPrice: Boolean = false
|
|
21
|
+
quantity: Int = 1
|
|
22
|
+
configuration: [ProductConfigurationParameterInput!]
|
|
23
|
+
): Price @cacheControl(scope: PRIVATE, maxAge: 10)
|
|
24
|
+
salesUnit: String
|
|
25
|
+
salesQuantityPerUnit: String
|
|
26
|
+
defaultOrderQuantity: Int
|
|
16
27
|
bundleItems: [ProductBundleItem!]
|
|
17
|
-
reviews(
|
|
18
|
-
limit: Int = 10
|
|
19
|
-
offset: Int = 0
|
|
20
|
-
sort: [SortOptionInput!]
|
|
21
|
-
queryString: String
|
|
22
|
-
): [ProductReview!]!
|
|
23
|
-
reviewsCount(queryString: String): Int!
|
|
24
28
|
assortmentPaths: [ProductAssortmentPath!]!
|
|
25
29
|
proxies: [ConfigurableOrBundleProduct!]!
|
|
26
30
|
siblings(
|
|
@@ -29,6 +33,13 @@ export default [
|
|
|
29
33
|
offset: Int = 0
|
|
30
34
|
includeInactive: Boolean = false
|
|
31
35
|
): [Product!]!
|
|
36
|
+
reviews(
|
|
37
|
+
limit: Int = 10
|
|
38
|
+
offset: Int = 0
|
|
39
|
+
sort: [SortOptionInput!]
|
|
40
|
+
queryString: String
|
|
41
|
+
): [ProductReview!]!
|
|
42
|
+
reviewsCount(queryString: String): Int!
|
|
32
43
|
}
|
|
33
44
|
|
|
34
45
|
type ProductBundleItem @cacheControl(maxAge: 180) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle-product.js","sourceRoot":"","sources":["../../../../src/schema/types/product/bundle-product.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,aAAa,CAAC
|
|
1
|
+
{"version":3,"file":"bundle-product.js","sourceRoot":"","sources":["../../../../src/schema/types/product/bundle-product.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDb;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shop.d.ts","sourceRoot":"","sources":["../../../src/schema/types/shop.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"shop.d.ts","sourceRoot":"","sources":["../../../src/schema/types/shop.ts"],"names":[],"mappings":";AAAA,wBA0CE"}
|
package/lib/schema/types/shop.js
CHANGED
|
@@ -25,6 +25,9 @@ export default [
|
|
|
25
25
|
customProperties: [AdminUiConfigCustomEntityInterface!]!
|
|
26
26
|
externalLinks: [AdminUiLink!]!
|
|
27
27
|
singleSignOnURL: String
|
|
28
|
+
productTags: [String!]!
|
|
29
|
+
assortmentTags: [String!]!
|
|
30
|
+
userTags: [String!]!
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
type Shop @cacheControl(maxAge: 180) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shop.js","sourceRoot":"","sources":["../../../src/schema/types/shop.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,aAAa,CAAC
|
|
1
|
+
{"version":3,"file":"shop.js","sourceRoot":"","sources":["../../../src/schema/types/shop.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCb;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unchainedshop/api",
|
|
3
|
-
"version": "4.0.0-rc.
|
|
3
|
+
"version": "4.0.0-rc.16",
|
|
4
4
|
"main": "lib/api-index.js",
|
|
5
5
|
"types": "lib/api-index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -35,8 +35,10 @@
|
|
|
35
35
|
"@fastify/cookie": ">= 11 < 12",
|
|
36
36
|
"@fastify/session": ">= 11 < 12",
|
|
37
37
|
"@fastify/multipart": ">= 9 < 10",
|
|
38
|
+
"@fastify/static": ">= 8 < 9",
|
|
38
39
|
"connect-mongo": ">= 5.1 < 6",
|
|
39
40
|
"@modelcontextprotocol/sdk": ">= 1 < 2",
|
|
41
|
+
"ai": ">= 5 < 6",
|
|
40
42
|
"express": ">= 5 < 6",
|
|
41
43
|
"express-session": ">= 1.18 < 2",
|
|
42
44
|
"multer": ">= 2 < 3",
|
|
@@ -49,6 +51,9 @@
|
|
|
49
51
|
"@modelcontextprotocol/sdk": {
|
|
50
52
|
"optional": false
|
|
51
53
|
},
|
|
54
|
+
"ai": {
|
|
55
|
+
"optional": true
|
|
56
|
+
},
|
|
52
57
|
"graphql-yoga": {
|
|
53
58
|
"optional": false
|
|
54
59
|
},
|
|
@@ -67,6 +72,9 @@
|
|
|
67
72
|
"@fastify/session": {
|
|
68
73
|
"optional": true
|
|
69
74
|
},
|
|
75
|
+
"@fastify/static": {
|
|
76
|
+
"optional": true
|
|
77
|
+
},
|
|
70
78
|
"express": {
|
|
71
79
|
"optional": true
|
|
72
80
|
},
|
|
@@ -87,25 +95,27 @@
|
|
|
87
95
|
}
|
|
88
96
|
},
|
|
89
97
|
"dependencies": {
|
|
90
|
-
"@unchainedshop/core": "^4.0.0-rc.
|
|
91
|
-
"@unchainedshop/events": "^4.0.0-rc.
|
|
92
|
-
"@unchainedshop/logger": "^4.0.0-rc.
|
|
93
|
-
"@unchainedshop/roles": "^4.0.0-rc.
|
|
94
|
-
"@unchainedshop/utils": "^4.0.0-rc.
|
|
95
|
-
"
|
|
98
|
+
"@unchainedshop/core": "^4.0.0-rc.15",
|
|
99
|
+
"@unchainedshop/events": "^4.0.0-rc.15",
|
|
100
|
+
"@unchainedshop/logger": "^4.0.0-rc.15",
|
|
101
|
+
"@unchainedshop/roles": "^4.0.0-rc.15",
|
|
102
|
+
"@unchainedshop/utils": "^4.0.0-rc.15",
|
|
103
|
+
"file-type": "^21.0.0",
|
|
96
104
|
"dataloader": "^2.2.3",
|
|
97
105
|
"expiry-map": "^2.0.0",
|
|
98
106
|
"graphql-scalars": "^1.24.2",
|
|
99
107
|
"moniker": "0.1.2",
|
|
100
108
|
"p-memoize": "^8.0.0",
|
|
101
|
-
"zod": "^3.25.76"
|
|
109
|
+
"zod": "^3.25.76 || ^4"
|
|
102
110
|
},
|
|
103
111
|
"devDependencies": {
|
|
112
|
+
"ai": "^5.0.5",
|
|
104
113
|
"@noble/curves": "^2.0.0",
|
|
105
114
|
"@noble/hashes": "^2.0.0",
|
|
106
115
|
"@fastify/cookie": "^11.0.2",
|
|
107
116
|
"@fastify/multipart": "^9.0.3",
|
|
108
117
|
"@fastify/session": "^11.1.0",
|
|
118
|
+
"@fastify/static": "^8.2.0",
|
|
109
119
|
"@modelcontextprotocol/sdk": "^1.15.1",
|
|
110
120
|
"@types/express": "^5.0.3",
|
|
111
121
|
"@types/node": "^24.0.13",
|