@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
package/README.md
CHANGED
|
@@ -61,7 +61,11 @@ DTOs define the shape of data that is exchanged between different parts of the s
|
|
|
61
61
|
- `country.dto.ts`: Represents country metadata (name, ISO code, Europe flag).
|
|
62
62
|
- `error-response.dto.ts`: Defines the structure for error responses.
|
|
63
63
|
- `field.dto.ts`: Represents a generic field for forms or dynamic data.
|
|
64
|
+
- `attribute-field.dto.ts`: Extends `FieldDto` with product-specific attributes (visibleInOrder, visibleInClientPanel, repeatableMin, repeatableMax).
|
|
65
|
+
- `addon-field.dto.ts`: Extends `FieldDto` for seller-defined checkout fields.
|
|
64
66
|
- `field-option.dto.ts`: Represents options for form fields (used for checkboxes, radioboxes, and selects).
|
|
67
|
+
- `item-data.dto.ts`: Represents the data of a specific product item (IDs, attributes, dates, pricing).
|
|
68
|
+
- `invoice-contact-data.dto.ts`: Billing contact information for invoice integrations.
|
|
65
69
|
- `info.dto.ts`: Contains all necessary information for a service integration.
|
|
66
70
|
- `jwt.dto.ts`: DTOs related to JSON Web Tokens.
|
|
67
71
|
- `menu.dto.ts`: Defines the structure for menu items.
|
|
@@ -74,13 +78,13 @@ DTOs define the shape of data that is exchanged between different parts of the s
|
|
|
74
78
|
- `success-response.dto.ts`: Defines the structure for successful API responses.
|
|
75
79
|
- `tab.dto.ts`: Represents a tab in a user interface.
|
|
76
80
|
- `submenu.dto.ts`: Represents a submenu item.
|
|
77
|
-
- `task-response.dto.ts`: DTO for responses related to background tasks.
|
|
78
81
|
- `unit.dto.ts`: Represents a unit for pay-per-use billing.
|
|
79
82
|
|
|
80
83
|
**Notification DTOs:**
|
|
81
84
|
|
|
82
85
|
- `notification/notification-info.dto.ts`: Contains detailed information about a notification.
|
|
83
|
-
- `notification/notification-send-request.dto.ts`: The primary DTO for requesting a new notification.
|
|
86
|
+
- `notification/requests/notification-send-request.dto.ts`: The primary DTO for requesting a new notification.
|
|
87
|
+
- `notification/responses/notification-send-response.dto.ts`: Response after successfully sending a notification.
|
|
84
88
|
- `notification/receiver/receiver-email.dto.ts`: Defines the receiver for an email notification.
|
|
85
89
|
- `notification/receiver/receiver-push.dto.ts`: Defines the receiver for a push notification.
|
|
86
90
|
- `notification/receiver/receiver-sms.dto.ts`: Defines the receiver for an SMS notification.
|
|
@@ -88,21 +92,42 @@ DTOs define the shape of data that is exchanged between different parts of the s
|
|
|
88
92
|
- `notification/sender/sender-push.dto.ts`: Defines the sender for a push notification.
|
|
89
93
|
- `notification/sender/sender-sms.dto.ts`: Defines the sender for an SMS notification.
|
|
90
94
|
|
|
95
|
+
**General Request/Response DTOs:**
|
|
96
|
+
|
|
97
|
+
- `requests/validate-attributes-request.dto.ts`: Defines the structure for validating product attributes.
|
|
98
|
+
- `responses/validate-attributes-response.dto.ts`: Response from validating product attributes.
|
|
99
|
+
|
|
91
100
|
**Product DTOs:**
|
|
92
101
|
|
|
93
|
-
- `product/product-info.dto.ts`: Contains detailed information about a product.
|
|
94
|
-
- `product/product-item-data.dto.ts`:
|
|
95
|
-
- `product/requests
|
|
96
|
-
- `product/requests/*`: DTOs for product-related requests (create, delete, upgrade, etc.).
|
|
102
|
+
- `product/product-info.dto.ts`: Contains detailed information about a product. Uses `AttributeFieldDto` for product/item attributes.
|
|
103
|
+
- `product/product-item-data.dto.ts`: Extends `ItemDataDto` with product-specific action type.
|
|
104
|
+
- `product/requests/*`: DTOs for product-related requests (create, delete, upgrade, downgrade, renew, suspend, unsuspend, upgradable, downgradable).
|
|
97
105
|
- `product/responses/*`: DTOs for product-related responses.
|
|
98
106
|
|
|
107
|
+
**Invoice DTOs:**
|
|
108
|
+
|
|
109
|
+
- `invoice/invoice-info.dto.ts`: Contains detailed information about an invoice integration.
|
|
110
|
+
- `invoice/invoice-item-data.dto.ts`: Extends `ItemDataDto` with invoice-specific action type.
|
|
111
|
+
- `invoice/transaction-data.dto.ts`: Transaction details (ID, amount, payment method, date).
|
|
112
|
+
- `invoice/tin-validation-details.dto.ts`: Tax Identification Number validation details.
|
|
113
|
+
- `invoice/requests/proforma-invoice-request.dto.ts`: Request payload for creating a proforma invoice.
|
|
114
|
+
- `invoice/requests/invoice-request.dto.ts`: Request payload for creating a standard invoice.
|
|
115
|
+
- `invoice/requests/credit-note-request.dto.ts`: Request payload for creating a credit note.
|
|
116
|
+
- `invoice/requests/tax-details-request.dto.ts`: Request payload for calculating tax details.
|
|
117
|
+
- `invoice/responses/proforma-invoice-response.dto.ts`: Response after creating a proforma invoice.
|
|
118
|
+
- `invoice/responses/invoice-response.dto.ts`: Response after creating a standard invoice.
|
|
119
|
+
- `invoice/responses/credit-note-response.dto.ts`: Response after creating a credit note.
|
|
120
|
+
- `invoice/responses/tax-details-response.dto.ts`: Response with tax calculation details.
|
|
121
|
+
|
|
99
122
|
### Enums
|
|
100
123
|
|
|
101
124
|
Enums provide a set of named constants for common types, preventing errors with magic strings.
|
|
102
125
|
|
|
103
126
|
**Key Enums:**
|
|
104
127
|
|
|
105
|
-
- `
|
|
128
|
+
- `ProductItemActionsEnum`: Defines possible product item actions (create, renew, upgrade, downgrade, etc.).
|
|
129
|
+
- `InvoiceItemActionsEnum`: Defines possible invoice item actions (create, renew, upgrade, downgrade, transfer, trade).
|
|
130
|
+
- `InvoiceTypesEnum`: Defines invoice document types (invoice, credit-note, proforma).
|
|
106
131
|
- `CountryEnum`: A list of all countries.
|
|
107
132
|
- `DurationEnum`: Defines billing durations (e.g., `MONTHLY`, `YEARLY`).
|
|
108
133
|
- `EventsEnum`: Defines triggerable events.
|
|
@@ -144,7 +169,14 @@ This package includes validation functions that leverage `class-validator` to en
|
|
|
144
169
|
- `validateJwtDto`: Validates JWT data.
|
|
145
170
|
- `validateMultilangTextDto`: Validates multilingual text objects.
|
|
146
171
|
- `validateUnitDto`: Validates billing unit data.
|
|
147
|
-
- `
|
|
172
|
+
- `validateAttachmentDto`: Validates file attachments.
|
|
173
|
+
- `validateAttributeFieldDto`: Validates attribute fields.
|
|
174
|
+
- `validateAddonFieldDto`: Validates addon fields.
|
|
175
|
+
- `validateCountryDto`: Validates country data.
|
|
176
|
+
- `validateTabDto`: Validates tab data.
|
|
177
|
+
- `validateItemDataDto`: Validates item data.
|
|
178
|
+
- `validateProductItemDataDto`: Validates product item data.
|
|
179
|
+
- `validateInfoDto`: Validates integration info.
|
|
148
180
|
|
|
149
181
|
**Panel Validators:**
|
|
150
182
|
- `validateAdminPanelDto`: Validates admin panel configuration.
|
|
@@ -164,6 +196,13 @@ This package includes validation functions that leverage `class-validator` to en
|
|
|
164
196
|
- `validateEmailReceiverDto`, `validateSmsReceiverDto`, `validatePushReceiverDto`: Validators for notification receivers.
|
|
165
197
|
- `validateEmailSenderDto`, `validateSmsSenderDto`, `validatePushSenderDto`: Validators for notification senders.
|
|
166
198
|
|
|
199
|
+
**Invoice Validators:**
|
|
200
|
+
- `validateInvoiceInfoDto`: Validates invoice integration info.
|
|
201
|
+
- `validateInvoiceContactDataDto`: Validates invoice contact data.
|
|
202
|
+
- `validateInvoiceItemDataDto`: Validates invoice item data.
|
|
203
|
+
- `validateTinValidationDetailsDto`: Validates TIN validation details.
|
|
204
|
+
- `validateTransactionDataDto`: Validates transaction data.
|
|
205
|
+
|
|
167
206
|
**Product Validators:**
|
|
168
207
|
- `validateProductInfoDto`: Validates product information.
|
|
169
208
|
- `validateProductCreateRequestDto`: Validates product creation requests.
|
|
@@ -174,6 +213,8 @@ This package includes validation functions that leverage `class-validator` to en
|
|
|
174
213
|
- `validateProductSuspendRequestDto`: Validates product suspension requests.
|
|
175
214
|
- `validateProductUnsuspendRequestDto`: Validates product unsuspension requests.
|
|
176
215
|
- `validateProductUpgradableRequestDto`: Validates product upgradability checks.
|
|
216
|
+
- `validateProductDowngradableRequestDto`: Validates product downgradability checks.
|
|
217
|
+
- `validateValidateAttributesRequestDto`: Validates attribute validation requests.
|
|
177
218
|
|
|
178
219
|
|
|
179
220
|
### Custom Decorators
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.AttachmentDto = 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 file attachments
|
|
16
17
|
* Used for sending attached files with emails
|
|
@@ -21,16 +22,32 @@ exports.AttachmentDto = AttachmentDto;
|
|
|
21
22
|
__decorate([
|
|
22
23
|
(0, class_validator_1.IsNotEmpty)(),
|
|
23
24
|
(0, class_validator_1.IsString)(),
|
|
25
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
26
|
+
title: 'Filename',
|
|
27
|
+
description: 'The name of the attached file.',
|
|
28
|
+
type: 'string',
|
|
29
|
+
}),
|
|
24
30
|
__metadata("design:type", String)
|
|
25
31
|
], AttachmentDto.prototype, "filename", void 0);
|
|
26
32
|
__decorate([
|
|
27
33
|
(0, class_validator_1.IsNotEmpty)(),
|
|
28
34
|
(0, class_validator_1.IsString)(),
|
|
29
35
|
(0, class_validator_1.IsBase64)(),
|
|
36
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
37
|
+
title: 'Content',
|
|
38
|
+
description: 'The content of the file in Base64 encoding.',
|
|
39
|
+
type: 'string',
|
|
40
|
+
format: 'byte',
|
|
41
|
+
}),
|
|
30
42
|
__metadata("design:type", String)
|
|
31
43
|
], AttachmentDto.prototype, "content", void 0);
|
|
32
44
|
__decorate([
|
|
33
45
|
(0, class_validator_1.IsOptional)(),
|
|
34
46
|
(0, class_validator_1.IsString)(),
|
|
47
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
48
|
+
title: 'Content Type',
|
|
49
|
+
description: 'The content type of the file (MIME type).',
|
|
50
|
+
type: 'string',
|
|
51
|
+
}),
|
|
35
52
|
__metadata("design:type", String)
|
|
36
53
|
], AttachmentDto.prototype, "contentType", void 0);
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { FieldDto } from "./field.dto";
|
|
2
|
-
import { MultilangTextDto } from "./multilang-text.dto";
|
|
3
2
|
export declare class AttributeFieldDto extends FieldDto {
|
|
4
3
|
/**
|
|
5
|
-
* Indicates if the field is
|
|
4
|
+
* Indicates if the field is visible in orders
|
|
6
5
|
*/
|
|
7
|
-
|
|
6
|
+
visibleInOrder?: boolean;
|
|
8
7
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
* Indicates if the field is visible in client panel
|
|
9
|
+
*/
|
|
10
|
+
visibleInClientPanel?: boolean;
|
|
12
11
|
/**
|
|
13
|
-
*
|
|
12
|
+
* Minimum repeats for repeatable fields
|
|
14
13
|
*/
|
|
15
|
-
|
|
14
|
+
repeatableMin?: number;
|
|
16
15
|
/**
|
|
17
|
-
*
|
|
16
|
+
* Maximum repeats for repeatable fields
|
|
18
17
|
*/
|
|
19
|
-
|
|
18
|
+
repeatableMax?: number;
|
|
20
19
|
}
|
|
@@ -10,65 +10,55 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.AttributeFieldDto = void 0;
|
|
13
|
-
const class_transformer_1 = require("class-transformer");
|
|
14
13
|
const class_validator_1 = require("class-validator");
|
|
15
14
|
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
16
15
|
const field_dto_1 = require("./field.dto");
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Indicates if the field is hidden in order
|
|
23
|
-
*/
|
|
24
|
-
this.hidden = false;
|
|
25
|
-
/**
|
|
26
|
-
* Indicates if the field triggers remote validation
|
|
27
|
-
*/
|
|
28
|
-
this.triggersRemoteValidation = false;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
16
|
+
const all_or_none_validator_1 = require("../decorators/all-or-none.validator");
|
|
17
|
+
const min_less_or_equal_validator_1 = require("../decorators/min-less-or-equal.validator");
|
|
18
|
+
let AttributeFieldDto = class AttributeFieldDto extends field_dto_1.FieldDto {
|
|
19
|
+
};
|
|
31
20
|
exports.AttributeFieldDto = AttributeFieldDto;
|
|
32
21
|
__decorate([
|
|
33
22
|
(0, class_validator_1.IsBoolean)(),
|
|
34
|
-
(0, class_validator_1.
|
|
23
|
+
(0, class_validator_1.IsOptional)(),
|
|
35
24
|
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
36
|
-
title: '
|
|
37
|
-
description: 'Whether the field is
|
|
25
|
+
title: 'Visible In Order',
|
|
26
|
+
description: 'Whether the field is visible in order view.',
|
|
38
27
|
type: 'boolean',
|
|
39
28
|
}),
|
|
40
29
|
__metadata("design:type", Boolean)
|
|
41
|
-
], AttributeFieldDto.prototype, "
|
|
30
|
+
], AttributeFieldDto.prototype, "visibleInOrder", void 0);
|
|
42
31
|
__decorate([
|
|
43
32
|
(0, class_validator_1.IsBoolean)(),
|
|
44
|
-
(0, class_validator_1.
|
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
|
45
34
|
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
46
|
-
title: '
|
|
47
|
-
description: 'Whether the field is
|
|
35
|
+
title: 'Visible In Client Panel',
|
|
36
|
+
description: 'Whether the field is visible in the client panel.',
|
|
48
37
|
type: 'boolean',
|
|
49
38
|
}),
|
|
50
39
|
__metadata("design:type", Boolean)
|
|
51
|
-
], AttributeFieldDto.prototype, "
|
|
40
|
+
], AttributeFieldDto.prototype, "visibleInClientPanel", void 0);
|
|
52
41
|
__decorate([
|
|
53
|
-
(0, class_validator_1.IsBoolean)(),
|
|
54
42
|
(0, class_validator_1.IsOptional)(),
|
|
43
|
+
(0, class_validator_1.IsNumber)(),
|
|
55
44
|
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
56
|
-
title: '
|
|
57
|
-
description: '
|
|
58
|
-
type: '
|
|
45
|
+
title: 'Repeatable Min',
|
|
46
|
+
description: 'Minimum repeats for repeatable fields.',
|
|
47
|
+
type: 'number',
|
|
59
48
|
}),
|
|
60
|
-
__metadata("design:type",
|
|
61
|
-
], AttributeFieldDto.prototype, "
|
|
49
|
+
__metadata("design:type", Number)
|
|
50
|
+
], AttributeFieldDto.prototype, "repeatableMin", void 0);
|
|
62
51
|
__decorate([
|
|
63
|
-
(0, class_validator_1.ValidateIf)((o) => o.triggersRemoteValidation === true),
|
|
64
|
-
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
65
|
-
(0, class_transformer_1.Type)(() => multilang_text_dto_1.MultilangTextDto),
|
|
66
52
|
(0, class_validator_1.IsOptional)(),
|
|
53
|
+
(0, class_validator_1.IsNumber)(),
|
|
67
54
|
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
68
|
-
title: '
|
|
69
|
-
description: '
|
|
70
|
-
type: '
|
|
71
|
-
items: { $ref: '#/components/schemas/MultilangTextDto' },
|
|
55
|
+
title: 'Repeatable Max',
|
|
56
|
+
description: 'Maximum repeats for repeatable fields.',
|
|
57
|
+
type: 'number',
|
|
72
58
|
}),
|
|
73
|
-
__metadata("design:type",
|
|
74
|
-
], AttributeFieldDto.prototype, "
|
|
59
|
+
__metadata("design:type", Number)
|
|
60
|
+
], AttributeFieldDto.prototype, "repeatableMax", void 0);
|
|
61
|
+
exports.AttributeFieldDto = AttributeFieldDto = __decorate([
|
|
62
|
+
(0, all_or_none_validator_1.AllOrNoneProperty)(['repeatableMin', 'repeatableMax']),
|
|
63
|
+
(0, min_less_or_equal_validator_1.MinLessOrEqualMaxProperty)(['repeatableMin', 'repeatableMax'])
|
|
64
|
+
], AttributeFieldDto);
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.BaseResponse = 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
|
* Base response class
|
|
16
17
|
* Used as a foundation for all API responses
|
|
@@ -21,10 +22,20 @@ exports.BaseResponse = BaseResponse;
|
|
|
21
22
|
__decorate([
|
|
22
23
|
(0, class_validator_1.IsNumber)(),
|
|
23
24
|
(0, class_validator_1.IsNotEmpty)(),
|
|
25
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
26
|
+
title: 'Code',
|
|
27
|
+
description: 'Response code.',
|
|
28
|
+
type: 'number',
|
|
29
|
+
}),
|
|
24
30
|
__metadata("design:type", Number)
|
|
25
31
|
], BaseResponse.prototype, "code", void 0);
|
|
26
32
|
__decorate([
|
|
27
33
|
(0, class_validator_1.IsString)(),
|
|
28
34
|
(0, class_validator_1.IsNotEmpty)(),
|
|
35
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
36
|
+
title: 'Message',
|
|
37
|
+
description: 'Response message.',
|
|
38
|
+
type: 'string',
|
|
39
|
+
}),
|
|
29
40
|
__metadata("design:type", String)
|
|
30
41
|
], BaseResponse.prototype, "message", void 0);
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ClientDataDto = 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
|
* Defines the data structure for a client.
|
|
17
18
|
* This object is used to transfer client data between different parts of the application.
|
|
@@ -22,16 +23,32 @@ exports.ClientDataDto = ClientDataDto;
|
|
|
22
23
|
__decorate([
|
|
23
24
|
(0, class_validator_1.IsDefined)(),
|
|
24
25
|
(0, class_validator_1.IsEmail)(),
|
|
26
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
27
|
+
title: 'Email',
|
|
28
|
+
description: 'Email of the user.',
|
|
29
|
+
type: 'string',
|
|
30
|
+
format: 'email',
|
|
31
|
+
}),
|
|
25
32
|
__metadata("design:type", String)
|
|
26
33
|
], ClientDataDto.prototype, "email", void 0);
|
|
27
34
|
__decorate([
|
|
28
35
|
(0, class_validator_1.IsDefined)(),
|
|
29
36
|
(0, class_validator_1.IsString)(),
|
|
37
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
38
|
+
title: 'First Name',
|
|
39
|
+
description: 'First name of the user.',
|
|
40
|
+
type: 'string',
|
|
41
|
+
}),
|
|
30
42
|
__metadata("design:type", String)
|
|
31
43
|
], ClientDataDto.prototype, "firstName", void 0);
|
|
32
44
|
__decorate([
|
|
33
45
|
(0, class_validator_1.IsDefined)(),
|
|
34
46
|
(0, class_validator_1.IsString)(),
|
|
47
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
48
|
+
title: 'Last Name',
|
|
49
|
+
description: 'Last name of the user.',
|
|
50
|
+
type: 'string',
|
|
51
|
+
}),
|
|
35
52
|
__metadata("design:type", String)
|
|
36
53
|
], ClientDataDto.prototype, "lastName", void 0);
|
|
37
54
|
__decorate([
|
|
@@ -39,11 +56,21 @@ __decorate([
|
|
|
39
56
|
(0, class_validator_1.IsNotEmpty)(),
|
|
40
57
|
(0, class_validator_1.IsString)(),
|
|
41
58
|
(0, class_validator_1.IsPhoneNumber)(),
|
|
59
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
60
|
+
title: 'Telephone',
|
|
61
|
+
description: 'Telephone number of the user.',
|
|
62
|
+
type: 'string',
|
|
63
|
+
}),
|
|
42
64
|
__metadata("design:type", String)
|
|
43
65
|
], ClientDataDto.prototype, "telephone", void 0);
|
|
44
66
|
__decorate([
|
|
45
67
|
(0, class_validator_1.IsOptional)(),
|
|
46
68
|
(0, class_validator_1.IsPhoneNumber)(),
|
|
69
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
70
|
+
title: 'Mobile',
|
|
71
|
+
description: 'Mobile number of the user.',
|
|
72
|
+
type: 'string',
|
|
73
|
+
}),
|
|
47
74
|
__metadata("design:type", String)
|
|
48
75
|
], ClientDataDto.prototype, "mobile", void 0);
|
|
49
76
|
__decorate([
|
|
@@ -52,18 +79,37 @@ __decorate([
|
|
|
52
79
|
(0, class_validator_1.IsString)(),
|
|
53
80
|
(0, class_validator_1.MinLength)(1),
|
|
54
81
|
(0, class_validator_1.MaxLength)(250),
|
|
82
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
83
|
+
title: 'Address Line 1',
|
|
84
|
+
description: 'Address line 1 of the user.',
|
|
85
|
+
type: 'string',
|
|
86
|
+
minLength: 1,
|
|
87
|
+
maxLength: 250,
|
|
88
|
+
}),
|
|
55
89
|
__metadata("design:type", String)
|
|
56
90
|
], ClientDataDto.prototype, "address1", void 0);
|
|
57
91
|
__decorate([
|
|
58
92
|
(0, class_validator_1.IsOptional)(),
|
|
59
93
|
(0, class_validator_1.MinLength)(0),
|
|
60
94
|
(0, class_validator_1.MaxLength)(250),
|
|
95
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
96
|
+
title: 'Address Line 2',
|
|
97
|
+
description: 'Address line 2 of the user.',
|
|
98
|
+
type: 'string',
|
|
99
|
+
maxLength: 250,
|
|
100
|
+
}),
|
|
61
101
|
__metadata("design:type", String)
|
|
62
102
|
], ClientDataDto.prototype, "address2", void 0);
|
|
63
103
|
__decorate([
|
|
64
104
|
(0, class_validator_1.IsOptional)(),
|
|
65
105
|
(0, class_validator_1.MinLength)(0),
|
|
66
106
|
(0, class_validator_1.MaxLength)(250),
|
|
107
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
108
|
+
title: 'Address Line 3',
|
|
109
|
+
description: 'Address line 3 of the user.',
|
|
110
|
+
type: 'string',
|
|
111
|
+
maxLength: 250,
|
|
112
|
+
}),
|
|
67
113
|
__metadata("design:type", String)
|
|
68
114
|
], ClientDataDto.prototype, "address3", void 0);
|
|
69
115
|
__decorate([
|
|
@@ -72,6 +118,13 @@ __decorate([
|
|
|
72
118
|
(0, class_validator_1.IsString)(),
|
|
73
119
|
(0, class_validator_1.MinLength)(1),
|
|
74
120
|
(0, class_validator_1.MaxLength)(16),
|
|
121
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
122
|
+
title: 'Postcode',
|
|
123
|
+
description: 'Postal code of the user.',
|
|
124
|
+
type: 'string',
|
|
125
|
+
minLength: 1,
|
|
126
|
+
maxLength: 16,
|
|
127
|
+
}),
|
|
75
128
|
__metadata("design:type", String)
|
|
76
129
|
], ClientDataDto.prototype, "postcode", void 0);
|
|
77
130
|
__decorate([
|
|
@@ -80,27 +133,56 @@ __decorate([
|
|
|
80
133
|
(0, class_validator_1.IsString)(),
|
|
81
134
|
(0, class_validator_1.MinLength)(1),
|
|
82
135
|
(0, class_validator_1.MaxLength)(250),
|
|
136
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
137
|
+
title: 'City',
|
|
138
|
+
description: 'City of the user.',
|
|
139
|
+
type: 'string',
|
|
140
|
+
minLength: 1,
|
|
141
|
+
maxLength: 250,
|
|
142
|
+
}),
|
|
83
143
|
__metadata("design:type", String)
|
|
84
144
|
], ClientDataDto.prototype, "city", void 0);
|
|
85
145
|
__decorate([
|
|
86
146
|
(0, class_validator_1.IsDefined)(),
|
|
87
147
|
(0, class_validator_1.IsNotEmpty)(),
|
|
88
148
|
(0, class_validator_1.IsEnum)(country_enum_1.CountryEnum),
|
|
149
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
150
|
+
title: 'Country',
|
|
151
|
+
description: 'Country code of the user.',
|
|
152
|
+
type: 'string',
|
|
153
|
+
enum: Object.values(country_enum_1.CountryEnum),
|
|
154
|
+
}),
|
|
89
155
|
__metadata("design:type", String)
|
|
90
156
|
], ClientDataDto.prototype, "country", void 0);
|
|
91
157
|
__decorate([
|
|
92
158
|
(0, class_validator_1.IsOptional)(),
|
|
93
159
|
(0, class_validator_1.MinLength)(0),
|
|
94
160
|
(0, class_validator_1.MaxLength)(250),
|
|
161
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
162
|
+
title: 'State',
|
|
163
|
+
description: 'State of the user.',
|
|
164
|
+
type: 'string',
|
|
165
|
+
maxLength: 250,
|
|
166
|
+
}),
|
|
95
167
|
__metadata("design:type", String)
|
|
96
168
|
], ClientDataDto.prototype, "state", void 0);
|
|
97
169
|
__decorate([
|
|
98
170
|
(0, class_validator_1.IsOptional)(),
|
|
99
171
|
(0, class_validator_1.IsString)(),
|
|
172
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
173
|
+
title: 'VAT',
|
|
174
|
+
description: 'VAT number of the user.',
|
|
175
|
+
type: 'string',
|
|
176
|
+
}),
|
|
100
177
|
__metadata("design:type", String)
|
|
101
178
|
], ClientDataDto.prototype, "vat", void 0);
|
|
102
179
|
__decorate([
|
|
103
180
|
(0, class_validator_1.IsOptional)(),
|
|
104
181
|
(0, class_validator_1.IsString)(),
|
|
182
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
183
|
+
title: 'Tax Office',
|
|
184
|
+
description: 'Tax office of the user.',
|
|
185
|
+
type: 'string',
|
|
186
|
+
}),
|
|
105
187
|
__metadata("design:type", String)
|
|
106
188
|
], ClientDataDto.prototype, "taxOffice", void 0);
|
|
@@ -13,6 +13,7 @@ exports.CompanyDataDto = void 0;
|
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const country_enum_1 = require("../enums/country.enum");
|
|
15
15
|
const language_enum_1 = require("../enums/language.enum");
|
|
16
|
+
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
16
17
|
/**
|
|
17
18
|
* Data Transfer Object for company data.
|
|
18
19
|
*/
|
|
@@ -22,82 +23,178 @@ exports.CompanyDataDto = CompanyDataDto;
|
|
|
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: 'ID',
|
|
28
|
+
description: 'The unique identifier for the company.',
|
|
29
|
+
type: 'string',
|
|
30
|
+
}),
|
|
25
31
|
__metadata("design:type", String)
|
|
26
32
|
], CompanyDataDto.prototype, "id", void 0);
|
|
27
33
|
__decorate([
|
|
28
34
|
(0, class_validator_1.IsString)(),
|
|
29
35
|
(0, class_validator_1.IsNotEmpty)(),
|
|
36
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
37
|
+
title: 'Name',
|
|
38
|
+
description: 'The name of the company.',
|
|
39
|
+
type: 'string',
|
|
40
|
+
}),
|
|
30
41
|
__metadata("design:type", String)
|
|
31
42
|
], CompanyDataDto.prototype, "name", void 0);
|
|
32
43
|
__decorate([
|
|
33
44
|
(0, class_validator_1.IsEmail)({}, { each: true }),
|
|
34
45
|
(0, class_validator_1.IsArray)(),
|
|
46
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
47
|
+
title: 'Emails',
|
|
48
|
+
description: 'Email addresses associated with the company.',
|
|
49
|
+
type: 'array',
|
|
50
|
+
items: { type: 'string', format: 'email' },
|
|
51
|
+
}),
|
|
35
52
|
__metadata("design:type", Array)
|
|
36
53
|
], CompanyDataDto.prototype, "emails", void 0);
|
|
37
54
|
__decorate([
|
|
38
55
|
(0, class_validator_1.IsEmail)(),
|
|
56
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
57
|
+
title: 'Invoice Email',
|
|
58
|
+
description: 'The email address used for invoicing.',
|
|
59
|
+
type: 'string',
|
|
60
|
+
format: 'email',
|
|
61
|
+
}),
|
|
39
62
|
__metadata("design:type", String)
|
|
40
63
|
], CompanyDataDto.prototype, "invoiceEmail", void 0);
|
|
41
64
|
__decorate([
|
|
42
65
|
(0, class_validator_1.IsUrl)({ protocols: ['https'], require_protocol: true }),
|
|
66
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
67
|
+
title: 'Privacy Policy URL',
|
|
68
|
+
description: 'The URL for the company\'s privacy policy.',
|
|
69
|
+
type: 'string',
|
|
70
|
+
format: 'uri',
|
|
71
|
+
}),
|
|
43
72
|
__metadata("design:type", String)
|
|
44
73
|
], CompanyDataDto.prototype, "privacyPolicyUrl", void 0);
|
|
45
74
|
__decorate([
|
|
46
75
|
(0, class_validator_1.IsEnum)(language_enum_1.LanguageEnum),
|
|
76
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
77
|
+
title: 'Default Language',
|
|
78
|
+
description: 'The default language for the company.',
|
|
79
|
+
type: 'string',
|
|
80
|
+
enum: Object.values(language_enum_1.LanguageEnum),
|
|
81
|
+
}),
|
|
47
82
|
__metadata("design:type", String)
|
|
48
83
|
], CompanyDataDto.prototype, "defaultLanguage", void 0);
|
|
49
84
|
__decorate([
|
|
50
85
|
(0, class_validator_1.IsEnum)(language_enum_1.LanguageEnum, { each: true }),
|
|
51
86
|
(0, class_validator_1.IsArray)(),
|
|
87
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
88
|
+
title: 'Languages',
|
|
89
|
+
description: 'Supported languages for the company.',
|
|
90
|
+
type: 'array',
|
|
91
|
+
items: { type: 'string', enum: Object.values(language_enum_1.LanguageEnum) },
|
|
92
|
+
}),
|
|
52
93
|
__metadata("design:type", Array)
|
|
53
94
|
], CompanyDataDto.prototype, "languages", void 0);
|
|
54
95
|
__decorate([
|
|
55
96
|
(0, class_validator_1.IsPhoneNumber)(),
|
|
97
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
98
|
+
title: 'Telephone',
|
|
99
|
+
description: 'The primary telephone number for the company.',
|
|
100
|
+
type: 'string',
|
|
101
|
+
}),
|
|
56
102
|
__metadata("design:type", String)
|
|
57
103
|
], CompanyDataDto.prototype, "telephone", void 0);
|
|
58
104
|
__decorate([
|
|
59
105
|
(0, class_validator_1.IsPhoneNumber)(),
|
|
60
106
|
(0, class_validator_1.IsOptional)(),
|
|
107
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
108
|
+
title: 'Mobile',
|
|
109
|
+
description: 'The mobile phone number for the company.',
|
|
110
|
+
type: 'string',
|
|
111
|
+
}),
|
|
61
112
|
__metadata("design:type", String)
|
|
62
113
|
], CompanyDataDto.prototype, "mobile", void 0);
|
|
63
114
|
__decorate([
|
|
64
115
|
(0, class_validator_1.IsString)(),
|
|
116
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
117
|
+
title: 'Address Line 1',
|
|
118
|
+
description: 'The first line of the company\'s address.',
|
|
119
|
+
type: 'string',
|
|
120
|
+
}),
|
|
65
121
|
__metadata("design:type", String)
|
|
66
122
|
], CompanyDataDto.prototype, "address1", void 0);
|
|
67
123
|
__decorate([
|
|
68
124
|
(0, class_validator_1.IsString)(),
|
|
69
125
|
(0, class_validator_1.IsOptional)(),
|
|
126
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
127
|
+
title: 'Address Line 2',
|
|
128
|
+
description: 'The second line of the company\'s address.',
|
|
129
|
+
type: 'string',
|
|
130
|
+
}),
|
|
70
131
|
__metadata("design:type", String)
|
|
71
132
|
], CompanyDataDto.prototype, "address2", void 0);
|
|
72
133
|
__decorate([
|
|
73
134
|
(0, class_validator_1.IsString)(),
|
|
74
135
|
(0, class_validator_1.IsOptional)(),
|
|
136
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
137
|
+
title: 'Address Line 3',
|
|
138
|
+
description: 'The third line of the company\'s address.',
|
|
139
|
+
type: 'string',
|
|
140
|
+
}),
|
|
75
141
|
__metadata("design:type", String)
|
|
76
142
|
], CompanyDataDto.prototype, "address3", void 0);
|
|
77
143
|
__decorate([
|
|
78
144
|
(0, class_validator_1.IsString)(),
|
|
145
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
146
|
+
title: 'Postcode',
|
|
147
|
+
description: 'The postal code for the company\'s address.',
|
|
148
|
+
type: 'string',
|
|
149
|
+
}),
|
|
79
150
|
__metadata("design:type", String)
|
|
80
151
|
], CompanyDataDto.prototype, "postcode", void 0);
|
|
81
152
|
__decorate([
|
|
82
153
|
(0, class_validator_1.IsString)(),
|
|
154
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
155
|
+
title: 'City',
|
|
156
|
+
description: 'The city for the company\'s address.',
|
|
157
|
+
type: 'string',
|
|
158
|
+
}),
|
|
83
159
|
__metadata("design:type", String)
|
|
84
160
|
], CompanyDataDto.prototype, "city", void 0);
|
|
85
161
|
__decorate([
|
|
86
162
|
(0, class_validator_1.IsEnum)(country_enum_1.CountryEnum),
|
|
163
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
164
|
+
title: 'Country',
|
|
165
|
+
description: 'The country for the company\'s address.',
|
|
166
|
+
type: 'string',
|
|
167
|
+
enum: Object.values(country_enum_1.CountryEnum),
|
|
168
|
+
}),
|
|
87
169
|
__metadata("design:type", String)
|
|
88
170
|
], CompanyDataDto.prototype, "country", void 0);
|
|
89
171
|
__decorate([
|
|
90
172
|
(0, class_validator_1.IsString)(),
|
|
91
173
|
(0, class_validator_1.IsOptional)(),
|
|
174
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
175
|
+
title: 'State',
|
|
176
|
+
description: 'The state or province for the company\'s address.',
|
|
177
|
+
type: 'string',
|
|
178
|
+
}),
|
|
92
179
|
__metadata("design:type", String)
|
|
93
180
|
], CompanyDataDto.prototype, "state", void 0);
|
|
94
181
|
__decorate([
|
|
95
182
|
(0, class_validator_1.IsString)(),
|
|
96
183
|
(0, class_validator_1.IsOptional)(),
|
|
184
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
185
|
+
title: 'VAT',
|
|
186
|
+
description: 'The VAT number for the company.',
|
|
187
|
+
type: 'string',
|
|
188
|
+
}),
|
|
97
189
|
__metadata("design:type", String)
|
|
98
190
|
], CompanyDataDto.prototype, "vat", void 0);
|
|
99
191
|
__decorate([
|
|
100
192
|
(0, class_validator_1.IsString)(),
|
|
101
193
|
(0, class_validator_1.IsOptional)(),
|
|
194
|
+
(0, class_validator_jsonschema_1.JSONSchema)({
|
|
195
|
+
title: 'Tax Office',
|
|
196
|
+
description: 'The tax office for the company.',
|
|
197
|
+
type: 'string',
|
|
198
|
+
}),
|
|
102
199
|
__metadata("design:type", String)
|
|
103
200
|
], CompanyDataDto.prototype, "taxOffice", void 0);
|