@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.
- 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-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/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-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/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/index.d.ts +24 -0
- package/dist/index.js +24 -0
- package/dist/openapi/schemas/components.schemas.d.ts +152 -37
- package/dist/openapi/schemas/components.schemas.js +178 -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-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/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/jwt.dto.js
CHANGED
|
@@ -13,6 +13,7 @@ exports.JwtDto = void 0;
|
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
15
|
const roles_enum_1 = require("../enums/roles.enum");
|
|
16
|
+
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
16
17
|
/**
|
|
17
18
|
* DTO for the JWT payload.
|
|
18
19
|
* This defines the structure of the data contained within the JWT.
|
|
@@ -22,21 +23,42 @@ class JwtPayloadDto {
|
|
|
22
23
|
__decorate([
|
|
23
24
|
(0, class_validator_1.IsString)(),
|
|
24
25
|
(0, class_validator_1.IsNotEmpty)(),
|
|
26
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
27
|
+
title: 'Integration ID',
|
|
28
|
+
description: 'The unique identifier for the integration.',
|
|
29
|
+
type: 'string',
|
|
30
|
+
}),
|
|
25
31
|
__metadata("design:type", String)
|
|
26
32
|
], JwtPayloadDto.prototype, "integrationId", void 0);
|
|
27
33
|
__decorate([
|
|
28
34
|
(0, class_validator_1.IsString)(),
|
|
29
35
|
(0, class_validator_1.IsOptional)(),
|
|
36
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
37
|
+
title: 'User ID',
|
|
38
|
+
description: 'The unique identifier for the user who triggered the API call.',
|
|
39
|
+
type: 'string',
|
|
40
|
+
}),
|
|
30
41
|
__metadata("design:type", String)
|
|
31
42
|
], JwtPayloadDto.prototype, "userId", void 0);
|
|
32
43
|
__decorate([
|
|
33
44
|
(0, class_validator_1.IsString)(),
|
|
34
45
|
(0, class_validator_1.IsNotEmpty)(),
|
|
46
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
47
|
+
title: 'Company ID',
|
|
48
|
+
description: 'The unique identifier for the company.',
|
|
49
|
+
type: 'string',
|
|
50
|
+
}),
|
|
35
51
|
__metadata("design:type", String)
|
|
36
52
|
], JwtPayloadDto.prototype, "companyId", void 0);
|
|
37
53
|
__decorate([
|
|
38
54
|
(0, class_validator_1.IsArray)(),
|
|
39
55
|
(0, class_validator_1.IsEnum)(roles_enum_1.RolesEnum, { each: true }),
|
|
56
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
57
|
+
title: 'Accepted Roles',
|
|
58
|
+
description: 'The roles accepted by the company for this integration.',
|
|
59
|
+
type: 'array',
|
|
60
|
+
items: { type: 'string', enum: Object.values(roles_enum_1.RolesEnum) },
|
|
61
|
+
}),
|
|
40
62
|
__metadata("design:type", Array)
|
|
41
63
|
], JwtPayloadDto.prototype, "acceptedRoles", void 0);
|
|
42
64
|
/**
|
|
@@ -50,5 +72,10 @@ __decorate([
|
|
|
50
72
|
(0, class_validator_1.ValidateNested)(),
|
|
51
73
|
(0, class_transformer_1.Type)(() => JwtPayloadDto),
|
|
52
74
|
(0, class_validator_1.IsDefined)(),
|
|
75
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
76
|
+
title: 'JWT',
|
|
77
|
+
description: 'The JWT payload containing user and company information.',
|
|
78
|
+
$ref: '#/components/schemas/JwtPayloadDto',
|
|
79
|
+
}),
|
|
53
80
|
__metadata("design:type", JwtPayloadDto)
|
|
54
81
|
], JwtDto.prototype, "jwt", void 0);
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.MultilangTextDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const language_enum_1 = require("../enums/language.enum");
|
|
15
|
+
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
15
16
|
/**
|
|
16
17
|
* DTO for multilingual text.
|
|
17
18
|
* Used for providing text in multiple languages.
|
|
@@ -22,10 +23,21 @@ exports.MultilangTextDto = MultilangTextDto;
|
|
|
22
23
|
__decorate([
|
|
23
24
|
(0, class_validator_1.IsEnum)(language_enum_1.LanguageEnum),
|
|
24
25
|
(0, class_validator_1.IsDefined)(),
|
|
26
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
27
|
+
title: 'Language',
|
|
28
|
+
description: 'The language of the text.',
|
|
29
|
+
type: 'string',
|
|
30
|
+
enum: Object.values(language_enum_1.LanguageEnum),
|
|
31
|
+
}),
|
|
25
32
|
__metadata("design:type", String)
|
|
26
33
|
], MultilangTextDto.prototype, "language", void 0);
|
|
27
34
|
__decorate([
|
|
28
35
|
(0, class_validator_1.IsString)(),
|
|
29
36
|
(0, class_validator_1.IsNotEmpty)(),
|
|
37
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
38
|
+
title: 'Text',
|
|
39
|
+
description: 'The text content in the specified language.',
|
|
40
|
+
type: 'string',
|
|
41
|
+
}),
|
|
30
42
|
__metadata("design:type", String)
|
|
31
43
|
], MultilangTextDto.prototype, "text", void 0);
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.EmailReceiverDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
+
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
14
15
|
/**
|
|
15
16
|
* DTO for email recipients
|
|
16
17
|
* Used to define the recipients of an email
|
|
@@ -21,6 +22,12 @@ exports.EmailReceiverDto = EmailReceiverDto;
|
|
|
21
22
|
__decorate([
|
|
22
23
|
(0, class_validator_1.IsNotEmpty)(),
|
|
23
24
|
(0, class_validator_1.IsEmail)(),
|
|
25
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
26
|
+
title: 'To',
|
|
27
|
+
description: 'The main email address.',
|
|
28
|
+
type: 'string',
|
|
29
|
+
format: 'email',
|
|
30
|
+
}),
|
|
24
31
|
__metadata("design:type", String)
|
|
25
32
|
], EmailReceiverDto.prototype, "to", void 0);
|
|
26
33
|
__decorate([
|
|
@@ -28,6 +35,12 @@ __decorate([
|
|
|
28
35
|
(0, class_validator_1.IsArray)(),
|
|
29
36
|
(0, class_validator_1.IsEmail)({}, { each: true }),
|
|
30
37
|
(0, class_validator_1.ArrayUnique)(),
|
|
38
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
39
|
+
title: 'CC',
|
|
40
|
+
description: 'List of email addresses for carbon copy.',
|
|
41
|
+
type: 'array',
|
|
42
|
+
items: { type: 'string', format: 'email' },
|
|
43
|
+
}),
|
|
31
44
|
__metadata("design:type", Array)
|
|
32
45
|
], EmailReceiverDto.prototype, "cc", void 0);
|
|
33
46
|
__decorate([
|
|
@@ -35,5 +48,11 @@ __decorate([
|
|
|
35
48
|
(0, class_validator_1.IsArray)(),
|
|
36
49
|
(0, class_validator_1.IsEmail)({}, { each: true }),
|
|
37
50
|
(0, class_validator_1.ArrayUnique)(),
|
|
51
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
52
|
+
title: 'BCC',
|
|
53
|
+
description: 'List of email addresses for blind carbon copy.',
|
|
54
|
+
type: 'array',
|
|
55
|
+
items: { type: 'string', format: 'email' },
|
|
56
|
+
}),
|
|
38
57
|
__metadata("design:type", Array)
|
|
39
58
|
], EmailReceiverDto.prototype, "bcc", void 0);
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.SmsReceiverDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
+
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
14
15
|
/**
|
|
15
16
|
* DTO for SMS recipients
|
|
16
17
|
* Used to define the recipients of an SMS message
|
|
@@ -22,5 +23,11 @@ __decorate([
|
|
|
22
23
|
(0, class_validator_1.IsArray)(),
|
|
23
24
|
(0, class_validator_1.ArrayUnique)(),
|
|
24
25
|
(0, class_validator_1.IsPhoneNumber)(undefined, { each: true }),
|
|
26
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
27
|
+
title: 'Receiver Phones',
|
|
28
|
+
description: 'List of recipient phone numbers.',
|
|
29
|
+
type: 'array',
|
|
30
|
+
items: { type: 'string' },
|
|
31
|
+
}),
|
|
25
32
|
__metadata("design:type", Array)
|
|
26
33
|
], SmsReceiverDto.prototype, "receiverPhones", void 0);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { EmailReceiverDto } from '../receiver/receiver-email.dto';
|
|
2
|
-
import { PushReceiverDto } from '../receiver/receiver-push.dto';
|
|
3
|
-
import { SmsReceiverDto } from '../receiver/receiver-sms.dto';
|
|
4
1
|
import { EmailSenderDto } from '../sender/sender-email.dto';
|
|
5
2
|
import { PushSenderDto } from '../sender/sender-push.dto';
|
|
6
3
|
import { SmsSenderDto } from '../sender/sender-sms.dto';
|
|
4
|
+
import { EmailReceiverDto } from '../receiver/receiver-email.dto';
|
|
5
|
+
import { PushReceiverDto } from '../receiver/receiver-push.dto';
|
|
6
|
+
import { SmsReceiverDto } from '../receiver/receiver-sms.dto';
|
|
7
7
|
/**
|
|
8
8
|
* Request payload for sending a notification.
|
|
9
9
|
* Sent from hoster.ai to notification integrations (email, push, SMS).
|
|
@@ -12,12 +12,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.NotificationSendRequestDto = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
-
const
|
|
16
|
-
const receiver_push_dto_1 = require("../receiver/receiver-push.dto");
|
|
17
|
-
const receiver_sms_dto_1 = require("../receiver/receiver-sms.dto");
|
|
15
|
+
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
18
16
|
const sender_email_dto_1 = require("../sender/sender-email.dto");
|
|
19
17
|
const sender_push_dto_1 = require("../sender/sender-push.dto");
|
|
20
18
|
const sender_sms_dto_1 = require("../sender/sender-sms.dto");
|
|
19
|
+
const receiver_email_dto_1 = require("../receiver/receiver-email.dto");
|
|
20
|
+
const receiver_push_dto_1 = require("../receiver/receiver-push.dto");
|
|
21
|
+
const receiver_sms_dto_1 = require("../receiver/receiver-sms.dto");
|
|
21
22
|
/**
|
|
22
23
|
* Request payload for sending a notification.
|
|
23
24
|
* Sent from hoster.ai to notification integrations (email, push, SMS).
|
|
@@ -28,6 +29,11 @@ exports.NotificationSendRequestDto = NotificationSendRequestDto;
|
|
|
28
29
|
__decorate([
|
|
29
30
|
(0, class_validator_1.IsNotEmpty)(),
|
|
30
31
|
(0, class_validator_1.IsString)(),
|
|
32
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
33
|
+
title: 'Notification ID',
|
|
34
|
+
description: 'Unique identifier for the notification.',
|
|
35
|
+
type: 'string',
|
|
36
|
+
}),
|
|
31
37
|
__metadata("design:type", String)
|
|
32
38
|
], NotificationSendRequestDto.prototype, "notificationId", void 0);
|
|
33
39
|
__decorate([
|
|
@@ -45,6 +51,15 @@ __decorate([
|
|
|
45
51
|
},
|
|
46
52
|
keepDiscriminatorProperty: false,
|
|
47
53
|
}),
|
|
54
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
55
|
+
title: 'Sender',
|
|
56
|
+
description: 'Sender details (type depends on integration: email, push, or SMS).',
|
|
57
|
+
oneOf: [
|
|
58
|
+
{ $ref: '#/components/schemas/EmailSenderDto' },
|
|
59
|
+
{ $ref: '#/components/schemas/PushSenderDto' },
|
|
60
|
+
{ $ref: '#/components/schemas/SmsSenderDto' },
|
|
61
|
+
],
|
|
62
|
+
}),
|
|
48
63
|
__metadata("design:type", Object)
|
|
49
64
|
], NotificationSendRequestDto.prototype, "sender", void 0);
|
|
50
65
|
__decorate([
|
|
@@ -62,5 +77,14 @@ __decorate([
|
|
|
62
77
|
},
|
|
63
78
|
keepDiscriminatorProperty: false,
|
|
64
79
|
}),
|
|
80
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
81
|
+
title: 'Receiver',
|
|
82
|
+
description: 'Recipient details (type depends on integration: email, push, or SMS).',
|
|
83
|
+
oneOf: [
|
|
84
|
+
{ $ref: '#/components/schemas/EmailReceiverDto' },
|
|
85
|
+
{ $ref: '#/components/schemas/PushReceiverDto' },
|
|
86
|
+
{ $ref: '#/components/schemas/SmsReceiverDto' },
|
|
87
|
+
],
|
|
88
|
+
}),
|
|
65
89
|
__metadata("design:type", Object)
|
|
66
90
|
], NotificationSendRequestDto.prototype, "receiver", void 0);
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.NotificationSendResponseDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
+
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
14
15
|
const success_response_dto_1 = require("../../success-response.dto");
|
|
15
16
|
/**
|
|
16
17
|
* Response from notification integrations after successfully sending a notification.
|
|
@@ -22,5 +23,10 @@ exports.NotificationSendResponseDto = NotificationSendResponseDto;
|
|
|
22
23
|
__decorate([
|
|
23
24
|
(0, class_validator_1.IsString)(),
|
|
24
25
|
(0, class_validator_1.IsNotEmpty)(),
|
|
26
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
27
|
+
title: 'Notification ID',
|
|
28
|
+
description: 'Unique identifier for the sent notification.',
|
|
29
|
+
type: 'string',
|
|
30
|
+
}),
|
|
25
31
|
__metadata("design:type", String)
|
|
26
32
|
], NotificationSendResponseDto.prototype, "notificationId", void 0);
|
|
@@ -13,6 +13,7 @@ exports.EmailSenderDto = void 0;
|
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
15
|
const attachment_dto_1 = require("../../attachment.dto");
|
|
16
|
+
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
16
17
|
/**
|
|
17
18
|
* DTO for email sender
|
|
18
19
|
* Used to define the details for sending an email
|
|
@@ -23,18 +24,37 @@ exports.EmailSenderDto = EmailSenderDto;
|
|
|
23
24
|
__decorate([
|
|
24
25
|
(0, class_validator_1.IsNotEmpty)(),
|
|
25
26
|
(0, class_validator_1.IsString)(),
|
|
27
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
28
|
+
title: 'Full Name',
|
|
29
|
+
description: 'The full name of the sender.',
|
|
30
|
+
type: 'string',
|
|
31
|
+
}),
|
|
26
32
|
__metadata("design:type", String)
|
|
27
33
|
], EmailSenderDto.prototype, "fullName", void 0);
|
|
28
34
|
__decorate([
|
|
29
35
|
(0, class_validator_1.IsNotEmpty)(),
|
|
30
36
|
(0, class_validator_1.IsString)(),
|
|
31
37
|
(0, class_validator_1.Length)(1, 500),
|
|
38
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
39
|
+
title: 'Subject',
|
|
40
|
+
description: 'The email subject.',
|
|
41
|
+
type: 'string',
|
|
42
|
+
minLength: 1,
|
|
43
|
+
maxLength: 500,
|
|
44
|
+
}),
|
|
32
45
|
__metadata("design:type", String)
|
|
33
46
|
], EmailSenderDto.prototype, "subject", void 0);
|
|
34
47
|
__decorate([
|
|
35
48
|
(0, class_validator_1.IsNotEmpty)(),
|
|
36
49
|
(0, class_validator_1.IsString)(),
|
|
37
50
|
(0, class_validator_1.Length)(1, 50000),
|
|
51
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
52
|
+
title: 'Message',
|
|
53
|
+
description: 'The message content.',
|
|
54
|
+
type: 'string',
|
|
55
|
+
minLength: 1,
|
|
56
|
+
maxLength: 50000,
|
|
57
|
+
}),
|
|
38
58
|
__metadata("design:type", String)
|
|
39
59
|
], EmailSenderDto.prototype, "message", void 0);
|
|
40
60
|
__decorate([
|
|
@@ -42,5 +62,11 @@ __decorate([
|
|
|
42
62
|
(0, class_validator_1.IsArray)(),
|
|
43
63
|
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
44
64
|
(0, class_transformer_1.Type)(() => attachment_dto_1.AttachmentDto),
|
|
65
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
66
|
+
title: 'Attachments',
|
|
67
|
+
description: 'File attachments.',
|
|
68
|
+
type: 'array',
|
|
69
|
+
items: { $ref: '#/components/schemas/AttachmentDto' },
|
|
70
|
+
}),
|
|
45
71
|
__metadata("design:type", Array)
|
|
46
72
|
], EmailSenderDto.prototype, "attachments", void 0);
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.PushSenderDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
+
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
14
15
|
/**
|
|
15
16
|
* DTO for push notification sender
|
|
16
17
|
* Used to define the details for sending a push notification
|
|
@@ -22,29 +23,64 @@ __decorate([
|
|
|
22
23
|
(0, class_validator_1.IsNotEmpty)(),
|
|
23
24
|
(0, class_validator_1.IsString)(),
|
|
24
25
|
(0, class_validator_1.Length)(1, 255),
|
|
26
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
27
|
+
title: 'Message ID',
|
|
28
|
+
description: 'Unique identifier of the message.',
|
|
29
|
+
type: 'string',
|
|
30
|
+
minLength: 1,
|
|
31
|
+
maxLength: 255,
|
|
32
|
+
}),
|
|
25
33
|
__metadata("design:type", String)
|
|
26
34
|
], PushSenderDto.prototype, "messageId", void 0);
|
|
27
35
|
__decorate([
|
|
28
36
|
(0, class_validator_1.IsNotEmpty)(),
|
|
29
37
|
(0, class_validator_1.IsString)(),
|
|
30
38
|
(0, class_validator_1.Length)(1, 255),
|
|
39
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
40
|
+
title: 'User ID',
|
|
41
|
+
description: 'The user ID that will receive the push notification.',
|
|
42
|
+
type: 'string',
|
|
43
|
+
minLength: 1,
|
|
44
|
+
maxLength: 255,
|
|
45
|
+
}),
|
|
31
46
|
__metadata("design:type", String)
|
|
32
47
|
], PushSenderDto.prototype, "userId", void 0);
|
|
33
48
|
__decorate([
|
|
34
49
|
(0, class_validator_1.IsNotEmpty)(),
|
|
35
50
|
(0, class_validator_1.IsString)(),
|
|
36
51
|
(0, class_validator_1.Length)(1, 255),
|
|
52
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
53
|
+
title: 'Title',
|
|
54
|
+
description: 'The title of the push notification.',
|
|
55
|
+
type: 'string',
|
|
56
|
+
minLength: 1,
|
|
57
|
+
maxLength: 255,
|
|
58
|
+
}),
|
|
37
59
|
__metadata("design:type", String)
|
|
38
60
|
], PushSenderDto.prototype, "title", void 0);
|
|
39
61
|
__decorate([
|
|
40
62
|
(0, class_validator_1.IsNotEmpty)(),
|
|
41
63
|
(0, class_validator_1.IsString)(),
|
|
42
64
|
(0, class_validator_1.Length)(1, 1000),
|
|
65
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
66
|
+
title: 'Message',
|
|
67
|
+
description: 'The content of the push notification.',
|
|
68
|
+
type: 'string',
|
|
69
|
+
minLength: 1,
|
|
70
|
+
maxLength: 1000,
|
|
71
|
+
}),
|
|
43
72
|
__metadata("design:type", String)
|
|
44
73
|
], PushSenderDto.prototype, "message", void 0);
|
|
45
74
|
__decorate([
|
|
46
75
|
(0, class_validator_1.IsOptional)(),
|
|
47
76
|
(0, class_validator_1.IsString)(),
|
|
48
77
|
(0, class_validator_1.Length)(1, 255),
|
|
78
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
79
|
+
title: 'Subtitle',
|
|
80
|
+
description: 'The subtitle of the push notification.',
|
|
81
|
+
type: 'string',
|
|
82
|
+
minLength: 1,
|
|
83
|
+
maxLength: 255,
|
|
84
|
+
}),
|
|
49
85
|
__metadata("design:type", String)
|
|
50
86
|
], PushSenderDto.prototype, "subtitle", void 0);
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.SmsSenderDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
+
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
14
15
|
/**
|
|
15
16
|
* DTO for SMS sender
|
|
16
17
|
* Used to define the details for sending an SMS message
|
|
@@ -21,10 +22,20 @@ exports.SmsSenderDto = SmsSenderDto;
|
|
|
21
22
|
__decorate([
|
|
22
23
|
(0, class_validator_1.IsNotEmpty)(),
|
|
23
24
|
(0, class_validator_1.IsPhoneNumber)(),
|
|
25
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
26
|
+
title: 'Sender Phone',
|
|
27
|
+
description: 'Sender\'s phone number.',
|
|
28
|
+
type: 'string',
|
|
29
|
+
}),
|
|
24
30
|
__metadata("design:type", String)
|
|
25
31
|
], SmsSenderDto.prototype, "senderPhone", void 0);
|
|
26
32
|
__decorate([
|
|
27
33
|
(0, class_validator_1.IsNotEmpty)(),
|
|
28
34
|
(0, class_validator_1.IsString)(),
|
|
35
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
36
|
+
title: 'Message',
|
|
37
|
+
description: 'The content of the SMS message.',
|
|
38
|
+
type: 'string',
|
|
39
|
+
}),
|
|
29
40
|
__metadata("design:type", String)
|
|
30
41
|
], SmsSenderDto.prototype, "message", void 0);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AttributeFieldDto } from '../attribute-field.dto';
|
|
2
2
|
import { InfoDto } from '../info.dto';
|
|
3
3
|
import { UnitDto } from '../unit.dto';
|
|
4
4
|
import { ProductItemActionsEnum } from '../../enums/item-actions.enum';
|
|
@@ -11,12 +11,12 @@ export declare class ProductInfoDto extends InfoDto {
|
|
|
11
11
|
* Custom attributes that can be defined for products.
|
|
12
12
|
* These attributes will be displayed in the product configuration section.
|
|
13
13
|
*/
|
|
14
|
-
productAttributes?:
|
|
14
|
+
productAttributes?: AttributeFieldDto[];
|
|
15
15
|
/**
|
|
16
16
|
* Custom attributes that can be defined for items.
|
|
17
17
|
* These attributes will be displayed in the item details section.
|
|
18
18
|
*/
|
|
19
|
-
itemAttributes?:
|
|
19
|
+
itemAttributes?: AttributeFieldDto[];
|
|
20
20
|
/**
|
|
21
21
|
* Defines the units for pay-per-use billing.
|
|
22
22
|
* This allows the administrator to set a price for each unit per interval.
|
|
@@ -31,5 +31,5 @@ export declare class ProductInfoDto extends InfoDto {
|
|
|
31
31
|
/**
|
|
32
32
|
* A list of actions that are supported by this integration.
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
supportedActions: ProductItemActionsEnum[];
|
|
35
35
|
}
|
|
@@ -11,7 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ProductInfoDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
-
const
|
|
14
|
+
const attribute_field_dto_1 = require("../attribute-field.dto");
|
|
15
15
|
const info_dto_1 = require("../info.dto");
|
|
16
16
|
const unit_dto_1 = require("../unit.dto");
|
|
17
17
|
const class_transformer_1 = require("class-transformer");
|
|
@@ -29,7 +29,7 @@ class ProductInfoDto extends info_dto_1.InfoDto {
|
|
|
29
29
|
/**
|
|
30
30
|
* A list of actions that are supported by this integration.
|
|
31
31
|
*/
|
|
32
|
-
this.
|
|
32
|
+
this.supportedActions = [];
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
exports.ProductInfoDto = ProductInfoDto;
|
|
@@ -38,13 +38,13 @@ __decorate([
|
|
|
38
38
|
(0, class_validator_1.IsArray)(),
|
|
39
39
|
(0, class_validator_1.ArrayMinSize)(1),
|
|
40
40
|
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
41
|
-
(0, class_transformer_1.Type)(() =>
|
|
41
|
+
(0, class_transformer_1.Type)(() => attribute_field_dto_1.AttributeFieldDto),
|
|
42
42
|
(0, unique_field_in_array_validator_1.UniqueFieldInArray)('id'),
|
|
43
43
|
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
44
44
|
title: 'Product Attributes',
|
|
45
45
|
description: 'Configurable attributes that apply at the product level.',
|
|
46
46
|
type: 'array',
|
|
47
|
-
items: { $ref: '#/components/schemas/
|
|
47
|
+
items: { $ref: '#/components/schemas/AttributeFieldDto' }
|
|
48
48
|
}),
|
|
49
49
|
__metadata("design:type", Array)
|
|
50
50
|
], ProductInfoDto.prototype, "productAttributes", void 0);
|
|
@@ -53,13 +53,13 @@ __decorate([
|
|
|
53
53
|
(0, class_validator_1.IsArray)(),
|
|
54
54
|
(0, class_validator_1.ArrayMinSize)(1),
|
|
55
55
|
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
56
|
-
(0, class_transformer_1.Type)(() =>
|
|
56
|
+
(0, class_transformer_1.Type)(() => attribute_field_dto_1.AttributeFieldDto),
|
|
57
57
|
(0, unique_field_in_array_validator_1.UniqueFieldInArray)('id'),
|
|
58
58
|
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
59
59
|
title: 'Item Attributes',
|
|
60
60
|
description: 'Configurable attributes that apply at the item level.',
|
|
61
61
|
type: 'array',
|
|
62
|
-
items: { $ref: '#/components/schemas/
|
|
62
|
+
items: { $ref: '#/components/schemas/AttributeFieldDto' }
|
|
63
63
|
}),
|
|
64
64
|
__metadata("design:type", Array)
|
|
65
65
|
], ProductInfoDto.prototype, "itemAttributes", void 0);
|
|
@@ -101,4 +101,4 @@ __decorate([
|
|
|
101
101
|
items: { type: 'string', enum: Object.values(item_actions_enum_1.ProductItemActionsEnum) }
|
|
102
102
|
}),
|
|
103
103
|
__metadata("design:type", Array)
|
|
104
|
-
], ProductInfoDto.prototype, "
|
|
104
|
+
], ProductInfoDto.prototype, "supportedActions", void 0);
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ProductItemDataDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
+
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
14
15
|
const item_actions_enum_1 = require("../../enums/item-actions.enum");
|
|
15
16
|
const item_data_dto_1 = require("../item-data.dto");
|
|
16
17
|
/**
|
|
@@ -21,7 +22,13 @@ class ProductItemDataDto extends item_data_dto_1.ItemDataDto {
|
|
|
21
22
|
}
|
|
22
23
|
exports.ProductItemDataDto = ProductItemDataDto;
|
|
23
24
|
__decorate([
|
|
24
|
-
(0, class_validator_1.
|
|
25
|
+
(0, class_validator_1.IsOptional)(),
|
|
25
26
|
(0, class_validator_1.IsEnum)(item_actions_enum_1.ProductItemActionsEnum),
|
|
27
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
28
|
+
title: 'Action',
|
|
29
|
+
description: 'Product-specific action type for this item.',
|
|
30
|
+
type: 'string',
|
|
31
|
+
enum: Object.values(item_actions_enum_1.ProductItemActionsEnum),
|
|
32
|
+
}),
|
|
26
33
|
__metadata("design:type", String)
|
|
27
34
|
], ProductItemDataDto.prototype, "action", 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 create a new product item.
|
|
5
5
|
* This DTO contains all the necessary information for the creation process.
|
|
@@ -11,9 +11,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ProductCreateRequestDto = 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 create a new product item.
|
|
19
20
|
* This DTO contains all the necessary information for the creation 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
|
], ProductCreateRequestDto.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 for the new product item to be created.',
|
|
45
|
+
$ref: '#/components/schemas/ProductItemDataDto',
|
|
46
|
+
}),
|
|
36
47
|
__metadata("design:type", product_item_data_dto_1.ProductItemDataDto)
|
|
37
48
|
], ProductCreateRequestDto.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 delete a product item.
|
|
5
5
|
* This DTO contains all the necessary information for the deletion process.
|
|
@@ -11,9 +11,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ProductDeleteRequestDto = 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 delete a product item.
|
|
19
20
|
* This DTO contains all the necessary information for the deletion 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 initiating the request.',
|
|
33
|
+
type: 'object',
|
|
34
|
+
}),
|
|
29
35
|
__metadata("design:type", client_data_dto_1.ClientDataDto)
|
|
30
36
|
], ProductDeleteRequestDto.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 deleted.',
|
|
45
|
+
type: 'object',
|
|
46
|
+
}),
|
|
36
47
|
__metadata("design:type", product_item_data_dto_1.ProductItemDataDto)
|
|
37
48
|
], ProductDeleteRequestDto.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 downgradable.
|
|
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.ProductDowngradableRequestDto = 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 downgradable.
|
|
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
|
], ProductDowngradableRequestDto.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
|
], ProductDowngradableRequestDto.prototype, "itemData", void 0);
|