@hosterai/types 0.0.26 → 0.0.27

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 (144) hide show
  1. package/README.md +49 -8
  2. package/dist/dtos/attachment.dto.js +17 -0
  3. package/dist/dtos/attribute-field.dto.d.ts +9 -10
  4. package/dist/dtos/attribute-field.dto.js +28 -38
  5. package/dist/dtos/base-response.dto.js +11 -0
  6. package/dist/dtos/client-data.dto.js +82 -0
  7. package/dist/dtos/company-data.dto.js +97 -0
  8. package/dist/dtos/country.dto.js +17 -0
  9. package/dist/dtos/error-response.dto.js +15 -0
  10. package/dist/dtos/field.dto.d.ts +17 -1
  11. package/dist/dtos/field.dto.js +41 -10
  12. package/dist/dtos/info.dto.d.ts +0 -6
  13. package/dist/dtos/info.dto.js +0 -24
  14. package/dist/dtos/invoice/invoice-item-data.dto.js +7 -0
  15. package/dist/dtos/invoice/requests/credit-note-request.dto.js +6 -0
  16. package/dist/dtos/invoice/requests/invoice-request.dto.js +6 -0
  17. package/dist/dtos/invoice/requests/proforma-invoice-request.dto.d.ts +3 -0
  18. package/dist/dtos/invoice/requests/proforma-invoice-request.dto.js +51 -3
  19. package/dist/dtos/invoice/requests/tax-details-request.dto.d.ts +31 -0
  20. package/dist/dtos/invoice/requests/tax-details-request.dto.js +84 -0
  21. package/dist/dtos/invoice/responses/proforma-invoice-response.dto.js +17 -0
  22. package/dist/dtos/invoice/responses/tax-details-response.dto.d.ts +20 -0
  23. package/dist/dtos/invoice/responses/tax-details-response.dto.js +56 -0
  24. package/dist/dtos/invoice/tin-validation-details.dto.d.ts +51 -0
  25. package/dist/dtos/invoice/tin-validation-details.dto.js +165 -0
  26. package/dist/dtos/invoice/transaction-data.dto.js +22 -0
  27. package/dist/dtos/invoice-contact-data.dto.js +102 -0
  28. package/dist/dtos/item-data.dto.d.ts +2 -2
  29. package/dist/dtos/item-data.dto.js +63 -2
  30. package/dist/dtos/jwt.dto.js +27 -0
  31. package/dist/dtos/multilang-text.dto.js +12 -0
  32. package/dist/dtos/notification/receiver/receiver-email.dto.js +19 -0
  33. package/dist/dtos/notification/receiver/receiver-sms.dto.js +7 -0
  34. package/dist/dtos/notification/requests/notification-send-request.dto.d.ts +3 -3
  35. package/dist/dtos/notification/requests/notification-send-request.dto.js +27 -3
  36. package/dist/dtos/notification/responses/notification-send-response.dto.js +6 -0
  37. package/dist/dtos/notification/sender/sender-email.dto.js +26 -0
  38. package/dist/dtos/notification/sender/sender-push.dto.js +36 -0
  39. package/dist/dtos/notification/sender/sender-sms.dto.js +11 -0
  40. package/dist/dtos/product/product-info.dto.d.ts +4 -4
  41. package/dist/dtos/product/product-info.dto.js +7 -7
  42. package/dist/dtos/product/product-item-data.dto.d.ts +1 -1
  43. package/dist/dtos/product/product-item-data.dto.js +8 -1
  44. package/dist/dtos/product/requests/product-create-request.dto.d.ts +1 -1
  45. package/dist/dtos/product/requests/product-create-request.dto.js +12 -1
  46. package/dist/dtos/product/requests/product-delete-request.dto.d.ts +1 -1
  47. package/dist/dtos/product/requests/product-delete-request.dto.js +12 -1
  48. package/dist/dtos/product/requests/product-downgradable-request.dto.d.ts +1 -1
  49. package/dist/dtos/product/requests/product-downgradable-request.dto.js +12 -1
  50. package/dist/dtos/product/requests/product-downgrade-request.dto.d.ts +1 -1
  51. package/dist/dtos/product/requests/product-downgrade-request.dto.js +17 -1
  52. package/dist/dtos/product/requests/product-renew-request.dto.d.ts +1 -1
  53. package/dist/dtos/product/requests/product-renew-request.dto.js +12 -1
  54. package/dist/dtos/product/requests/product-suspend-request.dto.d.ts +1 -1
  55. package/dist/dtos/product/requests/product-suspend-request.dto.js +12 -1
  56. package/dist/dtos/product/requests/product-unsuspend-request.dto.d.ts +1 -1
  57. package/dist/dtos/product/requests/product-unsuspend-request.dto.js +12 -1
  58. package/dist/dtos/product/requests/product-upgradable-request.dto.d.ts +1 -1
  59. package/dist/dtos/product/requests/product-upgradable-request.dto.js +12 -1
  60. package/dist/dtos/product/requests/product-upgrade-request.dto.d.ts +1 -1
  61. package/dist/dtos/product/requests/product-upgrade-request.dto.js +17 -1
  62. package/dist/dtos/product/responses/product-create-response.dto.js +37 -0
  63. package/dist/dtos/product/responses/product-delete-response.dto.js +37 -0
  64. package/dist/dtos/product/responses/product-downgradable-response.dto.js +37 -0
  65. package/dist/dtos/product/responses/product-downgrade-response.dto.js +37 -0
  66. package/dist/dtos/product/responses/product-info-response.dto.js +6 -0
  67. package/dist/dtos/product/responses/product-renew-response.dto.js +37 -0
  68. package/dist/dtos/product/responses/product-suspend-response.dto.js +37 -0
  69. package/dist/dtos/product/responses/product-unsuspend-response.dto.js +37 -0
  70. package/dist/dtos/product/responses/product-upgradable-response.dto.js +37 -0
  71. package/dist/dtos/product/responses/product-upgrade-response.dto.js +37 -0
  72. package/dist/dtos/requests/validate-attributes-request.dto.js +12 -0
  73. package/dist/dtos/response-data.dto.js +19 -0
  74. package/dist/dtos/responses/validate-attributes-response.dto.js +7 -0
  75. package/dist/dtos/setup-status-response.dto.js +20 -0
  76. package/dist/index.d.ts +24 -0
  77. package/dist/index.js +24 -0
  78. package/dist/openapi/schemas/components.schemas.d.ts +152 -37
  79. package/dist/openapi/schemas/components.schemas.js +178 -96
  80. package/dist/validators/addon-field-validator.d.ts +9 -0
  81. package/dist/validators/addon-field-validator.js +14 -0
  82. package/dist/validators/addon-field-validator.spec.d.ts +1 -0
  83. package/dist/validators/addon-field-validator.spec.js +38 -0
  84. package/dist/validators/attachment-validator.d.ts +8 -0
  85. package/dist/validators/attachment-validator.js +17 -0
  86. package/dist/validators/attachment-validator.spec.d.ts +1 -0
  87. package/dist/validators/attachment-validator.spec.js +58 -0
  88. package/dist/validators/attribute-field-validator.d.ts +8 -0
  89. package/dist/validators/attribute-field-validator.js +17 -0
  90. package/dist/validators/attribute-field-validator.spec.d.ts +1 -0
  91. package/dist/validators/attribute-field-validator.spec.js +84 -0
  92. package/dist/validators/country-validator.d.ts +8 -0
  93. package/dist/validators/country-validator.js +17 -0
  94. package/dist/validators/country-validator.spec.d.ts +1 -0
  95. package/dist/validators/country-validator.spec.js +58 -0
  96. package/dist/validators/field-validator.spec.js +1 -29
  97. package/dist/validators/info-validator.d.ts +8 -0
  98. package/dist/validators/info-validator.js +17 -0
  99. package/dist/validators/info-validator.spec.d.ts +1 -0
  100. package/dist/validators/info-validator.spec.js +85 -0
  101. package/dist/validators/invoice-contact-data-validator.d.ts +8 -0
  102. package/dist/validators/invoice-contact-data-validator.js +17 -0
  103. package/dist/validators/invoice-contact-data-validator.spec.d.ts +1 -0
  104. package/dist/validators/invoice-contact-data-validator.spec.js +88 -0
  105. package/dist/validators/invoice-info-validator.d.ts +8 -0
  106. package/dist/validators/invoice-info-validator.js +17 -0
  107. package/dist/validators/invoice-info-validator.spec.d.ts +1 -0
  108. package/dist/validators/invoice-info-validator.spec.js +81 -0
  109. package/dist/validators/invoice-item-data-validator.d.ts +8 -0
  110. package/dist/validators/invoice-item-data-validator.js +17 -0
  111. package/dist/validators/invoice-item-data-validator.spec.d.ts +1 -0
  112. package/dist/validators/invoice-item-data-validator.spec.js +45 -0
  113. package/dist/validators/item-data-validator.d.ts +8 -0
  114. package/dist/validators/item-data-validator.js +17 -0
  115. package/dist/validators/item-data-validator.spec.d.ts +1 -0
  116. package/dist/validators/item-data-validator.spec.js +79 -0
  117. package/dist/validators/notification-request-validator.js +1 -1
  118. package/dist/validators/product-create-request-validator.js +1 -1
  119. package/dist/validators/product-delete-request-validator.js +1 -1
  120. package/dist/validators/product-downgradable-request-validator.js +1 -1
  121. package/dist/validators/product-downgrade-request-validator.js +1 -1
  122. package/dist/validators/product-info-validator.spec.js +5 -1
  123. package/dist/validators/product-item-data-validator.d.ts +8 -0
  124. package/dist/validators/product-item-data-validator.js +17 -0
  125. package/dist/validators/product-item-data-validator.spec.d.ts +1 -0
  126. package/dist/validators/product-item-data-validator.spec.js +60 -0
  127. package/dist/validators/product-renew-request-validator.js +1 -1
  128. package/dist/validators/product-suspend-request-validator.js +1 -1
  129. package/dist/validators/product-unsuspend-request-validator.js +1 -1
  130. package/dist/validators/product-upgradable-request-validator.js +1 -1
  131. package/dist/validators/product-upgrade-request-validator.js +1 -1
  132. package/dist/validators/tab-validator.d.ts +8 -0
  133. package/dist/validators/tab-validator.js +17 -0
  134. package/dist/validators/tab-validator.spec.d.ts +1 -0
  135. package/dist/validators/tab-validator.spec.js +49 -0
  136. package/dist/validators/tin-validation-details-validator.d.ts +8 -0
  137. package/dist/validators/tin-validation-details-validator.js +17 -0
  138. package/dist/validators/tin-validation-details-validator.spec.d.ts +1 -0
  139. package/dist/validators/tin-validation-details-validator.spec.js +77 -0
  140. package/dist/validators/transaction-data-validator.d.ts +8 -0
  141. package/dist/validators/transaction-data-validator.js +17 -0
  142. package/dist/validators/transaction-data-validator.spec.d.ts +1 -0
  143. package/dist/validators/transaction-data-validator.spec.js +62 -0
  144. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { ClientDataDto } from '../../client-data.dto';
2
1
  import { ProductItemDataDto } from '../product-item-data.dto';
2
+ import { ClientDataDto } from '../../client-data.dto';
3
3
  /**
4
4
  * Represents a request to downgrade a product item.
5
5
  * This DTO contains all the necessary information for the downgrade process.
@@ -11,9 +11,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ProductDowngradeRequestDto = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
+ const class_validator_jsonschema_1 = require("class-validator-jsonschema");
14
15
  const class_transformer_1 = require("class-transformer");
15
- const client_data_dto_1 = require("../../client-data.dto");
16
16
  const product_item_data_dto_1 = require("../product-item-data.dto");
17
+ const client_data_dto_1 = require("../../client-data.dto");
17
18
  /**
18
19
  * Represents a request to downgrade a product item.
19
20
  * This DTO contains all the necessary information for the downgrade process.
@@ -26,6 +27,11 @@ __decorate([
26
27
  (0, class_validator_1.IsObject)(),
27
28
  (0, class_validator_1.ValidateNested)(),
28
29
  (0, class_transformer_1.Type)(() => client_data_dto_1.ClientDataDto),
30
+ (0, class_validator_jsonschema_1.JSONSchema)({
31
+ title: 'Client Data',
32
+ description: 'The client\'s data for the request.',
33
+ $ref: '#/components/schemas/ClientDataDto',
34
+ }),
29
35
  __metadata("design:type", client_data_dto_1.ClientDataDto)
30
36
  ], ProductDowngradeRequestDto.prototype, "clientData", void 0);
31
37
  __decorate([
@@ -33,6 +39,11 @@ __decorate([
33
39
  (0, class_validator_1.IsObject)(),
34
40
  (0, class_validator_1.ValidateNested)(),
35
41
  (0, class_transformer_1.Type)(() => product_item_data_dto_1.ProductItemDataDto),
42
+ (0, class_validator_jsonschema_1.JSONSchema)({
43
+ title: 'Item Data',
44
+ description: 'The data of the product item to be downgraded.',
45
+ $ref: '#/components/schemas/ProductItemDataDto',
46
+ }),
36
47
  __metadata("design:type", product_item_data_dto_1.ProductItemDataDto)
37
48
  ], ProductDowngradeRequestDto.prototype, "itemData", void 0);
38
49
  __decorate([
@@ -40,5 +51,10 @@ __decorate([
40
51
  (0, class_validator_1.IsObject)(),
41
52
  (0, class_validator_1.ValidateNested)(),
42
53
  (0, class_transformer_1.Type)(() => product_item_data_dto_1.ProductItemDataDto),
54
+ (0, class_validator_jsonschema_1.JSONSchema)({
55
+ title: 'Previous Item Data',
56
+ description: 'The data of the product item before the downgrade.',
57
+ $ref: '#/components/schemas/ProductItemDataDto',
58
+ }),
43
59
  __metadata("design:type", product_item_data_dto_1.ProductItemDataDto)
44
60
  ], ProductDowngradeRequestDto.prototype, "previousItemData", void 0);
@@ -1,5 +1,5 @@
1
- import { ClientDataDto } from '../../client-data.dto';
2
1
  import { ProductItemDataDto } from '../product-item-data.dto';
2
+ import { ClientDataDto } from '../../client-data.dto';
3
3
  /**
4
4
  * Represents a request to renew a product item.
5
5
  * This DTO contains all the necessary information for the renewal process.
@@ -11,9 +11,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ProductRenewRequestDto = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
+ const class_validator_jsonschema_1 = require("class-validator-jsonschema");
14
15
  const class_transformer_1 = require("class-transformer");
15
- const client_data_dto_1 = require("../../client-data.dto");
16
16
  const product_item_data_dto_1 = require("../product-item-data.dto");
17
+ const client_data_dto_1 = require("../../client-data.dto");
17
18
  /**
18
19
  * Represents a request to renew a product item.
19
20
  * This DTO contains all the necessary information for the renewal process.
@@ -26,6 +27,11 @@ __decorate([
26
27
  (0, class_validator_1.IsObject)(),
27
28
  (0, class_validator_1.ValidateNested)(),
28
29
  (0, class_transformer_1.Type)(() => client_data_dto_1.ClientDataDto),
30
+ (0, class_validator_jsonschema_1.JSONSchema)({
31
+ title: 'Client Data',
32
+ description: 'The client\'s data for the request.',
33
+ $ref: '#/components/schemas/ClientDataDto',
34
+ }),
29
35
  __metadata("design:type", client_data_dto_1.ClientDataDto)
30
36
  ], ProductRenewRequestDto.prototype, "clientData", void 0);
31
37
  __decorate([
@@ -33,5 +39,10 @@ __decorate([
33
39
  (0, class_validator_1.IsObject)(),
34
40
  (0, class_validator_1.ValidateNested)(),
35
41
  (0, class_transformer_1.Type)(() => product_item_data_dto_1.ProductItemDataDto),
42
+ (0, class_validator_jsonschema_1.JSONSchema)({
43
+ title: 'Item Data',
44
+ description: 'The data of the product item to be renewed.',
45
+ $ref: '#/components/schemas/ProductItemDataDto',
46
+ }),
36
47
  __metadata("design:type", product_item_data_dto_1.ProductItemDataDto)
37
48
  ], ProductRenewRequestDto.prototype, "itemData", void 0);
@@ -1,5 +1,5 @@
1
- import { ClientDataDto } from '../../client-data.dto';
2
1
  import { ProductItemDataDto } from '../product-item-data.dto';
2
+ import { ClientDataDto } from '../../client-data.dto';
3
3
  /**
4
4
  * Represents a request to suspend a product item.
5
5
  * This DTO contains all the necessary information for the suspension process.
@@ -11,9 +11,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ProductSuspendRequestDto = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
+ const class_validator_jsonschema_1 = require("class-validator-jsonschema");
14
15
  const class_transformer_1 = require("class-transformer");
15
- const client_data_dto_1 = require("../../client-data.dto");
16
16
  const product_item_data_dto_1 = require("../product-item-data.dto");
17
+ const client_data_dto_1 = require("../../client-data.dto");
17
18
  /**
18
19
  * Represents a request to suspend a product item.
19
20
  * This DTO contains all the necessary information for the suspension process.
@@ -26,6 +27,11 @@ __decorate([
26
27
  (0, class_validator_1.IsObject)(),
27
28
  (0, class_validator_1.ValidateNested)(),
28
29
  (0, class_transformer_1.Type)(() => client_data_dto_1.ClientDataDto),
30
+ (0, class_validator_jsonschema_1.JSONSchema)({
31
+ title: 'Client Data',
32
+ description: 'The client\'s data for the request.',
33
+ $ref: '#/components/schemas/ClientDataDto',
34
+ }),
29
35
  __metadata("design:type", client_data_dto_1.ClientDataDto)
30
36
  ], ProductSuspendRequestDto.prototype, "clientData", void 0);
31
37
  __decorate([
@@ -33,5 +39,10 @@ __decorate([
33
39
  (0, class_validator_1.IsObject)(),
34
40
  (0, class_validator_1.ValidateNested)(),
35
41
  (0, class_transformer_1.Type)(() => product_item_data_dto_1.ProductItemDataDto),
42
+ (0, class_validator_jsonschema_1.JSONSchema)({
43
+ title: 'Item Data',
44
+ description: 'The data of the product item to be suspended.',
45
+ $ref: '#/components/schemas/ProductItemDataDto',
46
+ }),
36
47
  __metadata("design:type", product_item_data_dto_1.ProductItemDataDto)
37
48
  ], ProductSuspendRequestDto.prototype, "itemData", void 0);
@@ -1,5 +1,5 @@
1
- import { ClientDataDto } from '../../client-data.dto';
2
1
  import { ProductItemDataDto } from '../product-item-data.dto';
2
+ import { ClientDataDto } from '../../client-data.dto';
3
3
  /**
4
4
  * Represents a request to unsuspend a product item.
5
5
  * This DTO contains all the necessary information for the unsuspend process.
@@ -11,9 +11,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ProductUnsuspendRequestDto = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
+ const class_validator_jsonschema_1 = require("class-validator-jsonschema");
14
15
  const class_transformer_1 = require("class-transformer");
15
- const client_data_dto_1 = require("../../client-data.dto");
16
16
  const product_item_data_dto_1 = require("../product-item-data.dto");
17
+ const client_data_dto_1 = require("../../client-data.dto");
17
18
  /**
18
19
  * Represents a request to unsuspend a product item.
19
20
  * This DTO contains all the necessary information for the unsuspend process.
@@ -26,6 +27,11 @@ __decorate([
26
27
  (0, class_validator_1.IsObject)(),
27
28
  (0, class_validator_1.ValidateNested)(),
28
29
  (0, class_transformer_1.Type)(() => client_data_dto_1.ClientDataDto),
30
+ (0, class_validator_jsonschema_1.JSONSchema)({
31
+ title: 'Client Data',
32
+ description: 'The client\'s data for the request.',
33
+ $ref: '#/components/schemas/ClientDataDto',
34
+ }),
29
35
  __metadata("design:type", client_data_dto_1.ClientDataDto)
30
36
  ], ProductUnsuspendRequestDto.prototype, "clientData", void 0);
31
37
  __decorate([
@@ -33,5 +39,10 @@ __decorate([
33
39
  (0, class_validator_1.IsObject)(),
34
40
  (0, class_validator_1.ValidateNested)(),
35
41
  (0, class_transformer_1.Type)(() => product_item_data_dto_1.ProductItemDataDto),
42
+ (0, class_validator_jsonschema_1.JSONSchema)({
43
+ title: 'Item Data',
44
+ description: 'The data of the product item to be unsuspended.',
45
+ $ref: '#/components/schemas/ProductItemDataDto',
46
+ }),
36
47
  __metadata("design:type", product_item_data_dto_1.ProductItemDataDto)
37
48
  ], ProductUnsuspendRequestDto.prototype, "itemData", void 0);
@@ -1,5 +1,5 @@
1
- import { ClientDataDto } from '../../client-data.dto';
2
1
  import { ProductItemDataDto } from '../product-item-data.dto';
2
+ import { ClientDataDto } from '../../client-data.dto';
3
3
  /**
4
4
  * Represents a request to check if a product item is upgradable.
5
5
  * This DTO contains all the necessary information for the check.
@@ -11,9 +11,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ProductUpgradableRequestDto = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
+ const class_validator_jsonschema_1 = require("class-validator-jsonschema");
14
15
  const class_transformer_1 = require("class-transformer");
15
- const client_data_dto_1 = require("../../client-data.dto");
16
16
  const product_item_data_dto_1 = require("../product-item-data.dto");
17
+ const client_data_dto_1 = require("../../client-data.dto");
17
18
  /**
18
19
  * Represents a request to check if a product item is upgradable.
19
20
  * This DTO contains all the necessary information for the check.
@@ -26,6 +27,11 @@ __decorate([
26
27
  (0, class_validator_1.IsObject)(),
27
28
  (0, class_validator_1.ValidateNested)(),
28
29
  (0, class_transformer_1.Type)(() => client_data_dto_1.ClientDataDto),
30
+ (0, class_validator_jsonschema_1.JSONSchema)({
31
+ title: 'Client Data',
32
+ description: 'The client\'s data for the request.',
33
+ $ref: '#/components/schemas/ClientDataDto',
34
+ }),
29
35
  __metadata("design:type", client_data_dto_1.ClientDataDto)
30
36
  ], ProductUpgradableRequestDto.prototype, "clientData", void 0);
31
37
  __decorate([
@@ -33,5 +39,10 @@ __decorate([
33
39
  (0, class_validator_1.IsObject)(),
34
40
  (0, class_validator_1.ValidateNested)(),
35
41
  (0, class_transformer_1.Type)(() => product_item_data_dto_1.ProductItemDataDto),
42
+ (0, class_validator_jsonschema_1.JSONSchema)({
43
+ title: 'Item Data',
44
+ description: 'The data of the product item to be checked.',
45
+ $ref: '#/components/schemas/ProductItemDataDto',
46
+ }),
36
47
  __metadata("design:type", product_item_data_dto_1.ProductItemDataDto)
37
48
  ], ProductUpgradableRequestDto.prototype, "itemData", void 0);
@@ -1,5 +1,5 @@
1
- import { ClientDataDto } from '../../client-data.dto';
2
1
  import { ProductItemDataDto } from '../product-item-data.dto';
2
+ import { ClientDataDto } from '../../client-data.dto';
3
3
  /**
4
4
  * Represents a request to upgrade a product item.
5
5
  * This DTO contains all the necessary information for the upgrade process.
@@ -11,9 +11,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ProductUpgradeRequestDto = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
+ const class_validator_jsonschema_1 = require("class-validator-jsonschema");
14
15
  const class_transformer_1 = require("class-transformer");
15
- const client_data_dto_1 = require("../../client-data.dto");
16
16
  const product_item_data_dto_1 = require("../product-item-data.dto");
17
+ const client_data_dto_1 = require("../../client-data.dto");
17
18
  /**
18
19
  * Represents a request to upgrade a product item.
19
20
  * This DTO contains all the necessary information for the upgrade process.
@@ -26,6 +27,11 @@ __decorate([
26
27
  (0, class_validator_1.IsObject)(),
27
28
  (0, class_validator_1.ValidateNested)(),
28
29
  (0, class_transformer_1.Type)(() => client_data_dto_1.ClientDataDto),
30
+ (0, class_validator_jsonschema_1.JSONSchema)({
31
+ title: 'Client Data',
32
+ description: 'The client\'s data for the request.',
33
+ $ref: '#/components/schemas/ClientDataDto',
34
+ }),
29
35
  __metadata("design:type", client_data_dto_1.ClientDataDto)
30
36
  ], ProductUpgradeRequestDto.prototype, "clientData", void 0);
31
37
  __decorate([
@@ -33,6 +39,11 @@ __decorate([
33
39
  (0, class_validator_1.IsObject)(),
34
40
  (0, class_validator_1.ValidateNested)(),
35
41
  (0, class_transformer_1.Type)(() => product_item_data_dto_1.ProductItemDataDto),
42
+ (0, class_validator_jsonschema_1.JSONSchema)({
43
+ title: 'Item Data',
44
+ description: 'The data of the product item to be upgraded.',
45
+ $ref: '#/components/schemas/ProductItemDataDto',
46
+ }),
36
47
  __metadata("design:type", product_item_data_dto_1.ProductItemDataDto)
37
48
  ], ProductUpgradeRequestDto.prototype, "itemData", void 0);
38
49
  __decorate([
@@ -40,5 +51,10 @@ __decorate([
40
51
  (0, class_validator_1.IsObject)(),
41
52
  (0, class_validator_1.ValidateNested)(),
42
53
  (0, class_transformer_1.Type)(() => product_item_data_dto_1.ProductItemDataDto),
54
+ (0, class_validator_jsonschema_1.JSONSchema)({
55
+ title: 'Previous Item Data',
56
+ description: 'The data of the product item before the upgrade.',
57
+ $ref: '#/components/schemas/ProductItemDataDto',
58
+ }),
43
59
  __metadata("design:type", product_item_data_dto_1.ProductItemDataDto)
44
60
  ], ProductUpgradeRequestDto.prototype, "previousItemData", void 0);
@@ -1,7 +1,18 @@
1
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
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
3
12
  exports.ProductCreateResponseDto = void 0;
13
+ const response_status_enum_1 = require("../../../enums/response-status.enum");
4
14
  const base_response_dto_1 = require("../../base-response.dto");
15
+ const class_validator_jsonschema_1 = require("class-validator-jsonschema");
5
16
  /**
6
17
  * Represents the response after attempting to create a product.
7
18
  * It confirms the status of the creation operation.
@@ -9,3 +20,29 @@ const base_response_dto_1 = require("../../base-response.dto");
9
20
  class ProductCreateResponseDto extends base_response_dto_1.BaseResponse {
10
21
  }
11
22
  exports.ProductCreateResponseDto = ProductCreateResponseDto;
23
+ __decorate([
24
+ (0, class_validator_jsonschema_1.JSONSchema)({
25
+ title: 'Status',
26
+ description: 'The status of the response, indicating the outcome of the creation.',
27
+ type: 'string',
28
+ enum: Object.values(response_status_enum_1.ResponseStatusEnum),
29
+ }),
30
+ __metadata("design:type", String)
31
+ ], ProductCreateResponseDto.prototype, "status", void 0);
32
+ __decorate([
33
+ (0, class_validator_jsonschema_1.JSONSchema)({
34
+ title: 'Item ID',
35
+ description: 'The unique identifier of the product item that was created.',
36
+ type: 'string',
37
+ }),
38
+ __metadata("design:type", String)
39
+ ], ProductCreateResponseDto.prototype, "itemId", void 0);
40
+ __decorate([
41
+ (0, class_validator_jsonschema_1.JSONSchema)({
42
+ title: 'Data',
43
+ description: 'Optional data associated with the creation response.',
44
+ type: 'object',
45
+ additionalProperties: true,
46
+ }),
47
+ __metadata("design:type", Object)
48
+ ], ProductCreateResponseDto.prototype, "data", void 0);
@@ -1,7 +1,18 @@
1
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
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
3
12
  exports.ProductDeleteResponseDto = void 0;
13
+ const response_status_enum_1 = require("../../../enums/response-status.enum");
4
14
  const base_response_dto_1 = require("../../base-response.dto");
15
+ const class_validator_jsonschema_1 = require("class-validator-jsonschema");
5
16
  /**
6
17
  * Represents the response after attempting to delete a product.
7
18
  * It confirms the status of the deletion operation.
@@ -9,3 +20,29 @@ const base_response_dto_1 = require("../../base-response.dto");
9
20
  class ProductDeleteResponseDto extends base_response_dto_1.BaseResponse {
10
21
  }
11
22
  exports.ProductDeleteResponseDto = ProductDeleteResponseDto;
23
+ __decorate([
24
+ (0, class_validator_jsonschema_1.JSONSchema)({
25
+ title: 'Status',
26
+ description: 'The status of the response, indicating the outcome of the deletion.',
27
+ type: 'string',
28
+ enum: Object.values(response_status_enum_1.ResponseStatusEnum),
29
+ }),
30
+ __metadata("design:type", String)
31
+ ], ProductDeleteResponseDto.prototype, "status", void 0);
32
+ __decorate([
33
+ (0, class_validator_jsonschema_1.JSONSchema)({
34
+ title: 'Item ID',
35
+ description: 'The unique identifier of the product item that was deleted.',
36
+ type: 'string',
37
+ }),
38
+ __metadata("design:type", String)
39
+ ], ProductDeleteResponseDto.prototype, "itemId", void 0);
40
+ __decorate([
41
+ (0, class_validator_jsonschema_1.JSONSchema)({
42
+ title: 'Data',
43
+ description: 'Optional data associated with the deletion response.',
44
+ type: 'object',
45
+ additionalProperties: true,
46
+ }),
47
+ __metadata("design:type", Object)
48
+ ], ProductDeleteResponseDto.prototype, "data", void 0);
@@ -1,7 +1,18 @@
1
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
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
3
12
  exports.ProductDowngradableResponseDto = void 0;
13
+ const response_status_enum_1 = require("../../../enums/response-status.enum");
4
14
  const base_response_dto_1 = require("../../base-response.dto");
15
+ const class_validator_jsonschema_1 = require("class-validator-jsonschema");
5
16
  /**
6
17
  * Represents the response for a product Downgradable check.
7
18
  * It indicates whether a product item is Downgradable and may contain additional data.
@@ -9,3 +20,29 @@ const base_response_dto_1 = require("../../base-response.dto");
9
20
  class ProductDowngradableResponseDto extends base_response_dto_1.BaseResponse {
10
21
  }
11
22
  exports.ProductDowngradableResponseDto = ProductDowngradableResponseDto;
23
+ __decorate([
24
+ (0, class_validator_jsonschema_1.JSONSchema)({
25
+ title: 'Status',
26
+ description: 'The status of the response, indicating success or failure.',
27
+ type: 'string',
28
+ enum: Object.values(response_status_enum_1.ResponseStatusEnum),
29
+ }),
30
+ __metadata("design:type", String)
31
+ ], ProductDowngradableResponseDto.prototype, "status", void 0);
32
+ __decorate([
33
+ (0, class_validator_jsonschema_1.JSONSchema)({
34
+ title: 'Item ID',
35
+ description: 'The unique identifier of the product item being checked.',
36
+ type: 'string',
37
+ }),
38
+ __metadata("design:type", String)
39
+ ], ProductDowngradableResponseDto.prototype, "itemId", void 0);
40
+ __decorate([
41
+ (0, class_validator_jsonschema_1.JSONSchema)({
42
+ title: 'Data',
43
+ description: 'Optional data associated with the downgradable check.',
44
+ type: 'object',
45
+ additionalProperties: true,
46
+ }),
47
+ __metadata("design:type", Object)
48
+ ], ProductDowngradableResponseDto.prototype, "data", void 0);
@@ -1,7 +1,18 @@
1
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
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
3
12
  exports.ProductDowngradeResponseDto = void 0;
13
+ const response_status_enum_1 = require("../../../enums/response-status.enum");
4
14
  const base_response_dto_1 = require("../../base-response.dto");
15
+ const class_validator_jsonschema_1 = require("class-validator-jsonschema");
5
16
  /**
6
17
  * Represents the response after attempting to downgrade a product.
7
18
  * It confirms the status of the downgrade operation.
@@ -9,3 +20,29 @@ const base_response_dto_1 = require("../../base-response.dto");
9
20
  class ProductDowngradeResponseDto extends base_response_dto_1.BaseResponse {
10
21
  }
11
22
  exports.ProductDowngradeResponseDto = ProductDowngradeResponseDto;
23
+ __decorate([
24
+ (0, class_validator_jsonschema_1.JSONSchema)({
25
+ title: 'Status',
26
+ description: 'The status of the response, indicating the outcome of the downgrade.',
27
+ type: 'string',
28
+ enum: Object.values(response_status_enum_1.ResponseStatusEnum),
29
+ }),
30
+ __metadata("design:type", String)
31
+ ], ProductDowngradeResponseDto.prototype, "status", void 0);
32
+ __decorate([
33
+ (0, class_validator_jsonschema_1.JSONSchema)({
34
+ title: 'Item ID',
35
+ description: 'The unique identifier of the product item that was downgraded.',
36
+ type: 'string',
37
+ }),
38
+ __metadata("design:type", String)
39
+ ], ProductDowngradeResponseDto.prototype, "itemId", void 0);
40
+ __decorate([
41
+ (0, class_validator_jsonschema_1.JSONSchema)({
42
+ title: 'Data',
43
+ description: 'Optional data associated with the downgrade response.',
44
+ type: 'object',
45
+ additionalProperties: true,
46
+ }),
47
+ __metadata("design:type", Object)
48
+ ], ProductDowngradeResponseDto.prototype, "data", void 0);
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ProductInfoResponseDto = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
14
  const class_validator_1 = require("class-validator");
15
+ const class_validator_jsonschema_1 = require("class-validator-jsonschema");
15
16
  const base_response_dto_1 = require("../../base-response.dto");
16
17
  const product_info_dto_1 = require("../product-info.dto");
17
18
  /**
@@ -24,5 +25,10 @@ exports.ProductInfoResponseDto = ProductInfoResponseDto;
24
25
  __decorate([
25
26
  (0, class_validator_1.ValidateNested)(),
26
27
  (0, class_transformer_1.Type)(() => product_info_dto_1.ProductInfoDto),
28
+ (0, class_validator_jsonschema_1.JSONSchema)({
29
+ title: 'Info',
30
+ description: 'The detailed information of the product.',
31
+ type: 'object',
32
+ }),
27
33
  __metadata("design:type", product_info_dto_1.ProductInfoDto)
28
34
  ], ProductInfoResponseDto.prototype, "info", void 0);
@@ -1,7 +1,18 @@
1
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
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
3
12
  exports.ProductRenewResponseDto = void 0;
13
+ const response_status_enum_1 = require("../../../enums/response-status.enum");
4
14
  const base_response_dto_1 = require("../../base-response.dto");
15
+ const class_validator_jsonschema_1 = require("class-validator-jsonschema");
5
16
  /**
6
17
  * Represents the response after attempting to renew a product.
7
18
  * It confirms the status of the renewal operation.
@@ -9,3 +20,29 @@ const base_response_dto_1 = require("../../base-response.dto");
9
20
  class ProductRenewResponseDto extends base_response_dto_1.BaseResponse {
10
21
  }
11
22
  exports.ProductRenewResponseDto = ProductRenewResponseDto;
23
+ __decorate([
24
+ (0, class_validator_jsonschema_1.JSONSchema)({
25
+ title: 'Status',
26
+ description: 'The status of the response, indicating the outcome of the renewal.',
27
+ type: 'string',
28
+ enum: Object.values(response_status_enum_1.ResponseStatusEnum),
29
+ }),
30
+ __metadata("design:type", String)
31
+ ], ProductRenewResponseDto.prototype, "status", void 0);
32
+ __decorate([
33
+ (0, class_validator_jsonschema_1.JSONSchema)({
34
+ title: 'Item ID',
35
+ description: 'The unique identifier of the product item that was renewed.',
36
+ type: 'string',
37
+ }),
38
+ __metadata("design:type", String)
39
+ ], ProductRenewResponseDto.prototype, "itemId", void 0);
40
+ __decorate([
41
+ (0, class_validator_jsonschema_1.JSONSchema)({
42
+ title: 'Data',
43
+ description: 'Optional data associated with the renewal response.',
44
+ type: 'object',
45
+ additionalProperties: true,
46
+ }),
47
+ __metadata("design:type", Object)
48
+ ], ProductRenewResponseDto.prototype, "data", void 0);
@@ -1,7 +1,18 @@
1
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
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
3
12
  exports.ProductSuspendResponseDto = void 0;
13
+ const response_status_enum_1 = require("../../../enums/response-status.enum");
4
14
  const base_response_dto_1 = require("../../base-response.dto");
15
+ const class_validator_jsonschema_1 = require("class-validator-jsonschema");
5
16
  /**
6
17
  * Represents the response after attempting to suspend a product.
7
18
  * It confirms the status of the suspend operation.
@@ -9,3 +20,29 @@ const base_response_dto_1 = require("../../base-response.dto");
9
20
  class ProductSuspendResponseDto extends base_response_dto_1.BaseResponse {
10
21
  }
11
22
  exports.ProductSuspendResponseDto = ProductSuspendResponseDto;
23
+ __decorate([
24
+ (0, class_validator_jsonschema_1.JSONSchema)({
25
+ title: 'Status',
26
+ description: 'The status of the response, indicating the outcome of the suspend operation.',
27
+ type: 'string',
28
+ enum: Object.values(response_status_enum_1.ResponseStatusEnum),
29
+ }),
30
+ __metadata("design:type", String)
31
+ ], ProductSuspendResponseDto.prototype, "status", void 0);
32
+ __decorate([
33
+ (0, class_validator_jsonschema_1.JSONSchema)({
34
+ title: 'Item ID',
35
+ description: 'The unique identifier of the product item that was suspended.',
36
+ type: 'string',
37
+ }),
38
+ __metadata("design:type", String)
39
+ ], ProductSuspendResponseDto.prototype, "itemId", void 0);
40
+ __decorate([
41
+ (0, class_validator_jsonschema_1.JSONSchema)({
42
+ title: 'Data',
43
+ description: 'Optional data associated with the suspend response.',
44
+ type: 'object',
45
+ additionalProperties: true,
46
+ }),
47
+ __metadata("design:type", Object)
48
+ ], ProductSuspendResponseDto.prototype, "data", void 0);
@@ -1,7 +1,18 @@
1
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
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
3
12
  exports.ProductUnsuspendResponseDto = void 0;
13
+ const response_status_enum_1 = require("../../../enums/response-status.enum");
4
14
  const base_response_dto_1 = require("../../base-response.dto");
15
+ const class_validator_jsonschema_1 = require("class-validator-jsonschema");
5
16
  /**
6
17
  * Represents the response after attempting to unsuspend a product.
7
18
  * It confirms the status of the unsuspend operation.
@@ -9,3 +20,29 @@ const base_response_dto_1 = require("../../base-response.dto");
9
20
  class ProductUnsuspendResponseDto extends base_response_dto_1.BaseResponse {
10
21
  }
11
22
  exports.ProductUnsuspendResponseDto = ProductUnsuspendResponseDto;
23
+ __decorate([
24
+ (0, class_validator_jsonschema_1.JSONSchema)({
25
+ title: 'Status',
26
+ description: 'The status of the response, indicating the outcome of the unsuspend operation.',
27
+ type: 'string',
28
+ enum: Object.values(response_status_enum_1.ResponseStatusEnum),
29
+ }),
30
+ __metadata("design:type", String)
31
+ ], ProductUnsuspendResponseDto.prototype, "status", void 0);
32
+ __decorate([
33
+ (0, class_validator_jsonschema_1.JSONSchema)({
34
+ title: 'Item ID',
35
+ description: 'The unique identifier of the product item that was unsuspended.',
36
+ type: 'string',
37
+ }),
38
+ __metadata("design:type", String)
39
+ ], ProductUnsuspendResponseDto.prototype, "itemId", void 0);
40
+ __decorate([
41
+ (0, class_validator_jsonschema_1.JSONSchema)({
42
+ title: 'Data',
43
+ description: 'Optional data associated with the unsuspend response.',
44
+ type: 'object',
45
+ additionalProperties: true,
46
+ }),
47
+ __metadata("design:type", Object)
48
+ ], ProductUnsuspendResponseDto.prototype, "data", void 0);