@floristcloud/api-lib 1.2.67 → 1.2.68

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.
@@ -8,6 +8,7 @@ const order_merge_action_log_schema_1 = require("./order-merge-action-log.schema
8
8
  const order_product_delete_action_log_schema_1 = require("./order-product-delete-action-log.schema");
9
9
  const order_product_move_action_log_schema_1 = require("./order-product-move-action-log.schema");
10
10
  const order_product_update_action_log_schema_1 = require("./order-product-update-action-log.schema");
11
+ const order_product_verify_action_log_schema_1 = require("./order-product-verify-action-log.schema");
11
12
  const order_update_action_log_schema_1 = require("./order-update-action-log.schema");
12
13
  const transaction_add_action_log_schema_1 = require("./transaction-add-action-log.schema");
13
14
  const transaction_delete_action_log_schema_1 = require("./transaction-delete-action-log.schema");
@@ -42,6 +43,12 @@ exports.ActionLogSchema = zod_1.z.discriminatedUnion('actionType', [
42
43
  payload: order_product_update_action_log_schema_1.OrderProductUpdateActionLogSchema,
43
44
  })
44
45
  .merge(BaseActionFields),
46
+ zod_1.z
47
+ .object({
48
+ actionType: zod_1.z.literal(enum_1.ActionLogTypeEnum.VERIFY_ORDER_ITEM),
49
+ payload: order_product_verify_action_log_schema_1.OrderProductVerifyActionLogSchema,
50
+ })
51
+ .merge(BaseActionFields),
45
52
  zod_1.z
46
53
  .object({
47
54
  actionType: zod_1.z.literal(enum_1.ActionLogTypeEnum.MOVE_ORDER_ITEM),
@@ -23,6 +23,7 @@ __exportStar(require("./order-product-delete-action-log.schema"), exports);
23
23
  __exportStar(require("./order-product-info.schema"), exports);
24
24
  __exportStar(require("./order-product-move-action-log.schema"), exports);
25
25
  __exportStar(require("./order-product-update-action-log.schema"), exports);
26
+ __exportStar(require("./order-product-verify-action-log.schema"), exports);
26
27
  __exportStar(require("./order-update-action-log.schema"), exports);
27
28
  __exportStar(require("./pre-order-create-action-log.schema"), exports);
28
29
  __exportStar(require("./pre-order-delete-action-log.schema"), exports);
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrderProductVerifyActionLogSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const order_product_info_schema_1 = require("./order-product-info.schema");
6
+ const enum_1 = require("../../enum");
7
+ exports.OrderProductVerifyActionLogSchema = zod_1.z.object({
8
+ orderProduct: order_product_info_schema_1.OrderProductInfoSchema,
9
+ isVerified: zod_1.z.boolean(),
10
+ previousIsVerified: zod_1.z.boolean(),
11
+ source: zod_1.z.nativeEnum(enum_1.OrderProductVerifySourceEnum),
12
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floristcloud/api-lib",
3
- "version": "1.2.67",
3
+ "version": "1.2.68",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {
@@ -5,6 +5,7 @@ import { OrderMergeActionLogSchema } from './order-merge-action-log.schema';
5
5
  import { OrderProductDeleteActionLogSchema } from './order-product-delete-action-log.schema';
6
6
  import { OrderProductMoveActionLogSchema } from './order-product-move-action-log.schema';
7
7
  import { OrderProductUpdateActionLogSchema } from './order-product-update-action-log.schema';
8
+ import { OrderProductVerifyActionLogSchema } from './order-product-verify-action-log.schema';
8
9
  import { OrderUpdateActionLogSchema } from './order-update-action-log.schema';
9
10
  import { TransactionAddActionLogSchema } from './transaction-add-action-log.schema';
10
11
  import { TransactionDeleteActionLogSchema } from './transaction-delete-action-log.schema';
@@ -41,6 +42,12 @@ export const ActionLogSchema = z.discriminatedUnion('actionType', [
41
42
  payload: OrderProductUpdateActionLogSchema,
42
43
  })
43
44
  .merge(BaseActionFields),
45
+ z
46
+ .object({
47
+ actionType: z.literal(ActionLogTypeEnum.VERIFY_ORDER_ITEM),
48
+ payload: OrderProductVerifyActionLogSchema,
49
+ })
50
+ .merge(BaseActionFields),
44
51
  z
45
52
  .object({
46
53
  actionType: z.literal(ActionLogTypeEnum.MOVE_ORDER_ITEM),
@@ -7,6 +7,7 @@ export * from './order-product-delete-action-log.schema';
7
7
  export * from './order-product-info.schema';
8
8
  export * from './order-product-move-action-log.schema';
9
9
  export * from './order-product-update-action-log.schema';
10
+ export * from './order-product-verify-action-log.schema';
10
11
  export * from './order-update-action-log.schema';
11
12
  export * from './pre-order-create-action-log.schema';
12
13
  export * from './pre-order-delete-action-log.schema';
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ import { OrderProductInfoSchema } from './order-product-info.schema';
3
+ import { OrderProductVerifySourceEnum } from '../../enum';
4
+
5
+ export const OrderProductVerifyActionLogSchema = z.object({
6
+ orderProduct: OrderProductInfoSchema,
7
+ isVerified: z.boolean(),
8
+ previousIsVerified: z.boolean(),
9
+ source: z.nativeEnum(OrderProductVerifySourceEnum),
10
+ });