@floristcloud/api-lib 1.2.4 → 1.2.5

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.
@@ -912,4 +912,11 @@ exports.ERRORS = {
912
912
  MOBILE_RATE_LIMIT_EXCEEDED: { code: 'MOB002', message: 'Too many requests to mobile login endpoint', httpCode: 429 },
913
913
  // UNIFIED AUTH (replaces separate USER_NOT_FOUND / INCORRECT_CREDENTIALS for login)
914
914
  INVALID_CREDENTIALS: { code: 'AUTH001', message: 'Invalid credentials', httpCode: 401 },
915
+ // DEVICE TOKEN
916
+ DEVICE_TOKEN_NOT_CREATED: { code: 'DT001', message: 'Failed to register device token', httpCode: 500 },
917
+ DEVICE_TOKEN_NOT_FOUND: { code: 'DT002', message: 'Device token not found', httpCode: 404 },
918
+ DEVICE_TOKEN_NOT_DELETED: { code: 'DT003', message: 'Failed to delete device token', httpCode: 500 },
919
+ // PUSH NOTIFICATION
920
+ PUSH_NOTIFICATION_SEND_FAILED: { code: 'PN001', message: 'Failed to send push notification', httpCode: 500 },
921
+ PUSH_NOTIFICATION_NO_DEVICES: { code: 'PN002', message: 'No active devices found for user', httpCode: 404 },
915
922
  };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DevicePlatformEnum = void 0;
4
+ var DevicePlatformEnum;
5
+ (function (DevicePlatformEnum) {
6
+ DevicePlatformEnum["IOS"] = "IOS";
7
+ DevicePlatformEnum["ANDROID"] = "ANDROID";
8
+ })(DevicePlatformEnum || (exports.DevicePlatformEnum = DevicePlatformEnum = {}));
@@ -80,3 +80,4 @@ __exportStar(require("./chat-has-manager-mode.enum"), exports);
80
80
  __exportStar(require("./chat-no-manager-mode.enum"), exports);
81
81
  __exportStar(require("./match-confidence.enum"), exports);
82
82
  __exportStar(require("./session-platform.enum"), exports);
83
+ __exportStar(require("./device-platform.enum"), exports);
@@ -13,5 +13,6 @@ var NotificationChannelEnum;
13
13
  NotificationChannelEnum["EMAIL"] = "EMAIL";
14
14
  NotificationChannelEnum["TELEGRAM_BOT"] = "TELEGRAM_BOT";
15
15
  NotificationChannelEnum["TELEGRAM_STAFF_BOT"] = "TELEGRAM_STAFF_BOT";
16
+ NotificationChannelEnum["MOBILE_PUSH"] = "MOBILE_PUSH";
16
17
  NotificationChannelEnum["SYSTEM"] = "SYSTEM";
17
18
  })(NotificationChannelEnum || (exports.NotificationChannelEnum = NotificationChannelEnum = {}));
package/constant/error.ts CHANGED
@@ -968,4 +968,13 @@ export const ERRORS = {
968
968
 
969
969
  // UNIFIED AUTH (replaces separate USER_NOT_FOUND / INCORRECT_CREDENTIALS for login)
970
970
  INVALID_CREDENTIALS: { code: 'AUTH001', message: 'Invalid credentials', httpCode: 401 },
971
+
972
+ // DEVICE TOKEN
973
+ DEVICE_TOKEN_NOT_CREATED: { code: 'DT001', message: 'Failed to register device token', httpCode: 500 },
974
+ DEVICE_TOKEN_NOT_FOUND: { code: 'DT002', message: 'Device token not found', httpCode: 404 },
975
+ DEVICE_TOKEN_NOT_DELETED: { code: 'DT003', message: 'Failed to delete device token', httpCode: 500 },
976
+
977
+ // PUSH NOTIFICATION
978
+ PUSH_NOTIFICATION_SEND_FAILED: { code: 'PN001', message: 'Failed to send push notification', httpCode: 500 },
979
+ PUSH_NOTIFICATION_NO_DEVICES: { code: 'PN002', message: 'No active devices found for user', httpCode: 404 },
971
980
  } as const;
@@ -0,0 +1,4 @@
1
+ export enum DevicePlatformEnum {
2
+ IOS = 'IOS',
3
+ ANDROID = 'ANDROID',
4
+ }
package/enum/index.ts CHANGED
@@ -64,3 +64,4 @@ export * from './chat-has-manager-mode.enum';
64
64
  export * from './chat-no-manager-mode.enum';
65
65
  export * from './match-confidence.enum';
66
66
  export * from './session-platform.enum';
67
+ export * from './device-platform.enum';
@@ -9,5 +9,6 @@ export enum NotificationChannelEnum {
9
9
  EMAIL = 'EMAIL',
10
10
  TELEGRAM_BOT = 'TELEGRAM_BOT',
11
11
  TELEGRAM_STAFF_BOT = 'TELEGRAM_STAFF_BOT',
12
+ MOBILE_PUSH = 'MOBILE_PUSH',
12
13
  SYSTEM = 'SYSTEM',
13
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floristcloud/api-lib",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {