@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
|
@@ -0,0 +1,56 @@
|
|
|
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.TaxDetailsResponseDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
16
|
+
const base_response_dto_1 = require("../../base-response.dto");
|
|
17
|
+
const tin_validation_details_dto_1 = require("../tin-validation-details.dto");
|
|
18
|
+
/**
|
|
19
|
+
* Represents the response containing tax calculation details.
|
|
20
|
+
* Includes VAT rate and optional TIN validation information.
|
|
21
|
+
*/
|
|
22
|
+
class TaxDetailsResponseDto extends base_response_dto_1.BaseResponse {
|
|
23
|
+
}
|
|
24
|
+
exports.TaxDetailsResponseDto = TaxDetailsResponseDto;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsDefined)(),
|
|
27
|
+
(0, class_validator_1.IsNumber)(),
|
|
28
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
29
|
+
title: 'VAT Rate',
|
|
30
|
+
description: 'The applicable VAT rate for the transaction.',
|
|
31
|
+
type: 'number',
|
|
32
|
+
}),
|
|
33
|
+
__metadata("design:type", Number)
|
|
34
|
+
], TaxDetailsResponseDto.prototype, "vatRate", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsOptional)(),
|
|
37
|
+
(0, class_validator_1.IsBoolean)(),
|
|
38
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
39
|
+
title: 'TIN Valid',
|
|
40
|
+
description: 'Indicates whether the Tax Identification Number is valid.',
|
|
41
|
+
type: 'boolean',
|
|
42
|
+
}),
|
|
43
|
+
__metadata("design:type", Boolean)
|
|
44
|
+
], TaxDetailsResponseDto.prototype, "TINValid", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_validator_1.IsOptional)(),
|
|
47
|
+
(0, class_validator_1.IsObject)(),
|
|
48
|
+
(0, class_validator_1.ValidateNested)(),
|
|
49
|
+
(0, class_transformer_1.Type)(() => tin_validation_details_dto_1.TINValidationDetails),
|
|
50
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
51
|
+
title: 'Tax Details',
|
|
52
|
+
description: 'Detailed tax validation information including company details.',
|
|
53
|
+
type: 'object',
|
|
54
|
+
}),
|
|
55
|
+
__metadata("design:type", tin_validation_details_dto_1.TINValidationDetails)
|
|
56
|
+
], TaxDetailsResponseDto.prototype, "taxDetails", void 0);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { CountryEnum } from '../../enums/country.enum';
|
|
2
|
+
/**
|
|
3
|
+
* Contains detailed Tax Identification Number validation information.
|
|
4
|
+
* Includes company details and address information from tax authority validation.
|
|
5
|
+
*/
|
|
6
|
+
export declare class TINValidationDetails {
|
|
7
|
+
/**
|
|
8
|
+
* Name of the company as registered with tax authorities
|
|
9
|
+
*/
|
|
10
|
+
companyName?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Primary address line
|
|
13
|
+
*/
|
|
14
|
+
address1: string;
|
|
15
|
+
/**
|
|
16
|
+
* Secondary address line
|
|
17
|
+
*/
|
|
18
|
+
address2?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Tertiary address line
|
|
21
|
+
*/
|
|
22
|
+
address3?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Postal code
|
|
25
|
+
*/
|
|
26
|
+
postcode: string;
|
|
27
|
+
/**
|
|
28
|
+
* City name
|
|
29
|
+
*/
|
|
30
|
+
city: string;
|
|
31
|
+
/**
|
|
32
|
+
* Country code
|
|
33
|
+
*/
|
|
34
|
+
country: CountryEnum;
|
|
35
|
+
/**
|
|
36
|
+
* State or province (if applicable)
|
|
37
|
+
*/
|
|
38
|
+
state?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Tax Identification Number
|
|
41
|
+
*/
|
|
42
|
+
tin?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Tax office name or identifier
|
|
45
|
+
*/
|
|
46
|
+
taxOffice?: string;
|
|
47
|
+
/**
|
|
48
|
+
* List of registered professions or business activities
|
|
49
|
+
*/
|
|
50
|
+
profession?: string[];
|
|
51
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
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.TINValidationDetails = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const country_enum_1 = require("../../enums/country.enum");
|
|
15
|
+
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
16
|
+
/**
|
|
17
|
+
* Contains detailed Tax Identification Number validation information.
|
|
18
|
+
* Includes company details and address information from tax authority validation.
|
|
19
|
+
*/
|
|
20
|
+
class TINValidationDetails {
|
|
21
|
+
}
|
|
22
|
+
exports.TINValidationDetails = TINValidationDetails;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsOptional)(),
|
|
25
|
+
(0, class_validator_1.IsString)(),
|
|
26
|
+
(0, class_validator_1.MinLength)(1),
|
|
27
|
+
(0, class_validator_1.MaxLength)(250),
|
|
28
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
29
|
+
title: 'Company Name',
|
|
30
|
+
description: 'Name of the company as registered with tax authorities.',
|
|
31
|
+
type: 'string',
|
|
32
|
+
minLength: 1,
|
|
33
|
+
maxLength: 250,
|
|
34
|
+
}),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], TINValidationDetails.prototype, "companyName", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsDefined)(),
|
|
39
|
+
(0, class_validator_1.IsString)(),
|
|
40
|
+
(0, class_validator_1.MinLength)(1),
|
|
41
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
42
|
+
title: 'Address Line 1',
|
|
43
|
+
description: 'Primary address line.',
|
|
44
|
+
type: 'string',
|
|
45
|
+
minLength: 1,
|
|
46
|
+
}),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], TINValidationDetails.prototype, "address1", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_validator_1.IsOptional)(),
|
|
51
|
+
(0, class_validator_1.IsString)(),
|
|
52
|
+
(0, class_validator_1.MinLength)(0),
|
|
53
|
+
(0, class_validator_1.MaxLength)(250),
|
|
54
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
55
|
+
title: 'Address Line 2',
|
|
56
|
+
description: 'Secondary address line.',
|
|
57
|
+
type: 'string',
|
|
58
|
+
maxLength: 250,
|
|
59
|
+
}),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], TINValidationDetails.prototype, "address2", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, class_validator_1.IsOptional)(),
|
|
64
|
+
(0, class_validator_1.IsString)(),
|
|
65
|
+
(0, class_validator_1.MinLength)(0),
|
|
66
|
+
(0, class_validator_1.MaxLength)(250),
|
|
67
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
68
|
+
title: 'Address Line 3',
|
|
69
|
+
description: 'Tertiary address line.',
|
|
70
|
+
type: 'string',
|
|
71
|
+
maxLength: 250,
|
|
72
|
+
}),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], TINValidationDetails.prototype, "address3", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, class_validator_1.IsDefined)(),
|
|
77
|
+
(0, class_validator_1.IsString)(),
|
|
78
|
+
(0, class_validator_1.MinLength)(1),
|
|
79
|
+
(0, class_validator_1.MaxLength)(16),
|
|
80
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
81
|
+
title: 'Postcode',
|
|
82
|
+
description: 'Postal code.',
|
|
83
|
+
type: 'string',
|
|
84
|
+
minLength: 1,
|
|
85
|
+
maxLength: 16,
|
|
86
|
+
}),
|
|
87
|
+
__metadata("design:type", String)
|
|
88
|
+
], TINValidationDetails.prototype, "postcode", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, class_validator_1.IsDefined)(),
|
|
91
|
+
(0, class_validator_1.IsString)(),
|
|
92
|
+
(0, class_validator_1.MinLength)(1),
|
|
93
|
+
(0, class_validator_1.MaxLength)(250),
|
|
94
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
95
|
+
title: 'City',
|
|
96
|
+
description: 'City name.',
|
|
97
|
+
type: 'string',
|
|
98
|
+
minLength: 1,
|
|
99
|
+
maxLength: 250,
|
|
100
|
+
}),
|
|
101
|
+
__metadata("design:type", String)
|
|
102
|
+
], TINValidationDetails.prototype, "city", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, class_validator_1.IsDefined)(),
|
|
105
|
+
(0, class_validator_1.IsEnum)(country_enum_1.CountryEnum),
|
|
106
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
107
|
+
title: 'Country',
|
|
108
|
+
description: 'Country code.',
|
|
109
|
+
type: 'string',
|
|
110
|
+
enum: Object.values(country_enum_1.CountryEnum),
|
|
111
|
+
}),
|
|
112
|
+
__metadata("design:type", String)
|
|
113
|
+
], TINValidationDetails.prototype, "country", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, class_validator_1.IsOptional)(),
|
|
116
|
+
(0, class_validator_1.IsString)(),
|
|
117
|
+
(0, class_validator_1.MinLength)(0),
|
|
118
|
+
(0, class_validator_1.MaxLength)(250),
|
|
119
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
120
|
+
title: 'State',
|
|
121
|
+
description: 'State or province.',
|
|
122
|
+
type: 'string',
|
|
123
|
+
maxLength: 250,
|
|
124
|
+
}),
|
|
125
|
+
__metadata("design:type", String)
|
|
126
|
+
], TINValidationDetails.prototype, "state", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
(0, class_validator_1.IsOptional)(),
|
|
129
|
+
(0, class_validator_1.IsString)(),
|
|
130
|
+
(0, class_validator_1.MinLength)(0),
|
|
131
|
+
(0, class_validator_1.MaxLength)(20),
|
|
132
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
133
|
+
title: 'TIN',
|
|
134
|
+
description: 'Tax Identification Number.',
|
|
135
|
+
type: 'string',
|
|
136
|
+
maxLength: 20,
|
|
137
|
+
}),
|
|
138
|
+
__metadata("design:type", String)
|
|
139
|
+
], TINValidationDetails.prototype, "tin", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
(0, class_validator_1.IsOptional)(),
|
|
142
|
+
(0, class_validator_1.IsString)(),
|
|
143
|
+
(0, class_validator_1.MinLength)(0),
|
|
144
|
+
(0, class_validator_1.MaxLength)(250),
|
|
145
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
146
|
+
title: 'Tax Office',
|
|
147
|
+
description: 'Tax office name or identifier.',
|
|
148
|
+
type: 'string',
|
|
149
|
+
maxLength: 250,
|
|
150
|
+
}),
|
|
151
|
+
__metadata("design:type", String)
|
|
152
|
+
], TINValidationDetails.prototype, "taxOffice", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
(0, class_validator_1.IsOptional)(),
|
|
155
|
+
(0, class_validator_1.IsString)(),
|
|
156
|
+
(0, class_validator_1.MinLength)(0),
|
|
157
|
+
(0, class_validator_1.MaxLength)(250),
|
|
158
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
159
|
+
title: 'Profession',
|
|
160
|
+
description: 'List of registered professions or business activities.',
|
|
161
|
+
type: 'array',
|
|
162
|
+
items: { type: 'string' },
|
|
163
|
+
}),
|
|
164
|
+
__metadata("design:type", Array)
|
|
165
|
+
], TINValidationDetails.prototype, "profession", void 0);
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.TransactionData = 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
|
/**
|
|
16
17
|
* Transaction details related to the invoice.
|
|
17
18
|
* Contains payment and transaction information for the document being issued.
|
|
@@ -22,21 +23,42 @@ exports.TransactionData = TransactionData;
|
|
|
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: 'Transaction ID',
|
|
28
|
+
description: 'Unique identifier for the transaction.',
|
|
29
|
+
type: 'string',
|
|
30
|
+
}),
|
|
25
31
|
__metadata("design:type", String)
|
|
26
32
|
], TransactionData.prototype, "transactionId", void 0);
|
|
27
33
|
__decorate([
|
|
28
34
|
(0, class_validator_1.IsNumber)(),
|
|
29
35
|
(0, class_validator_1.IsNotEmpty)(),
|
|
36
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
37
|
+
title: 'Amount',
|
|
38
|
+
description: 'Transaction amount.',
|
|
39
|
+
type: 'number',
|
|
40
|
+
}),
|
|
30
41
|
__metadata("design:type", Number)
|
|
31
42
|
], TransactionData.prototype, "amount", 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: 'Payment Method',
|
|
48
|
+
description: 'Payment method used for the transaction.',
|
|
49
|
+
type: 'string',
|
|
50
|
+
}),
|
|
35
51
|
__metadata("design:type", String)
|
|
36
52
|
], TransactionData.prototype, "paymentMethod", void 0);
|
|
37
53
|
__decorate([
|
|
38
54
|
(0, class_validator_1.IsDate)(),
|
|
39
55
|
(0, class_validator_1.IsNotEmpty)(),
|
|
40
56
|
(0, class_transformer_1.Type)(() => Date),
|
|
57
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
58
|
+
title: 'Date',
|
|
59
|
+
description: 'Transaction date.',
|
|
60
|
+
type: 'string',
|
|
61
|
+
format: 'date-time',
|
|
62
|
+
}),
|
|
41
63
|
__metadata("design:type", Date)
|
|
42
64
|
], TransactionData.prototype, "date", void 0);
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.InvoiceContactData = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const country_enum_1 = require("../enums/country.enum");
|
|
15
|
+
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
15
16
|
/**
|
|
16
17
|
* Billing contact information sent from hoster.ai to invoice integrations.
|
|
17
18
|
* Contains the details of the person or business for whom an invoice will be issued.
|
|
@@ -22,41 +23,82 @@ exports.InvoiceContactData = InvoiceContactData;
|
|
|
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: 'Invoice Contact ID',
|
|
28
|
+
description: 'Unique identifier for the invoice contact.',
|
|
29
|
+
type: 'string',
|
|
30
|
+
}),
|
|
25
31
|
__metadata("design:type", String)
|
|
26
32
|
], InvoiceContactData.prototype, "invoiceContactId", void 0);
|
|
27
33
|
__decorate([
|
|
28
34
|
(0, class_validator_1.IsBoolean)(),
|
|
29
35
|
(0, class_validator_1.IsNotEmpty)(),
|
|
36
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
37
|
+
title: 'Is Business Contact',
|
|
38
|
+
description: 'Whether this is a business contact or individual person.',
|
|
39
|
+
type: 'boolean',
|
|
40
|
+
}),
|
|
30
41
|
__metadata("design:type", Boolean)
|
|
31
42
|
], InvoiceContactData.prototype, "isBusinessContact", 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: 'First Name',
|
|
48
|
+
description: 'Contact\'s first name.',
|
|
49
|
+
type: 'string',
|
|
50
|
+
}),
|
|
35
51
|
__metadata("design:type", String)
|
|
36
52
|
], InvoiceContactData.prototype, "firstName", void 0);
|
|
37
53
|
__decorate([
|
|
38
54
|
(0, class_validator_1.IsString)(),
|
|
39
55
|
(0, class_validator_1.IsNotEmpty)(),
|
|
56
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
57
|
+
title: 'Last Name',
|
|
58
|
+
description: 'Contact\'s last name.',
|
|
59
|
+
type: 'string',
|
|
60
|
+
}),
|
|
40
61
|
__metadata("design:type", String)
|
|
41
62
|
], InvoiceContactData.prototype, "lastName", void 0);
|
|
42
63
|
__decorate([
|
|
43
64
|
(0, class_validator_1.IsString)(),
|
|
44
65
|
(0, class_validator_1.IsOptional)(),
|
|
66
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
67
|
+
title: 'Business Name',
|
|
68
|
+
description: 'Business name (required when isBusinessContact is true).',
|
|
69
|
+
type: 'string',
|
|
70
|
+
}),
|
|
45
71
|
__metadata("design:type", String)
|
|
46
72
|
], InvoiceContactData.prototype, "businessName", void 0);
|
|
47
73
|
__decorate([
|
|
48
74
|
(0, class_validator_1.IsEmail)(),
|
|
49
75
|
(0, class_validator_1.IsNotEmpty)(),
|
|
76
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
77
|
+
title: 'Email',
|
|
78
|
+
description: 'Contact\'s email address.',
|
|
79
|
+
type: 'string',
|
|
80
|
+
format: 'email',
|
|
81
|
+
}),
|
|
50
82
|
__metadata("design:type", String)
|
|
51
83
|
], InvoiceContactData.prototype, "email", void 0);
|
|
52
84
|
__decorate([
|
|
53
85
|
(0, class_validator_1.IsPhoneNumber)(),
|
|
54
86
|
(0, class_validator_1.IsNotEmpty)(),
|
|
87
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
88
|
+
title: 'Telephone',
|
|
89
|
+
description: 'Primary telephone number in international format.',
|
|
90
|
+
type: 'string',
|
|
91
|
+
}),
|
|
55
92
|
__metadata("design:type", String)
|
|
56
93
|
], InvoiceContactData.prototype, "telephone", void 0);
|
|
57
94
|
__decorate([
|
|
58
95
|
(0, class_validator_1.IsPhoneNumber)(),
|
|
59
96
|
(0, class_validator_1.IsOptional)(),
|
|
97
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
98
|
+
title: 'Mobile',
|
|
99
|
+
description: 'Mobile phone number in international format.',
|
|
100
|
+
type: 'string',
|
|
101
|
+
}),
|
|
60
102
|
__metadata("design:type", String)
|
|
61
103
|
], InvoiceContactData.prototype, "mobile", void 0);
|
|
62
104
|
__decorate([
|
|
@@ -64,18 +106,37 @@ __decorate([
|
|
|
64
106
|
(0, class_validator_1.IsNotEmpty)(),
|
|
65
107
|
(0, class_validator_1.MinLength)(1),
|
|
66
108
|
(0, class_validator_1.MaxLength)(250),
|
|
109
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
110
|
+
title: 'Address Line 1',
|
|
111
|
+
description: 'Primary address line (street, number).',
|
|
112
|
+
type: 'string',
|
|
113
|
+
minLength: 1,
|
|
114
|
+
maxLength: 250,
|
|
115
|
+
}),
|
|
67
116
|
__metadata("design:type", String)
|
|
68
117
|
], InvoiceContactData.prototype, "address1", void 0);
|
|
69
118
|
__decorate([
|
|
70
119
|
(0, class_validator_1.IsString)(),
|
|
71
120
|
(0, class_validator_1.IsOptional)(),
|
|
72
121
|
(0, class_validator_1.MaxLength)(250),
|
|
122
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
123
|
+
title: 'Address Line 2',
|
|
124
|
+
description: 'Secondary address line (building, floor, apartment).',
|
|
125
|
+
type: 'string',
|
|
126
|
+
maxLength: 250,
|
|
127
|
+
}),
|
|
73
128
|
__metadata("design:type", String)
|
|
74
129
|
], InvoiceContactData.prototype, "address2", void 0);
|
|
75
130
|
__decorate([
|
|
76
131
|
(0, class_validator_1.IsString)(),
|
|
77
132
|
(0, class_validator_1.IsOptional)(),
|
|
78
133
|
(0, class_validator_1.MaxLength)(250),
|
|
134
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
135
|
+
title: 'Address Line 3',
|
|
136
|
+
description: 'Additional address information.',
|
|
137
|
+
type: 'string',
|
|
138
|
+
maxLength: 250,
|
|
139
|
+
}),
|
|
79
140
|
__metadata("design:type", String)
|
|
80
141
|
], InvoiceContactData.prototype, "address3", void 0);
|
|
81
142
|
__decorate([
|
|
@@ -83,6 +144,13 @@ __decorate([
|
|
|
83
144
|
(0, class_validator_1.IsNotEmpty)(),
|
|
84
145
|
(0, class_validator_1.MinLength)(1),
|
|
85
146
|
(0, class_validator_1.MaxLength)(16),
|
|
147
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
148
|
+
title: 'Postcode',
|
|
149
|
+
description: 'Postal/ZIP code.',
|
|
150
|
+
type: 'string',
|
|
151
|
+
minLength: 1,
|
|
152
|
+
maxLength: 16,
|
|
153
|
+
}),
|
|
86
154
|
__metadata("design:type", String)
|
|
87
155
|
], InvoiceContactData.prototype, "postcode", void 0);
|
|
88
156
|
__decorate([
|
|
@@ -90,31 +158,65 @@ __decorate([
|
|
|
90
158
|
(0, class_validator_1.IsNotEmpty)(),
|
|
91
159
|
(0, class_validator_1.MinLength)(1),
|
|
92
160
|
(0, class_validator_1.MaxLength)(250),
|
|
161
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
162
|
+
title: 'City',
|
|
163
|
+
description: 'City name.',
|
|
164
|
+
type: 'string',
|
|
165
|
+
minLength: 1,
|
|
166
|
+
maxLength: 250,
|
|
167
|
+
}),
|
|
93
168
|
__metadata("design:type", String)
|
|
94
169
|
], InvoiceContactData.prototype, "city", void 0);
|
|
95
170
|
__decorate([
|
|
96
171
|
(0, class_validator_1.IsEnum)(country_enum_1.CountryEnum),
|
|
97
172
|
(0, class_validator_1.IsNotEmpty)(),
|
|
173
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
174
|
+
title: 'Country',
|
|
175
|
+
description: 'Country code.',
|
|
176
|
+
type: 'string',
|
|
177
|
+
enum: Object.values(country_enum_1.CountryEnum),
|
|
178
|
+
}),
|
|
98
179
|
__metadata("design:type", String)
|
|
99
180
|
], InvoiceContactData.prototype, "country", void 0);
|
|
100
181
|
__decorate([
|
|
101
182
|
(0, class_validator_1.IsString)(),
|
|
102
183
|
(0, class_validator_1.IsOptional)(),
|
|
103
184
|
(0, class_validator_1.MaxLength)(250),
|
|
185
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
186
|
+
title: 'State',
|
|
187
|
+
description: 'State/province/region.',
|
|
188
|
+
type: 'string',
|
|
189
|
+
maxLength: 250,
|
|
190
|
+
}),
|
|
104
191
|
__metadata("design:type", String)
|
|
105
192
|
], InvoiceContactData.prototype, "state", void 0);
|
|
106
193
|
__decorate([
|
|
107
194
|
(0, class_validator_1.IsString)(),
|
|
108
195
|
(0, class_validator_1.IsOptional)(),
|
|
196
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
197
|
+
title: 'TIN',
|
|
198
|
+
description: 'Tax Identification Number (TIN/VAT number).',
|
|
199
|
+
type: 'string',
|
|
200
|
+
}),
|
|
109
201
|
__metadata("design:type", String)
|
|
110
202
|
], InvoiceContactData.prototype, "tin", void 0);
|
|
111
203
|
__decorate([
|
|
112
204
|
(0, class_validator_1.IsString)(),
|
|
113
205
|
(0, class_validator_1.IsOptional)(),
|
|
206
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
207
|
+
title: 'Tax Office',
|
|
208
|
+
description: 'Tax office name or code.',
|
|
209
|
+
type: 'string',
|
|
210
|
+
}),
|
|
114
211
|
__metadata("design:type", String)
|
|
115
212
|
], InvoiceContactData.prototype, "taxOffice", void 0);
|
|
116
213
|
__decorate([
|
|
117
214
|
(0, class_validator_1.IsString)(),
|
|
118
215
|
(0, class_validator_1.IsOptional)(),
|
|
216
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
217
|
+
title: 'Profession',
|
|
218
|
+
description: 'Contact\'s profession or business activity.',
|
|
219
|
+
type: 'string',
|
|
220
|
+
}),
|
|
119
221
|
__metadata("design:type", String)
|
|
120
222
|
], InvoiceContactData.prototype, "profession", void 0);
|
|
@@ -36,9 +36,9 @@ export declare class ItemDataDto {
|
|
|
36
36
|
/**
|
|
37
37
|
* The price of the product item without tax and discount.
|
|
38
38
|
*/
|
|
39
|
-
price
|
|
39
|
+
price?: number;
|
|
40
40
|
/**
|
|
41
41
|
* The discount of the product item. The price after removing the discount
|
|
42
42
|
*/
|
|
43
|
-
discountPrice
|
|
43
|
+
discountPrice?: number;
|
|
44
44
|
}
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ItemDataDto = 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
|
* Represents the data of a specific product item.
|
|
16
17
|
* This DTO is used to transfer detailed information about a product instance.
|
|
@@ -21,50 +22,110 @@ exports.ItemDataDto = ItemDataDto;
|
|
|
21
22
|
__decorate([
|
|
22
23
|
(0, class_validator_1.IsOptional)(),
|
|
23
24
|
(0, class_validator_1.IsString)(),
|
|
25
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
26
|
+
title: 'Item ID',
|
|
27
|
+
description: 'The unique identifier for the product item.',
|
|
28
|
+
type: 'string',
|
|
29
|
+
}),
|
|
24
30
|
__metadata("design:type", String)
|
|
25
31
|
], ItemDataDto.prototype, "itemId", 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: 'Product ID',
|
|
37
|
+
description: 'Unique identifier for the product.',
|
|
38
|
+
type: 'string',
|
|
39
|
+
}),
|
|
29
40
|
__metadata("design:type", String)
|
|
30
41
|
], ItemDataDto.prototype, "productId", void 0);
|
|
31
42
|
__decorate([
|
|
32
43
|
(0, class_validator_1.IsNotEmpty)(),
|
|
33
44
|
(0, class_validator_1.IsString)(),
|
|
45
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
46
|
+
title: 'Product Name',
|
|
47
|
+
description: 'Name of the product.',
|
|
48
|
+
type: 'string',
|
|
49
|
+
}),
|
|
34
50
|
__metadata("design:type", String)
|
|
35
51
|
], ItemDataDto.prototype, "productName", void 0);
|
|
36
52
|
__decorate([
|
|
37
53
|
(0, class_validator_1.IsNotEmpty)(),
|
|
38
54
|
(0, class_validator_1.IsString)(),
|
|
55
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
56
|
+
title: 'Resource Name',
|
|
57
|
+
description: 'Resource name associated with the product.',
|
|
58
|
+
type: 'string',
|
|
59
|
+
}),
|
|
39
60
|
__metadata("design:type", String)
|
|
40
61
|
], ItemDataDto.prototype, "resourceName", void 0);
|
|
41
62
|
__decorate([
|
|
42
63
|
(0, class_validator_1.IsDefined)(),
|
|
64
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
65
|
+
title: 'Product Attributes',
|
|
66
|
+
description: 'Product-level attributes defined for the product type.',
|
|
67
|
+
type: 'object',
|
|
68
|
+
additionalProperties: true,
|
|
69
|
+
}),
|
|
43
70
|
__metadata("design:type", Object)
|
|
44
71
|
], ItemDataDto.prototype, "productAttributes", void 0);
|
|
45
72
|
__decorate([
|
|
46
73
|
(0, class_validator_1.IsDefined)(),
|
|
74
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
75
|
+
title: 'Item Attributes',
|
|
76
|
+
description: 'Item-specific attributes unique to this product instance.',
|
|
77
|
+
type: 'object',
|
|
78
|
+
additionalProperties: true,
|
|
79
|
+
}),
|
|
47
80
|
__metadata("design:type", Object)
|
|
48
81
|
], ItemDataDto.prototype, "itemAttributes", void 0);
|
|
49
82
|
__decorate([
|
|
50
83
|
(0, class_validator_1.IsOptional)(),
|
|
84
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
85
|
+
title: 'Creation Response Data',
|
|
86
|
+
description: 'Data returned from the creation response.',
|
|
87
|
+
type: 'object',
|
|
88
|
+
additionalProperties: true,
|
|
89
|
+
}),
|
|
51
90
|
__metadata("design:type", Object)
|
|
52
91
|
], ItemDataDto.prototype, "creationResponseData", void 0);
|
|
53
92
|
__decorate([
|
|
54
93
|
(0, class_validator_1.IsNotEmpty)(),
|
|
55
94
|
(0, class_validator_1.IsString)(),
|
|
95
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
96
|
+
title: 'Start Date',
|
|
97
|
+
description: 'Start date of the product item.',
|
|
98
|
+
type: 'string',
|
|
99
|
+
}),
|
|
56
100
|
__metadata("design:type", String)
|
|
57
101
|
], ItemDataDto.prototype, "startDate", void 0);
|
|
58
102
|
__decorate([
|
|
59
103
|
(0, class_validator_1.IsNotEmpty)(),
|
|
60
104
|
(0, class_validator_1.IsString)(),
|
|
105
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
106
|
+
title: 'End Date',
|
|
107
|
+
description: 'End date of the product item.',
|
|
108
|
+
type: 'string',
|
|
109
|
+
}),
|
|
61
110
|
__metadata("design:type", String)
|
|
62
111
|
], ItemDataDto.prototype, "endDate", void 0);
|
|
63
112
|
__decorate([
|
|
64
|
-
(0, class_validator_1.
|
|
113
|
+
(0, class_validator_1.IsOptional)(),
|
|
114
|
+
(0, class_validator_1.IsNumber)(),
|
|
115
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
116
|
+
title: 'Price',
|
|
117
|
+
description: 'The price of the product item without tax and discount.',
|
|
118
|
+
type: 'number',
|
|
119
|
+
}),
|
|
65
120
|
__metadata("design:type", Number)
|
|
66
121
|
], ItemDataDto.prototype, "price", void 0);
|
|
67
122
|
__decorate([
|
|
68
|
-
(0, class_validator_1.
|
|
123
|
+
(0, class_validator_1.IsOptional)(),
|
|
124
|
+
(0, class_validator_1.IsNumber)(),
|
|
125
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
126
|
+
title: 'Discount Price',
|
|
127
|
+
description: 'The price after removing the discount.',
|
|
128
|
+
type: 'number',
|
|
129
|
+
}),
|
|
69
130
|
__metadata("design:type", Number)
|
|
70
131
|
], ItemDataDto.prototype, "discountPrice", void 0);
|