@escapenavigator/types 1.10.1 → 1.10.2

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.
Files changed (38) hide show
  1. package/dist/google-calendar/google-calendar.ro.d.ts +2 -0
  2. package/dist/google-calendar/google-calendar.ro.js +5 -0
  3. package/dist/google-calendar/update-google-calendar.dto.d.ts +3 -0
  4. package/dist/google-calendar/update-google-calendar.dto.js +6 -0
  5. package/dist/profile/cross-sale/up-sale/up-sale.dto.js +1 -1
  6. package/dist/profile/notification-chanel/create-notification-chanel.dto.d.ts +11 -0
  7. package/dist/profile/notification-chanel/create-notification-chanel.dto.js +57 -0
  8. package/dist/profile/notification-chanel/notification-chanel-action.enum.d.ts +8 -0
  9. package/dist/profile/notification-chanel/notification-chanel-action.enum.js +12 -0
  10. package/dist/profile/notification-chanel/notification-chanel-query.dto.d.ts +5 -0
  11. package/dist/{webhook/create-webhook.dto.js → profile/notification-chanel/notification-chanel-query.dto.js} +10 -10
  12. package/dist/profile/notification-chanel/notification-chanel-type.enum.d.ts +6 -0
  13. package/dist/profile/notification-chanel/notification-chanel-type.enum.js +10 -0
  14. package/dist/profile/notification-chanel/notification-chanel.ro.d.ts +13 -0
  15. package/dist/profile/{telegram/telegram-chanel.ro.js → notification-chanel/notification-chanel.ro.js} +18 -9
  16. package/dist/role/create-role.dto.d.ts +1 -0
  17. package/dist/role/create-role.dto.js +5 -0
  18. package/dist/role/role.ro.d.ts +1 -0
  19. package/dist/role/role.ro.js +4 -0
  20. package/dist/tsconfig.build.tsbuildinfo +1 -1
  21. package/dist/user/crud/user.ro.d.ts +2 -2
  22. package/dist/user/crud/user.ro.js +1 -1
  23. package/dist/user/current/update-current-user-notifications.dto.d.ts +2 -2
  24. package/dist/user/current/update-current-user-notifications.dto.js +1 -1
  25. package/dist/user/sessions/query-session.dto.d.ts +5 -0
  26. package/dist/{profile/telegram/create-telegram-chanel.dto.js → user/sessions/query-session.dto.js} +12 -12
  27. package/package.json +2 -2
  28. package/dist/profile/telegram/create-telegram-chanel.dto.d.ts +0 -6
  29. package/dist/profile/telegram/telegram-chanel.ro.d.ts +0 -10
  30. package/dist/profile/telegram/telegram-notification-type.enum.d.ts +0 -4
  31. package/dist/profile/telegram/telegram-notification-type.enum.js +0 -8
  32. package/dist/user/enum/notification.enum.d.ts +0 -9
  33. package/dist/user/enum/notification.enum.js +0 -13
  34. package/dist/webhook/create-webhook.dto.d.ts +0 -5
  35. package/dist/webhook/webhook-type.enum.d.ts +0 -5
  36. package/dist/webhook/webhook-type.enum.js +0 -9
  37. package/dist/webhook/webhook.ro.d.ts +0 -6
  38. package/dist/webhook/webhook.ro.js +0 -25
@@ -1,7 +1,7 @@
1
1
  import { LogTitleEnum } from '../../log/log-title.enum';
2
+ import { NotificationTriggerEnum } from '../../profile/notification-chanel/notification-chanel-action.enum';
2
3
  import { Languages } from '../../shared/enum/languages.enum';
3
4
  import { RO } from '../../shared/ro-class';
4
- import { NotificationEnum } from '../enum/notification.enum';
5
5
  export declare class UserRO extends RO {
6
6
  profileId: number;
7
7
  updatedAt: Date;
@@ -18,7 +18,7 @@ export declare class UserRO extends RO {
18
18
  hoursContract?: number;
19
19
  access: boolean;
20
20
  roleId: number;
21
- notifications: NotificationEnum[];
21
+ notificationTriggers: NotificationTriggerEnum[];
22
22
  pushNotifications: LogTitleEnum[];
23
23
  lastDevice: string;
24
24
  lastVisit: Date;
@@ -78,7 +78,7 @@ __decorate([
78
78
  __decorate([
79
79
  (0, class_transformer_1.Expose)(),
80
80
  __metadata("design:type", Array)
81
- ], UserRO.prototype, "notifications", void 0);
81
+ ], UserRO.prototype, "notificationTriggers", void 0);
82
82
  __decorate([
83
83
  (0, class_transformer_1.Expose)(),
84
84
  (0, class_transformer_1.Transform)(({ value }) => value || []),
@@ -1,4 +1,4 @@
1
- import { NotificationEnum } from '../enum/notification.enum';
1
+ import { NotificationTriggerEnum } from '../../profile/notification-chanel/notification-chanel-action.enum';
2
2
  export declare class UpdateCurrentUserNotificationsDto {
3
- notifications: NotificationEnum[];
3
+ notificationTriggers: NotificationTriggerEnum[];
4
4
  }
@@ -18,5 +18,5 @@ __decorate([
18
18
  (0, class_validator_1.IsArray)(),
19
19
  (0, class_transformer_1.Expose)(),
20
20
  __metadata("design:type", Array)
21
- ], UpdateCurrentUserNotificationsDto.prototype, "notifications", void 0);
21
+ ], UpdateCurrentUserNotificationsDto.prototype, "notificationTriggers", void 0);
22
22
  exports.UpdateCurrentUserNotificationsDto = UpdateCurrentUserNotificationsDto;
@@ -0,0 +1,5 @@
1
+ export declare class QuerySessionDto {
2
+ date?: [string, string];
3
+ locationsIds?: number[];
4
+ usersIds?: number[];
5
+ }
@@ -9,27 +9,27 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.CreateTelegramChanelDto = void 0;
12
+ exports.QuerySessionDto = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
14
  const class_validator_1 = require("class-validator");
15
- class CreateTelegramChanelDto {
15
+ class QuerySessionDto {
16
16
  }
17
17
  __decorate([
18
- (0, class_validator_1.IsArray)(),
19
- (0, class_validator_1.ArrayMinSize)(1),
18
+ (0, class_validator_1.IsOptional)(),
20
19
  (0, class_transformer_1.Expose)(),
20
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'object' ? value : ['', ''])),
21
21
  __metadata("design:type", Array)
22
- ], CreateTelegramChanelDto.prototype, "type", void 0);
22
+ ], QuerySessionDto.prototype, "date", void 0);
23
23
  __decorate([
24
- (0, class_validator_1.IsBoolean)(),
25
- (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'boolean' ? value : false)),
24
+ (0, class_validator_1.IsOptional)(),
25
+ (0, class_validator_1.IsArray)(),
26
26
  (0, class_transformer_1.Expose)(),
27
- __metadata("design:type", Boolean)
28
- ], CreateTelegramChanelDto.prototype, "allLocations", void 0);
27
+ __metadata("design:type", Array)
28
+ ], QuerySessionDto.prototype, "locationsIds", void 0);
29
29
  __decorate([
30
+ (0, class_validator_1.IsOptional)(),
30
31
  (0, class_validator_1.IsArray)(),
31
- (0, class_transformer_1.Transform)(({ value }) => (value && value.length ? value : [])),
32
32
  (0, class_transformer_1.Expose)(),
33
33
  __metadata("design:type", Array)
34
- ], CreateTelegramChanelDto.prototype, "locationIds", void 0);
35
- exports.CreateTelegramChanelDto = CreateTelegramChanelDto;
34
+ ], QuerySessionDto.prototype, "usersIds", void 0);
35
+ exports.QuerySessionDto = QuerySessionDto;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@escapenavigator/types",
3
- "version": "1.10.1",
3
+ "version": "1.10.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -21,7 +21,7 @@
21
21
  "class-transformer": "^0.5.1",
22
22
  "class-validator": "^0.13.2"
23
23
  },
24
- "gitHead": "395c5d6b2de6f4628cb8303e59f66d6e0b1e0d58",
24
+ "gitHead": "ae85440284de3c5cde10221861a888fd3669fce7",
25
25
  "devDependencies": {
26
26
  "@types/validator": "13.0.0",
27
27
  "alphakit-presets-lint": "^1.0.0",
@@ -1,6 +0,0 @@
1
- import { TelegramNotificationTypeEnum } from './telegram-notification-type.enum';
2
- export declare class CreateTelegramChanelDto {
3
- type: TelegramNotificationTypeEnum[];
4
- allLocations: boolean;
5
- locationIds: number[];
6
- }
@@ -1,10 +0,0 @@
1
- import { RO } from '../../shared/ro-class';
2
- import { TelegramNotificationTypeEnum } from './telegram-notification-type.enum';
3
- export declare class TelegramChanelRO extends RO {
4
- title: string;
5
- chatId: string;
6
- type: TelegramNotificationTypeEnum[];
7
- allLocations: boolean;
8
- locationIds: number[];
9
- profileId: number;
10
- }
@@ -1,4 +0,0 @@
1
- export declare enum TelegramNotificationTypeEnum {
2
- NEW_ORDER = "new-order",
3
- CANCEL_ORDER = "cancel-order"
4
- }
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TelegramNotificationTypeEnum = void 0;
4
- var TelegramNotificationTypeEnum;
5
- (function (TelegramNotificationTypeEnum) {
6
- TelegramNotificationTypeEnum["NEW_ORDER"] = "new-order";
7
- TelegramNotificationTypeEnum["CANCEL_ORDER"] = "cancel-order";
8
- })(TelegramNotificationTypeEnum = exports.TelegramNotificationTypeEnum || (exports.TelegramNotificationTypeEnum = {}));
@@ -1,9 +0,0 @@
1
- export declare enum NotificationEnum {
2
- ORDERS = "orders",
3
- ORDERS_CANCEL = "orders_cancel",
4
- ASSIGNMENTS = "assignments",
5
- CERTIFICATE_SALES = "certificate_sales",
6
- IMPORTANT = "important",
7
- TECHNICAL = "technical",
8
- MARKETING = "marketing"
9
- }
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NotificationEnum = void 0;
4
- var NotificationEnum;
5
- (function (NotificationEnum) {
6
- NotificationEnum["ORDERS"] = "orders";
7
- NotificationEnum["ORDERS_CANCEL"] = "orders_cancel";
8
- NotificationEnum["ASSIGNMENTS"] = "assignments";
9
- NotificationEnum["CERTIFICATE_SALES"] = "certificate_sales";
10
- NotificationEnum["IMPORTANT"] = "important";
11
- NotificationEnum["TECHNICAL"] = "technical";
12
- NotificationEnum["MARKETING"] = "marketing";
13
- })(NotificationEnum = exports.NotificationEnum || (exports.NotificationEnum = {}));
@@ -1,5 +0,0 @@
1
- import { WebhookTypeEnum } from './webhook-type.enum';
2
- export declare class CreateWebhookDto {
3
- url: string;
4
- type: WebhookTypeEnum[];
5
- }
@@ -1,5 +0,0 @@
1
- export declare enum WebhookTypeEnum {
2
- NEW_ORDER = "new-order",
3
- UPDATE_ORDER = "update-order",
4
- CANCEL_ORDER = "cancel-order"
5
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WebhookTypeEnum = void 0;
4
- var WebhookTypeEnum;
5
- (function (WebhookTypeEnum) {
6
- WebhookTypeEnum["NEW_ORDER"] = "new-order";
7
- WebhookTypeEnum["UPDATE_ORDER"] = "update-order";
8
- WebhookTypeEnum["CANCEL_ORDER"] = "cancel-order";
9
- })(WebhookTypeEnum = exports.WebhookTypeEnum || (exports.WebhookTypeEnum = {}));
@@ -1,6 +0,0 @@
1
- import { RO } from '../shared/ro-class';
2
- import { WebhookTypeEnum } from './webhook-type.enum';
3
- export declare class WebhookRO extends RO {
4
- url: string;
5
- type: WebhookTypeEnum[];
6
- }
@@ -1,25 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.WebhookRO = void 0;
13
- const class_transformer_1 = require("class-transformer");
14
- const ro_class_1 = require("../shared/ro-class");
15
- class WebhookRO extends ro_class_1.RO {
16
- }
17
- __decorate([
18
- (0, class_transformer_1.Expose)(),
19
- __metadata("design:type", String)
20
- ], WebhookRO.prototype, "url", void 0);
21
- __decorate([
22
- (0, class_transformer_1.Expose)(),
23
- __metadata("design:type", Array)
24
- ], WebhookRO.prototype, "type", void 0);
25
- exports.WebhookRO = WebhookRO;