@hosterai/types 0.0.25 → 0.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/README.md +49 -8
  2. package/dist/dtos/addon-field.dto.d.ts +7 -0
  3. package/dist/dtos/addon-field.dto.js +11 -0
  4. package/dist/dtos/attachment.dto.js +17 -0
  5. package/dist/dtos/attribute-field.dto.d.ts +19 -0
  6. package/dist/dtos/attribute-field.dto.js +64 -0
  7. package/dist/dtos/base-response.dto.js +11 -0
  8. package/dist/dtos/client-data.dto.js +82 -0
  9. package/dist/dtos/company-data.dto.js +97 -0
  10. package/dist/dtos/country.dto.d.ts +7 -0
  11. package/dist/dtos/country.dto.js +21 -0
  12. package/dist/dtos/error-response.dto.js +15 -0
  13. package/dist/dtos/field.dto.d.ts +8 -13
  14. package/dist/dtos/field.dto.js +22 -47
  15. package/dist/dtos/info.dto.d.ts +0 -5
  16. package/dist/dtos/info.dto.js +0 -19
  17. package/dist/dtos/invoice/invoice-info.dto.d.ts +15 -0
  18. package/dist/dtos/invoice/invoice-info.dto.js +42 -0
  19. package/dist/dtos/invoice/invoice-item-data.dto.d.ts +10 -0
  20. package/dist/dtos/invoice/invoice-item-data.dto.js +34 -0
  21. package/dist/dtos/invoice/requests/credit-note-request.dto.d.ts +9 -0
  22. package/dist/dtos/invoice/requests/credit-note-request.dto.js +32 -0
  23. package/dist/dtos/invoice/requests/invoice-request.dto.d.ts +9 -0
  24. package/dist/dtos/invoice/requests/invoice-request.dto.js +32 -0
  25. package/dist/dtos/invoice/requests/proforma-invoice-request.dto.d.ts +24 -0
  26. package/dist/dtos/invoice/requests/proforma-invoice-request.dto.js +104 -0
  27. package/dist/dtos/invoice/requests/tax-details-request.dto.d.ts +31 -0
  28. package/dist/dtos/invoice/requests/tax-details-request.dto.js +84 -0
  29. package/dist/dtos/invoice/responses/credit-note-response.dto.d.ts +7 -0
  30. package/dist/dtos/invoice/responses/credit-note-response.dto.js +11 -0
  31. package/dist/dtos/invoice/responses/invoice-response.dto.d.ts +7 -0
  32. package/dist/dtos/invoice/responses/invoice-response.dto.js +11 -0
  33. package/dist/dtos/invoice/responses/proforma-invoice-response.dto.d.ts +12 -0
  34. package/dist/dtos/invoice/responses/proforma-invoice-response.dto.js +52 -0
  35. package/dist/dtos/invoice/responses/tax-details-response.dto.d.ts +20 -0
  36. package/dist/dtos/invoice/responses/tax-details-response.dto.js +56 -0
  37. package/dist/dtos/invoice/tin-validation-details.dto.d.ts +51 -0
  38. package/dist/dtos/invoice/tin-validation-details.dto.js +165 -0
  39. package/dist/dtos/invoice/transaction-data.dto.d.ts +14 -0
  40. package/dist/dtos/invoice/transaction-data.dto.js +64 -0
  41. package/dist/dtos/invoice-contact-data.dto.d.ts +43 -0
  42. package/dist/dtos/invoice-contact-data.dto.js +222 -0
  43. package/dist/dtos/item-data.dto.d.ts +44 -0
  44. package/dist/dtos/item-data.dto.js +131 -0
  45. package/dist/dtos/jwt.dto.js +27 -0
  46. package/dist/dtos/multilang-text.dto.js +12 -0
  47. package/dist/dtos/notification/receiver/receiver-email.dto.js +19 -0
  48. package/dist/dtos/notification/receiver/receiver-sms.dto.js +7 -0
  49. package/dist/dtos/notification/requests/notification-send-request.dto.d.ts +18 -0
  50. package/dist/dtos/notification/requests/notification-send-request.dto.js +90 -0
  51. package/dist/dtos/notification/responses/notification-send-response.dto.d.ts +9 -0
  52. package/dist/dtos/notification/responses/notification-send-response.dto.js +32 -0
  53. package/dist/dtos/notification/sender/sender-email.dto.js +26 -0
  54. package/dist/dtos/notification/sender/sender-push.dto.js +36 -0
  55. package/dist/dtos/notification/sender/sender-sms.dto.js +11 -0
  56. package/dist/dtos/product/product-info.dto.d.ts +8 -3
  57. package/dist/dtos/product/product-info.dto.js +25 -5
  58. package/dist/dtos/product/product-item-data.dto.d.ts +7 -28
  59. package/dist/dtos/product/product-item-data.dto.js +14 -23
  60. package/dist/dtos/product/requests/product-create-request.dto.js +11 -0
  61. package/dist/dtos/product/requests/product-delete-request.dto.js +11 -0
  62. package/dist/dtos/product/requests/product-downgradable-request.dto.js +11 -0
  63. package/dist/dtos/product/requests/product-downgrade-request.dto.js +16 -0
  64. package/dist/dtos/product/requests/product-renew-request.dto.js +11 -0
  65. package/dist/dtos/product/requests/product-suspend-request.dto.js +11 -0
  66. package/dist/dtos/product/requests/product-unsuspend-request.dto.js +11 -0
  67. package/dist/dtos/product/requests/product-upgradable-request.dto.js +11 -0
  68. package/dist/dtos/product/requests/product-upgrade-request.dto.js +16 -0
  69. package/dist/dtos/product/responses/product-create-response.dto.js +37 -0
  70. package/dist/dtos/product/responses/product-delete-response.dto.js +37 -0
  71. package/dist/dtos/product/responses/product-downgradable-response.dto.js +37 -0
  72. package/dist/dtos/product/responses/product-downgrade-response.dto.js +37 -0
  73. package/dist/dtos/product/responses/product-info-response.dto.js +23 -0
  74. package/dist/dtos/product/responses/product-renew-response.dto.js +37 -0
  75. package/dist/dtos/product/responses/product-suspend-response.dto.js +37 -0
  76. package/dist/dtos/product/responses/product-unsuspend-response.dto.js +37 -0
  77. package/dist/dtos/product/responses/product-upgradable-response.dto.js +37 -0
  78. package/dist/dtos/product/responses/product-upgrade-response.dto.js +37 -0
  79. package/dist/dtos/requests/validate-attributes-request.dto.js +12 -0
  80. package/dist/dtos/response-data.dto.js +19 -0
  81. package/dist/dtos/responses/validate-attributes-response.dto.js +25 -0
  82. package/dist/dtos/settings.dto.d.ts +18 -0
  83. package/dist/dtos/settings.dto.js +19 -2
  84. package/dist/dtos/setup-status-response.dto.js +20 -0
  85. package/dist/dtos/success-response.dto.d.ts +0 -4
  86. package/dist/dtos/success-response.dto.js +0 -14
  87. package/dist/enums/invoice/invoice-item-actions.enum.d.ts +8 -0
  88. package/dist/enums/invoice/invoice-item-actions.enum.js +12 -0
  89. package/dist/enums/invoice/invoice-types.enum.d.ts +5 -0
  90. package/dist/enums/invoice/invoice-types.enum.js +9 -0
  91. package/dist/enums/item-actions.enum.d.ts +11 -0
  92. package/dist/enums/item-actions.enum.js +16 -0
  93. package/dist/index.d.ts +36 -5
  94. package/dist/index.js +37 -7
  95. package/dist/openapi/schemas/components.schemas.d.ts +152 -49
  96. package/dist/openapi/schemas/components.schemas.js +191 -89
  97. package/dist/validators/addon-field-validator.d.ts +9 -0
  98. package/dist/validators/addon-field-validator.js +14 -0
  99. package/dist/validators/addon-field-validator.spec.d.ts +1 -0
  100. package/dist/validators/addon-field-validator.spec.js +38 -0
  101. package/dist/validators/attachment-validator.d.ts +8 -0
  102. package/dist/validators/attachment-validator.js +17 -0
  103. package/dist/validators/attachment-validator.spec.d.ts +1 -0
  104. package/dist/validators/attachment-validator.spec.js +58 -0
  105. package/dist/validators/attribute-field-validator.d.ts +8 -0
  106. package/dist/validators/attribute-field-validator.js +17 -0
  107. package/dist/validators/attribute-field-validator.spec.d.ts +1 -0
  108. package/dist/validators/attribute-field-validator.spec.js +84 -0
  109. package/dist/validators/country-validator.d.ts +8 -0
  110. package/dist/validators/country-validator.js +17 -0
  111. package/dist/validators/country-validator.spec.d.ts +1 -0
  112. package/dist/validators/country-validator.spec.js +58 -0
  113. package/dist/validators/field-validator.spec.js +1 -29
  114. package/dist/validators/info-validator.d.ts +8 -0
  115. package/dist/validators/info-validator.js +17 -0
  116. package/dist/validators/info-validator.spec.d.ts +1 -0
  117. package/dist/validators/info-validator.spec.js +85 -0
  118. package/dist/validators/invoice-contact-data-validator.d.ts +8 -0
  119. package/dist/validators/invoice-contact-data-validator.js +17 -0
  120. package/dist/validators/invoice-contact-data-validator.spec.d.ts +1 -0
  121. package/dist/validators/invoice-contact-data-validator.spec.js +88 -0
  122. package/dist/validators/invoice-info-validator.d.ts +8 -0
  123. package/dist/validators/invoice-info-validator.js +17 -0
  124. package/dist/validators/invoice-info-validator.spec.d.ts +1 -0
  125. package/dist/validators/invoice-info-validator.spec.js +81 -0
  126. package/dist/validators/invoice-item-data-validator.d.ts +8 -0
  127. package/dist/validators/invoice-item-data-validator.js +17 -0
  128. package/dist/validators/invoice-item-data-validator.spec.d.ts +1 -0
  129. package/dist/validators/invoice-item-data-validator.spec.js +45 -0
  130. package/dist/validators/item-data-validator.d.ts +8 -0
  131. package/dist/validators/item-data-validator.js +17 -0
  132. package/dist/validators/item-data-validator.spec.d.ts +1 -0
  133. package/dist/validators/item-data-validator.spec.js +79 -0
  134. package/dist/validators/notification-info-validator.spec.js +6 -6
  135. package/dist/validators/notification-request-validator.js +2 -2
  136. package/dist/validators/product-create-request-validator.js +1 -1
  137. package/dist/validators/product-delete-request-validator.js +1 -1
  138. package/dist/validators/product-downgradable-request-validator.js +1 -1
  139. package/dist/validators/product-downgrade-request-validator.js +1 -1
  140. package/dist/validators/product-info-validator.spec.js +20 -28
  141. package/dist/validators/product-item-data-validator.d.ts +8 -0
  142. package/dist/validators/product-item-data-validator.js +17 -0
  143. package/dist/validators/product-item-data-validator.spec.d.ts +1 -0
  144. package/dist/validators/product-item-data-validator.spec.js +60 -0
  145. package/dist/validators/product-renew-request-validator.js +1 -1
  146. package/dist/validators/product-suspend-request-validator.js +1 -1
  147. package/dist/validators/product-unsuspend-request-validator.js +1 -1
  148. package/dist/validators/product-upgradable-request-validator.js +1 -1
  149. package/dist/validators/product-upgrade-request-validator.js +1 -1
  150. package/dist/validators/tab-validator.d.ts +8 -0
  151. package/dist/validators/tab-validator.js +17 -0
  152. package/dist/validators/tab-validator.spec.d.ts +1 -0
  153. package/dist/validators/tab-validator.spec.js +49 -0
  154. package/dist/validators/tin-validation-details-validator.d.ts +8 -0
  155. package/dist/validators/tin-validation-details-validator.js +17 -0
  156. package/dist/validators/tin-validation-details-validator.spec.d.ts +1 -0
  157. package/dist/validators/tin-validation-details-validator.spec.js +77 -0
  158. package/dist/validators/transaction-data-validator.d.ts +8 -0
  159. package/dist/validators/transaction-data-validator.js +17 -0
  160. package/dist/validators/transaction-data-validator.spec.d.ts +1 -0
  161. package/dist/validators/transaction-data-validator.spec.js +62 -0
  162. package/package.json +1 -1
@@ -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);
@@ -0,0 +1,7 @@
1
+ import { ProformaInvoiceResponseDto } from "./proforma-invoice-response.dto";
2
+ /**
3
+ * Response from invoice integrations after successfully creating a credit note.
4
+ * Maintains consistency with request/response naming (CreditNoteRequest → CreditNoteResponse).
5
+ */
6
+ export declare class CreditNoteResponseDto extends ProformaInvoiceResponseDto {
7
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreditNoteResponseDto = void 0;
4
+ const proforma_invoice_response_dto_1 = require("./proforma-invoice-response.dto");
5
+ /**
6
+ * Response from invoice integrations after successfully creating a credit note.
7
+ * Maintains consistency with request/response naming (CreditNoteRequest → CreditNoteResponse).
8
+ */
9
+ class CreditNoteResponseDto extends proforma_invoice_response_dto_1.ProformaInvoiceResponseDto {
10
+ }
11
+ exports.CreditNoteResponseDto = CreditNoteResponseDto;
@@ -0,0 +1,7 @@
1
+ import { ProformaInvoiceResponseDto } from "./proforma-invoice-response.dto";
2
+ /**
3
+ * Response from invoice integrations after successfully creating a standard invoice.
4
+ * Maintains consistency with request/response naming (InvoiceRequest → InvoiceResponse).
5
+ */
6
+ export declare class InvoiceResponseDto extends ProformaInvoiceResponseDto {
7
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InvoiceResponseDto = void 0;
4
+ const proforma_invoice_response_dto_1 = require("./proforma-invoice-response.dto");
5
+ /**
6
+ * Response from invoice integrations after successfully creating a standard invoice.
7
+ * Maintains consistency with request/response naming (InvoiceRequest → InvoiceResponse).
8
+ */
9
+ class InvoiceResponseDto extends proforma_invoice_response_dto_1.ProformaInvoiceResponseDto {
10
+ }
11
+ exports.InvoiceResponseDto = InvoiceResponseDto;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Response from invoice integrations after successfully creating a proforma invoice.
3
+ * Contains the generated invoice details and access URL.
4
+ */
5
+ export declare class ProformaInvoiceResponseDto {
6
+ /** URL to access the generated invoice document */
7
+ invoiceUrl: string;
8
+ /** Invoice number assigned by the integration */
9
+ invoiceNumber: string;
10
+ /** Unique identifier for the invoice in the integration system */
11
+ invoiceId: string;
12
+ }
@@ -0,0 +1,52 @@
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.ProformaInvoiceResponseDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const class_validator_jsonschema_1 = require("class-validator-jsonschema");
15
+ /**
16
+ * Response from invoice integrations after successfully creating a proforma invoice.
17
+ * Contains the generated invoice details and access URL.
18
+ */
19
+ class ProformaInvoiceResponseDto {
20
+ }
21
+ exports.ProformaInvoiceResponseDto = ProformaInvoiceResponseDto;
22
+ __decorate([
23
+ (0, class_validator_1.IsUrl)(),
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
+ }),
31
+ __metadata("design:type", String)
32
+ ], ProformaInvoiceResponseDto.prototype, "invoiceUrl", void 0);
33
+ __decorate([
34
+ (0, class_validator_1.IsString)(),
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
+ }),
41
+ __metadata("design:type", String)
42
+ ], ProformaInvoiceResponseDto.prototype, "invoiceNumber", void 0);
43
+ __decorate([
44
+ (0, class_validator_1.IsString)(),
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
+ }),
51
+ __metadata("design:type", String)
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
+ }
@@ -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);
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Transaction details related to the invoice.
3
+ * Contains payment and transaction information for the document being issued.
4
+ */
5
+ export declare class TransactionData {
6
+ /** Unique identifier for the transaction */
7
+ transactionId: string;
8
+ /** Transaction amount */
9
+ amount: number;
10
+ /** Payment method used for the transaction */
11
+ paymentMethod: string;
12
+ /** Transaction date */
13
+ date: Date;
14
+ }
@@ -0,0 +1,64 @@
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.TransactionData = 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
+ /**
17
+ * Transaction details related to the invoice.
18
+ * Contains payment and transaction information for the document being issued.
19
+ */
20
+ class TransactionData {
21
+ }
22
+ exports.TransactionData = TransactionData;
23
+ __decorate([
24
+ (0, class_validator_1.IsString)(),
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
+ }),
31
+ __metadata("design:type", String)
32
+ ], TransactionData.prototype, "transactionId", void 0);
33
+ __decorate([
34
+ (0, class_validator_1.IsNumber)(),
35
+ (0, class_validator_1.IsNotEmpty)(),
36
+ (0, class_validator_jsonschema_1.JSONSchema)({
37
+ title: 'Amount',
38
+ description: 'Transaction amount.',
39
+ type: 'number',
40
+ }),
41
+ __metadata("design:type", Number)
42
+ ], TransactionData.prototype, "amount", void 0);
43
+ __decorate([
44
+ (0, class_validator_1.IsString)(),
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
+ }),
51
+ __metadata("design:type", String)
52
+ ], TransactionData.prototype, "paymentMethod", void 0);
53
+ __decorate([
54
+ (0, class_validator_1.IsDate)(),
55
+ (0, class_validator_1.IsNotEmpty)(),
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
+ }),
63
+ __metadata("design:type", Date)
64
+ ], TransactionData.prototype, "date", void 0);
@@ -0,0 +1,43 @@
1
+ import { CountryEnum } from "../enums/country.enum";
2
+ /**
3
+ * Billing contact information sent from hoster.ai to invoice integrations.
4
+ * Contains the details of the person or business for whom an invoice will be issued.
5
+ */
6
+ export declare class InvoiceContactData {
7
+ /** Unique identifier for the invoice contact */
8
+ invoiceContactId: string;
9
+ /** Whether this is a business contact (true) or individual person (false) */
10
+ isBusinessContact: boolean;
11
+ /** Contact's first name */
12
+ firstName: string;
13
+ /** Contact's last name */
14
+ lastName: string;
15
+ /** Business name (required when isBusinessContact is true) */
16
+ businessName?: string;
17
+ /** Contact's email address */
18
+ email: string;
19
+ /** Primary telephone number in international format (e.g., +30.2101234567) */
20
+ telephone: string;
21
+ /** Mobile phone number in international format (e.g., +30.6901234567) */
22
+ mobile?: string;
23
+ /** Primary address line (street, number) */
24
+ address1: string;
25
+ /** Secondary address line (building, floor, apartment) */
26
+ address2?: string;
27
+ /** Additional address information */
28
+ address3?: string;
29
+ /** Postal/ZIP code */
30
+ postcode: string;
31
+ /** City name */
32
+ city: string;
33
+ /** Country code */
34
+ country: CountryEnum;
35
+ /** State/province/region (for countries that use this) */
36
+ state?: string;
37
+ /** Tax Identification Number (TIN/VAT number) */
38
+ tin?: string;
39
+ /** Tax office name or code */
40
+ taxOffice?: string;
41
+ /** Contact's profession or business activity */
42
+ profession?: string;
43
+ }