@hosterai/types 0.0.25 → 0.0.26

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 (78) hide show
  1. package/dist/dtos/addon-field.dto.d.ts +7 -0
  2. package/dist/dtos/addon-field.dto.js +11 -0
  3. package/dist/dtos/attribute-field.dto.d.ts +20 -0
  4. package/dist/dtos/attribute-field.dto.js +74 -0
  5. package/dist/dtos/country.dto.d.ts +7 -0
  6. package/dist/dtos/country.dto.js +4 -0
  7. package/dist/dtos/field.dto.d.ts +2 -23
  8. package/dist/dtos/field.dto.js +8 -64
  9. package/dist/dtos/info.dto.d.ts +3 -2
  10. package/dist/dtos/info.dto.js +10 -5
  11. package/dist/dtos/invoice/invoice-info.dto.d.ts +15 -0
  12. package/dist/dtos/invoice/invoice-info.dto.js +42 -0
  13. package/dist/dtos/invoice/invoice-item-data.dto.d.ts +10 -0
  14. package/dist/dtos/invoice/invoice-item-data.dto.js +27 -0
  15. package/dist/dtos/invoice/requests/credit-note-request.dto.d.ts +9 -0
  16. package/dist/dtos/invoice/requests/credit-note-request.dto.js +26 -0
  17. package/dist/dtos/invoice/requests/invoice-request.dto.d.ts +9 -0
  18. package/dist/dtos/invoice/requests/invoice-request.dto.js +26 -0
  19. package/dist/dtos/invoice/requests/proforma-invoice-request.dto.d.ts +21 -0
  20. package/dist/dtos/invoice/requests/proforma-invoice-request.dto.js +56 -0
  21. package/dist/dtos/invoice/responses/credit-note-response.dto.d.ts +7 -0
  22. package/dist/dtos/invoice/responses/credit-note-response.dto.js +11 -0
  23. package/dist/dtos/invoice/responses/invoice-response.dto.d.ts +7 -0
  24. package/dist/dtos/invoice/responses/invoice-response.dto.js +11 -0
  25. package/dist/dtos/invoice/responses/proforma-invoice-response.dto.d.ts +12 -0
  26. package/dist/dtos/invoice/responses/proforma-invoice-response.dto.js +35 -0
  27. package/dist/dtos/invoice/transaction-data.dto.d.ts +14 -0
  28. package/dist/dtos/invoice/transaction-data.dto.js +42 -0
  29. package/dist/dtos/invoice-contact-data.dto.d.ts +43 -0
  30. package/dist/dtos/invoice-contact-data.dto.js +120 -0
  31. package/dist/dtos/item-data.dto.d.ts +44 -0
  32. package/dist/dtos/item-data.dto.js +70 -0
  33. package/dist/dtos/notification/requests/notification-send-request.dto.d.ts +18 -0
  34. package/dist/dtos/notification/requests/notification-send-request.dto.js +66 -0
  35. package/dist/dtos/notification/responses/notification-send-response.dto.d.ts +9 -0
  36. package/dist/dtos/notification/responses/notification-send-response.dto.js +26 -0
  37. package/dist/dtos/product/product-info.dto.d.ts +5 -0
  38. package/dist/dtos/product/product-info.dto.js +20 -0
  39. package/dist/dtos/product/product-item-data.dto.d.ts +7 -28
  40. package/dist/dtos/product/product-item-data.dto.js +7 -23
  41. package/dist/dtos/product/requests/product-create-request.dto.d.ts +1 -1
  42. package/dist/dtos/product/requests/product-create-request.dto.js +1 -1
  43. package/dist/dtos/product/requests/product-delete-request.dto.d.ts +1 -1
  44. package/dist/dtos/product/requests/product-delete-request.dto.js +1 -1
  45. package/dist/dtos/product/requests/product-downgradable-request.dto.d.ts +1 -1
  46. package/dist/dtos/product/requests/product-downgradable-request.dto.js +1 -1
  47. package/dist/dtos/product/requests/product-downgrade-request.dto.d.ts +1 -1
  48. package/dist/dtos/product/requests/product-downgrade-request.dto.js +1 -1
  49. package/dist/dtos/product/requests/product-renew-request.dto.d.ts +1 -1
  50. package/dist/dtos/product/requests/product-renew-request.dto.js +1 -1
  51. package/dist/dtos/product/requests/product-suspend-request.dto.d.ts +1 -1
  52. package/dist/dtos/product/requests/product-suspend-request.dto.js +1 -1
  53. package/dist/dtos/product/requests/product-unsuspend-request.dto.d.ts +1 -1
  54. package/dist/dtos/product/requests/product-unsuspend-request.dto.js +1 -1
  55. package/dist/dtos/product/requests/product-upgradable-request.dto.d.ts +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.d.ts +1 -1
  58. package/dist/dtos/product/requests/product-upgrade-request.dto.js +1 -1
  59. package/dist/dtos/product/responses/product-info-response.dto.js +17 -0
  60. package/dist/dtos/responses/validate-attributes-response.dto.js +18 -0
  61. package/dist/dtos/settings.dto.d.ts +18 -0
  62. package/dist/dtos/settings.dto.js +19 -2
  63. package/dist/dtos/success-response.dto.d.ts +0 -4
  64. package/dist/dtos/success-response.dto.js +0 -14
  65. package/dist/enums/invoice/invoice-item-actions.enum.d.ts +8 -0
  66. package/dist/enums/invoice/invoice-item-actions.enum.js +12 -0
  67. package/dist/enums/invoice/invoice-types.enum.d.ts +5 -0
  68. package/dist/enums/invoice/invoice-types.enum.js +9 -0
  69. package/dist/enums/item-actions.enum.d.ts +11 -0
  70. package/dist/enums/item-actions.enum.js +16 -0
  71. package/dist/index.d.ts +13 -6
  72. package/dist/index.js +14 -8
  73. package/dist/openapi/schemas/components.schemas.d.ts +35 -47
  74. package/dist/openapi/schemas/components.schemas.js +83 -63
  75. package/dist/validators/notification-info-validator.spec.js +6 -6
  76. package/dist/validators/notification-request-validator.js +1 -1
  77. package/dist/validators/product-info-validator.spec.js +19 -31
  78. package/package.json +1 -1
@@ -176,6 +176,8 @@ export declare const ComponentsSchemas: {
176
176
  readonly url: {
177
177
  readonly format: "url";
178
178
  readonly type: "string";
179
+ readonly title: "URL";
180
+ readonly description: "URL to the settings page.";
179
181
  };
180
182
  readonly label: {
181
183
  readonly minLength: 1;
@@ -205,7 +207,7 @@ export declare const ComponentsSchemas: {
205
207
  };
206
208
  readonly type: "array";
207
209
  readonly title: "Tabs";
208
- readonly description: "Tabs shown on the settings page.";
210
+ readonly description: "List of tabs for the settings page.";
209
211
  };
210
212
  readonly label: {
211
213
  readonly minLength: 1;
@@ -515,32 +517,11 @@ export declare const ComponentsSchemas: {
515
517
  readonly title: "Field Type";
516
518
  readonly description: "Type of the field.";
517
519
  };
518
- readonly repeatableMin: {
519
- readonly type: "number";
520
- };
521
- readonly repeatableMax: {
522
- readonly type: "number";
523
- };
524
520
  readonly required: {
525
521
  readonly type: "boolean";
526
522
  readonly title: "Required";
527
523
  readonly description: "Whether the field is required.";
528
524
  };
529
- readonly disabled: {
530
- readonly type: "boolean";
531
- readonly title: "Disabled";
532
- readonly description: "Whether the field is disabled.";
533
- };
534
- readonly visibleInOrder: {
535
- readonly type: "boolean";
536
- readonly title: "Visible In Order";
537
- readonly description: "Whether the field is visible in order.";
538
- };
539
- readonly visibleInClientPanel: {
540
- readonly type: "boolean";
541
- readonly title: "Visible In Client Panel";
542
- readonly description: "Whether the field is visible in client panel.";
543
- };
544
525
  readonly regexValidation: {
545
526
  readonly type: "string";
546
527
  readonly title: "Regex Validation";
@@ -555,27 +536,19 @@ export declare const ComponentsSchemas: {
555
536
  readonly title: "Regex Validation Error Message";
556
537
  readonly description: "Localized error message shown when regex validation fails.";
557
538
  };
558
- readonly triggersRemoteValidation: {
559
- readonly type: "boolean";
560
- readonly title: "Triggers Remote Validation";
561
- readonly description: "If true, field triggers remote validation.";
562
- };
563
- readonly remoteValidationErrorMessage: {
564
- readonly items: {
565
- readonly $ref: "#/components/schemas/MultilangTextDto";
566
- };
567
- readonly type: "array";
568
- readonly title: "Remote Validation Error Message";
569
- readonly description: "Localized error messages for remote validation.";
570
- };
571
539
  readonly upgradable: {
572
540
  readonly type: "boolean";
573
541
  readonly title: "Upgradable";
574
542
  readonly description: "Whether the item attribute is upgradable by the user.";
575
543
  };
544
+ readonly downgradable: {
545
+ readonly type: "boolean";
546
+ readonly title: "Downgradable";
547
+ readonly description: "Whether the item attribute is downgradable by the user.";
548
+ };
576
549
  };
577
550
  readonly type: "object";
578
- readonly required: readonly ["id", "label", "value", "type", "required", "disabled", "visibleInOrder", "visibleInClientPanel", "upgradable"];
551
+ readonly required: readonly ["id", "label", "value", "type", "required", "upgradable", "downgradable"];
579
552
  };
580
553
  readonly InfoDto: {
581
554
  readonly properties: {
@@ -610,7 +583,7 @@ export declare const ComponentsSchemas: {
610
583
  readonly description: "Locales supported by the integration.";
611
584
  readonly example: readonly ["EN"];
612
585
  };
613
- readonly supportedActions: {
586
+ readonly supportedTypes: {
614
587
  readonly items: {
615
588
  readonly enum: readonly ["create", "renew", "upgrade", "downgrade", "transfer", "trade", "suspend", "unsuspend", "delete"];
616
589
  readonly type: "string";
@@ -618,6 +591,13 @@ export declare const ComponentsSchemas: {
618
591
  readonly type: "array";
619
592
  readonly title: "Supported Actions";
620
593
  readonly description: "Actions supported by this integration.";
594
+ readonly oneOf: readonly [{
595
+ readonly type: "string";
596
+ readonly enum: readonly ["create", "renew", "upgrade", "downgrade", "transfer", "trade", "suspend", "unsuspend", "delete"];
597
+ }, {
598
+ readonly type: "string";
599
+ readonly enum: readonly ["invoice", "credit-note", "proforma"];
600
+ }];
621
601
  };
622
602
  readonly listenEvents: {
623
603
  readonly items: {
@@ -751,7 +731,7 @@ export declare const ComponentsSchemas: {
751
731
  readonly description: "Locales supported by the integration.";
752
732
  readonly example: readonly ["EN"];
753
733
  };
754
- readonly supportedActions: {
734
+ readonly supportedTypes: {
755
735
  readonly items: {
756
736
  readonly enum: readonly ["create", "renew", "upgrade", "downgrade", "transfer", "trade", "suspend", "unsuspend", "delete"];
757
737
  readonly type: "string";
@@ -759,6 +739,13 @@ export declare const ComponentsSchemas: {
759
739
  readonly type: "array";
760
740
  readonly title: "Supported Actions";
761
741
  readonly description: "Actions supported by this integration.";
742
+ readonly oneOf: readonly [{
743
+ readonly type: "string";
744
+ readonly enum: readonly ["create", "renew", "upgrade", "downgrade", "transfer", "trade", "suspend", "unsuspend", "delete"];
745
+ }, {
746
+ readonly type: "string";
747
+ readonly enum: readonly ["invoice", "credit-note", "proforma"];
748
+ }];
762
749
  };
763
750
  readonly listenEvents: {
764
751
  readonly items: {
@@ -858,6 +845,16 @@ export declare const ComponentsSchemas: {
858
845
  readonly status_text: "status";
859
846
  };
860
847
  };
848
+ readonly supportedTypes: {
849
+ readonly items: {
850
+ readonly enum: readonly ["create", "renew", "upgrade", "downgrade", "transfer", "trade", "suspend", "unsuspend", "delete"];
851
+ readonly type: "string";
852
+ };
853
+ readonly type: "array";
854
+ readonly minLength: 1;
855
+ readonly title: "Supported Actions";
856
+ readonly description: "Actions supported by this integration.";
857
+ };
861
858
  readonly title: {
862
859
  readonly minLength: 1;
863
860
  readonly type: "string";
@@ -889,15 +886,6 @@ export declare const ComponentsSchemas: {
889
886
  readonly description: "Locales supported by the integration.";
890
887
  readonly example: readonly ["EN"];
891
888
  };
892
- readonly supportedActions: {
893
- readonly items: {
894
- readonly enum: readonly ["create", "renew", "upgrade", "downgrade", "transfer", "trade", "suspend", "unsuspend", "delete"];
895
- readonly type: "string";
896
- };
897
- readonly type: "array";
898
- readonly title: "Supported Actions";
899
- readonly description: "Actions supported by this integration.";
900
- };
901
889
  readonly listenEvents: {
902
890
  readonly items: {
903
891
  readonly enum: readonly ["user/created", "user/updated", "user/deleted", "user/banned", "user/unbanned", "user/company/access/added", "user/company/access/removed", "user/locked", "user/credit-balance/updated", "user/unlocked", "user/password/updated", "user/email/updated", "user/currency/updated", "user/invoice-contact/updated", "user/policy/updated", "user/languages/updated", "user/custom-price-policies/updated", "user/custom-addon-price-policies/updated", "user/custom-affiliate/added", "user/custom-affiliate/removed", "user/invoice-interval/updated", "user/additional-notification-email/removed", "user/additional-notification-email/added", "user/comment/added", "user/comment/removed", "user/comment/updated", "user/tags/updated", "user/setting/added", "user/setting/removed", "user/setting/updated", "user/start-selling", "user/roles/updated", "user/roles/added", "user/roles/deleted", "message/created", "message/updated", "message/deleted", "notification/sent", "policy/created", "policy/updated", "policy/deleted", "product-category/created", "product-category/updated", "product-category/deleted", "invoice-contact/created", "invoice-contact/updated", "invoice-contact/deleted", "invoice/created", "invoice/updated", "invoice/deleted", "currency/created", "currency/updated", "currency/deleted", "affiliate/created", "affiliate/updated", "affiliate/deleted", "company/created", "company/updated", "company/deleted", "organization/integration/attached", "organization/integration/detached", "tld/created", "tld/updated", "tld/deleted", "integration/created", "integration/updated", "integration/deleted", "integration/installed", "integration/uninstalled", "integration/activated", "integration/deactivated", "integration/maintenance-started", "integration/maintenance-finished", "domain-contact/created", "domain-contact/updated", "domain-contact/deleted", "domain-category/created", "domain-category/updated", "domain-category/deleted", "addon/created", "addon/updated", "addon/deleted", "transaction/created", "transaction/canceled", "transaction/failed", "transaction/subscribed", "transaction/unsubscribed", "transaction/updated", "transaction/deleted", "transaction/completed", "transaction/refunded", "template/created", "template/updated", "template/deleted", "coupon/created", "coupon/updated", "coupon/deleted", "template-integration/created", "template-integration/updated", "template-integration/deleted", "order/created", "order/status/in-progress", "order/status/completed", "order/status/canceled", "order/status/pending", "order/status/archived", "order/insufficient-balance", "order/item-detached", "order/invoice-contact-changed", "order/updated", "order/deleted", "setting/created", "setting/updated", "setting/deleted", "issue/created", "issue/updated", "issue/deleted", "task/created", "task/updated", "task/deleted", "task/canceled", "task/in-progress", "task/completed", "task/percentage/updated", "product/created", "product/updated", "product/deleted", "product/auto-renew/updated", "product/enabled", "product/disabled", "product/version-created", "ip-group/created", "ip-group/updated", "ip-group/deleted", "ip/created", "ip/updated", "ip/deleted", "domain-name/created", "domain-name/updated", "domain-name/deleted", "domain-name/locked", "domain-name/unlocked", "domain-name/idshield-activated", "domain-name/idshield-deactivated", "domain-name/bundle-added", "domain-name/bundle-removed", "domain-name/registrant-updated", "domain-name/admin-updated", "domain-name/tech-updated", "domain-name/billing-updated", "domain-name/additional-updated", "item/created", "item/updated", "item/deleted", "item/renewed", "item/upgraded", "item/downgraded", "item/ip-attached", "item/ip-detached", "item/detached-from-order", "item/postponed", "item/transferred-in", "item/canceled", "item/suspended", "item/unsuspended", "item/affiliate/added", "item/bundle/attached", "item/bundle/detached", "item/activated", "item/set-inactive", "item/processed", "order/paid", "test", "dead-lettering", "core-queue"];
@@ -466,7 +466,9 @@ exports.ComponentsSchemas = {
466
466
  "properties": {
467
467
  "url": {
468
468
  "format": "url",
469
- "type": "string"
469
+ "type": "string",
470
+ "title": "URL",
471
+ "description": "URL to the settings page."
470
472
  },
471
473
  "label": {
472
474
  "minLength": 1,
@@ -502,7 +504,7 @@ exports.ComponentsSchemas = {
502
504
  },
503
505
  "type": "array",
504
506
  "title": "Tabs",
505
- "description": "Tabs shown on the settings page."
507
+ "description": "List of tabs for the settings page."
506
508
  },
507
509
  "label": {
508
510
  "minLength": 1,
@@ -1032,32 +1034,11 @@ exports.ComponentsSchemas = {
1032
1034
  "title": "Field Type",
1033
1035
  "description": "Type of the field."
1034
1036
  },
1035
- "repeatableMin": {
1036
- "type": "number"
1037
- },
1038
- "repeatableMax": {
1039
- "type": "number"
1040
- },
1041
1037
  "required": {
1042
1038
  "type": "boolean",
1043
1039
  "title": "Required",
1044
1040
  "description": "Whether the field is required."
1045
1041
  },
1046
- "disabled": {
1047
- "type": "boolean",
1048
- "title": "Disabled",
1049
- "description": "Whether the field is disabled."
1050
- },
1051
- "visibleInOrder": {
1052
- "type": "boolean",
1053
- "title": "Visible In Order",
1054
- "description": "Whether the field is visible in order."
1055
- },
1056
- "visibleInClientPanel": {
1057
- "type": "boolean",
1058
- "title": "Visible In Client Panel",
1059
- "description": "Whether the field is visible in client panel."
1060
- },
1061
1042
  "regexValidation": {
1062
1043
  "type": "string",
1063
1044
  "title": "Regex Validation",
@@ -1072,23 +1053,15 @@ exports.ComponentsSchemas = {
1072
1053
  "title": "Regex Validation Error Message",
1073
1054
  "description": "Localized error message shown when regex validation fails."
1074
1055
  },
1075
- "triggersRemoteValidation": {
1076
- "type": "boolean",
1077
- "title": "Triggers Remote Validation",
1078
- "description": "If true, field triggers remote validation."
1079
- },
1080
- "remoteValidationErrorMessage": {
1081
- "items": {
1082
- "$ref": "#/components/schemas/MultilangTextDto"
1083
- },
1084
- "type": "array",
1085
- "title": "Remote Validation Error Message",
1086
- "description": "Localized error messages for remote validation."
1087
- },
1088
1056
  "upgradable": {
1089
1057
  "type": "boolean",
1090
1058
  "title": "Upgradable",
1091
1059
  "description": "Whether the item attribute is upgradable by the user."
1060
+ },
1061
+ "downgradable": {
1062
+ "type": "boolean",
1063
+ "title": "Downgradable",
1064
+ "description": "Whether the item attribute is downgradable by the user."
1092
1065
  }
1093
1066
  },
1094
1067
  "type": "object",
@@ -1098,10 +1071,8 @@ exports.ComponentsSchemas = {
1098
1071
  "value",
1099
1072
  "type",
1100
1073
  "required",
1101
- "disabled",
1102
- "visibleInOrder",
1103
- "visibleInClientPanel",
1104
- "upgradable"
1074
+ "upgradable",
1075
+ "downgradable"
1105
1076
  ]
1106
1077
  },
1107
1078
  "InfoDto": {
@@ -1324,7 +1295,7 @@ exports.ComponentsSchemas = {
1324
1295
  "EN"
1325
1296
  ]
1326
1297
  },
1327
- "supportedActions": {
1298
+ "supportedTypes": {
1328
1299
  "items": {
1329
1300
  "enum": [
1330
1301
  "create",
@@ -1341,7 +1312,31 @@ exports.ComponentsSchemas = {
1341
1312
  },
1342
1313
  "type": "array",
1343
1314
  "title": "Supported Actions",
1344
- "description": "Actions supported by this integration."
1315
+ "description": "Actions supported by this integration.",
1316
+ "oneOf": [
1317
+ {
1318
+ "type": "string",
1319
+ "enum": [
1320
+ "create",
1321
+ "renew",
1322
+ "upgrade",
1323
+ "downgrade",
1324
+ "transfer",
1325
+ "trade",
1326
+ "suspend",
1327
+ "unsuspend",
1328
+ "delete"
1329
+ ]
1330
+ },
1331
+ {
1332
+ "type": "string",
1333
+ "enum": [
1334
+ "invoice",
1335
+ "credit-note",
1336
+ "proforma"
1337
+ ]
1338
+ }
1339
+ ]
1345
1340
  },
1346
1341
  "listenEvents": {
1347
1342
  "items": {
@@ -1904,7 +1899,7 @@ exports.ComponentsSchemas = {
1904
1899
  "EN"
1905
1900
  ]
1906
1901
  },
1907
- "supportedActions": {
1902
+ "supportedTypes": {
1908
1903
  "items": {
1909
1904
  "enum": [
1910
1905
  "create",
@@ -1921,7 +1916,31 @@ exports.ComponentsSchemas = {
1921
1916
  },
1922
1917
  "type": "array",
1923
1918
  "title": "Supported Actions",
1924
- "description": "Actions supported by this integration."
1919
+ "description": "Actions supported by this integration.",
1920
+ "oneOf": [
1921
+ {
1922
+ "type": "string",
1923
+ "enum": [
1924
+ "create",
1925
+ "renew",
1926
+ "upgrade",
1927
+ "downgrade",
1928
+ "transfer",
1929
+ "trade",
1930
+ "suspend",
1931
+ "unsuspend",
1932
+ "delete"
1933
+ ]
1934
+ },
1935
+ {
1936
+ "type": "string",
1937
+ "enum": [
1938
+ "invoice",
1939
+ "credit-note",
1940
+ "proforma"
1941
+ ]
1942
+ }
1943
+ ]
1925
1944
  },
1926
1945
  "listenEvents": {
1927
1946
  "items": {
@@ -2256,6 +2275,26 @@ exports.ComponentsSchemas = {
2256
2275
  "status_text": "status"
2257
2276
  }
2258
2277
  },
2278
+ "supportedTypes": {
2279
+ "items": {
2280
+ "enum": [
2281
+ "create",
2282
+ "renew",
2283
+ "upgrade",
2284
+ "downgrade",
2285
+ "transfer",
2286
+ "trade",
2287
+ "suspend",
2288
+ "unsuspend",
2289
+ "delete"
2290
+ ],
2291
+ "type": "string"
2292
+ },
2293
+ "type": "array",
2294
+ "minLength": 1,
2295
+ "title": "Supported Actions",
2296
+ "description": "Actions supported by this integration."
2297
+ },
2259
2298
  "title": {
2260
2299
  "minLength": 1,
2261
2300
  "type": "string",
@@ -2474,25 +2513,6 @@ exports.ComponentsSchemas = {
2474
2513
  "EN"
2475
2514
  ]
2476
2515
  },
2477
- "supportedActions": {
2478
- "items": {
2479
- "enum": [
2480
- "create",
2481
- "renew",
2482
- "upgrade",
2483
- "downgrade",
2484
- "transfer",
2485
- "trade",
2486
- "suspend",
2487
- "unsuspend",
2488
- "delete"
2489
- ],
2490
- "type": "string"
2491
- },
2492
- "type": "array",
2493
- "title": "Supported Actions",
2494
- "description": "Actions supported by this integration."
2495
- },
2496
2516
  "listenEvents": {
2497
2517
  "items": {
2498
2518
  "enum": [
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  require("reflect-metadata");
4
4
  const notification_info_validator_1 = require("./notification-info.validator");
5
5
  const notification_message_type_enum_1 = require("../enums/notification/notification-message-type.enum");
6
- const actions_enum_1 = require("../enums/actions.enum");
6
+ const item_actions_enum_1 = require("../enums/item-actions.enum");
7
7
  const language_enum_1 = require("../enums/language.enum");
8
8
  describe('NotificationInfoDto Validator', () => {
9
9
  const validUnit = { id: "ram", unitDescription: "MB", intervalDescription: "month" };
@@ -13,7 +13,7 @@ describe('NotificationInfoDto Validator', () => {
13
13
  dto: {
14
14
  type: notification_message_type_enum_1.NotificationMessageTypeEnum.EMAIL,
15
15
  title: 'Valid Title',
16
- supportedActions: [actions_enum_1.ActionsEnum.CREATE],
16
+ supportedActions: [item_actions_enum_1.ProductItemActionsEnum.CREATE],
17
17
  supportedLanguages: [language_enum_1.LanguageEnum.ENGLISH],
18
18
  payPerUseUnits: [validUnit]
19
19
  },
@@ -23,7 +23,7 @@ describe('NotificationInfoDto Validator', () => {
23
23
  description: 'should return error for missing type',
24
24
  dto: {
25
25
  title: 'Valid Title',
26
- supportedActions: [actions_enum_1.ActionsEnum.CREATE],
26
+ supportedActions: [item_actions_enum_1.ProductItemActionsEnum.CREATE],
27
27
  supportedLanguages: [language_enum_1.LanguageEnum.ENGLISH],
28
28
  payPerUseUnits: [validUnit]
29
29
  },
@@ -34,7 +34,7 @@ describe('NotificationInfoDto Validator', () => {
34
34
  dto: {
35
35
  type: notification_message_type_enum_1.NotificationMessageTypeEnum.EMAIL,
36
36
  title: 'Valid Title',
37
- supportedActions: [actions_enum_1.ActionsEnum.CREATE],
37
+ supportedActions: [item_actions_enum_1.ProductItemActionsEnum.CREATE],
38
38
  supportedLanguages: [language_enum_1.LanguageEnum.ENGLISH],
39
39
  payPerUseUnits: [{ id: "", unitDescription: "", intervalDescription: "" }] // Invalid unit
40
40
  },
@@ -52,7 +52,7 @@ describe('NotificationInfoDto Validator', () => {
52
52
  description: 'should return ValidationError for missing title',
53
53
  dto: {
54
54
  type: notification_message_type_enum_1.NotificationMessageTypeEnum.EMAIL,
55
- supportedActions: [actions_enum_1.ActionsEnum.CREATE],
55
+ supportedActions: [item_actions_enum_1.ProductItemActionsEnum.CREATE],
56
56
  supportedLanguages: [language_enum_1.LanguageEnum.ENGLISH],
57
57
  payPerUseUnits: [validUnit]
58
58
  },
@@ -63,7 +63,7 @@ describe('NotificationInfoDto Validator', () => {
63
63
  dto: {
64
64
  type: notification_message_type_enum_1.NotificationMessageTypeEnum.EMAIL,
65
65
  title: 'Valid Title',
66
- supportedActions: [actions_enum_1.ActionsEnum.CREATE],
66
+ supportedActions: [item_actions_enum_1.ProductItemActionsEnum.CREATE],
67
67
  supportedLanguages: [language_enum_1.LanguageEnum.ENGLISH],
68
68
  payPerUseUnits: [{ id: "", unitDescription: "", intervalDescription: "" }]
69
69
  },
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.validateNotificationRequestDto = validateNotificationRequestDto;
4
4
  const class_validator_1 = require("class-validator");
5
5
  const class_transformer_1 = require("class-transformer");
6
- const notification_send_request_dto_1 = require("../dtos/notification/notification-send-request.dto");
6
+ const notification_send_request_dto_1 = require("../dtos/notification/requests/notification-send-request.dto");
7
7
  /**
8
8
  * Validates a NotificationRequestDto object using class-validator decorators.
9
9
  *
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  require("reflect-metadata");
4
4
  // import { ProductInfoDto } from '../dtos/product/product-info.dto';
5
- const actions_enum_1 = require("../enums/actions.enum");
5
+ const item_actions_enum_1 = require("../enums/item-actions.enum");
6
6
  const language_enum_1 = require("../enums/language.enum");
7
7
  const field_type_enum_1 = require("../enums/field-type.enum");
8
8
  const product_info_validator_1 = require("./product-info.validator");
@@ -14,8 +14,7 @@ describe('ProductInfoDto Validator', () => {
14
14
  type: field_type_enum_1.FieldTypeEnum.TEXT_BOX,
15
15
  required: false,
16
16
  disabled: false,
17
- visibleInOrder: false,
18
- visibleInClientPanel: true,
17
+ hidden: false,
19
18
  upgradable: false
20
19
  };
21
20
  const invalidField = {
@@ -31,7 +30,7 @@ describe('ProductInfoDto Validator', () => {
31
30
  description: 'should return no errors for valid DTO',
32
31
  dto: {
33
32
  title: 'Test',
34
- supportedActions: [actions_enum_1.ActionsEnum.CREATE],
33
+ supportedActions: [item_actions_enum_1.ProductItemActionsEnum.CREATE],
35
34
  supportedLanguages: [language_enum_1.LanguageEnum.ENGLISH],
36
35
  productAttributes: [field],
37
36
  itemAttributes: [field]
@@ -42,7 +41,7 @@ describe('ProductInfoDto Validator', () => {
42
41
  description: 'should return error for invalid required and hidden',
43
42
  dto: {
44
43
  title: 'Test',
45
- supportedActions: [actions_enum_1.ActionsEnum.CREATE],
44
+ supportedActions: [item_actions_enum_1.ProductItemActionsEnum.CREATE],
46
45
  supportedLanguages: [language_enum_1.LanguageEnum.ENGLISH],
47
46
  itemAttributes: [invalidField]
48
47
  },
@@ -52,7 +51,7 @@ describe('ProductInfoDto Validator', () => {
52
51
  description: 'should return error for invalid title',
53
52
  dto: {
54
53
  title: '',
55
- supportedActions: [actions_enum_1.ActionsEnum.CREATE],
54
+ supportedActions: [item_actions_enum_1.ProductItemActionsEnum.CREATE],
56
55
  supportedLanguages: [language_enum_1.LanguageEnum.ENGLISH],
57
56
  productAttributes: [field],
58
57
  itemAttributes: [field]
@@ -74,7 +73,7 @@ describe('ProductInfoDto Validator', () => {
74
73
  description: 'should return error for unsupported language',
75
74
  dto: {
76
75
  title: 'Test',
77
- supportedActions: [actions_enum_1.ActionsEnum.CREATE],
76
+ supportedActions: [item_actions_enum_1.ProductItemActionsEnum.CREATE],
78
77
  supportedLanguages: [],
79
78
  productAttributes: [field],
80
79
  itemAttributes: [field]
@@ -85,7 +84,7 @@ describe('ProductInfoDto Validator', () => {
85
84
  description: 'should return no errors for valid DTO with adminPanel and clientPanel',
86
85
  dto: {
87
86
  title: 'Test',
88
- supportedActions: [actions_enum_1.ActionsEnum.CREATE],
87
+ supportedActions: [item_actions_enum_1.ProductItemActionsEnum.CREATE],
89
88
  supportedLanguages: [language_enum_1.LanguageEnum.ENGLISH],
90
89
  productAttributes: [field],
91
90
  itemAttributes: [field],
@@ -98,7 +97,7 @@ describe('ProductInfoDto Validator', () => {
98
97
  description: 'should return error for invalid DTO with adminPanel and clientPanel',
99
98
  dto: {
100
99
  title: '',
101
- supportedActions: [actions_enum_1.ActionsEnum.CREATE],
100
+ supportedActions: [item_actions_enum_1.ProductItemActionsEnum.CREATE],
102
101
  supportedLanguages: [language_enum_1.LanguageEnum.ENGLISH],
103
102
  productAttributes: [field],
104
103
  itemAttributes: [field],
@@ -111,7 +110,7 @@ describe('ProductInfoDto Validator', () => {
111
110
  description: 'should return no errors for valid DTO with payPerUseUnits',
112
111
  dto: {
113
112
  title: 'Test',
114
- supportedActions: [actions_enum_1.ActionsEnum.CREATE],
113
+ supportedActions: [item_actions_enum_1.ProductItemActionsEnum.CREATE],
115
114
  supportedLanguages: [language_enum_1.LanguageEnum.ENGLISH],
116
115
  productAttributes: [field],
117
116
  itemAttributes: [field],
@@ -123,7 +122,7 @@ describe('ProductInfoDto Validator', () => {
123
122
  description: 'should return error for invalid DTO with payPerUseUnits',
124
123
  dto: {
125
124
  title: 'Test',
126
- supportedActions: [actions_enum_1.ActionsEnum.CREATE],
125
+ supportedActions: [item_actions_enum_1.ProductItemActionsEnum.CREATE],
127
126
  supportedLanguages: [language_enum_1.LanguageEnum.ENGLISH],
128
127
  productAttributes: [field],
129
128
  itemAttributes: [field],
@@ -142,7 +141,7 @@ describe('ProductInfoDto Validator', () => {
142
141
  {
143
142
  description: 'should return ValidationError for missing title',
144
143
  dto: {
145
- supportedActions: [actions_enum_1.ActionsEnum.CREATE],
144
+ supportedActions: [item_actions_enum_1.ProductItemActionsEnum.CREATE],
146
145
  supportedLanguages: [language_enum_1.LanguageEnum.ENGLISH],
147
146
  productAttributes: [field],
148
147
  itemAttributes: [field]
@@ -179,14 +178,12 @@ describe('ProductInfoDto Validator', () => {
179
178
  type: field_type_enum_1.FieldTypeEnum.TEXT_BOX,
180
179
  required: false,
181
180
  disabled: false,
182
- visibleInOrder: false,
183
- visibleInClientPanel: true,
181
+ hidden: false,
184
182
  upgradable: false,
185
- repeatableMin: 1,
186
183
  };
187
184
  const dto = {
188
185
  title: 'Test',
189
- supportedActions: [actions_enum_1.ActionsEnum.CREATE],
186
+ supportedActions: [item_actions_enum_1.ProductItemActionsEnum.CREATE],
190
187
  supportedLanguages: [language_enum_1.LanguageEnum.ENGLISH],
191
188
  productAttributes: [fieldWithOnlyMin],
192
189
  };
@@ -201,14 +198,12 @@ describe('ProductInfoDto Validator', () => {
201
198
  type: field_type_enum_1.FieldTypeEnum.TEXT_BOX,
202
199
  required: false,
203
200
  disabled: false,
204
- visibleInOrder: false,
205
- visibleInClientPanel: true,
206
201
  upgradable: false,
207
- repeatableMax: 2,
202
+ hidden: false
208
203
  };
209
204
  const dto = {
210
205
  title: 'Test',
211
- supportedActions: [actions_enum_1.ActionsEnum.CREATE],
206
+ supportedActions: [item_actions_enum_1.ProductItemActionsEnum.CREATE],
212
207
  supportedLanguages: [language_enum_1.LanguageEnum.ENGLISH],
213
208
  itemAttributes: [fieldWithOnlyMax],
214
209
  };
@@ -223,15 +218,11 @@ describe('ProductInfoDto Validator', () => {
223
218
  type: field_type_enum_1.FieldTypeEnum.TEXT_BOX,
224
219
  required: false,
225
220
  disabled: false,
226
- visibleInOrder: false,
227
- visibleInClientPanel: true,
228
- upgradable: false,
229
- repeatableMin: 1,
230
- repeatableMax: 2,
221
+ hidden: false,
231
222
  };
232
223
  const dto = {
233
224
  title: 'Test',
234
- supportedActions: [actions_enum_1.ActionsEnum.CREATE],
225
+ supportedActions: [item_actions_enum_1.ProductItemActionsEnum.CREATE],
235
226
  supportedLanguages: [language_enum_1.LanguageEnum.ENGLISH],
236
227
  productAttributes: [fieldOk],
237
228
  };
@@ -245,15 +236,12 @@ describe('ProductInfoDto Validator', () => {
245
236
  type: field_type_enum_1.FieldTypeEnum.TEXT_BOX,
246
237
  required: false,
247
238
  disabled: false,
248
- visibleInOrder: false,
249
- visibleInClientPanel: true,
239
+ hidden: false,
250
240
  upgradable: false,
251
- repeatableMin: 5,
252
- repeatableMax: 2,
253
241
  };
254
242
  const dto = {
255
243
  title: 'Test',
256
- supportedActions: [actions_enum_1.ActionsEnum.CREATE],
244
+ supportedActions: [item_actions_enum_1.ProductItemActionsEnum.CREATE],
257
245
  supportedLanguages: [language_enum_1.LanguageEnum.ENGLISH],
258
246
  itemAttributes: [fieldBad],
259
247
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hosterai/types",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {