@floristcloud/api-lib 1.0.68 → 1.0.70

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,8 @@ const CreateManuallyPreOrderProductForStandingOrderRequestSchema = schemas_1.Cre
8
8
  isReplaceable: true,
9
9
  isPurchased: true,
10
10
  highAttention: true,
11
+ }).extend({
12
+ productImageUUID: zod_1.z.string().uuid().optional(),
11
13
  });
12
14
  const CreateManuallyPreOrderProductForStandingOrderResponseSchema = zod_1.z.object({
13
15
  message: zod_1.z.string().optional(),
@@ -4,7 +4,7 @@ exports.GenerateAndSendPasswordByAdminContractCommand = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const notification_channel_enum_1 = require("../../enum/notification-channel.enum");
6
6
  const GenerateAndSendPasswordByAdminRequestSchema = zod_1.z.object({
7
- channel: zod_1.z.enum([notification_channel_enum_1.NotificationChannelEnum.EMAIL, notification_channel_enum_1.NotificationChannelEnum.WHATSAPP]),
7
+ channel: zod_1.z.enum([notification_channel_enum_1.NotificationChannelEnum.EMAIL, notification_channel_enum_1.NotificationChannelEnum.TELEGRAM_BOT]),
8
8
  });
9
9
  const GenerateAndSendPasswordByAdminResponseSchema = zod_1.z.object({
10
10
  message: zod_1.z.string().optional(),
@@ -503,6 +503,7 @@ exports.ERRORS = {
503
503
  WHATSAPP_PHONE_NOT_FOUND: { code: 'W004', message: 'Phone number not found or invalid', httpCode: 400 },
504
504
  WHATSAPP_STATUS_CHECK_FAILED: { code: 'W005', message: 'Failed to check WhatsApp message status', httpCode: 500 },
505
505
  WHATSAPP_MESSAGE_NOT_FOUND: { code: 'W006', message: 'Message not found in notification', httpCode: 400 },
506
+ WHATSAPP_CHANNEL_NOT_IN_USE: { code: 'W007', message: 'WhatsApp channel is not in use', httpCode: 410 },
506
507
  //MAX MESSENGER
507
508
  MAX_MESSENGER_TEXT_NOT_SENT: { code: 'MX001', message: 'Failed to send text message via Max Messenger', httpCode: 500 },
508
509
  MAX_MESSENGER_FILE_NOT_SENT: { code: 'MX002', message: 'Failed to send file message via Max Messenger', httpCode: 500 },
@@ -679,6 +680,16 @@ exports.ERRORS = {
679
680
  message: 'Cannot delete pre-order collection with existing pre-orders',
680
681
  httpCode: 400,
681
682
  },
683
+ PRE_ORDER_COLLECTION_SYSTEM_CATALOG_CANNOT_BE_DELETED: {
684
+ code: 'POC013',
685
+ message: 'System standing-order catalog cannot be deleted',
686
+ httpCode: 400,
687
+ },
688
+ PRE_ORDER_COLLECTION_SYSTEM_CATALOG_CANNOT_BE_COPIED: {
689
+ code: 'POC014',
690
+ message: 'System standing-order catalog cannot be copied',
691
+ httpCode: 400,
692
+ },
682
693
  PRE_ORDER_COLLECTION_IMAGE_MATCHING_FAILED: {
683
694
  code: 'POC012',
684
695
  message: 'Failed to match images for pre order collection',
@@ -32,6 +32,7 @@ __exportStar(require("./package-status.enum"), exports);
32
32
  __exportStar(require("./package-type.enum"), exports);
33
33
  __exportStar(require("./product-in-package-status.enum"), exports);
34
34
  __exportStar(require("./pre-order-collection-status.enum"), exports);
35
+ __exportStar(require("./pre-order-collection-type.enum"), exports);
35
36
  __exportStar(require("./pre-order-status.enum"), exports);
36
37
  __exportStar(require("./userRole.enum"), exports);
37
38
  __exportStar(require("./parse-status.enum"), exports);
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PreOrderCollectionTypeEnum = void 0;
4
+ var PreOrderCollectionTypeEnum;
5
+ (function (PreOrderCollectionTypeEnum) {
6
+ PreOrderCollectionTypeEnum["REGULAR"] = "REGULAR";
7
+ PreOrderCollectionTypeEnum["STANDING_ORDER_CATALOG"] = "STANDING_ORDER_CATALOG";
8
+ })(PreOrderCollectionTypeEnum || (exports.PreOrderCollectionTypeEnum = PreOrderCollectionTypeEnum = {}));
@@ -65,6 +65,7 @@ exports.UpdatePreOrderProductSchema = exports.PreOrderProductSchema.omit({
65
65
  color: zod_1.z.string().nullable().optional(),
66
66
  parentPreOrderProductUUID: zod_1.z.string().nullable().optional(),
67
67
  matchingConfig: exports.MatchingConfigSchema.optional().nullable(),
68
+ imageUUID: zod_1.z.string().uuid().nullable().optional(),
68
69
  })
69
70
  .partial();
70
71
  exports.CreatePreOrderProductWebshopSchema = exports.PreOrderProductSchema.omit({
@@ -6,6 +6,8 @@ const CreateManuallyPreOrderProductForStandingOrderRequestSchema = CreatePreOrde
6
6
  isReplaceable: true,
7
7
  isPurchased: true,
8
8
  highAttention: true,
9
+ }).extend({
10
+ productImageUUID: z.string().uuid().optional(),
9
11
  });
10
12
 
11
13
  const CreateManuallyPreOrderProductForStandingOrderResponseSchema = z.object({
@@ -2,7 +2,7 @@ import { z } from 'zod';
2
2
  import { NotificationChannelEnum } from '../../enum/notification-channel.enum';
3
3
 
4
4
  const GenerateAndSendPasswordByAdminRequestSchema = z.object({
5
- channel: z.enum([NotificationChannelEnum.EMAIL, NotificationChannelEnum.WHATSAPP]),
5
+ channel: z.enum([NotificationChannelEnum.EMAIL, NotificationChannelEnum.TELEGRAM_BOT]),
6
6
  });
7
7
 
8
8
  const GenerateAndSendPasswordByAdminResponseSchema = z.object({
package/constant/error.ts CHANGED
@@ -529,6 +529,7 @@ export const ERRORS = {
529
529
  WHATSAPP_PHONE_NOT_FOUND: { code: 'W004', message: 'Phone number not found or invalid', httpCode: 400 },
530
530
  WHATSAPP_STATUS_CHECK_FAILED: { code: 'W005', message: 'Failed to check WhatsApp message status', httpCode: 500 },
531
531
  WHATSAPP_MESSAGE_NOT_FOUND: { code: 'W006', message: 'Message not found in notification', httpCode: 400 },
532
+ WHATSAPP_CHANNEL_NOT_IN_USE: { code: 'W007', message: 'WhatsApp channel is not in use', httpCode: 410 },
532
533
 
533
534
  //MAX MESSENGER
534
535
  MAX_MESSENGER_TEXT_NOT_SENT: { code: 'MX001', message: 'Failed to send text message via Max Messenger', httpCode: 500 },
@@ -715,6 +716,16 @@ export const ERRORS = {
715
716
  message: 'Cannot delete pre-order collection with existing pre-orders',
716
717
  httpCode: 400,
717
718
  },
719
+ PRE_ORDER_COLLECTION_SYSTEM_CATALOG_CANNOT_BE_DELETED: {
720
+ code: 'POC013',
721
+ message: 'System standing-order catalog cannot be deleted',
722
+ httpCode: 400,
723
+ },
724
+ PRE_ORDER_COLLECTION_SYSTEM_CATALOG_CANNOT_BE_COPIED: {
725
+ code: 'POC014',
726
+ message: 'System standing-order catalog cannot be copied',
727
+ httpCode: 400,
728
+ },
718
729
  PRE_ORDER_COLLECTION_IMAGE_MATCHING_FAILED: {
719
730
  code: 'POC012',
720
731
  message: 'Failed to match images for pre order collection',
package/enum/index.ts CHANGED
@@ -16,6 +16,7 @@ export * from './package-status.enum';
16
16
  export * from './package-type.enum';
17
17
  export * from './product-in-package-status.enum';
18
18
  export * from './pre-order-collection-status.enum';
19
+ export * from './pre-order-collection-type.enum';
19
20
  export * from './pre-order-status.enum';
20
21
  export * from './userRole.enum';
21
22
  export * from './parse-status.enum';
@@ -0,0 +1,4 @@
1
+ export enum PreOrderCollectionTypeEnum {
2
+ REGULAR = 'REGULAR',
3
+ STANDING_ORDER_CATALOG = 'STANDING_ORDER_CATALOG',
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floristcloud/api-lib",
3
- "version": "1.0.68",
3
+ "version": "1.0.70",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {
@@ -67,6 +67,7 @@ export const UpdatePreOrderProductSchema = PreOrderProductSchema.omit({
67
67
  color: z.string().nullable().optional(),
68
68
  parentPreOrderProductUUID: z.string().nullable().optional(),
69
69
  matchingConfig: MatchingConfigSchema.optional().nullable(),
70
+ imageUUID: z.string().uuid().nullable().optional(),
70
71
  })
71
72
  .partial();
72
73