@hosterai/types 0.0.25 → 0.0.26

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 (78) hide show
  1. package/dist/dtos/addon-field.dto.d.ts +7 -0
  2. package/dist/dtos/addon-field.dto.js +11 -0
  3. package/dist/dtos/attribute-field.dto.d.ts +20 -0
  4. package/dist/dtos/attribute-field.dto.js +74 -0
  5. package/dist/dtos/country.dto.d.ts +7 -0
  6. package/dist/dtos/country.dto.js +4 -0
  7. package/dist/dtos/field.dto.d.ts +2 -23
  8. package/dist/dtos/field.dto.js +8 -64
  9. package/dist/dtos/info.dto.d.ts +3 -2
  10. package/dist/dtos/info.dto.js +10 -5
  11. package/dist/dtos/invoice/invoice-info.dto.d.ts +15 -0
  12. package/dist/dtos/invoice/invoice-info.dto.js +42 -0
  13. package/dist/dtos/invoice/invoice-item-data.dto.d.ts +10 -0
  14. package/dist/dtos/invoice/invoice-item-data.dto.js +27 -0
  15. package/dist/dtos/invoice/requests/credit-note-request.dto.d.ts +9 -0
  16. package/dist/dtos/invoice/requests/credit-note-request.dto.js +26 -0
  17. package/dist/dtos/invoice/requests/invoice-request.dto.d.ts +9 -0
  18. package/dist/dtos/invoice/requests/invoice-request.dto.js +26 -0
  19. package/dist/dtos/invoice/requests/proforma-invoice-request.dto.d.ts +21 -0
  20. package/dist/dtos/invoice/requests/proforma-invoice-request.dto.js +56 -0
  21. package/dist/dtos/invoice/responses/credit-note-response.dto.d.ts +7 -0
  22. package/dist/dtos/invoice/responses/credit-note-response.dto.js +11 -0
  23. package/dist/dtos/invoice/responses/invoice-response.dto.d.ts +7 -0
  24. package/dist/dtos/invoice/responses/invoice-response.dto.js +11 -0
  25. package/dist/dtos/invoice/responses/proforma-invoice-response.dto.d.ts +12 -0
  26. package/dist/dtos/invoice/responses/proforma-invoice-response.dto.js +35 -0
  27. package/dist/dtos/invoice/transaction-data.dto.d.ts +14 -0
  28. package/dist/dtos/invoice/transaction-data.dto.js +42 -0
  29. package/dist/dtos/invoice-contact-data.dto.d.ts +43 -0
  30. package/dist/dtos/invoice-contact-data.dto.js +120 -0
  31. package/dist/dtos/item-data.dto.d.ts +44 -0
  32. package/dist/dtos/item-data.dto.js +70 -0
  33. package/dist/dtos/notification/requests/notification-send-request.dto.d.ts +18 -0
  34. package/dist/dtos/notification/requests/notification-send-request.dto.js +66 -0
  35. package/dist/dtos/notification/responses/notification-send-response.dto.d.ts +9 -0
  36. package/dist/dtos/notification/responses/notification-send-response.dto.js +26 -0
  37. package/dist/dtos/product/product-info.dto.d.ts +5 -0
  38. package/dist/dtos/product/product-info.dto.js +20 -0
  39. package/dist/dtos/product/product-item-data.dto.d.ts +7 -28
  40. package/dist/dtos/product/product-item-data.dto.js +7 -23
  41. package/dist/dtos/product/requests/product-create-request.dto.d.ts +1 -1
  42. package/dist/dtos/product/requests/product-create-request.dto.js +1 -1
  43. package/dist/dtos/product/requests/product-delete-request.dto.d.ts +1 -1
  44. package/dist/dtos/product/requests/product-delete-request.dto.js +1 -1
  45. package/dist/dtos/product/requests/product-downgradable-request.dto.d.ts +1 -1
  46. package/dist/dtos/product/requests/product-downgradable-request.dto.js +1 -1
  47. package/dist/dtos/product/requests/product-downgrade-request.dto.d.ts +1 -1
  48. package/dist/dtos/product/requests/product-downgrade-request.dto.js +1 -1
  49. package/dist/dtos/product/requests/product-renew-request.dto.d.ts +1 -1
  50. package/dist/dtos/product/requests/product-renew-request.dto.js +1 -1
  51. package/dist/dtos/product/requests/product-suspend-request.dto.d.ts +1 -1
  52. package/dist/dtos/product/requests/product-suspend-request.dto.js +1 -1
  53. package/dist/dtos/product/requests/product-unsuspend-request.dto.d.ts +1 -1
  54. package/dist/dtos/product/requests/product-unsuspend-request.dto.js +1 -1
  55. package/dist/dtos/product/requests/product-upgradable-request.dto.d.ts +1 -1
  56. package/dist/dtos/product/requests/product-upgradable-request.dto.js +1 -1
  57. package/dist/dtos/product/requests/product-upgrade-request.dto.d.ts +1 -1
  58. package/dist/dtos/product/requests/product-upgrade-request.dto.js +1 -1
  59. package/dist/dtos/product/responses/product-info-response.dto.js +17 -0
  60. package/dist/dtos/responses/validate-attributes-response.dto.js +18 -0
  61. package/dist/dtos/settings.dto.d.ts +18 -0
  62. package/dist/dtos/settings.dto.js +19 -2
  63. package/dist/dtos/success-response.dto.d.ts +0 -4
  64. package/dist/dtos/success-response.dto.js +0 -14
  65. package/dist/enums/invoice/invoice-item-actions.enum.d.ts +8 -0
  66. package/dist/enums/invoice/invoice-item-actions.enum.js +12 -0
  67. package/dist/enums/invoice/invoice-types.enum.d.ts +5 -0
  68. package/dist/enums/invoice/invoice-types.enum.js +9 -0
  69. package/dist/enums/item-actions.enum.d.ts +11 -0
  70. package/dist/enums/item-actions.enum.js +16 -0
  71. package/dist/index.d.ts +13 -6
  72. package/dist/index.js +14 -8
  73. package/dist/openapi/schemas/components.schemas.d.ts +35 -47
  74. package/dist/openapi/schemas/components.schemas.js +83 -63
  75. package/dist/validators/notification-info-validator.spec.js +6 -6
  76. package/dist/validators/notification-request-validator.js +1 -1
  77. package/dist/validators/product-info-validator.spec.js +19 -31
  78. package/package.json +1 -1
@@ -0,0 +1,7 @@
1
+ import { ProformaInvoiceResponseDto } from "./proforma-invoice-response.dto";
2
+ /**
3
+ * Response from invoice integrations after successfully creating a standard invoice.
4
+ * Maintains consistency with request/response naming (InvoiceRequest → InvoiceResponse).
5
+ */
6
+ export declare class InvoiceResponseDto extends ProformaInvoiceResponseDto {
7
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InvoiceResponseDto = void 0;
4
+ const proforma_invoice_response_dto_1 = require("./proforma-invoice-response.dto");
5
+ /**
6
+ * Response from invoice integrations after successfully creating a standard invoice.
7
+ * Maintains consistency with request/response naming (InvoiceRequest → InvoiceResponse).
8
+ */
9
+ class InvoiceResponseDto extends proforma_invoice_response_dto_1.ProformaInvoiceResponseDto {
10
+ }
11
+ exports.InvoiceResponseDto = InvoiceResponseDto;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Response from invoice integrations after successfully creating a proforma invoice.
3
+ * Contains the generated invoice details and access URL.
4
+ */
5
+ export declare class ProformaInvoiceResponseDto {
6
+ /** URL to access the generated invoice document */
7
+ invoiceUrl: string;
8
+ /** Invoice number assigned by the integration */
9
+ invoiceNumber: string;
10
+ /** Unique identifier for the invoice in the integration system */
11
+ invoiceId: string;
12
+ }
@@ -0,0 +1,35 @@
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.ProformaInvoiceResponseDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ /**
15
+ * Response from invoice integrations after successfully creating a proforma invoice.
16
+ * Contains the generated invoice details and access URL.
17
+ */
18
+ class ProformaInvoiceResponseDto {
19
+ }
20
+ exports.ProformaInvoiceResponseDto = ProformaInvoiceResponseDto;
21
+ __decorate([
22
+ (0, class_validator_1.IsUrl)(),
23
+ (0, class_validator_1.IsNotEmpty)(),
24
+ __metadata("design:type", String)
25
+ ], ProformaInvoiceResponseDto.prototype, "invoiceUrl", void 0);
26
+ __decorate([
27
+ (0, class_validator_1.IsString)(),
28
+ (0, class_validator_1.IsNotEmpty)(),
29
+ __metadata("design:type", String)
30
+ ], ProformaInvoiceResponseDto.prototype, "invoiceNumber", void 0);
31
+ __decorate([
32
+ (0, class_validator_1.IsString)(),
33
+ (0, class_validator_1.IsNotEmpty)(),
34
+ __metadata("design:type", String)
35
+ ], ProformaInvoiceResponseDto.prototype, "invoiceId", void 0);
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Transaction details related to the invoice.
3
+ * Contains payment and transaction information for the document being issued.
4
+ */
5
+ export declare class TransactionData {
6
+ /** Unique identifier for the transaction */
7
+ transactionId: string;
8
+ /** Transaction amount */
9
+ amount: number;
10
+ /** Payment method used for the transaction */
11
+ paymentMethod: string;
12
+ /** Transaction date */
13
+ date: Date;
14
+ }
@@ -0,0 +1,42 @@
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.TransactionData = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ /**
16
+ * Transaction details related to the invoice.
17
+ * Contains payment and transaction information for the document being issued.
18
+ */
19
+ class TransactionData {
20
+ }
21
+ exports.TransactionData = TransactionData;
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.IsNotEmpty)(),
25
+ __metadata("design:type", String)
26
+ ], TransactionData.prototype, "transactionId", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsNumber)(),
29
+ (0, class_validator_1.IsNotEmpty)(),
30
+ __metadata("design:type", Number)
31
+ ], TransactionData.prototype, "amount", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsString)(),
34
+ (0, class_validator_1.IsNotEmpty)(),
35
+ __metadata("design:type", String)
36
+ ], TransactionData.prototype, "paymentMethod", void 0);
37
+ __decorate([
38
+ (0, class_validator_1.IsDate)(),
39
+ (0, class_validator_1.IsNotEmpty)(),
40
+ (0, class_transformer_1.Type)(() => Date),
41
+ __metadata("design:type", Date)
42
+ ], TransactionData.prototype, "date", void 0);
@@ -0,0 +1,43 @@
1
+ import { CountryEnum } from "../enums/country.enum";
2
+ /**
3
+ * Billing contact information sent from hoster.ai to invoice integrations.
4
+ * Contains the details of the person or business for whom an invoice will be issued.
5
+ */
6
+ export declare class InvoiceContactData {
7
+ /** Unique identifier for the invoice contact */
8
+ invoiceContactId: string;
9
+ /** Whether this is a business contact (true) or individual person (false) */
10
+ isBusinessContact: boolean;
11
+ /** Contact's first name */
12
+ firstName: string;
13
+ /** Contact's last name */
14
+ lastName: string;
15
+ /** Business name (required when isBusinessContact is true) */
16
+ businessName?: string;
17
+ /** Contact's email address */
18
+ email: string;
19
+ /** Primary telephone number in international format (e.g., +30.2101234567) */
20
+ telephone: string;
21
+ /** Mobile phone number in international format (e.g., +30.6901234567) */
22
+ mobile?: string;
23
+ /** Primary address line (street, number) */
24
+ address1: string;
25
+ /** Secondary address line (building, floor, apartment) */
26
+ address2?: string;
27
+ /** Additional address information */
28
+ address3?: string;
29
+ /** Postal/ZIP code */
30
+ postcode: string;
31
+ /** City name */
32
+ city: string;
33
+ /** Country code */
34
+ country: CountryEnum;
35
+ /** State/province/region (for countries that use this) */
36
+ state?: string;
37
+ /** Tax Identification Number (TIN/VAT number) */
38
+ tin?: string;
39
+ /** Tax office name or code */
40
+ taxOffice?: string;
41
+ /** Contact's profession or business activity */
42
+ profession?: string;
43
+ }
@@ -0,0 +1,120 @@
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.InvoiceContactData = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const country_enum_1 = require("../enums/country.enum");
15
+ /**
16
+ * Billing contact information sent from hoster.ai to invoice integrations.
17
+ * Contains the details of the person or business for whom an invoice will be issued.
18
+ */
19
+ class InvoiceContactData {
20
+ }
21
+ exports.InvoiceContactData = InvoiceContactData;
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.IsNotEmpty)(),
25
+ __metadata("design:type", String)
26
+ ], InvoiceContactData.prototype, "invoiceContactId", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsBoolean)(),
29
+ (0, class_validator_1.IsNotEmpty)(),
30
+ __metadata("design:type", Boolean)
31
+ ], InvoiceContactData.prototype, "isBusinessContact", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsString)(),
34
+ (0, class_validator_1.IsNotEmpty)(),
35
+ __metadata("design:type", String)
36
+ ], InvoiceContactData.prototype, "firstName", void 0);
37
+ __decorate([
38
+ (0, class_validator_1.IsString)(),
39
+ (0, class_validator_1.IsNotEmpty)(),
40
+ __metadata("design:type", String)
41
+ ], InvoiceContactData.prototype, "lastName", void 0);
42
+ __decorate([
43
+ (0, class_validator_1.IsString)(),
44
+ (0, class_validator_1.IsOptional)(),
45
+ __metadata("design:type", String)
46
+ ], InvoiceContactData.prototype, "businessName", void 0);
47
+ __decorate([
48
+ (0, class_validator_1.IsEmail)(),
49
+ (0, class_validator_1.IsNotEmpty)(),
50
+ __metadata("design:type", String)
51
+ ], InvoiceContactData.prototype, "email", void 0);
52
+ __decorate([
53
+ (0, class_validator_1.IsPhoneNumber)(),
54
+ (0, class_validator_1.IsNotEmpty)(),
55
+ __metadata("design:type", String)
56
+ ], InvoiceContactData.prototype, "telephone", void 0);
57
+ __decorate([
58
+ (0, class_validator_1.IsPhoneNumber)(),
59
+ (0, class_validator_1.IsOptional)(),
60
+ __metadata("design:type", String)
61
+ ], InvoiceContactData.prototype, "mobile", void 0);
62
+ __decorate([
63
+ (0, class_validator_1.IsString)(),
64
+ (0, class_validator_1.IsNotEmpty)(),
65
+ (0, class_validator_1.MinLength)(1),
66
+ (0, class_validator_1.MaxLength)(250),
67
+ __metadata("design:type", String)
68
+ ], InvoiceContactData.prototype, "address1", void 0);
69
+ __decorate([
70
+ (0, class_validator_1.IsString)(),
71
+ (0, class_validator_1.IsOptional)(),
72
+ (0, class_validator_1.MaxLength)(250),
73
+ __metadata("design:type", String)
74
+ ], InvoiceContactData.prototype, "address2", void 0);
75
+ __decorate([
76
+ (0, class_validator_1.IsString)(),
77
+ (0, class_validator_1.IsOptional)(),
78
+ (0, class_validator_1.MaxLength)(250),
79
+ __metadata("design:type", String)
80
+ ], InvoiceContactData.prototype, "address3", void 0);
81
+ __decorate([
82
+ (0, class_validator_1.IsString)(),
83
+ (0, class_validator_1.IsNotEmpty)(),
84
+ (0, class_validator_1.MinLength)(1),
85
+ (0, class_validator_1.MaxLength)(16),
86
+ __metadata("design:type", String)
87
+ ], InvoiceContactData.prototype, "postcode", void 0);
88
+ __decorate([
89
+ (0, class_validator_1.IsString)(),
90
+ (0, class_validator_1.IsNotEmpty)(),
91
+ (0, class_validator_1.MinLength)(1),
92
+ (0, class_validator_1.MaxLength)(250),
93
+ __metadata("design:type", String)
94
+ ], InvoiceContactData.prototype, "city", void 0);
95
+ __decorate([
96
+ (0, class_validator_1.IsEnum)(country_enum_1.CountryEnum),
97
+ (0, class_validator_1.IsNotEmpty)(),
98
+ __metadata("design:type", String)
99
+ ], InvoiceContactData.prototype, "country", void 0);
100
+ __decorate([
101
+ (0, class_validator_1.IsString)(),
102
+ (0, class_validator_1.IsOptional)(),
103
+ (0, class_validator_1.MaxLength)(250),
104
+ __metadata("design:type", String)
105
+ ], InvoiceContactData.prototype, "state", void 0);
106
+ __decorate([
107
+ (0, class_validator_1.IsString)(),
108
+ (0, class_validator_1.IsOptional)(),
109
+ __metadata("design:type", String)
110
+ ], InvoiceContactData.prototype, "tin", void 0);
111
+ __decorate([
112
+ (0, class_validator_1.IsString)(),
113
+ (0, class_validator_1.IsOptional)(),
114
+ __metadata("design:type", String)
115
+ ], InvoiceContactData.prototype, "taxOffice", void 0);
116
+ __decorate([
117
+ (0, class_validator_1.IsString)(),
118
+ (0, class_validator_1.IsOptional)(),
119
+ __metadata("design:type", String)
120
+ ], InvoiceContactData.prototype, "profession", void 0);
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Represents the data of a specific product item.
3
+ * This DTO is used to transfer detailed information about a product instance.
4
+ */
5
+ export declare class ItemDataDto {
6
+ /**
7
+ * The unique identifier for the product item.
8
+ */
9
+ itemId?: string;
10
+ /** Unique identifier for the product */
11
+ productId: string;
12
+ /** Name of the product */
13
+ productName: string;
14
+ /** Resource name associated with the product */
15
+ resourceName: string;
16
+ /**
17
+ * A record of product-level attributes.
18
+ * These are general attributes defined for the product type.
19
+ */
20
+ productAttributes: Record<string, unknown>;
21
+ /**
22
+ * A record of item-specific attributes.
23
+ * These are attributes that are unique to this particular instance of the product.
24
+ */
25
+ itemAttributes: Record<string, unknown>;
26
+ /**
27
+ * Data returned from the creation response.
28
+ * This field should not be present in the create request.
29
+ * @optional
30
+ */
31
+ creationResponseData?: Record<string, unknown>;
32
+ /** Start date of the product item */
33
+ startDate: string;
34
+ /** End date of the product item */
35
+ endDate: string;
36
+ /**
37
+ * The price of the product item without tax and discount.
38
+ */
39
+ price: number;
40
+ /**
41
+ * The discount of the product item. The price after removing the discount
42
+ */
43
+ discountPrice: number;
44
+ }
@@ -0,0 +1,70 @@
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.ItemDataDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ /**
15
+ * Represents the data of a specific product item.
16
+ * This DTO is used to transfer detailed information about a product instance.
17
+ */
18
+ class ItemDataDto {
19
+ }
20
+ exports.ItemDataDto = ItemDataDto;
21
+ __decorate([
22
+ (0, class_validator_1.IsOptional)(),
23
+ (0, class_validator_1.IsString)(),
24
+ __metadata("design:type", String)
25
+ ], ItemDataDto.prototype, "itemId", void 0);
26
+ __decorate([
27
+ (0, class_validator_1.IsNotEmpty)(),
28
+ (0, class_validator_1.IsString)(),
29
+ __metadata("design:type", String)
30
+ ], ItemDataDto.prototype, "productId", void 0);
31
+ __decorate([
32
+ (0, class_validator_1.IsNotEmpty)(),
33
+ (0, class_validator_1.IsString)(),
34
+ __metadata("design:type", String)
35
+ ], ItemDataDto.prototype, "productName", void 0);
36
+ __decorate([
37
+ (0, class_validator_1.IsNotEmpty)(),
38
+ (0, class_validator_1.IsString)(),
39
+ __metadata("design:type", String)
40
+ ], ItemDataDto.prototype, "resourceName", void 0);
41
+ __decorate([
42
+ (0, class_validator_1.IsDefined)(),
43
+ __metadata("design:type", Object)
44
+ ], ItemDataDto.prototype, "productAttributes", void 0);
45
+ __decorate([
46
+ (0, class_validator_1.IsDefined)(),
47
+ __metadata("design:type", Object)
48
+ ], ItemDataDto.prototype, "itemAttributes", void 0);
49
+ __decorate([
50
+ (0, class_validator_1.IsOptional)(),
51
+ __metadata("design:type", Object)
52
+ ], ItemDataDto.prototype, "creationResponseData", void 0);
53
+ __decorate([
54
+ (0, class_validator_1.IsNotEmpty)(),
55
+ (0, class_validator_1.IsString)(),
56
+ __metadata("design:type", String)
57
+ ], ItemDataDto.prototype, "startDate", void 0);
58
+ __decorate([
59
+ (0, class_validator_1.IsNotEmpty)(),
60
+ (0, class_validator_1.IsString)(),
61
+ __metadata("design:type", String)
62
+ ], ItemDataDto.prototype, "endDate", void 0);
63
+ __decorate([
64
+ (0, class_validator_1.IsDefined)(),
65
+ __metadata("design:type", Number)
66
+ ], ItemDataDto.prototype, "price", void 0);
67
+ __decorate([
68
+ (0, class_validator_1.IsDefined)(),
69
+ __metadata("design:type", Number)
70
+ ], ItemDataDto.prototype, "discountPrice", void 0);
@@ -0,0 +1,18 @@
1
+ import { EmailReceiverDto } from '../receiver/receiver-email.dto';
2
+ import { PushReceiverDto } from '../receiver/receiver-push.dto';
3
+ import { SmsReceiverDto } from '../receiver/receiver-sms.dto';
4
+ import { EmailSenderDto } from '../sender/sender-email.dto';
5
+ import { PushSenderDto } from '../sender/sender-push.dto';
6
+ import { SmsSenderDto } from '../sender/sender-sms.dto';
7
+ /**
8
+ * Request payload for sending a notification.
9
+ * Sent from hoster.ai to notification integrations (email, push, SMS).
10
+ */
11
+ export declare class NotificationSendRequestDto {
12
+ /** Unique identifier for the notification */
13
+ notificationId: string;
14
+ /** Sender details (type depends on integration: email, push, or SMS) */
15
+ sender: EmailSenderDto | PushSenderDto | SmsSenderDto;
16
+ /** Recipient details (type depends on integration: email, push, or SMS) */
17
+ receiver: EmailReceiverDto | PushReceiverDto | SmsReceiverDto;
18
+ }
@@ -0,0 +1,66 @@
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.NotificationSendRequestDto = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const receiver_email_dto_1 = require("../receiver/receiver-email.dto");
16
+ const receiver_push_dto_1 = require("../receiver/receiver-push.dto");
17
+ const receiver_sms_dto_1 = require("../receiver/receiver-sms.dto");
18
+ const sender_email_dto_1 = require("../sender/sender-email.dto");
19
+ const sender_push_dto_1 = require("../sender/sender-push.dto");
20
+ const sender_sms_dto_1 = require("../sender/sender-sms.dto");
21
+ /**
22
+ * Request payload for sending a notification.
23
+ * Sent from hoster.ai to notification integrations (email, push, SMS).
24
+ */
25
+ class NotificationSendRequestDto {
26
+ }
27
+ exports.NotificationSendRequestDto = NotificationSendRequestDto;
28
+ __decorate([
29
+ (0, class_validator_1.IsNotEmpty)(),
30
+ (0, class_validator_1.IsString)(),
31
+ __metadata("design:type", String)
32
+ ], NotificationSendRequestDto.prototype, "notificationId", void 0);
33
+ __decorate([
34
+ (0, class_validator_1.IsNotEmpty)(),
35
+ (0, class_validator_1.IsObject)(),
36
+ (0, class_validator_1.ValidateNested)(),
37
+ (0, class_transformer_1.Type)(() => Object, {
38
+ discriminator: {
39
+ property: '__type',
40
+ subTypes: [
41
+ { value: sender_email_dto_1.EmailSenderDto, name: 'email' },
42
+ { value: sender_push_dto_1.PushSenderDto, name: 'push' },
43
+ { value: sender_sms_dto_1.SmsSenderDto, name: 'sms' },
44
+ ],
45
+ },
46
+ keepDiscriminatorProperty: false,
47
+ }),
48
+ __metadata("design:type", Object)
49
+ ], NotificationSendRequestDto.prototype, "sender", void 0);
50
+ __decorate([
51
+ (0, class_validator_1.IsNotEmpty)(),
52
+ (0, class_validator_1.IsObject)(),
53
+ (0, class_validator_1.ValidateNested)(),
54
+ (0, class_transformer_1.Type)(() => Object, {
55
+ discriminator: {
56
+ property: '__type',
57
+ subTypes: [
58
+ { value: receiver_email_dto_1.EmailReceiverDto, name: 'email' },
59
+ { value: receiver_push_dto_1.PushReceiverDto, name: 'push' },
60
+ { value: receiver_sms_dto_1.SmsReceiverDto, name: 'sms' },
61
+ ],
62
+ },
63
+ keepDiscriminatorProperty: false,
64
+ }),
65
+ __metadata("design:type", Object)
66
+ ], NotificationSendRequestDto.prototype, "receiver", void 0);
@@ -0,0 +1,9 @@
1
+ import { SuccessResponseDto } from "../../success-response.dto";
2
+ /**
3
+ * Response from notification integrations after successfully sending a notification.
4
+ * Returned to hoster.ai confirming the notification was sent.
5
+ */
6
+ export declare class NotificationSendResponseDto extends SuccessResponseDto {
7
+ /** Unique identifier for the sent notification */
8
+ notificationId: string;
9
+ }
@@ -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.NotificationSendResponseDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const success_response_dto_1 = require("../../success-response.dto");
15
+ /**
16
+ * Response from notification integrations after successfully sending a notification.
17
+ * Returned to hoster.ai confirming the notification was sent.
18
+ */
19
+ class NotificationSendResponseDto extends success_response_dto_1.SuccessResponseDto {
20
+ }
21
+ exports.NotificationSendResponseDto = NotificationSendResponseDto;
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.IsNotEmpty)(),
25
+ __metadata("design:type", String)
26
+ ], NotificationSendResponseDto.prototype, "notificationId", void 0);
@@ -1,6 +1,7 @@
1
1
  import { FieldDto } from '../field.dto';
2
2
  import { InfoDto } from '../info.dto';
3
3
  import { UnitDto } from '../unit.dto';
4
+ import { ProductItemActionsEnum } from '../../enums/item-actions.enum';
4
5
  /**
5
6
  * DTO for notification information.
6
7
  * Extends the base InfoDto to include the notification message type.
@@ -27,4 +28,8 @@ export declare class ProductInfoDto extends InfoDto {
27
28
  * This allows the system to know what to expect in the response before the creation is executed.
28
29
  */
29
30
  responseDataFieldNames?: Record<string, unknown>;
31
+ /**
32
+ * A list of actions that are supported by this integration.
33
+ */
34
+ supportedTypes: ProductItemActionsEnum[];
30
35
  }
@@ -18,11 +18,19 @@ const class_transformer_1 = require("class-transformer");
18
18
  const is_plain_object_validator_1 = require("../../decorators/is-plain-object.validator");
19
19
  const unique_field_in_array_validator_1 = require("../../decorators/unique-field-in-array.validator");
20
20
  const class_validator_jsonschema_1 = require("class-validator-jsonschema");
21
+ const item_actions_enum_1 = require("../../enums/item-actions.enum");
21
22
  /**
22
23
  * DTO for notification information.
23
24
  * Extends the base InfoDto to include the notification message type.
24
25
  */
25
26
  class ProductInfoDto extends info_dto_1.InfoDto {
27
+ constructor() {
28
+ super(...arguments);
29
+ /**
30
+ * A list of actions that are supported by this integration.
31
+ */
32
+ this.supportedTypes = [];
33
+ }
26
34
  }
27
35
  exports.ProductInfoDto = ProductInfoDto;
28
36
  __decorate([
@@ -82,3 +90,15 @@ __decorate([
82
90
  }),
83
91
  __metadata("design:type", Object)
84
92
  ], ProductInfoDto.prototype, "responseDataFieldNames", void 0);
93
+ __decorate([
94
+ (0, class_validator_1.IsNotEmpty)(),
95
+ (0, class_validator_1.IsArray)(),
96
+ (0, class_validator_1.IsEnum)(item_actions_enum_1.ProductItemActionsEnum, { each: true }),
97
+ (0, class_validator_jsonschema_1.JSONSchema)({
98
+ title: 'Supported Actions',
99
+ description: 'Actions supported by this integration.',
100
+ type: 'array',
101
+ items: { type: 'string', enum: Object.values(item_actions_enum_1.ProductItemActionsEnum) }
102
+ }),
103
+ __metadata("design:type", Array)
104
+ ], ProductInfoDto.prototype, "supportedTypes", void 0);
@@ -1,31 +1,10 @@
1
- import { DurationEnum } from '../../enums/duration.enum';
1
+ import { ProductItemActionsEnum } from "../../enums/item-actions.enum";
2
+ import { ItemDataDto } from "../item-data.dto";
2
3
  /**
3
- * Represents the data of a specific product item.
4
- * This DTO is used to transfer detailed information about a product instance.
4
+ * Product item data sent to product integrations.
5
+ * Uses product-specific actions distinct from invoice integration actions.
5
6
  */
6
- export declare class ProductItemDataDto {
7
- /**
8
- * The unique identifier for the product item.
9
- */
10
- itemId?: string;
11
- /**
12
- * A record of product-level attributes.
13
- * These are general attributes defined for the product type.
14
- */
15
- productAttributes: Record<string, unknown>;
16
- /**
17
- * A record of item-specific attributes.
18
- * These are attributes that are unique to this particular instance of the product.
19
- */
20
- itemAttributes: Record<string, unknown>;
21
- /**
22
- * Data returned from the creation response.
23
- * This field should not be present in the create request.
24
- * @optional
25
- */
26
- creationResponseData?: Record<string, unknown>;
27
- /**
28
- * The duration of the product subscription or license.
29
- */
30
- duration: DurationEnum;
7
+ export declare class ProductItemDataDto extends ItemDataDto {
8
+ /** Product-specific action type for this item */
9
+ action: ProductItemActionsEnum;
31
10
  }