@hosterai/types 0.0.9 → 0.0.11

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 (106) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +139 -43
  3. package/dist/dtos/action.dto.d.ts +1 -1
  4. package/dist/dtos/action.dto.js +28 -0
  5. package/dist/dtos/attachment.dto.d.ts +1 -1
  6. package/dist/dtos/attachment.dto.js +1 -1
  7. package/dist/dtos/company-data.dto.d.ts +2 -2
  8. package/dist/dtos/company-data.dto.js +94 -0
  9. package/dist/dtos/error-response.dto.d.ts +1 -1
  10. package/dist/dtos/error-response.dto.js +1 -1
  11. package/dist/dtos/field.dto.d.ts +3 -3
  12. package/dist/dtos/field.dto.js +70 -0
  13. package/dist/dtos/info.dto.d.ts +2 -3
  14. package/dist/dtos/jwt.dto.d.ts +21 -19
  15. package/dist/dtos/jwt.dto.js +40 -0
  16. package/dist/dtos/menu.dto.d.ts +1 -1
  17. package/dist/dtos/multilang-text.dto.d.ts +1 -1
  18. package/dist/dtos/notification/notification-info.dto.d.ts +3 -3
  19. package/dist/dtos/notification/notification-request.dto.d.ts +2 -2
  20. package/dist/dtos/response-data.dto.d.ts +1 -1
  21. package/dist/dtos/setup-status-response.dto.d.ts +2 -2
  22. package/dist/enums/country.enum.js +3 -3
  23. package/dist/enums/{message-type.enum.d.ts → notification/notification-message-type.enum.d.ts} +1 -1
  24. package/dist/enums/notification/notification-message-type.enum.js +9 -0
  25. package/dist/index.d.ts +13 -1
  26. package/dist/index.js +13 -1
  27. package/dist/validators/action-validator.d.ts +8 -0
  28. package/dist/validators/action-validator.js +17 -0
  29. package/dist/validators/company-data-validator.d.ts +8 -0
  30. package/dist/validators/company-data-validator.js +17 -0
  31. package/dist/validators/field-validator.d.ts +8 -0
  32. package/dist/validators/field-validator.js +17 -0
  33. package/dist/validators/jwt-validator.d.ts +8 -0
  34. package/dist/validators/jwt-validator.js +17 -0
  35. package/dist/validators/multilang-text-validator.d.ts +8 -0
  36. package/dist/validators/multilang-text-validator.js +17 -0
  37. package/dist/validators/receiver-email-validator.d.ts +8 -0
  38. package/dist/validators/receiver-email-validator.js +17 -0
  39. package/dist/validators/receiver-push-validator.d.ts +8 -0
  40. package/dist/validators/receiver-push-validator.js +17 -0
  41. package/dist/validators/receiver-sms-validator.d.ts +8 -0
  42. package/dist/validators/receiver-sms-validator.js +17 -0
  43. package/dist/validators/sender-email-validator.d.ts +8 -0
  44. package/dist/validators/sender-email-validator.js +17 -0
  45. package/dist/validators/sender-push-validator.d.ts +8 -0
  46. package/dist/validators/sender-push-validator.js +17 -0
  47. package/dist/validators/sender-sms-validator.d.ts +8 -0
  48. package/dist/validators/sender-sms-validator.js +17 -0
  49. package/package.json +18 -5
  50. package/dist/dtos/action.dto.d.ts.map +0 -1
  51. package/dist/dtos/attachment.dto.d.ts.map +0 -1
  52. package/dist/dtos/base-response.dto.d.ts.map +0 -1
  53. package/dist/dtos/company-data.dto.d.ts.map +0 -1
  54. package/dist/dtos/error-response.dto.d.ts.map +0 -1
  55. package/dist/dtos/field.dto.d.ts.map +0 -1
  56. package/dist/dtos/info/info-notification.dto.d.ts +0 -6
  57. package/dist/dtos/info/info-notification.dto.d.ts.map +0 -1
  58. package/dist/dtos/info/info-notification.dto.js +0 -7
  59. package/dist/dtos/info/info.dto.d.ts +0 -141
  60. package/dist/dtos/info/info.dto.d.ts.map +0 -1
  61. package/dist/dtos/info/info.dto.js +0 -16
  62. package/dist/dtos/jwt.dto.d.ts.map +0 -1
  63. package/dist/dtos/menu.dto.d.ts.map +0 -1
  64. package/dist/dtos/multilang-text.dto.d.ts.map +0 -1
  65. package/dist/dtos/notification/info-notification.dto.d.ts +0 -5
  66. package/dist/dtos/notification/info-notification.dto.js +0 -7
  67. package/dist/dtos/notification/request.dto.d.ts +0 -21
  68. package/dist/dtos/notification/request.dto.d.ts.map +0 -1
  69. package/dist/dtos/notification/request.dto.js +0 -31
  70. package/dist/dtos/receiver/receiver-email.dto.d.ts +0 -20
  71. package/dist/dtos/receiver/receiver-email.dto.d.ts.map +0 -1
  72. package/dist/dtos/receiver/receiver-email.dto.js +0 -39
  73. package/dist/dtos/receiver/receiver-push.dto.d.ts +0 -15
  74. package/dist/dtos/receiver/receiver-push.dto.d.ts.map +0 -1
  75. package/dist/dtos/receiver/receiver-push.dto.js +0 -31
  76. package/dist/dtos/receiver/receiver-sms.dto.d.ts +0 -11
  77. package/dist/dtos/receiver/receiver-sms.dto.d.ts.map +0 -1
  78. package/dist/dtos/receiver/receiver-sms.dto.js +0 -26
  79. package/dist/dtos/request.dto.d.ts +0 -20
  80. package/dist/dtos/request.dto.js +0 -31
  81. package/dist/dtos/response-data.dto.d.ts.map +0 -1
  82. package/dist/dtos/sender/sender-email.dto.d.ts +0 -25
  83. package/dist/dtos/sender/sender-email.dto.d.ts.map +0 -1
  84. package/dist/dtos/sender/sender-email.dto.js +0 -46
  85. package/dist/dtos/sender/sender-push.dto.d.ts +0 -31
  86. package/dist/dtos/sender/sender-push.dto.d.ts.map +0 -1
  87. package/dist/dtos/sender/sender-push.dto.js +0 -50
  88. package/dist/dtos/sender/sender-sms.dto.d.ts +0 -15
  89. package/dist/dtos/sender/sender-sms.dto.d.ts.map +0 -1
  90. package/dist/dtos/sender/sender-sms.dto.js +0 -30
  91. package/dist/dtos/setup-status-response.dto.d.ts.map +0 -1
  92. package/dist/dtos/success-response.dto.d.ts.map +0 -1
  93. package/dist/dtos/tab.dto.d.ts.map +0 -1
  94. package/dist/dtos/task-response.dto.d.ts.map +0 -1
  95. package/dist/dtos/unit.dto.d.ts.map +0 -1
  96. package/dist/enums/actions.enum.d.ts.map +0 -1
  97. package/dist/enums/country.enum.d.ts.map +0 -1
  98. package/dist/enums/events.enum.d.ts.map +0 -1
  99. package/dist/enums/field-type.enum.d.ts.map +0 -1
  100. package/dist/enums/language.enum.d.ts.map +0 -1
  101. package/dist/enums/message-type.enum.d.ts.map +0 -1
  102. package/dist/enums/message-type.enum.js +0 -9
  103. package/dist/enums/open-method.enum.d.ts.map +0 -1
  104. package/dist/enums/roles.enum.d.ts.map +0 -1
  105. package/dist/enums/setup-status.enum.d.ts.map +0 -1
  106. package/dist/index.d.ts.map +0 -1
@@ -1,141 +0,0 @@
1
- import { ActionsEnum } from '../../enums/actions.enum';
2
- import { EventsEnum } from '../../enums/events.enum';
3
- import { FieldDto } from '../field.dto';
4
- import { ResponseDataDto } from '../response-data.dto';
5
- import { UnitDto } from '../unit.dto';
6
- import { LanguageEnum } from '../../enums/language.enum';
7
- import { RolesEnum } from '../../enums/roles.enum';
8
- import { ActionDto } from '../action.dto';
9
- import { TabDto } from '../tab.dto';
10
- import { MenuDtoWithSubmenu, MenuDtoWithUrl } from '../menu.dto';
11
- /**
12
- * DTO for integration information
13
- * Contains all information related to a service integration
14
- */
15
- export declare class InfoDto {
16
- /**
17
- * The title of the integration
18
- */
19
- title: string;
20
- /**
21
- * The logo of the integration (optional)
22
- */
23
- logo?: string;
24
- /**
25
- * Description of the integration and its services (optional)
26
- */
27
- description?: string;
28
- /**
29
- * List of supported languages for the integration.
30
- */
31
- supported_languages: LanguageEnum[];
32
- /**
33
- * Custom attributes for products.
34
- */
35
- product_attributes?: FieldDto[];
36
- /**
37
- * Custom attributes for items.
38
- */
39
- item_attributes?: FieldDto[];
40
- /**
41
- * Events that the integration listens to.
42
- */
43
- listen_events?: EventsEnum[];
44
- /**
45
- * The roles that need to be accepted by the company
46
- */
47
- requiredRoles?: RolesEnum[];
48
- /**
49
- * Actions that are not supported by the integration.
50
- */
51
- unsupportedActions?: ActionsEnum[];
52
- /**
53
- * Configuration for the admin panel.
54
- * Contains all UI and action configuration for the admin interface.
55
- */
56
- adminPanel?: {
57
- /** Tab groups for different admin panel sections in the admin panel. */
58
- tabs?: {
59
- /** Tabs related to products. */
60
- product: TabDto[];
61
- /** Tabs related to items. */
62
- item: TabDto[];
63
- /** Tabs related to clients. */
64
- client: TabDto[];
65
- /** Tabs related to users. */
66
- user: TabDto[];
67
- /** Tabs related to orders. */
68
- order: TabDto[];
69
- };
70
- /** Additional actions available in the admin panel. */
71
- moreActions?: {
72
- /** Actions related to clients. */
73
- client?: ActionDto[];
74
- /** Actions related to items. */
75
- item?: ActionDto[];
76
- /** Actions related to invoices. */
77
- invoice?: ActionDto[];
78
- /** Actions related to users. */
79
- user?: ActionDto[];
80
- /** Actions related to orders. */
81
- order?: ActionDto[];
82
- };
83
- /** Main menu for the admin panel. Extends TabDto and adds icon information */
84
- menu?: MenuDtoWithSubmenu | MenuDtoWithUrl;
85
- settings?: {
86
- label: string;
87
- icon: string;
88
- descrition: string;
89
- } & ({
90
- url: string;
91
- tabs?: never;
92
- } | // If url is provided, tabs should not be present
93
- {
94
- url?: never;
95
- tabs: [TabDto, ...TabDto[]];
96
- });
97
- };
98
- /**
99
- * Configuration for the client panel.
100
- * Contains all UI and action configuration for the client interface.
101
- */
102
- clientPanel?: {
103
- /** Tab groups for the client panel. */
104
- tabs?: {
105
- /** Tabs related to items. */
106
- item: TabDto[];
107
- };
108
- /** Additional actions available in the client panel. */
109
- moreActions?: {
110
- /** Actions related to items. */
111
- item?: ActionDto[];
112
- };
113
- /** Main menu for the client panel.
114
- * Each menu must have at least one TabDto.
115
- * If there are no submenus, the label of the TabDto will be displayed in the panel.
116
- * If there are submenus, the label of the MenuDto and the TabDtos of the MenuDto will be displayed in the panel.
117
- * The TabDtos of the MenuDto will be the submenus of the MenuDto.
118
- */
119
- menu?: MenuDtoWithSubmenu | MenuDtoWithUrl;
120
- };
121
- /**
122
- * The url for the onboarding process after installation of the integration
123
- * Will be displayed either as a popup or as a side sheet containing an iframe
124
- * with this url and the jwt in the url
125
- */
126
- onboardingUrl?: string;
127
- /**
128
- * Units for pay-per-use billing.
129
- * e.g. id: ram, unitDescription: MB, intervalDescription: month
130
- * With the above in the admin the administrator will be able to set a price for
131
- * MB per month (the id is the unit's unique identifier)
132
- */
133
- payPerUseUnits?: UnitDto[];
134
- /**
135
- * Here we need to specify the fields (keys) that a successful create will return
136
- * In other words, we want to know the information that a successful create will
137
- * return, before the create is executed
138
- */
139
- responseDataFieldNames?: Record<keyof ResponseDataDto, string>;
140
- }
141
- //# sourceMappingURL=info.dto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"info.dto.d.ts","sourceRoot":"","sources":["../../../dtos/info/info.dto.ts"],"names":[],"mappings":"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"}
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InfoDto = void 0;
4
- /**
5
- * DTO for integration information
6
- * Contains all information related to a service integration
7
- */
8
- class InfoDto {
9
- constructor() {
10
- /**
11
- * Actions that are not supported by the integration.
12
- */
13
- this.unsupportedActions = [];
14
- }
15
- }
16
- exports.InfoDto = InfoDto;
@@ -1 +0,0 @@
1
- {"version":3,"file":"jwt.dto.d.ts","sourceRoot":"","sources":["../../dtos/jwt.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD;;;GAGG;AACH,qBAAa,MAAM;IACjB;;;;OAIG;IACH,GAAG,EAAE;QAEH;;WAEG;QACH,aAAa,EAAE,MAAM,CAAC;QAEtB;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,aAAa,EAAE,SAAS,EAAE,CAAC;KAC5B,CAAC;CACH"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"menu.dto.d.ts","sourceRoot":"","sources":["../../dtos/menu.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC;;GAEG;AACH,UAAU,WAAW;IACnB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,WAAW;IACjD,IAAI,EAAE,UAAU,CAAC;IACjB;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD,IAAI,EAAE,cAAc,CAAC;IACrB,GAAG,CAAC,EAAE,KAAK,CAAC;IAEZ;;;OAGG;IACH,OAAO,EAAE,UAAU,EAAE,CAAC;CACvB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"multilang-text.dto.d.ts","sourceRoot":"","sources":["../../dtos/multilang-text.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,qBAAa,gBAAgB;IAGzB,QAAQ,EAAE,YAAY,CAAC;IAIvB,IAAI,EAAE,MAAM,CAAC;CACd"}
@@ -1,5 +0,0 @@
1
- import { MessageTypeEnum } from "../../enums/message-type.enum";
2
- import { InfoDto } from "../info.dto";
3
- export declare class InfoNotificationDto extends InfoDto {
4
- type: MessageTypeEnum;
5
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InfoNotificationDto = void 0;
4
- const info_dto_1 = require("../info.dto");
5
- class InfoNotificationDto extends info_dto_1.InfoDto {
6
- }
7
- exports.InfoNotificationDto = InfoNotificationDto;
@@ -1,21 +0,0 @@
1
- import { EmailReceiverDto } from '../receiver/receiver-email.dto';
2
- import { EmailSenderDto } from '../sender/sender-email.dto';
3
- import { PushSenderDto } from '../sender/sender-push.dto';
4
- import { SmsSenderDto } from '../sender/sender-sms.dto';
5
- import { PushReceiverDto } from '../receiver/receiver-push.dto';
6
- import { SmsReceiverDto } from '../receiver/receiver-sms.dto';
7
- export declare class NotificationRequestDto {
8
- /**
9
- * Unique identifier of the hoster message
10
- */
11
- notificationId: string;
12
- /**
13
- * Sender details according to the integration's notification type
14
- */
15
- sender: EmailSenderDto | SmsSenderDto | PushSenderDto;
16
- /**
17
- * Recipient details according to the integration's notification type
18
- */
19
- receiver: EmailReceiverDto | SmsReceiverDto | PushReceiverDto;
20
- }
21
- //# sourceMappingURL=request.dto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"request.dto.d.ts","sourceRoot":"","sources":["../../../dtos/notification/request.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,qBAAa,sBAAsB;IACjC;;OAEG;IAGH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IAGH,MAAM,EAAE,cAAc,GAAG,YAAY,GAAG,aAAa,CAAC;IAEtD;;OAEG;IAGH,QAAQ,EAAE,gBAAgB,GAAG,cAAc,GAAG,eAAe,CAAC;CAC/D"}
@@ -1,31 +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.NotificationRequestDto = void 0;
13
- const class_validator_1 = require("class-validator");
14
- class NotificationRequestDto {
15
- }
16
- exports.NotificationRequestDto = NotificationRequestDto;
17
- __decorate([
18
- (0, class_validator_1.IsNotEmpty)(),
19
- (0, class_validator_1.IsString)(),
20
- __metadata("design:type", String)
21
- ], NotificationRequestDto.prototype, "notificationId", void 0);
22
- __decorate([
23
- (0, class_validator_1.IsNotEmpty)(),
24
- (0, class_validator_1.IsObject)(),
25
- __metadata("design:type", Object)
26
- ], NotificationRequestDto.prototype, "sender", void 0);
27
- __decorate([
28
- (0, class_validator_1.IsNotEmpty)(),
29
- (0, class_validator_1.IsObject)(),
30
- __metadata("design:type", Object)
31
- ], NotificationRequestDto.prototype, "receiver", void 0);
@@ -1,20 +0,0 @@
1
- /**
2
- * DTO for email recipients
3
- * Used to define the recipients of an email
4
- */
5
- export declare class EmailReceiverDto {
6
- /**
7
- * The main email address
8
- */
9
- to: string;
10
- /**
11
- * List of email addresses for carbon copy (optional)
12
- * Must be valid and unique email addresses
13
- */
14
- cc?: string[];
15
- /**
16
- * List of email addresses for blind carbon copy (optional)
17
- * Must be valid and unique email addresses
18
- */
19
- bcc?: string[];
20
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"receiver-email.dto.d.ts","sourceRoot":"","sources":["../../../dtos/receiver/receiver-email.dto.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,qBAAa,gBAAgB;IAC3B;;OAEG;IAGH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IAKH,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;IAEd;;;OAGG;IAKH,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;CAChB"}
@@ -1,39 +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.EmailReceiverDto = void 0;
13
- const class_validator_1 = require("class-validator");
14
- /**
15
- * DTO for email recipients
16
- * Used to define the recipients of an email
17
- */
18
- class EmailReceiverDto {
19
- }
20
- exports.EmailReceiverDto = EmailReceiverDto;
21
- __decorate([
22
- (0, class_validator_1.IsNotEmpty)(),
23
- (0, class_validator_1.IsEmail)(),
24
- __metadata("design:type", String)
25
- ], EmailReceiverDto.prototype, "to", void 0);
26
- __decorate([
27
- (0, class_validator_1.IsOptional)(),
28
- (0, class_validator_1.IsArray)(),
29
- (0, class_validator_1.IsEmail)({}, { each: true }),
30
- (0, class_validator_1.ArrayUnique)(),
31
- __metadata("design:type", Array)
32
- ], EmailReceiverDto.prototype, "cc", void 0);
33
- __decorate([
34
- (0, class_validator_1.IsOptional)(),
35
- (0, class_validator_1.IsArray)(),
36
- (0, class_validator_1.IsEmail)({}, { each: true }),
37
- (0, class_validator_1.ArrayUnique)(),
38
- __metadata("design:type", Array)
39
- ], EmailReceiverDto.prototype, "bcc", void 0);
@@ -1,15 +0,0 @@
1
- /**
2
- * DTO for push notification recipients
3
- * Used to define the recipients of a push notification
4
- */
5
- export declare class PushReceiverDto {
6
- /**
7
- * The user ID that will receive the push notification
8
- */
9
- userId: string;
10
- /**
11
- * List of user device tokens
12
- * Must contain at least one token
13
- */
14
- deviceTokens: string[];
15
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"receiver-push.dto.d.ts","sourceRoot":"","sources":["../../../dtos/receiver/receiver-push.dto.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,qBAAa,eAAe;IAC1B;;OAEG;IAGH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IAIH,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB"}
@@ -1,31 +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.PushReceiverDto = void 0;
13
- const class_validator_1 = require("class-validator");
14
- /**
15
- * DTO for push notification recipients
16
- * Used to define the recipients of a push notification
17
- */
18
- class PushReceiverDto {
19
- }
20
- exports.PushReceiverDto = PushReceiverDto;
21
- __decorate([
22
- (0, class_validator_1.IsNotEmpty)(),
23
- (0, class_validator_1.IsString)(),
24
- __metadata("design:type", String)
25
- ], PushReceiverDto.prototype, "userId", void 0);
26
- __decorate([
27
- (0, class_validator_1.IsArray)(),
28
- (0, class_validator_1.ArrayNotEmpty)(),
29
- (0, class_validator_1.ArrayMinSize)(1),
30
- __metadata("design:type", Array)
31
- ], PushReceiverDto.prototype, "deviceTokens", void 0);
@@ -1,11 +0,0 @@
1
- /**
2
- * DTO for SMS recipients
3
- * Used to define the recipients of an SMS message
4
- */
5
- export declare class SmsReceiverDto {
6
- /**
7
- * List of recipient phone numbers
8
- * Must be valid phone numbers
9
- */
10
- receiverPhones: string[];
11
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"receiver-sms.dto.d.ts","sourceRoot":"","sources":["../../../dtos/receiver/receiver-sms.dto.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,qBAAa,cAAc;IACzB;;;OAGG;IAIH,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B"}
@@ -1,26 +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.SmsReceiverDto = void 0;
13
- const class_validator_1 = require("class-validator");
14
- /**
15
- * DTO for SMS recipients
16
- * Used to define the recipients of an SMS message
17
- */
18
- class SmsReceiverDto {
19
- }
20
- exports.SmsReceiverDto = SmsReceiverDto;
21
- __decorate([
22
- (0, class_validator_1.IsArray)(),
23
- (0, class_validator_1.ArrayUnique)(),
24
- (0, class_validator_1.IsPhoneNumber)(undefined, { each: true }),
25
- __metadata("design:type", Array)
26
- ], SmsReceiverDto.prototype, "receiverPhones", void 0);
@@ -1,20 +0,0 @@
1
- import { EmailReceiverDto } from './receiver/receiver-email.dto';
2
- import { EmailSenderDto } from './sender/sender-email.dto';
3
- import { PushSenderDto } from './sender/sender-push.dto';
4
- import { SmsSenderDto } from './sender/sender-sms.dto';
5
- import { PushReceiverDto } from './receiver/receiver-push.dto';
6
- import { SmsReceiverDto } from './receiver/receiver-sms.dto';
7
- export declare class RequestDto {
8
- /**
9
- * Unique identifier of the hoster message
10
- */
11
- notificationId: string;
12
- /**
13
- * Sender details according to the integration's notification type
14
- */
15
- sender: EmailSenderDto | SmsSenderDto | PushSenderDto;
16
- /**
17
- * Recipient details according to the integration's notification type
18
- */
19
- receiver: EmailReceiverDto | SmsReceiverDto | PushReceiverDto;
20
- }
@@ -1,31 +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.RequestDto = void 0;
13
- const class_validator_1 = require("class-validator");
14
- class RequestDto {
15
- }
16
- exports.RequestDto = RequestDto;
17
- __decorate([
18
- (0, class_validator_1.IsNotEmpty)(),
19
- (0, class_validator_1.IsString)(),
20
- __metadata("design:type", String)
21
- ], RequestDto.prototype, "notificationId", void 0);
22
- __decorate([
23
- (0, class_validator_1.IsNotEmpty)(),
24
- (0, class_validator_1.IsObject)(),
25
- __metadata("design:type", Object)
26
- ], RequestDto.prototype, "sender", void 0);
27
- __decorate([
28
- (0, class_validator_1.IsNotEmpty)(),
29
- (0, class_validator_1.IsObject)(),
30
- __metadata("design:type", Object)
31
- ], RequestDto.prototype, "receiver", void 0);
@@ -1 +0,0 @@
1
- {"version":3,"file":"response-data.dto.d.ts","sourceRoot":"","sources":["../../dtos/response-data.dto.ts"],"names":[],"mappings":"AAAA,qBAAa,eAAe;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB"}
@@ -1,25 +0,0 @@
1
- import { AttachmentDto } from '../attachment.dto';
2
- /**
3
- * DTO for email sender
4
- * Used to define the details for sending an email
5
- */
6
- export declare class EmailSenderDto {
7
- /**
8
- * The full name of the sender
9
- */
10
- fullName: string;
11
- /**
12
- * The email subject
13
- * Length restriction from 1 to 500 characters
14
- */
15
- subject: string;
16
- /**
17
- * The message content
18
- * Length restriction from 1 to 50000 characters
19
- */
20
- message: string;
21
- /**
22
- * File attachments (optional)
23
- */
24
- attachments?: AttachmentDto[];
25
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"sender-email.dto.d.ts","sourceRoot":"","sources":["../../../dtos/sender/sender-email.dto.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD;;;GAGG;AACH,qBAAa,cAAc;IACzB;;OAEG;IAGH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IAIH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IAIH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IAKH,WAAW,CAAC,EAAE,aAAa,EAAE,CAAC;CAC/B"}
@@ -1,46 +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.EmailSenderDto = void 0;
13
- const class_validator_1 = require("class-validator");
14
- const class_transformer_1 = require("class-transformer");
15
- const attachment_dto_1 = require("../attachment.dto");
16
- /**
17
- * DTO for email sender
18
- * Used to define the details for sending an email
19
- */
20
- class EmailSenderDto {
21
- }
22
- exports.EmailSenderDto = EmailSenderDto;
23
- __decorate([
24
- (0, class_validator_1.IsNotEmpty)(),
25
- (0, class_validator_1.IsString)(),
26
- __metadata("design:type", String)
27
- ], EmailSenderDto.prototype, "fullName", void 0);
28
- __decorate([
29
- (0, class_validator_1.IsNotEmpty)(),
30
- (0, class_validator_1.IsString)(),
31
- (0, class_validator_1.Length)(1, 500),
32
- __metadata("design:type", String)
33
- ], EmailSenderDto.prototype, "subject", void 0);
34
- __decorate([
35
- (0, class_validator_1.IsNotEmpty)(),
36
- (0, class_validator_1.IsString)(),
37
- (0, class_validator_1.Length)(1, 50000),
38
- __metadata("design:type", String)
39
- ], EmailSenderDto.prototype, "message", void 0);
40
- __decorate([
41
- (0, class_validator_1.IsOptional)(),
42
- (0, class_validator_1.IsArray)(),
43
- (0, class_validator_1.ValidateNested)({ each: true }),
44
- (0, class_transformer_1.Type)(() => attachment_dto_1.AttachmentDto),
45
- __metadata("design:type", Array)
46
- ], EmailSenderDto.prototype, "attachments", void 0);
@@ -1,31 +0,0 @@
1
- /**
2
- * DTO for push notification sender
3
- * Used to define the details for sending a push notification
4
- */
5
- export declare class PushSenderDto {
6
- /**
7
- * Unique identifier of the message
8
- * Length restriction from 1 to 255 characters
9
- */
10
- messageId: string;
11
- /**
12
- * The user ID that will receive the push notification
13
- * Length restriction from 1 to 255 characters
14
- */
15
- userId: string;
16
- /**
17
- * The title of the push notification
18
- * Length restriction from 1 to 255 characters
19
- */
20
- title: string;
21
- /**
22
- * The content of the push notification
23
- * Length restriction from 1 to 1000 characters
24
- */
25
- message: string;
26
- /**
27
- * The subtitle of the push notification (optional)
28
- * Length restriction from 1 to 255 characters
29
- */
30
- subtitle?: string;
31
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"sender-push.dto.d.ts","sourceRoot":"","sources":["../../../dtos/sender/sender-push.dto.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,qBAAa,aAAa;IACxB;;;OAGG;IAIH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IAIH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IAIH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IAIH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IAIH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -1,50 +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.PushSenderDto = void 0;
13
- const class_validator_1 = require("class-validator");
14
- /**
15
- * DTO for push notification sender
16
- * Used to define the details for sending a push notification
17
- */
18
- class PushSenderDto {
19
- }
20
- exports.PushSenderDto = PushSenderDto;
21
- __decorate([
22
- (0, class_validator_1.IsNotEmpty)(),
23
- (0, class_validator_1.IsString)(),
24
- (0, class_validator_1.Length)(1, 255),
25
- __metadata("design:type", String)
26
- ], PushSenderDto.prototype, "messageId", void 0);
27
- __decorate([
28
- (0, class_validator_1.IsNotEmpty)(),
29
- (0, class_validator_1.IsString)(),
30
- (0, class_validator_1.Length)(1, 255),
31
- __metadata("design:type", String)
32
- ], PushSenderDto.prototype, "userId", void 0);
33
- __decorate([
34
- (0, class_validator_1.IsNotEmpty)(),
35
- (0, class_validator_1.IsString)(),
36
- (0, class_validator_1.Length)(1, 255),
37
- __metadata("design:type", String)
38
- ], PushSenderDto.prototype, "title", void 0);
39
- __decorate([
40
- (0, class_validator_1.IsNotEmpty)(),
41
- (0, class_validator_1.IsString)(),
42
- (0, class_validator_1.Length)(1, 1000),
43
- __metadata("design:type", String)
44
- ], PushSenderDto.prototype, "message", void 0);
45
- __decorate([
46
- (0, class_validator_1.IsOptional)(),
47
- (0, class_validator_1.IsString)(),
48
- (0, class_validator_1.Length)(1, 255),
49
- __metadata("design:type", String)
50
- ], PushSenderDto.prototype, "subtitle", void 0);
@@ -1,15 +0,0 @@
1
- /**
2
- * DTO for SMS sender
3
- * Used to define the details for sending an SMS message
4
- */
5
- export declare class SmsSenderDto {
6
- /**
7
- * Sender's phone number
8
- * Must be a valid phone number
9
- */
10
- senderPhone: string;
11
- /**
12
- * The content of the SMS message
13
- */
14
- message: string;
15
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"sender-sms.dto.d.ts","sourceRoot":"","sources":["../../../dtos/sender/sender-sms.dto.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,qBAAa,YAAY;IACvB;;;OAGG;IAGH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IAGH,OAAO,EAAE,MAAM,CAAC;CACjB"}