@remnawave/backend-contract 2.9.30 → 2.9.31
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/actions/revoke-user-subscription.command.js +2 -2
- package/build/backend/commands/users/resolve-user.command.d.ts +0 -2
- package/build/backend/commands/users/resolve-user.command.d.ts.map +1 -1
- package/build/backend/commands/users/resolve-user.command.js +2 -4
- package/build/frontend/commands/users/actions/revoke-user-subscription.command.js +2 -2
- package/build/frontend/commands/users/resolve-user.command.js +2 -4
- package/package.json +1 -1
|
@@ -21,8 +21,8 @@ var RevokeUserSubscriptionCommand;
|
|
|
21
21
|
.describe('Optional. If true, only passwords will be revoked, without changing the short UUID (Subscription URL).')),
|
|
22
22
|
shortUuid: zod_1.z.optional(zod_1.z
|
|
23
23
|
.string()
|
|
24
|
-
.min(
|
|
25
|
-
.max(
|
|
24
|
+
.min(16)
|
|
25
|
+
.max(64)
|
|
26
26
|
.describe('Optional. If not provided, a new short UUID will be generated by Remnawave. Please note that it is strongly recommended to allow Remnawave to generate the short UUID.')),
|
|
27
27
|
}));
|
|
28
28
|
RevokeUserSubscriptionCommand.ResponseSchema = user_response_1.UserResponseSchema;
|
|
@@ -4,7 +4,6 @@ export declare namespace ResolveUserCommand {
|
|
|
4
4
|
const TSQ_url: "/api/users/resolve";
|
|
5
5
|
const endpointDetails: import("../../constants").EndpointDetails;
|
|
6
6
|
const RequestBodySchema: z.ZodObject<{
|
|
7
|
-
uuid: z.ZodOptional<z.ZodUUID>;
|
|
8
7
|
id: z.ZodOptional<z.ZodNumber>;
|
|
9
8
|
shortUuid: z.ZodOptional<z.ZodString>;
|
|
10
9
|
username: z.ZodOptional<z.ZodString>;
|
|
@@ -14,7 +13,6 @@ export declare namespace ResolveUserCommand {
|
|
|
14
13
|
id: z.ZodNumber;
|
|
15
14
|
username: z.ZodString;
|
|
16
15
|
shortUuid: z.ZodString;
|
|
17
|
-
uuid: z.ZodUUID;
|
|
18
16
|
}, z.core.$strip>;
|
|
19
17
|
}, z.core.$strip>;
|
|
20
18
|
type RequestBody = z.infer<typeof RequestBodySchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-user.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/resolve-user.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,kBAAkB,CAAC;IACzB,MAAM,GAAG,sBAAyB,CAAC;IACnC,MAAM,OAAO,sBAAM,CAAC;IAEpB,MAAM,eAAe,2CAM3B,CAAC;IAEK,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"resolve-user.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/resolve-user.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,kBAAkB,CAAC;IACzB,MAAM,GAAG,sBAAyB,CAAC;IACnC,MAAM,OAAO,sBAAM,CAAC;IAEpB,MAAM,eAAe,2CAM3B,CAAC;IAEK,MAAM,iBAAiB;;;;qBAgBzB,CAAC;IAEC,MAAM,cAAc;;;;;;qBAMzB,CAAC;IAEH,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAC5D,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -11,23 +11,21 @@ var ResolveUserCommand;
|
|
|
11
11
|
ResolveUserCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.RESOLVE, 'post', 'Resolve a user', { scope: 'resolve', kind: 'read' }, 'Resolve a user by ID, Short UUID or username. Exactly one of the fields must be provided.');
|
|
12
12
|
ResolveUserCommand.RequestBodySchema = zod_1.z
|
|
13
13
|
.object({
|
|
14
|
-
uuid: zod_1.z.uuid().optional().meta({ deprecated: true }),
|
|
15
14
|
id: zod_1.z.number().optional(),
|
|
16
15
|
shortUuid: zod_1.z.string().optional(),
|
|
17
16
|
username: zod_1.z.string().optional(),
|
|
18
17
|
})
|
|
19
18
|
.refine((data) => {
|
|
20
|
-
const provided = [data.
|
|
19
|
+
const provided = [data.id, data.shortUuid, data.username].filter((v) => v !== undefined);
|
|
21
20
|
return provided.length === 1;
|
|
22
21
|
}, {
|
|
23
|
-
error: 'Exactly one of
|
|
22
|
+
error: 'Exactly one of id, shortUuid, or username must be provided',
|
|
24
23
|
});
|
|
25
24
|
ResolveUserCommand.ResponseSchema = zod_1.z.object({
|
|
26
25
|
response: zod_1.z.object({
|
|
27
26
|
id: zod_1.z.number(),
|
|
28
27
|
username: zod_1.z.string(),
|
|
29
28
|
shortUuid: zod_1.z.string(),
|
|
30
|
-
uuid: zod_1.z.uuid().meta({ deprecated: true }),
|
|
31
29
|
}),
|
|
32
30
|
});
|
|
33
31
|
})(ResolveUserCommand || (exports.ResolveUserCommand = ResolveUserCommand = {}));
|
|
@@ -21,8 +21,8 @@ var RevokeUserSubscriptionCommand;
|
|
|
21
21
|
.describe('Optional. If true, only passwords will be revoked, without changing the short UUID (Subscription URL).')),
|
|
22
22
|
shortUuid: zod_1.z.optional(zod_1.z
|
|
23
23
|
.string()
|
|
24
|
-
.min(
|
|
25
|
-
.max(
|
|
24
|
+
.min(16)
|
|
25
|
+
.max(64)
|
|
26
26
|
.describe('Optional. If not provided, a new short UUID will be generated by Remnawave. Please note that it is strongly recommended to allow Remnawave to generate the short UUID.')),
|
|
27
27
|
}));
|
|
28
28
|
RevokeUserSubscriptionCommand.ResponseSchema = user_response_1.UserResponseSchema;
|
|
@@ -11,23 +11,21 @@ var ResolveUserCommand;
|
|
|
11
11
|
ResolveUserCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.RESOLVE, 'post', 'Resolve a user', { scope: 'resolve', kind: 'read' }, 'Resolve a user by ID, Short UUID or username. Exactly one of the fields must be provided.');
|
|
12
12
|
ResolveUserCommand.RequestBodySchema = zod_1.z
|
|
13
13
|
.object({
|
|
14
|
-
uuid: zod_1.z.uuid().optional().meta({ deprecated: true }),
|
|
15
14
|
id: zod_1.z.number().optional(),
|
|
16
15
|
shortUuid: zod_1.z.string().optional(),
|
|
17
16
|
username: zod_1.z.string().optional(),
|
|
18
17
|
})
|
|
19
18
|
.refine((data) => {
|
|
20
|
-
const provided = [data.
|
|
19
|
+
const provided = [data.id, data.shortUuid, data.username].filter((v) => v !== undefined);
|
|
21
20
|
return provided.length === 1;
|
|
22
21
|
}, {
|
|
23
|
-
error: 'Exactly one of
|
|
22
|
+
error: 'Exactly one of id, shortUuid, or username must be provided',
|
|
24
23
|
});
|
|
25
24
|
ResolveUserCommand.ResponseSchema = zod_1.z.object({
|
|
26
25
|
response: zod_1.z.object({
|
|
27
26
|
id: zod_1.z.number(),
|
|
28
27
|
username: zod_1.z.string(),
|
|
29
28
|
shortUuid: zod_1.z.string(),
|
|
30
|
-
uuid: zod_1.z.uuid().meta({ deprecated: true }),
|
|
31
29
|
}),
|
|
32
30
|
});
|
|
33
31
|
})(ResolveUserCommand || (exports.ResolveUserCommand = ResolveUserCommand = {}));
|
package/package.json
CHANGED