@floristcloud/api-lib 1.0.64 → 1.0.67
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/order-product/index.js +2 -0
- package/build/commands/order-product/webshop/get-active-stepper-positions-order.query.js +14 -0
- package/build/commands/order-product/webshop/set-order-product-quantity-webshop.command.js +14 -0
- package/build/commands/work-session/export-overtime.query.js +26 -0
- package/build/commands/work-session/index.js +1 -0
- package/build/schemas/order-product/order-product.schema.js +20 -1
- package/build/schemas/pre-order-product/pre-order-product.schema.js +1 -0
- package/commands/order-product/index.ts +2 -0
- package/commands/order-product/webshop/get-active-stepper-positions-order.query.ts +15 -0
- package/commands/order-product/webshop/set-order-product-quantity-webshop.command.ts +18 -0
- package/commands/work-session/export-overtime.query.ts +31 -0
- package/commands/work-session/index.ts +1 -0
- package/package.json +1 -1
- package/schemas/order-product/order-product.schema.ts +23 -0
- package/schemas/pre-order-product/pre-order-product.schema.ts +1 -0
|
@@ -31,3 +31,5 @@ __exportStar(require("./group/zeroing-receipt-order-product.command"), exports);
|
|
|
31
31
|
__exportStar(require("./webshop/update-order-product-for-client.command"), exports);
|
|
32
32
|
__exportStar(require("./webshop/create-order-product-for-client.command"), exports);
|
|
33
33
|
__exportStar(require("./webshop/get-order-product-for-client-list.query"), exports);
|
|
34
|
+
__exportStar(require("./webshop/get-active-stepper-positions-order.query"), exports);
|
|
35
|
+
__exportStar(require("./webshop/set-order-product-quantity-webshop.command"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetActiveStepperPositionsForOrderContractQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../../../schemas");
|
|
6
|
+
const GetActiveStepperPositionsForOrderResponseSchema = zod_1.z.object({
|
|
7
|
+
message: zod_1.z.string().optional(),
|
|
8
|
+
data: schemas_1.ActiveStepperPositionsForOrderResponseSchema,
|
|
9
|
+
});
|
|
10
|
+
var GetActiveStepperPositionsForOrderContractQuery;
|
|
11
|
+
(function (GetActiveStepperPositionsForOrderContractQuery) {
|
|
12
|
+
GetActiveStepperPositionsForOrderContractQuery.RequestSchema = zod_1.z.object({});
|
|
13
|
+
GetActiveStepperPositionsForOrderContractQuery.ResponseSchema = GetActiveStepperPositionsForOrderResponseSchema;
|
|
14
|
+
})(GetActiveStepperPositionsForOrderContractQuery || (exports.GetActiveStepperPositionsForOrderContractQuery = GetActiveStepperPositionsForOrderContractQuery = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SetOrderProductQuantityWebshopContractCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../../../schemas");
|
|
6
|
+
const SetOrderProductQuantityWebshopContractResponseSchema = zod_1.z.object({
|
|
7
|
+
message: zod_1.z.string().optional(),
|
|
8
|
+
data: schemas_1.SetOrderProductQuantityWebshopResponseSchema,
|
|
9
|
+
});
|
|
10
|
+
var SetOrderProductQuantityWebshopContractCommand;
|
|
11
|
+
(function (SetOrderProductQuantityWebshopContractCommand) {
|
|
12
|
+
SetOrderProductQuantityWebshopContractCommand.RequestSchema = schemas_1.SetOrderProductQuantityWebshopRequestSchema;
|
|
13
|
+
SetOrderProductQuantityWebshopContractCommand.ResponseSchema = SetOrderProductQuantityWebshopContractResponseSchema;
|
|
14
|
+
})(SetOrderProductQuantityWebshopContractCommand || (exports.SetOrderProductQuantityWebshopContractCommand = SetOrderProductQuantityWebshopContractCommand = {}));
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExportOvertimeContractQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const date_helper_1 = require("../../helpers/date.helper");
|
|
6
|
+
const ExportOvertimeRequestSchema = zod_1.z
|
|
7
|
+
.object({
|
|
8
|
+
startDate: zod_1.z.coerce.date(),
|
|
9
|
+
endDate: zod_1.z.coerce.date(),
|
|
10
|
+
userUUIDs: zod_1.z.array(zod_1.z.string().uuid()).optional(),
|
|
11
|
+
})
|
|
12
|
+
.refine(value => (0, date_helper_1.dateRangeCheck)(value.startDate, value.endDate), {
|
|
13
|
+
message: 'End date must be greater than start date',
|
|
14
|
+
path: ['endDate', 'startDate'],
|
|
15
|
+
});
|
|
16
|
+
const ExportOvertimeResponseSchema = zod_1.z.object({
|
|
17
|
+
data: zod_1.z.object({
|
|
18
|
+
fileUrl: zod_1.z.string(),
|
|
19
|
+
fileKey: zod_1.z.string(),
|
|
20
|
+
}),
|
|
21
|
+
});
|
|
22
|
+
var ExportOvertimeContractQuery;
|
|
23
|
+
(function (ExportOvertimeContractQuery) {
|
|
24
|
+
ExportOvertimeContractQuery.RequestSchema = ExportOvertimeRequestSchema;
|
|
25
|
+
ExportOvertimeContractQuery.ResponseSchema = ExportOvertimeResponseSchema;
|
|
26
|
+
})(ExportOvertimeContractQuery || (exports.ExportOvertimeContractQuery = ExportOvertimeContractQuery = {}));
|
|
@@ -20,3 +20,4 @@ __exportStar(require("./delete-work-session.command"), exports);
|
|
|
20
20
|
__exportStar(require("./create-work-session-for-employee.command"), exports);
|
|
21
21
|
__exportStar(require("./get-work-session-extended-list.query"), exports);
|
|
22
22
|
__exportStar(require("./close-work-session-for-employee.command"), exports);
|
|
23
|
+
__exportStar(require("./export-overtime.query"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OrderProductForDistributeSchema = exports.OrderProductForClientExtendedSchema = exports.OrderProductExtendedSchema = exports.OrderProductForClientSchema = exports.OrderProductSchema = void 0;
|
|
3
|
+
exports.SetOrderProductQuantityWebshopResponseSchema = exports.SetOrderProductQuantityWebshopRequestSchema = exports.ActiveStepperPositionsForOrderResponseSchema = exports.OrderProductStepperPositionSchema = exports.OrderProductForDistributeSchema = exports.OrderProductForClientExtendedSchema = exports.OrderProductExtendedSchema = exports.OrderProductForClientSchema = exports.OrderProductSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const product_schema_1 = require("../product/product.schema");
|
|
6
6
|
const order_schema_1 = require("../order/order.schema");
|
|
@@ -49,3 +49,22 @@ exports.OrderProductForDistributeSchema = exports.OrderProductSchema.extend({
|
|
|
49
49
|
branch: branch_schema_1.BranchSchema.nullable(),
|
|
50
50
|
distributionList: zod_1.z.array(distribution_schema_1.DistributionSchema),
|
|
51
51
|
});
|
|
52
|
+
exports.OrderProductStepperPositionSchema = zod_1.z.object({
|
|
53
|
+
uuid: zod_1.z.string(),
|
|
54
|
+
orderUUID: zod_1.z.string(),
|
|
55
|
+
productUUID: zod_1.z.string(),
|
|
56
|
+
multiplicityOptionUUID: zod_1.z.string().nullable().optional(),
|
|
57
|
+
multiplicityOptionTitle: zod_1.z.string().nullable().optional(),
|
|
58
|
+
quantity: zod_1.z.number(),
|
|
59
|
+
});
|
|
60
|
+
exports.ActiveStepperPositionsForOrderResponseSchema = zod_1.z.object({
|
|
61
|
+
list: exports.OrderProductStepperPositionSchema.array(),
|
|
62
|
+
});
|
|
63
|
+
exports.SetOrderProductQuantityWebshopRequestSchema = zod_1.z.object({
|
|
64
|
+
quantity: zod_1.z.number().int().min(0),
|
|
65
|
+
});
|
|
66
|
+
exports.SetOrderProductQuantityWebshopResponseSchema = zod_1.z.object({
|
|
67
|
+
uuid: zod_1.z.string().optional(),
|
|
68
|
+
quantity: zod_1.z.number().optional(),
|
|
69
|
+
deleted: zod_1.z.boolean().optional(),
|
|
70
|
+
});
|
|
@@ -109,6 +109,7 @@ exports.PreOrderProductStepperPositionSchema = zod_1.z.object({
|
|
|
109
109
|
preOrderCollectionUUID: zod_1.z.string().nullable(),
|
|
110
110
|
preOrderCollectionItemUUID: zod_1.z.string().nullable(),
|
|
111
111
|
multiplicityOptionUUID: zod_1.z.string().nullable().optional(),
|
|
112
|
+
multiplicityOptionTitle: zod_1.z.string().nullable().optional(),
|
|
112
113
|
quantity: zod_1.z.number(),
|
|
113
114
|
});
|
|
114
115
|
exports.ActiveStepperPositionsResponseSchema = zod_1.z.object({
|
|
@@ -15,3 +15,5 @@ export * from './group/zeroing-receipt-order-product.command';
|
|
|
15
15
|
export * from './webshop/update-order-product-for-client.command';
|
|
16
16
|
export * from './webshop/create-order-product-for-client.command';
|
|
17
17
|
export * from './webshop/get-order-product-for-client-list.query';
|
|
18
|
+
export * from './webshop/get-active-stepper-positions-order.query';
|
|
19
|
+
export * from './webshop/set-order-product-quantity-webshop.command';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ActiveStepperPositionsForOrderResponseSchema } from '../../../schemas';
|
|
3
|
+
|
|
4
|
+
const GetActiveStepperPositionsForOrderResponseSchema = z.object({
|
|
5
|
+
message: z.string().optional(),
|
|
6
|
+
data: ActiveStepperPositionsForOrderResponseSchema,
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export namespace GetActiveStepperPositionsForOrderContractQuery {
|
|
10
|
+
export const RequestSchema = z.object({});
|
|
11
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
12
|
+
|
|
13
|
+
export const ResponseSchema = GetActiveStepperPositionsForOrderResponseSchema;
|
|
14
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import {
|
|
3
|
+
SetOrderProductQuantityWebshopRequestSchema,
|
|
4
|
+
SetOrderProductQuantityWebshopResponseSchema,
|
|
5
|
+
} from '../../../schemas';
|
|
6
|
+
|
|
7
|
+
const SetOrderProductQuantityWebshopContractResponseSchema = z.object({
|
|
8
|
+
message: z.string().optional(),
|
|
9
|
+
data: SetOrderProductQuantityWebshopResponseSchema,
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export namespace SetOrderProductQuantityWebshopContractCommand {
|
|
13
|
+
export const RequestSchema = SetOrderProductQuantityWebshopRequestSchema;
|
|
14
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
15
|
+
|
|
16
|
+
export const ResponseSchema = SetOrderProductQuantityWebshopContractResponseSchema;
|
|
17
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { dateRangeCheck } from '../../helpers/date.helper';
|
|
3
|
+
|
|
4
|
+
const ExportOvertimeRequestSchema = z
|
|
5
|
+
.object({
|
|
6
|
+
startDate: z.coerce.date(),
|
|
7
|
+
endDate: z.coerce.date(),
|
|
8
|
+
userUUIDs: z.array(z.string().uuid()).optional(),
|
|
9
|
+
})
|
|
10
|
+
.refine(
|
|
11
|
+
value => dateRangeCheck(value.startDate, value.endDate),
|
|
12
|
+
{
|
|
13
|
+
message: 'End date must be greater than start date',
|
|
14
|
+
path: ['endDate', 'startDate'],
|
|
15
|
+
},
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
const ExportOvertimeResponseSchema = z.object({
|
|
19
|
+
data: z.object({
|
|
20
|
+
fileUrl: z.string(),
|
|
21
|
+
fileKey: z.string(),
|
|
22
|
+
}),
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export namespace ExportOvertimeContractQuery {
|
|
26
|
+
export const RequestSchema = ExportOvertimeRequestSchema;
|
|
27
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
28
|
+
|
|
29
|
+
export const ResponseSchema = ExportOvertimeResponseSchema;
|
|
30
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
31
|
+
}
|
package/package.json
CHANGED
|
@@ -56,3 +56,26 @@ export const OrderProductForDistributeSchema = OrderProductSchema.extend({
|
|
|
56
56
|
branch: BranchSchema.nullable(),
|
|
57
57
|
distributionList: z.array(DistributionSchema),
|
|
58
58
|
});
|
|
59
|
+
|
|
60
|
+
export const OrderProductStepperPositionSchema = z.object({
|
|
61
|
+
uuid: z.string(),
|
|
62
|
+
orderUUID: z.string(),
|
|
63
|
+
productUUID: z.string(),
|
|
64
|
+
multiplicityOptionUUID: z.string().nullable().optional(),
|
|
65
|
+
multiplicityOptionTitle: z.string().nullable().optional(),
|
|
66
|
+
quantity: z.number(),
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export const ActiveStepperPositionsForOrderResponseSchema = z.object({
|
|
70
|
+
list: OrderProductStepperPositionSchema.array(),
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
export const SetOrderProductQuantityWebshopRequestSchema = z.object({
|
|
74
|
+
quantity: z.number().int().min(0),
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
export const SetOrderProductQuantityWebshopResponseSchema = z.object({
|
|
78
|
+
uuid: z.string().optional(),
|
|
79
|
+
quantity: z.number().optional(),
|
|
80
|
+
deleted: z.boolean().optional(),
|
|
81
|
+
});
|
|
@@ -116,6 +116,7 @@ export const PreOrderProductStepperPositionSchema = z.object({
|
|
|
116
116
|
preOrderCollectionUUID: z.string().nullable(),
|
|
117
117
|
preOrderCollectionItemUUID: z.string().nullable(),
|
|
118
118
|
multiplicityOptionUUID: z.string().nullable().optional(),
|
|
119
|
+
multiplicityOptionTitle: z.string().nullable().optional(),
|
|
119
120
|
quantity: z.number(),
|
|
120
121
|
});
|
|
121
122
|
|