@floristcloud/api-lib 1.2.30 → 1.2.31
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/schemas/action-log/action-log-payload.schema.js +4 -0
- package/build/schemas/action-log/action-log.schema.js +14 -0
- package/build/schemas/action-log/index.js +2 -0
- package/build/schemas/action-log/order-merge-action-log.schema.js +8 -0
- package/build/schemas/action-log/order-product-move-action-log.schema.js +11 -0
- package/package.json +1 -1
- package/schemas/action-log/action-log-payload.schema.ts +4 -0
- package/schemas/action-log/action-log.schema.ts +14 -0
- package/schemas/action-log/index.ts +2 -0
- package/schemas/action-log/order-merge-action-log.schema.ts +6 -0
- package/schemas/action-log/order-product-move-action-log.schema.ts +9 -0
|
@@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ActionLogPayloadSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const order_delete_action_log_payload_schema_1 = require("./order-delete-action-log-payload.schema");
|
|
6
|
+
const order_merge_action_log_schema_1 = require("./order-merge-action-log.schema");
|
|
6
7
|
const order_product_delete_action_log_schema_1 = require("./order-product-delete-action-log.schema");
|
|
8
|
+
const order_product_move_action_log_schema_1 = require("./order-product-move-action-log.schema");
|
|
7
9
|
const order_product_update_action_log_schema_1 = require("./order-product-update-action-log.schema");
|
|
8
10
|
const order_update_action_log_schema_1 = require("./order-update-action-log.schema");
|
|
9
11
|
const transaction_add_action_log_schema_1 = require("./transaction-add-action-log.schema");
|
|
@@ -15,7 +17,9 @@ const pre_order_product_update_action_log_schema_1 = require("./pre-order-produc
|
|
|
15
17
|
const pre_order_product_delete_action_log_schema_1 = require("./pre-order-product-delete-action-log.schema");
|
|
16
18
|
exports.ActionLogPayloadSchema = zod_1.z.union([
|
|
17
19
|
order_delete_action_log_payload_schema_1.OrderDeleteActionLogPayloadSchema,
|
|
20
|
+
order_merge_action_log_schema_1.OrderMergeActionLogSchema,
|
|
18
21
|
order_product_delete_action_log_schema_1.OrderProductDeleteActionLogSchema,
|
|
22
|
+
order_product_move_action_log_schema_1.OrderProductMoveActionLogSchema,
|
|
19
23
|
order_product_update_action_log_schema_1.OrderProductUpdateActionLogSchema,
|
|
20
24
|
order_update_action_log_schema_1.OrderUpdateActionLogSchema,
|
|
21
25
|
transaction_add_action_log_schema_1.TransactionAddActionLogSchema,
|
|
@@ -4,7 +4,9 @@ exports.ActionLogListSchema = exports.CreateActionLogSchema = exports.ActionLogS
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const enum_1 = require("../../enum");
|
|
6
6
|
const order_delete_action_log_payload_schema_1 = require("./order-delete-action-log-payload.schema");
|
|
7
|
+
const order_merge_action_log_schema_1 = require("./order-merge-action-log.schema");
|
|
7
8
|
const order_product_delete_action_log_schema_1 = require("./order-product-delete-action-log.schema");
|
|
9
|
+
const order_product_move_action_log_schema_1 = require("./order-product-move-action-log.schema");
|
|
8
10
|
const order_product_update_action_log_schema_1 = require("./order-product-update-action-log.schema");
|
|
9
11
|
const order_update_action_log_schema_1 = require("./order-update-action-log.schema");
|
|
10
12
|
const transaction_add_action_log_schema_1 = require("./transaction-add-action-log.schema");
|
|
@@ -40,6 +42,18 @@ exports.ActionLogSchema = zod_1.z.discriminatedUnion('actionType', [
|
|
|
40
42
|
payload: order_product_update_action_log_schema_1.OrderProductUpdateActionLogSchema,
|
|
41
43
|
})
|
|
42
44
|
.merge(BaseActionFields),
|
|
45
|
+
zod_1.z
|
|
46
|
+
.object({
|
|
47
|
+
actionType: zod_1.z.literal(enum_1.ActionLogTypeEnum.MOVE_ORDER_ITEM),
|
|
48
|
+
payload: order_product_move_action_log_schema_1.OrderProductMoveActionLogSchema,
|
|
49
|
+
})
|
|
50
|
+
.merge(BaseActionFields),
|
|
51
|
+
zod_1.z
|
|
52
|
+
.object({
|
|
53
|
+
actionType: zod_1.z.literal(enum_1.ActionLogTypeEnum.MERGE_ORDER),
|
|
54
|
+
payload: order_merge_action_log_schema_1.OrderMergeActionLogSchema,
|
|
55
|
+
})
|
|
56
|
+
.merge(BaseActionFields),
|
|
43
57
|
zod_1.z
|
|
44
58
|
.object({
|
|
45
59
|
actionType: zod_1.z.literal(enum_1.ActionLogTypeEnum.UPDATE_ORDER_STATUS),
|
|
@@ -18,8 +18,10 @@ __exportStar(require("./action-log-payload.schema"), exports);
|
|
|
18
18
|
__exportStar(require("./action-log.schema"), exports);
|
|
19
19
|
__exportStar(require("./order-create-action-log.schema"), exports);
|
|
20
20
|
__exportStar(require("./order-delete-action-log-payload.schema"), exports);
|
|
21
|
+
__exportStar(require("./order-merge-action-log.schema"), exports);
|
|
21
22
|
__exportStar(require("./order-product-delete-action-log.schema"), exports);
|
|
22
23
|
__exportStar(require("./order-product-info.schema"), exports);
|
|
24
|
+
__exportStar(require("./order-product-move-action-log.schema"), exports);
|
|
23
25
|
__exportStar(require("./order-product-update-action-log.schema"), exports);
|
|
24
26
|
__exportStar(require("./order-update-action-log.schema"), exports);
|
|
25
27
|
__exportStar(require("./pre-order-create-action-log.schema"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OrderMergeActionLogSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.OrderMergeActionLogSchema = zod_1.z.object({
|
|
6
|
+
targetOrderUUID: zod_1.z.string(),
|
|
7
|
+
sourceOrderUUIDs: zod_1.z.array(zod_1.z.string()),
|
|
8
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OrderProductMoveActionLogSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.OrderProductMoveActionLogSchema = zod_1.z.object({
|
|
6
|
+
fromOrderUUID: zod_1.z.string(),
|
|
7
|
+
toOrderUUID: zod_1.z.string(),
|
|
8
|
+
orderProductUUID: zod_1.z.string(),
|
|
9
|
+
productUUID: zod_1.z.string(),
|
|
10
|
+
quantity: zod_1.z.coerce.number(),
|
|
11
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { OrderDeleteActionLogPayloadSchema } from './order-delete-action-log-payload.schema';
|
|
3
|
+
import { OrderMergeActionLogSchema } from './order-merge-action-log.schema';
|
|
3
4
|
import { OrderProductDeleteActionLogSchema } from './order-product-delete-action-log.schema';
|
|
5
|
+
import { OrderProductMoveActionLogSchema } from './order-product-move-action-log.schema';
|
|
4
6
|
import { OrderProductUpdateActionLogSchema } from './order-product-update-action-log.schema';
|
|
5
7
|
import { OrderUpdateActionLogSchema } from './order-update-action-log.schema';
|
|
6
8
|
import { TransactionAddActionLogSchema } from './transaction-add-action-log.schema';
|
|
@@ -13,7 +15,9 @@ import { PreOrderProductDeleteActionLogSchema } from './pre-order-product-delete
|
|
|
13
15
|
|
|
14
16
|
export const ActionLogPayloadSchema = z.union([
|
|
15
17
|
OrderDeleteActionLogPayloadSchema,
|
|
18
|
+
OrderMergeActionLogSchema,
|
|
16
19
|
OrderProductDeleteActionLogSchema,
|
|
20
|
+
OrderProductMoveActionLogSchema,
|
|
17
21
|
OrderProductUpdateActionLogSchema,
|
|
18
22
|
OrderUpdateActionLogSchema,
|
|
19
23
|
TransactionAddActionLogSchema,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ActionLogTypeEnum } from '../../enum';
|
|
3
3
|
import { OrderDeleteActionLogPayloadSchema } from './order-delete-action-log-payload.schema';
|
|
4
|
+
import { OrderMergeActionLogSchema } from './order-merge-action-log.schema';
|
|
4
5
|
import { OrderProductDeleteActionLogSchema } from './order-product-delete-action-log.schema';
|
|
6
|
+
import { OrderProductMoveActionLogSchema } from './order-product-move-action-log.schema';
|
|
5
7
|
import { OrderProductUpdateActionLogSchema } from './order-product-update-action-log.schema';
|
|
6
8
|
import { OrderUpdateActionLogSchema } from './order-update-action-log.schema';
|
|
7
9
|
import { TransactionAddActionLogSchema } from './transaction-add-action-log.schema';
|
|
@@ -39,6 +41,18 @@ export const ActionLogSchema = z.discriminatedUnion('actionType', [
|
|
|
39
41
|
payload: OrderProductUpdateActionLogSchema,
|
|
40
42
|
})
|
|
41
43
|
.merge(BaseActionFields),
|
|
44
|
+
z
|
|
45
|
+
.object({
|
|
46
|
+
actionType: z.literal(ActionLogTypeEnum.MOVE_ORDER_ITEM),
|
|
47
|
+
payload: OrderProductMoveActionLogSchema,
|
|
48
|
+
})
|
|
49
|
+
.merge(BaseActionFields),
|
|
50
|
+
z
|
|
51
|
+
.object({
|
|
52
|
+
actionType: z.literal(ActionLogTypeEnum.MERGE_ORDER),
|
|
53
|
+
payload: OrderMergeActionLogSchema,
|
|
54
|
+
})
|
|
55
|
+
.merge(BaseActionFields),
|
|
42
56
|
z
|
|
43
57
|
.object({
|
|
44
58
|
actionType: z.literal(ActionLogTypeEnum.UPDATE_ORDER_STATUS),
|
|
@@ -2,8 +2,10 @@ export * from './action-log-payload.schema';
|
|
|
2
2
|
export * from './action-log.schema';
|
|
3
3
|
export * from './order-create-action-log.schema';
|
|
4
4
|
export * from './order-delete-action-log-payload.schema';
|
|
5
|
+
export * from './order-merge-action-log.schema';
|
|
5
6
|
export * from './order-product-delete-action-log.schema';
|
|
6
7
|
export * from './order-product-info.schema';
|
|
8
|
+
export * from './order-product-move-action-log.schema';
|
|
7
9
|
export * from './order-product-update-action-log.schema';
|
|
8
10
|
export * from './order-update-action-log.schema';
|
|
9
11
|
export * from './pre-order-create-action-log.schema';
|