@floristcloud/api-lib 1.0.55 → 1.0.56
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/build/commands/delivery-route/detach-order-list-to-delivery-route.command.js +1 -0
- package/build/commands/product/index.js +1 -0
- package/build/commands/product/match-images-for-products.command.js +20 -0
- package/build/constant/error.js +1 -0
- package/commands/delivery-route/detach-order-list-to-delivery-route.command.ts +1 -0
- package/commands/product/index.ts +1 -0
- package/commands/product/match-images-for-products.command.ts +22 -0
- package/constant/error.ts +1 -0
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ exports.DetachOrderListToDeliveryRouteContractCommand = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const DetachOrderListToDeliveryRouteRequestSchema = zod_1.z.object({
|
|
6
6
|
orderUUIDList: zod_1.z.array(zod_1.z.uuid()).min(1),
|
|
7
|
+
isDeleteDelivery: zod_1.z.coerce.boolean().optional().default(false),
|
|
7
8
|
});
|
|
8
9
|
const DetachOrderListToDeliveryRouteResponseSchema = zod_1.z.object({
|
|
9
10
|
message: zod_1.z.string().optional(),
|
|
@@ -24,6 +24,7 @@ __exportStar(require("./get-product-quantity-calculate.query"), exports);
|
|
|
24
24
|
__exportStar(require("./get-all-product-by-consignment.query"), exports);
|
|
25
25
|
__exportStar(require("./get-product-list-filters-values.query"), exports);
|
|
26
26
|
__exportStar(require("./generate-product-qr.query"), exports);
|
|
27
|
+
__exportStar(require("./match-images-for-products.command"), exports);
|
|
27
28
|
//webshop
|
|
28
29
|
__exportStar(require("./webshop/get-client-product-list-filters-values.query"), exports);
|
|
29
30
|
__exportStar(require("./webshop/get-product-list-for-client.query"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MatchImagesForProductsContractCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const MatchImagesForProductsRequestSchema = zod_1.z.object({
|
|
6
|
+
productUUIDList: zod_1.z.array(zod_1.z.string().uuid()).min(1),
|
|
7
|
+
onlyWithoutImages: zod_1.z.coerce.boolean().default(true),
|
|
8
|
+
});
|
|
9
|
+
const MatchImagesForProductsResponseSchema = zod_1.z.object({
|
|
10
|
+
message: zod_1.z.string().optional(),
|
|
11
|
+
data: zod_1.z.object({
|
|
12
|
+
success: zod_1.z.boolean(),
|
|
13
|
+
updatedItems: zod_1.z.number(),
|
|
14
|
+
}),
|
|
15
|
+
});
|
|
16
|
+
var MatchImagesForProductsContractCommand;
|
|
17
|
+
(function (MatchImagesForProductsContractCommand) {
|
|
18
|
+
MatchImagesForProductsContractCommand.RequestSchema = MatchImagesForProductsRequestSchema;
|
|
19
|
+
MatchImagesForProductsContractCommand.ResponseSchema = MatchImagesForProductsResponseSchema;
|
|
20
|
+
})(MatchImagesForProductsContractCommand || (exports.MatchImagesForProductsContractCommand = MatchImagesForProductsContractCommand = {}));
|
package/build/constant/error.js
CHANGED
|
@@ -201,6 +201,7 @@ exports.ERRORS = {
|
|
|
201
201
|
PRODUCT_MULTIPLICITY_OPTION_NOT_FOUND: { code: 'P017', message: 'Product multiplicity option not found', httpCode: 404 },
|
|
202
202
|
PRODUCT_MULTIPLICITY_OPTION_USED_IN_ORDER: { code: 'P018', message: 'Product multiplicity option used in order', httpCode: 400 },
|
|
203
203
|
PRODUCT_MULTIPLICITY_OPTION_NOT_DELETED: { code: 'P019', message: 'Failed to delete product multiplicity option', httpCode: 500 },
|
|
204
|
+
PRODUCT_IMAGE_MATCHING_FAILED: { code: 'P020', message: 'Failed to match images for products', httpCode: 500 },
|
|
204
205
|
// PRODUCT CONFIGURATION
|
|
205
206
|
PRODUCT_CONFIGURATION_NOT_CREATED: { code: 'PCFG001', message: 'Failed to create product configuration', httpCode: 500 },
|
|
206
207
|
PRODUCT_CONFIGURATION_NOT_DELETED: { code: 'PCFG002', message: 'Failed to delete product configuration', httpCode: 500 },
|
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
|
|
3
3
|
const DetachOrderListToDeliveryRouteRequestSchema = z.object({
|
|
4
4
|
orderUUIDList: z.array(z.uuid()).min(1),
|
|
5
|
+
isDeleteDelivery: z.coerce.boolean().optional().default(false),
|
|
5
6
|
});
|
|
6
7
|
|
|
7
8
|
const DetachOrderListToDeliveryRouteResponseSchema = z.object({
|
|
@@ -8,6 +8,7 @@ export * from './get-product-quantity-calculate.query';
|
|
|
8
8
|
export * from './get-all-product-by-consignment.query';
|
|
9
9
|
export * from './get-product-list-filters-values.query';
|
|
10
10
|
export * from './generate-product-qr.query';
|
|
11
|
+
export * from './match-images-for-products.command';
|
|
11
12
|
//webshop
|
|
12
13
|
export * from './webshop/get-client-product-list-filters-values.query';
|
|
13
14
|
export * from './webshop/get-product-list-for-client.query';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
const MatchImagesForProductsRequestSchema = z.object({
|
|
4
|
+
productUUIDList: z.array(z.string().uuid()).min(1),
|
|
5
|
+
onlyWithoutImages: z.coerce.boolean().default(true),
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
const MatchImagesForProductsResponseSchema = z.object({
|
|
9
|
+
message: z.string().optional(),
|
|
10
|
+
data: z.object({
|
|
11
|
+
success: z.boolean(),
|
|
12
|
+
updatedItems: z.number(),
|
|
13
|
+
}),
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export namespace MatchImagesForProductsContractCommand {
|
|
17
|
+
export const RequestSchema = MatchImagesForProductsRequestSchema;
|
|
18
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
19
|
+
|
|
20
|
+
export const ResponseSchema = MatchImagesForProductsResponseSchema;
|
|
21
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
22
|
+
}
|
package/constant/error.ts
CHANGED
|
@@ -208,6 +208,7 @@ export const ERRORS = {
|
|
|
208
208
|
PRODUCT_MULTIPLICITY_OPTION_NOT_FOUND: { code: 'P017', message: 'Product multiplicity option not found', httpCode: 404 },
|
|
209
209
|
PRODUCT_MULTIPLICITY_OPTION_USED_IN_ORDER: { code: 'P018', message: 'Product multiplicity option used in order', httpCode: 400 },
|
|
210
210
|
PRODUCT_MULTIPLICITY_OPTION_NOT_DELETED: { code: 'P019', message: 'Failed to delete product multiplicity option', httpCode: 500 },
|
|
211
|
+
PRODUCT_IMAGE_MATCHING_FAILED: { code: 'P020', message: 'Failed to match images for products', httpCode: 500 },
|
|
211
212
|
|
|
212
213
|
// PRODUCT CONFIGURATION
|
|
213
214
|
PRODUCT_CONFIGURATION_NOT_CREATED: { code: 'PCFG001', message: 'Failed to create product configuration', httpCode: 500 },
|