@hosterai/types 0.0.15 → 0.0.17

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 (43) hide show
  1. package/README.md +2 -0
  2. package/dist/dtos/info/info-notification.dto.d.ts +5 -0
  3. package/dist/dtos/info/info-notification.dto.js +7 -0
  4. package/dist/dtos/info/info.dto.d.ts +196 -0
  5. package/dist/dtos/info/info.dto.js +278 -0
  6. package/dist/dtos/info.dto.d.ts +3 -3
  7. package/dist/dtos/notification/notification-request.dto.d.ts +20 -0
  8. package/dist/dtos/notification/notification-request.dto.js +31 -0
  9. package/dist/dtos/receiver/receiver-email.dto.d.ts +20 -0
  10. package/dist/dtos/receiver/receiver-email.dto.js +39 -0
  11. package/dist/dtos/receiver/receiver-push.dto.d.ts +15 -0
  12. package/dist/dtos/receiver/receiver-push.dto.js +31 -0
  13. package/dist/dtos/receiver/receiver-sms.dto.d.ts +11 -0
  14. package/dist/dtos/receiver/receiver-sms.dto.js +26 -0
  15. package/dist/dtos/request.dto.d.ts +20 -0
  16. package/dist/dtos/request.dto.js +31 -0
  17. package/dist/dtos/sender/sender-email.dto.d.ts +25 -0
  18. package/dist/dtos/sender/sender-email.dto.js +46 -0
  19. package/dist/dtos/sender/sender-push.dto.d.ts +31 -0
  20. package/dist/dtos/sender/sender-push.dto.js +50 -0
  21. package/dist/dtos/sender/sender-sms.dto.d.ts +15 -0
  22. package/dist/dtos/sender/sender-sms.dto.js +30 -0
  23. package/dist/enums/actions.enum.d.ts +2 -1
  24. package/dist/enums/actions.enum.js +12 -12
  25. package/dist/enums/events.enum.d.ts +2 -0
  26. package/dist/enums/events.enum.js +2 -0
  27. package/dist/enums/message-type.enum.d.ts +5 -0
  28. package/dist/enums/message-type.enum.js +9 -0
  29. package/dist/enums/roles.enum.d.ts +2 -2
  30. package/dist/enums/roles.enum.js +2 -2
  31. package/package.json +1 -1
  32. package/dist/dtos/product/requests/product-downgradeable-request.dto.d.ts +0 -18
  33. package/dist/dtos/product/requests/product-downgradeable-request.dto.js +0 -37
  34. package/dist/dtos/product/requests/product-upgradeable-request.dto.d.ts +0 -18
  35. package/dist/dtos/product/requests/product-upgradeable-request.dto.js +0 -37
  36. package/dist/dtos/product/responses/product-downgradeable-response.dto.d.ts +0 -22
  37. package/dist/dtos/product/responses/product-downgradeable-response.dto.js +0 -11
  38. package/dist/dtos/product/responses/product-upgradeable-response.dto.d.ts +0 -22
  39. package/dist/dtos/product/responses/product-upgradeable-response.dto.js +0 -11
  40. package/dist/validators/product-downgradeable-request-validator.d.ts +0 -8
  41. package/dist/validators/product-downgradeable-request-validator.js +0 -17
  42. package/dist/validators/product-upgradeable-request-validator.d.ts +0 -8
  43. package/dist/validators/product-upgradeable-request-validator.js +0 -17
@@ -0,0 +1,31 @@
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);
@@ -0,0 +1,11 @@
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
+ }
@@ -0,0 +1,26 @@
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);
@@ -0,0 +1,20 @@
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
+ }
@@ -0,0 +1,31 @@
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);
@@ -0,0 +1,25 @@
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
+ }
@@ -0,0 +1,46 @@
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);
@@ -0,0 +1,31 @@
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
+ }
@@ -0,0 +1,50 @@
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);
@@ -0,0 +1,15 @@
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
+ }
@@ -0,0 +1,30 @@
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.SmsSenderDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ /**
15
+ * DTO for SMS sender
16
+ * Used to define the details for sending an SMS message
17
+ */
18
+ class SmsSenderDto {
19
+ }
20
+ exports.SmsSenderDto = SmsSenderDto;
21
+ __decorate([
22
+ (0, class_validator_1.IsNotEmpty)(),
23
+ (0, class_validator_1.IsPhoneNumber)(),
24
+ __metadata("design:type", String)
25
+ ], SmsSenderDto.prototype, "senderPhone", void 0);
26
+ __decorate([
27
+ (0, class_validator_1.IsNotEmpty)(),
28
+ (0, class_validator_1.IsString)(),
29
+ __metadata("design:type", String)
30
+ ], SmsSenderDto.prototype, "message", void 0);
@@ -1,8 +1,9 @@
1
- export declare enum ProductActionsEnum {
1
+ export declare enum ActionsEnum {
2
2
  CREATE = "create",
3
3
  RENEW = "renew",
4
4
  UPGRADE = "upgrade",
5
5
  DOWNGRADE = "downgrade",
6
+ TRANSFER = "transfer",
6
7
  SUSPEND = "suspend",
7
8
  UNSUSPEND = "unsuspend",
8
9
  DELETE = "delete"
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProductActionsEnum = void 0;
4
- var ProductActionsEnum;
5
- (function (ProductActionsEnum) {
6
- // Product Integration
7
- ProductActionsEnum["CREATE"] = "create";
8
- ProductActionsEnum["RENEW"] = "renew";
9
- ProductActionsEnum["UPGRADE"] = "upgrade";
10
- ProductActionsEnum["DOWNGRADE"] = "downgrade";
11
- ProductActionsEnum["SUSPEND"] = "suspend";
12
- ProductActionsEnum["UNSUSPEND"] = "unsuspend";
13
- ProductActionsEnum["DELETE"] = "delete";
14
- })(ProductActionsEnum || (exports.ProductActionsEnum = ProductActionsEnum = {}));
3
+ exports.ActionsEnum = void 0;
4
+ var ActionsEnum;
5
+ (function (ActionsEnum) {
6
+ ActionsEnum["CREATE"] = "create";
7
+ ActionsEnum["RENEW"] = "renew";
8
+ ActionsEnum["UPGRADE"] = "upgrade";
9
+ ActionsEnum["DOWNGRADE"] = "downgrade";
10
+ ActionsEnum["TRANSFER"] = "transfer";
11
+ ActionsEnum["SUSPEND"] = "suspend";
12
+ ActionsEnum["UNSUSPEND"] = "unsuspend";
13
+ ActionsEnum["DELETE"] = "delete";
14
+ })(ActionsEnum || (exports.ActionsEnum = ActionsEnum = {}));
@@ -70,6 +70,8 @@ export declare enum EventsEnum {
70
70
  INTEGRATION_UNINSTALLED = "integration/uninstalled",
71
71
  INTEGRATION_ACTIVATED = "integration/activated",
72
72
  INTEGRATION_DEACTIVATED = "integration/deactivated",
73
+ INTEGRATION_MAINTENANCE_STARTED = "integration/maintenance-started",
74
+ INTEGRATION_MAINTENANCE_FINISHED = "integration/maintenance-finished",
73
75
  DOMAIN_CONTACT_CREATED = "domain-contact/created",
74
76
  DOMAIN_CONTACT_UPDATED = "domain-contact/updated",
75
77
  DOMAIN_CONTACT_DELETED = "domain-contact/deleted",
@@ -74,6 +74,8 @@ var EventsEnum;
74
74
  EventsEnum["INTEGRATION_UNINSTALLED"] = "integration/uninstalled";
75
75
  EventsEnum["INTEGRATION_ACTIVATED"] = "integration/activated";
76
76
  EventsEnum["INTEGRATION_DEACTIVATED"] = "integration/deactivated";
77
+ EventsEnum["INTEGRATION_MAINTENANCE_STARTED"] = "integration/maintenance-started";
78
+ EventsEnum["INTEGRATION_MAINTENANCE_FINISHED"] = "integration/maintenance-finished";
77
79
  EventsEnum["DOMAIN_CONTACT_CREATED"] = "domain-contact/created";
78
80
  EventsEnum["DOMAIN_CONTACT_UPDATED"] = "domain-contact/updated";
79
81
  EventsEnum["DOMAIN_CONTACT_DELETED"] = "domain-contact/deleted";
@@ -0,0 +1,5 @@
1
+ export declare enum MessageTypeEnum {
2
+ EMAIL = "email",
3
+ SMS = "sms",
4
+ PUSH = "push"
5
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MessageTypeEnum = void 0;
4
+ var MessageTypeEnum;
5
+ (function (MessageTypeEnum) {
6
+ MessageTypeEnum["EMAIL"] = "email";
7
+ MessageTypeEnum["SMS"] = "sms";
8
+ MessageTypeEnum["PUSH"] = "push";
9
+ })(MessageTypeEnum || (exports.MessageTypeEnum = MessageTypeEnum = {}));
@@ -32,8 +32,8 @@ export declare enum RolesEnum {
32
32
  ITEMS_WRITE = "ITEMS_WRITE",
33
33
  ORDERS_READ = "ORDERS_READ",
34
34
  ORDERS_WRITE = "ORDERS_WRITE",
35
- PAYMENTS_READ = "PAYMENTS_READ",
36
- PAYMENTS_WRITE = "PAYMENTS_WRITE",
35
+ TRANSACTIONS_READ = "TRANSACTIONS_READ",
36
+ TRANSACTIONS_WRITE = "TRANSACTIONS_WRITE",
37
37
  POLICIES_READ = "POLICIES_READ",
38
38
  POLICIES_WRITE = "POLICIES_WRITE",
39
39
  PRODUCT_CATEGORIES_READ = "PRODUCT_CATEGORIES_READ",
@@ -36,8 +36,8 @@ var RolesEnum;
36
36
  RolesEnum["ITEMS_WRITE"] = "ITEMS_WRITE";
37
37
  RolesEnum["ORDERS_READ"] = "ORDERS_READ";
38
38
  RolesEnum["ORDERS_WRITE"] = "ORDERS_WRITE";
39
- RolesEnum["PAYMENTS_READ"] = "PAYMENTS_READ";
40
- RolesEnum["PAYMENTS_WRITE"] = "PAYMENTS_WRITE";
39
+ RolesEnum["TRANSACTIONS_READ"] = "TRANSACTIONS_READ";
40
+ RolesEnum["TRANSACTIONS_WRITE"] = "TRANSACTIONS_WRITE";
41
41
  RolesEnum["POLICIES_READ"] = "POLICIES_READ";
42
42
  RolesEnum["POLICIES_WRITE"] = "POLICIES_WRITE";
43
43
  RolesEnum["PRODUCT_CATEGORIES_READ"] = "PRODUCT_CATEGORIES_READ";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hosterai/types",
3
- "version": "0.0.15",
3
+ "version": "0.0.17",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -1,18 +0,0 @@
1
- import { ProductItemDataDto } from '../product-item-data.dto';
2
- import { ClientDataDto } from '../../client-data.dto';
3
- /**
4
- * Represents a request to check if a product item is downgradable.
5
- * This DTO contains all the necessary information for the check.
6
- */
7
- export declare class ProductDowngradableRequestDto {
8
- /**
9
- * The client's data.
10
- * This object holds all the relevant information about the client initiating the request.
11
- */
12
- clientData: ClientDataDto;
13
- /**
14
- * The data of the product item to be checked.
15
- * This object contains the specific details of the product instance being evaluated.
16
- */
17
- itemData: ProductItemDataDto;
18
- }
@@ -1,37 +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.ProductDowngradableRequestDto = void 0;
13
- const class_validator_1 = require("class-validator");
14
- const class_transformer_1 = require("class-transformer");
15
- const product_item_data_dto_1 = require("../product-item-data.dto");
16
- const client_data_dto_1 = require("../../client-data.dto");
17
- /**
18
- * Represents a request to check if a product item is downgradable.
19
- * This DTO contains all the necessary information for the check.
20
- */
21
- class ProductDowngradableRequestDto {
22
- }
23
- exports.ProductDowngradableRequestDto = ProductDowngradableRequestDto;
24
- __decorate([
25
- (0, class_validator_1.IsDefined)(),
26
- (0, class_validator_1.IsObject)(),
27
- (0, class_validator_1.ValidateNested)(),
28
- (0, class_transformer_1.Type)(() => client_data_dto_1.ClientDataDto),
29
- __metadata("design:type", client_data_dto_1.ClientDataDto)
30
- ], ProductDowngradableRequestDto.prototype, "clientData", void 0);
31
- __decorate([
32
- (0, class_validator_1.IsDefined)(),
33
- (0, class_validator_1.IsObject)(),
34
- (0, class_validator_1.ValidateNested)(),
35
- (0, class_transformer_1.Type)(() => product_item_data_dto_1.ProductItemDataDto),
36
- __metadata("design:type", product_item_data_dto_1.ProductItemDataDto)
37
- ], ProductDowngradableRequestDto.prototype, "itemData", void 0);
@@ -1,18 +0,0 @@
1
- import { ProductItemDataDto } from '../product-item-data.dto';
2
- import { ClientDataDto } from '../../client-data.dto';
3
- /**
4
- * Represents a request to check if a product item is upgradeable.
5
- * This DTO contains all the necessary information for the check.
6
- */
7
- export declare class ProductUpgradeableRequestDto {
8
- /**
9
- * The client's data.
10
- * This object holds all the relevant information about the client initiating the request.
11
- */
12
- clientData: ClientDataDto;
13
- /**
14
- * The data of the product item to be checked.
15
- * This object contains the specific details of the product instance being evaluated.
16
- */
17
- itemData: ProductItemDataDto;
18
- }
@@ -1,37 +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.ProductUpgradeableRequestDto = void 0;
13
- const class_validator_1 = require("class-validator");
14
- const class_transformer_1 = require("class-transformer");
15
- const product_item_data_dto_1 = require("../product-item-data.dto");
16
- const client_data_dto_1 = require("../../client-data.dto");
17
- /**
18
- * Represents a request to check if a product item is upgradeable.
19
- * This DTO contains all the necessary information for the check.
20
- */
21
- class ProductUpgradeableRequestDto {
22
- }
23
- exports.ProductUpgradeableRequestDto = ProductUpgradeableRequestDto;
24
- __decorate([
25
- (0, class_validator_1.IsDefined)(),
26
- (0, class_validator_1.IsObject)(),
27
- (0, class_validator_1.ValidateNested)(),
28
- (0, class_transformer_1.Type)(() => client_data_dto_1.ClientDataDto),
29
- __metadata("design:type", client_data_dto_1.ClientDataDto)
30
- ], ProductUpgradeableRequestDto.prototype, "clientData", void 0);
31
- __decorate([
32
- (0, class_validator_1.IsDefined)(),
33
- (0, class_validator_1.IsObject)(),
34
- (0, class_validator_1.ValidateNested)(),
35
- (0, class_transformer_1.Type)(() => product_item_data_dto_1.ProductItemDataDto),
36
- __metadata("design:type", product_item_data_dto_1.ProductItemDataDto)
37
- ], ProductUpgradeableRequestDto.prototype, "itemData", void 0);
@@ -1,22 +0,0 @@
1
- import { ResponseStatusEnum } from '../../../enums/response-status.enum';
2
- import { BaseResponse } from '../../base-response.dto';
3
- /**
4
- * Represents the response for a product downgradeable check.
5
- * It indicates whether a product item is downgradeable and may contain additional data.
6
- */
7
- export declare class ProductDowngradeableResponseDto extends BaseResponse {
8
- /**
9
- * The status of the response, indicating success or failure.
10
- */
11
- status: ResponseStatusEnum;
12
- /**
13
- * The unique identifier of the product item being checked.
14
- */
15
- itemId: string;
16
- /**
17
- * Optional data associated with the downgradeable check.
18
- * Can contain details about available downgrades or reasons for failure.
19
- * @optional
20
- */
21
- data?: Record<string, unknown>;
22
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProductDowngradeableResponseDto = void 0;
4
- const base_response_dto_1 = require("../../base-response.dto");
5
- /**
6
- * Represents the response for a product downgradeable check.
7
- * It indicates whether a product item is downgradeable and may contain additional data.
8
- */
9
- class ProductDowngradeableResponseDto extends base_response_dto_1.BaseResponse {
10
- }
11
- exports.ProductDowngradeableResponseDto = ProductDowngradeableResponseDto;
@@ -1,22 +0,0 @@
1
- import { ResponseStatusEnum } from '../../../enums/response-status.enum';
2
- import { BaseResponse } from '../../base-response.dto';
3
- /**
4
- * Represents the response for a product upgradeable check.
5
- * It indicates whether a product item is upgradeable and may contain additional data.
6
- */
7
- export declare class ProductUpgradeableResponseDto extends BaseResponse {
8
- /**
9
- * The status of the response, indicating success or failure.
10
- */
11
- status: ResponseStatusEnum;
12
- /**
13
- * The unique identifier of the product item being checked.
14
- */
15
- itemId: string;
16
- /**
17
- * Optional data associated with the upgradeable check.
18
- * Can contain details about available upgrades or reasons for failure.
19
- * @optional
20
- */
21
- data?: Record<string, unknown>;
22
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProductUpgradeableResponseDto = void 0;
4
- const base_response_dto_1 = require("../../base-response.dto");
5
- /**
6
- * Represents the response for a product upgradeable check.
7
- * It indicates whether a product item is upgradeable and may contain additional data.
8
- */
9
- class ProductUpgradeableResponseDto extends base_response_dto_1.BaseResponse {
10
- }
11
- exports.ProductUpgradeableResponseDto = ProductUpgradeableResponseDto;
@@ -1,8 +0,0 @@
1
- import { ValidationError } from 'class-validator';
2
- /**
3
- * Validates a product downgradable request object.
4
- *
5
- * @param {Record<string, unknown>} plainObject - The plain object to validate.
6
- * @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
7
- */
8
- export declare const validateProductDowngradableRequestDto: (plainObject: Record<string, unknown>) => Promise<ValidationError[]>;