@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/country.dto.js
CHANGED
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.CountryDto = 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
|
* Country information returned by the hoster.ai helper function.
|
|
17
18
|
* Used to provide a list of all available countries.
|
|
@@ -22,14 +23,30 @@ exports.CountryDto = CountryDto;
|
|
|
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: 'Name',
|
|
28
|
+
description: 'Country name.',
|
|
29
|
+
type: 'string',
|
|
30
|
+
}),
|
|
25
31
|
__metadata("design:type", String)
|
|
26
32
|
], CountryDto.prototype, "name", void 0);
|
|
27
33
|
__decorate([
|
|
28
34
|
(0, class_validator_1.IsEnum)(country_enum_1.CountryEnum),
|
|
35
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
36
|
+
title: 'Code',
|
|
37
|
+
description: 'Country code.',
|
|
38
|
+
type: 'string',
|
|
39
|
+
enum: Object.values(country_enum_1.CountryEnum),
|
|
40
|
+
}),
|
|
29
41
|
__metadata("design:type", String)
|
|
30
42
|
], CountryDto.prototype, "code", void 0);
|
|
31
43
|
__decorate([
|
|
32
44
|
(0, class_validator_1.IsBoolean)(),
|
|
33
45
|
(0, class_validator_1.IsOptional)(),
|
|
46
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
47
|
+
title: 'Is Europe',
|
|
48
|
+
description: 'Whether the country is in Europe.',
|
|
49
|
+
type: 'boolean',
|
|
50
|
+
}),
|
|
34
51
|
__metadata("design:type", Boolean)
|
|
35
52
|
], CountryDto.prototype, "isEurope", 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.ErrorResponseDto = 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 error response.
|
|
16
17
|
* Used to return detailed error information to the client.
|
|
@@ -21,11 +22,25 @@ exports.ErrorResponseDto = ErrorResponseDto;
|
|
|
21
22
|
__decorate([
|
|
22
23
|
(0, class_validator_1.IsString)(),
|
|
23
24
|
(0, class_validator_1.IsNotEmpty)(),
|
|
25
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
26
|
+
title: 'Code',
|
|
27
|
+
description: 'A unique and specific error code for programmatic error handling.',
|
|
28
|
+
type: 'number',
|
|
29
|
+
example: 400,
|
|
30
|
+
}),
|
|
24
31
|
__metadata("design:type", Number)
|
|
25
32
|
], ErrorResponseDto.prototype, "code", void 0);
|
|
26
33
|
__decorate([
|
|
27
34
|
(0, class_validator_1.IsOptional)(),
|
|
28
35
|
(0, class_validator_1.IsArray)(),
|
|
29
36
|
(0, class_validator_1.IsString)({ each: true }),
|
|
37
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
38
|
+
title: 'Errors',
|
|
39
|
+
description: 'A developer-friendly error message or an array of messages.',
|
|
40
|
+
oneOf: [
|
|
41
|
+
{ type: 'string' },
|
|
42
|
+
{ type: 'array', items: { type: 'string' } },
|
|
43
|
+
],
|
|
44
|
+
}),
|
|
30
45
|
__metadata("design:type", Object)
|
|
31
46
|
], ErrorResponseDto.prototype, "errors", void 0);
|
package/dist/dtos/field.dto.d.ts
CHANGED
|
@@ -31,7 +31,15 @@ export declare class FieldDto {
|
|
|
31
31
|
/**
|
|
32
32
|
* Indicates if the field is required
|
|
33
33
|
*/
|
|
34
|
-
required
|
|
34
|
+
required?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Indicates if the field is disabled
|
|
37
|
+
*/
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Indicates if the field is hidden
|
|
41
|
+
*/
|
|
42
|
+
hidden?: boolean;
|
|
35
43
|
/**
|
|
36
44
|
* Regex validation pattern for the field
|
|
37
45
|
*/
|
|
@@ -40,6 +48,14 @@ export declare class FieldDto {
|
|
|
40
48
|
* Error message for the field for supported languages
|
|
41
49
|
*/
|
|
42
50
|
regexValidationErrorMessage?: MultilangTextDto[];
|
|
51
|
+
/**
|
|
52
|
+
* Whether remote validation should be triggered
|
|
53
|
+
*/
|
|
54
|
+
triggersRemoteValidation?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Remote validation error message for supported languages
|
|
57
|
+
*/
|
|
58
|
+
remoteValidationErrorMessage?: MultilangTextDto[];
|
|
43
59
|
/**
|
|
44
60
|
* The item attribute is upgradable
|
|
45
61
|
* If the user has the permission to upgrade the item from his panel
|
package/dist/dtos/field.dto.js
CHANGED
|
@@ -17,15 +17,13 @@ const field_type_enum_1 = require("../enums/field-type.enum");
|
|
|
17
17
|
const multilang_text_dto_1 = require("./multilang-text.dto");
|
|
18
18
|
const field_option_dto_1 = require("./field-option.dto");
|
|
19
19
|
const is_regex_validator_1 = require("../decorators/is-regex.validator");
|
|
20
|
-
const all_or_none_validator_1 = require("../decorators/all-or-none.validator");
|
|
21
|
-
const min_less_or_equal_validator_1 = require("../decorators/min-less-or-equal.validator");
|
|
22
20
|
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
23
21
|
/**
|
|
24
22
|
* Data Transfer Object for a form field.
|
|
25
23
|
* This class defines the structure and properties of a single field
|
|
26
24
|
* that can be used in a user interface form.
|
|
27
25
|
*/
|
|
28
|
-
|
|
26
|
+
class FieldDto {
|
|
29
27
|
constructor() {
|
|
30
28
|
/**
|
|
31
29
|
* The item attribute is upgradable
|
|
@@ -35,7 +33,7 @@ let FieldDto = class FieldDto {
|
|
|
35
33
|
this.upgradable = false;
|
|
36
34
|
this.downgradable = false;
|
|
37
35
|
}
|
|
38
|
-
}
|
|
36
|
+
}
|
|
39
37
|
exports.FieldDto = FieldDto;
|
|
40
38
|
__decorate([
|
|
41
39
|
(0, class_validator_1.IsString)(),
|
|
@@ -106,6 +104,21 @@ __decorate([
|
|
|
106
104
|
}),
|
|
107
105
|
__metadata("design:type", Boolean)
|
|
108
106
|
], FieldDto.prototype, "required", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, class_validator_1.IsBoolean)(),
|
|
109
|
+
(0, class_validator_1.IsDefined)(),
|
|
110
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
111
|
+
title: 'Disabled',
|
|
112
|
+
description: 'Whether the field is disabled.',
|
|
113
|
+
type: 'boolean',
|
|
114
|
+
}),
|
|
115
|
+
__metadata("design:type", Boolean)
|
|
116
|
+
], FieldDto.prototype, "disabled", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
(0, class_validator_1.IsBoolean)(),
|
|
119
|
+
(0, class_validator_1.IsOptional)(),
|
|
120
|
+
__metadata("design:type", Boolean)
|
|
121
|
+
], FieldDto.prototype, "hidden", void 0);
|
|
109
122
|
__decorate([
|
|
110
123
|
(0, class_validator_1.IsString)(),
|
|
111
124
|
(0, is_regex_validator_1.IsRegex)(),
|
|
@@ -122,6 +135,8 @@ __decorate([
|
|
|
122
135
|
(0, class_validator_1.ValidateIf)((o) => !!o.regexValidation),
|
|
123
136
|
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
124
137
|
(0, class_transformer_1.Type)(() => multilang_text_dto_1.MultilangTextDto),
|
|
138
|
+
(0, class_validator_1.IsArray)(),
|
|
139
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
125
140
|
(0, class_validator_1.IsOptional)(),
|
|
126
141
|
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
127
142
|
title: 'Regex Validation Error Message',
|
|
@@ -133,7 +148,27 @@ __decorate([
|
|
|
133
148
|
], FieldDto.prototype, "regexValidationErrorMessage", void 0);
|
|
134
149
|
__decorate([
|
|
135
150
|
(0, class_validator_1.IsBoolean)(),
|
|
136
|
-
(0, class_validator_1.
|
|
151
|
+
(0, class_validator_1.IsOptional)(),
|
|
152
|
+
__metadata("design:type", Boolean)
|
|
153
|
+
], FieldDto.prototype, "triggersRemoteValidation", void 0);
|
|
154
|
+
__decorate([
|
|
155
|
+
(0, class_validator_1.ValidateIf)((o) => !!o.triggersRemoteValidation),
|
|
156
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
157
|
+
(0, class_transformer_1.Type)(() => multilang_text_dto_1.MultilangTextDto),
|
|
158
|
+
(0, class_validator_1.IsArray)(),
|
|
159
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
160
|
+
(0, class_validator_1.IsOptional)(),
|
|
161
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
162
|
+
title: 'Remote Validation Error Message',
|
|
163
|
+
description: 'Localized error message shown when remote validation fails.',
|
|
164
|
+
type: 'array',
|
|
165
|
+
items: { $ref: '#/components/schemas/MultilangTextDto' },
|
|
166
|
+
}),
|
|
167
|
+
__metadata("design:type", Array)
|
|
168
|
+
], FieldDto.prototype, "remoteValidationErrorMessage", void 0);
|
|
169
|
+
__decorate([
|
|
170
|
+
(0, class_validator_1.IsBoolean)(),
|
|
171
|
+
(0, class_validator_1.IsOptional)(),
|
|
137
172
|
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
138
173
|
title: 'Upgradable',
|
|
139
174
|
description: 'Whether the item attribute is upgradable by the user.',
|
|
@@ -143,7 +178,7 @@ __decorate([
|
|
|
143
178
|
], FieldDto.prototype, "upgradable", void 0);
|
|
144
179
|
__decorate([
|
|
145
180
|
(0, class_validator_1.IsBoolean)(),
|
|
146
|
-
(0, class_validator_1.
|
|
181
|
+
(0, class_validator_1.IsOptional)(),
|
|
147
182
|
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
148
183
|
title: 'Downgradable',
|
|
149
184
|
description: 'Whether the item attribute is downgradable by the user.',
|
|
@@ -151,7 +186,3 @@ __decorate([
|
|
|
151
186
|
}),
|
|
152
187
|
__metadata("design:type", Boolean)
|
|
153
188
|
], FieldDto.prototype, "downgradable", void 0);
|
|
154
|
-
exports.FieldDto = FieldDto = __decorate([
|
|
155
|
-
(0, all_or_none_validator_1.AllOrNoneProperty)(['repeatableMin', 'repeatableMax']),
|
|
156
|
-
(0, min_less_or_equal_validator_1.MinLessOrEqualMaxProperty)(['repeatableMin', 'repeatableMax'])
|
|
157
|
-
], FieldDto);
|
package/dist/dtos/info.dto.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { ProductItemActionsEnum } from '../enums/item-actions.enum';
|
|
2
1
|
import { EventsEnum } from '../enums/events.enum';
|
|
3
2
|
import { LanguageEnum } from '../enums/language.enum';
|
|
4
3
|
import { RolesEnum } from '../enums/roles.enum';
|
|
5
4
|
import { AdminPanelDto } from './admin-panel.dto';
|
|
6
5
|
import { ClientPanelDto } from './client-panel.dto';
|
|
7
6
|
import { FieldDto } from './field.dto';
|
|
8
|
-
import { InvoiceTypesEnum } from '../enums/invoice/invoice-types.enum';
|
|
9
7
|
/**
|
|
10
8
|
* DTO for integration information.
|
|
11
9
|
* This is a central DTO that contains all the necessary information
|
|
@@ -32,10 +30,6 @@ export declare class InfoDto {
|
|
|
32
30
|
* A list of languages supported by the integration.
|
|
33
31
|
*/
|
|
34
32
|
supportedLanguages: LanguageEnum[];
|
|
35
|
-
/**
|
|
36
|
-
* A list of actions that are supported by this integration.
|
|
37
|
-
*/
|
|
38
|
-
supportedTypes?: ProductItemActionsEnum[] | InvoiceTypesEnum[];
|
|
39
33
|
/**
|
|
40
34
|
* A list of events that the integration listens to.
|
|
41
35
|
* This allows the integration to react to specific events in the system.
|
package/dist/dtos/info.dto.js
CHANGED
|
@@ -10,7 +10,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.InfoDto = void 0;
|
|
13
|
-
const item_actions_enum_1 = require("../enums/item-actions.enum");
|
|
14
13
|
const events_enum_1 = require("../enums/events.enum");
|
|
15
14
|
const language_enum_1 = require("../enums/language.enum");
|
|
16
15
|
const roles_enum_1 = require("../enums/roles.enum");
|
|
@@ -24,7 +23,6 @@ const client_panel_dto_1 = require("./client-panel.dto");
|
|
|
24
23
|
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
25
24
|
const field_dto_1 = require("./field.dto");
|
|
26
25
|
const unique_field_in_array_validator_1 = require("../decorators/unique-field-in-array.validator");
|
|
27
|
-
const invoice_types_enum_1 = require("../enums/invoice/invoice-types.enum");
|
|
28
26
|
/**
|
|
29
27
|
* DTO for integration information.
|
|
30
28
|
* This is a central DTO that contains all the necessary information
|
|
@@ -32,13 +30,6 @@ const invoice_types_enum_1 = require("../enums/invoice/invoice-types.enum");
|
|
|
32
30
|
* and billing details.
|
|
33
31
|
*/
|
|
34
32
|
class InfoDto {
|
|
35
|
-
constructor() {
|
|
36
|
-
/**
|
|
37
|
-
* A list of actions that are supported by this integration.
|
|
38
|
-
*/
|
|
39
|
-
//TODO Να φυγει απο εδω
|
|
40
|
-
this.supportedTypes = [];
|
|
41
|
-
}
|
|
42
33
|
}
|
|
43
34
|
exports.InfoDto = InfoDto;
|
|
44
35
|
__decorate([
|
|
@@ -89,21 +80,6 @@ __decorate([
|
|
|
89
80
|
}),
|
|
90
81
|
__metadata("design:type", Array)
|
|
91
82
|
], InfoDto.prototype, "supportedLanguages", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
(0, class_validator_1.IsOptional)(),
|
|
94
|
-
(0, class_validator_1.IsArray)(),
|
|
95
|
-
(0, class_validator_1.IsEnum)(item_actions_enum_1.ProductItemActionsEnum, { each: true }),
|
|
96
|
-
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
97
|
-
title: 'Supported Actions',
|
|
98
|
-
description: 'Actions supported by this integration.',
|
|
99
|
-
type: 'array',
|
|
100
|
-
oneOf: [
|
|
101
|
-
{ type: 'string', enum: Object.values(item_actions_enum_1.ProductItemActionsEnum) },
|
|
102
|
-
{ type: 'string', enum: Object.values(invoice_types_enum_1.InvoiceTypesEnum) }
|
|
103
|
-
]
|
|
104
|
-
}),
|
|
105
|
-
__metadata("design:type", Array)
|
|
106
|
-
], InfoDto.prototype, "supportedTypes", void 0);
|
|
107
83
|
__decorate([
|
|
108
84
|
(0, class_validator_1.IsOptional)(),
|
|
109
85
|
(0, class_validator_1.IsArray)(),
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.InvoiceItemDataDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
+
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
14
15
|
const invoice_item_actions_enum_1 = require("../../enums/invoice/invoice-item-actions.enum");
|
|
15
16
|
const item_data_dto_1 = require("../item-data.dto");
|
|
16
17
|
/**
|
|
@@ -23,5 +24,11 @@ exports.InvoiceItemDataDto = InvoiceItemDataDto;
|
|
|
23
24
|
__decorate([
|
|
24
25
|
(0, class_validator_1.IsDefined)(),
|
|
25
26
|
(0, class_validator_1.IsEnum)(invoice_item_actions_enum_1.InvoiceItemActionsEnum),
|
|
27
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
28
|
+
title: 'Action',
|
|
29
|
+
description: 'Invoice-specific action type for this item.',
|
|
30
|
+
type: 'string',
|
|
31
|
+
enum: Object.values(invoice_item_actions_enum_1.InvoiceItemActionsEnum),
|
|
32
|
+
}),
|
|
26
33
|
__metadata("design:type", String)
|
|
27
34
|
], InvoiceItemDataDto.prototype, "action", 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.CreditNoteRequestDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
+
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
14
15
|
const proforma_invoice_request_dto_1 = require("./proforma-invoice-request.dto");
|
|
15
16
|
/**
|
|
16
17
|
* Request payload for creating a credit note.
|
|
@@ -22,5 +23,10 @@ exports.CreditNoteRequestDto = CreditNoteRequestDto;
|
|
|
22
23
|
__decorate([
|
|
23
24
|
(0, class_validator_1.IsOptional)(),
|
|
24
25
|
(0, class_validator_1.IsString)(),
|
|
26
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
27
|
+
title: 'Parent Invoice ID',
|
|
28
|
+
description: 'Reference to the parent invoice being credited.',
|
|
29
|
+
type: 'string',
|
|
30
|
+
}),
|
|
25
31
|
__metadata("design:type", String)
|
|
26
32
|
], CreditNoteRequestDto.prototype, "parentInvoiceId", 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.InvoiceRequestDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
+
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
14
15
|
const proforma_invoice_request_dto_1 = require("./proforma-invoice-request.dto");
|
|
15
16
|
/**
|
|
16
17
|
* Request payload for creating a standard invoice.
|
|
@@ -22,5 +23,10 @@ exports.InvoiceRequestDto = InvoiceRequestDto;
|
|
|
22
23
|
__decorate([
|
|
23
24
|
(0, class_validator_1.IsOptional)(),
|
|
24
25
|
(0, class_validator_1.IsString)(),
|
|
26
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
27
|
+
title: 'Parent Invoice ID',
|
|
28
|
+
description: 'Reference to parent invoice if applicable.',
|
|
29
|
+
type: 'string',
|
|
30
|
+
}),
|
|
25
31
|
__metadata("design:type", String)
|
|
26
32
|
], InvoiceRequestDto.prototype, "parentInvoiceId", void 0);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { InvoiceContactData } from "../../invoice-contact-data.dto";
|
|
2
2
|
import { InvoiceItemDataDto } from "../invoice-item-data.dto";
|
|
3
3
|
import { TransactionData } from "../transaction-data.dto";
|
|
4
|
+
import { CountryEnum } from '../../../enums/country.enum';
|
|
4
5
|
/**
|
|
5
6
|
* Request payload for creating a proforma invoice.
|
|
6
7
|
* Sent from hoster.ai to invoice integrations to issue a proforma document.
|
|
@@ -10,6 +11,8 @@ export declare class ProformaInvoiceRequestDto {
|
|
|
10
11
|
invoiceId: string;
|
|
11
12
|
/** Company identifier issuing the invoice */
|
|
12
13
|
companyId: string;
|
|
14
|
+
/** Country where the company is registered */
|
|
15
|
+
companyCountry: CountryEnum;
|
|
13
16
|
/** List of transactions associated with this invoice */
|
|
14
17
|
transactions: TransactionData[];
|
|
15
18
|
/** Billing contact information for the invoice recipient */
|
|
@@ -12,9 +12,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ProformaInvoiceRequestDto = 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 invoice_contact_data_dto_1 = require("../../invoice-contact-data.dto");
|
|
16
17
|
const invoice_item_data_dto_1 = require("../invoice-item-data.dto");
|
|
17
18
|
const transaction_data_dto_1 = require("../transaction-data.dto");
|
|
19
|
+
const country_enum_1 = require("../../../enums/country.enum");
|
|
18
20
|
/**
|
|
19
21
|
* Request payload for creating a proforma invoice.
|
|
20
22
|
* Sent from hoster.ai to invoice integrations to issue a proforma document.
|
|
@@ -23,34 +25,80 @@ class ProformaInvoiceRequestDto {
|
|
|
23
25
|
}
|
|
24
26
|
exports.ProformaInvoiceRequestDto = ProformaInvoiceRequestDto;
|
|
25
27
|
__decorate([
|
|
28
|
+
(0, class_validator_1.IsDefined)(),
|
|
26
29
|
(0, class_validator_1.IsString)(),
|
|
27
|
-
(0,
|
|
30
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
31
|
+
title: 'Invoice ID',
|
|
32
|
+
description: 'Unique identifier for the invoice.',
|
|
33
|
+
type: 'string',
|
|
34
|
+
}),
|
|
28
35
|
__metadata("design:type", String)
|
|
29
36
|
], ProformaInvoiceRequestDto.prototype, "invoiceId", void 0);
|
|
30
37
|
__decorate([
|
|
38
|
+
(0, class_validator_1.IsDefined)(),
|
|
31
39
|
(0, class_validator_1.IsString)(),
|
|
32
|
-
(0,
|
|
40
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
41
|
+
title: 'Company ID',
|
|
42
|
+
description: 'Company identifier issuing the invoice.',
|
|
43
|
+
type: 'string',
|
|
44
|
+
}),
|
|
33
45
|
__metadata("design:type", String)
|
|
34
46
|
], ProformaInvoiceRequestDto.prototype, "companyId", void 0);
|
|
35
47
|
__decorate([
|
|
48
|
+
(0, class_validator_1.IsDefined)(),
|
|
49
|
+
(0, class_validator_1.IsEnum)(country_enum_1.CountryEnum),
|
|
50
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
51
|
+
title: 'Company Country',
|
|
52
|
+
description: 'Country where the company is registered.',
|
|
53
|
+
type: 'string',
|
|
54
|
+
enum: Object.values(country_enum_1.CountryEnum),
|
|
55
|
+
}),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], ProformaInvoiceRequestDto.prototype, "companyCountry", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, class_validator_1.IsDefined)(),
|
|
36
60
|
(0, class_validator_1.IsArray)(),
|
|
37
61
|
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
38
62
|
(0, class_transformer_1.Type)(() => transaction_data_dto_1.TransactionData),
|
|
63
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
64
|
+
title: 'Transactions',
|
|
65
|
+
description: 'List of transactions associated with this invoice.',
|
|
66
|
+
type: 'array',
|
|
67
|
+
items: { $ref: '#/components/schemas/TransactionData' },
|
|
68
|
+
}),
|
|
39
69
|
__metadata("design:type", Array)
|
|
40
70
|
], ProformaInvoiceRequestDto.prototype, "transactions", void 0);
|
|
41
71
|
__decorate([
|
|
72
|
+
(0, class_validator_1.IsDefined)(),
|
|
42
73
|
(0, class_validator_1.ValidateNested)(),
|
|
43
74
|
(0, class_transformer_1.Type)(() => invoice_contact_data_dto_1.InvoiceContactData),
|
|
75
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
76
|
+
title: 'Invoice Contact',
|
|
77
|
+
description: 'Billing contact information for the invoice recipient.',
|
|
78
|
+
$ref: '#/components/schemas/InvoiceContactData',
|
|
79
|
+
}),
|
|
44
80
|
__metadata("design:type", invoice_contact_data_dto_1.InvoiceContactData)
|
|
45
81
|
], ProformaInvoiceRequestDto.prototype, "invoiceContact", void 0);
|
|
46
82
|
__decorate([
|
|
83
|
+
(0, class_validator_1.IsDefined)(),
|
|
47
84
|
(0, class_validator_1.IsArray)(),
|
|
48
85
|
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
49
86
|
(0, class_transformer_1.Type)(() => invoice_item_data_dto_1.InvoiceItemDataDto),
|
|
87
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
88
|
+
title: 'Items',
|
|
89
|
+
description: 'Line items included in the invoice.',
|
|
90
|
+
type: 'array',
|
|
91
|
+
items: { $ref: '#/components/schemas/InvoiceItemDataDto' },
|
|
92
|
+
}),
|
|
50
93
|
__metadata("design:type", Array)
|
|
51
94
|
], ProformaInvoiceRequestDto.prototype, "items", void 0);
|
|
52
95
|
__decorate([
|
|
96
|
+
(0, class_validator_1.IsDefined)(),
|
|
53
97
|
(0, class_validator_1.IsNumber)(),
|
|
54
|
-
(0,
|
|
98
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
99
|
+
title: 'Total Amount',
|
|
100
|
+
description: 'Total invoice amount.',
|
|
101
|
+
type: 'number',
|
|
102
|
+
}),
|
|
55
103
|
__metadata("design:type", Number)
|
|
56
104
|
], ProformaInvoiceRequestDto.prototype, "totalAmount", void 0);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { CountryEnum } from '../../../enums/country.enum';
|
|
2
|
+
/**
|
|
3
|
+
* Request payload for calculating tax details.
|
|
4
|
+
* Contains company and customer location information for tax rate determination.
|
|
5
|
+
*/
|
|
6
|
+
export declare class TaxDetailsRequestDto {
|
|
7
|
+
/**
|
|
8
|
+
* Country where the company is registered
|
|
9
|
+
*/
|
|
10
|
+
companyCountry: CountryEnum;
|
|
11
|
+
/**
|
|
12
|
+
* Country where the customer is located
|
|
13
|
+
*/
|
|
14
|
+
customerCountry: CountryEnum;
|
|
15
|
+
/**
|
|
16
|
+
* Customer's Tax Identification Number
|
|
17
|
+
*/
|
|
18
|
+
customerTIN: string;
|
|
19
|
+
/**
|
|
20
|
+
* Customer's postal code
|
|
21
|
+
*/
|
|
22
|
+
customerPostalCode?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Customer's state or province
|
|
25
|
+
*/
|
|
26
|
+
customerState?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Indicates whether the customer address has been validated
|
|
29
|
+
*/
|
|
30
|
+
validatedAddress?: boolean;
|
|
31
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.TaxDetailsRequestDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const country_enum_1 = require("../../../enums/country.enum");
|
|
15
|
+
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
16
|
+
/**
|
|
17
|
+
* Request payload for calculating tax details.
|
|
18
|
+
* Contains company and customer location information for tax rate determination.
|
|
19
|
+
*/
|
|
20
|
+
class TaxDetailsRequestDto {
|
|
21
|
+
}
|
|
22
|
+
exports.TaxDetailsRequestDto = TaxDetailsRequestDto;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsDefined)(),
|
|
25
|
+
(0, class_validator_1.IsEnum)(country_enum_1.CountryEnum),
|
|
26
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
27
|
+
title: 'Company Country',
|
|
28
|
+
description: 'Country where the company is registered.',
|
|
29
|
+
type: 'string',
|
|
30
|
+
enum: Object.values(country_enum_1.CountryEnum),
|
|
31
|
+
}),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], TaxDetailsRequestDto.prototype, "companyCountry", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_validator_1.IsDefined)(),
|
|
36
|
+
(0, class_validator_1.IsEnum)(country_enum_1.CountryEnum),
|
|
37
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
38
|
+
title: 'Customer Country',
|
|
39
|
+
description: 'Country where the customer is located.',
|
|
40
|
+
type: 'string',
|
|
41
|
+
enum: Object.values(country_enum_1.CountryEnum),
|
|
42
|
+
}),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], TaxDetailsRequestDto.prototype, "customerCountry", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_validator_1.IsDefined)(),
|
|
47
|
+
(0, class_validator_1.IsString)(),
|
|
48
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
49
|
+
title: 'Customer TIN',
|
|
50
|
+
description: 'Customer\'s Tax Identification Number.',
|
|
51
|
+
type: 'string',
|
|
52
|
+
}),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], TaxDetailsRequestDto.prototype, "customerTIN", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, class_validator_1.IsOptional)(),
|
|
57
|
+
(0, class_validator_1.IsString)(),
|
|
58
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
59
|
+
title: 'Customer Postal Code',
|
|
60
|
+
description: 'Customer\'s postal code.',
|
|
61
|
+
type: 'string',
|
|
62
|
+
}),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], TaxDetailsRequestDto.prototype, "customerPostalCode", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, class_validator_1.IsOptional)(),
|
|
67
|
+
(0, class_validator_1.IsString)(),
|
|
68
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
69
|
+
title: 'Customer State',
|
|
70
|
+
description: 'Customer\'s state or province.',
|
|
71
|
+
type: 'string',
|
|
72
|
+
}),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], TaxDetailsRequestDto.prototype, "customerState", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, class_validator_1.IsOptional)(),
|
|
77
|
+
(0, class_validator_1.IsBoolean)(),
|
|
78
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
79
|
+
title: 'Validated Address',
|
|
80
|
+
description: 'Whether the customer address has been validated.',
|
|
81
|
+
type: 'boolean',
|
|
82
|
+
}),
|
|
83
|
+
__metadata("design:type", Boolean)
|
|
84
|
+
], TaxDetailsRequestDto.prototype, "validatedAddress", void 0);
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ProformaInvoiceResponseDto = 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
|
* Response from invoice integrations after successfully creating a proforma invoice.
|
|
16
17
|
* Contains the generated invoice details and access URL.
|
|
@@ -21,15 +22,31 @@ exports.ProformaInvoiceResponseDto = ProformaInvoiceResponseDto;
|
|
|
21
22
|
__decorate([
|
|
22
23
|
(0, class_validator_1.IsUrl)(),
|
|
23
24
|
(0, class_validator_1.IsNotEmpty)(),
|
|
25
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
26
|
+
title: 'Invoice URL',
|
|
27
|
+
description: 'URL to access the generated invoice document.',
|
|
28
|
+
type: 'string',
|
|
29
|
+
format: 'uri',
|
|
30
|
+
}),
|
|
24
31
|
__metadata("design:type", String)
|
|
25
32
|
], ProformaInvoiceResponseDto.prototype, "invoiceUrl", void 0);
|
|
26
33
|
__decorate([
|
|
27
34
|
(0, class_validator_1.IsString)(),
|
|
28
35
|
(0, class_validator_1.IsNotEmpty)(),
|
|
36
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
37
|
+
title: 'Invoice Number',
|
|
38
|
+
description: 'Invoice number assigned by the integration.',
|
|
39
|
+
type: 'string',
|
|
40
|
+
}),
|
|
29
41
|
__metadata("design:type", String)
|
|
30
42
|
], ProformaInvoiceResponseDto.prototype, "invoiceNumber", void 0);
|
|
31
43
|
__decorate([
|
|
32
44
|
(0, class_validator_1.IsString)(),
|
|
33
45
|
(0, class_validator_1.IsNotEmpty)(),
|
|
46
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
47
|
+
title: 'Invoice ID',
|
|
48
|
+
description: 'Unique identifier for the invoice in the integration system.',
|
|
49
|
+
type: 'string',
|
|
50
|
+
}),
|
|
34
51
|
__metadata("design:type", String)
|
|
35
52
|
], ProformaInvoiceResponseDto.prototype, "invoiceId", void 0);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseResponse } from '../../base-response.dto';
|
|
2
|
+
import { TINValidationDetails } from '../tin-validation-details.dto';
|
|
3
|
+
/**
|
|
4
|
+
* Represents the response containing tax calculation details.
|
|
5
|
+
* Includes VAT rate and optional TIN validation information.
|
|
6
|
+
*/
|
|
7
|
+
export declare class TaxDetailsResponseDto extends BaseResponse {
|
|
8
|
+
/**
|
|
9
|
+
* The applicable VAT rate for the transaction
|
|
10
|
+
*/
|
|
11
|
+
vatRate: number;
|
|
12
|
+
/**
|
|
13
|
+
* Indicates whether the Tax Identification Number is valid
|
|
14
|
+
*/
|
|
15
|
+
TINValid?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Detailed tax validation information including company details
|
|
18
|
+
*/
|
|
19
|
+
taxDetails?: TINValidationDetails;
|
|
20
|
+
}
|