@hosterai/types 0.0.28 → 0.0.30

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 (104) 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.d.ts +2 -2
  46. package/dist/dtos/product/product-info.dto.js +12 -6
  47. package/dist/dtos/product/product-item-data.dto.d.ts +3 -3
  48. package/dist/dtos/product/product-item-data.dto.js +2 -2
  49. package/dist/dtos/product/requests/product-create-request.dto.js +1 -1
  50. package/dist/dtos/product/requests/product-delete-request.dto.js +3 -3
  51. package/dist/dtos/product/requests/product-downgradable-request.dto.js +1 -1
  52. package/dist/dtos/product/requests/product-downgrade-request.dto.js +1 -1
  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/responses/product-info-response.dto.js +1 -1
  59. package/dist/dtos/responses/validate-attributes-response.dto.d.ts +2 -2
  60. package/dist/dtos/tab.dto.js +2 -2
  61. package/dist/dtos/tax-manager/tax-details-request.dto.d.ts +31 -0
  62. package/dist/dtos/tax-manager/tax-details-request.dto.js +84 -0
  63. package/dist/dtos/unit.dto.js +3 -3
  64. package/dist/enums/country.enum.d.ts +1 -1
  65. package/dist/enums/country.enum.js +312 -78
  66. package/dist/enums/currency.enum.d.ts +43 -0
  67. package/dist/enums/currency.enum.js +47 -0
  68. package/dist/enums/item-actions.enum.d.ts +10 -10
  69. package/dist/enums/item-actions.enum.js +13 -14
  70. package/dist/index.d.ts +2 -1
  71. package/dist/index.js +2 -1
  72. package/dist/openapi/schemas/components.schemas.d.ts +1 -31
  73. package/dist/openapi/schemas/components.schemas.js +19 -49
  74. package/dist/validators/action-validator.spec.js +3 -3
  75. package/dist/validators/addon-field-validator.spec.js +10 -3
  76. package/dist/validators/admin-panel-more-actions-validator.spec.js +12 -8
  77. package/dist/validators/admin-panel-more-actions.validator.d.ts +1 -1
  78. package/dist/validators/admin-panel-tabs-validator.spec.js +74 -10
  79. package/dist/validators/admin-panel-tabs.validator.d.ts +1 -1
  80. package/dist/validators/admin-panel-validator.spec.js +164 -32
  81. package/dist/validators/attachment-validator.spec.js +8 -8
  82. package/dist/validators/attribute-field-validator.spec.js +18 -7
  83. package/dist/validators/client-panel-validator.spec.js +57 -9
  84. package/dist/validators/country-validator.spec.js +7 -7
  85. package/dist/validators/field-validator.spec.js +35 -10
  86. package/dist/validators/info-validator.spec.js +10 -10
  87. package/dist/validators/invoice-contact-data-validator.spec.js +18 -10
  88. package/dist/validators/invoice-info-validator.spec.js +14 -10
  89. package/dist/validators/invoice-item-data-validator.spec.js +4 -4
  90. package/dist/validators/item-data-validator.spec.js +17 -9
  91. package/dist/validators/menu-with-submenu-validator.spec.js +13 -11
  92. package/dist/validators/menu-with-url-validator.spec.js +15 -5
  93. package/dist/validators/notification-info-validator.spec.js +28 -20
  94. package/dist/validators/product-info-validator.spec.js +59 -45
  95. package/dist/validators/product-info.validator.d.ts +1 -1
  96. package/dist/validators/product-item-data-validator.spec.js +15 -7
  97. package/dist/validators/sender-sms-validator.spec.js +5 -2
  98. package/dist/validators/settings-with-tabs-validator.spec.js +176 -12
  99. package/dist/validators/settings-with-url-validator.spec.js +89 -11
  100. package/dist/validators/tab-validator.spec.js +7 -7
  101. package/dist/validators/tin-validation-details-validator.spec.js +8 -8
  102. package/dist/validators/transaction-data-validator.spec.js +13 -8
  103. package/dist/validators/unit-validator.spec.js +13 -4
  104. package/package.json +1 -1
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CurrencyEnum = void 0;
4
+ var CurrencyEnum;
5
+ (function (CurrencyEnum) {
6
+ CurrencyEnum["EUR"] = "EUR";
7
+ CurrencyEnum["USD"] = "USD";
8
+ CurrencyEnum["GBP"] = "GBP";
9
+ CurrencyEnum["CHF"] = "CHF";
10
+ CurrencyEnum["SEK"] = "SEK";
11
+ CurrencyEnum["NOK"] = "NOK";
12
+ CurrencyEnum["DKK"] = "DKK";
13
+ CurrencyEnum["PLN"] = "PLN";
14
+ CurrencyEnum["CZK"] = "CZK";
15
+ CurrencyEnum["HUF"] = "HUF";
16
+ CurrencyEnum["RON"] = "RON";
17
+ CurrencyEnum["BGN"] = "BGN";
18
+ CurrencyEnum["TRY"] = "TRY";
19
+ CurrencyEnum["RUB"] = "RUB";
20
+ CurrencyEnum["JPY"] = "JPY";
21
+ CurrencyEnum["CNY"] = "CNY";
22
+ CurrencyEnum["AUD"] = "AUD";
23
+ CurrencyEnum["NZD"] = "NZD";
24
+ CurrencyEnum["CAD"] = "CAD";
25
+ CurrencyEnum["ZAR"] = "ZAR";
26
+ CurrencyEnum["INR"] = "INR";
27
+ CurrencyEnum["MXN"] = "MXN";
28
+ CurrencyEnum["BRL"] = "BRL";
29
+ CurrencyEnum["ARS"] = "ARS";
30
+ CurrencyEnum["CLP"] = "CLP";
31
+ CurrencyEnum["COP"] = "COP";
32
+ CurrencyEnum["PEN"] = "PEN";
33
+ CurrencyEnum["UYU"] = "UYU";
34
+ CurrencyEnum["VES"] = "VES";
35
+ CurrencyEnum["ILS"] = "ILS";
36
+ CurrencyEnum["AED"] = "AED";
37
+ CurrencyEnum["SAR"] = "SAR";
38
+ CurrencyEnum["KRW"] = "KRW";
39
+ CurrencyEnum["SGD"] = "SGD";
40
+ CurrencyEnum["HKD"] = "HKD";
41
+ CurrencyEnum["TWD"] = "TWD";
42
+ CurrencyEnum["THB"] = "THB";
43
+ CurrencyEnum["MYR"] = "MYR";
44
+ CurrencyEnum["IDR"] = "IDR";
45
+ CurrencyEnum["PHP"] = "PHP";
46
+ CurrencyEnum["VND"] = "VND";
47
+ })(CurrencyEnum || (exports.CurrencyEnum = CurrencyEnum = {}));
@@ -1,11 +1,11 @@
1
- export declare enum ProductItemActionsEnum {
2
- CREATE = "create",
3
- RENEW = "renew",
4
- UPGRADE = "upgrade",
5
- DOWNGRADE = "downgrade",
6
- TRANSFER = "transfer",
7
- TRADE = "trade",
8
- SUSPEND = "suspend",
9
- UNSUSPEND = "unsuspend",
10
- DELETE = "delete"
1
+ export declare enum ProductActionsEnum {
2
+ CREATE = "CREATE",
3
+ RENEW = "RENEW",
4
+ UPGRADE = "UPGRADE",
5
+ DOWNGRADE = "DOWNGRADE",
6
+ TRANSFER = "TRANSFER",
7
+ TRADE = "TRADE",
8
+ SUSPEND = "SUSPEND",
9
+ UNSUSPEND = "UNSUSPEND",
10
+ DELETE = "DELETE"
11
11
  }
@@ -1,16 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProductItemActionsEnum = void 0;
4
- //TODO να γινει ProductActionsEnum
5
- var ProductItemActionsEnum;
6
- (function (ProductItemActionsEnum) {
7
- ProductItemActionsEnum["CREATE"] = "create";
8
- ProductItemActionsEnum["RENEW"] = "renew";
9
- ProductItemActionsEnum["UPGRADE"] = "upgrade";
10
- ProductItemActionsEnum["DOWNGRADE"] = "downgrade";
11
- ProductItemActionsEnum["TRANSFER"] = "transfer";
12
- ProductItemActionsEnum["TRADE"] = "trade";
13
- ProductItemActionsEnum["SUSPEND"] = "suspend";
14
- ProductItemActionsEnum["UNSUSPEND"] = "unsuspend";
15
- ProductItemActionsEnum["DELETE"] = "delete";
16
- })(ProductItemActionsEnum || (exports.ProductItemActionsEnum = ProductItemActionsEnum = {}));
3
+ exports.ProductActionsEnum = void 0;
4
+ var ProductActionsEnum;
5
+ (function (ProductActionsEnum) {
6
+ ProductActionsEnum["CREATE"] = "CREATE";
7
+ ProductActionsEnum["RENEW"] = "RENEW";
8
+ ProductActionsEnum["UPGRADE"] = "UPGRADE";
9
+ ProductActionsEnum["DOWNGRADE"] = "DOWNGRADE";
10
+ ProductActionsEnum["TRANSFER"] = "TRANSFER";
11
+ ProductActionsEnum["TRADE"] = "TRADE";
12
+ ProductActionsEnum["SUSPEND"] = "SUSPEND";
13
+ ProductActionsEnum["UNSUSPEND"] = "UNSUSPEND";
14
+ ProductActionsEnum["DELETE"] = "DELETE";
15
+ })(ProductActionsEnum || (exports.ProductActionsEnum = ProductActionsEnum = {}));
package/dist/index.d.ts CHANGED
@@ -41,7 +41,7 @@ export * from './dtos/invoice/invoice-item-data.dto';
41
41
  export * from './dtos/invoice/requests/invoice-request.dto';
42
42
  export * from './dtos/invoice/requests/credit-note-request.dto';
43
43
  export * from './dtos/invoice/requests/proforma-invoice-request.dto';
44
- export * from './dtos/invoice/requests/tax-details-request.dto';
44
+ export * from './dtos/tax-manager/tax-details-request.dto';
45
45
  export * from './dtos/invoice/responses/invoice-response.dto';
46
46
  export * from './dtos/invoice/responses/credit-note-response.dto';
47
47
  export * from './dtos/invoice/responses/proforma-invoice-response.dto';
@@ -71,6 +71,7 @@ export * from './dtos/product/responses/product-upgrade-response.dto';
71
71
  export * from './dtos/product/responses/product-upgradable-response.dto';
72
72
  export * from './enums/item-actions.enum';
73
73
  export * from './enums/country.enum';
74
+ export * from './enums/currency.enum';
74
75
  export * from './enums/duration.enum';
75
76
  export * from './enums/events.enum';
76
77
  export * from './enums/field-type.enum';
package/dist/index.js CHANGED
@@ -63,7 +63,7 @@ __exportStar(require("./dtos/invoice/invoice-item-data.dto"), exports);
63
63
  __exportStar(require("./dtos/invoice/requests/invoice-request.dto"), exports);
64
64
  __exportStar(require("./dtos/invoice/requests/credit-note-request.dto"), exports);
65
65
  __exportStar(require("./dtos/invoice/requests/proforma-invoice-request.dto"), exports);
66
- __exportStar(require("./dtos/invoice/requests/tax-details-request.dto"), exports);
66
+ __exportStar(require("./dtos/tax-manager/tax-details-request.dto"), exports);
67
67
  __exportStar(require("./dtos/invoice/responses/invoice-response.dto"), exports);
68
68
  __exportStar(require("./dtos/invoice/responses/credit-note-response.dto"), exports);
69
69
  __exportStar(require("./dtos/invoice/responses/proforma-invoice-response.dto"), exports);
@@ -95,6 +95,7 @@ __exportStar(require("./dtos/product/responses/product-upgradable-response.dto")
95
95
  // Enums
96
96
  __exportStar(require("./enums/item-actions.enum"), exports);
97
97
  __exportStar(require("./enums/country.enum"), exports);
98
+ __exportStar(require("./enums/currency.enum"), exports);
98
99
  __exportStar(require("./enums/duration.enum"), exports);
99
100
  __exportStar(require("./enums/events.enum"), exports);
100
101
  __exportStar(require("./enums/field-type.enum"), exports);
@@ -341,23 +341,11 @@ export declare const ComponentsSchemas: {
341
341
  readonly $ref: "#/components/schemas/AdminPanelTabsDto";
342
342
  readonly title: "Tabs";
343
343
  readonly description: "Tab structure for Admin panel sections.";
344
- readonly type: "object";
345
- readonly properties: {
346
- readonly tabs: {
347
- readonly $ref: "#/components/schemas/AdminPanelTabsDto";
348
- };
349
- };
350
344
  };
351
345
  readonly moreActions: {
352
346
  readonly $ref: "#/components/schemas/AdminPanelMoreActionsDto";
353
347
  readonly title: "More Actions";
354
348
  readonly description: "Additional actions in Admin panel sections.";
355
- readonly type: "object";
356
- readonly properties: {
357
- readonly moreActions: {
358
- readonly $ref: "#/components/schemas/AdminPanelMoreActionsDto";
359
- };
360
- };
361
349
  };
362
350
  readonly menu: {
363
351
  readonly title: "Menu";
@@ -416,23 +404,11 @@ export declare const ComponentsSchemas: {
416
404
  readonly $ref: "#/components/schemas/ClientPanelTabsDto";
417
405
  readonly title: "Tabs";
418
406
  readonly description: "Tab structure for Client panel.";
419
- readonly type: "object";
420
- readonly properties: {
421
- readonly tabs: {
422
- readonly $ref: "#/components/schemas/ClientPanelTabsDto";
423
- };
424
- };
425
407
  };
426
408
  readonly moreActions: {
427
409
  readonly $ref: "#/components/schemas/ClientPanelMoreActionsDto";
428
410
  readonly title: "More Actions";
429
411
  readonly description: "Additional actions in Client panel.";
430
- readonly type: "object";
431
- readonly properties: {
432
- readonly moreActions: {
433
- readonly $ref: "#/components/schemas/ClientPanelMoreActionsDto";
434
- };
435
- };
436
412
  };
437
413
  readonly menu: {
438
414
  readonly title: "Menu";
@@ -638,13 +614,11 @@ export declare const ComponentsSchemas: {
638
614
  readonly $ref: "#/components/schemas/AdminPanelDto";
639
615
  readonly title: "Admin Panel";
640
616
  readonly description: "Admin UI links, tabs, and actions provided by the integration.";
641
- readonly type: "object";
642
617
  };
643
618
  readonly clientPanel: {
644
619
  readonly $ref: "#/components/schemas/ClientPanelDto";
645
620
  readonly title: "Client Panel";
646
621
  readonly description: "Client UI links, tabs, and actions provided by the integration.";
647
- readonly type: "object";
648
622
  };
649
623
  readonly onboardingUrl: {
650
624
  readonly format: "uri";
@@ -770,13 +744,11 @@ export declare const ComponentsSchemas: {
770
744
  readonly $ref: "#/components/schemas/AdminPanelDto";
771
745
  readonly title: "Admin Panel";
772
746
  readonly description: "Admin UI links, tabs, and actions provided by the integration.";
773
- readonly type: "object";
774
747
  };
775
748
  readonly clientPanel: {
776
749
  readonly $ref: "#/components/schemas/ClientPanelDto";
777
750
  readonly title: "Client Panel";
778
751
  readonly description: "Client UI links, tabs, and actions provided by the integration.";
779
- readonly type: "object";
780
752
  };
781
753
  readonly onboardingUrl: {
782
754
  readonly format: "uri";
@@ -962,7 +934,7 @@ export declare const ComponentsSchemas: {
962
934
  };
963
935
  readonly supportedActions: {
964
936
  readonly items: {
965
- readonly enum: readonly ["create", "renew", "upgrade", "downgrade", "transfer", "trade", "suspend", "unsuspend", "delete"];
937
+ readonly enum: readonly ["CREATE", "RENEW", "UPGRADE", "DOWNGRADE", "TRANSFER", "TRADE", "SUSPEND", "UNSUSPEND", "DELETE"];
966
938
  readonly type: "string";
967
939
  };
968
940
  readonly type: "array";
@@ -1025,13 +997,11 @@ export declare const ComponentsSchemas: {
1025
997
  readonly $ref: "#/components/schemas/AdminPanelDto";
1026
998
  readonly title: "Admin Panel";
1027
999
  readonly description: "Admin UI links, tabs, and actions provided by the integration.";
1028
- readonly type: "object";
1029
1000
  };
1030
1001
  readonly clientPanel: {
1031
1002
  readonly $ref: "#/components/schemas/ClientPanelDto";
1032
1003
  readonly title: "Client Panel";
1033
1004
  readonly description: "Client UI links, tabs, and actions provided by the integration.";
1034
- readonly type: "object";
1035
1005
  };
1036
1006
  readonly onboardingUrl: {
1037
1007
  readonly format: "uri";
@@ -643,24 +643,12 @@ exports.ComponentsSchemas = {
643
643
  "tabs": {
644
644
  "$ref": "#/components/schemas/AdminPanelTabsDto",
645
645
  "title": "Tabs",
646
- "description": "Tab structure for Admin panel sections.",
647
- "type": "object",
648
- "properties": {
649
- "tabs": {
650
- "$ref": "#/components/schemas/AdminPanelTabsDto"
651
- }
652
- }
646
+ "description": "Tab structure for Admin panel sections."
653
647
  },
654
648
  "moreActions": {
655
649
  "$ref": "#/components/schemas/AdminPanelMoreActionsDto",
656
650
  "title": "More Actions",
657
- "description": "Additional actions in Admin panel sections.",
658
- "type": "object",
659
- "properties": {
660
- "moreActions": {
661
- "$ref": "#/components/schemas/AdminPanelMoreActionsDto"
662
- }
663
- }
651
+ "description": "Additional actions in Admin panel sections."
664
652
  },
665
653
  "menu": {
666
654
  "title": "Menu",
@@ -724,24 +712,12 @@ exports.ComponentsSchemas = {
724
712
  "tabs": {
725
713
  "$ref": "#/components/schemas/ClientPanelTabsDto",
726
714
  "title": "Tabs",
727
- "description": "Tab structure for Client panel.",
728
- "type": "object",
729
- "properties": {
730
- "tabs": {
731
- "$ref": "#/components/schemas/ClientPanelTabsDto"
732
- }
733
- }
715
+ "description": "Tab structure for Client panel."
734
716
  },
735
717
  "moreActions": {
736
718
  "$ref": "#/components/schemas/ClientPanelMoreActionsDto",
737
719
  "title": "More Actions",
738
- "description": "Additional actions in Client panel.",
739
- "type": "object",
740
- "properties": {
741
- "moreActions": {
742
- "$ref": "#/components/schemas/ClientPanelMoreActionsDto"
743
- }
744
- }
720
+ "description": "Additional actions in Client panel."
745
721
  },
746
722
  "menu": {
747
723
  "title": "Menu",
@@ -1580,14 +1556,12 @@ exports.ComponentsSchemas = {
1580
1556
  "adminPanel": {
1581
1557
  "$ref": "#/components/schemas/AdminPanelDto",
1582
1558
  "title": "Admin Panel",
1583
- "description": "Admin UI links, tabs, and actions provided by the integration.",
1584
- "type": "object"
1559
+ "description": "Admin UI links, tabs, and actions provided by the integration."
1585
1560
  },
1586
1561
  "clientPanel": {
1587
1562
  "$ref": "#/components/schemas/ClientPanelDto",
1588
1563
  "title": "Client Panel",
1589
- "description": "Client UI links, tabs, and actions provided by the integration.",
1590
- "type": "object"
1564
+ "description": "Client UI links, tabs, and actions provided by the integration."
1591
1565
  },
1592
1566
  "onboardingUrl": {
1593
1567
  "format": "uri",
@@ -2144,14 +2118,12 @@ exports.ComponentsSchemas = {
2144
2118
  "adminPanel": {
2145
2119
  "$ref": "#/components/schemas/AdminPanelDto",
2146
2120
  "title": "Admin Panel",
2147
- "description": "Admin UI links, tabs, and actions provided by the integration.",
2148
- "type": "object"
2121
+ "description": "Admin UI links, tabs, and actions provided by the integration."
2149
2122
  },
2150
2123
  "clientPanel": {
2151
2124
  "$ref": "#/components/schemas/ClientPanelDto",
2152
2125
  "title": "Client Panel",
2153
- "description": "Client UI links, tabs, and actions provided by the integration.",
2154
- "type": "object"
2126
+ "description": "Client UI links, tabs, and actions provided by the integration."
2155
2127
  },
2156
2128
  "onboardingUrl": {
2157
2129
  "format": "uri",
@@ -2365,15 +2337,15 @@ exports.ComponentsSchemas = {
2365
2337
  "supportedActions": {
2366
2338
  "items": {
2367
2339
  "enum": [
2368
- "create",
2369
- "renew",
2370
- "upgrade",
2371
- "downgrade",
2372
- "transfer",
2373
- "trade",
2374
- "suspend",
2375
- "unsuspend",
2376
- "delete"
2340
+ "CREATE",
2341
+ "RENEW",
2342
+ "UPGRADE",
2343
+ "DOWNGRADE",
2344
+ "TRANSFER",
2345
+ "TRADE",
2346
+ "SUSPEND",
2347
+ "UNSUSPEND",
2348
+ "DELETE"
2377
2349
  ],
2378
2350
  "type": "string"
2379
2351
  },
@@ -2855,14 +2827,12 @@ exports.ComponentsSchemas = {
2855
2827
  "adminPanel": {
2856
2828
  "$ref": "#/components/schemas/AdminPanelDto",
2857
2829
  "title": "Admin Panel",
2858
- "description": "Admin UI links, tabs, and actions provided by the integration.",
2859
- "type": "object"
2830
+ "description": "Admin UI links, tabs, and actions provided by the integration."
2860
2831
  },
2861
2832
  "clientPanel": {
2862
2833
  "$ref": "#/components/schemas/ClientPanelDto",
2863
2834
  "title": "Client Panel",
2864
- "description": "Client UI links, tabs, and actions provided by the integration.",
2865
- "type": "object"
2835
+ "description": "Client UI links, tabs, and actions provided by the integration."
2866
2836
  },
2867
2837
  "onboardingUrl": {
2868
2838
  "format": "uri",
@@ -36,7 +36,7 @@ describe('ActionDto Validator', () => {
36
36
  it('should return error for missing required fields', () => {
37
37
  const invalidDto = {
38
38
  // missing 'icon' and 'url'
39
- openMethod: open_method_enum_1.OpenMethodEnum.AJAX_CALL
39
+ openMethod: open_method_enum_1.OpenMethodEnum.AJAX_CALL,
40
40
  };
41
41
  const errors = (0, action_validator_1.validateActionDto)(invalidDto);
42
42
  expect(errors.length).toBeGreaterThan(0);
@@ -47,7 +47,7 @@ describe('ActionDto Validator', () => {
47
47
  const invalidDto = {
48
48
  icon: 123, // should be a string
49
49
  openMethod: open_method_enum_1.OpenMethodEnum.AJAX_CALL,
50
- url: 456 // should be a string
50
+ url: 456, // should be a string
51
51
  };
52
52
  const errors = (0, action_validator_1.validateActionDto)(invalidDto);
53
53
  expect(errors.length).toBeGreaterThan(0);
@@ -59,7 +59,7 @@ describe('ActionDto Validator', () => {
59
59
  icon: 'test-icon',
60
60
  openMethod: open_method_enum_1.OpenMethodEnum.AJAX_CALL,
61
61
  url: 'https://example.com',
62
- unexpectedField: 'unexpected' // additional field
62
+ unexpectedField: 'unexpected', // additional field
63
63
  };
64
64
  const errors = (0, action_validator_1.validateActionDto)(validDto);
65
65
  expect(errors).toHaveLength(0);
@@ -22,9 +22,16 @@ describe('AddonFieldDto Validator', () => {
22
22
  describe('Missing required fields', () => {
23
23
  it('should return errors when all fields are missing', () => {
24
24
  const errors = (0, addon_field_validator_1.validateAddonFieldDto)({});
25
- const requiredProps = ['id', 'label', 'value', 'type', 'required', 'disabled'];
25
+ const requiredProps = [
26
+ 'id',
27
+ 'label',
28
+ 'value',
29
+ 'type',
30
+ 'required',
31
+ 'disabled',
32
+ ];
26
33
  for (const prop of requiredProps) {
27
- expect(errors.some(e => e.property === prop)).toBe(true);
34
+ expect(errors.some((e) => e.property === prop)).toBe(true);
28
35
  }
29
36
  });
30
37
  });
@@ -32,7 +39,7 @@ describe('AddonFieldDto Validator', () => {
32
39
  it('should return error for invalid type enum', () => {
33
40
  const dto = { ...baseValidDto, type: 'not-a-valid-type' };
34
41
  const errors = (0, addon_field_validator_1.validateAddonFieldDto)(dto);
35
- expect(errors.some(e => e.property === 'type')).toBe(true);
42
+ expect(errors.some((e) => e.property === 'type')).toBe(true);
36
43
  });
37
44
  });
38
45
  });
@@ -81,16 +81,20 @@ describe('AdminPanelMoreActionsDto', () => {
81
81
  });
82
82
  it('validates complex nested structures', async () => {
83
83
  const complexData = {
84
- client: [{
84
+ client: [
85
+ {
85
86
  icon: 'add',
86
87
  openMethod: open_method_enum_1.OpenMethodEnum.AJAX_CALL,
87
88
  url: 'https://example.com/api',
88
- nested: [{
89
+ nested: [
90
+ {
89
91
  icon: 'nested-icon',
90
92
  openMethod: open_method_enum_1.OpenMethodEnum.AJAX_CALL,
91
- url: 'https://example.com/nested'
92
- }]
93
- }]
93
+ url: 'https://example.com/nested',
94
+ },
95
+ ],
96
+ },
97
+ ],
94
98
  };
95
99
  const errors = (0, admin_panel_more_actions_validator_1.validateAdminPanelMoreActionsDto)(complexData);
96
100
  expect(errors.length).toBe(0);
@@ -106,14 +110,14 @@ describe('AdminPanelMoreActionsDto', () => {
106
110
  item: [],
107
111
  invoice: [],
108
112
  user: [],
109
- order: []
113
+ order: [],
110
114
  };
111
115
  const errors = (0, admin_panel_more_actions_validator_1.validateAdminPanelMoreActionsDto)(data);
112
116
  expect(errors.length).toBeGreaterThan(0);
113
117
  });
114
118
  it('passes with one non-empty property', async () => {
115
119
  const data = {
116
- client: [minimalValidActionDto()]
120
+ client: [minimalValidActionDto()],
117
121
  };
118
122
  const errors = (0, admin_panel_more_actions_validator_1.validateAdminPanelMoreActionsDto)(data);
119
123
  expect(errors.length).toBe(0);
@@ -121,7 +125,7 @@ describe('AdminPanelMoreActionsDto', () => {
121
125
  it('passes with multiple non-empty properties', async () => {
122
126
  const data = {
123
127
  client: [minimalValidActionDto()],
124
- item: [minimalValidActionDto()]
128
+ item: [minimalValidActionDto()],
125
129
  };
126
130
  const errors = (0, admin_panel_more_actions_validator_1.validateAdminPanelMoreActionsDto)(data);
127
131
  expect(errors.length).toBe(0);
@@ -1,2 +1,2 @@
1
- import { ValidationError } from "class-validator";
1
+ import { ValidationError } from 'class-validator';
2
2
  export declare function validateAdminPanelMoreActionsDto(data: object): ValidationError[];
@@ -7,24 +7,88 @@ const admin_panel_dto_1 = require("../dtos/admin-panel.dto");
7
7
  describe('validateAdminPanelTabsDto', () => {
8
8
  const validTab = { label: 'Tab', url: 'https://example.com' };
9
9
  const boundaryTab = { label: 'T', url: 'https://e.com' }; // Shortest valid values
10
- const longTab = { label: 'L'.repeat(256), url: 'https://example.com/long-url' }; // Longest valid values
10
+ const longTab = {
11
+ label: 'L'.repeat(256),
12
+ url: 'https://example.com/long-url',
13
+ }; // Longest valid values
11
14
  const cases = [
12
15
  [{ product: [], item: [], client: [], user: [], order: [] }, false], // all empty => invalid
13
- [{ product: [validTab], item: [validTab], client: [validTab], user: [validTab], order: [validTab] }, true],
16
+ [
17
+ {
18
+ product: [validTab],
19
+ item: [validTab],
20
+ client: [validTab],
21
+ user: [validTab],
22
+ order: [validTab],
23
+ },
24
+ true,
25
+ ],
14
26
  [{ product: [], item: [], client: [], user: [] }, false], // missing order
15
- [{ product: [], item: 'not-an-array', client: [], user: [], order: [] }, false],
16
- [{ product: [{ label: 123, url: 'invalid-url' }], item: [], client: [], user: [], order: [] }, false],
17
- [{ product: [{ label: 123, url: 'invalid-url' }], item: [], client: [], user: [], order: [] }, false],
27
+ [
28
+ { product: [], item: 'not-an-array', client: [], user: [], order: [] },
29
+ false,
30
+ ],
31
+ [
32
+ {
33
+ product: [{ label: 123, url: 'invalid-url' }],
34
+ item: [],
35
+ client: [],
36
+ user: [],
37
+ order: [],
38
+ },
39
+ false,
40
+ ],
41
+ [
42
+ {
43
+ product: [{ label: 123, url: 'invalid-url' }],
44
+ item: [],
45
+ client: [],
46
+ user: [],
47
+ order: [],
48
+ },
49
+ false,
50
+ ],
18
51
  ];
19
52
  const additionalCases = [
20
- [{ product: [boundaryTab], item: [boundaryTab], client: [boundaryTab], user: [boundaryTab], order: [boundaryTab] }, true], // boundary values
21
- [{ product: [longTab], item: [longTab], client: [longTab], user: [longTab], order: [longTab] }, true], // long values
22
- [{ product: [validTab], item: [validTab], client: [validTab], user: [validTab], order: [validTab], unexpected: 'extra' }, false], // unexpected property
53
+ [
54
+ {
55
+ product: [boundaryTab],
56
+ item: [boundaryTab],
57
+ client: [boundaryTab],
58
+ user: [boundaryTab],
59
+ order: [boundaryTab],
60
+ },
61
+ true,
62
+ ], // boundary values
63
+ [
64
+ {
65
+ product: [longTab],
66
+ item: [longTab],
67
+ client: [longTab],
68
+ user: [longTab],
69
+ order: [longTab],
70
+ },
71
+ true,
72
+ ], // long values
73
+ [
74
+ {
75
+ product: [validTab],
76
+ item: [validTab],
77
+ client: [validTab],
78
+ user: [validTab],
79
+ order: [validTab],
80
+ unexpected: 'extra',
81
+ },
82
+ false,
83
+ ], // unexpected property
23
84
  ];
24
85
  test.each([...cases, ...additionalCases])('validates %# as %s', (input, valid) => {
25
86
  const dto = (0, class_transformer_1.plainToInstance)(admin_panel_dto_1.AdminPanelTabsDto, input);
26
- const errors = (0, class_validator_1.validateSync)(dto, { whitelist: true, forbidNonWhitelisted: true });
27
- const classLevelError = errors.find(e => e.property === '');
87
+ const errors = (0, class_validator_1.validateSync)(dto, {
88
+ whitelist: true,
89
+ forbidNonWhitelisted: true,
90
+ });
91
+ const classLevelError = errors.find((e) => e.property === '');
28
92
  const hasClassLevelError = classLevelError !== undefined;
29
93
  if (valid) {
30
94
  expect(errors.length).toBe(0);
@@ -1,2 +1,2 @@
1
- import { ValidationError } from "class-validator";
1
+ import { ValidationError } from 'class-validator';
2
2
  export declare function validateAdminPanelTabsDto(data: object): ValidationError[];