@remnawave/backend-contract 2.2.4 → 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-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 +11 -0
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +11 -0
- 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 +11 -11
- package/build/backend/commands/subscription-settings/update-subscription-settings.command.d.ts +20 -20
- package/build/backend/commands/subscription-template/create-template.command.d.ts.map +1 -1
- package/build/backend/commands/subscription-template/create-template.command.js +5 -1
- package/build/backend/commands/subscription-template/get-templates.command.d.ts +4 -4
- package/build/backend/commands/subscription-template/update-template.command.d.ts +3 -3
- package/build/backend/commands/subscription-template/update-template.command.d.ts.map +1 -1
- package/build/backend/commands/subscription-template/update-template.command.js +5 -1
- 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 +18 -18
- 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/errors/errors.d.ts +55 -0
- package/build/backend/constants/errors/errors.d.ts.map +1 -1
- package/build/backend/constants/errors/errors.js +55 -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 +3 -3
- package/build/backend/models/response-rules/response-rule-modifications.schema.js +3 -3
- package/build/backend/models/response-rules/response-rule.schema.d.ts +10 -10
- package/build/backend/models/response-rules/response-rules-config.schema.d.ts +7 -7
- package/build/backend/models/subscription-settings.schema.d.ts +9 -9
- 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-info.js +4 -0
- package/build/frontend/api/routes.js +11 -0
- 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 +5 -1
- package/build/frontend/commands/subscription-template/update-template.command.js +5 -1
- 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/errors/errors.js +55 -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 +3 -3
- package/build/frontend/models/users.schema.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExternalSquadSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../constants");
|
|
6
|
+
exports.ExternalSquadSchema = zod_1.z.object({
|
|
7
|
+
uuid: zod_1.z.string().uuid(),
|
|
8
|
+
name: zod_1.z.string(),
|
|
9
|
+
info: zod_1.z.object({
|
|
10
|
+
membersCount: zod_1.z.number(),
|
|
11
|
+
}),
|
|
12
|
+
templates: zod_1.z.array(zod_1.z.object({
|
|
13
|
+
templateUuid: zod_1.z.string().uuid(),
|
|
14
|
+
templateType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE),
|
|
15
|
+
})),
|
|
16
|
+
createdAt: zod_1.z
|
|
17
|
+
.string()
|
|
18
|
+
.datetime()
|
|
19
|
+
.transform((str) => new Date(str)),
|
|
20
|
+
updatedAt: zod_1.z
|
|
21
|
+
.string()
|
|
22
|
+
.datetime()
|
|
23
|
+
.transform((str) => new Date(str)),
|
|
24
|
+
});
|
|
@@ -5,6 +5,7 @@ export * from './base-stat.schema';
|
|
|
5
5
|
export * from './config-profile-inbounds.schema';
|
|
6
6
|
export * from './config-profile.schema';
|
|
7
7
|
export * from './extended-users.schema';
|
|
8
|
+
export * from './external-squad.schema';
|
|
8
9
|
export * from './happ.schema';
|
|
9
10
|
export * from './hosts.schema';
|
|
10
11
|
export * from './hwid-user-device.schema';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../models/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,kCAAkC,CAAC;AACjD,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../models/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,kCAAkC,CAAC;AACjD,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC"}
|
|
@@ -21,6 +21,7 @@ __exportStar(require("./base-stat.schema"), exports);
|
|
|
21
21
|
__exportStar(require("./config-profile-inbounds.schema"), exports);
|
|
22
22
|
__exportStar(require("./config-profile.schema"), exports);
|
|
23
23
|
__exportStar(require("./extended-users.schema"), exports);
|
|
24
|
+
__exportStar(require("./external-squad.schema"), exports);
|
|
24
25
|
__exportStar(require("./happ.schema"), exports);
|
|
25
26
|
__exportStar(require("./hosts.schema"), exports);
|
|
26
27
|
__exportStar(require("./hwid-user-device.schema"), exports);
|
|
@@ -10,18 +10,18 @@ export declare const ResponseRuleModificationsSchema: z.ZodOptional<z.ZodObject<
|
|
|
10
10
|
value: string;
|
|
11
11
|
key: string;
|
|
12
12
|
}>, "many">>;
|
|
13
|
-
|
|
13
|
+
subscriptionTemplate: z.ZodOptional<z.ZodString>;
|
|
14
14
|
}, "strip", z.ZodTypeAny, {
|
|
15
15
|
headers?: {
|
|
16
16
|
value: string;
|
|
17
17
|
key: string;
|
|
18
18
|
}[] | undefined;
|
|
19
|
-
|
|
19
|
+
subscriptionTemplate?: string | undefined;
|
|
20
20
|
}, {
|
|
21
21
|
headers?: {
|
|
22
22
|
value: string;
|
|
23
23
|
key: string;
|
|
24
24
|
}[] | undefined;
|
|
25
|
-
|
|
25
|
+
subscriptionTemplate?: string | undefined;
|
|
26
26
|
}>>;
|
|
27
27
|
//# sourceMappingURL=response-rule-modifications.schema.d.ts.map
|
|
@@ -42,12 +42,12 @@ exports.ResponseRuleModificationsSchema = zod_1.default
|
|
|
42
42
|
markdownDescription: 'Array of headers to be added when the rule is matched.',
|
|
43
43
|
}))
|
|
44
44
|
.optional(),
|
|
45
|
-
|
|
45
|
+
subscriptionTemplate: zod_1.default
|
|
46
46
|
.string()
|
|
47
|
-
.min(1, '
|
|
47
|
+
.min(1, 'Subscription template name is required')
|
|
48
48
|
.optional()
|
|
49
49
|
.describe(JSON.stringify({
|
|
50
|
-
markdownDescription: 'Override the subscription template with the given name. If not provided, the default subscription template will be used. If the template name is not found, the default subscription template for this type will be used.',
|
|
50
|
+
markdownDescription: 'Override the subscription template with the given name. If not provided, the default subscription template will be used. If the template name is not found, the default subscription template for this type will be used. **This modification have higher priority than settings from External Squads.**',
|
|
51
51
|
})),
|
|
52
52
|
})
|
|
53
53
|
.optional()
|
|
@@ -58,19 +58,19 @@ export declare const ResponseRuleSchemaBase: z.ZodObject<{
|
|
|
58
58
|
value: string;
|
|
59
59
|
key: string;
|
|
60
60
|
}>, "many">>;
|
|
61
|
-
|
|
61
|
+
subscriptionTemplate: z.ZodOptional<z.ZodString>;
|
|
62
62
|
}, "strip", z.ZodTypeAny, {
|
|
63
63
|
headers?: {
|
|
64
64
|
value: string;
|
|
65
65
|
key: string;
|
|
66
66
|
}[] | undefined;
|
|
67
|
-
|
|
67
|
+
subscriptionTemplate?: string | undefined;
|
|
68
68
|
}, {
|
|
69
69
|
headers?: {
|
|
70
70
|
value: string;
|
|
71
71
|
key: string;
|
|
72
72
|
}[] | undefined;
|
|
73
|
-
|
|
73
|
+
subscriptionTemplate?: string | undefined;
|
|
74
74
|
}>>;
|
|
75
75
|
}, "strip", z.ZodTypeAny, {
|
|
76
76
|
name: string;
|
|
@@ -89,7 +89,7 @@ export declare const ResponseRuleSchemaBase: z.ZodObject<{
|
|
|
89
89
|
value: string;
|
|
90
90
|
key: string;
|
|
91
91
|
}[] | undefined;
|
|
92
|
-
|
|
92
|
+
subscriptionTemplate?: string | undefined;
|
|
93
93
|
} | undefined;
|
|
94
94
|
}, {
|
|
95
95
|
name: string;
|
|
@@ -108,7 +108,7 @@ export declare const ResponseRuleSchemaBase: z.ZodObject<{
|
|
|
108
108
|
value: string;
|
|
109
109
|
key: string;
|
|
110
110
|
}[] | undefined;
|
|
111
|
-
|
|
111
|
+
subscriptionTemplate?: string | undefined;
|
|
112
112
|
} | undefined;
|
|
113
113
|
}>;
|
|
114
114
|
export declare const ResponseRuleSchema: z.ZodObject<{
|
|
@@ -170,19 +170,19 @@ export declare const ResponseRuleSchema: z.ZodObject<{
|
|
|
170
170
|
value: string;
|
|
171
171
|
key: string;
|
|
172
172
|
}>, "many">>;
|
|
173
|
-
|
|
173
|
+
subscriptionTemplate: z.ZodOptional<z.ZodString>;
|
|
174
174
|
}, "strip", z.ZodTypeAny, {
|
|
175
175
|
headers?: {
|
|
176
176
|
value: string;
|
|
177
177
|
key: string;
|
|
178
178
|
}[] | undefined;
|
|
179
|
-
|
|
179
|
+
subscriptionTemplate?: string | undefined;
|
|
180
180
|
}, {
|
|
181
181
|
headers?: {
|
|
182
182
|
value: string;
|
|
183
183
|
key: string;
|
|
184
184
|
}[] | undefined;
|
|
185
|
-
|
|
185
|
+
subscriptionTemplate?: string | undefined;
|
|
186
186
|
}>>;
|
|
187
187
|
}, "strip", z.ZodTypeAny, {
|
|
188
188
|
name: string;
|
|
@@ -201,7 +201,7 @@ export declare const ResponseRuleSchema: z.ZodObject<{
|
|
|
201
201
|
value: string;
|
|
202
202
|
key: string;
|
|
203
203
|
}[] | undefined;
|
|
204
|
-
|
|
204
|
+
subscriptionTemplate?: string | undefined;
|
|
205
205
|
} | undefined;
|
|
206
206
|
}, {
|
|
207
207
|
name: string;
|
|
@@ -220,7 +220,7 @@ export declare const ResponseRuleSchema: z.ZodObject<{
|
|
|
220
220
|
value: string;
|
|
221
221
|
key: string;
|
|
222
222
|
}[] | undefined;
|
|
223
|
-
|
|
223
|
+
subscriptionTemplate?: string | undefined;
|
|
224
224
|
} | undefined;
|
|
225
225
|
}>;
|
|
226
226
|
//# sourceMappingURL=response-rule.schema.d.ts.map
|
|
@@ -62,19 +62,19 @@ export declare const ResponseRulesConfigSchema: z.ZodObject<{
|
|
|
62
62
|
value: string;
|
|
63
63
|
key: string;
|
|
64
64
|
}>, "many">>;
|
|
65
|
-
|
|
65
|
+
subscriptionTemplate: z.ZodOptional<z.ZodString>;
|
|
66
66
|
}, "strip", z.ZodTypeAny, {
|
|
67
67
|
headers?: {
|
|
68
68
|
value: string;
|
|
69
69
|
key: string;
|
|
70
70
|
}[] | undefined;
|
|
71
|
-
|
|
71
|
+
subscriptionTemplate?: string | undefined;
|
|
72
72
|
}, {
|
|
73
73
|
headers?: {
|
|
74
74
|
value: string;
|
|
75
75
|
key: string;
|
|
76
76
|
}[] | undefined;
|
|
77
|
-
|
|
77
|
+
subscriptionTemplate?: string | undefined;
|
|
78
78
|
}>>;
|
|
79
79
|
}, "strip", z.ZodTypeAny, {
|
|
80
80
|
name: string;
|
|
@@ -93,7 +93,7 @@ export declare const ResponseRulesConfigSchema: z.ZodObject<{
|
|
|
93
93
|
value: string;
|
|
94
94
|
key: string;
|
|
95
95
|
}[] | undefined;
|
|
96
|
-
|
|
96
|
+
subscriptionTemplate?: string | undefined;
|
|
97
97
|
} | undefined;
|
|
98
98
|
}, {
|
|
99
99
|
name: string;
|
|
@@ -112,7 +112,7 @@ export declare const ResponseRulesConfigSchema: z.ZodObject<{
|
|
|
112
112
|
value: string;
|
|
113
113
|
key: string;
|
|
114
114
|
}[] | undefined;
|
|
115
|
-
|
|
115
|
+
subscriptionTemplate?: string | undefined;
|
|
116
116
|
} | undefined;
|
|
117
117
|
}>, "many">;
|
|
118
118
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -134,7 +134,7 @@ export declare const ResponseRulesConfigSchema: z.ZodObject<{
|
|
|
134
134
|
value: string;
|
|
135
135
|
key: string;
|
|
136
136
|
}[] | undefined;
|
|
137
|
-
|
|
137
|
+
subscriptionTemplate?: string | undefined;
|
|
138
138
|
} | undefined;
|
|
139
139
|
}[];
|
|
140
140
|
}, {
|
|
@@ -156,7 +156,7 @@ export declare const ResponseRulesConfigSchema: z.ZodObject<{
|
|
|
156
156
|
value: string;
|
|
157
157
|
key: string;
|
|
158
158
|
}[] | undefined;
|
|
159
|
-
|
|
159
|
+
subscriptionTemplate?: string | undefined;
|
|
160
160
|
} | undefined;
|
|
161
161
|
}[];
|
|
162
162
|
}>;
|
|
@@ -78,19 +78,19 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
|
|
|
78
78
|
value: string;
|
|
79
79
|
key: string;
|
|
80
80
|
}>, "many">>;
|
|
81
|
-
|
|
81
|
+
subscriptionTemplate: z.ZodOptional<z.ZodString>;
|
|
82
82
|
}, "strip", z.ZodTypeAny, {
|
|
83
83
|
headers?: {
|
|
84
84
|
value: string;
|
|
85
85
|
key: string;
|
|
86
86
|
}[] | undefined;
|
|
87
|
-
|
|
87
|
+
subscriptionTemplate?: string | undefined;
|
|
88
88
|
}, {
|
|
89
89
|
headers?: {
|
|
90
90
|
value: string;
|
|
91
91
|
key: string;
|
|
92
92
|
}[] | undefined;
|
|
93
|
-
|
|
93
|
+
subscriptionTemplate?: string | undefined;
|
|
94
94
|
}>>;
|
|
95
95
|
}, "strip", z.ZodTypeAny, {
|
|
96
96
|
name: string;
|
|
@@ -109,7 +109,7 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
|
|
|
109
109
|
value: string;
|
|
110
110
|
key: string;
|
|
111
111
|
}[] | undefined;
|
|
112
|
-
|
|
112
|
+
subscriptionTemplate?: string | undefined;
|
|
113
113
|
} | undefined;
|
|
114
114
|
}, {
|
|
115
115
|
name: string;
|
|
@@ -128,7 +128,7 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
|
|
|
128
128
|
value: string;
|
|
129
129
|
key: string;
|
|
130
130
|
}[] | undefined;
|
|
131
|
-
|
|
131
|
+
subscriptionTemplate?: string | undefined;
|
|
132
132
|
} | undefined;
|
|
133
133
|
}>, "many">;
|
|
134
134
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -150,7 +150,7 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
|
|
|
150
150
|
value: string;
|
|
151
151
|
key: string;
|
|
152
152
|
}[] | undefined;
|
|
153
|
-
|
|
153
|
+
subscriptionTemplate?: string | undefined;
|
|
154
154
|
} | undefined;
|
|
155
155
|
}[];
|
|
156
156
|
}, {
|
|
@@ -172,7 +172,7 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
|
|
|
172
172
|
value: string;
|
|
173
173
|
key: string;
|
|
174
174
|
}[] | undefined;
|
|
175
|
-
|
|
175
|
+
subscriptionTemplate?: string | undefined;
|
|
176
176
|
} | undefined;
|
|
177
177
|
}[];
|
|
178
178
|
}>>;
|
|
@@ -215,7 +215,7 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
|
|
|
215
215
|
value: string;
|
|
216
216
|
key: string;
|
|
217
217
|
}[] | undefined;
|
|
218
|
-
|
|
218
|
+
subscriptionTemplate?: string | undefined;
|
|
219
219
|
} | undefined;
|
|
220
220
|
}[];
|
|
221
221
|
} | null;
|
|
@@ -256,7 +256,7 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
|
|
|
256
256
|
value: string;
|
|
257
257
|
key: string;
|
|
258
258
|
}[] | undefined;
|
|
259
|
-
|
|
259
|
+
subscriptionTemplate?: string | undefined;
|
|
260
260
|
} | undefined;
|
|
261
261
|
}[];
|
|
262
262
|
} | null;
|
|
@@ -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);
|
|
@@ -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: '',
|
|
@@ -232,4 +232,15 @@ exports.REST_API = {
|
|
|
232
232
|
UPDATE: `${exports.ROOT}/${CONTROLLERS.SNIPPETS_CONTROLLER}/${CONTROLLERS.SNIPPETS_ROUTES.UPDATE}`,
|
|
233
233
|
DELETE: `${exports.ROOT}/${CONTROLLERS.SNIPPETS_CONTROLLER}/${CONTROLLERS.SNIPPETS_ROUTES.DELETE}`,
|
|
234
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
|
+
},
|
|
235
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);
|
|
@@ -11,7 +11,11 @@ var CreateSubscriptionTemplateCommand;
|
|
|
11
11
|
CreateSubscriptionTemplateCommand.TSQ_url = CreateSubscriptionTemplateCommand.url;
|
|
12
12
|
CreateSubscriptionTemplateCommand.endpointDetails = (0, constants_2.getEndpointDetails)(api_1.SUBSCRIPTION_TEMPLATE_ROUTES.CREATE, 'post', 'Create subscription template');
|
|
13
13
|
CreateSubscriptionTemplateCommand.RequestSchema = zod_1.z.object({
|
|
14
|
-
name: zod_1.z
|
|
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'),
|
|
15
19
|
templateType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE),
|
|
16
20
|
});
|
|
17
21
|
CreateSubscriptionTemplateCommand.ResponseSchema = zod_1.z.object({
|
|
@@ -12,7 +12,11 @@ var UpdateSubscriptionTemplateCommand;
|
|
|
12
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
|
|
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'),
|
|
16
20
|
templateJson: zod_1.z.optional(zod_1.z.object({}).passthrough()),
|
|
17
21
|
encodedTemplateYaml: zod_1.z.optional(zod_1.z.string()),
|
|
18
22
|
});
|