@hosterai/types 0.0.12 → 0.0.13

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 (117) hide show
  1. package/dist/dtos/action.dto.d.ts +21 -3
  2. package/dist/dtos/action.dto.js +10 -0
  3. package/dist/dtos/attachment.dto.d.ts +1 -1
  4. package/dist/dtos/attachment.dto.js +1 -1
  5. package/dist/dtos/client-data.dto.d.ts +65 -0
  6. package/dist/dtos/client-data.dto.js +106 -0
  7. package/dist/dtos/company-data.dto.d.ts +57 -0
  8. package/dist/dtos/company-data.dto.js +5 -2
  9. package/dist/dtos/error-response.dto.d.ts +8 -6
  10. package/dist/dtos/error-response.dto.js +2 -2
  11. package/dist/dtos/field.dto.d.ts +5 -0
  12. package/dist/dtos/field.dto.js +5 -0
  13. package/dist/dtos/info.dto.d.ts +61 -64
  14. package/dist/dtos/info.dto.js +6 -4
  15. package/dist/dtos/jwt.dto.d.ts +12 -9
  16. package/dist/dtos/jwt.dto.js +6 -2
  17. package/dist/dtos/menu.dto.d.ts +26 -11
  18. package/dist/dtos/multilang-text.dto.d.ts +11 -0
  19. package/dist/dtos/multilang-text.dto.js +4 -0
  20. package/dist/dtos/notification/notification-info.dto.d.ts +15 -0
  21. package/dist/dtos/notification/notification-info.dto.js +4 -0
  22. package/dist/dtos/notification/{notification-request.dto.d.ts → notification-send-request.dto.d.ts} +6 -1
  23. package/dist/dtos/notification/{notification-request.dto.js → notification-send-request.dto.js} +11 -6
  24. package/dist/dtos/product/product-info.dto.d.ts +30 -0
  25. package/dist/dtos/product/product-info.dto.js +11 -0
  26. package/dist/dtos/product/product-item-data.dto.d.ts +31 -0
  27. package/dist/dtos/product/product-item-data.dto.js +43 -0
  28. package/dist/dtos/product/product.interface.d.ts +44 -0
  29. package/dist/dtos/product/product.interface.js +2 -0
  30. package/dist/dtos/product/requests/product-create-request.dto.d.ts +18 -0
  31. package/dist/dtos/product/requests/product-create-request.dto.js +37 -0
  32. package/dist/dtos/product/requests/product-delete-request.dto.d.ts +18 -0
  33. package/dist/dtos/product/requests/product-delete-request.dto.js +37 -0
  34. package/dist/dtos/product/requests/product-downgrade-request.dto.d.ts +24 -0
  35. package/dist/dtos/product/requests/product-downgrade-request.dto.js +44 -0
  36. package/dist/dtos/product/requests/product-downgradeable-request.dto.d.ts +18 -0
  37. package/dist/dtos/product/requests/product-downgradeable-request.dto.js +37 -0
  38. package/dist/dtos/product/requests/product-renew-request.dto.d.ts +18 -0
  39. package/dist/dtos/product/requests/product-renew-request.dto.js +37 -0
  40. package/dist/dtos/product/requests/product-suspend-request.dto.d.ts +18 -0
  41. package/dist/dtos/product/requests/product-suspend-request.dto.js +37 -0
  42. package/dist/dtos/product/requests/product-unsuspend-request.dto.d.ts +18 -0
  43. package/dist/dtos/product/requests/product-unsuspend-request.dto.js +37 -0
  44. package/dist/dtos/product/requests/product-upgrade-request.dto.d.ts +24 -0
  45. package/dist/dtos/product/requests/product-upgrade-request.dto.js +44 -0
  46. package/dist/dtos/product/requests/product-upgradeable-request.dto.d.ts +18 -0
  47. package/dist/dtos/product/requests/product-upgradeable-request.dto.js +37 -0
  48. package/dist/dtos/product/requests/product-validate-attributes-request.dto.d.ts +18 -0
  49. package/dist/dtos/product/requests/product-validate-attributes-request.dto.js +31 -0
  50. package/dist/dtos/product/responses/product-create-response.dto.d.ts +21 -0
  51. package/dist/dtos/product/responses/product-create-response.dto.js +11 -0
  52. package/dist/dtos/product/responses/product-delete-response.dto.d.ts +21 -0
  53. package/dist/dtos/product/responses/product-delete-response.dto.js +11 -0
  54. package/dist/dtos/product/responses/product-downgrade-response.dto.d.ts +21 -0
  55. package/dist/dtos/product/responses/product-downgrade-response.dto.js +11 -0
  56. package/dist/dtos/product/responses/product-downgradeable-response.dto.d.ts +22 -0
  57. package/dist/dtos/product/responses/product-downgradeable-response.dto.js +11 -0
  58. package/dist/dtos/product/responses/product-info-response.dto.d.ts +13 -0
  59. package/dist/dtos/product/responses/product-info-response.dto.js +11 -0
  60. package/dist/dtos/product/responses/product-renew-response.dto.d.ts +21 -0
  61. package/dist/dtos/product/responses/product-renew-response.dto.js +11 -0
  62. package/dist/dtos/product/responses/product-suspend-response.dto.d.ts +21 -0
  63. package/dist/dtos/product/responses/product-suspend-response.dto.js +11 -0
  64. package/dist/dtos/product/responses/product-unsuspend-response.dto.d.ts +21 -0
  65. package/dist/dtos/product/responses/product-unsuspend-response.dto.js +11 -0
  66. package/dist/dtos/product/responses/product-upgrade-response.dto.d.ts +22 -0
  67. package/dist/dtos/product/responses/product-upgrade-response.dto.js +11 -0
  68. package/dist/dtos/product/responses/product-upgradeable-response.dto.d.ts +22 -0
  69. package/dist/dtos/product/responses/product-upgradeable-response.dto.js +11 -0
  70. package/dist/dtos/product/responses/product-validate-attributes-response.dto.d.ts +13 -0
  71. package/dist/dtos/product/responses/product-validate-attributes-response.dto.js +11 -0
  72. package/dist/dtos/response-data.dto.d.ts +7 -0
  73. package/dist/dtos/response-data.dto.js +4 -0
  74. package/dist/dtos/setup-status-response.dto.d.ts +8 -0
  75. package/dist/dtos/setup-status-response.dto.js +4 -0
  76. package/dist/dtos/submenu.dto.d.ts +7 -0
  77. package/dist/dtos/submenu.dto.js +11 -0
  78. package/dist/dtos/success-response.dto.d.ts +4 -0
  79. package/dist/dtos/success-response.dto.js +4 -0
  80. package/dist/dtos/tab.dto.d.ts +0 -2
  81. package/dist/dtos/tab.dto.js +1 -4
  82. package/dist/dtos/task-response.dto.d.ts +4 -0
  83. package/dist/dtos/task-response.dto.js +4 -0
  84. package/dist/dtos/unit.dto.d.ts +16 -0
  85. package/dist/dtos/unit.dto.js +4 -0
  86. package/dist/enums/duration.enum.d.ts +23 -0
  87. package/dist/enums/duration.enum.js +27 -0
  88. package/dist/enums/events.enum.d.ts +2 -0
  89. package/dist/enums/events.enum.js +2 -0
  90. package/dist/enums/response-status.enum.d.ts +5 -0
  91. package/dist/enums/response-status.enum.js +9 -0
  92. package/dist/index.d.ts +57 -14
  93. package/dist/index.js +65 -19
  94. package/dist/validators/client-data-validator.d.ts +8 -0
  95. package/dist/validators/client-data-validator.js +17 -0
  96. package/dist/validators/notification-request-validator.js +2 -2
  97. package/dist/validators/product-create-request-validator.d.ts +8 -0
  98. package/dist/validators/product-create-request-validator.js +17 -0
  99. package/dist/validators/product-delete-request-validator.d.ts +8 -0
  100. package/dist/validators/product-delete-request-validator.js +17 -0
  101. package/dist/validators/product-downgrade-request-validator.d.ts +8 -0
  102. package/dist/validators/product-downgrade-request-validator.js +17 -0
  103. package/dist/validators/product-downgradeable-request-validator.d.ts +8 -0
  104. package/dist/validators/product-downgradeable-request-validator.js +17 -0
  105. package/dist/validators/product-renew-request-validator.d.ts +8 -0
  106. package/dist/validators/product-renew-request-validator.js +17 -0
  107. package/dist/validators/product-suspend-request-validator.d.ts +8 -0
  108. package/dist/validators/product-suspend-request-validator.js +17 -0
  109. package/dist/validators/product-unsuspend-request-validator.d.ts +8 -0
  110. package/dist/validators/product-unsuspend-request-validator.js +17 -0
  111. package/dist/validators/product-upgrade-request-validator.d.ts +8 -0
  112. package/dist/validators/product-upgrade-request-validator.js +17 -0
  113. package/dist/validators/product-upgradeable-request-validator.d.ts +8 -0
  114. package/dist/validators/product-upgradeable-request-validator.js +17 -0
  115. package/dist/validators/product-validate-attributes-request-validator.d.ts +8 -0
  116. package/dist/validators/product-validate-attributes-request-validator.js +17 -0
  117. package/package.json +3 -2
@@ -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 icon of the action.
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 of the action (optional).
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 link of the action.
30
+ * The URL to navigate to when the action is triggered.
31
+ * @example "/api/create"
14
32
  */
15
33
  url: string;
16
34
  }
@@ -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;
@@ -10,7 +10,7 @@ export declare class AttachmentDto {
10
10
  /**
11
11
  * The content of the file in Base64 encoding
12
12
  */
13
- content: Buffer;
13
+ content: string;
14
14
  /**
15
15
  * The content type of the file (MIME type)
16
16
  */
@@ -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", Buffer)
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.IsString)(),
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.IsString)(),
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
- * Unique error identifier
8
- * Used for error reporting and tracking
7
+ * A unique and specific error code for programmatic error handling.
8
+ * @example 400
9
9
  */
10
10
  code: number;
11
11
  /**
12
- * Array or text with error messages
13
- * May contain one or more messages describing the error
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
  }
@@ -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
@@ -14,6 +14,11 @@ 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
  /**
@@ -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
- * Contains all information related to a service integration
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 logo of the integration (optional)
21
+ * The URL of the integration's logo.
22
+ * @example "https://example.com/logo.png"
22
23
  */
23
24
  logo?: string;
24
25
  /**
25
- * Description of the integration and its services (optional)
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
- * List of supported languages for the integration.
31
+ * A list of languages supported by the integration.
30
32
  */
31
- supported_languages: LanguageEnum[];
33
+ supportedLanguages: LanguageEnum[];
32
34
  /**
33
- * Custom attributes for products.
35
+ * A list of actions that are supported by this integration.
34
36
  */
35
- product_attributes?: FieldDto[];
37
+ supportedActions?: ActionsEnum[];
36
38
  /**
37
- * Custom attributes for items.
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
- item_attributes?: FieldDto[];
42
+ listenEvents?: EventsEnum[];
40
43
  /**
41
- * Events that the integration listens to.
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
- * Contains all UI and action configuration for the admin interface.
49
+ * This section defines the entire user interface for the integration's admin panel.
55
50
  */
56
51
  adminPanel?: {
57
- /** Tab groups for different admin panel sections in the admin panel. */
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 related to products. */
57
+ /** Tabs for the product management section. */
60
58
  product: TabDto[];
61
- /** Tabs related to items. */
59
+ /** Tabs for the item management section. */
62
60
  item: TabDto[];
63
- /** Tabs related to clients. */
61
+ /** Tabs for the client management section. */
64
62
  client: TabDto[];
65
- /** Tabs related to users. */
63
+ /** Tabs for the user management section. */
66
64
  user: TabDto[];
67
- /** Tabs related to orders. */
65
+ /** Tabs for the order management section. */
68
66
  order: TabDto[];
69
67
  };
70
- /** Additional actions available in the admin panel. */
68
+ /**
69
+ * Defines additional actions that can be performed in different sections of the admin panel.
70
+ */
71
71
  moreActions?: {
72
- /** Actions related to clients. */
72
+ /** Actions available in the client management section. */
73
73
  client?: ActionDto[];
74
- /** Actions related to items. */
74
+ /** Actions available in the item management section. */
75
75
  item?: ActionDto[];
76
- /** Actions related to invoices. */
76
+ /** Actions available in the invoice management section. */
77
77
  invoice?: ActionDto[];
78
- /** Actions related to users. */
78
+ /** Actions available in the user management section. */
79
79
  user?: ActionDto[];
80
- /** Actions related to orders. */
80
+ /** Actions available in the order management section. */
81
81
  order?: ActionDto[];
82
82
  };
83
- /** Main menu for the admin panel. Extends TabDto and adds icon information */
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: string;
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
- * Contains all UI and action configuration for the client interface.
108
+ * This section defines the user interface for the integration's client-facing panel.
100
109
  */
101
110
  clientPanel?: {
102
- /** Tab groups for the client panel. */
111
+ /**
112
+ * Defines the tab structure for the client panel.
113
+ */
103
114
  tabs?: {
104
- /** Tabs related to items. */
115
+ /** Tabs for the item management section. */
105
116
  item: TabDto[];
106
117
  };
107
- /** Additional actions available in the client panel. */
118
+ /**
119
+ * Defines additional actions that can be performed in the client panel.
120
+ */
108
121
  moreActions?: {
109
- /** Actions related to items. */
122
+ /** Actions available in the item management section. */
110
123
  item?: ActionDto[];
111
124
  };
112
- /** Main menu for the client panel.
113
- * Each menu must have at least one TabDto.
114
- * If there are no submenus, the label of the TabDto will be displayed in the panel.
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 url for the onboarding process after installation of the integration
122
- * Will be displayed either as a popup or as a side sheet containing an iframe
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
  }
@@ -2,15 +2,17 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.InfoDto = void 0;
4
4
  /**
5
- * DTO for integration information
6
- * Contains all information related to a service integration
5
+ * DTO for integration information.
6
+ * This is a central DTO that contains all the necessary information
7
+ * for a service integration, including UI configuration, supported features,
8
+ * and billing details.
7
9
  */
8
10
  class InfoDto {
9
11
  constructor() {
10
12
  /**
11
- * Actions that are not supported by the integration.
13
+ * A list of actions that are supported by this integration.
12
14
  */
13
- this.unsupportedActions = [];
15
+ this.supportedActions = [];
14
16
  }
15
17
  }
16
18
  exports.InfoDto = InfoDto;