@hosterai/types 0.0.26 → 0.0.28
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.
- package/README.md +49 -8
- package/dist/dtos/attachment.dto.js +17 -0
- package/dist/dtos/attribute-field.dto.d.ts +9 -10
- package/dist/dtos/attribute-field.dto.js +28 -38
- package/dist/dtos/base-response.dto.js +11 -0
- package/dist/dtos/client-data.dto.js +82 -0
- package/dist/dtos/company-data.dto.js +97 -0
- package/dist/dtos/country.dto.js +17 -0
- package/dist/dtos/error-response.dto.js +15 -0
- package/dist/dtos/field.dto.d.ts +17 -1
- package/dist/dtos/field.dto.js +41 -10
- package/dist/dtos/info.dto.d.ts +0 -6
- package/dist/dtos/info.dto.js +0 -24
- package/dist/dtos/invoice/invoice-item-data.dto.js +7 -0
- package/dist/dtos/invoice/requests/credit-note-request.dto.js +6 -0
- package/dist/dtos/invoice/requests/invoice-request.dto.js +6 -0
- package/dist/dtos/invoice/requests/proforma-invoice-request.dto.d.ts +3 -0
- package/dist/dtos/invoice/requests/proforma-invoice-request.dto.js +51 -3
- package/dist/dtos/invoice/requests/tax-details-request.dto.d.ts +31 -0
- package/dist/dtos/invoice/requests/tax-details-request.dto.js +84 -0
- package/dist/dtos/invoice/responses/proforma-invoice-response.dto.js +17 -0
- package/dist/dtos/invoice/responses/tax-details-response.dto.d.ts +20 -0
- package/dist/dtos/invoice/responses/tax-details-response.dto.js +56 -0
- package/dist/dtos/invoice/tin-validation-details.dto.d.ts +51 -0
- package/dist/dtos/invoice/tin-validation-details.dto.js +165 -0
- package/dist/dtos/invoice/transaction-data.dto.js +22 -0
- package/dist/dtos/invoice-contact-data.dto.js +102 -0
- package/dist/dtos/item-data.dto.d.ts +2 -2
- package/dist/dtos/item-data.dto.js +63 -2
- package/dist/dtos/jwt.dto.js +27 -0
- package/dist/dtos/multilang-text.dto.js +12 -0
- package/dist/dtos/notification/receiver/receiver-email.dto.js +19 -0
- package/dist/dtos/notification/receiver/receiver-sms.dto.js +7 -0
- package/dist/dtos/notification/requests/notification-send-request.dto.d.ts +3 -3
- package/dist/dtos/notification/requests/notification-send-request.dto.js +27 -3
- package/dist/dtos/notification/responses/notification-send-response.dto.js +6 -0
- package/dist/dtos/notification/sender/sender-email.dto.js +26 -0
- package/dist/dtos/notification/sender/sender-push.dto.js +36 -0
- package/dist/dtos/notification/sender/sender-sms.dto.js +11 -0
- package/dist/dtos/product/product-info.dto.d.ts +4 -4
- package/dist/dtos/product/product-info.dto.js +7 -7
- package/dist/dtos/product/product-item-data.dto.d.ts +1 -1
- package/dist/dtos/product/product-item-data.dto.js +8 -1
- package/dist/dtos/product/requests/product-create-request.dto.d.ts +1 -1
- package/dist/dtos/product/requests/product-create-request.dto.js +12 -1
- package/dist/dtos/product/requests/product-delete-request.dto.d.ts +1 -1
- package/dist/dtos/product/requests/product-delete-request.dto.js +12 -1
- package/dist/dtos/product/requests/product-downgradable-request.dto.d.ts +1 -1
- package/dist/dtos/product/requests/product-downgradable-request.dto.js +12 -1
- package/dist/dtos/product/requests/product-downgrade-request.dto.d.ts +1 -1
- package/dist/dtos/product/requests/product-downgrade-request.dto.js +17 -1
- package/dist/dtos/product/requests/product-downgradeable-request.dto.d.ts +18 -0
- package/dist/dtos/product/requests/product-downgradeable-request.dto.js +37 -0
- package/dist/dtos/product/requests/product-renew-request.dto.d.ts +1 -1
- package/dist/dtos/product/requests/product-renew-request.dto.js +12 -1
- package/dist/dtos/product/requests/product-suspend-request.dto.d.ts +1 -1
- package/dist/dtos/product/requests/product-suspend-request.dto.js +12 -1
- package/dist/dtos/product/requests/product-unsuspend-request.dto.d.ts +1 -1
- package/dist/dtos/product/requests/product-unsuspend-request.dto.js +12 -1
- package/dist/dtos/product/requests/product-upgradable-request.dto.d.ts +1 -1
- package/dist/dtos/product/requests/product-upgradable-request.dto.js +12 -1
- package/dist/dtos/product/requests/product-upgrade-request.dto.d.ts +1 -1
- package/dist/dtos/product/requests/product-upgrade-request.dto.js +17 -1
- package/dist/dtos/product/requests/product-upgradeable-request.dto.d.ts +18 -0
- package/dist/dtos/product/requests/product-upgradeable-request.dto.js +37 -0
- package/dist/dtos/product/responses/product-create-response.dto.js +37 -0
- package/dist/dtos/product/responses/product-delete-response.dto.js +37 -0
- package/dist/dtos/product/responses/product-downgradable-response.dto.js +37 -0
- package/dist/dtos/product/responses/product-downgrade-response.dto.js +37 -0
- package/dist/dtos/product/responses/product-downgradeable-response.dto.d.ts +22 -0
- package/dist/dtos/product/responses/product-downgradeable-response.dto.js +11 -0
- package/dist/dtos/product/responses/product-info-response.dto.js +6 -0
- package/dist/dtos/product/responses/product-renew-response.dto.js +37 -0
- package/dist/dtos/product/responses/product-suspend-response.dto.js +37 -0
- package/dist/dtos/product/responses/product-unsuspend-response.dto.js +37 -0
- package/dist/dtos/product/responses/product-upgradable-response.dto.js +37 -0
- package/dist/dtos/product/responses/product-upgrade-response.dto.js +37 -0
- package/dist/dtos/product/responses/product-upgradeable-response.dto.d.ts +22 -0
- package/dist/dtos/product/responses/product-upgradeable-response.dto.js +11 -0
- package/dist/dtos/requests/validate-attributes-request.dto.js +12 -0
- package/dist/dtos/response-data.dto.js +19 -0
- package/dist/dtos/responses/validate-attributes-response.dto.js +7 -0
- package/dist/dtos/setup-status-response.dto.js +20 -0
- package/dist/enums/events.enum.d.ts +3 -0
- package/dist/enums/events.enum.js +3 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +24 -0
- package/dist/openapi/schemas/components.schemas.d.ts +155 -40
- package/dist/openapi/schemas/components.schemas.js +187 -96
- package/dist/validators/addon-field-validator.d.ts +9 -0
- package/dist/validators/addon-field-validator.js +14 -0
- package/dist/validators/addon-field-validator.spec.d.ts +1 -0
- package/dist/validators/addon-field-validator.spec.js +38 -0
- package/dist/validators/attachment-validator.d.ts +8 -0
- package/dist/validators/attachment-validator.js +17 -0
- package/dist/validators/attachment-validator.spec.d.ts +1 -0
- package/dist/validators/attachment-validator.spec.js +58 -0
- package/dist/validators/attribute-field-validator.d.ts +8 -0
- package/dist/validators/attribute-field-validator.js +17 -0
- package/dist/validators/attribute-field-validator.spec.d.ts +1 -0
- package/dist/validators/attribute-field-validator.spec.js +84 -0
- package/dist/validators/country-validator.d.ts +8 -0
- package/dist/validators/country-validator.js +17 -0
- package/dist/validators/country-validator.spec.d.ts +1 -0
- package/dist/validators/country-validator.spec.js +58 -0
- package/dist/validators/field-validator.spec.js +1 -29
- package/dist/validators/info-validator.d.ts +8 -0
- package/dist/validators/info-validator.js +17 -0
- package/dist/validators/info-validator.spec.d.ts +1 -0
- package/dist/validators/info-validator.spec.js +85 -0
- package/dist/validators/invoice-contact-data-validator.d.ts +8 -0
- package/dist/validators/invoice-contact-data-validator.js +17 -0
- package/dist/validators/invoice-contact-data-validator.spec.d.ts +1 -0
- package/dist/validators/invoice-contact-data-validator.spec.js +88 -0
- package/dist/validators/invoice-info-validator.d.ts +8 -0
- package/dist/validators/invoice-info-validator.js +17 -0
- package/dist/validators/invoice-info-validator.spec.d.ts +1 -0
- package/dist/validators/invoice-info-validator.spec.js +81 -0
- package/dist/validators/invoice-item-data-validator.d.ts +8 -0
- package/dist/validators/invoice-item-data-validator.js +17 -0
- package/dist/validators/invoice-item-data-validator.spec.d.ts +1 -0
- package/dist/validators/invoice-item-data-validator.spec.js +45 -0
- package/dist/validators/item-data-validator.d.ts +8 -0
- package/dist/validators/item-data-validator.js +17 -0
- package/dist/validators/item-data-validator.spec.d.ts +1 -0
- package/dist/validators/item-data-validator.spec.js +79 -0
- package/dist/validators/notification-request-validator.js +1 -1
- package/dist/validators/product-create-request-validator.js +1 -1
- package/dist/validators/product-delete-request-validator.js +1 -1
- package/dist/validators/product-downgradable-request-validator.js +1 -1
- package/dist/validators/product-downgrade-request-validator.js +1 -1
- package/dist/validators/product-downgradeable-request-validator.d.ts +8 -0
- package/dist/validators/product-downgradeable-request-validator.js +17 -0
- package/dist/validators/product-info-validator.spec.js +5 -1
- package/dist/validators/product-item-data-validator.d.ts +8 -0
- package/dist/validators/product-item-data-validator.js +17 -0
- package/dist/validators/product-item-data-validator.spec.d.ts +1 -0
- package/dist/validators/product-item-data-validator.spec.js +60 -0
- package/dist/validators/product-renew-request-validator.js +1 -1
- package/dist/validators/product-suspend-request-validator.js +1 -1
- package/dist/validators/product-unsuspend-request-validator.js +1 -1
- package/dist/validators/product-upgradable-request-validator.js +1 -1
- package/dist/validators/product-upgrade-request-validator.js +1 -1
- package/dist/validators/product-upgradeable-request-validator.d.ts +8 -0
- package/dist/validators/product-upgradeable-request-validator.js +17 -0
- package/dist/validators/tab-validator.d.ts +8 -0
- package/dist/validators/tab-validator.js +17 -0
- package/dist/validators/tab-validator.spec.d.ts +1 -0
- package/dist/validators/tab-validator.spec.js +49 -0
- package/dist/validators/tin-validation-details-validator.d.ts +8 -0
- package/dist/validators/tin-validation-details-validator.js +17 -0
- package/dist/validators/tin-validation-details-validator.spec.d.ts +1 -0
- package/dist/validators/tin-validation-details-validator.spec.js +77 -0
- package/dist/validators/transaction-data-validator.d.ts +8 -0
- package/dist/validators/transaction-data-validator.js +17 -0
- package/dist/validators/transaction-data-validator.spec.d.ts +1 -0
- package/dist/validators/transaction-data-validator.spec.js +62 -0
- package/package.json +1 -1
- package/dist/dtos/info/info-notification.dto.d.ts +0 -5
- package/dist/dtos/info/info-notification.dto.js +0 -7
- package/dist/dtos/info/info.dto.d.ts +0 -196
- package/dist/dtos/info/info.dto.js +0 -278
- package/dist/dtos/notification/notification-request.dto.d.ts +0 -20
- package/dist/dtos/notification/notification-request.dto.js +0 -31
- package/dist/dtos/receiver/receiver-email.dto.d.ts +0 -20
- package/dist/dtos/receiver/receiver-email.dto.js +0 -39
- package/dist/dtos/receiver/receiver-push.dto.d.ts +0 -15
- package/dist/dtos/receiver/receiver-push.dto.js +0 -31
- package/dist/dtos/receiver/receiver-sms.dto.d.ts +0 -11
- package/dist/dtos/receiver/receiver-sms.dto.js +0 -26
- package/dist/dtos/request.dto.d.ts +0 -20
- package/dist/dtos/request.dto.js +0 -31
- package/dist/dtos/sender/sender-email.dto.d.ts +0 -25
- package/dist/dtos/sender/sender-email.dto.js +0 -46
- package/dist/dtos/sender/sender-push.dto.d.ts +0 -31
- package/dist/dtos/sender/sender-push.dto.js +0 -50
- package/dist/dtos/sender/sender-sms.dto.d.ts +0 -15
- package/dist/dtos/sender/sender-sms.dto.js +0 -30
- package/dist/enums/message-type.enum.d.ts +0 -5
- package/dist/enums/message-type.enum.js +0 -9
|
@@ -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);
|
|
@@ -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);
|
|
@@ -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);
|
|
@@ -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);
|
|
@@ -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);
|
|
@@ -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;
|
|
@@ -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);
|