@remnawave/backend-contract 2.6.40 → 2.6.41
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/users.d.ts +1 -0
- package/build/backend/api/controllers/users.d.ts.map +1 -1
- package/build/backend/api/controllers/users.js +1 -0
- package/build/backend/api/routes.d.ts +1 -0
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +1 -0
- package/build/backend/commands/users/index.d.ts +1 -0
- package/build/backend/commands/users/index.d.ts.map +1 -1
- package/build/backend/commands/users/index.js +1 -0
- package/build/backend/commands/users/resolve-user.command.d.ts +87 -0
- package/build/backend/commands/users/resolve-user.command.d.ts.map +1 -0
- package/build/backend/commands/users/resolve-user.command.js +35 -0
- package/build/frontend/api/controllers/users.js +1 -0
- package/build/frontend/api/routes.js +1 -0
- package/build/frontend/commands/users/index.js +1 -0
- package/build/frontend/commands/users/resolve-user.command.js +35 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../../api/controllers/users.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,mBAAmB,EAAG,SAAkB,CAAC;AAEtD,eAAO,MAAM,YAAY;;;;4BAIN,MAAM;iCACD,MAAM;sCACD,MAAM;kDACM,MAAM;;gCAExB,MAAM;iCACL,MAAM;uCACA,MAAM;6CACA,MAAM;;;0BAGzB,MAAM;yCACS,MAAM;sCACT,MAAM;uDACW,MAAM;2CAClB,MAAM;gCACjB,MAAM;4BACV,MAAM
|
|
1
|
+
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../../api/controllers/users.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,mBAAmB,EAAG,SAAkB,CAAC;AAEtD,eAAO,MAAM,YAAY;;;;4BAIN,MAAM;iCACD,MAAM;sCACD,MAAM;kDACM,MAAM;;gCAExB,MAAM;iCACL,MAAM;uCACA,MAAM;6CACA,MAAM;;;0BAGzB,MAAM;yCACS,MAAM;sCACT,MAAM;uDACW,MAAM;2CAClB,MAAM;gCACjB,MAAM;4BACV,MAAM;;;;;;;;;;;;;;;;;;;;CAsBf,CAAC"}
|
|
@@ -78,6 +78,7 @@ export declare const REST_API: {
|
|
|
78
78
|
readonly EMAIL: (email: string) => string;
|
|
79
79
|
readonly TAG: (tag: string) => string;
|
|
80
80
|
};
|
|
81
|
+
readonly RESOLVE: "/api/users/resolve";
|
|
81
82
|
readonly BULK: {
|
|
82
83
|
readonly DELETE_BY_STATUS: "/api/users/bulk/delete-by-status";
|
|
83
84
|
readonly UPDATE: "/api/users/bulk/update";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,YAAY,EAAG,UAAmB,CAAC;AAChD,eAAO,MAAM,WAAW,EAAG,SAAkB,CAAC;AAC9C,eAAO,MAAM,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;gCAyBE,MAAM;;;;;;;;;qCAYD,MAAM;;gCAGX,MAAM;;;;;oCAOF,MAAM;qCAIL,MAAM;qCAIN,MAAM;;2CAKA,MAAM;;;;;;;;;;;;;gCAiBjB,MAAM;qCAGD,MAAM;0CAED,MAAM;sDAEM,MAAM;;qCAMvB,MAAM;oCAIP,MAAM;2CAIC,MAAM;iDAIA,MAAM;;;8BAOzB,MAAM;6CAES,MAAM;0CAIT,MAAM;2DAIW,MAAM;+CAIlB,MAAM;oCAIjB,MAAM;gCAIV,MAAM
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],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;;;yCAIJ,MAAM;;;;2CAKJ,MAAM;;;6CAIJ,MAAM;;;;;mCAMhB,MAAM;+CAEM,MAAM;;6CAGR,MAAM;qDAEE,MAAM;;;;iCAK1B,MAAM;oCAEH,MAAM;;;iCAIT,MAAM;oCAEH,MAAM;;;CAIvB,CAAC"}
|
|
@@ -115,6 +115,7 @@ exports.REST_API = {
|
|
|
115
115
|
EMAIL: (email) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY.EMAIL(email)}`,
|
|
116
116
|
TAG: (tag) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY.TAG(tag)}`,
|
|
117
117
|
},
|
|
118
|
+
RESOLVE: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.RESOLVE}`,
|
|
118
119
|
BULK: {
|
|
119
120
|
DELETE_BY_STATUS: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.BULK.DELETE_BY_STATUS}`,
|
|
120
121
|
UPDATE: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.BULK.UPDATE}`,
|
|
@@ -8,6 +8,7 @@ export * from './get-by';
|
|
|
8
8
|
export * from './get-user-accessible-nodes.command';
|
|
9
9
|
export * from './get-user-by-uuid.command';
|
|
10
10
|
export * from './get-user-subscription-request-history.command';
|
|
11
|
+
export * from './resolve-user.command';
|
|
11
12
|
export * from './tags';
|
|
12
13
|
export * from './update-user.command';
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/users/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAE3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AAEzB,cAAc,qCAAqC,CAAC;AAEpD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iDAAiD,CAAC;AAEhE,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/users/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAE3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AAEzB,cAAc,qCAAqC,CAAC;AAEpD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iDAAiD,CAAC;AAEhE,cAAc,wBAAwB,CAAC;AACvC,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC"}
|
|
@@ -24,5 +24,6 @@ __exportStar(require("./get-by"), exports);
|
|
|
24
24
|
__exportStar(require("./get-user-accessible-nodes.command"), exports);
|
|
25
25
|
__exportStar(require("./get-user-by-uuid.command"), exports);
|
|
26
26
|
__exportStar(require("./get-user-subscription-request-history.command"), exports);
|
|
27
|
+
__exportStar(require("./resolve-user.command"), exports);
|
|
27
28
|
__exportStar(require("./tags"), exports);
|
|
28
29
|
__exportStar(require("./update-user.command"), exports);
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare namespace ResolveUserCommand {
|
|
3
|
+
const url: "/api/users/resolve";
|
|
4
|
+
const TSQ_url: "/api/users/resolve";
|
|
5
|
+
const endpointDetails: import("../../constants").EndpointDetails;
|
|
6
|
+
const RequestSchema: z.ZodEffects<z.ZodObject<{
|
|
7
|
+
uuid: z.ZodOptional<z.ZodString>;
|
|
8
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
shortUuid: z.ZodOptional<z.ZodString>;
|
|
10
|
+
username: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
uuid?: string | undefined;
|
|
13
|
+
username?: string | undefined;
|
|
14
|
+
id?: number | undefined;
|
|
15
|
+
shortUuid?: string | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
uuid?: string | undefined;
|
|
18
|
+
username?: string | undefined;
|
|
19
|
+
id?: number | undefined;
|
|
20
|
+
shortUuid?: string | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
uuid?: string | undefined;
|
|
23
|
+
username?: string | undefined;
|
|
24
|
+
id?: number | undefined;
|
|
25
|
+
shortUuid?: string | undefined;
|
|
26
|
+
}, {
|
|
27
|
+
uuid?: string | undefined;
|
|
28
|
+
username?: string | undefined;
|
|
29
|
+
id?: number | undefined;
|
|
30
|
+
shortUuid?: string | undefined;
|
|
31
|
+
}>;
|
|
32
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
33
|
+
const ResponseSchema: z.ZodObject<{
|
|
34
|
+
response: z.ZodObject<{
|
|
35
|
+
user: z.ZodObject<{
|
|
36
|
+
uuid: z.ZodString;
|
|
37
|
+
username: z.ZodString;
|
|
38
|
+
id: z.ZodNumber;
|
|
39
|
+
shortUuid: z.ZodString;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
uuid: string;
|
|
42
|
+
username: string;
|
|
43
|
+
id: number;
|
|
44
|
+
shortUuid: string;
|
|
45
|
+
}, {
|
|
46
|
+
uuid: string;
|
|
47
|
+
username: string;
|
|
48
|
+
id: number;
|
|
49
|
+
shortUuid: string;
|
|
50
|
+
}>;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
user: {
|
|
53
|
+
uuid: string;
|
|
54
|
+
username: string;
|
|
55
|
+
id: number;
|
|
56
|
+
shortUuid: string;
|
|
57
|
+
};
|
|
58
|
+
}, {
|
|
59
|
+
user: {
|
|
60
|
+
uuid: string;
|
|
61
|
+
username: string;
|
|
62
|
+
id: number;
|
|
63
|
+
shortUuid: string;
|
|
64
|
+
};
|
|
65
|
+
}>;
|
|
66
|
+
}, "strip", z.ZodTypeAny, {
|
|
67
|
+
response: {
|
|
68
|
+
user: {
|
|
69
|
+
uuid: string;
|
|
70
|
+
username: string;
|
|
71
|
+
id: number;
|
|
72
|
+
shortUuid: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
}, {
|
|
76
|
+
response: {
|
|
77
|
+
user: {
|
|
78
|
+
uuid: string;
|
|
79
|
+
username: string;
|
|
80
|
+
id: number;
|
|
81
|
+
shortUuid: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
}>;
|
|
85
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=resolve-user.command.d.ts.map
|
|
@@ -0,0 +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,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;MAiBrB,CAAC;IAEN,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MASzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ResolveUserCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const api_1 = require("../../api");
|
|
7
|
+
var ResolveUserCommand;
|
|
8
|
+
(function (ResolveUserCommand) {
|
|
9
|
+
ResolveUserCommand.url = api_1.REST_API.USERS.RESOLVE;
|
|
10
|
+
ResolveUserCommand.TSQ_url = ResolveUserCommand.url;
|
|
11
|
+
ResolveUserCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.RESOLVE, 'post', 'Resolve a user');
|
|
12
|
+
ResolveUserCommand.RequestSchema = zod_1.z
|
|
13
|
+
.object({
|
|
14
|
+
uuid: zod_1.z.string().uuid().optional(),
|
|
15
|
+
id: zod_1.z.number().optional(),
|
|
16
|
+
shortUuid: zod_1.z.string().optional(),
|
|
17
|
+
username: zod_1.z.string().optional(),
|
|
18
|
+
})
|
|
19
|
+
.refine((data) => {
|
|
20
|
+
const provided = [data.uuid, data.id, data.shortUuid, data.username].filter((v) => v !== undefined);
|
|
21
|
+
return provided.length === 1;
|
|
22
|
+
}, {
|
|
23
|
+
message: 'Exactly one of uuid, id, shortUuid, or username must be provided',
|
|
24
|
+
});
|
|
25
|
+
ResolveUserCommand.ResponseSchema = zod_1.z.object({
|
|
26
|
+
response: zod_1.z.object({
|
|
27
|
+
user: zod_1.z.object({
|
|
28
|
+
uuid: zod_1.z.string().uuid(),
|
|
29
|
+
username: zod_1.z.string(),
|
|
30
|
+
id: zod_1.z.number(),
|
|
31
|
+
shortUuid: zod_1.z.string(),
|
|
32
|
+
}),
|
|
33
|
+
}),
|
|
34
|
+
});
|
|
35
|
+
})(ResolveUserCommand || (exports.ResolveUserCommand = ResolveUserCommand = {}));
|
|
@@ -115,6 +115,7 @@ exports.REST_API = {
|
|
|
115
115
|
EMAIL: (email) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY.EMAIL(email)}`,
|
|
116
116
|
TAG: (tag) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY.TAG(tag)}`,
|
|
117
117
|
},
|
|
118
|
+
RESOLVE: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.RESOLVE}`,
|
|
118
119
|
BULK: {
|
|
119
120
|
DELETE_BY_STATUS: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.BULK.DELETE_BY_STATUS}`,
|
|
120
121
|
UPDATE: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.BULK.UPDATE}`,
|
|
@@ -24,5 +24,6 @@ __exportStar(require("./get-by"), exports);
|
|
|
24
24
|
__exportStar(require("./get-user-accessible-nodes.command"), exports);
|
|
25
25
|
__exportStar(require("./get-user-by-uuid.command"), exports);
|
|
26
26
|
__exportStar(require("./get-user-subscription-request-history.command"), exports);
|
|
27
|
+
__exportStar(require("./resolve-user.command"), exports);
|
|
27
28
|
__exportStar(require("./tags"), exports);
|
|
28
29
|
__exportStar(require("./update-user.command"), exports);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ResolveUserCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const api_1 = require("../../api");
|
|
7
|
+
var ResolveUserCommand;
|
|
8
|
+
(function (ResolveUserCommand) {
|
|
9
|
+
ResolveUserCommand.url = api_1.REST_API.USERS.RESOLVE;
|
|
10
|
+
ResolveUserCommand.TSQ_url = ResolveUserCommand.url;
|
|
11
|
+
ResolveUserCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.RESOLVE, 'post', 'Resolve a user');
|
|
12
|
+
ResolveUserCommand.RequestSchema = zod_1.z
|
|
13
|
+
.object({
|
|
14
|
+
uuid: zod_1.z.string().uuid().optional(),
|
|
15
|
+
id: zod_1.z.number().optional(),
|
|
16
|
+
shortUuid: zod_1.z.string().optional(),
|
|
17
|
+
username: zod_1.z.string().optional(),
|
|
18
|
+
})
|
|
19
|
+
.refine((data) => {
|
|
20
|
+
const provided = [data.uuid, data.id, data.shortUuid, data.username].filter((v) => v !== undefined);
|
|
21
|
+
return provided.length === 1;
|
|
22
|
+
}, {
|
|
23
|
+
message: 'Exactly one of uuid, id, shortUuid, or username must be provided',
|
|
24
|
+
});
|
|
25
|
+
ResolveUserCommand.ResponseSchema = zod_1.z.object({
|
|
26
|
+
response: zod_1.z.object({
|
|
27
|
+
user: zod_1.z.object({
|
|
28
|
+
uuid: zod_1.z.string().uuid(),
|
|
29
|
+
username: zod_1.z.string(),
|
|
30
|
+
id: zod_1.z.number(),
|
|
31
|
+
shortUuid: zod_1.z.string(),
|
|
32
|
+
}),
|
|
33
|
+
}),
|
|
34
|
+
});
|
|
35
|
+
})(ResolveUserCommand || (exports.ResolveUserCommand = ResolveUserCommand = {}));
|