@remnawave/backend-contract 2.9.7 → 2.9.11
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/commands/users/get-by/get-user-by-id.command.d.ts +1 -1
- package/build/backend/commands/users/get-by/get-user-by-id.command.js +1 -1
- package/build/backend/commands/users/get-users-stream.command.d.ts +1 -1
- package/build/backend/commands/users/get-users-stream.command.d.ts.map +1 -1
- package/build/backend/commands/users/get-users-stream.command.js +2 -1
- package/build/frontend/commands/users/get-by/get-user-by-id.command.js +1 -1
- package/build/frontend/commands/users/get-users-stream.command.js +2 -1
- package/build/frontend/constants/response-rules/response-rules.contants.js +8 -1
- package/build/frontend/models/response-rules/response-rule.schema.js +6 -2
- package/build/frontend/models/response-rules/response-rules-examples.js +1 -2
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ export declare namespace GetUserByIdCommand {
|
|
|
4
4
|
const TSQ_url: string;
|
|
5
5
|
const endpointDetails: import("../../../constants").EndpointDetails;
|
|
6
6
|
const RequestParamSchema: z.ZodObject<{
|
|
7
|
-
id: z.ZodPipe<z.ZodString, z.ZodTransform<
|
|
7
|
+
id: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>, z.ZodNumber>;
|
|
8
8
|
}, z.core.$strip>;
|
|
9
9
|
const ResponseSchema: z.ZodObject<{
|
|
10
10
|
response: z.ZodObject<{
|
|
@@ -11,7 +11,7 @@ var GetUserByIdCommand;
|
|
|
11
11
|
GetUserByIdCommand.TSQ_url = GetUserByIdCommand.url(':id');
|
|
12
12
|
GetUserByIdCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.GET_BY.ID(':id'), 'get', 'Get user by ID', { scope: 'by-id', kind: 'read' });
|
|
13
13
|
GetUserByIdCommand.RequestParamSchema = zod_1.z.object({
|
|
14
|
-
id: zod_1.z.string().transform(
|
|
14
|
+
id: zod_1.z.string().transform(Number).pipe(zod_1.z.number().nonnegative()),
|
|
15
15
|
});
|
|
16
16
|
GetUserByIdCommand.ResponseSchema = user_response_1.UserResponseSchema;
|
|
17
17
|
})(GetUserByIdCommand || (exports.GetUserByIdCommand = GetUserByIdCommand = {}));
|
|
@@ -19,7 +19,7 @@ export declare namespace GetUsersStreamCommand {
|
|
|
19
19
|
readonly MONTH: "MONTH";
|
|
20
20
|
readonly MONTH_ROLLING: "MONTH_ROLLING";
|
|
21
21
|
}>>;
|
|
22
|
-
telegramId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<
|
|
22
|
+
telegramId: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>, z.ZodNumber>>;
|
|
23
23
|
email: z.ZodOptional<z.ZodEmail>;
|
|
24
24
|
tag: z.ZodOptional<z.ZodString>;
|
|
25
25
|
externalSquadUuid: z.ZodOptional<z.ZodUUID>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-users-stream.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/get-users-stream.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,qBAAqB,CAAC;IAC5B,MAAM,GAAG,qBAAwB,CAAC;IAClC,MAAM,OAAO,qBAAM,CAAC;IAEpB,MAAM,eAAe,2CAK3B,CAAC;IAEK,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get-users-stream.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/get-users-stream.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,qBAAqB,CAAC;IAC5B,MAAM,GAAG,qBAAwB,CAAC;IAClC,MAAM,OAAO,qBAAM,CAAC;IAEpB,MAAM,eAAe,2CAK3B,CAAC;IAEK,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;qBA8B7B,CAAC;IAEI,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBASzB,CAAC;IAEH,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAC9D,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -30,7 +30,8 @@ var GetUsersStreamCommand;
|
|
|
30
30
|
.describe('Traffic limit strategy to filter users by'),
|
|
31
31
|
telegramId: zod_1.z
|
|
32
32
|
.string()
|
|
33
|
-
.transform(
|
|
33
|
+
.transform(Number)
|
|
34
|
+
.pipe(zod_1.z.number().nonnegative())
|
|
34
35
|
.optional()
|
|
35
36
|
.describe('Telegram ID to filter users by'),
|
|
36
37
|
email: zod_1.z.email().optional().describe('Email to filter users by'),
|
|
@@ -11,7 +11,7 @@ var GetUserByIdCommand;
|
|
|
11
11
|
GetUserByIdCommand.TSQ_url = GetUserByIdCommand.url(':id');
|
|
12
12
|
GetUserByIdCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.GET_BY.ID(':id'), 'get', 'Get user by ID', { scope: 'by-id', kind: 'read' });
|
|
13
13
|
GetUserByIdCommand.RequestParamSchema = zod_1.z.object({
|
|
14
|
-
id: zod_1.z.string().transform(
|
|
14
|
+
id: zod_1.z.string().transform(Number).pipe(zod_1.z.number().nonnegative()),
|
|
15
15
|
});
|
|
16
16
|
GetUserByIdCommand.ResponseSchema = user_response_1.UserResponseSchema;
|
|
17
17
|
})(GetUserByIdCommand || (exports.GetUserByIdCommand = GetUserByIdCommand = {}));
|
|
@@ -30,7 +30,8 @@ var GetUsersStreamCommand;
|
|
|
30
30
|
.describe('Traffic limit strategy to filter users by'),
|
|
31
31
|
telegramId: zod_1.z
|
|
32
32
|
.string()
|
|
33
|
-
.transform(
|
|
33
|
+
.transform(Number)
|
|
34
|
+
.pipe(zod_1.z.number().nonnegative())
|
|
34
35
|
.optional()
|
|
35
36
|
.describe('Telegram ID to filter users by'),
|
|
36
37
|
email: zod_1.z.email().optional().describe('Email to filter users by'),
|
|
@@ -24,7 +24,14 @@ exports.RESPONSE_RULES_CONDITION_OPERATORS = {
|
|
|
24
24
|
REGEX: 'REGEX',
|
|
25
25
|
NOT_REGEX: 'NOT_REGEX',
|
|
26
26
|
};
|
|
27
|
-
exports.RESPONSE_RULES_RESPONSE_TYPES =
|
|
27
|
+
exports.RESPONSE_RULES_RESPONSE_TYPES = {
|
|
28
|
+
...subscription_template_1.SUBSCRIPTION_TEMPLATE_TYPE,
|
|
29
|
+
BROWSER: 'BROWSER',
|
|
30
|
+
BLOCK: 'BLOCK',
|
|
31
|
+
STATUS_CODE_404: 'STATUS_CODE_404',
|
|
32
|
+
STATUS_CODE_451: 'STATUS_CODE_451',
|
|
33
|
+
SOCKET_DROP: 'SOCKET_DROP',
|
|
34
|
+
};
|
|
28
35
|
exports.RESPONSE_RULES_RESPONSE_TYPES_VALUES = Object.values(exports.RESPONSE_RULES_RESPONSE_TYPES);
|
|
29
36
|
exports.RESPONSE_RULES_CONDITION_OPERATORS_VALUES = Object.values(exports.RESPONSE_RULES_CONDITION_OPERATORS);
|
|
30
37
|
exports.RESPONSE_RULES_RESPONSE_TYPES_DESCRIPTION = {
|
|
@@ -49,12 +49,16 @@ exports.ResponseRuleSchema = exports.ResponseRuleSchemaBase.meta({
|
|
|
49
49
|
{
|
|
50
50
|
label: 'Examples: Blank rule',
|
|
51
51
|
markdownDescription: `Simple blank rule with no conditions or modifications.\n\`\`\`json\n${JSON.stringify(response_rules_examples_1.EXAMPLES_SRR_BLANK_RULE, null, 2)}\n\`\`\``,
|
|
52
|
-
body:
|
|
52
|
+
body: {
|
|
53
|
+
...response_rules_examples_1.EXAMPLES_SRR_BLANK_RULE,
|
|
54
|
+
},
|
|
53
55
|
},
|
|
54
56
|
{
|
|
55
57
|
label: 'Examples: Block Legacy Clients',
|
|
56
58
|
markdownDescription: `Block requests from legacy clients\n\`\`\`json\n${JSON.stringify(response_rules_examples_1.EXAMPLES_SRR_BLOCK_LEGACY_CLIENTS_RULE, null, 2)}\n\`\`\``,
|
|
57
|
-
body:
|
|
59
|
+
body: {
|
|
60
|
+
...response_rules_examples_1.EXAMPLES_SRR_BLOCK_LEGACY_CLIENTS_RULE,
|
|
61
|
+
},
|
|
58
62
|
},
|
|
59
63
|
],
|
|
60
64
|
});
|
|
@@ -37,8 +37,7 @@ exports.EXAMPLES_SRR_BLOCK_LEGACY_CLIENTS_RULE = {
|
|
|
37
37
|
};
|
|
38
38
|
function generateResponseRuleDescription(schema) {
|
|
39
39
|
const fields = Object.entries(schema.shape).map(([key, value]) => {
|
|
40
|
-
|
|
41
|
-
const meta = (_a = value.meta()) !== null && _a !== void 0 ? _a : {};
|
|
40
|
+
const meta = value.meta() ?? {};
|
|
42
41
|
return {
|
|
43
42
|
name: key,
|
|
44
43
|
description: meta.markdownDescription || meta.title || 'No description',
|
package/package.json
CHANGED