@hosterai/types 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -39
- package/dist/dtos/action.dto.d.ts +21 -3
- package/dist/dtos/action.dto.js +10 -0
- package/dist/dtos/attachment.dto.d.ts +1 -1
- package/dist/dtos/attachment.dto.js +1 -1
- package/dist/dtos/client-data.dto.d.ts +65 -0
- package/dist/dtos/client-data.dto.js +106 -0
- package/dist/dtos/company-data.dto.d.ts +57 -0
- package/dist/dtos/company-data.dto.js +5 -2
- package/dist/dtos/error-response.dto.d.ts +8 -6
- package/dist/dtos/error-response.dto.js +2 -2
- package/dist/dtos/field.dto.d.ts +5 -0
- package/dist/dtos/field.dto.js +5 -0
- package/dist/dtos/info.dto.d.ts +61 -64
- package/dist/dtos/info.dto.js +6 -4
- package/dist/dtos/jwt.dto.d.ts +12 -9
- package/dist/dtos/jwt.dto.js +6 -2
- package/dist/dtos/menu.dto.d.ts +26 -11
- package/dist/dtos/multilang-text.dto.d.ts +11 -0
- package/dist/dtos/multilang-text.dto.js +4 -0
- package/dist/dtos/notification/notification-info.dto.d.ts +15 -0
- package/dist/dtos/notification/notification-info.dto.js +4 -0
- package/dist/dtos/notification/{notification-request.dto.d.ts → notification-send-request.dto.d.ts} +6 -1
- package/dist/dtos/notification/{notification-request.dto.js → notification-send-request.dto.js} +11 -6
- package/dist/dtos/product/product-info.dto.d.ts +30 -0
- package/dist/dtos/product/product-info.dto.js +11 -0
- package/dist/dtos/product/product-item-data.dto.d.ts +31 -0
- package/dist/dtos/product/product-item-data.dto.js +43 -0
- package/dist/dtos/product/product.interface.d.ts +44 -0
- package/dist/dtos/product/product.interface.js +2 -0
- package/dist/dtos/product/requests/product-create-request.dto.d.ts +18 -0
- package/dist/dtos/product/requests/product-create-request.dto.js +37 -0
- package/dist/dtos/product/requests/product-delete-request.dto.d.ts +18 -0
- package/dist/dtos/product/requests/product-delete-request.dto.js +37 -0
- package/dist/dtos/product/requests/product-downgrade-request.dto.d.ts +24 -0
- package/dist/dtos/product/requests/product-downgrade-request.dto.js +44 -0
- package/dist/dtos/product/requests/product-downgradeable-request.dto.d.ts +18 -0
- package/dist/dtos/product/requests/product-downgradeable-request.dto.js +37 -0
- package/dist/dtos/product/requests/product-renew-request.dto.d.ts +18 -0
- package/dist/dtos/product/requests/product-renew-request.dto.js +37 -0
- package/dist/dtos/product/requests/product-suspend-request.dto.d.ts +18 -0
- package/dist/dtos/product/requests/product-suspend-request.dto.js +37 -0
- package/dist/dtos/product/requests/product-unsuspend-request.dto.d.ts +18 -0
- package/dist/dtos/product/requests/product-unsuspend-request.dto.js +37 -0
- package/dist/dtos/product/requests/product-upgrade-request.dto.d.ts +24 -0
- package/dist/dtos/product/requests/product-upgrade-request.dto.js +44 -0
- package/dist/dtos/product/requests/product-upgradeable-request.dto.d.ts +18 -0
- package/dist/dtos/product/requests/product-upgradeable-request.dto.js +37 -0
- package/dist/dtos/product/requests/product-validate-attributes-request.dto.d.ts +18 -0
- package/dist/dtos/product/requests/product-validate-attributes-request.dto.js +31 -0
- package/dist/dtos/product/responses/product-create-response.dto.d.ts +21 -0
- package/dist/dtos/product/responses/product-create-response.dto.js +11 -0
- package/dist/dtos/product/responses/product-delete-response.dto.d.ts +21 -0
- package/dist/dtos/product/responses/product-delete-response.dto.js +11 -0
- package/dist/dtos/product/responses/product-downgrade-response.dto.d.ts +21 -0
- package/dist/dtos/product/responses/product-downgrade-response.dto.js +11 -0
- package/dist/dtos/product/responses/product-downgradeable-response.dto.d.ts +22 -0
- package/dist/dtos/product/responses/product-downgradeable-response.dto.js +11 -0
- package/dist/dtos/product/responses/product-info-response.dto.d.ts +13 -0
- package/dist/dtos/product/responses/product-info-response.dto.js +11 -0
- package/dist/dtos/product/responses/product-renew-response.dto.d.ts +21 -0
- package/dist/dtos/product/responses/product-renew-response.dto.js +11 -0
- package/dist/dtos/product/responses/product-suspend-response.dto.d.ts +21 -0
- package/dist/dtos/product/responses/product-suspend-response.dto.js +11 -0
- package/dist/dtos/product/responses/product-unsuspend-response.dto.d.ts +21 -0
- package/dist/dtos/product/responses/product-unsuspend-response.dto.js +11 -0
- package/dist/dtos/product/responses/product-upgrade-response.dto.d.ts +22 -0
- package/dist/dtos/product/responses/product-upgrade-response.dto.js +11 -0
- package/dist/dtos/product/responses/product-upgradeable-response.dto.d.ts +22 -0
- package/dist/dtos/product/responses/product-upgradeable-response.dto.js +11 -0
- package/dist/dtos/product/responses/product-validate-attributes-response.dto.d.ts +13 -0
- package/dist/dtos/product/responses/product-validate-attributes-response.dto.js +11 -0
- package/dist/dtos/response-data.dto.d.ts +7 -0
- package/dist/dtos/response-data.dto.js +4 -0
- package/dist/dtos/setup-status-response.dto.d.ts +8 -0
- package/dist/dtos/setup-status-response.dto.js +4 -0
- package/dist/dtos/submenu.dto.d.ts +7 -0
- package/dist/dtos/submenu.dto.js +11 -0
- package/dist/dtos/success-response.dto.d.ts +4 -0
- package/dist/dtos/success-response.dto.js +4 -0
- package/dist/dtos/tab.dto.d.ts +0 -2
- package/dist/dtos/tab.dto.js +1 -4
- package/dist/dtos/task-response.dto.d.ts +4 -0
- package/dist/dtos/task-response.dto.js +4 -0
- package/dist/dtos/unit.dto.d.ts +16 -0
- package/dist/dtos/unit.dto.js +4 -0
- package/dist/enums/duration.enum.d.ts +23 -0
- package/dist/enums/duration.enum.js +27 -0
- package/dist/enums/events.enum.d.ts +2 -0
- package/dist/enums/events.enum.js +2 -0
- package/dist/enums/response-status.enum.d.ts +5 -0
- package/dist/enums/response-status.enum.js +9 -0
- package/dist/index.d.ts +57 -14
- package/dist/index.js +65 -19
- package/dist/validators/client-data-validator.d.ts +8 -0
- package/dist/validators/client-data-validator.js +17 -0
- package/dist/validators/notification-request-validator.js +2 -2
- package/dist/validators/product-create-request-validator.d.ts +8 -0
- package/dist/validators/product-create-request-validator.js +17 -0
- package/dist/validators/product-delete-request-validator.d.ts +8 -0
- package/dist/validators/product-delete-request-validator.js +17 -0
- package/dist/validators/product-downgrade-request-validator.d.ts +8 -0
- package/dist/validators/product-downgrade-request-validator.js +17 -0
- package/dist/validators/product-downgradeable-request-validator.d.ts +8 -0
- package/dist/validators/product-downgradeable-request-validator.js +17 -0
- package/dist/validators/product-renew-request-validator.d.ts +8 -0
- package/dist/validators/product-renew-request-validator.js +17 -0
- package/dist/validators/product-suspend-request-validator.d.ts +8 -0
- package/dist/validators/product-suspend-request-validator.js +17 -0
- package/dist/validators/product-unsuspend-request-validator.d.ts +8 -0
- package/dist/validators/product-unsuspend-request-validator.js +17 -0
- package/dist/validators/product-upgrade-request-validator.d.ts +8 -0
- package/dist/validators/product-upgrade-request-validator.js +17 -0
- package/dist/validators/product-upgradeable-request-validator.d.ts +8 -0
- package/dist/validators/product-upgradeable-request-validator.js +17 -0
- package/dist/validators/product-validate-attributes-request-validator.d.ts +8 -0
- package/dist/validators/product-validate-attributes-request-validator.js +17 -0
- package/package.json +5 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,42 +1,85 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
|
+
export * from './dtos/action.dto';
|
|
2
3
|
export * from './dtos/attachment.dto';
|
|
3
4
|
export * from './dtos/base-response.dto';
|
|
5
|
+
export * from './dtos/client-data.dto';
|
|
4
6
|
export * from './dtos/company-data.dto';
|
|
5
7
|
export * from './dtos/error-response.dto';
|
|
8
|
+
export * from './dtos/field.dto';
|
|
9
|
+
export * from './dtos/info.dto';
|
|
6
10
|
export * from './dtos/jwt.dto';
|
|
7
|
-
export * from './dtos/
|
|
11
|
+
export * from './dtos/menu.dto';
|
|
12
|
+
export * from './dtos/multilang-text.dto';
|
|
13
|
+
export * from './dtos/response-data.dto';
|
|
8
14
|
export * from './dtos/setup-status-response.dto';
|
|
15
|
+
export * from './dtos/submenu.dto';
|
|
9
16
|
export * from './dtos/success-response.dto';
|
|
17
|
+
export * from './dtos/tab.dto';
|
|
10
18
|
export * from './dtos/task-response.dto';
|
|
11
|
-
export * from './dtos/action.dto';
|
|
12
|
-
export * from './dtos/field.dto';
|
|
13
|
-
export * from './dtos/notification/notification-info.dto';
|
|
14
|
-
export * from './dtos/multilang-text.dto';
|
|
15
|
-
export * from './dtos/response-data.dto';
|
|
16
19
|
export * from './dtos/unit.dto';
|
|
20
|
+
export * from './dtos/notification/notification-info.dto';
|
|
21
|
+
export * from './dtos/notification/notification-send-request.dto';
|
|
17
22
|
export * from './dtos/notification/receiver/receiver-email.dto';
|
|
18
23
|
export * from './dtos/notification/receiver/receiver-push.dto';
|
|
19
24
|
export * from './dtos/notification/receiver/receiver-sms.dto';
|
|
20
25
|
export * from './dtos/notification/sender/sender-email.dto';
|
|
21
26
|
export * from './dtos/notification/sender/sender-push.dto';
|
|
22
27
|
export * from './dtos/notification/sender/sender-sms.dto';
|
|
28
|
+
export * from './dtos/product/product-info.dto';
|
|
29
|
+
export * from './dtos/product/product-item-data.dto';
|
|
30
|
+
export * from './dtos/product/requests/product-create-request.dto';
|
|
31
|
+
export * from './dtos/product/requests/product-delete-request.dto';
|
|
32
|
+
export * from './dtos/product/requests/product-downgrade-request.dto';
|
|
33
|
+
export * from './dtos/product/requests/product-downgradeable-request.dto';
|
|
34
|
+
export * from './dtos/product/requests/product-renew-request.dto';
|
|
35
|
+
export * from './dtos/product/requests/product-suspend-request.dto';
|
|
36
|
+
export * from './dtos/product/requests/product-unsuspend-request.dto';
|
|
37
|
+
export * from './dtos/product/requests/product-upgrade-request.dto';
|
|
38
|
+
export * from './dtos/product/requests/product-upgradeable-request.dto';
|
|
39
|
+
export * from './dtos/product/requests/product-validate-attributes-request.dto';
|
|
40
|
+
export * from './dtos/product/responses/product-create-response.dto';
|
|
41
|
+
export * from './dtos/product/responses/product-delete-response.dto';
|
|
42
|
+
export * from './dtos/product/responses/product-downgrade-response.dto';
|
|
43
|
+
export * from './dtos/product/responses/product-downgradeable-response.dto';
|
|
44
|
+
export * from './dtos/product/responses/product-info-response.dto';
|
|
45
|
+
export * from './dtos/product/responses/product-renew-response.dto';
|
|
46
|
+
export * from './dtos/product/responses/product-suspend-response.dto';
|
|
47
|
+
export * from './dtos/product/responses/product-unsuspend-response.dto';
|
|
48
|
+
export * from './dtos/product/responses/product-upgrade-response.dto';
|
|
49
|
+
export * from './dtos/product/responses/product-upgradeable-response.dto';
|
|
50
|
+
export * from './dtos/product/responses/product-validate-attributes-response.dto';
|
|
51
|
+
export * from './enums/actions.enum';
|
|
23
52
|
export * from './enums/country.enum';
|
|
53
|
+
export * from './enums/duration.enum';
|
|
54
|
+
export * from './enums/events.enum';
|
|
55
|
+
export * from './enums/field-type.enum';
|
|
24
56
|
export * from './enums/language.enum';
|
|
25
57
|
export * from './enums/notification/notification-message-type.enum';
|
|
58
|
+
export * from './enums/open-method.enum';
|
|
59
|
+
export * from './enums/response-status.enum';
|
|
26
60
|
export * from './enums/roles.enum';
|
|
27
61
|
export * from './enums/setup-status.enum';
|
|
28
|
-
export * from './enums/actions.enum';
|
|
29
|
-
export * from './enums/events.enum';
|
|
30
|
-
export * from './enums/field-type.enum';
|
|
31
|
-
export * from './validators/notification-request-validator';
|
|
32
|
-
export * from './validators/company-data-validator';
|
|
33
|
-
export * from './validators/jwt-validator';
|
|
34
62
|
export * from './validators/action-validator';
|
|
63
|
+
export * from './validators/company-data-validator';
|
|
35
64
|
export * from './validators/field-validator';
|
|
65
|
+
export * from './validators/jwt-validator';
|
|
36
66
|
export * from './validators/multilang-text-validator';
|
|
67
|
+
export * from './validators/notification-request-validator';
|
|
37
68
|
export * from './validators/receiver-email-validator';
|
|
38
|
-
export * from './validators/receiver-sms-validator';
|
|
39
69
|
export * from './validators/receiver-push-validator';
|
|
70
|
+
export * from './validators/receiver-sms-validator';
|
|
40
71
|
export * from './validators/sender-email-validator';
|
|
41
|
-
export * from './validators/sender-sms-validator';
|
|
42
72
|
export * from './validators/sender-push-validator';
|
|
73
|
+
export * from './validators/sender-sms-validator';
|
|
74
|
+
export * from './validators/client-data-validator';
|
|
75
|
+
export * from './validators/product-create-request-validator';
|
|
76
|
+
export * from './validators/product-delete-request-validator';
|
|
77
|
+
export * from './validators/product-downgrade-request-validator';
|
|
78
|
+
export * from './validators/product-downgradeable-request-validator';
|
|
79
|
+
export * from './validators/product-renew-request-validator';
|
|
80
|
+
export * from './validators/product-suspend-request-validator';
|
|
81
|
+
export * from './validators/product-unsuspend-request-validator';
|
|
82
|
+
export * from './validators/product-upgrade-request-validator';
|
|
83
|
+
export * from './validators/product-upgradeable-request-validator';
|
|
84
|
+
export * from './validators/product-validate-attributes-request-validator';
|
|
85
|
+
export * from './dtos/product/product.interface';
|
package/dist/index.js
CHANGED
|
@@ -15,49 +15,95 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
require("reflect-metadata");
|
|
18
|
-
//
|
|
18
|
+
// Base DTOs
|
|
19
|
+
__exportStar(require("./dtos/action.dto"), exports);
|
|
19
20
|
__exportStar(require("./dtos/attachment.dto"), exports);
|
|
20
21
|
__exportStar(require("./dtos/base-response.dto"), exports);
|
|
22
|
+
__exportStar(require("./dtos/client-data.dto"), exports);
|
|
21
23
|
__exportStar(require("./dtos/company-data.dto"), exports);
|
|
22
24
|
__exportStar(require("./dtos/error-response.dto"), exports);
|
|
25
|
+
__exportStar(require("./dtos/field.dto"), exports);
|
|
26
|
+
__exportStar(require("./dtos/info.dto"), exports);
|
|
23
27
|
__exportStar(require("./dtos/jwt.dto"), exports);
|
|
24
|
-
__exportStar(require("./dtos/
|
|
28
|
+
__exportStar(require("./dtos/menu.dto"), exports);
|
|
29
|
+
__exportStar(require("./dtos/multilang-text.dto"), exports);
|
|
30
|
+
__exportStar(require("./dtos/response-data.dto"), exports);
|
|
25
31
|
__exportStar(require("./dtos/setup-status-response.dto"), exports);
|
|
32
|
+
__exportStar(require("./dtos/submenu.dto"), exports);
|
|
26
33
|
__exportStar(require("./dtos/success-response.dto"), exports);
|
|
34
|
+
__exportStar(require("./dtos/tab.dto"), exports);
|
|
27
35
|
__exportStar(require("./dtos/task-response.dto"), exports);
|
|
28
|
-
__exportStar(require("./dtos/action.dto"), exports);
|
|
29
|
-
__exportStar(require("./dtos/field.dto"), exports);
|
|
30
|
-
__exportStar(require("./dtos/notification/notification-info.dto"), exports);
|
|
31
|
-
__exportStar(require("./dtos/multilang-text.dto"), exports);
|
|
32
|
-
__exportStar(require("./dtos/response-data.dto"), exports);
|
|
33
36
|
__exportStar(require("./dtos/unit.dto"), exports);
|
|
34
|
-
//
|
|
37
|
+
// Notification DTOs
|
|
38
|
+
__exportStar(require("./dtos/notification/notification-info.dto"), exports);
|
|
39
|
+
__exportStar(require("./dtos/notification/notification-send-request.dto"), exports);
|
|
35
40
|
__exportStar(require("./dtos/notification/receiver/receiver-email.dto"), exports);
|
|
36
41
|
__exportStar(require("./dtos/notification/receiver/receiver-push.dto"), exports);
|
|
37
42
|
__exportStar(require("./dtos/notification/receiver/receiver-sms.dto"), exports);
|
|
38
|
-
// Export sender DTOs
|
|
39
43
|
__exportStar(require("./dtos/notification/sender/sender-email.dto"), exports);
|
|
40
44
|
__exportStar(require("./dtos/notification/sender/sender-push.dto"), exports);
|
|
41
45
|
__exportStar(require("./dtos/notification/sender/sender-sms.dto"), exports);
|
|
42
|
-
//
|
|
46
|
+
// Product DTOs
|
|
47
|
+
__exportStar(require("./dtos/product/product-info.dto"), exports);
|
|
48
|
+
__exportStar(require("./dtos/product/product-item-data.dto"), exports);
|
|
49
|
+
// Product Requests
|
|
50
|
+
__exportStar(require("./dtos/product/requests/product-create-request.dto"), exports);
|
|
51
|
+
__exportStar(require("./dtos/product/requests/product-delete-request.dto"), exports);
|
|
52
|
+
__exportStar(require("./dtos/product/requests/product-downgrade-request.dto"), exports);
|
|
53
|
+
__exportStar(require("./dtos/product/requests/product-downgradeable-request.dto"), exports);
|
|
54
|
+
__exportStar(require("./dtos/product/requests/product-renew-request.dto"), exports);
|
|
55
|
+
__exportStar(require("./dtos/product/requests/product-suspend-request.dto"), exports);
|
|
56
|
+
__exportStar(require("./dtos/product/requests/product-unsuspend-request.dto"), exports);
|
|
57
|
+
__exportStar(require("./dtos/product/requests/product-upgrade-request.dto"), exports);
|
|
58
|
+
__exportStar(require("./dtos/product/requests/product-upgradeable-request.dto"), exports);
|
|
59
|
+
__exportStar(require("./dtos/product/requests/product-validate-attributes-request.dto"), exports);
|
|
60
|
+
// Product Responses
|
|
61
|
+
__exportStar(require("./dtos/product/responses/product-create-response.dto"), exports);
|
|
62
|
+
__exportStar(require("./dtos/product/responses/product-delete-response.dto"), exports);
|
|
63
|
+
__exportStar(require("./dtos/product/responses/product-downgrade-response.dto"), exports);
|
|
64
|
+
__exportStar(require("./dtos/product/responses/product-downgradeable-response.dto"), exports);
|
|
65
|
+
__exportStar(require("./dtos/product/responses/product-info-response.dto"), exports);
|
|
66
|
+
__exportStar(require("./dtos/product/responses/product-renew-response.dto"), exports);
|
|
67
|
+
__exportStar(require("./dtos/product/responses/product-suspend-response.dto"), exports);
|
|
68
|
+
__exportStar(require("./dtos/product/responses/product-unsuspend-response.dto"), exports);
|
|
69
|
+
__exportStar(require("./dtos/product/responses/product-upgrade-response.dto"), exports);
|
|
70
|
+
__exportStar(require("./dtos/product/responses/product-upgradeable-response.dto"), exports);
|
|
71
|
+
__exportStar(require("./dtos/product/responses/product-validate-attributes-response.dto"), exports);
|
|
72
|
+
// Enums
|
|
73
|
+
__exportStar(require("./enums/actions.enum"), exports);
|
|
43
74
|
__exportStar(require("./enums/country.enum"), exports);
|
|
75
|
+
__exportStar(require("./enums/duration.enum"), exports);
|
|
76
|
+
__exportStar(require("./enums/events.enum"), exports);
|
|
77
|
+
__exportStar(require("./enums/field-type.enum"), exports);
|
|
44
78
|
__exportStar(require("./enums/language.enum"), exports);
|
|
45
79
|
__exportStar(require("./enums/notification/notification-message-type.enum"), exports);
|
|
80
|
+
__exportStar(require("./enums/open-method.enum"), exports);
|
|
81
|
+
__exportStar(require("./enums/response-status.enum"), exports);
|
|
46
82
|
__exportStar(require("./enums/roles.enum"), exports);
|
|
47
83
|
__exportStar(require("./enums/setup-status.enum"), exports);
|
|
48
|
-
|
|
49
|
-
__exportStar(require("./enums/events.enum"), exports);
|
|
50
|
-
__exportStar(require("./enums/field-type.enum"), exports);
|
|
51
|
-
// Export validators
|
|
52
|
-
__exportStar(require("./validators/notification-request-validator"), exports);
|
|
53
|
-
__exportStar(require("./validators/company-data-validator"), exports);
|
|
54
|
-
__exportStar(require("./validators/jwt-validator"), exports);
|
|
84
|
+
// Validators
|
|
55
85
|
__exportStar(require("./validators/action-validator"), exports);
|
|
86
|
+
__exportStar(require("./validators/company-data-validator"), exports);
|
|
56
87
|
__exportStar(require("./validators/field-validator"), exports);
|
|
88
|
+
__exportStar(require("./validators/jwt-validator"), exports);
|
|
57
89
|
__exportStar(require("./validators/multilang-text-validator"), exports);
|
|
90
|
+
__exportStar(require("./validators/notification-request-validator"), exports);
|
|
58
91
|
__exportStar(require("./validators/receiver-email-validator"), exports);
|
|
59
|
-
__exportStar(require("./validators/receiver-sms-validator"), exports);
|
|
60
92
|
__exportStar(require("./validators/receiver-push-validator"), exports);
|
|
93
|
+
__exportStar(require("./validators/receiver-sms-validator"), exports);
|
|
61
94
|
__exportStar(require("./validators/sender-email-validator"), exports);
|
|
62
|
-
__exportStar(require("./validators/sender-sms-validator"), exports);
|
|
63
95
|
__exportStar(require("./validators/sender-push-validator"), exports);
|
|
96
|
+
__exportStar(require("./validators/sender-sms-validator"), exports);
|
|
97
|
+
__exportStar(require("./validators/client-data-validator"), exports);
|
|
98
|
+
__exportStar(require("./validators/product-create-request-validator"), exports);
|
|
99
|
+
__exportStar(require("./validators/product-delete-request-validator"), exports);
|
|
100
|
+
__exportStar(require("./validators/product-downgrade-request-validator"), exports);
|
|
101
|
+
__exportStar(require("./validators/product-downgradeable-request-validator"), exports);
|
|
102
|
+
__exportStar(require("./validators/product-renew-request-validator"), exports);
|
|
103
|
+
__exportStar(require("./validators/product-suspend-request-validator"), exports);
|
|
104
|
+
__exportStar(require("./validators/product-unsuspend-request-validator"), exports);
|
|
105
|
+
__exportStar(require("./validators/product-upgrade-request-validator"), exports);
|
|
106
|
+
__exportStar(require("./validators/product-upgradeable-request-validator"), exports);
|
|
107
|
+
__exportStar(require("./validators/product-validate-attributes-request-validator"), exports);
|
|
108
|
+
// Interfaces
|
|
109
|
+
__exportStar(require("./dtos/product/product.interface"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ValidationError } from 'class-validator';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a client data object.
|
|
4
|
+
*
|
|
5
|
+
* @param {Record<string, unknown>} plainObject - The plain object to validate.
|
|
6
|
+
* @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
|
|
7
|
+
*/
|
|
8
|
+
export declare const validateClientDataDto: (plainObject: Record<string, unknown>) => Promise<ValidationError[]>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateClientDataDto = void 0;
|
|
4
|
+
const class_validator_1 = require("class-validator");
|
|
5
|
+
const class_transformer_1 = require("class-transformer");
|
|
6
|
+
const client_data_dto_1 = require("../dtos/client-data.dto");
|
|
7
|
+
/**
|
|
8
|
+
* Validates a client data object.
|
|
9
|
+
*
|
|
10
|
+
* @param {Record<string, unknown>} plainObject - The plain object to validate.
|
|
11
|
+
* @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
|
|
12
|
+
*/
|
|
13
|
+
const validateClientDataDto = async (plainObject) => {
|
|
14
|
+
const clientData = (0, class_transformer_1.plainToInstance)(client_data_dto_1.ClientDataDto, plainObject);
|
|
15
|
+
return await (0, class_validator_1.validate)(clientData);
|
|
16
|
+
};
|
|
17
|
+
exports.validateClientDataDto = validateClientDataDto;
|
|
@@ -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
|
|
6
|
+
const notification_send_request_dto_1 = require("../dtos/notification/notification-send-request.dto");
|
|
7
7
|
/**
|
|
8
8
|
* Validates a NotificationRequestDto object using class-validator decorators.
|
|
9
9
|
*
|
|
@@ -11,7 +11,7 @@ const notification_request_dto_1 = require("../dtos/notification/notification-re
|
|
|
11
11
|
* @returns An array of validation errors, empty if validation succeeds.
|
|
12
12
|
*/
|
|
13
13
|
function validateNotificationRequestDto(data) {
|
|
14
|
-
const dto = (0, class_transformer_1.plainToInstance)(
|
|
14
|
+
const dto = (0, class_transformer_1.plainToInstance)(notification_send_request_dto_1.NotificationSendRequestDto, data);
|
|
15
15
|
const errors = (0, class_validator_1.validateSync)(dto);
|
|
16
16
|
return errors;
|
|
17
17
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ValidationError } from 'class-validator';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a product create request object.
|
|
4
|
+
*
|
|
5
|
+
* @param {Record<string, unknown>} plainObject - The plain object to validate.
|
|
6
|
+
* @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
|
|
7
|
+
*/
|
|
8
|
+
export declare const validateProductCreateRequestDto: (plainObject: Record<string, unknown>) => Promise<ValidationError[]>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateProductCreateRequestDto = void 0;
|
|
4
|
+
const class_validator_1 = require("class-validator");
|
|
5
|
+
const class_transformer_1 = require("class-transformer");
|
|
6
|
+
const product_create_request_dto_1 = require("../dtos/product/requests/product-create-request.dto");
|
|
7
|
+
/**
|
|
8
|
+
* Validates a product create request object.
|
|
9
|
+
*
|
|
10
|
+
* @param {Record<string, unknown>} plainObject - The plain object to validate.
|
|
11
|
+
* @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
|
|
12
|
+
*/
|
|
13
|
+
const validateProductCreateRequestDto = async (plainObject) => {
|
|
14
|
+
const request = (0, class_transformer_1.plainToInstance)(product_create_request_dto_1.ProductCreateRequestDto, plainObject);
|
|
15
|
+
return await (0, class_validator_1.validate)(request);
|
|
16
|
+
};
|
|
17
|
+
exports.validateProductCreateRequestDto = validateProductCreateRequestDto;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ValidationError } from 'class-validator';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a product delete request object.
|
|
4
|
+
*
|
|
5
|
+
* @param {Record<string, unknown>} plainObject - The plain object to validate.
|
|
6
|
+
* @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
|
|
7
|
+
*/
|
|
8
|
+
export declare const validateProductDeleteRequestDto: (plainObject: Record<string, unknown>) => Promise<ValidationError[]>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateProductDeleteRequestDto = void 0;
|
|
4
|
+
const class_validator_1 = require("class-validator");
|
|
5
|
+
const class_transformer_1 = require("class-transformer");
|
|
6
|
+
const product_delete_request_dto_1 = require("../dtos/product/requests/product-delete-request.dto");
|
|
7
|
+
/**
|
|
8
|
+
* Validates a product delete request object.
|
|
9
|
+
*
|
|
10
|
+
* @param {Record<string, unknown>} plainObject - The plain object to validate.
|
|
11
|
+
* @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
|
|
12
|
+
*/
|
|
13
|
+
const validateProductDeleteRequestDto = async (plainObject) => {
|
|
14
|
+
const request = (0, class_transformer_1.plainToInstance)(product_delete_request_dto_1.ProductDeleteRequestDto, plainObject);
|
|
15
|
+
return await (0, class_validator_1.validate)(request);
|
|
16
|
+
};
|
|
17
|
+
exports.validateProductDeleteRequestDto = validateProductDeleteRequestDto;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ValidationError } from 'class-validator';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a product downgrade request object.
|
|
4
|
+
*
|
|
5
|
+
* @param {Record<string, unknown>} plainObject - The plain object to validate.
|
|
6
|
+
* @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
|
|
7
|
+
*/
|
|
8
|
+
export declare const validateProductDowngradeRequestDto: (plainObject: Record<string, unknown>) => Promise<ValidationError[]>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateProductDowngradeRequestDto = void 0;
|
|
4
|
+
const class_validator_1 = require("class-validator");
|
|
5
|
+
const class_transformer_1 = require("class-transformer");
|
|
6
|
+
const product_downgrade_request_dto_1 = require("../dtos/product/requests/product-downgrade-request.dto");
|
|
7
|
+
/**
|
|
8
|
+
* Validates a product downgrade request object.
|
|
9
|
+
*
|
|
10
|
+
* @param {Record<string, unknown>} plainObject - The plain object to validate.
|
|
11
|
+
* @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
|
|
12
|
+
*/
|
|
13
|
+
const validateProductDowngradeRequestDto = async (plainObject) => {
|
|
14
|
+
const request = (0, class_transformer_1.plainToInstance)(product_downgrade_request_dto_1.ProductDowngradeRequestDto, plainObject);
|
|
15
|
+
return await (0, class_validator_1.validate)(request);
|
|
16
|
+
};
|
|
17
|
+
exports.validateProductDowngradeRequestDto = validateProductDowngradeRequestDto;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ValidationError } from 'class-validator';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a product downgradable request object.
|
|
4
|
+
*
|
|
5
|
+
* @param {Record<string, unknown>} plainObject - The plain object to validate.
|
|
6
|
+
* @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
|
|
7
|
+
*/
|
|
8
|
+
export declare const validateProductDowngradableRequestDto: (plainObject: Record<string, unknown>) => Promise<ValidationError[]>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateProductDowngradableRequestDto = void 0;
|
|
4
|
+
const class_validator_1 = require("class-validator");
|
|
5
|
+
const class_transformer_1 = require("class-transformer");
|
|
6
|
+
const product_downgradeable_request_dto_1 = require("../dtos/product/requests/product-downgradeable-request.dto");
|
|
7
|
+
/**
|
|
8
|
+
* Validates a product downgradable request object.
|
|
9
|
+
*
|
|
10
|
+
* @param {Record<string, unknown>} plainObject - The plain object to validate.
|
|
11
|
+
* @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
|
|
12
|
+
*/
|
|
13
|
+
const validateProductDowngradableRequestDto = async (plainObject) => {
|
|
14
|
+
const request = (0, class_transformer_1.plainToInstance)(product_downgradeable_request_dto_1.ProductDowngradableRequestDto, plainObject);
|
|
15
|
+
return await (0, class_validator_1.validate)(request);
|
|
16
|
+
};
|
|
17
|
+
exports.validateProductDowngradableRequestDto = validateProductDowngradableRequestDto;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ValidationError } from 'class-validator';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a product renew request object.
|
|
4
|
+
*
|
|
5
|
+
* @param {Record<string, unknown>} plainObject - The plain object to validate.
|
|
6
|
+
* @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
|
|
7
|
+
*/
|
|
8
|
+
export declare const validateProductRenewRequestDto: (plainObject: Record<string, unknown>) => Promise<ValidationError[]>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateProductRenewRequestDto = void 0;
|
|
4
|
+
const class_validator_1 = require("class-validator");
|
|
5
|
+
const class_transformer_1 = require("class-transformer");
|
|
6
|
+
const product_renew_request_dto_1 = require("../dtos/product/requests/product-renew-request.dto");
|
|
7
|
+
/**
|
|
8
|
+
* Validates a product renew request object.
|
|
9
|
+
*
|
|
10
|
+
* @param {Record<string, unknown>} plainObject - The plain object to validate.
|
|
11
|
+
* @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
|
|
12
|
+
*/
|
|
13
|
+
const validateProductRenewRequestDto = async (plainObject) => {
|
|
14
|
+
const request = (0, class_transformer_1.plainToInstance)(product_renew_request_dto_1.ProductRenewRequestDto, plainObject);
|
|
15
|
+
return await (0, class_validator_1.validate)(request);
|
|
16
|
+
};
|
|
17
|
+
exports.validateProductRenewRequestDto = validateProductRenewRequestDto;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ValidationError } from 'class-validator';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a product suspend request object.
|
|
4
|
+
*
|
|
5
|
+
* @param {Record<string, unknown>} plainObject - The plain object to validate.
|
|
6
|
+
* @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
|
|
7
|
+
*/
|
|
8
|
+
export declare const validateProductSuspendRequestDto: (plainObject: Record<string, unknown>) => Promise<ValidationError[]>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateProductSuspendRequestDto = void 0;
|
|
4
|
+
const class_validator_1 = require("class-validator");
|
|
5
|
+
const class_transformer_1 = require("class-transformer");
|
|
6
|
+
const product_suspend_request_dto_1 = require("../dtos/product/requests/product-suspend-request.dto");
|
|
7
|
+
/**
|
|
8
|
+
* Validates a product suspend request object.
|
|
9
|
+
*
|
|
10
|
+
* @param {Record<string, unknown>} plainObject - The plain object to validate.
|
|
11
|
+
* @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
|
|
12
|
+
*/
|
|
13
|
+
const validateProductSuspendRequestDto = async (plainObject) => {
|
|
14
|
+
const request = (0, class_transformer_1.plainToInstance)(product_suspend_request_dto_1.ProductSuspendRequestDto, plainObject);
|
|
15
|
+
return await (0, class_validator_1.validate)(request);
|
|
16
|
+
};
|
|
17
|
+
exports.validateProductSuspendRequestDto = validateProductSuspendRequestDto;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ValidationError } from 'class-validator';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a product unsuspend request object.
|
|
4
|
+
*
|
|
5
|
+
* @param {Record<string, unknown>} plainObject - The plain object to validate.
|
|
6
|
+
* @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
|
|
7
|
+
*/
|
|
8
|
+
export declare const validateProductUnsuspendRequestDto: (plainObject: Record<string, unknown>) => Promise<ValidationError[]>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateProductUnsuspendRequestDto = void 0;
|
|
4
|
+
const class_validator_1 = require("class-validator");
|
|
5
|
+
const class_transformer_1 = require("class-transformer");
|
|
6
|
+
const product_unsuspend_request_dto_1 = require("../dtos/product/requests/product-unsuspend-request.dto");
|
|
7
|
+
/**
|
|
8
|
+
* Validates a product unsuspend request object.
|
|
9
|
+
*
|
|
10
|
+
* @param {Record<string, unknown>} plainObject - The plain object to validate.
|
|
11
|
+
* @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
|
|
12
|
+
*/
|
|
13
|
+
const validateProductUnsuspendRequestDto = async (plainObject) => {
|
|
14
|
+
const request = (0, class_transformer_1.plainToInstance)(product_unsuspend_request_dto_1.ProductUnsuspendRequestDto, plainObject);
|
|
15
|
+
return await (0, class_validator_1.validate)(request);
|
|
16
|
+
};
|
|
17
|
+
exports.validateProductUnsuspendRequestDto = validateProductUnsuspendRequestDto;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ValidationError } from 'class-validator';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a product upgrade request object.
|
|
4
|
+
*
|
|
5
|
+
* @param {Record<string, unknown>} plainObject - The plain object to validate.
|
|
6
|
+
* @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
|
|
7
|
+
*/
|
|
8
|
+
export declare const validateProductUpgradeRequestDto: (plainObject: Record<string, unknown>) => Promise<ValidationError[]>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateProductUpgradeRequestDto = void 0;
|
|
4
|
+
const class_validator_1 = require("class-validator");
|
|
5
|
+
const class_transformer_1 = require("class-transformer");
|
|
6
|
+
const product_upgrade_request_dto_1 = require("../dtos/product/requests/product-upgrade-request.dto");
|
|
7
|
+
/**
|
|
8
|
+
* Validates a product upgrade request object.
|
|
9
|
+
*
|
|
10
|
+
* @param {Record<string, unknown>} plainObject - The plain object to validate.
|
|
11
|
+
* @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
|
|
12
|
+
*/
|
|
13
|
+
const validateProductUpgradeRequestDto = async (plainObject) => {
|
|
14
|
+
const request = (0, class_transformer_1.plainToInstance)(product_upgrade_request_dto_1.ProductUpgradeRequestDto, plainObject);
|
|
15
|
+
return await (0, class_validator_1.validate)(request);
|
|
16
|
+
};
|
|
17
|
+
exports.validateProductUpgradeRequestDto = validateProductUpgradeRequestDto;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ValidationError } from 'class-validator';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a product upgradeable request object.
|
|
4
|
+
*
|
|
5
|
+
* @param {Record<string, unknown>} plainObject - The plain object to validate.
|
|
6
|
+
* @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
|
|
7
|
+
*/
|
|
8
|
+
export declare const validateProductUpgradeableRequestDto: (plainObject: Record<string, unknown>) => Promise<ValidationError[]>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateProductUpgradeableRequestDto = void 0;
|
|
4
|
+
const class_validator_1 = require("class-validator");
|
|
5
|
+
const class_transformer_1 = require("class-transformer");
|
|
6
|
+
const product_upgradeable_request_dto_1 = require("../dtos/product/requests/product-upgradeable-request.dto");
|
|
7
|
+
/**
|
|
8
|
+
* Validates a product upgradeable request object.
|
|
9
|
+
*
|
|
10
|
+
* @param {Record<string, unknown>} plainObject - The plain object to validate.
|
|
11
|
+
* @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
|
|
12
|
+
*/
|
|
13
|
+
const validateProductUpgradeableRequestDto = async (plainObject) => {
|
|
14
|
+
const request = (0, class_transformer_1.plainToInstance)(product_upgradeable_request_dto_1.ProductUpgradeableRequestDto, plainObject);
|
|
15
|
+
return await (0, class_validator_1.validate)(request);
|
|
16
|
+
};
|
|
17
|
+
exports.validateProductUpgradeableRequestDto = validateProductUpgradeableRequestDto;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ValidationError } from 'class-validator';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a product validate attributes request object.
|
|
4
|
+
*
|
|
5
|
+
* @param {Record<string, unknown>} plainObject - The plain object to validate.
|
|
6
|
+
* @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
|
|
7
|
+
*/
|
|
8
|
+
export declare const validateProductValidateAttributesRequestDto: (plainObject: Record<string, unknown>) => Promise<ValidationError[]>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateProductValidateAttributesRequestDto = void 0;
|
|
4
|
+
const class_validator_1 = require("class-validator");
|
|
5
|
+
const class_transformer_1 = require("class-transformer");
|
|
6
|
+
const product_validate_attributes_request_dto_1 = require("../dtos/product/requests/product-validate-attributes-request.dto");
|
|
7
|
+
/**
|
|
8
|
+
* Validates a product validate attributes request object.
|
|
9
|
+
*
|
|
10
|
+
* @param {Record<string, unknown>} plainObject - The plain object to validate.
|
|
11
|
+
* @returns {Promise<ValidationError[]>} - A promise that resolves with an array of validation errors.
|
|
12
|
+
*/
|
|
13
|
+
const validateProductValidateAttributesRequestDto = async (plainObject) => {
|
|
14
|
+
const request = (0, class_transformer_1.plainToInstance)(product_validate_attributes_request_dto_1.ProductValidateAttributesRequestDto, plainObject);
|
|
15
|
+
return await (0, class_validator_1.validate)(request);
|
|
16
|
+
};
|
|
17
|
+
exports.validateProductValidateAttributesRequestDto = validateProductValidateAttributesRequestDto;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hosterai/types",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -8,13 +8,15 @@
|
|
|
8
8
|
"test": "jest",
|
|
9
9
|
"coverage": "jest --coverage",
|
|
10
10
|
"lint": "eslint . --ext .ts",
|
|
11
|
-
"format": "prettier --write ."
|
|
11
|
+
"format": "prettier --write .",
|
|
12
|
+
"release": "npm run build && npm publish --access public"
|
|
12
13
|
},
|
|
13
14
|
"keywords": [],
|
|
14
15
|
"author": "",
|
|
15
16
|
"license": "MIT",
|
|
16
17
|
"description": "",
|
|
17
18
|
"devDependencies": {
|
|
19
|
+
"@types/express": "^5.0.3",
|
|
18
20
|
"@types/fs-extra": "^11.0.4",
|
|
19
21
|
"@types/jest": "^30.0.0",
|
|
20
22
|
"@typescript-eslint/eslint-plugin": "^8.35.0",
|
|
@@ -35,6 +37,7 @@
|
|
|
35
37
|
"peerDependencies": {
|
|
36
38
|
"class-transformer": "^0.5.1",
|
|
37
39
|
"class-validator": "^0.14.2",
|
|
40
|
+
"express": "^5.1.0",
|
|
38
41
|
"reflect-metadata": "^0.2.2"
|
|
39
42
|
},
|
|
40
43
|
"files": [
|