@remnawave/backend-contract 2.2.2 → 2.2.5
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/build/backend/api/controllers/external-squads.d.ts +13 -0
- package/build/backend/api/controllers/external-squads.d.ts.map +1 -0
- package/build/backend/api/controllers/external-squads.js +16 -0
- package/build/backend/api/controllers/index.d.ts +1 -0
- package/build/backend/api/controllers/index.d.ts.map +1 -1
- package/build/backend/api/controllers/index.js +1 -0
- package/build/backend/api/controllers/subscription-template.d.ts +4 -1
- package/build/backend/api/controllers/subscription-template.d.ts.map +1 -1
- package/build/backend/api/controllers/subscription-template.js +5 -2
- package/build/backend/api/controllers-info.d.ts +4 -0
- package/build/backend/api/controllers-info.d.ts.map +1 -1
- package/build/backend/api/controllers-info.js +4 -0
- package/build/backend/api/routes.d.ts +15 -1
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +15 -1
- package/build/backend/commands/external-squads/bulk-actions/add-users-to-external-squad.command.d.ts +33 -0
- package/build/backend/commands/external-squads/bulk-actions/add-users-to-external-squad.command.d.ts.map +1 -0
- package/build/backend/commands/external-squads/bulk-actions/add-users-to-external-squad.command.js +20 -0
- package/build/backend/commands/external-squads/bulk-actions/delete-users-from-external-squad.command.d.ts +33 -0
- package/build/backend/commands/external-squads/bulk-actions/delete-users-from-external-squad.command.d.ts.map +1 -0
- package/build/backend/commands/external-squads/bulk-actions/delete-users-from-external-squad.command.js +20 -0
- package/build/backend/commands/external-squads/bulk-actions/index.d.ts +3 -0
- package/build/backend/commands/external-squads/bulk-actions/index.d.ts.map +1 -0
- package/build/backend/commands/external-squads/bulk-actions/index.js +18 -0
- package/build/backend/commands/external-squads/create-external-squad.command.d.ts +100 -0
- package/build/backend/commands/external-squads/create-external-squad.command.d.ts.map +1 -0
- package/build/backend/commands/external-squads/create-external-squad.command.js +23 -0
- package/build/backend/commands/external-squads/delete-external-squad.command.d.ts +33 -0
- package/build/backend/commands/external-squads/delete-external-squad.command.d.ts.map +1 -0
- package/build/backend/commands/external-squads/delete-external-squad.command.js +20 -0
- package/build/backend/commands/external-squads/get-external-squad-by-uuid.d.ts +100 -0
- package/build/backend/commands/external-squads/get-external-squad-by-uuid.d.ts.map +1 -0
- package/build/backend/commands/external-squads/get-external-squad-by-uuid.js +19 -0
- package/build/backend/commands/external-squads/get-external-squads.command.d.ts +131 -0
- package/build/backend/commands/external-squads/get-external-squads.command.d.ts.map +1 -0
- package/build/backend/commands/external-squads/get-external-squads.command.js +19 -0
- package/build/backend/commands/external-squads/index.d.ts +7 -0
- package/build/backend/commands/external-squads/index.d.ts.map +1 -0
- package/build/backend/commands/external-squads/index.js +22 -0
- package/build/backend/commands/external-squads/update-external-squad.command.d.ts +128 -0
- package/build/backend/commands/external-squads/update-external-squad.command.d.ts.map +1 -0
- package/build/backend/commands/external-squads/update-external-squad.command.js +31 -0
- package/build/backend/commands/index.d.ts +1 -0
- package/build/backend/commands/index.d.ts.map +1 -1
- package/build/backend/commands/index.js +1 -0
- package/build/backend/commands/subscription-settings/get-subscription-settings.command.d.ts +33 -22
- package/build/backend/commands/subscription-settings/get-subscription-settings.command.d.ts.map +1 -1
- package/build/backend/commands/subscription-settings/update-subscription-settings.command.d.ts +60 -40
- package/build/backend/commands/subscription-settings/update-subscription-settings.command.d.ts.map +1 -1
- package/build/backend/commands/subscription-template/create-template.command.d.ts +70 -0
- package/build/backend/commands/subscription-template/create-template.command.d.ts.map +1 -0
- package/build/backend/commands/subscription-template/create-template.command.js +30 -0
- package/build/backend/commands/subscription-template/delete-subscription-template.command.d.ts +33 -0
- package/build/backend/commands/subscription-template/delete-subscription-template.command.d.ts.map +1 -0
- package/build/backend/commands/subscription-template/delete-subscription-template.command.js +20 -0
- package/build/backend/commands/subscription-template/get-template.command.d.ts +9 -11
- package/build/backend/commands/subscription-template/get-template.command.d.ts.map +1 -1
- package/build/backend/commands/subscription-template/get-template.command.js +4 -3
- package/build/backend/commands/subscription-template/get-templates.command.d.ts +79 -0
- package/build/backend/commands/subscription-template/get-templates.command.d.ts.map +1 -0
- package/build/backend/commands/subscription-template/get-templates.command.js +25 -0
- package/build/backend/commands/subscription-template/index.d.ts +3 -0
- package/build/backend/commands/subscription-template/index.d.ts.map +1 -1
- package/build/backend/commands/subscription-template/index.js +3 -0
- package/build/backend/commands/subscription-template/update-template.command.d.ts +11 -10
- package/build/backend/commands/subscription-template/update-template.command.d.ts.map +1 -1
- package/build/backend/commands/subscription-template/update-template.command.js +8 -2
- package/build/backend/commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.d.ts +7 -0
- package/build/backend/commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.d.ts.map +1 -1
- package/build/backend/commands/system/testers/test-srr-matcher.command.d.ts +54 -36
- package/build/backend/commands/system/testers/test-srr-matcher.command.d.ts.map +1 -1
- package/build/backend/commands/users/actions/disable-user.command.d.ts +5 -0
- package/build/backend/commands/users/actions/disable-user.command.d.ts.map +1 -1
- package/build/backend/commands/users/actions/enable-user.command.d.ts +5 -0
- package/build/backend/commands/users/actions/enable-user.command.d.ts.map +1 -1
- package/build/backend/commands/users/actions/reset-user-traffic.command.d.ts +5 -0
- package/build/backend/commands/users/actions/reset-user-traffic.command.d.ts.map +1 -1
- package/build/backend/commands/users/actions/revoke-user-subscription.command.d.ts +5 -0
- package/build/backend/commands/users/actions/revoke-user-subscription.command.d.ts.map +1 -1
- package/build/backend/commands/users/bulk/bulk-update-users.command.d.ts +5 -0
- package/build/backend/commands/users/bulk/bulk-update-users.command.d.ts.map +1 -1
- package/build/backend/commands/users/bulk/bulk-update-users.command.js +3 -0
- package/build/backend/commands/users/create-user.command.d.ts +8 -0
- package/build/backend/commands/users/create-user.command.d.ts.map +1 -1
- package/build/backend/commands/users/create-user.command.js +3 -0
- package/build/backend/commands/users/get-all-users.command.d.ts +7 -0
- package/build/backend/commands/users/get-all-users.command.d.ts.map +1 -1
- package/build/backend/commands/users/get-by/get-user-by-email.command.d.ts +5 -0
- package/build/backend/commands/users/get-by/get-user-by-email.command.d.ts.map +1 -1
- package/build/backend/commands/users/get-by/get-user-by-short-uuid.command.d.ts +5 -0
- package/build/backend/commands/users/get-by/get-user-by-short-uuid.command.d.ts.map +1 -1
- package/build/backend/commands/users/get-by/get-user-by-tag.command.d.ts +5 -0
- package/build/backend/commands/users/get-by/get-user-by-tag.command.d.ts.map +1 -1
- package/build/backend/commands/users/get-by/get-user-by-telegram-id.command.d.ts +5 -0
- package/build/backend/commands/users/get-by/get-user-by-telegram-id.command.d.ts.map +1 -1
- package/build/backend/commands/users/get-by/get-user-by-username.command.d.ts +5 -0
- package/build/backend/commands/users/get-by/get-user-by-username.command.d.ts.map +1 -1
- package/build/backend/commands/users/get-user-by-uuid.command.d.ts +5 -0
- package/build/backend/commands/users/get-user-by-uuid.command.d.ts.map +1 -1
- package/build/backend/commands/users/update-user.command.d.ts +10 -0
- package/build/backend/commands/users/update-user.command.d.ts.map +1 -1
- package/build/backend/commands/users/update-user.command.js +3 -0
- package/build/backend/constants/cache-keys/cache-keys.constants.d.ts +2 -0
- package/build/backend/constants/cache-keys/cache-keys.constants.d.ts.map +1 -1
- package/build/backend/constants/cache-keys/cache-keys.constants.js +1 -0
- package/build/backend/constants/errors/errors.d.ts +115 -0
- package/build/backend/constants/errors/errors.d.ts.map +1 -1
- package/build/backend/constants/errors/errors.js +115 -0
- package/build/backend/models/extended-users.schema.d.ts +3 -0
- package/build/backend/models/extended-users.schema.d.ts.map +1 -1
- package/build/backend/models/external-squad.schema.d.ts +56 -0
- package/build/backend/models/external-squad.schema.d.ts.map +1 -0
- package/build/backend/models/external-squad.schema.js +24 -0
- package/build/backend/models/index.d.ts +1 -0
- package/build/backend/models/index.d.ts.map +1 -1
- package/build/backend/models/index.js +1 -0
- package/build/backend/models/response-rules/response-rule-modifications.schema.d.ts +9 -6
- package/build/backend/models/response-rules/response-rule-modifications.schema.d.ts.map +1 -1
- package/build/backend/models/response-rules/response-rule-modifications.schema.js +8 -0
- package/build/backend/models/response-rules/response-rule.schema.d.ts +30 -20
- package/build/backend/models/response-rules/response-rule.schema.d.ts.map +1 -1
- package/build/backend/models/response-rules/response-rules-config.schema.d.ts +21 -14
- package/build/backend/models/response-rules/response-rules-config.schema.d.ts.map +1 -1
- package/build/backend/models/subscription-settings.schema.d.ts +27 -18
- package/build/backend/models/subscription-settings.schema.d.ts.map +1 -1
- package/build/backend/models/users.schema.d.ts +3 -0
- package/build/backend/models/users.schema.d.ts.map +1 -1
- package/build/backend/models/users.schema.js +1 -0
- package/build/frontend/api/controllers/external-squads.js +16 -0
- package/build/frontend/api/controllers/index.js +1 -0
- package/build/frontend/api/controllers/subscription-template.js +5 -2
- package/build/frontend/api/controllers-info.js +4 -0
- package/build/frontend/api/routes.js +15 -1
- package/build/frontend/commands/external-squads/bulk-actions/add-users-to-external-squad.command.js +20 -0
- package/build/frontend/commands/external-squads/bulk-actions/delete-users-from-external-squad.command.js +20 -0
- package/build/frontend/commands/external-squads/bulk-actions/index.js +18 -0
- package/build/frontend/commands/external-squads/create-external-squad.command.js +23 -0
- package/build/frontend/commands/external-squads/delete-external-squad.command.js +20 -0
- package/build/frontend/commands/external-squads/get-external-squad-by-uuid.js +19 -0
- package/build/frontend/commands/external-squads/get-external-squads.command.js +19 -0
- package/build/frontend/commands/external-squads/index.js +22 -0
- package/build/frontend/commands/external-squads/update-external-squad.command.js +31 -0
- package/build/frontend/commands/index.js +1 -0
- package/build/frontend/commands/subscription-template/create-template.command.js +30 -0
- package/build/frontend/commands/subscription-template/delete-subscription-template.command.js +20 -0
- package/build/frontend/commands/subscription-template/get-template.command.js +4 -3
- package/build/frontend/commands/subscription-template/get-templates.command.js +25 -0
- package/build/frontend/commands/subscription-template/index.js +3 -0
- package/build/frontend/commands/subscription-template/update-template.command.js +8 -2
- package/build/frontend/commands/users/bulk/bulk-update-users.command.js +3 -0
- package/build/frontend/commands/users/create-user.command.js +3 -0
- package/build/frontend/commands/users/update-user.command.js +3 -0
- package/build/frontend/constants/cache-keys/cache-keys.constants.js +1 -0
- package/build/frontend/constants/errors/errors.js +115 -0
- package/build/frontend/models/external-squad.schema.js +24 -0
- package/build/frontend/models/index.js +1 -0
- package/build/frontend/models/response-rules/response-rule-modifications.schema.js +8 -0
- package/build/frontend/models/users.schema.js +1 -0
- package/package.json +1 -1
|
@@ -68,7 +68,7 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
|
|
|
68
68
|
readonly SINGBOX: "SINGBOX";
|
|
69
69
|
}>;
|
|
70
70
|
responseModifications: z.ZodOptional<z.ZodObject<{
|
|
71
|
-
headers: z.ZodArray<z.ZodObject<{
|
|
71
|
+
headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
72
72
|
key: z.ZodString;
|
|
73
73
|
value: z.ZodString;
|
|
74
74
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -77,17 +77,20 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
|
|
|
77
77
|
}, {
|
|
78
78
|
value: string;
|
|
79
79
|
key: string;
|
|
80
|
-
}>, "many"
|
|
80
|
+
}>, "many">>;
|
|
81
|
+
subscriptionTemplate: z.ZodOptional<z.ZodString>;
|
|
81
82
|
}, "strip", z.ZodTypeAny, {
|
|
82
|
-
headers
|
|
83
|
+
headers?: {
|
|
83
84
|
value: string;
|
|
84
85
|
key: string;
|
|
85
|
-
}[];
|
|
86
|
+
}[] | undefined;
|
|
87
|
+
subscriptionTemplate?: string | undefined;
|
|
86
88
|
}, {
|
|
87
|
-
headers
|
|
89
|
+
headers?: {
|
|
88
90
|
value: string;
|
|
89
91
|
key: string;
|
|
90
|
-
}[];
|
|
92
|
+
}[] | undefined;
|
|
93
|
+
subscriptionTemplate?: string | undefined;
|
|
91
94
|
}>>;
|
|
92
95
|
}, "strip", z.ZodTypeAny, {
|
|
93
96
|
name: string;
|
|
@@ -102,10 +105,11 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
|
|
|
102
105
|
responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
|
|
103
106
|
description?: string | undefined;
|
|
104
107
|
responseModifications?: {
|
|
105
|
-
headers
|
|
108
|
+
headers?: {
|
|
106
109
|
value: string;
|
|
107
110
|
key: string;
|
|
108
|
-
}[];
|
|
111
|
+
}[] | undefined;
|
|
112
|
+
subscriptionTemplate?: string | undefined;
|
|
109
113
|
} | undefined;
|
|
110
114
|
}, {
|
|
111
115
|
name: string;
|
|
@@ -120,10 +124,11 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
|
|
|
120
124
|
responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
|
|
121
125
|
description?: string | undefined;
|
|
122
126
|
responseModifications?: {
|
|
123
|
-
headers
|
|
127
|
+
headers?: {
|
|
124
128
|
value: string;
|
|
125
129
|
key: string;
|
|
126
|
-
}[];
|
|
130
|
+
}[] | undefined;
|
|
131
|
+
subscriptionTemplate?: string | undefined;
|
|
127
132
|
} | undefined;
|
|
128
133
|
}>, "many">;
|
|
129
134
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -141,10 +146,11 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
|
|
|
141
146
|
responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
|
|
142
147
|
description?: string | undefined;
|
|
143
148
|
responseModifications?: {
|
|
144
|
-
headers
|
|
149
|
+
headers?: {
|
|
145
150
|
value: string;
|
|
146
151
|
key: string;
|
|
147
|
-
}[];
|
|
152
|
+
}[] | undefined;
|
|
153
|
+
subscriptionTemplate?: string | undefined;
|
|
148
154
|
} | undefined;
|
|
149
155
|
}[];
|
|
150
156
|
}, {
|
|
@@ -162,10 +168,11 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
|
|
|
162
168
|
responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
|
|
163
169
|
description?: string | undefined;
|
|
164
170
|
responseModifications?: {
|
|
165
|
-
headers
|
|
171
|
+
headers?: {
|
|
166
172
|
value: string;
|
|
167
173
|
key: string;
|
|
168
|
-
}[];
|
|
174
|
+
}[] | undefined;
|
|
175
|
+
subscriptionTemplate?: string | undefined;
|
|
169
176
|
} | undefined;
|
|
170
177
|
}[];
|
|
171
178
|
}>>;
|
|
@@ -204,10 +211,11 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
|
|
|
204
211
|
responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
|
|
205
212
|
description?: string | undefined;
|
|
206
213
|
responseModifications?: {
|
|
207
|
-
headers
|
|
214
|
+
headers?: {
|
|
208
215
|
value: string;
|
|
209
216
|
key: string;
|
|
210
|
-
}[];
|
|
217
|
+
}[] | undefined;
|
|
218
|
+
subscriptionTemplate?: string | undefined;
|
|
211
219
|
} | undefined;
|
|
212
220
|
}[];
|
|
213
221
|
} | null;
|
|
@@ -244,10 +252,11 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
|
|
|
244
252
|
responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
|
|
245
253
|
description?: string | undefined;
|
|
246
254
|
responseModifications?: {
|
|
247
|
-
headers
|
|
255
|
+
headers?: {
|
|
248
256
|
value: string;
|
|
249
257
|
key: string;
|
|
250
|
-
}[];
|
|
258
|
+
}[] | undefined;
|
|
259
|
+
subscriptionTemplate?: string | undefined;
|
|
251
260
|
} | undefined;
|
|
252
261
|
}[];
|
|
253
262
|
} | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription-settings.schema.d.ts","sourceRoot":"","sources":["../../../models/subscription-settings.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"subscription-settings.schema.d.ts","sourceRoot":"","sources":["../../../models/subscription-settings.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCrC,CAAC"}
|
|
@@ -46,6 +46,7 @@ export declare const UsersSchema: z.ZodObject<{
|
|
|
46
46
|
uuid: string;
|
|
47
47
|
name: string;
|
|
48
48
|
}>, "many">;
|
|
49
|
+
externalSquadUuid: z.ZodNullable<z.ZodString>;
|
|
49
50
|
}, "strip", z.ZodTypeAny, {
|
|
50
51
|
status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
|
51
52
|
uuid: string;
|
|
@@ -77,6 +78,7 @@ export declare const UsersSchema: z.ZodObject<{
|
|
|
77
78
|
uuid: string;
|
|
78
79
|
name: string;
|
|
79
80
|
}[];
|
|
81
|
+
externalSquadUuid: string | null;
|
|
80
82
|
}, {
|
|
81
83
|
uuid: string;
|
|
82
84
|
createdAt: string;
|
|
@@ -104,6 +106,7 @@ export declare const UsersSchema: z.ZodObject<{
|
|
|
104
106
|
uuid: string;
|
|
105
107
|
name: string;
|
|
106
108
|
}[];
|
|
109
|
+
externalSquadUuid: string | null;
|
|
107
110
|
status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
|
|
108
111
|
trafficLimitBytes?: number | undefined;
|
|
109
112
|
trafficLimitStrategy?: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.schema.d.ts","sourceRoot":"","sources":["../../../models/users.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"users.schema.d.ts","sourceRoot":"","sources":["../../../models/users.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgFtB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EXTERNAL_SQUADS_ROUTES = exports.EXTERNAL_SQUADS_CONTROLLER = void 0;
|
|
4
|
+
exports.EXTERNAL_SQUADS_CONTROLLER = 'external-squads';
|
|
5
|
+
const BULK_ACTIONS_ROUTE = 'bulk-actions';
|
|
6
|
+
exports.EXTERNAL_SQUADS_ROUTES = {
|
|
7
|
+
GET: '', // Get list of all external squads // get
|
|
8
|
+
CREATE: '', // Create new external squad // post
|
|
9
|
+
UPDATE: '', // Update external squad by uuid // patch
|
|
10
|
+
GET_BY_UUID: (uuid) => `${uuid}`, // Get external squad by uuid // get
|
|
11
|
+
DELETE: (uuid) => `${uuid}`, // Delete external squad by uuid // delete
|
|
12
|
+
BULK_ACTIONS: {
|
|
13
|
+
ADD_USERS: (uuid) => `${uuid}/${BULK_ACTIONS_ROUTE}/add-users`, // Add users to external squad // post
|
|
14
|
+
REMOVE_USERS: (uuid) => `${uuid}/${BULK_ACTIONS_ROUTE}/remove-users`, // Remove users from external squad // delete
|
|
15
|
+
},
|
|
16
|
+
};
|
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./api-tokens"), exports);
|
|
18
18
|
__exportStar(require("./auth"), exports);
|
|
19
19
|
__exportStar(require("./config-profiles"), exports);
|
|
20
|
+
__exportStar(require("./external-squads"), exports);
|
|
20
21
|
__exportStar(require("./hosts"), exports);
|
|
21
22
|
__exportStar(require("./hwid"), exports);
|
|
22
23
|
__exportStar(require("./infra-billing"), exports);
|
|
@@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SUBSCRIPTION_TEMPLATE_ROUTES = exports.SUBSCRIPTION_TEMPLATE_CONTROLLER = void 0;
|
|
4
4
|
exports.SUBSCRIPTION_TEMPLATE_CONTROLLER = 'subscription-templates';
|
|
5
5
|
exports.SUBSCRIPTION_TEMPLATE_ROUTES = {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
GET_ALL: '', // get
|
|
7
|
+
GET: (uuid) => `${uuid}`, // get
|
|
8
|
+
UPDATE: '', // patch
|
|
9
|
+
DELETE: (uuid) => `${uuid}`, // delete
|
|
10
|
+
CREATE: '', // post
|
|
8
11
|
};
|
|
@@ -42,6 +42,10 @@ exports.CONTROLLERS_INFO = {
|
|
|
42
42
|
tag: 'Internal Squads Controller',
|
|
43
43
|
description: 'Management of Internal Squads.',
|
|
44
44
|
},
|
|
45
|
+
EXTERNAL_SQUADS: {
|
|
46
|
+
tag: 'External Squads Controller',
|
|
47
|
+
description: 'Management of External Squads.',
|
|
48
|
+
},
|
|
45
49
|
NODES: {
|
|
46
50
|
tag: 'Nodes Controller',
|
|
47
51
|
description: '',
|
|
@@ -160,8 +160,11 @@ exports.REST_API = {
|
|
|
160
160
|
},
|
|
161
161
|
},
|
|
162
162
|
SUBSCRIPTION_TEMPLATE: {
|
|
163
|
-
GET: (
|
|
163
|
+
GET: (uuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_ROUTES.GET(uuid)}`,
|
|
164
164
|
UPDATE: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_ROUTES.UPDATE}`,
|
|
165
|
+
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_ROUTES.DELETE(uuid)}`,
|
|
166
|
+
GET_ALL: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_ROUTES.GET_ALL}`,
|
|
167
|
+
CREATE: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_ROUTES.CREATE}`,
|
|
165
168
|
},
|
|
166
169
|
SUBSCRIPTION_SETTINGS: {
|
|
167
170
|
GET: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_ROUTES.GET}`,
|
|
@@ -229,4 +232,15 @@ exports.REST_API = {
|
|
|
229
232
|
UPDATE: `${exports.ROOT}/${CONTROLLERS.SNIPPETS_CONTROLLER}/${CONTROLLERS.SNIPPETS_ROUTES.UPDATE}`,
|
|
230
233
|
DELETE: `${exports.ROOT}/${CONTROLLERS.SNIPPETS_CONTROLLER}/${CONTROLLERS.SNIPPETS_ROUTES.DELETE}`,
|
|
231
234
|
},
|
|
235
|
+
EXTERNAL_SQUADS: {
|
|
236
|
+
GET: `${exports.ROOT}/${CONTROLLERS.EXTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.EXTERNAL_SQUADS_ROUTES.GET}`,
|
|
237
|
+
CREATE: `${exports.ROOT}/${CONTROLLERS.EXTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.EXTERNAL_SQUADS_ROUTES.CREATE}`,
|
|
238
|
+
UPDATE: `${exports.ROOT}/${CONTROLLERS.EXTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.EXTERNAL_SQUADS_ROUTES.UPDATE}`,
|
|
239
|
+
GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.EXTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.EXTERNAL_SQUADS_ROUTES.GET_BY_UUID(uuid)}`,
|
|
240
|
+
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.EXTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.EXTERNAL_SQUADS_ROUTES.DELETE(uuid)}`,
|
|
241
|
+
BULK_ACTIONS: {
|
|
242
|
+
ADD_USERS: (uuid) => `${exports.ROOT}/${CONTROLLERS.EXTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.EXTERNAL_SQUADS_ROUTES.BULK_ACTIONS.ADD_USERS(uuid)}`,
|
|
243
|
+
REMOVE_USERS: (uuid) => `${exports.ROOT}/${CONTROLLERS.EXTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.EXTERNAL_SQUADS_ROUTES.BULK_ACTIONS.REMOVE_USERS(uuid)}`,
|
|
244
|
+
},
|
|
245
|
+
},
|
|
232
246
|
};
|
package/build/frontend/commands/external-squads/bulk-actions/add-users-to-external-squad.command.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AddUsersToExternalSquadCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../../api");
|
|
6
|
+
const constants_1 = require("../../../constants");
|
|
7
|
+
var AddUsersToExternalSquadCommand;
|
|
8
|
+
(function (AddUsersToExternalSquadCommand) {
|
|
9
|
+
AddUsersToExternalSquadCommand.url = api_1.REST_API.EXTERNAL_SQUADS.BULK_ACTIONS.ADD_USERS;
|
|
10
|
+
AddUsersToExternalSquadCommand.TSQ_url = AddUsersToExternalSquadCommand.url(':uuid');
|
|
11
|
+
AddUsersToExternalSquadCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.EXTERNAL_SQUADS_ROUTES.BULK_ACTIONS.ADD_USERS(':uuid'), 'post', 'Add all users to external squad');
|
|
12
|
+
AddUsersToExternalSquadCommand.RequestSchema = zod_1.z.object({
|
|
13
|
+
uuid: zod_1.z.string().uuid(),
|
|
14
|
+
});
|
|
15
|
+
AddUsersToExternalSquadCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
response: zod_1.z.object({
|
|
17
|
+
eventSent: zod_1.z.boolean(),
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
})(AddUsersToExternalSquadCommand || (exports.AddUsersToExternalSquadCommand = AddUsersToExternalSquadCommand = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteUsersFromExternalSquadCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../../api");
|
|
6
|
+
const constants_1 = require("../../../constants");
|
|
7
|
+
var DeleteUsersFromExternalSquadCommand;
|
|
8
|
+
(function (DeleteUsersFromExternalSquadCommand) {
|
|
9
|
+
DeleteUsersFromExternalSquadCommand.url = api_1.REST_API.EXTERNAL_SQUADS.BULK_ACTIONS.REMOVE_USERS;
|
|
10
|
+
DeleteUsersFromExternalSquadCommand.TSQ_url = DeleteUsersFromExternalSquadCommand.url(':uuid');
|
|
11
|
+
DeleteUsersFromExternalSquadCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.EXTERNAL_SQUADS_ROUTES.BULK_ACTIONS.REMOVE_USERS(':uuid'), 'delete', 'Delete users from external squad');
|
|
12
|
+
DeleteUsersFromExternalSquadCommand.RequestSchema = zod_1.z.object({
|
|
13
|
+
uuid: zod_1.z.string().uuid(),
|
|
14
|
+
});
|
|
15
|
+
DeleteUsersFromExternalSquadCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
response: zod_1.z.object({
|
|
17
|
+
eventSent: zod_1.z.boolean(),
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
})(DeleteUsersFromExternalSquadCommand || (exports.DeleteUsersFromExternalSquadCommand = DeleteUsersFromExternalSquadCommand = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./add-users-to-external-squad.command"), exports);
|
|
18
|
+
__exportStar(require("./delete-users-from-external-squad.command"), exports);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateExternalSquadCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
const models_1 = require("../../models");
|
|
8
|
+
var CreateExternalSquadCommand;
|
|
9
|
+
(function (CreateExternalSquadCommand) {
|
|
10
|
+
CreateExternalSquadCommand.url = api_1.REST_API.EXTERNAL_SQUADS.CREATE;
|
|
11
|
+
CreateExternalSquadCommand.TSQ_url = CreateExternalSquadCommand.url;
|
|
12
|
+
CreateExternalSquadCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.EXTERNAL_SQUADS_ROUTES.CREATE, 'post', 'Create external squad');
|
|
13
|
+
CreateExternalSquadCommand.RequestSchema = zod_1.z.object({
|
|
14
|
+
name: zod_1.z
|
|
15
|
+
.string()
|
|
16
|
+
.min(2, 'Name must be at least 2 characters')
|
|
17
|
+
.max(30, 'Name must be less than 30 characters')
|
|
18
|
+
.regex(/^[A-Za-z0-9_\s-]+$/, 'Name can only contain letters, numbers, underscores, dashes and spaces'),
|
|
19
|
+
});
|
|
20
|
+
CreateExternalSquadCommand.ResponseSchema = zod_1.z.object({
|
|
21
|
+
response: models_1.ExternalSquadSchema,
|
|
22
|
+
});
|
|
23
|
+
})(CreateExternalSquadCommand || (exports.CreateExternalSquadCommand = CreateExternalSquadCommand = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteExternalSquadCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
var DeleteExternalSquadCommand;
|
|
8
|
+
(function (DeleteExternalSquadCommand) {
|
|
9
|
+
DeleteExternalSquadCommand.url = api_1.REST_API.EXTERNAL_SQUADS.DELETE;
|
|
10
|
+
DeleteExternalSquadCommand.TSQ_url = DeleteExternalSquadCommand.url(':uuid');
|
|
11
|
+
DeleteExternalSquadCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.EXTERNAL_SQUADS_ROUTES.DELETE(':uuid'), 'delete', 'Delete external squad');
|
|
12
|
+
DeleteExternalSquadCommand.RequestSchema = zod_1.z.object({
|
|
13
|
+
uuid: zod_1.z.string().uuid(),
|
|
14
|
+
});
|
|
15
|
+
DeleteExternalSquadCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
response: zod_1.z.object({
|
|
17
|
+
isDeleted: zod_1.z.boolean(),
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
})(DeleteExternalSquadCommand || (exports.DeleteExternalSquadCommand = DeleteExternalSquadCommand = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetExternalSquadByUuidCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
const models_1 = require("../../models");
|
|
8
|
+
var GetExternalSquadByUuidCommand;
|
|
9
|
+
(function (GetExternalSquadByUuidCommand) {
|
|
10
|
+
GetExternalSquadByUuidCommand.url = api_1.REST_API.EXTERNAL_SQUADS.GET_BY_UUID;
|
|
11
|
+
GetExternalSquadByUuidCommand.TSQ_url = GetExternalSquadByUuidCommand.url(':uuid');
|
|
12
|
+
GetExternalSquadByUuidCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.EXTERNAL_SQUADS_ROUTES.GET_BY_UUID(':uuid'), 'get', 'Get external squad by uuid');
|
|
13
|
+
GetExternalSquadByUuidCommand.RequestSchema = zod_1.z.object({
|
|
14
|
+
uuid: zod_1.z.string().uuid(),
|
|
15
|
+
});
|
|
16
|
+
GetExternalSquadByUuidCommand.ResponseSchema = zod_1.z.object({
|
|
17
|
+
response: models_1.ExternalSquadSchema,
|
|
18
|
+
});
|
|
19
|
+
})(GetExternalSquadByUuidCommand || (exports.GetExternalSquadByUuidCommand = GetExternalSquadByUuidCommand = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetExternalSquadsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
const models_1 = require("../../models");
|
|
8
|
+
var GetExternalSquadsCommand;
|
|
9
|
+
(function (GetExternalSquadsCommand) {
|
|
10
|
+
GetExternalSquadsCommand.url = api_1.REST_API.EXTERNAL_SQUADS.GET;
|
|
11
|
+
GetExternalSquadsCommand.TSQ_url = GetExternalSquadsCommand.url;
|
|
12
|
+
GetExternalSquadsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.EXTERNAL_SQUADS_ROUTES.GET, 'get', 'Get all external squads');
|
|
13
|
+
GetExternalSquadsCommand.ResponseSchema = zod_1.z.object({
|
|
14
|
+
response: zod_1.z.object({
|
|
15
|
+
total: zod_1.z.number(),
|
|
16
|
+
externalSquads: zod_1.z.array(models_1.ExternalSquadSchema),
|
|
17
|
+
}),
|
|
18
|
+
});
|
|
19
|
+
})(GetExternalSquadsCommand || (exports.GetExternalSquadsCommand = GetExternalSquadsCommand = {}));
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./bulk-actions"), exports);
|
|
18
|
+
__exportStar(require("./create-external-squad.command"), exports);
|
|
19
|
+
__exportStar(require("./delete-external-squad.command"), exports);
|
|
20
|
+
__exportStar(require("./get-external-squad-by-uuid"), exports);
|
|
21
|
+
__exportStar(require("./get-external-squads.command"), exports);
|
|
22
|
+
__exportStar(require("./update-external-squad.command"), exports);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateExternalSquadCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const api_1 = require("../../api");
|
|
7
|
+
const models_1 = require("../../models");
|
|
8
|
+
var UpdateExternalSquadCommand;
|
|
9
|
+
(function (UpdateExternalSquadCommand) {
|
|
10
|
+
UpdateExternalSquadCommand.url = api_1.REST_API.EXTERNAL_SQUADS.UPDATE;
|
|
11
|
+
UpdateExternalSquadCommand.TSQ_url = UpdateExternalSquadCommand.url;
|
|
12
|
+
UpdateExternalSquadCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.EXTERNAL_SQUADS_ROUTES.UPDATE, 'patch', 'Update external squad');
|
|
13
|
+
UpdateExternalSquadCommand.RequestSchema = zod_1.z.object({
|
|
14
|
+
uuid: zod_1.z.string().uuid(),
|
|
15
|
+
name: zod_1.z
|
|
16
|
+
.string()
|
|
17
|
+
.min(2, 'Name must be at least 2 characters')
|
|
18
|
+
.max(30, 'Name must be less than 30 characters')
|
|
19
|
+
.regex(/^[A-Za-z0-9_\s-]+$/, 'Name can only contain letters, numbers, underscores, dashes and spaces')
|
|
20
|
+
.optional(),
|
|
21
|
+
templates: zod_1.z
|
|
22
|
+
.array(zod_1.z.object({
|
|
23
|
+
templateUuid: zod_1.z.string().uuid(),
|
|
24
|
+
templateType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE),
|
|
25
|
+
}))
|
|
26
|
+
.optional(),
|
|
27
|
+
});
|
|
28
|
+
UpdateExternalSquadCommand.ResponseSchema = zod_1.z.object({
|
|
29
|
+
response: models_1.ExternalSquadSchema,
|
|
30
|
+
});
|
|
31
|
+
})(UpdateExternalSquadCommand || (exports.UpdateExternalSquadCommand = UpdateExternalSquadCommand = {}));
|
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./api-tokens"), exports);
|
|
18
18
|
__exportStar(require("./auth"), exports);
|
|
19
19
|
__exportStar(require("./config-profiles"), exports);
|
|
20
|
+
__exportStar(require("./external-squads"), exports);
|
|
20
21
|
__exportStar(require("./hosts"), exports);
|
|
21
22
|
__exportStar(require("./hwid"), exports);
|
|
22
23
|
__exportStar(require("./infra-billing"), exports);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateSubscriptionTemplateCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
const constants_2 = require("../../constants");
|
|
8
|
+
var CreateSubscriptionTemplateCommand;
|
|
9
|
+
(function (CreateSubscriptionTemplateCommand) {
|
|
10
|
+
CreateSubscriptionTemplateCommand.url = api_1.REST_API.SUBSCRIPTION_TEMPLATE.CREATE;
|
|
11
|
+
CreateSubscriptionTemplateCommand.TSQ_url = CreateSubscriptionTemplateCommand.url;
|
|
12
|
+
CreateSubscriptionTemplateCommand.endpointDetails = (0, constants_2.getEndpointDetails)(api_1.SUBSCRIPTION_TEMPLATE_ROUTES.CREATE, 'post', 'Create subscription template');
|
|
13
|
+
CreateSubscriptionTemplateCommand.RequestSchema = zod_1.z.object({
|
|
14
|
+
name: zod_1.z
|
|
15
|
+
.string()
|
|
16
|
+
.min(2, 'Name must be at least 2 characters')
|
|
17
|
+
.max(255, 'Name must be less than 255 characters')
|
|
18
|
+
.regex(/^[A-Za-z0-9_\s-]+$/, 'Name can only contain letters, numbers, underscores, dashes and spaces'),
|
|
19
|
+
templateType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE),
|
|
20
|
+
});
|
|
21
|
+
CreateSubscriptionTemplateCommand.ResponseSchema = zod_1.z.object({
|
|
22
|
+
response: zod_1.z.object({
|
|
23
|
+
uuid: zod_1.z.string().uuid(),
|
|
24
|
+
name: zod_1.z.string(),
|
|
25
|
+
templateType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE),
|
|
26
|
+
templateJson: zod_1.z.nullable(zod_1.z.unknown()),
|
|
27
|
+
encodedTemplateYaml: zod_1.z.nullable(zod_1.z.string()),
|
|
28
|
+
}),
|
|
29
|
+
});
|
|
30
|
+
})(CreateSubscriptionTemplateCommand || (exports.CreateSubscriptionTemplateCommand = CreateSubscriptionTemplateCommand = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteSubscriptionTemplateCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
var DeleteSubscriptionTemplateCommand;
|
|
8
|
+
(function (DeleteSubscriptionTemplateCommand) {
|
|
9
|
+
DeleteSubscriptionTemplateCommand.url = api_1.REST_API.SUBSCRIPTION_TEMPLATE.DELETE;
|
|
10
|
+
DeleteSubscriptionTemplateCommand.TSQ_url = DeleteSubscriptionTemplateCommand.url(':uuid');
|
|
11
|
+
DeleteSubscriptionTemplateCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTION_TEMPLATE_ROUTES.DELETE(':uuid'), 'delete', 'Delete subscription template');
|
|
12
|
+
DeleteSubscriptionTemplateCommand.RequestSchema = zod_1.z.object({
|
|
13
|
+
uuid: zod_1.z.string().uuid(),
|
|
14
|
+
});
|
|
15
|
+
DeleteSubscriptionTemplateCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
response: zod_1.z.object({
|
|
17
|
+
isDeleted: zod_1.z.boolean(),
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
})(DeleteSubscriptionTemplateCommand || (exports.DeleteSubscriptionTemplateCommand = DeleteSubscriptionTemplateCommand = {}));
|
|
@@ -8,14 +8,15 @@ const constants_2 = require("../../constants");
|
|
|
8
8
|
var GetSubscriptionTemplateCommand;
|
|
9
9
|
(function (GetSubscriptionTemplateCommand) {
|
|
10
10
|
GetSubscriptionTemplateCommand.url = api_1.REST_API.SUBSCRIPTION_TEMPLATE.GET;
|
|
11
|
-
GetSubscriptionTemplateCommand.TSQ_url = GetSubscriptionTemplateCommand.url(':
|
|
12
|
-
GetSubscriptionTemplateCommand.endpointDetails = (0, constants_2.getEndpointDetails)(api_1.SUBSCRIPTION_TEMPLATE_ROUTES.GET(':
|
|
11
|
+
GetSubscriptionTemplateCommand.TSQ_url = GetSubscriptionTemplateCommand.url(':uuid');
|
|
12
|
+
GetSubscriptionTemplateCommand.endpointDetails = (0, constants_2.getEndpointDetails)(api_1.SUBSCRIPTION_TEMPLATE_ROUTES.GET(':uuid'), 'get', 'Get subscription template by uuid');
|
|
13
13
|
GetSubscriptionTemplateCommand.RequestSchema = zod_1.z.object({
|
|
14
|
-
|
|
14
|
+
uuid: zod_1.z.string().uuid(),
|
|
15
15
|
});
|
|
16
16
|
GetSubscriptionTemplateCommand.ResponseSchema = zod_1.z.object({
|
|
17
17
|
response: zod_1.z.object({
|
|
18
18
|
uuid: zod_1.z.string().uuid(),
|
|
19
|
+
name: zod_1.z.string(),
|
|
19
20
|
templateType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE),
|
|
20
21
|
templateJson: zod_1.z.nullable(zod_1.z.unknown()),
|
|
21
22
|
encodedTemplateYaml: zod_1.z.nullable(zod_1.z.string()),
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetSubscriptionTemplatesCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
const constants_2 = require("../../constants");
|
|
8
|
+
var GetSubscriptionTemplatesCommand;
|
|
9
|
+
(function (GetSubscriptionTemplatesCommand) {
|
|
10
|
+
GetSubscriptionTemplatesCommand.url = api_1.REST_API.SUBSCRIPTION_TEMPLATE.GET_ALL;
|
|
11
|
+
GetSubscriptionTemplatesCommand.TSQ_url = GetSubscriptionTemplatesCommand.url;
|
|
12
|
+
GetSubscriptionTemplatesCommand.endpointDetails = (0, constants_2.getEndpointDetails)(api_1.SUBSCRIPTION_TEMPLATE_ROUTES.GET_ALL, 'get', 'Get all subscription templates (wihout content)');
|
|
13
|
+
GetSubscriptionTemplatesCommand.ResponseSchema = zod_1.z.object({
|
|
14
|
+
response: zod_1.z.object({
|
|
15
|
+
total: zod_1.z.number(),
|
|
16
|
+
templates: zod_1.z.array(zod_1.z.object({
|
|
17
|
+
uuid: zod_1.z.string().uuid(),
|
|
18
|
+
name: zod_1.z.string(),
|
|
19
|
+
templateType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE),
|
|
20
|
+
templateJson: zod_1.z.nullable(zod_1.z.unknown()),
|
|
21
|
+
encodedTemplateYaml: zod_1.z.nullable(zod_1.z.string()),
|
|
22
|
+
})),
|
|
23
|
+
}),
|
|
24
|
+
});
|
|
25
|
+
})(GetSubscriptionTemplatesCommand || (exports.GetSubscriptionTemplatesCommand = GetSubscriptionTemplatesCommand = {}));
|
|
@@ -14,5 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./create-template.command"), exports);
|
|
18
|
+
__exportStar(require("./delete-subscription-template.command"), exports);
|
|
17
19
|
__exportStar(require("./get-template.command"), exports);
|
|
20
|
+
__exportStar(require("./get-templates.command"), exports);
|
|
18
21
|
__exportStar(require("./update-template.command"), exports);
|
|
@@ -9,15 +9,21 @@ var UpdateSubscriptionTemplateCommand;
|
|
|
9
9
|
(function (UpdateSubscriptionTemplateCommand) {
|
|
10
10
|
UpdateSubscriptionTemplateCommand.url = api_1.REST_API.SUBSCRIPTION_TEMPLATE.UPDATE;
|
|
11
11
|
UpdateSubscriptionTemplateCommand.TSQ_url = UpdateSubscriptionTemplateCommand.url;
|
|
12
|
-
UpdateSubscriptionTemplateCommand.endpointDetails = (0, constants_2.getEndpointDetails)(api_1.SUBSCRIPTION_TEMPLATE_ROUTES.UPDATE, '
|
|
12
|
+
UpdateSubscriptionTemplateCommand.endpointDetails = (0, constants_2.getEndpointDetails)(api_1.SUBSCRIPTION_TEMPLATE_ROUTES.UPDATE, 'patch', 'Update subscription template');
|
|
13
13
|
UpdateSubscriptionTemplateCommand.RequestSchema = zod_1.z.object({
|
|
14
|
-
|
|
14
|
+
uuid: zod_1.z.string().uuid(),
|
|
15
|
+
name: zod_1.z
|
|
16
|
+
.string()
|
|
17
|
+
.min(2, 'Name must be at least 2 characters')
|
|
18
|
+
.max(255, 'Name must be less than 255 characters')
|
|
19
|
+
.regex(/^[A-Za-z0-9_\s-]+$/, 'Name can only contain letters, numbers, underscores, dashes and spaces'),
|
|
15
20
|
templateJson: zod_1.z.optional(zod_1.z.object({}).passthrough()),
|
|
16
21
|
encodedTemplateYaml: zod_1.z.optional(zod_1.z.string()),
|
|
17
22
|
});
|
|
18
23
|
UpdateSubscriptionTemplateCommand.ResponseSchema = zod_1.z.object({
|
|
19
24
|
response: zod_1.z.object({
|
|
20
25
|
uuid: zod_1.z.string().uuid(),
|
|
26
|
+
name: zod_1.z.string(),
|
|
21
27
|
templateType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE),
|
|
22
28
|
templateJson: zod_1.z.nullable(zod_1.z.unknown()),
|
|
23
29
|
encodedTemplateYaml: zod_1.z.nullable(zod_1.z.string()),
|
|
@@ -44,6 +44,9 @@ var BulkUpdateUsersCommand;
|
|
|
44
44
|
.max(16, 'Tag must be less than 16 characters')
|
|
45
45
|
.nullable()),
|
|
46
46
|
hwidDeviceLimit: zod_1.z.optional(zod_1.z.number().int().min(0, 'Device limit must be non-negative').nullable()),
|
|
47
|
+
externalSquadUuid: zod_1.z
|
|
48
|
+
.optional(zod_1.z.nullable(zod_1.z.string().uuid()))
|
|
49
|
+
.describe('Optional. External squad UUID.'),
|
|
47
50
|
}),
|
|
48
51
|
});
|
|
49
52
|
BulkUpdateUsersCommand.ResponseSchema = zod_1.z.object({
|
|
@@ -130,6 +130,9 @@ var CreateUserCommand;
|
|
|
130
130
|
.string()
|
|
131
131
|
.uuid()
|
|
132
132
|
.describe('Optional. Pass UUID to create user with specific UUID, otherwise it will be generated automatically.')),
|
|
133
|
+
externalSquadUuid: zod_1.z
|
|
134
|
+
.optional(zod_1.z.nullable(zod_1.z.string().uuid()))
|
|
135
|
+
.describe('Optional. External squad UUID.'),
|
|
133
136
|
});
|
|
134
137
|
CreateUserCommand.ResponseSchema = zod_1.z.object({
|
|
135
138
|
response: models_1.ExtendedUsersSchema,
|
|
@@ -69,6 +69,9 @@ var UpdateUserCommand;
|
|
|
69
69
|
invalid_type_error: 'Enabled internal squads must be an array of UUIDs',
|
|
70
70
|
})
|
|
71
71
|
.optional(),
|
|
72
|
+
externalSquadUuid: zod_1.z
|
|
73
|
+
.optional(zod_1.z.nullable(zod_1.z.string().uuid()))
|
|
74
|
+
.describe('Optional. External squad UUID.'),
|
|
72
75
|
})
|
|
73
76
|
.refine((data) => data.uuid || data.username, {
|
|
74
77
|
message: 'Either uuid or username must be provided',
|