@hosterai/types 0.0.12 → 0.0.14
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 +8 -1
- package/dist/dtos/action.dto.d.ts +21 -3
- package/dist/dtos/action.dto.js +10 -0
- package/dist/dtos/attachment.dto.d.ts +1 -1
- package/dist/dtos/attachment.dto.js +1 -1
- package/dist/dtos/client-data.dto.d.ts +65 -0
- package/dist/dtos/client-data.dto.js +106 -0
- package/dist/dtos/company-data.dto.d.ts +57 -0
- package/dist/dtos/company-data.dto.js +5 -2
- package/dist/dtos/error-response.dto.d.ts +8 -6
- package/dist/dtos/error-response.dto.js +2 -2
- package/dist/dtos/field.dto.d.ts +7 -2
- package/dist/dtos/field.dto.js +8 -3
- package/dist/dtos/info.dto.d.ts +61 -64
- package/dist/dtos/info.dto.js +6 -4
- package/dist/dtos/jwt.dto.d.ts +12 -9
- package/dist/dtos/jwt.dto.js +6 -2
- package/dist/dtos/menu.dto.d.ts +26 -11
- package/dist/dtos/multilang-text.dto.d.ts +11 -0
- package/dist/dtos/multilang-text.dto.js +4 -0
- package/dist/dtos/notification/notification-info.dto.d.ts +15 -0
- package/dist/dtos/notification/notification-info.dto.js +4 -0
- package/dist/dtos/notification/{notification-request.dto.d.ts → notification-send-request.dto.d.ts} +6 -1
- package/dist/dtos/notification/{notification-request.dto.js → notification-send-request.dto.js} +11 -6
- package/dist/dtos/product/product-info.dto.d.ts +30 -0
- package/dist/dtos/product/product-info.dto.js +11 -0
- package/dist/dtos/product/product-item-data.dto.d.ts +31 -0
- package/dist/dtos/product/product-item-data.dto.js +43 -0
- package/dist/dtos/product/product.interface.d.ts +44 -0
- package/dist/dtos/product/product.interface.js +2 -0
- package/dist/dtos/product/requests/product-create-request.dto.d.ts +18 -0
- package/dist/dtos/product/requests/product-create-request.dto.js +37 -0
- package/dist/dtos/product/requests/product-delete-request.dto.d.ts +18 -0
- package/dist/dtos/product/requests/product-delete-request.dto.js +37 -0
- package/dist/dtos/product/requests/product-downgradable-request.dto.d.ts +18 -0
- package/dist/dtos/product/requests/product-downgradable-request.dto.js +37 -0
- package/dist/dtos/product/requests/product-downgrade-request.dto.d.ts +24 -0
- package/dist/dtos/product/requests/product-downgrade-request.dto.js +44 -0
- 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 +18 -0
- package/dist/dtos/product/requests/product-renew-request.dto.js +37 -0
- package/dist/dtos/product/requests/product-suspend-request.dto.d.ts +18 -0
- package/dist/dtos/product/requests/product-suspend-request.dto.js +37 -0
- package/dist/dtos/product/requests/product-unsuspend-request.dto.d.ts +18 -0
- package/dist/dtos/product/requests/product-unsuspend-request.dto.js +37 -0
- package/dist/dtos/product/requests/product-upgradable-request.dto.d.ts +18 -0
- package/dist/dtos/product/requests/product-upgradable-request.dto.js +37 -0
- package/dist/dtos/product/requests/product-upgrade-request.dto.d.ts +24 -0
- package/dist/dtos/product/requests/product-upgrade-request.dto.js +44 -0
- 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/requests/product-validate-attributes-request.dto.d.ts +18 -0
- package/dist/dtos/product/requests/product-validate-attributes-request.dto.js +31 -0
- package/dist/dtos/product/responses/product-create-response.dto.d.ts +21 -0
- package/dist/dtos/product/responses/product-create-response.dto.js +11 -0
- package/dist/dtos/product/responses/product-delete-response.dto.d.ts +21 -0
- package/dist/dtos/product/responses/product-delete-response.dto.js +11 -0
- package/dist/dtos/product/responses/product-downgradable-response.dto.d.ts +22 -0
- package/dist/dtos/product/responses/product-downgradable-response.dto.js +11 -0
- package/dist/dtos/product/responses/product-downgrade-response.dto.d.ts +21 -0
- package/dist/dtos/product/responses/product-downgrade-response.dto.js +11 -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.d.ts +13 -0
- package/dist/dtos/product/responses/product-info-response.dto.js +11 -0
- package/dist/dtos/product/responses/product-renew-response.dto.d.ts +21 -0
- package/dist/dtos/product/responses/product-renew-response.dto.js +11 -0
- package/dist/dtos/product/responses/product-suspend-response.dto.d.ts +21 -0
- package/dist/dtos/product/responses/product-suspend-response.dto.js +11 -0
- package/dist/dtos/product/responses/product-unsuspend-response.dto.d.ts +21 -0
- package/dist/dtos/product/responses/product-unsuspend-response.dto.js +11 -0
- package/dist/dtos/product/responses/product-upgradable-response.dto.d.ts +22 -0
- package/dist/dtos/product/responses/product-upgradable-response.dto.js +11 -0
- package/dist/dtos/product/responses/product-upgrade-response.dto.d.ts +22 -0
- package/dist/dtos/product/responses/product-upgrade-response.dto.js +11 -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/product/responses/product-validate-attributes-response.dto.d.ts +13 -0
- package/dist/dtos/product/responses/product-validate-attributes-response.dto.js +11 -0
- package/dist/dtos/response-data.dto.d.ts +7 -0
- package/dist/dtos/response-data.dto.js +4 -0
- package/dist/dtos/setup-status-response.dto.d.ts +8 -0
- package/dist/dtos/setup-status-response.dto.js +4 -0
- package/dist/dtos/submenu.dto.d.ts +7 -0
- package/dist/dtos/submenu.dto.js +11 -0
- package/dist/dtos/success-response.dto.d.ts +4 -0
- package/dist/dtos/success-response.dto.js +4 -0
- package/dist/dtos/tab.dto.d.ts +0 -2
- package/dist/dtos/tab.dto.js +1 -4
- package/dist/dtos/task-response.dto.d.ts +4 -0
- package/dist/dtos/task-response.dto.js +4 -0
- package/dist/dtos/unit.dto.d.ts +16 -0
- package/dist/dtos/unit.dto.js +4 -0
- package/dist/enums/duration.enum.d.ts +23 -0
- package/dist/enums/duration.enum.js +27 -0
- package/dist/enums/events.enum.d.ts +11 -8
- package/dist/enums/events.enum.js +11 -8
- package/dist/enums/response-status.enum.d.ts +5 -0
- package/dist/enums/response-status.enum.js +9 -0
- package/dist/index.d.ts +57 -14
- package/dist/index.js +65 -19
- package/dist/validators/client-data-validator.d.ts +8 -0
- package/dist/validators/client-data-validator.js +17 -0
- package/dist/validators/notification-request-validator.js +2 -2
- package/dist/validators/product-create-request-validator.d.ts +8 -0
- package/dist/validators/product-create-request-validator.js +17 -0
- package/dist/validators/product-delete-request-validator.d.ts +8 -0
- package/dist/validators/product-delete-request-validator.js +17 -0
- package/dist/validators/product-downgradable-request-validator.d.ts +8 -0
- package/dist/validators/product-downgradable-request-validator.js +17 -0
- package/dist/validators/product-downgrade-request-validator.d.ts +8 -0
- package/dist/validators/product-downgrade-request-validator.js +17 -0
- 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-renew-request-validator.d.ts +8 -0
- package/dist/validators/product-renew-request-validator.js +17 -0
- package/dist/validators/product-suspend-request-validator.d.ts +8 -0
- package/dist/validators/product-suspend-request-validator.js +17 -0
- package/dist/validators/product-unsuspend-request-validator.d.ts +8 -0
- package/dist/validators/product-unsuspend-request-validator.js +17 -0
- package/dist/validators/product-upgradable-request-validator.d.ts +8 -0
- package/dist/validators/product-upgradable-request-validator.js +17 -0
- package/dist/validators/product-upgrade-request-validator.d.ts +8 -0
- package/dist/validators/product-upgrade-request-validator.js +17 -0
- package/dist/validators/product-upgradeable-request-validator.d.ts +8 -0
- package/dist/validators/product-upgradeable-request-validator.js +17 -0
- package/dist/validators/product-validate-attributes-request-validator.d.ts +8 -0
- package/dist/validators/product-validate-attributes-request-validator.js +17 -0
- package/package.json +9 -4
package/README.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @hosterai/types
|
|
2
2
|
|
|
3
|
+
This package contains the core types for the Hoster AI platform.
|
|
4
|
+
|
|
5
|
+
## Files
|
|
6
|
+
|
|
7
|
+
- `llm.txt`: Contains a list of large language models.
|
|
8
|
+
|
|
3
9
|
[](https://www.npmjs.com/package/@hosterai/types)
|
|
4
10
|
[](https://www.npmjs.com/package/@hosterai/types)
|
|
5
11
|
[](https://github.com/HosterAI/types/actions/workflows/ci.yml)
|
|
@@ -36,6 +42,7 @@ DTOs define the shape of data that is exchanged between different parts of the s
|
|
|
36
42
|
- `company-data.dto.ts`: Holds all the relevant data for a company.
|
|
37
43
|
- `error-response.dto.ts`: Defines the structure for error responses.
|
|
38
44
|
- `field.dto.ts`: Represents a generic field for forms or dynamic data.
|
|
45
|
+
- `field-option.dto.ts`: Represents options for form fields (used for checkboxes, radioboxes, and selects).
|
|
39
46
|
- `info.dto.ts`: Contains all necessary information for a service integration.
|
|
40
47
|
- `jwt.dto.ts`: DTOs related to JSON Web Tokens.
|
|
41
48
|
- `menu.dto.ts`: Defines the structure for menu items.
|
|
@@ -72,7 +79,7 @@ Enums provide a set of named constants for common types, preventing errors with
|
|
|
72
79
|
|
|
73
80
|
**Key Enums:**
|
|
74
81
|
|
|
75
|
-
- `
|
|
82
|
+
- `ProductActionsEnum`: Defines possible actions.
|
|
76
83
|
- `CountryEnum`: A list of all countries.
|
|
77
84
|
- `DurationEnum`: Defines billing durations (e.g., `MONTHLY`, `YEARLY`).
|
|
78
85
|
- `EventsEnum`: Defines triggerable events.
|
|
@@ -1,16 +1,34 @@
|
|
|
1
1
|
import { OpenMethodEnum } from '../enums/open-method.enum';
|
|
2
|
+
/**
|
|
3
|
+
* Defines the structure for a UI action.
|
|
4
|
+
* @example
|
|
5
|
+
* {
|
|
6
|
+
* "icon": "add",
|
|
7
|
+
* "label": "Create New",
|
|
8
|
+
* "openMethod": "ajax_call",
|
|
9
|
+
* "url": "/api/create"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
2
12
|
export declare class ActionDto {
|
|
3
13
|
/**
|
|
4
|
-
* The
|
|
14
|
+
* The name of the icon to display for the action.
|
|
15
|
+
* @example "add"
|
|
5
16
|
*/
|
|
6
17
|
icon: string;
|
|
7
18
|
/**
|
|
8
|
-
* The label
|
|
19
|
+
* The text label for the action.
|
|
20
|
+
* @optional
|
|
21
|
+
* @example "Create New"
|
|
9
22
|
*/
|
|
10
23
|
label?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The method by which the action's URL should be opened.
|
|
26
|
+
* @see OpenMethodEnum
|
|
27
|
+
*/
|
|
11
28
|
openMethod: OpenMethodEnum;
|
|
12
29
|
/**
|
|
13
|
-
* The
|
|
30
|
+
* The URL to navigate to when the action is triggered.
|
|
31
|
+
* @example "/api/create"
|
|
14
32
|
*/
|
|
15
33
|
url: string;
|
|
16
34
|
}
|
package/dist/dtos/action.dto.js
CHANGED
|
@@ -12,6 +12,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ActionDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const open_method_enum_1 = require("../enums/open-method.enum");
|
|
15
|
+
/**
|
|
16
|
+
* Defines the structure for a UI action.
|
|
17
|
+
* @example
|
|
18
|
+
* {
|
|
19
|
+
* "icon": "add",
|
|
20
|
+
* "label": "Create New",
|
|
21
|
+
* "openMethod": "ajax_call",
|
|
22
|
+
* "url": "/api/create"
|
|
23
|
+
* }
|
|
24
|
+
*/
|
|
15
25
|
class ActionDto {
|
|
16
26
|
}
|
|
17
27
|
exports.ActionDto = ActionDto;
|
|
@@ -27,7 +27,7 @@ __decorate([
|
|
|
27
27
|
(0, class_validator_1.IsNotEmpty)(),
|
|
28
28
|
(0, class_validator_1.IsString)(),
|
|
29
29
|
(0, class_validator_1.IsBase64)(),
|
|
30
|
-
__metadata("design:type",
|
|
30
|
+
__metadata("design:type", String)
|
|
31
31
|
], AttachmentDto.prototype, "content", void 0);
|
|
32
32
|
__decorate([
|
|
33
33
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { CountryEnum } from '../enums/country.enum';
|
|
2
|
+
/**
|
|
3
|
+
* Defines the data structure for a client.
|
|
4
|
+
* This object is used to transfer client data between different parts of the application.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ClientDataDto {
|
|
7
|
+
/**
|
|
8
|
+
* Email of the user
|
|
9
|
+
*/
|
|
10
|
+
email: string;
|
|
11
|
+
/**
|
|
12
|
+
* First name of the user
|
|
13
|
+
*/
|
|
14
|
+
firstName: string;
|
|
15
|
+
/**
|
|
16
|
+
* Last name of the user
|
|
17
|
+
*/
|
|
18
|
+
lastName: string;
|
|
19
|
+
/**
|
|
20
|
+
* Telephone number of the user
|
|
21
|
+
*/
|
|
22
|
+
telephone: string;
|
|
23
|
+
/**
|
|
24
|
+
* Mobile number of the user
|
|
25
|
+
*/
|
|
26
|
+
mobile?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Address line 1 of the user
|
|
29
|
+
*/
|
|
30
|
+
address1: string;
|
|
31
|
+
/**
|
|
32
|
+
* Address line 2 of the user
|
|
33
|
+
*/
|
|
34
|
+
address2?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Address line 3 of the user
|
|
37
|
+
*/
|
|
38
|
+
address3?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Postal code of the user
|
|
41
|
+
*/
|
|
42
|
+
postcode: string;
|
|
43
|
+
/**
|
|
44
|
+
* City of the user
|
|
45
|
+
*/
|
|
46
|
+
city: string;
|
|
47
|
+
/**
|
|
48
|
+
* Country code of the user
|
|
49
|
+
*/
|
|
50
|
+
country: CountryEnum;
|
|
51
|
+
/**
|
|
52
|
+
* State of the user
|
|
53
|
+
*/
|
|
54
|
+
state?: string;
|
|
55
|
+
/**
|
|
56
|
+
* VAT number of the user
|
|
57
|
+
* @optional
|
|
58
|
+
*/
|
|
59
|
+
vat?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Tax office of the user
|
|
62
|
+
* @optional
|
|
63
|
+
*/
|
|
64
|
+
taxOffice?: string;
|
|
65
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
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.ClientDataDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const country_enum_1 = require("../enums/country.enum");
|
|
15
|
+
/**
|
|
16
|
+
* Defines the data structure for a client.
|
|
17
|
+
* This object is used to transfer client data between different parts of the application.
|
|
18
|
+
*/
|
|
19
|
+
class ClientDataDto {
|
|
20
|
+
}
|
|
21
|
+
exports.ClientDataDto = ClientDataDto;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsDefined)(),
|
|
24
|
+
(0, class_validator_1.IsEmail)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ClientDataDto.prototype, "email", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsDefined)(),
|
|
29
|
+
(0, class_validator_1.IsString)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], ClientDataDto.prototype, "firstName", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsDefined)(),
|
|
34
|
+
(0, class_validator_1.IsString)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], ClientDataDto.prototype, "lastName", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsDefined)(),
|
|
39
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
40
|
+
(0, class_validator_1.IsString)(),
|
|
41
|
+
(0, class_validator_1.IsPhoneNumber)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], ClientDataDto.prototype, "telephone", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_validator_1.IsOptional)(),
|
|
46
|
+
(0, class_validator_1.IsPhoneNumber)(),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], ClientDataDto.prototype, "mobile", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_validator_1.IsDefined)(),
|
|
51
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
52
|
+
(0, class_validator_1.IsString)(),
|
|
53
|
+
(0, class_validator_1.MinLength)(1),
|
|
54
|
+
(0, class_validator_1.MaxLength)(250),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], ClientDataDto.prototype, "address1", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, class_validator_1.IsOptional)(),
|
|
59
|
+
(0, class_validator_1.MinLength)(0),
|
|
60
|
+
(0, class_validator_1.MaxLength)(250),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], ClientDataDto.prototype, "address2", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, class_validator_1.IsOptional)(),
|
|
65
|
+
(0, class_validator_1.MinLength)(0),
|
|
66
|
+
(0, class_validator_1.MaxLength)(250),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], ClientDataDto.prototype, "address3", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, class_validator_1.IsDefined)(),
|
|
71
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
72
|
+
(0, class_validator_1.IsString)(),
|
|
73
|
+
(0, class_validator_1.MinLength)(1),
|
|
74
|
+
(0, class_validator_1.MaxLength)(16),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], ClientDataDto.prototype, "postcode", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, class_validator_1.IsDefined)(),
|
|
79
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
80
|
+
(0, class_validator_1.IsString)(),
|
|
81
|
+
(0, class_validator_1.MinLength)(1),
|
|
82
|
+
(0, class_validator_1.MaxLength)(250),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], ClientDataDto.prototype, "city", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, class_validator_1.IsDefined)(),
|
|
87
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
88
|
+
(0, class_validator_1.IsEnum)(country_enum_1.CountryEnum),
|
|
89
|
+
__metadata("design:type", String)
|
|
90
|
+
], ClientDataDto.prototype, "country", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, class_validator_1.IsOptional)(),
|
|
93
|
+
(0, class_validator_1.MinLength)(0),
|
|
94
|
+
(0, class_validator_1.MaxLength)(250),
|
|
95
|
+
__metadata("design:type", String)
|
|
96
|
+
], ClientDataDto.prototype, "state", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, class_validator_1.IsOptional)(),
|
|
99
|
+
(0, class_validator_1.IsString)(),
|
|
100
|
+
__metadata("design:type", String)
|
|
101
|
+
], ClientDataDto.prototype, "vat", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, class_validator_1.IsOptional)(),
|
|
104
|
+
(0, class_validator_1.IsString)(),
|
|
105
|
+
__metadata("design:type", String)
|
|
106
|
+
], ClientDataDto.prototype, "taxOffice", void 0);
|
|
@@ -1,22 +1,79 @@
|
|
|
1
1
|
import { CountryEnum } from '../enums/country.enum';
|
|
2
2
|
import { LanguageEnum } from '../enums/language.enum';
|
|
3
|
+
/**
|
|
4
|
+
* Data Transfer Object for company data.
|
|
5
|
+
*/
|
|
3
6
|
export declare class CompanyDataDto {
|
|
7
|
+
/**
|
|
8
|
+
* The unique identifier for the company.
|
|
9
|
+
*/
|
|
4
10
|
id: string;
|
|
11
|
+
/**
|
|
12
|
+
* The name of the company.
|
|
13
|
+
*/
|
|
5
14
|
name: string;
|
|
15
|
+
/**
|
|
16
|
+
* An array of email addresses associated with the company.
|
|
17
|
+
*/
|
|
6
18
|
emails: string[];
|
|
19
|
+
/**
|
|
20
|
+
* The email address used for invoicing.
|
|
21
|
+
*/
|
|
7
22
|
invoiceEmail: string;
|
|
23
|
+
/**
|
|
24
|
+
* The URL for the company's privacy policy.
|
|
25
|
+
*/
|
|
8
26
|
privacyPolicyUrl: string;
|
|
27
|
+
/**
|
|
28
|
+
* The default language for the company.
|
|
29
|
+
*/
|
|
9
30
|
defaultLanguage: LanguageEnum;
|
|
31
|
+
/**
|
|
32
|
+
* An array of supported languages for the company.
|
|
33
|
+
*/
|
|
10
34
|
languages: LanguageEnum[];
|
|
35
|
+
/**
|
|
36
|
+
* The primary telephone number for the company.
|
|
37
|
+
*/
|
|
11
38
|
telephone: string;
|
|
39
|
+
/**
|
|
40
|
+
* The mobile phone number for the company (optional).
|
|
41
|
+
*/
|
|
12
42
|
mobile?: string;
|
|
43
|
+
/**
|
|
44
|
+
* The first line of the company's address.
|
|
45
|
+
*/
|
|
13
46
|
address1: string;
|
|
47
|
+
/**
|
|
48
|
+
* The second line of the company's address (optional).
|
|
49
|
+
*/
|
|
14
50
|
address2?: string;
|
|
51
|
+
/**
|
|
52
|
+
* The third line of the company's address (optional).
|
|
53
|
+
*/
|
|
15
54
|
address3?: string;
|
|
55
|
+
/**
|
|
56
|
+
* The postal code for the company's address.
|
|
57
|
+
*/
|
|
16
58
|
postcode: string;
|
|
59
|
+
/**
|
|
60
|
+
* The city for the company's address.
|
|
61
|
+
*/
|
|
17
62
|
city: string;
|
|
63
|
+
/**
|
|
64
|
+
* The country for the company's address.
|
|
65
|
+
*/
|
|
18
66
|
country: CountryEnum;
|
|
67
|
+
/**
|
|
68
|
+
* The state or province for the company's address (optional).
|
|
69
|
+
*/
|
|
19
70
|
state?: string;
|
|
71
|
+
/**
|
|
72
|
+
* The VAT number for the company (optional).
|
|
73
|
+
*/
|
|
20
74
|
vat?: string;
|
|
75
|
+
/**
|
|
76
|
+
* The tax office for the company (optional).
|
|
77
|
+
*/
|
|
21
78
|
taxOffice?: string;
|
|
22
79
|
}
|
|
@@ -13,6 +13,9 @@ 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
|
+
/**
|
|
17
|
+
* Data Transfer Object for company data.
|
|
18
|
+
*/
|
|
16
19
|
class CompanyDataDto {
|
|
17
20
|
}
|
|
18
21
|
exports.CompanyDataDto = CompanyDataDto;
|
|
@@ -49,11 +52,11 @@ __decorate([
|
|
|
49
52
|
__metadata("design:type", Array)
|
|
50
53
|
], CompanyDataDto.prototype, "languages", void 0);
|
|
51
54
|
__decorate([
|
|
52
|
-
(0, class_validator_1.
|
|
55
|
+
(0, class_validator_1.IsPhoneNumber)(),
|
|
53
56
|
__metadata("design:type", String)
|
|
54
57
|
], CompanyDataDto.prototype, "telephone", void 0);
|
|
55
58
|
__decorate([
|
|
56
|
-
(0, class_validator_1.
|
|
59
|
+
(0, class_validator_1.IsPhoneNumber)(),
|
|
57
60
|
(0, class_validator_1.IsOptional)(),
|
|
58
61
|
__metadata("design:type", String)
|
|
59
62
|
], CompanyDataDto.prototype, "mobile", void 0);
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* DTO for error response
|
|
3
|
-
* Used to return error information to the client
|
|
2
|
+
* DTO for error response.
|
|
3
|
+
* Used to return detailed error information to the client.
|
|
4
4
|
*/
|
|
5
5
|
export declare class ErrorResponseDto {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* A unique and specific error code for programmatic error handling.
|
|
8
|
+
* @example 400
|
|
9
9
|
*/
|
|
10
10
|
code: number;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
12
|
+
* A developer-friendly error message or an array of messages.
|
|
13
|
+
* This can be a single string for a general error, or an array for multiple validation errors.
|
|
14
|
+
* @example "Validation failed"
|
|
15
|
+
* @example ["email must be an email", "password must be at least 8 characters"]
|
|
14
16
|
*/
|
|
15
17
|
errors?: string[] | string;
|
|
16
18
|
}
|
|
@@ -12,8 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ErrorResponseDto = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
/**
|
|
15
|
-
* DTO for error response
|
|
16
|
-
* Used to return error information to the client
|
|
15
|
+
* DTO for error response.
|
|
16
|
+
* Used to return detailed error information to the client.
|
|
17
17
|
*/
|
|
18
18
|
class ErrorResponseDto {
|
|
19
19
|
}
|
package/dist/dtos/field.dto.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { FieldTypeEnum } from '../enums/field-type.enum';
|
|
2
2
|
import { MultilangTextDto } from './multilang-text.dto';
|
|
3
|
+
/**
|
|
4
|
+
* Data Transfer Object for a form field.
|
|
5
|
+
* This class defines the structure and properties of a single field
|
|
6
|
+
* that can be used in a user interface form.
|
|
7
|
+
*/
|
|
3
8
|
export declare class FieldDto {
|
|
4
9
|
/**
|
|
5
10
|
* ID of action field
|
|
@@ -46,7 +51,7 @@ export declare class FieldDto {
|
|
|
46
51
|
*/
|
|
47
52
|
remoteValidationErrorMessage?: MultilangTextDto[];
|
|
48
53
|
/**
|
|
49
|
-
* The item attribute is
|
|
54
|
+
* The item attribute is upgradable
|
|
50
55
|
*/
|
|
51
|
-
|
|
56
|
+
upgradable: boolean;
|
|
52
57
|
}
|
package/dist/dtos/field.dto.js
CHANGED
|
@@ -14,12 +14,17 @@ const class_validator_1 = require("class-validator");
|
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
15
|
const field_type_enum_1 = require("../enums/field-type.enum");
|
|
16
16
|
const multilang_text_dto_1 = require("./multilang-text.dto");
|
|
17
|
+
/**
|
|
18
|
+
* Data Transfer Object for a form field.
|
|
19
|
+
* This class defines the structure and properties of a single field
|
|
20
|
+
* that can be used in a user interface form.
|
|
21
|
+
*/
|
|
17
22
|
class FieldDto {
|
|
18
23
|
constructor() {
|
|
19
24
|
/**
|
|
20
|
-
* The item attribute is
|
|
25
|
+
* The item attribute is upgradable
|
|
21
26
|
*/
|
|
22
|
-
this.
|
|
27
|
+
this.upgradable = false;
|
|
23
28
|
}
|
|
24
29
|
}
|
|
25
30
|
exports.FieldDto = FieldDto;
|
|
@@ -79,4 +84,4 @@ __decorate([
|
|
|
79
84
|
__decorate([
|
|
80
85
|
(0, class_validator_1.IsBoolean)(),
|
|
81
86
|
__metadata("design:type", Boolean)
|
|
82
|
-
], FieldDto.prototype, "
|
|
87
|
+
], FieldDto.prototype, "upgradable", void 0);
|
package/dist/dtos/info.dto.d.ts
CHANGED
|
@@ -1,91 +1,100 @@
|
|
|
1
1
|
import { ActionsEnum } from '../enums/actions.enum';
|
|
2
2
|
import { EventsEnum } from '../enums/events.enum';
|
|
3
|
-
import { FieldDto } from './field.dto';
|
|
4
|
-
import { ResponseDataDto } from './response-data.dto';
|
|
5
|
-
import { UnitDto } from './unit.dto';
|
|
6
3
|
import { LanguageEnum } from '../enums/language.enum';
|
|
7
4
|
import { RolesEnum } from '../enums/roles.enum';
|
|
8
5
|
import { ActionDto } from './action.dto';
|
|
9
6
|
import { TabDto } from './tab.dto';
|
|
10
7
|
import { MenuDtoWithSubmenu, MenuDtoWithUrl } from './menu.dto';
|
|
11
8
|
/**
|
|
12
|
-
* DTO for integration information
|
|
13
|
-
*
|
|
9
|
+
* DTO for integration information.
|
|
10
|
+
* This is a central DTO that contains all the necessary information
|
|
11
|
+
* for a service integration, including UI configuration, supported features,
|
|
12
|
+
* and billing details.
|
|
14
13
|
*/
|
|
15
14
|
export declare class InfoDto {
|
|
16
15
|
/**
|
|
17
|
-
* The title of the integration
|
|
16
|
+
* The display title of the integration.
|
|
17
|
+
* @example "My Awesome Integration"
|
|
18
18
|
*/
|
|
19
19
|
title: string;
|
|
20
20
|
/**
|
|
21
|
-
* The
|
|
21
|
+
* The URL of the integration's logo.
|
|
22
|
+
* @example "https://example.com/logo.png"
|
|
22
23
|
*/
|
|
23
24
|
logo?: string;
|
|
24
25
|
/**
|
|
25
|
-
*
|
|
26
|
+
* A brief description of the integration and its services.
|
|
27
|
+
* @example "This integration provides a set of tools for managing your products."
|
|
26
28
|
*/
|
|
27
29
|
description?: string;
|
|
28
30
|
/**
|
|
29
|
-
*
|
|
31
|
+
* A list of languages supported by the integration.
|
|
30
32
|
*/
|
|
31
|
-
|
|
33
|
+
supportedLanguages: LanguageEnum[];
|
|
32
34
|
/**
|
|
33
|
-
*
|
|
35
|
+
* A list of actions that are supported by this integration.
|
|
34
36
|
*/
|
|
35
|
-
|
|
37
|
+
supportedActions?: ActionsEnum[];
|
|
36
38
|
/**
|
|
37
|
-
*
|
|
39
|
+
* A list of events that the integration listens to.
|
|
40
|
+
* This allows the integration to react to specific events in the system.
|
|
38
41
|
*/
|
|
39
|
-
|
|
42
|
+
listenEvents?: EventsEnum[];
|
|
40
43
|
/**
|
|
41
|
-
*
|
|
42
|
-
*/
|
|
43
|
-
listen_events?: EventsEnum[];
|
|
44
|
-
/**
|
|
45
|
-
* The roles that need to be accepted by the company
|
|
44
|
+
* A list of roles that the company needs to accept for this integration to function correctly.
|
|
46
45
|
*/
|
|
47
46
|
requiredRoles?: RolesEnum[];
|
|
48
|
-
/**
|
|
49
|
-
* Actions that are not supported by the integration.
|
|
50
|
-
*/
|
|
51
|
-
unsupportedActions?: ActionsEnum[];
|
|
52
47
|
/**
|
|
53
48
|
* Configuration for the admin panel.
|
|
54
|
-
*
|
|
49
|
+
* This section defines the entire user interface for the integration's admin panel.
|
|
55
50
|
*/
|
|
56
51
|
adminPanel?: {
|
|
57
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* Defines the tab structure for different sections of the admin panel.
|
|
54
|
+
* Each property represents a section (e.g., product, item) and contains an array of TabDto objects.
|
|
55
|
+
*/
|
|
58
56
|
tabs?: {
|
|
59
|
-
/** Tabs
|
|
57
|
+
/** Tabs for the product management section. */
|
|
60
58
|
product: TabDto[];
|
|
61
|
-
/** Tabs
|
|
59
|
+
/** Tabs for the item management section. */
|
|
62
60
|
item: TabDto[];
|
|
63
|
-
/** Tabs
|
|
61
|
+
/** Tabs for the client management section. */
|
|
64
62
|
client: TabDto[];
|
|
65
|
-
/** Tabs
|
|
63
|
+
/** Tabs for the user management section. */
|
|
66
64
|
user: TabDto[];
|
|
67
|
-
/** Tabs
|
|
65
|
+
/** Tabs for the order management section. */
|
|
68
66
|
order: TabDto[];
|
|
69
67
|
};
|
|
70
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* Defines additional actions that can be performed in different sections of the admin panel.
|
|
70
|
+
*/
|
|
71
71
|
moreActions?: {
|
|
72
|
-
/** Actions
|
|
72
|
+
/** Actions available in the client management section. */
|
|
73
73
|
client?: ActionDto[];
|
|
74
|
-
/** Actions
|
|
74
|
+
/** Actions available in the item management section. */
|
|
75
75
|
item?: ActionDto[];
|
|
76
|
-
/** Actions
|
|
76
|
+
/** Actions available in the invoice management section. */
|
|
77
77
|
invoice?: ActionDto[];
|
|
78
|
-
/** Actions
|
|
78
|
+
/** Actions available in the user management section. */
|
|
79
79
|
user?: ActionDto[];
|
|
80
|
-
/** Actions
|
|
80
|
+
/** Actions available in the order management section. */
|
|
81
81
|
order?: ActionDto[];
|
|
82
82
|
};
|
|
83
|
-
/**
|
|
83
|
+
/**
|
|
84
|
+
* The main menu for the admin panel.
|
|
85
|
+
* This can be a simple menu with a URL or a menu with submenus.
|
|
86
|
+
*/
|
|
84
87
|
menu?: MenuDtoWithSubmenu | MenuDtoWithUrl;
|
|
88
|
+
/**
|
|
89
|
+
* Configuration for the integration's settings page.
|
|
90
|
+
*/
|
|
85
91
|
settings?: {
|
|
92
|
+
/** The label for the settings page. */
|
|
86
93
|
label: string;
|
|
94
|
+
/** The icon for the settings page. */
|
|
87
95
|
icon: string;
|
|
88
|
-
description
|
|
96
|
+
/** A description of the settings page. */
|
|
97
|
+
descrition: string;
|
|
89
98
|
} & ({
|
|
90
99
|
url: string;
|
|
91
100
|
tabs?: never;
|
|
@@ -96,44 +105,32 @@ export declare class InfoDto {
|
|
|
96
105
|
};
|
|
97
106
|
/**
|
|
98
107
|
* Configuration for the client panel.
|
|
99
|
-
*
|
|
108
|
+
* This section defines the user interface for the integration's client-facing panel.
|
|
100
109
|
*/
|
|
101
110
|
clientPanel?: {
|
|
102
|
-
/**
|
|
111
|
+
/**
|
|
112
|
+
* Defines the tab structure for the client panel.
|
|
113
|
+
*/
|
|
103
114
|
tabs?: {
|
|
104
|
-
/** Tabs
|
|
115
|
+
/** Tabs for the item management section. */
|
|
105
116
|
item: TabDto[];
|
|
106
117
|
};
|
|
107
|
-
/**
|
|
118
|
+
/**
|
|
119
|
+
* Defines additional actions that can be performed in the client panel.
|
|
120
|
+
*/
|
|
108
121
|
moreActions?: {
|
|
109
|
-
/** Actions
|
|
122
|
+
/** Actions available in the item management section. */
|
|
110
123
|
item?: ActionDto[];
|
|
111
124
|
};
|
|
112
|
-
/**
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
* If there are submenus, the label of the MenuDto and the TabDtos of the MenuDto will be displayed in the panel.
|
|
116
|
-
* The TabDtos of the MenuDto will be the submenus of the MenuDto.
|
|
125
|
+
/**
|
|
126
|
+
* The main menu for the client panel.
|
|
127
|
+
* This can be a simple menu with a URL or a menu with submenus.
|
|
117
128
|
*/
|
|
118
129
|
menu?: MenuDtoWithSubmenu | MenuDtoWithUrl;
|
|
119
130
|
};
|
|
120
131
|
/**
|
|
121
|
-
* The
|
|
122
|
-
*
|
|
123
|
-
* with this url and the jwt in the url
|
|
132
|
+
* The URL for the onboarding process after the integration is installed.
|
|
133
|
+
* This URL will be displayed in a popup or side sheet with a JWT for authentication.
|
|
124
134
|
*/
|
|
125
135
|
onboardingUrl?: string;
|
|
126
|
-
/**
|
|
127
|
-
* Units for pay-per-use billing.
|
|
128
|
-
* e.g. id: ram, unitDescription: MB, intervalDescription: month
|
|
129
|
-
* With the above in the admin the administrator will be able to set a price for
|
|
130
|
-
* MB per month (the id is the unit's unique identifier)
|
|
131
|
-
*/
|
|
132
|
-
payPerUseUnits?: UnitDto[];
|
|
133
|
-
/**
|
|
134
|
-
* Here we need to specify the fields (keys) that a successful create will return
|
|
135
|
-
* In other words, we want to know the information that a successful create will
|
|
136
|
-
* return, before the create is executed
|
|
137
|
-
*/
|
|
138
|
-
responseDataFieldNames?: Record<keyof ResponseDataDto, string>;
|
|
139
136
|
}
|