@hosterai/types 0.0.27 → 0.0.29

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 (136) hide show
  1. package/README.md +5 -1
  2. package/dist/decorators/all-or-none-validator.spec.js +9 -3
  3. package/dist/decorators/at-least-one-non-empty-validator.spec.js +1 -1
  4. package/dist/decorators/at-least-one-non-empty.validator.js +2 -2
  5. package/dist/decorators/is-of-allowed-types-validator.spec.js +10 -8
  6. package/dist/decorators/is-of-allowed-types.validator.js +4 -2
  7. package/dist/decorators/is-one-of.validator.d.ts +2 -2
  8. package/dist/decorators/is-one-of.validator.js +1 -1
  9. package/dist/decorators/is-plain-object.validator.d.ts +1 -1
  10. package/dist/decorators/is-plain-object.validator.js +3 -1
  11. package/dist/decorators/is-property-forbidden-validator.spec.js +12 -4
  12. package/dist/decorators/is-property-forbidden.validator.d.ts +1 -1
  13. package/dist/decorators/is-regex.validator.d.ts +1 -1
  14. package/dist/decorators/min-less-or-equal-validator.spec.js +6 -2
  15. package/dist/dtos/action.dto.js +5 -5
  16. package/dist/dtos/addon-field.dto.d.ts +1 -1
  17. package/dist/dtos/admin-panel.dto.js +16 -18
  18. package/dist/dtos/attribute-field.dto.d.ts +1 -1
  19. package/dist/dtos/client-panel.dto.d.ts +3 -3
  20. package/dist/dtos/client-panel.dto.js +11 -10
  21. package/dist/dtos/company-data.dto.d.ts +4 -0
  22. package/dist/dtos/company-data.dto.js +19 -8
  23. package/dist/dtos/error-response.dto.js +1 -4
  24. package/dist/dtos/field-option.dto.js +3 -3
  25. package/dist/dtos/info.dto.js +10 -10
  26. package/dist/dtos/invoice/invoice-info.dto.d.ts +3 -3
  27. package/dist/dtos/invoice/invoice-info.dto.js +1 -1
  28. package/dist/dtos/invoice/invoice-item-data.dto.d.ts +2 -2
  29. package/dist/dtos/invoice/requests/base-invoice-request.dto.d.ts +30 -0
  30. package/dist/dtos/invoice/requests/base-invoice-request.dto.js +108 -0
  31. package/dist/dtos/invoice/requests/credit-note-request.dto.d.ts +2 -2
  32. package/dist/dtos/invoice/requests/credit-note-request.dto.js +2 -2
  33. package/dist/dtos/invoice/requests/invoice-request.dto.d.ts +2 -2
  34. package/dist/dtos/invoice/requests/invoice-request.dto.js +2 -2
  35. package/dist/dtos/invoice/requests/proforma-invoice-request.dto.d.ts +2 -19
  36. package/dist/dtos/invoice/requests/proforma-invoice-request.dto.js +2 -95
  37. package/dist/dtos/invoice/responses/credit-note-response.dto.d.ts +1 -1
  38. package/dist/dtos/invoice/responses/invoice-response.dto.d.ts +1 -1
  39. package/dist/dtos/invoice/responses/tax-details-response.dto.js +1 -1
  40. package/dist/dtos/invoice-contact-data.dto.d.ts +2 -2
  41. package/dist/dtos/invoice-contact-data.dto.js +5 -5
  42. package/dist/dtos/menu.dto.js +8 -4
  43. package/dist/dtos/notification/responses/notification-send-response.dto.d.ts +1 -1
  44. package/dist/dtos/notification/sender/sender-sms.dto.js +1 -1
  45. package/dist/dtos/product/product-info.dto.js +11 -5
  46. package/dist/dtos/product/product-item-data.dto.d.ts +2 -2
  47. package/dist/dtos/product/requests/product-create-request.dto.js +1 -1
  48. package/dist/dtos/product/requests/product-delete-request.dto.js +3 -3
  49. package/dist/dtos/product/requests/product-downgradable-request.dto.js +1 -1
  50. package/dist/dtos/product/requests/product-downgrade-request.dto.js +1 -1
  51. package/dist/dtos/product/requests/product-downgradeable-request.dto.d.ts +18 -0
  52. package/dist/dtos/product/requests/product-downgradeable-request.dto.js +37 -0
  53. package/dist/dtos/product/requests/product-renew-request.dto.js +1 -1
  54. package/dist/dtos/product/requests/product-suspend-request.dto.js +1 -1
  55. package/dist/dtos/product/requests/product-unsuspend-request.dto.js +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.js +1 -1
  58. package/dist/dtos/product/requests/product-upgradeable-request.dto.d.ts +18 -0
  59. package/dist/dtos/product/requests/product-upgradeable-request.dto.js +37 -0
  60. package/dist/dtos/product/responses/product-downgradeable-response.dto.d.ts +22 -0
  61. package/dist/dtos/product/responses/product-downgradeable-response.dto.js +11 -0
  62. package/dist/dtos/product/responses/product-info-response.dto.js +1 -1
  63. package/dist/dtos/product/responses/product-upgradeable-response.dto.d.ts +22 -0
  64. package/dist/dtos/product/responses/product-upgradeable-response.dto.js +11 -0
  65. package/dist/dtos/responses/validate-attributes-response.dto.d.ts +2 -2
  66. package/dist/dtos/tab.dto.js +2 -2
  67. package/dist/dtos/tax-manager/tax-details-request.dto.d.ts +31 -0
  68. package/dist/dtos/tax-manager/tax-details-request.dto.js +84 -0
  69. package/dist/dtos/unit.dto.js +3 -3
  70. package/dist/enums/country.enum.d.ts +1 -1
  71. package/dist/enums/country.enum.js +312 -78
  72. package/dist/enums/currency.enum.d.ts +43 -0
  73. package/dist/enums/currency.enum.js +47 -0
  74. package/dist/enums/events.enum.d.ts +3 -0
  75. package/dist/enums/events.enum.js +3 -0
  76. package/dist/index.d.ts +2 -1
  77. package/dist/index.js +2 -1
  78. package/dist/openapi/schemas/components.schemas.d.ts +3 -33
  79. package/dist/openapi/schemas/components.schemas.js +19 -40
  80. package/dist/validators/action-validator.spec.js +3 -3
  81. package/dist/validators/addon-field-validator.spec.js +10 -3
  82. package/dist/validators/admin-panel-more-actions-validator.spec.js +12 -8
  83. package/dist/validators/admin-panel-more-actions.validator.d.ts +1 -1
  84. package/dist/validators/admin-panel-tabs-validator.spec.js +74 -10
  85. package/dist/validators/admin-panel-tabs.validator.d.ts +1 -1
  86. package/dist/validators/admin-panel-validator.spec.js +164 -32
  87. package/dist/validators/attachment-validator.spec.js +8 -8
  88. package/dist/validators/attribute-field-validator.spec.js +18 -7
  89. package/dist/validators/client-panel-validator.spec.js +57 -9
  90. package/dist/validators/country-validator.spec.js +7 -7
  91. package/dist/validators/field-validator.spec.js +35 -10
  92. package/dist/validators/info-validator.spec.js +10 -10
  93. package/dist/validators/invoice-contact-data-validator.spec.js +18 -10
  94. package/dist/validators/invoice-info-validator.spec.js +14 -10
  95. package/dist/validators/invoice-item-data-validator.spec.js +4 -4
  96. package/dist/validators/item-data-validator.spec.js +17 -9
  97. package/dist/validators/menu-with-submenu-validator.spec.js +13 -11
  98. package/dist/validators/menu-with-url-validator.spec.js +15 -5
  99. package/dist/validators/notification-info-validator.spec.js +23 -15
  100. package/dist/validators/product-downgradeable-request-validator.d.ts +8 -0
  101. package/dist/validators/product-downgradeable-request-validator.js +17 -0
  102. package/dist/validators/product-info-validator.spec.js +46 -32
  103. package/dist/validators/product-info.validator.d.ts +1 -1
  104. package/dist/validators/product-item-data-validator.spec.js +12 -4
  105. package/dist/validators/product-upgradeable-request-validator.d.ts +8 -0
  106. package/dist/validators/product-upgradeable-request-validator.js +17 -0
  107. package/dist/validators/sender-sms-validator.spec.js +5 -2
  108. package/dist/validators/settings-with-tabs-validator.spec.js +176 -12
  109. package/dist/validators/settings-with-url-validator.spec.js +89 -11
  110. package/dist/validators/tab-validator.spec.js +7 -7
  111. package/dist/validators/tin-validation-details-validator.spec.js +8 -8
  112. package/dist/validators/transaction-data-validator.spec.js +13 -8
  113. package/dist/validators/unit-validator.spec.js +13 -4
  114. package/package.json +1 -1
  115. package/dist/dtos/info/info-notification.dto.d.ts +0 -5
  116. package/dist/dtos/info/info-notification.dto.js +0 -7
  117. package/dist/dtos/info/info.dto.d.ts +0 -196
  118. package/dist/dtos/info/info.dto.js +0 -278
  119. package/dist/dtos/notification/notification-request.dto.d.ts +0 -20
  120. package/dist/dtos/notification/notification-request.dto.js +0 -31
  121. package/dist/dtos/receiver/receiver-email.dto.d.ts +0 -20
  122. package/dist/dtos/receiver/receiver-email.dto.js +0 -39
  123. package/dist/dtos/receiver/receiver-push.dto.d.ts +0 -15
  124. package/dist/dtos/receiver/receiver-push.dto.js +0 -31
  125. package/dist/dtos/receiver/receiver-sms.dto.d.ts +0 -11
  126. package/dist/dtos/receiver/receiver-sms.dto.js +0 -26
  127. package/dist/dtos/request.dto.d.ts +0 -20
  128. package/dist/dtos/request.dto.js +0 -31
  129. package/dist/dtos/sender/sender-email.dto.d.ts +0 -25
  130. package/dist/dtos/sender/sender-email.dto.js +0 -46
  131. package/dist/dtos/sender/sender-push.dto.d.ts +0 -31
  132. package/dist/dtos/sender/sender-push.dto.js +0 -50
  133. package/dist/dtos/sender/sender-sms.dto.d.ts +0 -15
  134. package/dist/dtos/sender/sender-sms.dto.js +0 -30
  135. package/dist/enums/message-type.enum.d.ts +0 -5
  136. package/dist/enums/message-type.enum.js +0 -9
@@ -44,7 +44,7 @@ __decorate([
44
44
  title: 'Product Attributes',
45
45
  description: 'Configurable attributes that apply at the product level.',
46
46
  type: 'array',
47
- items: { $ref: '#/components/schemas/AttributeFieldDto' }
47
+ items: { $ref: '#/components/schemas/AttributeFieldDto' },
48
48
  }),
49
49
  __metadata("design:type", Array)
50
50
  ], ProductInfoDto.prototype, "productAttributes", void 0);
@@ -59,7 +59,7 @@ __decorate([
59
59
  title: 'Item Attributes',
60
60
  description: 'Configurable attributes that apply at the item level.',
61
61
  type: 'array',
62
- items: { $ref: '#/components/schemas/AttributeFieldDto' }
62
+ items: { $ref: '#/components/schemas/AttributeFieldDto' },
63
63
  }),
64
64
  __metadata("design:type", Array)
65
65
  ], ProductInfoDto.prototype, "itemAttributes", void 0);
@@ -74,7 +74,13 @@ __decorate([
74
74
  description: 'Optional metering units for pay-per-use billing.',
75
75
  type: 'array',
76
76
  items: { $ref: '#/components/schemas/UnitDto' },
77
- example: [{ id: 'requests', unitDescription: 'API request', intervalDescription: 'Per month' }]
77
+ example: [
78
+ {
79
+ id: 'requests',
80
+ unitDescription: 'API request',
81
+ intervalDescription: 'Per month',
82
+ },
83
+ ],
78
84
  }),
79
85
  __metadata("design:type", Array)
80
86
  ], ProductInfoDto.prototype, "payPerUseUnits", void 0);
@@ -86,7 +92,7 @@ __decorate([
86
92
  description: 'Mapping of field names used in provider responses.',
87
93
  type: 'object',
88
94
  additionalProperties: { type: 'string' },
89
- example: { external_id: 'id', status_text: 'status' }
95
+ example: { external_id: 'id', status_text: 'status' },
90
96
  }),
91
97
  __metadata("design:type", Object)
92
98
  ], ProductInfoDto.prototype, "responseDataFieldNames", void 0);
@@ -98,7 +104,7 @@ __decorate([
98
104
  title: 'Supported Actions',
99
105
  description: 'Actions supported by this integration.',
100
106
  type: 'array',
101
- items: { type: 'string', enum: Object.values(item_actions_enum_1.ProductItemActionsEnum) }
107
+ items: { type: 'string', enum: Object.values(item_actions_enum_1.ProductItemActionsEnum) },
102
108
  }),
103
109
  __metadata("design:type", Array)
104
110
  ], ProductInfoDto.prototype, "supportedActions", void 0);
@@ -1,5 +1,5 @@
1
- import { ProductItemActionsEnum } from "../../enums/item-actions.enum";
2
- import { ItemDataDto } from "../item-data.dto";
1
+ import { ProductItemActionsEnum } from '../../enums/item-actions.enum';
2
+ import { ItemDataDto } from '../item-data.dto';
3
3
  /**
4
4
  * Product item data sent to product integrations.
5
5
  * Uses product-specific actions distinct from invoice integration actions.
@@ -29,7 +29,7 @@ __decorate([
29
29
  (0, class_transformer_1.Type)(() => client_data_dto_1.ClientDataDto),
30
30
  (0, class_validator_jsonschema_1.JSONSchema)({
31
31
  title: 'Client Data',
32
- description: 'The client\'s data for the request.',
32
+ description: "The client's data for the request.",
33
33
  $ref: '#/components/schemas/ClientDataDto',
34
34
  }),
35
35
  __metadata("design:type", client_data_dto_1.ClientDataDto)
@@ -29,8 +29,8 @@ __decorate([
29
29
  (0, class_transformer_1.Type)(() => client_data_dto_1.ClientDataDto),
30
30
  (0, class_validator_jsonschema_1.JSONSchema)({
31
31
  title: 'Client Data',
32
- description: 'The client\'s data initiating the request.',
33
- type: 'object',
32
+ description: "The client's data initiating the request.",
33
+ $ref: '#/components/schemas/ClientDataDto',
34
34
  }),
35
35
  __metadata("design:type", client_data_dto_1.ClientDataDto)
36
36
  ], ProductDeleteRequestDto.prototype, "clientData", void 0);
@@ -42,7 +42,7 @@ __decorate([
42
42
  (0, class_validator_jsonschema_1.JSONSchema)({
43
43
  title: 'Item Data',
44
44
  description: 'The data of the product item to be deleted.',
45
- type: 'object',
45
+ $ref: '#/components/schemas/ProductItemDataDto',
46
46
  }),
47
47
  __metadata("design:type", product_item_data_dto_1.ProductItemDataDto)
48
48
  ], ProductDeleteRequestDto.prototype, "itemData", void 0);
@@ -29,7 +29,7 @@ __decorate([
29
29
  (0, class_transformer_1.Type)(() => client_data_dto_1.ClientDataDto),
30
30
  (0, class_validator_jsonschema_1.JSONSchema)({
31
31
  title: 'Client Data',
32
- description: 'The client\'s data for the request.',
32
+ description: "The client's data for the request.",
33
33
  $ref: '#/components/schemas/ClientDataDto',
34
34
  }),
35
35
  __metadata("design:type", client_data_dto_1.ClientDataDto)
@@ -29,7 +29,7 @@ __decorate([
29
29
  (0, class_transformer_1.Type)(() => client_data_dto_1.ClientDataDto),
30
30
  (0, class_validator_jsonschema_1.JSONSchema)({
31
31
  title: 'Client Data',
32
- description: 'The client\'s data for the request.',
32
+ description: "The client's data for the request.",
33
33
  $ref: '#/components/schemas/ClientDataDto',
34
34
  }),
35
35
  __metadata("design:type", client_data_dto_1.ClientDataDto)
@@ -0,0 +1,18 @@
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
+ }
@@ -0,0 +1,37 @@
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);
@@ -29,7 +29,7 @@ __decorate([
29
29
  (0, class_transformer_1.Type)(() => client_data_dto_1.ClientDataDto),
30
30
  (0, class_validator_jsonschema_1.JSONSchema)({
31
31
  title: 'Client Data',
32
- description: 'The client\'s data for the request.',
32
+ description: "The client's data for the request.",
33
33
  $ref: '#/components/schemas/ClientDataDto',
34
34
  }),
35
35
  __metadata("design:type", client_data_dto_1.ClientDataDto)
@@ -29,7 +29,7 @@ __decorate([
29
29
  (0, class_transformer_1.Type)(() => client_data_dto_1.ClientDataDto),
30
30
  (0, class_validator_jsonschema_1.JSONSchema)({
31
31
  title: 'Client Data',
32
- description: 'The client\'s data for the request.',
32
+ description: "The client's data for the request.",
33
33
  $ref: '#/components/schemas/ClientDataDto',
34
34
  }),
35
35
  __metadata("design:type", client_data_dto_1.ClientDataDto)
@@ -29,7 +29,7 @@ __decorate([
29
29
  (0, class_transformer_1.Type)(() => client_data_dto_1.ClientDataDto),
30
30
  (0, class_validator_jsonschema_1.JSONSchema)({
31
31
  title: 'Client Data',
32
- description: 'The client\'s data for the request.',
32
+ description: "The client's data for the request.",
33
33
  $ref: '#/components/schemas/ClientDataDto',
34
34
  }),
35
35
  __metadata("design:type", client_data_dto_1.ClientDataDto)
@@ -29,7 +29,7 @@ __decorate([
29
29
  (0, class_transformer_1.Type)(() => client_data_dto_1.ClientDataDto),
30
30
  (0, class_validator_jsonschema_1.JSONSchema)({
31
31
  title: 'Client Data',
32
- description: 'The client\'s data for the request.',
32
+ description: "The client's data for the request.",
33
33
  $ref: '#/components/schemas/ClientDataDto',
34
34
  }),
35
35
  __metadata("design:type", client_data_dto_1.ClientDataDto)
@@ -29,7 +29,7 @@ __decorate([
29
29
  (0, class_transformer_1.Type)(() => client_data_dto_1.ClientDataDto),
30
30
  (0, class_validator_jsonschema_1.JSONSchema)({
31
31
  title: 'Client Data',
32
- description: 'The client\'s data for the request.',
32
+ description: "The client's data for the request.",
33
33
  $ref: '#/components/schemas/ClientDataDto',
34
34
  }),
35
35
  __metadata("design:type", client_data_dto_1.ClientDataDto)
@@ -0,0 +1,18 @@
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
+ }
@@ -0,0 +1,37 @@
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);
@@ -0,0 +1,22 @@
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
+ }
@@ -0,0 +1,11 @@
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;
@@ -28,7 +28,7 @@ __decorate([
28
28
  (0, class_validator_jsonschema_1.JSONSchema)({
29
29
  title: 'Info',
30
30
  description: 'The detailed information of the product.',
31
- type: 'object',
31
+ $ref: '#/components/schemas/ProductInfoDto',
32
32
  }),
33
33
  __metadata("design:type", product_info_dto_1.ProductInfoDto)
34
34
  ], ProductInfoResponseDto.prototype, "info", void 0);
@@ -0,0 +1,22 @@
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
+ }
@@ -0,0 +1,11 @@
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,5 +1,5 @@
1
- import { BaseResponse } from "../base-response.dto";
2
- import { FieldDto } from "../field.dto";
1
+ import { BaseResponse } from '../base-response.dto';
2
+ import { FieldDto } from '../field.dto';
3
3
  /**
4
4
  * Represents the response from validating product attributes.
5
5
  * Contains the list of attributes that have been validated.
@@ -25,7 +25,7 @@ __decorate([
25
25
  (0, class_validator_jsonschema_1.JSONSchema)({
26
26
  title: 'Label',
27
27
  description: 'Text label for the tab.',
28
- type: 'string'
28
+ type: 'string',
29
29
  }),
30
30
  __metadata("design:type", String)
31
31
  ], TabDto.prototype, "label", void 0);
@@ -36,7 +36,7 @@ __decorate([
36
36
  title: 'URL',
37
37
  description: 'URL associated with the tab.',
38
38
  type: 'string',
39
- format: 'uri'
39
+ format: 'uri',
40
40
  }),
41
41
  __metadata("design:type", String)
42
42
  ], TabDto.prototype, "url", void 0);
@@ -0,0 +1,31 @@
1
+ import { CountryEnum } from '../../enums/country.enum';
2
+ /**
3
+ * Request payload for calculating tax details.
4
+ * Contains company and customer location information for tax rate determination.
5
+ */
6
+ export declare class TaxDetailsRequestDto {
7
+ /**
8
+ * Country where the company is registered
9
+ */
10
+ companyCountry: CountryEnum;
11
+ /**
12
+ * Country where the customer is located
13
+ */
14
+ customerCountry: CountryEnum;
15
+ /**
16
+ * Customer's Tax Identification Number
17
+ */
18
+ customerTIN: string;
19
+ /**
20
+ * Customer's postal code
21
+ */
22
+ customerPostalCode?: string;
23
+ /**
24
+ * Customer's state or province
25
+ */
26
+ customerState?: string;
27
+ /**
28
+ * Indicates whether the customer address has been validated
29
+ */
30
+ validatedAddress?: boolean;
31
+ }
@@ -0,0 +1,84 @@
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.TaxDetailsRequestDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const country_enum_1 = require("../../enums/country.enum");
15
+ const class_validator_jsonschema_1 = require("class-validator-jsonschema");
16
+ /**
17
+ * Request payload for calculating tax details.
18
+ * Contains company and customer location information for tax rate determination.
19
+ */
20
+ class TaxDetailsRequestDto {
21
+ }
22
+ exports.TaxDetailsRequestDto = TaxDetailsRequestDto;
23
+ __decorate([
24
+ (0, class_validator_1.IsDefined)(),
25
+ (0, class_validator_1.IsEnum)(country_enum_1.CountryEnum),
26
+ (0, class_validator_jsonschema_1.JSONSchema)({
27
+ title: 'Company Country',
28
+ description: 'Country where the company is registered.',
29
+ type: 'string',
30
+ enum: Object.values(country_enum_1.CountryEnum),
31
+ }),
32
+ __metadata("design:type", String)
33
+ ], TaxDetailsRequestDto.prototype, "companyCountry", void 0);
34
+ __decorate([
35
+ (0, class_validator_1.IsDefined)(),
36
+ (0, class_validator_1.IsEnum)(country_enum_1.CountryEnum),
37
+ (0, class_validator_jsonschema_1.JSONSchema)({
38
+ title: 'Customer Country',
39
+ description: 'Country where the customer is located.',
40
+ type: 'string',
41
+ enum: Object.values(country_enum_1.CountryEnum),
42
+ }),
43
+ __metadata("design:type", String)
44
+ ], TaxDetailsRequestDto.prototype, "customerCountry", void 0);
45
+ __decorate([
46
+ (0, class_validator_1.IsDefined)(),
47
+ (0, class_validator_1.IsString)(),
48
+ (0, class_validator_jsonschema_1.JSONSchema)({
49
+ title: 'Customer TIN',
50
+ description: "Customer's Tax Identification Number.",
51
+ type: 'string',
52
+ }),
53
+ __metadata("design:type", String)
54
+ ], TaxDetailsRequestDto.prototype, "customerTIN", void 0);
55
+ __decorate([
56
+ (0, class_validator_1.IsOptional)(),
57
+ (0, class_validator_1.IsString)(),
58
+ (0, class_validator_jsonschema_1.JSONSchema)({
59
+ title: 'Customer Postal Code',
60
+ description: "Customer's postal code.",
61
+ type: 'string',
62
+ }),
63
+ __metadata("design:type", String)
64
+ ], TaxDetailsRequestDto.prototype, "customerPostalCode", void 0);
65
+ __decorate([
66
+ (0, class_validator_1.IsOptional)(),
67
+ (0, class_validator_1.IsString)(),
68
+ (0, class_validator_jsonschema_1.JSONSchema)({
69
+ title: 'Customer State',
70
+ description: "Customer's state or province.",
71
+ type: 'string',
72
+ }),
73
+ __metadata("design:type", String)
74
+ ], TaxDetailsRequestDto.prototype, "customerState", void 0);
75
+ __decorate([
76
+ (0, class_validator_1.IsOptional)(),
77
+ (0, class_validator_1.IsBoolean)(),
78
+ (0, class_validator_jsonschema_1.JSONSchema)({
79
+ title: 'Validated Address',
80
+ description: 'Whether the customer address has been validated.',
81
+ type: 'boolean',
82
+ }),
83
+ __metadata("design:type", Boolean)
84
+ ], TaxDetailsRequestDto.prototype, "validatedAddress", void 0);
@@ -27,7 +27,7 @@ __decorate([
27
27
  title: 'Unit ID',
28
28
  description: 'Unit identifier.',
29
29
  type: 'string',
30
- example: 'messages'
30
+ example: 'messages',
31
31
  }),
32
32
  __metadata("design:type", String)
33
33
  ], UnitDto.prototype, "id", void 0);
@@ -39,7 +39,7 @@ __decorate([
39
39
  title: 'Unit Description',
40
40
  description: 'What is measured.',
41
41
  type: 'string',
42
- example: 'Message sent'
42
+ example: 'Message sent',
43
43
  }),
44
44
  __metadata("design:type", String)
45
45
  ], UnitDto.prototype, "unitDescription", void 0);
@@ -51,7 +51,7 @@ __decorate([
51
51
  title: 'Interval Description',
52
52
  description: 'Billing interval.',
53
53
  type: 'string',
54
- example: 'Per month'
54
+ example: 'Per month',
55
55
  }),
56
56
  __metadata("design:type", String)
57
57
  ], UnitDto.prototype, "intervalDescription", void 0);
@@ -1,4 +1,4 @@
1
- import { CountryDto } from "../dtos/country.dto";
1
+ import { CountryDto } from '../dtos/country.dto';
2
2
  export declare enum CountryEnum {
3
3
  AFGHANISTAN = "AF",
4
4
  ALAND_ISLANDS = "AX",