@floristcloud/api-lib 1.0.71 → 1.0.73

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.
@@ -53,6 +53,7 @@ __exportStar(require("./client/import-client.command"), exports);
53
53
  __exportStar(require("./delivery-route"), exports);
54
54
  __exportStar(require("./wrire-off-archive"), exports);
55
55
  __exportStar(require("./message"), exports);
56
+ __exportStar(require("./notification"), exports);
56
57
  __exportStar(require("./product-configuration/get-product-configuration.query"), exports);
57
58
  __exportStar(require("./product-configuration/get-product-configuration-list.query"), exports);
58
59
  __exportStar(require("./product-configuration/create-product-configuration.command"), exports);
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./send-staff-notification-s2s.command"), exports);
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SendStaffNotificationS2SContractCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const SendStaffNotificationS2SRequestSchema = zod_1.z.object({
6
+ companyUUID: zod_1.z.string().uuid(),
7
+ staffUserUUID: zod_1.z.string().uuid(),
8
+ message: zod_1.z.string().min(1),
9
+ });
10
+ const SendStaffNotificationS2SResponseSchema = zod_1.z.object({
11
+ data: zod_1.z
12
+ .object({
13
+ notificationUUID: zod_1.z.string().uuid().optional(),
14
+ })
15
+ .optional(),
16
+ });
17
+ var SendStaffNotificationS2SContractCommand;
18
+ (function (SendStaffNotificationS2SContractCommand) {
19
+ SendStaffNotificationS2SContractCommand.RequestSchema = SendStaffNotificationS2SRequestSchema;
20
+ SendStaffNotificationS2SContractCommand.ResponseSchema = SendStaffNotificationS2SResponseSchema;
21
+ })(SendStaffNotificationS2SContractCommand || (exports.SendStaffNotificationS2SContractCommand = SendStaffNotificationS2SContractCommand = {}));
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CreateProductContractCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const enum_1 = require("../../enum");
5
6
  const schemas_1 = require("../../schemas");
6
7
  const CreateProductRequestSchema = zod_1.z.object({
7
8
  name: zod_1.z.string(),
@@ -29,6 +30,7 @@ const CreateProductRequestSchema = zod_1.z.object({
29
30
  grower: zod_1.z.string().nullable(),
30
31
  vat: zod_1.z.number().nullable(),
31
32
  multiplicityDescription: zod_1.z.string().nullable(),
33
+ salesUnit: zod_1.z.nativeEnum(enum_1.SalesUnitEnum).optional().nullable(),
32
34
  });
33
35
  const CreateProductResponseSchema = zod_1.z.object({
34
36
  message: zod_1.z.string().optional(),
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UpdateProductContractCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const enum_1 = require("../../enum");
5
6
  const schemas_1 = require("../../schemas");
6
7
  const UpdateProductRequestSchema = zod_1.z.object({
7
8
  name: zod_1.z.string(),
@@ -29,6 +30,7 @@ const UpdateProductRequestSchema = zod_1.z.object({
29
30
  grower: zod_1.z.string().nullable(),
30
31
  vat: zod_1.z.number().nullable(),
31
32
  multiplicityDescription: zod_1.z.string().nullable(),
33
+ salesUnit: zod_1.z.nativeEnum(enum_1.SalesUnitEnum).optional().nullable(),
32
34
  });
33
35
  const UpdateProductResponseSchema = zod_1.z.object({
34
36
  message: zod_1.z.string().optional(),
@@ -34,4 +34,5 @@ var ConsignmentImportSchemaRelationEntityPropertyEnum;
34
34
  ConsignmentImportSchemaRelationEntityPropertyEnum["OPTION1_TITLE"] = "OPTION1_TITLE";
35
35
  ConsignmentImportSchemaRelationEntityPropertyEnum["OPTION1_MULTIPLICITY"] = "OPTION1_MULTIPLICITY";
36
36
  ConsignmentImportSchemaRelationEntityPropertyEnum["OPTION1_PRICE"] = "OPTION1_PRICE";
37
+ ConsignmentImportSchemaRelationEntityPropertyEnum["SALES_UNIT"] = "SALES_UNIT";
37
38
  })(ConsignmentImportSchemaRelationEntityPropertyEnum || (exports.ConsignmentImportSchemaRelationEntityPropertyEnum = ConsignmentImportSchemaRelationEntityPropertyEnum = {}));
@@ -37,6 +37,7 @@ exports.ProductSchema = zod_1.z.object({
37
37
  grower: zod_1.z.string().nullable(),
38
38
  vat: zod_1.z.number().nullable(),
39
39
  multiplicityDescription: zod_1.z.string().nullable(),
40
+ salesUnit: zod_1.z.nativeEnum(enum_1.SalesUnitEnum).nullable(),
40
41
  createdAt: zod_1.z.date(),
41
42
  updatedAt: zod_1.z.date(),
42
43
  });
@@ -62,6 +63,7 @@ exports.ProductForClientSchema = zod_1.z.object({
62
63
  description: zod_1.z.string().nullable(),
63
64
  grower: zod_1.z.string().nullable(),
64
65
  multiplicityDescription: zod_1.z.string().nullable(),
66
+ salesUnit: zod_1.z.nativeEnum(enum_1.SalesUnitEnum).nullable(),
65
67
  });
66
68
  exports.ProductExtendedForClientSchema = exports.ProductForClientSchema.merge(zod_1.z.object({
67
69
  category: zod_1.z
package/commands/index.ts CHANGED
@@ -37,6 +37,7 @@ export * from './client/import-client.command';
37
37
  export * from './delivery-route';
38
38
  export * from './wrire-off-archive';
39
39
  export * from './message';
40
+ export * from './notification';
40
41
  export * from './product-configuration/get-product-configuration.query';
41
42
  export * from './product-configuration/get-product-configuration-list.query';
42
43
  export * from './product-configuration/create-product-configuration.command';
@@ -0,0 +1 @@
1
+ export * from './send-staff-notification-s2s.command';
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+
3
+ const SendStaffNotificationS2SRequestSchema = z.object({
4
+ companyUUID: z.string().uuid(),
5
+ staffUserUUID: z.string().uuid(),
6
+ message: z.string().min(1),
7
+ });
8
+
9
+ const SendStaffNotificationS2SResponseSchema = z.object({
10
+ data: z
11
+ .object({
12
+ notificationUUID: z.string().uuid().optional(),
13
+ })
14
+ .optional(),
15
+ });
16
+
17
+ export namespace SendStaffNotificationS2SContractCommand {
18
+ export const RequestSchema = SendStaffNotificationS2SRequestSchema;
19
+ export type Request = z.infer<typeof RequestSchema>;
20
+
21
+ export const ResponseSchema = SendStaffNotificationS2SResponseSchema;
22
+ export type Response = z.infer<typeof ResponseSchema>;
23
+ }
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { SalesUnitEnum } from '../../enum';
2
3
  import { ProductExtendedForAdminSchema } from '../../schemas';
3
4
 
4
5
  const CreateProductRequestSchema = z.object({
@@ -28,6 +29,7 @@ const CreateProductRequestSchema = z.object({
28
29
  grower: z.string().nullable(),
29
30
  vat: z.number().nullable(),
30
31
  multiplicityDescription: z.string().nullable(),
32
+ salesUnit: z.nativeEnum(SalesUnitEnum).optional().nullable(),
31
33
  });
32
34
 
33
35
  const CreateProductResponseSchema = z.object({
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { SalesUnitEnum } from '../../enum';
2
3
  import { ProductExtendedForAdminSchema } from '../../schemas';
3
4
 
4
5
  const UpdateProductRequestSchema = z.object({
@@ -28,6 +29,7 @@ const UpdateProductRequestSchema = z.object({
28
29
  grower: z.string().nullable(),
29
30
  vat: z.number().nullable(),
30
31
  multiplicityDescription: z.string().nullable(),
32
+ salesUnit: z.nativeEnum(SalesUnitEnum).optional().nullable(),
31
33
  });
32
34
 
33
35
  const UpdateProductResponseSchema = z.object({
@@ -30,4 +30,5 @@ export enum ConsignmentImportSchemaRelationEntityPropertyEnum {
30
30
  OPTION1_TITLE = 'OPTION1_TITLE',
31
31
  OPTION1_MULTIPLICITY = 'OPTION1_MULTIPLICITY',
32
32
  OPTION1_PRICE = 'OPTION1_PRICE',
33
+ SALES_UNIT = 'SALES_UNIT',
33
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floristcloud/api-lib",
3
- "version": "1.0.71",
3
+ "version": "1.0.73",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {
@@ -3,7 +3,7 @@ import { ProductImageSchema } from '../product-image/product-image.schema';
3
3
  import { CategorySchema } from '../category/category.schema';
4
4
  import { TypeSchema } from '../type/type.schema';
5
5
  import { ConsignmentSchema } from '../consignment/consignment.schema';
6
- import { DiscountRulesTypeEnum } from '../../enum';
6
+ import { DiscountRulesTypeEnum, SalesUnitEnum } from '../../enum';
7
7
  import { discountRulesModeSchema } from '../discount-rules/discount-rules.schema';
8
8
  import { ProductMultiplicityOptionSchema } from '../..';
9
9
 
@@ -37,6 +37,7 @@ export const ProductSchema = z.object({
37
37
  grower: z.string().nullable(),
38
38
  vat: z.number().nullable(),
39
39
  multiplicityDescription: z.string().nullable(),
40
+ salesUnit: z.nativeEnum(SalesUnitEnum).nullable(),
40
41
 
41
42
  createdAt: z.date(),
42
43
  updatedAt: z.date(),
@@ -67,6 +68,7 @@ export const ProductForClientSchema = z.object({
67
68
  description: z.string().nullable(),
68
69
  grower: z.string().nullable(),
69
70
  multiplicityDescription: z.string().nullable(),
71
+ salesUnit: z.nativeEnum(SalesUnitEnum).nullable(),
70
72
  });
71
73
 
72
74
  export const ProductExtendedForClientSchema = ProductForClientSchema.merge(