@hosterai/types 0.0.27 → 0.0.29

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 (136) hide show
  1. package/README.md +5 -1
  2. package/dist/decorators/all-or-none-validator.spec.js +9 -3
  3. package/dist/decorators/at-least-one-non-empty-validator.spec.js +1 -1
  4. package/dist/decorators/at-least-one-non-empty.validator.js +2 -2
  5. package/dist/decorators/is-of-allowed-types-validator.spec.js +10 -8
  6. package/dist/decorators/is-of-allowed-types.validator.js +4 -2
  7. package/dist/decorators/is-one-of.validator.d.ts +2 -2
  8. package/dist/decorators/is-one-of.validator.js +1 -1
  9. package/dist/decorators/is-plain-object.validator.d.ts +1 -1
  10. package/dist/decorators/is-plain-object.validator.js +3 -1
  11. package/dist/decorators/is-property-forbidden-validator.spec.js +12 -4
  12. package/dist/decorators/is-property-forbidden.validator.d.ts +1 -1
  13. package/dist/decorators/is-regex.validator.d.ts +1 -1
  14. package/dist/decorators/min-less-or-equal-validator.spec.js +6 -2
  15. package/dist/dtos/action.dto.js +5 -5
  16. package/dist/dtos/addon-field.dto.d.ts +1 -1
  17. package/dist/dtos/admin-panel.dto.js +16 -18
  18. package/dist/dtos/attribute-field.dto.d.ts +1 -1
  19. package/dist/dtos/client-panel.dto.d.ts +3 -3
  20. package/dist/dtos/client-panel.dto.js +11 -10
  21. package/dist/dtos/company-data.dto.d.ts +4 -0
  22. package/dist/dtos/company-data.dto.js +19 -8
  23. package/dist/dtos/error-response.dto.js +1 -4
  24. package/dist/dtos/field-option.dto.js +3 -3
  25. package/dist/dtos/info.dto.js +10 -10
  26. package/dist/dtos/invoice/invoice-info.dto.d.ts +3 -3
  27. package/dist/dtos/invoice/invoice-info.dto.js +1 -1
  28. package/dist/dtos/invoice/invoice-item-data.dto.d.ts +2 -2
  29. package/dist/dtos/invoice/requests/base-invoice-request.dto.d.ts +30 -0
  30. package/dist/dtos/invoice/requests/base-invoice-request.dto.js +108 -0
  31. package/dist/dtos/invoice/requests/credit-note-request.dto.d.ts +2 -2
  32. package/dist/dtos/invoice/requests/credit-note-request.dto.js +2 -2
  33. package/dist/dtos/invoice/requests/invoice-request.dto.d.ts +2 -2
  34. package/dist/dtos/invoice/requests/invoice-request.dto.js +2 -2
  35. package/dist/dtos/invoice/requests/proforma-invoice-request.dto.d.ts +2 -19
  36. package/dist/dtos/invoice/requests/proforma-invoice-request.dto.js +2 -95
  37. package/dist/dtos/invoice/responses/credit-note-response.dto.d.ts +1 -1
  38. package/dist/dtos/invoice/responses/invoice-response.dto.d.ts +1 -1
  39. package/dist/dtos/invoice/responses/tax-details-response.dto.js +1 -1
  40. package/dist/dtos/invoice-contact-data.dto.d.ts +2 -2
  41. package/dist/dtos/invoice-contact-data.dto.js +5 -5
  42. package/dist/dtos/menu.dto.js +8 -4
  43. package/dist/dtos/notification/responses/notification-send-response.dto.d.ts +1 -1
  44. package/dist/dtos/notification/sender/sender-sms.dto.js +1 -1
  45. package/dist/dtos/product/product-info.dto.js +11 -5
  46. package/dist/dtos/product/product-item-data.dto.d.ts +2 -2
  47. package/dist/dtos/product/requests/product-create-request.dto.js +1 -1
  48. package/dist/dtos/product/requests/product-delete-request.dto.js +3 -3
  49. package/dist/dtos/product/requests/product-downgradable-request.dto.js +1 -1
  50. package/dist/dtos/product/requests/product-downgrade-request.dto.js +1 -1
  51. package/dist/dtos/product/requests/product-downgradeable-request.dto.d.ts +18 -0
  52. package/dist/dtos/product/requests/product-downgradeable-request.dto.js +37 -0
  53. package/dist/dtos/product/requests/product-renew-request.dto.js +1 -1
  54. package/dist/dtos/product/requests/product-suspend-request.dto.js +1 -1
  55. package/dist/dtos/product/requests/product-unsuspend-request.dto.js +1 -1
  56. package/dist/dtos/product/requests/product-upgradable-request.dto.js +1 -1
  57. package/dist/dtos/product/requests/product-upgrade-request.dto.js +1 -1
  58. package/dist/dtos/product/requests/product-upgradeable-request.dto.d.ts +18 -0
  59. package/dist/dtos/product/requests/product-upgradeable-request.dto.js +37 -0
  60. package/dist/dtos/product/responses/product-downgradeable-response.dto.d.ts +22 -0
  61. package/dist/dtos/product/responses/product-downgradeable-response.dto.js +11 -0
  62. package/dist/dtos/product/responses/product-info-response.dto.js +1 -1
  63. package/dist/dtos/product/responses/product-upgradeable-response.dto.d.ts +22 -0
  64. package/dist/dtos/product/responses/product-upgradeable-response.dto.js +11 -0
  65. package/dist/dtos/responses/validate-attributes-response.dto.d.ts +2 -2
  66. package/dist/dtos/tab.dto.js +2 -2
  67. package/dist/dtos/tax-manager/tax-details-request.dto.d.ts +31 -0
  68. package/dist/dtos/tax-manager/tax-details-request.dto.js +84 -0
  69. package/dist/dtos/unit.dto.js +3 -3
  70. package/dist/enums/country.enum.d.ts +1 -1
  71. package/dist/enums/country.enum.js +312 -78
  72. package/dist/enums/currency.enum.d.ts +43 -0
  73. package/dist/enums/currency.enum.js +47 -0
  74. package/dist/enums/events.enum.d.ts +3 -0
  75. package/dist/enums/events.enum.js +3 -0
  76. package/dist/index.d.ts +2 -1
  77. package/dist/index.js +2 -1
  78. package/dist/openapi/schemas/components.schemas.d.ts +3 -33
  79. package/dist/openapi/schemas/components.schemas.js +19 -40
  80. package/dist/validators/action-validator.spec.js +3 -3
  81. package/dist/validators/addon-field-validator.spec.js +10 -3
  82. package/dist/validators/admin-panel-more-actions-validator.spec.js +12 -8
  83. package/dist/validators/admin-panel-more-actions.validator.d.ts +1 -1
  84. package/dist/validators/admin-panel-tabs-validator.spec.js +74 -10
  85. package/dist/validators/admin-panel-tabs.validator.d.ts +1 -1
  86. package/dist/validators/admin-panel-validator.spec.js +164 -32
  87. package/dist/validators/attachment-validator.spec.js +8 -8
  88. package/dist/validators/attribute-field-validator.spec.js +18 -7
  89. package/dist/validators/client-panel-validator.spec.js +57 -9
  90. package/dist/validators/country-validator.spec.js +7 -7
  91. package/dist/validators/field-validator.spec.js +35 -10
  92. package/dist/validators/info-validator.spec.js +10 -10
  93. package/dist/validators/invoice-contact-data-validator.spec.js +18 -10
  94. package/dist/validators/invoice-info-validator.spec.js +14 -10
  95. package/dist/validators/invoice-item-data-validator.spec.js +4 -4
  96. package/dist/validators/item-data-validator.spec.js +17 -9
  97. package/dist/validators/menu-with-submenu-validator.spec.js +13 -11
  98. package/dist/validators/menu-with-url-validator.spec.js +15 -5
  99. package/dist/validators/notification-info-validator.spec.js +23 -15
  100. package/dist/validators/product-downgradeable-request-validator.d.ts +8 -0
  101. package/dist/validators/product-downgradeable-request-validator.js +17 -0
  102. package/dist/validators/product-info-validator.spec.js +46 -32
  103. package/dist/validators/product-info.validator.d.ts +1 -1
  104. package/dist/validators/product-item-data-validator.spec.js +12 -4
  105. package/dist/validators/product-upgradeable-request-validator.d.ts +8 -0
  106. package/dist/validators/product-upgradeable-request-validator.js +17 -0
  107. package/dist/validators/sender-sms-validator.spec.js +5 -2
  108. package/dist/validators/settings-with-tabs-validator.spec.js +176 -12
  109. package/dist/validators/settings-with-url-validator.spec.js +89 -11
  110. package/dist/validators/tab-validator.spec.js +7 -7
  111. package/dist/validators/tin-validation-details-validator.spec.js +8 -8
  112. package/dist/validators/transaction-data-validator.spec.js +13 -8
  113. package/dist/validators/unit-validator.spec.js +13 -4
  114. package/package.json +1 -1
  115. package/dist/dtos/info/info-notification.dto.d.ts +0 -5
  116. package/dist/dtos/info/info-notification.dto.js +0 -7
  117. package/dist/dtos/info/info.dto.d.ts +0 -196
  118. package/dist/dtos/info/info.dto.js +0 -278
  119. package/dist/dtos/notification/notification-request.dto.d.ts +0 -20
  120. package/dist/dtos/notification/notification-request.dto.js +0 -31
  121. package/dist/dtos/receiver/receiver-email.dto.d.ts +0 -20
  122. package/dist/dtos/receiver/receiver-email.dto.js +0 -39
  123. package/dist/dtos/receiver/receiver-push.dto.d.ts +0 -15
  124. package/dist/dtos/receiver/receiver-push.dto.js +0 -31
  125. package/dist/dtos/receiver/receiver-sms.dto.d.ts +0 -11
  126. package/dist/dtos/receiver/receiver-sms.dto.js +0 -26
  127. package/dist/dtos/request.dto.d.ts +0 -20
  128. package/dist/dtos/request.dto.js +0 -31
  129. package/dist/dtos/sender/sender-email.dto.d.ts +0 -25
  130. package/dist/dtos/sender/sender-email.dto.js +0 -46
  131. package/dist/dtos/sender/sender-push.dto.d.ts +0 -31
  132. package/dist/dtos/sender/sender-push.dto.js +0 -50
  133. package/dist/dtos/sender/sender-sms.dto.d.ts +0 -15
  134. package/dist/dtos/sender/sender-sms.dto.js +0 -30
  135. package/dist/enums/message-type.enum.d.ts +0 -5
  136. package/dist/enums/message-type.enum.js +0 -9
package/README.md CHANGED
@@ -97,6 +97,10 @@ DTOs define the shape of data that is exchanged between different parts of the s
97
97
  - `requests/validate-attributes-request.dto.ts`: Defines the structure for validating product attributes.
98
98
  - `responses/validate-attributes-response.dto.ts`: Response from validating product attributes.
99
99
 
100
+ **Tax Manager DTOs:**
101
+
102
+ - `tax-manager/tax-details-request.dto.ts`: Request payload for calculating tax details.
103
+
100
104
  **Product DTOs:**
101
105
 
102
106
  - `product/product-info.dto.ts`: Contains detailed information about a product. Uses `AttributeFieldDto` for product/item attributes.
@@ -110,10 +114,10 @@ DTOs define the shape of data that is exchanged between different parts of the s
110
114
  - `invoice/invoice-item-data.dto.ts`: Extends `ItemDataDto` with invoice-specific action type.
111
115
  - `invoice/transaction-data.dto.ts`: Transaction details (ID, amount, payment method, date).
112
116
  - `invoice/tin-validation-details.dto.ts`: Tax Identification Number validation details.
117
+ - `invoice/requests/base-invoice-request.dto.ts`: Base request payload with common invoice fields.
113
118
  - `invoice/requests/proforma-invoice-request.dto.ts`: Request payload for creating a proforma invoice.
114
119
  - `invoice/requests/invoice-request.dto.ts`: Request payload for creating a standard invoice.
115
120
  - `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
121
  - `invoice/responses/proforma-invoice-response.dto.ts`: Response after creating a proforma invoice.
118
122
  - `invoice/responses/invoice-response.dto.ts`: Response after creating a standard invoice.
119
123
  - `invoice/responses/credit-note-response.dto.ts`: Response after creating a credit note.
@@ -14,7 +14,9 @@ const class_validator_1 = require("class-validator");
14
14
  const all_or_none_validator_1 = require("./all-or-none.validator");
15
15
  // Pairs
16
16
  let PairDto = class PairDto {
17
- constructor(data) { Object.assign(this, data); }
17
+ constructor(data) {
18
+ Object.assign(this, data);
19
+ }
18
20
  };
19
21
  PairDto = __decorate([
20
22
  (0, all_or_none_validator_1.AllOrNoneProperty)(['a', 'b']),
@@ -22,7 +24,9 @@ PairDto = __decorate([
22
24
  ], PairDto);
23
25
  // Multiple pairs
24
26
  let MultiPairDto = class MultiPairDto {
25
- constructor(data) { Object.assign(this, data); }
27
+ constructor(data) {
28
+ Object.assign(this, data);
29
+ }
26
30
  };
27
31
  MultiPairDto = __decorate([
28
32
  (0, all_or_none_validator_1.AllOrNoneProperty)([
@@ -33,7 +37,9 @@ MultiPairDto = __decorate([
33
37
  ], MultiPairDto);
34
38
  // Group of 3+
35
39
  let GroupDto = class GroupDto {
36
- constructor(data) { Object.assign(this, data); }
40
+ constructor(data) {
41
+ Object.assign(this, data);
42
+ }
37
43
  };
38
44
  GroupDto = __decorate([
39
45
  (0, all_or_none_validator_1.AllOrNoneProperty)(['x', 'y', 'z']),
@@ -74,6 +74,6 @@ describe('AtLeastOneNonEmptyClass', () => {
74
74
  const constraints = errors[0].constraints;
75
75
  expect(constraints).toBeDefined();
76
76
  const messages = Object.values(constraints);
77
- expect(messages.some(msg => msg.includes('At least one of the following must be non-empty: a, b, c'))).toBe(true);
77
+ expect(messages.some((msg) => msg.includes('At least one of the following must be non-empty: a, b, c'))).toBe(true);
78
78
  });
79
79
  });
@@ -19,7 +19,7 @@ let AtLeastOneNonEmptyConstraint = class AtLeastOneNonEmptyConstraint {
19
19
  validate(_, args) {
20
20
  const object = args.object;
21
21
  const keys = args.constraints[0];
22
- return keys.some(key => isNonEmptyObjectOrArray(object[key]));
22
+ return keys.some((key) => isNonEmptyObjectOrArray(object[key]));
23
23
  }
24
24
  defaultMessage(args) {
25
25
  const keys = args.constraints[0];
@@ -34,7 +34,7 @@ function AtLeastOneNonEmptyProperty(keys, validationOptions) {
34
34
  (0, class_validator_1.registerDecorator)({
35
35
  name: 'AtLeastOneNonEmpty',
36
36
  target: constructor,
37
- propertyName: "",
37
+ propertyName: '',
38
38
  options: validationOptions,
39
39
  constraints: [keys],
40
40
  validator: AtLeastOneNonEmptyConstraint,
@@ -79,7 +79,9 @@ __decorate([
79
79
  class ValidationOptionsDto {
80
80
  }
81
81
  __decorate([
82
- (0, is_of_allowed_types_validator_1.IsOfAllowedTypes)(['string'], { message: 'Custom error message' }),
82
+ (0, is_of_allowed_types_validator_1.IsOfAllowedTypes)(['string'], {
83
+ message: 'Custom error message',
84
+ }),
83
85
  __metadata("design:type", Object)
84
86
  ], ValidationOptionsDto.prototype, "prop", void 0);
85
87
  describe('IsOfAllowedTypes validator - compact', () => {
@@ -105,7 +107,7 @@ describe('IsOfAllowedTypes validator - compact', () => {
105
107
  dto.arrProp = 'not array';
106
108
  dto.typedArrProp = [{}];
107
109
  dto.multiTypeProp = true;
108
- const errors = (0, class_validator_1.validateSync)(dto).map(e => e.property);
110
+ const errors = (0, class_validator_1.validateSync)(dto).map((e) => e.property);
109
111
  expect(new Set(errors)).toEqual(new Set([
110
112
  'arrProp',
111
113
  'boolProp',
@@ -126,25 +128,25 @@ describe('IsOfAllowedTypes validator - compact', () => {
126
128
  it('fails when objectClass is provided but instance check fails', () => {
127
129
  const dto = new TestDto();
128
130
  dto.typedObjProp = {};
129
- expect((0, class_validator_1.validateSync)(dto).some(e => e.property === 'typedObjProp')).toBe(true);
131
+ expect((0, class_validator_1.validateSync)(dto).some((e) => e.property === 'typedObjProp')).toBe(true);
130
132
  });
131
133
  it('fails when arrayElementClass is provided but element check fails', () => {
132
134
  const dto = new TestDto();
133
135
  dto.typedArrProp = [{}];
134
- expect((0, class_validator_1.validateSync)(dto).some(e => e.property === 'typedArrProp')).toBe(true);
136
+ expect((0, class_validator_1.validateSync)(dto).some((e) => e.property === 'typedArrProp')).toBe(true);
135
137
  });
136
138
  // Added coverage tests
137
139
  it('fails if string is empty but required', () => {
138
140
  const dto = new OptionsTestDto();
139
141
  dto.strPatternProp = ' ';
140
142
  const errors = (0, class_validator_1.validateSync)(dto);
141
- expect(errors.some(e => e.property === 'strPatternProp')).toBe(true);
143
+ expect(errors.some((e) => e.property === 'strPatternProp')).toBe(true);
142
144
  });
143
145
  it('fails if string does not match pattern', () => {
144
146
  const dto = new OptionsTestDto();
145
147
  dto.strPatternProp = '123';
146
148
  const errors = (0, class_validator_1.validateSync)(dto);
147
- expect(errors.some(e => e.property === 'strPatternProp')).toBe(true);
149
+ expect(errors.some((e) => e.property === 'strPatternProp')).toBe(true);
148
150
  });
149
151
  it('passes if string matches pattern', () => {
150
152
  const dto = new OptionsTestDto();
@@ -156,7 +158,7 @@ describe('IsOfAllowedTypes validator - compact', () => {
156
158
  const dto = new OptionsTestDto();
157
159
  dto.arrayNotEmptyProp = [];
158
160
  const errors = (0, class_validator_1.validateSync)(dto);
159
- expect(errors.some(e => e.property === 'arrayNotEmptyProp')).toBe(true);
161
+ expect(errors.some((e) => e.property === 'arrayNotEmptyProp')).toBe(true);
160
162
  });
161
163
  it('passes if array is non-empty and arrayNotEmpty true', () => {
162
164
  const dto = new ArrayNotEmptyDto();
@@ -168,7 +170,7 @@ describe('IsOfAllowedTypes validator - compact', () => {
168
170
  const dto = new OptionsTestDto();
169
171
  dto.objectNotEmptyProp = {};
170
172
  const errors = (0, class_validator_1.validateSync)(dto);
171
- expect(errors.some(e => e.property === 'objectNotEmptyProp')).toBe(true);
173
+ expect(errors.some((e) => e.property === 'objectNotEmptyProp')).toBe(true);
172
174
  });
173
175
  it('passes if object is non-empty and objectNotEmpty true', () => {
174
176
  const dto = new ObjectNotEmptyDto();
@@ -18,7 +18,8 @@ function IsOfAllowedTypes(types, optionsOrValidationOptions, validationOptions)
18
18
  finalValidationOptions = validationOptions;
19
19
  }
20
20
  else {
21
- finalValidationOptions = optionsOrValidationOptions;
21
+ finalValidationOptions =
22
+ optionsOrValidationOptions;
22
23
  }
23
24
  }
24
25
  (0, class_validator_1.registerDecorator)({
@@ -65,7 +66,8 @@ function IsOfAllowedTypes(types, optionsOrValidationOptions, validationOptions)
65
66
  case 'array':
66
67
  if (Array.isArray(value) &&
67
68
  (!opts.arrayElementClass ||
68
- value.every((item) => item instanceof opts.arrayElementClass))) {
69
+ value.every((item) => item instanceof
70
+ opts.arrayElementClass))) {
69
71
  if (opts.arrayNotEmpty && value.length === 0) {
70
72
  return false;
71
73
  }
@@ -1,2 +1,2 @@
1
- import { ValidationOptions } from "class-validator";
2
- export declare function IsOneOf(validClasses: Function[], validationOptions?: ValidationOptions): (object: Object, propertyName: string) => void;
1
+ import { ValidationOptions } from 'class-validator';
2
+ export declare function IsOneOf(validClasses: Function[], validationOptions?: ValidationOptions): (object: object, propertyName: string) => void;
@@ -11,7 +11,7 @@ function IsOneOf(validClasses, validationOptions) {
11
11
  options: validationOptions,
12
12
  validator: {
13
13
  validate(value, _args) {
14
- return validClasses.some(cls => value instanceof cls);
14
+ return validClasses.some((cls) => value instanceof cls);
15
15
  },
16
16
  },
17
17
  });
@@ -1,2 +1,2 @@
1
1
  import { ValidationOptions } from 'class-validator';
2
- export declare function IsPlainObject(validationOptions?: ValidationOptions): (object: Object, propertyName: string) => void;
2
+ export declare function IsPlainObject(validationOptions?: ValidationOptions): (object: object, propertyName: string) => void;
@@ -11,7 +11,9 @@ function IsPlainObject(validationOptions) {
11
11
  options: validationOptions,
12
12
  validator: {
13
13
  validate(value, _args) {
14
- if (value === null || typeof value !== 'object' || value.constructor !== Object) {
14
+ if (value === null ||
15
+ typeof value !== 'object' ||
16
+ value.constructor !== Object) {
15
17
  return false;
16
18
  }
17
19
  for (const key in value) {
@@ -15,7 +15,9 @@ const is_property_forbidden_validator_1 = require("../decorators/is-property-for
15
15
  class TestDto {
16
16
  }
17
17
  __decorate([
18
- (0, is_property_forbidden_validator_1.IsPropertyForbidden)('forbiddenProp', { message: 'forbiddenProp must not be present' }),
18
+ (0, is_property_forbidden_validator_1.IsPropertyForbidden)('forbiddenProp', {
19
+ message: 'forbiddenProp must not be present',
20
+ }),
19
21
  __metadata("design:type", Object)
20
22
  ], TestDto.prototype, "someProp", void 0);
21
23
  class TestDto2 {
@@ -31,7 +33,10 @@ describe('IsPropertyForbidden decorator', () => {
31
33
  expect(errors.length).toBe(0);
32
34
  });
33
35
  it('fails validation when forbidden property is present', async () => {
34
- const dto = (0, class_transformer_1.plainToInstance)(TestDto, { someProp: 'allowed', forbiddenProp: 'not allowed' });
36
+ const dto = (0, class_transformer_1.plainToInstance)(TestDto, {
37
+ someProp: 'allowed',
38
+ forbiddenProp: 'not allowed',
39
+ });
35
40
  const errors = await (0, class_validator_1.validate)(dto);
36
41
  expect(errors.length).toBeGreaterThan(0);
37
42
  // Validate error message
@@ -53,10 +58,13 @@ describe('IsPropertyForbidden decorator', () => {
53
58
  expect(errors[0].constraints.isPropertyForbidden).toBe('Custom forbidden message');
54
59
  });
55
60
  it('uses default error message if no message is provided', async () => {
56
- const dto = (0, class_transformer_1.plainToInstance)(TestDto2, { someProp: 'allowed', forbiddenProp: 'not allowed' });
61
+ const dto = (0, class_transformer_1.plainToInstance)(TestDto2, {
62
+ someProp: 'allowed',
63
+ forbiddenProp: 'not allowed',
64
+ });
57
65
  const errors = await (0, class_validator_1.validate)(dto);
58
66
  expect(errors.length).toBeGreaterThan(0);
59
67
  expect(errors[0].constraints).toBeDefined();
60
- expect(errors[0].constraints.isPropertyForbidden).toBe('Property \'forbiddenProp\' is not allowed');
68
+ expect(errors[0].constraints.isPropertyForbidden).toBe("Property 'forbiddenProp' is not allowed");
61
69
  });
62
70
  });
@@ -1,2 +1,2 @@
1
1
  import { ValidationOptions } from 'class-validator';
2
- export declare function IsPropertyForbidden(property: string, validationOptions?: ValidationOptions): (object: Object, propertyName: string) => void;
2
+ export declare function IsPropertyForbidden(property: string, validationOptions?: ValidationOptions): (object: object, propertyName: string) => void;
@@ -1,2 +1,2 @@
1
1
  import { ValidationOptions } from 'class-validator';
2
- export declare function IsRegex(validationOptions?: ValidationOptions): (object: Object, propertyName: string) => void;
2
+ export declare function IsRegex(validationOptions?: ValidationOptions): (object: object, propertyName: string) => void;
@@ -13,14 +13,18 @@ require("reflect-metadata");
13
13
  const class_validator_1 = require("class-validator");
14
14
  const min_less_or_equal_validator_1 = require("./min-less-or-equal.validator");
15
15
  let MinMaxDto = class MinMaxDto {
16
- constructor(data) { Object.assign(this, data); }
16
+ constructor(data) {
17
+ Object.assign(this, data);
18
+ }
17
19
  };
18
20
  MinMaxDto = __decorate([
19
21
  (0, min_less_or_equal_validator_1.MinLessOrEqualMaxProperty)(['min', 'max']),
20
22
  __metadata("design:paramtypes", [Object])
21
23
  ], MinMaxDto);
22
24
  let MultiMinMaxDto = class MultiMinMaxDto {
23
- constructor(data) { Object.assign(this, data); }
25
+ constructor(data) {
26
+ Object.assign(this, data);
27
+ }
24
28
  };
25
29
  MultiMinMaxDto = __decorate([
26
30
  (0, min_less_or_equal_validator_1.MinLessOrEqualMaxProperty)([
@@ -32,7 +32,7 @@ __decorate([
32
32
  (0, class_validator_jsonschema_1.JSONSchema)({
33
33
  title: 'Icon',
34
34
  description: 'Name of the icon to display for the action.',
35
- type: 'string'
35
+ type: 'string',
36
36
  }),
37
37
  __metadata("design:type", String)
38
38
  ], ActionDto.prototype, "icon", void 0);
@@ -42,7 +42,7 @@ __decorate([
42
42
  (0, class_validator_jsonschema_1.JSONSchema)({
43
43
  title: 'Label',
44
44
  description: 'Text label for the action.',
45
- type: 'string'
45
+ type: 'string',
46
46
  }),
47
47
  __metadata("design:type", String)
48
48
  ], ActionDto.prototype, "label", void 0);
@@ -51,8 +51,8 @@ __decorate([
51
51
  (0, class_validator_1.IsNotEmpty)(),
52
52
  (0, class_validator_jsonschema_1.JSONSchema)({
53
53
  title: 'Open Method',
54
- description: 'Method by which the action\'s URL should be opened.',
55
- enum: Object.values(open_method_enum_1.OpenMethodEnum)
54
+ description: "Method by which the action's URL should be opened.",
55
+ enum: Object.values(open_method_enum_1.OpenMethodEnum),
56
56
  }),
57
57
  __metadata("design:type", String)
58
58
  ], ActionDto.prototype, "openMethod", void 0);
@@ -62,7 +62,7 @@ __decorate([
62
62
  (0, class_validator_jsonschema_1.JSONSchema)({
63
63
  title: 'URL',
64
64
  description: 'URL to navigate to when the action is triggered.',
65
- type: 'string'
65
+ type: 'string',
66
66
  }),
67
67
  __metadata("design:type", String)
68
68
  ], ActionDto.prototype, "url", void 0);
@@ -1,4 +1,4 @@
1
- import { FieldDto } from "./field.dto";
1
+ import { FieldDto } from './field.dto';
2
2
  /**
3
3
  * Fields defined by the seller for a product, requested during checkout setup.
4
4
  * These fields contain information relevant only to the seller, not to the integration.
@@ -34,7 +34,7 @@ __decorate([
34
34
  title: 'Product Tabs',
35
35
  description: 'Tabs shown on the product detail page in Admin panel.',
36
36
  type: 'array',
37
- items: { $ref: '#/components/schemas/TabDto' }
37
+ items: { $ref: '#/components/schemas/TabDto' },
38
38
  }),
39
39
  __metadata("design:type", Array)
40
40
  ], AdminPanelTabsDto.prototype, "product", void 0);
@@ -48,7 +48,7 @@ __decorate([
48
48
  title: 'Item Tabs',
49
49
  description: 'Tabs shown on the item detail page in Admin panel.',
50
50
  type: 'array',
51
- items: { $ref: '#/components/schemas/TabDto' }
51
+ items: { $ref: '#/components/schemas/TabDto' },
52
52
  }),
53
53
  __metadata("design:type", Array)
54
54
  ], AdminPanelTabsDto.prototype, "item", void 0);
@@ -62,7 +62,7 @@ __decorate([
62
62
  title: 'Client Tabs',
63
63
  description: 'Tabs shown on the client profile page in Admin panel.',
64
64
  type: 'array',
65
- items: { $ref: '#/components/schemas/TabDto' }
65
+ items: { $ref: '#/components/schemas/TabDto' },
66
66
  }),
67
67
  __metadata("design:type", Array)
68
68
  ], AdminPanelTabsDto.prototype, "client", void 0);
@@ -76,7 +76,7 @@ __decorate([
76
76
  title: 'User Tabs',
77
77
  description: 'Tabs shown on the user page in Admin panel.',
78
78
  type: 'array',
79
- items: { $ref: '#/components/schemas/TabDto' }
79
+ items: { $ref: '#/components/schemas/TabDto' },
80
80
  }),
81
81
  __metadata("design:type", Array)
82
82
  ], AdminPanelTabsDto.prototype, "user", void 0);
@@ -90,7 +90,7 @@ __decorate([
90
90
  title: 'Order Tabs',
91
91
  description: 'Tabs shown on the order page in Admin panel.',
92
92
  type: 'array',
93
- items: { $ref: '#/components/schemas/TabDto' }
93
+ items: { $ref: '#/components/schemas/TabDto' },
94
94
  }),
95
95
  __metadata("design:type", Array)
96
96
  ], AdminPanelTabsDto.prototype, "order", void 0);
@@ -110,7 +110,7 @@ __decorate([
110
110
  title: 'Client Actions',
111
111
  description: 'Additional actions available on the client page.',
112
112
  type: 'array',
113
- items: { $ref: '#/components/schemas/ActionDto' }
113
+ items: { $ref: '#/components/schemas/ActionDto' },
114
114
  }),
115
115
  __metadata("design:type", Array)
116
116
  ], AdminPanelMoreActionsDto.prototype, "client", void 0);
@@ -124,7 +124,7 @@ __decorate([
124
124
  title: 'Item Actions',
125
125
  description: 'Additional actions available on the item page.',
126
126
  type: 'array',
127
- items: { $ref: '#/components/schemas/ActionDto' }
127
+ items: { $ref: '#/components/schemas/ActionDto' },
128
128
  }),
129
129
  __metadata("design:type", Array)
130
130
  ], AdminPanelMoreActionsDto.prototype, "item", void 0);
@@ -138,7 +138,7 @@ __decorate([
138
138
  title: 'Invoice Actions',
139
139
  description: 'Additional actions available on the invoice page.',
140
140
  type: 'array',
141
- items: { $ref: '#/components/schemas/ActionDto' }
141
+ items: { $ref: '#/components/schemas/ActionDto' },
142
142
  }),
143
143
  __metadata("design:type", Array)
144
144
  ], AdminPanelMoreActionsDto.prototype, "invoice", void 0);
@@ -152,7 +152,7 @@ __decorate([
152
152
  title: 'User Actions',
153
153
  description: 'Additional actions available on the user page.',
154
154
  type: 'array',
155
- items: { $ref: '#/components/schemas/ActionDto' }
155
+ items: { $ref: '#/components/schemas/ActionDto' },
156
156
  }),
157
157
  __metadata("design:type", Array)
158
158
  ], AdminPanelMoreActionsDto.prototype, "user", void 0);
@@ -166,7 +166,7 @@ __decorate([
166
166
  title: 'Order Actions',
167
167
  description: 'Additional actions available on the order page.',
168
168
  type: 'array',
169
- items: { $ref: '#/components/schemas/ActionDto' }
169
+ items: { $ref: '#/components/schemas/ActionDto' },
170
170
  }),
171
171
  __metadata("design:type", Array)
172
172
  ], AdminPanelMoreActionsDto.prototype, "order", void 0);
@@ -183,8 +183,7 @@ __decorate([
183
183
  (0, class_validator_jsonschema_1.JSONSchema)({
184
184
  title: 'Tabs',
185
185
  description: 'Tab structure for Admin panel sections.',
186
- type: 'object',
187
- properties: { tabs: { $ref: '#/components/schemas/AdminPanelTabsDto' } }
186
+ $ref: '#/components/schemas/AdminPanelTabsDto',
188
187
  }),
189
188
  __metadata("design:type", AdminPanelTabsDto)
190
189
  ], AdminPanelDto.prototype, "tabs", void 0);
@@ -195,8 +194,7 @@ __decorate([
195
194
  (0, class_validator_jsonschema_1.JSONSchema)({
196
195
  title: 'More Actions',
197
196
  description: 'Additional actions in Admin panel sections.',
198
- type: 'object',
199
- properties: { moreActions: { $ref: '#/components/schemas/AdminPanelMoreActionsDto' } }
197
+ $ref: '#/components/schemas/AdminPanelMoreActionsDto',
200
198
  }),
201
199
  __metadata("design:type", AdminPanelMoreActionsDto)
202
200
  ], AdminPanelDto.prototype, "moreActions", void 0);
@@ -213,8 +211,8 @@ __decorate([
213
211
  type: 'object',
214
212
  oneOf: [
215
213
  { $ref: '#/components/schemas/MenuDtoWithSubmenu' },
216
- { $ref: '#/components/schemas/MenuDtoWithUrl' }
217
- ]
214
+ { $ref: '#/components/schemas/MenuDtoWithUrl' },
215
+ ],
218
216
  }),
219
217
  __metadata("design:type", Object)
220
218
  ], AdminPanelDto.prototype, "menu", void 0);
@@ -231,8 +229,8 @@ __decorate([
231
229
  type: 'object',
232
230
  oneOf: [
233
231
  { $ref: '#/components/schemas/SettingsWithUrlDto' },
234
- { $ref: '#/components/schemas/SettingsWithTabsDto' }
235
- ]
232
+ { $ref: '#/components/schemas/SettingsWithTabsDto' },
233
+ ],
236
234
  }),
237
235
  __metadata("design:type", Object)
238
236
  ], AdminPanelDto.prototype, "settings", void 0);
@@ -1,4 +1,4 @@
1
- import { FieldDto } from "./field.dto";
1
+ import { FieldDto } from './field.dto';
2
2
  export declare class AttributeFieldDto extends FieldDto {
3
3
  /**
4
4
  * Indicates if the field is visible in orders
@@ -1,6 +1,6 @@
1
- import { ActionDto } from "./action.dto";
2
- import { MenuDtoWithSubmenu, MenuDtoWithUrl } from "./menu.dto";
3
- import { TabDto } from "./tab.dto";
1
+ import { ActionDto } from './action.dto';
2
+ import { MenuDtoWithSubmenu, MenuDtoWithUrl } from './menu.dto';
3
+ import { TabDto } from './tab.dto';
4
4
  export declare class ClientPanelTabsDto {
5
5
  item?: TabDto[];
6
6
  }
@@ -32,12 +32,12 @@ __decorate([
32
32
  title: 'Item Tabs',
33
33
  description: 'Tabs shown on the item page in Client panel.',
34
34
  type: 'array',
35
- items: { $ref: '#/components/schemas/TabDto' }
35
+ items: { $ref: '#/components/schemas/TabDto' },
36
36
  }),
37
37
  __metadata("design:type", Array)
38
38
  ], ClientPanelTabsDto.prototype, "item", void 0);
39
39
  exports.ClientPanelTabsDto = ClientPanelTabsDto = __decorate([
40
- (0, at_least_one_non_empty_validator_1.AtLeastOneNonEmptyProperty)(["item"])
40
+ (0, at_least_one_non_empty_validator_1.AtLeastOneNonEmptyProperty)(['item'])
41
41
  ], ClientPanelTabsDto);
42
42
  let ClientPanelMoreActionsDto = class ClientPanelMoreActionsDto {
43
43
  };
@@ -52,12 +52,12 @@ __decorate([
52
52
  title: 'Item Actions',
53
53
  description: 'Additional actions available on the item page in Client panel.',
54
54
  type: 'array',
55
- items: { $ref: '#/components/schemas/ActionDto' }
55
+ items: { $ref: '#/components/schemas/ActionDto' },
56
56
  }),
57
57
  __metadata("design:type", Array)
58
58
  ], ClientPanelMoreActionsDto.prototype, "item", void 0);
59
59
  exports.ClientPanelMoreActionsDto = ClientPanelMoreActionsDto = __decorate([
60
- (0, at_least_one_non_empty_validator_1.AtLeastOneNonEmptyProperty)(["item"])
60
+ (0, at_least_one_non_empty_validator_1.AtLeastOneNonEmptyProperty)(['item'])
61
61
  ], ClientPanelMoreActionsDto);
62
62
  let ClientPanelDto = class ClientPanelDto {
63
63
  };
@@ -69,8 +69,7 @@ __decorate([
69
69
  (0, class_validator_jsonschema_1.JSONSchema)({
70
70
  title: 'Tabs',
71
71
  description: 'Tab structure for Client panel.',
72
- type: 'object',
73
- properties: { tabs: { $ref: '#/components/schemas/ClientPanelTabsDto' } }
72
+ $ref: '#/components/schemas/ClientPanelTabsDto',
74
73
  }),
75
74
  __metadata("design:type", ClientPanelTabsDto)
76
75
  ], ClientPanelDto.prototype, "tabs", void 0);
@@ -81,8 +80,7 @@ __decorate([
81
80
  (0, class_validator_jsonschema_1.JSONSchema)({
82
81
  title: 'More Actions',
83
82
  description: 'Additional actions in Client panel.',
84
- type: 'object',
85
- properties: { moreActions: { $ref: '#/components/schemas/ClientPanelMoreActionsDto' } }
83
+ $ref: '#/components/schemas/ClientPanelMoreActionsDto',
86
84
  }),
87
85
  __metadata("design:type", ClientPanelMoreActionsDto)
88
86
  ], ClientPanelDto.prototype, "moreActions", void 0);
@@ -96,10 +94,13 @@ __decorate([
96
94
  (0, class_validator_jsonschema_1.JSONSchema)({
97
95
  title: 'Menu',
98
96
  description: 'Client panel main menu (URL or submenu variant).',
99
- oneOf: [{ $ref: '#/components/schemas/MenuDtoWithSubmenu' }, { $ref: '#/components/schemas/MenuDtoWithUrl' }],
97
+ oneOf: [
98
+ { $ref: '#/components/schemas/MenuDtoWithSubmenu' },
99
+ { $ref: '#/components/schemas/MenuDtoWithUrl' },
100
+ ],
100
101
  }),
101
102
  __metadata("design:type", Object)
102
103
  ], ClientPanelDto.prototype, "menu", void 0);
103
104
  exports.ClientPanelDto = ClientPanelDto = __decorate([
104
- (0, at_least_one_non_empty_validator_1.AtLeastOneNonEmptyProperty)(["tabs", "moreActions", "menu"])
105
+ (0, at_least_one_non_empty_validator_1.AtLeastOneNonEmptyProperty)(['tabs', 'moreActions', 'menu'])
105
106
  ], ClientPanelDto);
@@ -76,4 +76,8 @@ export declare class CompanyDataDto {
76
76
  * The tax office for the company (optional).
77
77
  */
78
78
  taxOffice?: string;
79
+ /**
80
+ * The logo URL for the company (optional).
81
+ */
82
+ logoUrl?: string;
79
83
  }
@@ -65,7 +65,7 @@ __decorate([
65
65
  (0, class_validator_1.IsUrl)({ protocols: ['https'], require_protocol: true }),
66
66
  (0, class_validator_jsonschema_1.JSONSchema)({
67
67
  title: 'Privacy Policy URL',
68
- description: 'The URL for the company\'s privacy policy.',
68
+ description: "The URL for the company's privacy policy.",
69
69
  type: 'string',
70
70
  format: 'uri',
71
71
  }),
@@ -115,7 +115,7 @@ __decorate([
115
115
  (0, class_validator_1.IsString)(),
116
116
  (0, class_validator_jsonschema_1.JSONSchema)({
117
117
  title: 'Address Line 1',
118
- description: 'The first line of the company\'s address.',
118
+ description: "The first line of the company's address.",
119
119
  type: 'string',
120
120
  }),
121
121
  __metadata("design:type", String)
@@ -125,7 +125,7 @@ __decorate([
125
125
  (0, class_validator_1.IsOptional)(),
126
126
  (0, class_validator_jsonschema_1.JSONSchema)({
127
127
  title: 'Address Line 2',
128
- description: 'The second line of the company\'s address.',
128
+ description: "The second line of the company's address.",
129
129
  type: 'string',
130
130
  }),
131
131
  __metadata("design:type", String)
@@ -135,7 +135,7 @@ __decorate([
135
135
  (0, class_validator_1.IsOptional)(),
136
136
  (0, class_validator_jsonschema_1.JSONSchema)({
137
137
  title: 'Address Line 3',
138
- description: 'The third line of the company\'s address.',
138
+ description: "The third line of the company's address.",
139
139
  type: 'string',
140
140
  }),
141
141
  __metadata("design:type", String)
@@ -144,7 +144,7 @@ __decorate([
144
144
  (0, class_validator_1.IsString)(),
145
145
  (0, class_validator_jsonschema_1.JSONSchema)({
146
146
  title: 'Postcode',
147
- description: 'The postal code for the company\'s address.',
147
+ description: "The postal code for the company's address.",
148
148
  type: 'string',
149
149
  }),
150
150
  __metadata("design:type", String)
@@ -153,7 +153,7 @@ __decorate([
153
153
  (0, class_validator_1.IsString)(),
154
154
  (0, class_validator_jsonschema_1.JSONSchema)({
155
155
  title: 'City',
156
- description: 'The city for the company\'s address.',
156
+ description: "The city for the company's address.",
157
157
  type: 'string',
158
158
  }),
159
159
  __metadata("design:type", String)
@@ -162,7 +162,7 @@ __decorate([
162
162
  (0, class_validator_1.IsEnum)(country_enum_1.CountryEnum),
163
163
  (0, class_validator_jsonschema_1.JSONSchema)({
164
164
  title: 'Country',
165
- description: 'The country for the company\'s address.',
165
+ description: "The country for the company's address.",
166
166
  type: 'string',
167
167
  enum: Object.values(country_enum_1.CountryEnum),
168
168
  }),
@@ -173,7 +173,7 @@ __decorate([
173
173
  (0, class_validator_1.IsOptional)(),
174
174
  (0, class_validator_jsonschema_1.JSONSchema)({
175
175
  title: 'State',
176
- description: 'The state or province for the company\'s address.',
176
+ description: "The state or province for the company's address.",
177
177
  type: 'string',
178
178
  }),
179
179
  __metadata("design:type", String)
@@ -198,3 +198,14 @@ __decorate([
198
198
  }),
199
199
  __metadata("design:type", String)
200
200
  ], CompanyDataDto.prototype, "taxOffice", void 0);
201
+ __decorate([
202
+ (0, class_validator_1.IsString)(),
203
+ (0, class_validator_1.IsOptional)(),
204
+ (0, class_validator_jsonschema_1.JSONSchema)({
205
+ title: 'Logo URL',
206
+ description: 'The logo URL for the company.',
207
+ type: 'string',
208
+ format: 'uri',
209
+ }),
210
+ __metadata("design:type", String)
211
+ ], CompanyDataDto.prototype, "logoUrl", void 0);
@@ -37,10 +37,7 @@ __decorate([
37
37
  (0, class_validator_jsonschema_1.JSONSchema)({
38
38
  title: 'Errors',
39
39
  description: 'A developer-friendly error message or an array of messages.',
40
- oneOf: [
41
- { type: 'string' },
42
- { type: 'array', items: { type: 'string' } },
43
- ],
40
+ oneOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }],
44
41
  }),
45
42
  __metadata("design:type", Object)
46
43
  ], ErrorResponseDto.prototype, "errors", void 0);