@floristcloud/api-lib 1.0.55 → 1.0.57
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/pre-order/export-pre-order.command.js +12 -0
- package/build/commands/pre-order/index.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 +2 -0
- package/commands/delivery-route/detach-order-list-to-delivery-route.command.ts +1 -0
- package/commands/pre-order/export-pre-order.command.ts +11 -0
- package/commands/pre-order/index.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 +2 -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(),
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExportPreOrderContractCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const ExportPreOrderResponseSchema = zod_1.z.object({
|
|
6
|
+
message: zod_1.z.string().optional(),
|
|
7
|
+
data: zod_1.z.string(),
|
|
8
|
+
});
|
|
9
|
+
var ExportPreOrderContractCommand;
|
|
10
|
+
(function (ExportPreOrderContractCommand) {
|
|
11
|
+
ExportPreOrderContractCommand.ResponseSchema = ExportPreOrderResponseSchema;
|
|
12
|
+
})(ExportPreOrderContractCommand || (exports.ExportPreOrderContractCommand = ExportPreOrderContractCommand = {}));
|
|
@@ -26,3 +26,4 @@ __exportStar(require("./get-pre-order-by-pre-order-collection-uuid.command"), ex
|
|
|
26
26
|
__exportStar(require("./create-order-from-pre-order.command"), exports);
|
|
27
27
|
__exportStar(require("./import-standing-order.command"), exports);
|
|
28
28
|
__exportStar(require("./get-standing-order-import-template.command"), exports);
|
|
29
|
+
__exportStar(require("./export-pre-order.command"), exports);
|
|
@@ -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 },
|
|
@@ -568,6 +569,7 @@ exports.ERRORS = {
|
|
|
568
569
|
PRE_ORDER_FETCH_FAILED: { code: 'PO006', message: 'Error when retrieving a list of pre orders', httpCode: 500 },
|
|
569
570
|
PRE_ORDER_ALREADY_EXIST: { code: 'PO007', message: 'Pre order with this name already exist', httpCode: 409 },
|
|
570
571
|
PRE_ORDER_INVALID_STATUS: { code: 'PO008', message: 'Invalid pre order status', httpCode: 400 },
|
|
572
|
+
PRE_ORDER_EXPORT_FAILED: { code: 'PO005', message: 'Failed to export pre order', httpCode: 500 },
|
|
571
573
|
PRE_ORDER_FROM_STANDING_ORDER_FAILED: {
|
|
572
574
|
code: 'PO009',
|
|
573
575
|
message: 'Failed to create pre order from standing order',
|
|
@@ -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({
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
const ExportPreOrderResponseSchema = z.object({
|
|
4
|
+
message: z.string().optional(),
|
|
5
|
+
data: z.string(),
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
export namespace ExportPreOrderContractCommand {
|
|
9
|
+
export const ResponseSchema = ExportPreOrderResponseSchema;
|
|
10
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
11
|
+
}
|
|
@@ -10,3 +10,4 @@ export * from './get-pre-order-by-pre-order-collection-uuid.command';
|
|
|
10
10
|
export * from './create-order-from-pre-order.command';
|
|
11
11
|
export * from './import-standing-order.command';
|
|
12
12
|
export * from './get-standing-order-import-template.command';
|
|
13
|
+
export * from './export-pre-order.command';
|
|
@@ -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 },
|
|
@@ -600,6 +601,7 @@ export const ERRORS = {
|
|
|
600
601
|
PRE_ORDER_FETCH_FAILED: { code: 'PO006', message: 'Error when retrieving a list of pre orders', httpCode: 500 },
|
|
601
602
|
PRE_ORDER_ALREADY_EXIST: { code: 'PO007', message: 'Pre order with this name already exist', httpCode: 409 },
|
|
602
603
|
PRE_ORDER_INVALID_STATUS: { code: 'PO008', message: 'Invalid pre order status', httpCode: 400 },
|
|
604
|
+
PRE_ORDER_EXPORT_FAILED: { code: 'PO005', message: 'Failed to export pre order', httpCode: 500 },
|
|
603
605
|
PRE_ORDER_FROM_STANDING_ORDER_FAILED: {
|
|
604
606
|
code: 'PO009',
|
|
605
607
|
message: 'Failed to create pre order from standing order',
|