@remnawave/backend-contract 2.6.39 → 2.6.40
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/ip-control.d.ts +2 -0
- package/build/backend/api/controllers/ip-control.d.ts.map +1 -1
- package/build/backend/api/controllers/ip-control.js +4 -0
- package/build/backend/api/routes.d.ts +2 -0
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +2 -0
- package/build/backend/commands/ip-control/fetch-users-ips-result.command.d.ts +131 -0
- package/build/backend/commands/ip-control/fetch-users-ips-result.command.d.ts.map +1 -0
- package/build/backend/commands/ip-control/fetch-users-ips-result.command.js +40 -0
- package/build/backend/commands/ip-control/fetch-users-ips.command.d.ts +33 -0
- package/build/backend/commands/ip-control/fetch-users-ips.command.d.ts.map +1 -0
- package/build/backend/commands/ip-control/fetch-users-ips.command.js +20 -0
- package/build/backend/commands/ip-control/index.d.ts +2 -0
- package/build/backend/commands/ip-control/index.d.ts.map +1 -1
- package/build/backend/commands/ip-control/index.js +2 -0
- package/build/frontend/api/controllers/ip-control.js +4 -0
- package/build/frontend/api/routes.js +2 -0
- package/build/frontend/commands/ip-control/fetch-users-ips-result.command.js +40 -0
- package/build/frontend/commands/ip-control/fetch-users-ips.command.js +20 -0
- package/build/frontend/commands/ip-control/index.js +2 -0
- package/package.json +1 -1
|
@@ -3,5 +3,7 @@ export declare const IP_CONTROL_ROUTES: {
|
|
|
3
3
|
readonly FETCH_IPS: (uuid: string) => string;
|
|
4
4
|
readonly GET_FETCH_IPS_RESULT: (jobId: string) => string;
|
|
5
5
|
readonly DROP_CONNECTIONS: "drop-connections";
|
|
6
|
+
readonly FETCH_USERS_IPS: (nodeUuid: string) => string;
|
|
7
|
+
readonly GET_FETCH_USERS_IPS_RESULT: (jobId: string) => string;
|
|
6
8
|
};
|
|
7
9
|
//# sourceMappingURL=ip-control.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ip-control.d.ts","sourceRoot":"","sources":["../../../../api/controllers/ip-control.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,EAAG,YAAqB,CAAC;AAE3D,eAAO,MAAM,iBAAiB;+BAER,MAAM;2CAEM,MAAM;;
|
|
1
|
+
{"version":3,"file":"ip-control.d.ts","sourceRoot":"","sources":["../../../../api/controllers/ip-control.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,EAAG,YAAqB,CAAC;AAE3D,eAAO,MAAM,iBAAiB;+BAER,MAAM;2CAEM,MAAM;;yCAIR,MAAM;iDAEE,MAAM;CACpC,CAAC"}
|
|
@@ -9,4 +9,8 @@ exports.IP_CONTROL_ROUTES = {
|
|
|
9
9
|
GET_FETCH_IPS_RESULT: (jobId) => `fetch-ips/result/${jobId}`,
|
|
10
10
|
// POST /ip-control/drop-connections
|
|
11
11
|
DROP_CONNECTIONS: 'drop-connections',
|
|
12
|
+
// POST /ip-control/fetch-users-ips/:nodeUuid
|
|
13
|
+
FETCH_USERS_IPS: (nodeUuid) => `fetch-users-ips/${nodeUuid}`,
|
|
14
|
+
// GET /ip-control/fetch-users-ips/result/:jobId
|
|
15
|
+
GET_FETCH_USERS_IPS_RESULT: (jobId) => `fetch-users-ips/result/${jobId}`,
|
|
12
16
|
};
|
|
@@ -293,6 +293,8 @@ export declare const REST_API: {
|
|
|
293
293
|
readonly FETCH_IPS: (uuid: string) => string;
|
|
294
294
|
readonly GET_FETCH_IPS_RESULT: (jobId: string) => string;
|
|
295
295
|
readonly DROP_CONNECTIONS: "/api/ip-control/drop-connections";
|
|
296
|
+
readonly FETCH_USERS_IPS: (nodeUuid: string) => string;
|
|
297
|
+
readonly GET_FETCH_USERS_IPS_RESULT: (jobId: string) => string;
|
|
296
298
|
};
|
|
297
299
|
readonly METADATA: {
|
|
298
300
|
readonly NODE: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../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;;;;qCAiBjB,MAAM;gCAIX,MAAM;;uCAKC,MAAM;0CAEH,MAAM;;;;;;;;;;;6BAYnB,MAAM;;;gCAIH,MAAM;;;;;;;;6BAST,MAAM;;;gCAIH,MAAM;;;;;;;;;;;;;;;;;uCAkBC,MAAM;;;yCAIJ,MAAM;;;;2CAKJ,MAAM;;;6CAIJ,MAAM;;;;;mCAMhB,MAAM;+CAEM,MAAM;;6CAGR,MAAM;qDAEE,MAAM;;;;iCAK1B,MAAM;oCAEH,MAAM;;;iCAIT,MAAM;oCAEH,MAAM;;;CAIvB,CAAC"}
|
|
@@ -330,6 +330,8 @@ exports.REST_API = {
|
|
|
330
330
|
FETCH_IPS: (uuid) => `${exports.ROOT}/${CONTROLLERS.IP_CONTROL_CONTROLLER}/${CONTROLLERS.IP_CONTROL_ROUTES.FETCH_IPS(uuid)}`,
|
|
331
331
|
GET_FETCH_IPS_RESULT: (jobId) => `${exports.ROOT}/${CONTROLLERS.IP_CONTROL_CONTROLLER}/${CONTROLLERS.IP_CONTROL_ROUTES.GET_FETCH_IPS_RESULT(jobId)}`,
|
|
332
332
|
DROP_CONNECTIONS: `${exports.ROOT}/${CONTROLLERS.IP_CONTROL_CONTROLLER}/${CONTROLLERS.IP_CONTROL_ROUTES.DROP_CONNECTIONS}`,
|
|
333
|
+
FETCH_USERS_IPS: (nodeUuid) => `${exports.ROOT}/${CONTROLLERS.IP_CONTROL_CONTROLLER}/${CONTROLLERS.IP_CONTROL_ROUTES.FETCH_USERS_IPS(nodeUuid)}`,
|
|
334
|
+
GET_FETCH_USERS_IPS_RESULT: (jobId) => `${exports.ROOT}/${CONTROLLERS.IP_CONTROL_CONTROLLER}/${CONTROLLERS.IP_CONTROL_ROUTES.GET_FETCH_USERS_IPS_RESULT(jobId)}`,
|
|
333
335
|
},
|
|
334
336
|
METADATA: {
|
|
335
337
|
NODE: {
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare namespace FetchUsersIpsResultCommand {
|
|
3
|
+
const url: (jobId: string) => string;
|
|
4
|
+
const TSQ_url: string;
|
|
5
|
+
const endpointDetails: import("../../constants").EndpointDetails;
|
|
6
|
+
const RequestSchema: z.ZodObject<{
|
|
7
|
+
jobId: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
jobId: string;
|
|
10
|
+
}, {
|
|
11
|
+
jobId: string;
|
|
12
|
+
}>;
|
|
13
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
14
|
+
const ResponseSchema: z.ZodObject<{
|
|
15
|
+
response: z.ZodObject<{
|
|
16
|
+
isCompleted: z.ZodBoolean;
|
|
17
|
+
isFailed: z.ZodBoolean;
|
|
18
|
+
result: z.ZodNullable<z.ZodObject<{
|
|
19
|
+
success: z.ZodBoolean;
|
|
20
|
+
nodeUuid: z.ZodString;
|
|
21
|
+
users: z.ZodArray<z.ZodObject<{
|
|
22
|
+
userId: z.ZodString;
|
|
23
|
+
ips: z.ZodArray<z.ZodObject<{
|
|
24
|
+
ip: z.ZodString;
|
|
25
|
+
lastSeen: z.ZodEffects<z.ZodString, Date, string>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
ip: string;
|
|
28
|
+
lastSeen: Date;
|
|
29
|
+
}, {
|
|
30
|
+
ip: string;
|
|
31
|
+
lastSeen: string;
|
|
32
|
+
}>, "many">;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
userId: string;
|
|
35
|
+
ips: {
|
|
36
|
+
ip: string;
|
|
37
|
+
lastSeen: Date;
|
|
38
|
+
}[];
|
|
39
|
+
}, {
|
|
40
|
+
userId: string;
|
|
41
|
+
ips: {
|
|
42
|
+
ip: string;
|
|
43
|
+
lastSeen: string;
|
|
44
|
+
}[];
|
|
45
|
+
}>, "many">;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
users: {
|
|
48
|
+
userId: string;
|
|
49
|
+
ips: {
|
|
50
|
+
ip: string;
|
|
51
|
+
lastSeen: Date;
|
|
52
|
+
}[];
|
|
53
|
+
}[];
|
|
54
|
+
nodeUuid: string;
|
|
55
|
+
success: boolean;
|
|
56
|
+
}, {
|
|
57
|
+
users: {
|
|
58
|
+
userId: string;
|
|
59
|
+
ips: {
|
|
60
|
+
ip: string;
|
|
61
|
+
lastSeen: string;
|
|
62
|
+
}[];
|
|
63
|
+
}[];
|
|
64
|
+
nodeUuid: string;
|
|
65
|
+
success: boolean;
|
|
66
|
+
}>>;
|
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
isCompleted: boolean;
|
|
69
|
+
isFailed: boolean;
|
|
70
|
+
result: {
|
|
71
|
+
users: {
|
|
72
|
+
userId: string;
|
|
73
|
+
ips: {
|
|
74
|
+
ip: string;
|
|
75
|
+
lastSeen: Date;
|
|
76
|
+
}[];
|
|
77
|
+
}[];
|
|
78
|
+
nodeUuid: string;
|
|
79
|
+
success: boolean;
|
|
80
|
+
} | null;
|
|
81
|
+
}, {
|
|
82
|
+
isCompleted: boolean;
|
|
83
|
+
isFailed: boolean;
|
|
84
|
+
result: {
|
|
85
|
+
users: {
|
|
86
|
+
userId: string;
|
|
87
|
+
ips: {
|
|
88
|
+
ip: string;
|
|
89
|
+
lastSeen: string;
|
|
90
|
+
}[];
|
|
91
|
+
}[];
|
|
92
|
+
nodeUuid: string;
|
|
93
|
+
success: boolean;
|
|
94
|
+
} | null;
|
|
95
|
+
}>;
|
|
96
|
+
}, "strip", z.ZodTypeAny, {
|
|
97
|
+
response: {
|
|
98
|
+
isCompleted: boolean;
|
|
99
|
+
isFailed: boolean;
|
|
100
|
+
result: {
|
|
101
|
+
users: {
|
|
102
|
+
userId: string;
|
|
103
|
+
ips: {
|
|
104
|
+
ip: string;
|
|
105
|
+
lastSeen: Date;
|
|
106
|
+
}[];
|
|
107
|
+
}[];
|
|
108
|
+
nodeUuid: string;
|
|
109
|
+
success: boolean;
|
|
110
|
+
} | null;
|
|
111
|
+
};
|
|
112
|
+
}, {
|
|
113
|
+
response: {
|
|
114
|
+
isCompleted: boolean;
|
|
115
|
+
isFailed: boolean;
|
|
116
|
+
result: {
|
|
117
|
+
users: {
|
|
118
|
+
userId: string;
|
|
119
|
+
ips: {
|
|
120
|
+
ip: string;
|
|
121
|
+
lastSeen: string;
|
|
122
|
+
}[];
|
|
123
|
+
}[];
|
|
124
|
+
nodeUuid: string;
|
|
125
|
+
success: boolean;
|
|
126
|
+
} | null;
|
|
127
|
+
};
|
|
128
|
+
}>;
|
|
129
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=fetch-users-ips-result.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-users-ips-result.command.d.ts","sourceRoot":"","sources":["../../../../commands/ip-control/fetch-users-ips-result.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,0BAA0B,CAAC;IACjC,MAAM,GAAG,2BAAiD,CAAC;IAC3D,MAAM,OAAO,QAAgB,CAAC;IAE9B,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA4BzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FetchUsersIpsResultCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
var FetchUsersIpsResultCommand;
|
|
8
|
+
(function (FetchUsersIpsResultCommand) {
|
|
9
|
+
FetchUsersIpsResultCommand.url = api_1.REST_API.IP_CONTROL.GET_FETCH_USERS_IPS_RESULT;
|
|
10
|
+
FetchUsersIpsResultCommand.TSQ_url = FetchUsersIpsResultCommand.url(':jobId');
|
|
11
|
+
FetchUsersIpsResultCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.IP_CONTROL_ROUTES.GET_FETCH_USERS_IPS_RESULT(':jobId'), 'get', 'Get Users IPs List Result by Job ID');
|
|
12
|
+
FetchUsersIpsResultCommand.RequestSchema = zod_1.z.object({
|
|
13
|
+
jobId: zod_1.z.string(),
|
|
14
|
+
});
|
|
15
|
+
FetchUsersIpsResultCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
response: zod_1.z.object({
|
|
17
|
+
isCompleted: zod_1.z.boolean(),
|
|
18
|
+
isFailed: zod_1.z.boolean(),
|
|
19
|
+
result: zod_1.z
|
|
20
|
+
.object({
|
|
21
|
+
success: zod_1.z.boolean(),
|
|
22
|
+
nodeUuid: zod_1.z.string().uuid(),
|
|
23
|
+
users: zod_1.z.array(zod_1.z.object({
|
|
24
|
+
userId: zod_1.z.string(),
|
|
25
|
+
ips: zod_1.z.array(zod_1.z.object({
|
|
26
|
+
ip: zod_1.z.string(),
|
|
27
|
+
lastSeen: zod_1.z
|
|
28
|
+
.string()
|
|
29
|
+
.datetime({
|
|
30
|
+
local: true,
|
|
31
|
+
offset: true,
|
|
32
|
+
})
|
|
33
|
+
.transform((str) => new Date(str)),
|
|
34
|
+
})),
|
|
35
|
+
})),
|
|
36
|
+
})
|
|
37
|
+
.nullable(),
|
|
38
|
+
}),
|
|
39
|
+
});
|
|
40
|
+
})(FetchUsersIpsResultCommand || (exports.FetchUsersIpsResultCommand = FetchUsersIpsResultCommand = {}));
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare namespace FetchUsersIpsCommand {
|
|
3
|
+
const url: (nodeUuid: string) => string;
|
|
4
|
+
const TSQ_url: string;
|
|
5
|
+
const endpointDetails: import("../../constants").EndpointDetails;
|
|
6
|
+
const RequestSchema: z.ZodObject<{
|
|
7
|
+
nodeUuid: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
nodeUuid: string;
|
|
10
|
+
}, {
|
|
11
|
+
nodeUuid: string;
|
|
12
|
+
}>;
|
|
13
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
14
|
+
const ResponseSchema: z.ZodObject<{
|
|
15
|
+
response: z.ZodObject<{
|
|
16
|
+
jobId: z.ZodString;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
jobId: string;
|
|
19
|
+
}, {
|
|
20
|
+
jobId: string;
|
|
21
|
+
}>;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
response: {
|
|
24
|
+
jobId: string;
|
|
25
|
+
};
|
|
26
|
+
}, {
|
|
27
|
+
response: {
|
|
28
|
+
jobId: string;
|
|
29
|
+
};
|
|
30
|
+
}>;
|
|
31
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=fetch-users-ips.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-users-ips.command.d.ts","sourceRoot":"","sources":["../../../../commands/ip-control/fetch-users-ips.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,oBAAoB,CAAC;IAC3B,MAAM,GAAG,8BAAsC,CAAC;IAChD,MAAM,OAAO,QAAmB,CAAC;IAEjC,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;MAIzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FetchUsersIpsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
var FetchUsersIpsCommand;
|
|
8
|
+
(function (FetchUsersIpsCommand) {
|
|
9
|
+
FetchUsersIpsCommand.url = api_1.REST_API.IP_CONTROL.FETCH_USERS_IPS;
|
|
10
|
+
FetchUsersIpsCommand.TSQ_url = FetchUsersIpsCommand.url(':nodeUuid');
|
|
11
|
+
FetchUsersIpsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.IP_CONTROL_ROUTES.FETCH_USERS_IPS(':nodeUuid'), 'post', 'Request Users IPs List for Node');
|
|
12
|
+
FetchUsersIpsCommand.RequestSchema = zod_1.z.object({
|
|
13
|
+
nodeUuid: zod_1.z.string().uuid(),
|
|
14
|
+
});
|
|
15
|
+
FetchUsersIpsCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
response: zod_1.z.object({
|
|
17
|
+
jobId: zod_1.z.string(),
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
})(FetchUsersIpsCommand || (exports.FetchUsersIpsCommand = FetchUsersIpsCommand = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/ip-control/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/ip-control/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC"}
|
|
@@ -17,3 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./drop-connections.command"), exports);
|
|
18
18
|
__exportStar(require("./fetch-ips-result.command"), exports);
|
|
19
19
|
__exportStar(require("./fetch-ips.command"), exports);
|
|
20
|
+
__exportStar(require("./fetch-users-ips-result.command"), exports);
|
|
21
|
+
__exportStar(require("./fetch-users-ips.command"), exports);
|
|
@@ -9,4 +9,8 @@ exports.IP_CONTROL_ROUTES = {
|
|
|
9
9
|
GET_FETCH_IPS_RESULT: (jobId) => `fetch-ips/result/${jobId}`,
|
|
10
10
|
// POST /ip-control/drop-connections
|
|
11
11
|
DROP_CONNECTIONS: 'drop-connections',
|
|
12
|
+
// POST /ip-control/fetch-users-ips/:nodeUuid
|
|
13
|
+
FETCH_USERS_IPS: (nodeUuid) => `fetch-users-ips/${nodeUuid}`,
|
|
14
|
+
// GET /ip-control/fetch-users-ips/result/:jobId
|
|
15
|
+
GET_FETCH_USERS_IPS_RESULT: (jobId) => `fetch-users-ips/result/${jobId}`,
|
|
12
16
|
};
|
|
@@ -330,6 +330,8 @@ exports.REST_API = {
|
|
|
330
330
|
FETCH_IPS: (uuid) => `${exports.ROOT}/${CONTROLLERS.IP_CONTROL_CONTROLLER}/${CONTROLLERS.IP_CONTROL_ROUTES.FETCH_IPS(uuid)}`,
|
|
331
331
|
GET_FETCH_IPS_RESULT: (jobId) => `${exports.ROOT}/${CONTROLLERS.IP_CONTROL_CONTROLLER}/${CONTROLLERS.IP_CONTROL_ROUTES.GET_FETCH_IPS_RESULT(jobId)}`,
|
|
332
332
|
DROP_CONNECTIONS: `${exports.ROOT}/${CONTROLLERS.IP_CONTROL_CONTROLLER}/${CONTROLLERS.IP_CONTROL_ROUTES.DROP_CONNECTIONS}`,
|
|
333
|
+
FETCH_USERS_IPS: (nodeUuid) => `${exports.ROOT}/${CONTROLLERS.IP_CONTROL_CONTROLLER}/${CONTROLLERS.IP_CONTROL_ROUTES.FETCH_USERS_IPS(nodeUuid)}`,
|
|
334
|
+
GET_FETCH_USERS_IPS_RESULT: (jobId) => `${exports.ROOT}/${CONTROLLERS.IP_CONTROL_CONTROLLER}/${CONTROLLERS.IP_CONTROL_ROUTES.GET_FETCH_USERS_IPS_RESULT(jobId)}`,
|
|
333
335
|
},
|
|
334
336
|
METADATA: {
|
|
335
337
|
NODE: {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FetchUsersIpsResultCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
var FetchUsersIpsResultCommand;
|
|
8
|
+
(function (FetchUsersIpsResultCommand) {
|
|
9
|
+
FetchUsersIpsResultCommand.url = api_1.REST_API.IP_CONTROL.GET_FETCH_USERS_IPS_RESULT;
|
|
10
|
+
FetchUsersIpsResultCommand.TSQ_url = FetchUsersIpsResultCommand.url(':jobId');
|
|
11
|
+
FetchUsersIpsResultCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.IP_CONTROL_ROUTES.GET_FETCH_USERS_IPS_RESULT(':jobId'), 'get', 'Get Users IPs List Result by Job ID');
|
|
12
|
+
FetchUsersIpsResultCommand.RequestSchema = zod_1.z.object({
|
|
13
|
+
jobId: zod_1.z.string(),
|
|
14
|
+
});
|
|
15
|
+
FetchUsersIpsResultCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
response: zod_1.z.object({
|
|
17
|
+
isCompleted: zod_1.z.boolean(),
|
|
18
|
+
isFailed: zod_1.z.boolean(),
|
|
19
|
+
result: zod_1.z
|
|
20
|
+
.object({
|
|
21
|
+
success: zod_1.z.boolean(),
|
|
22
|
+
nodeUuid: zod_1.z.string().uuid(),
|
|
23
|
+
users: zod_1.z.array(zod_1.z.object({
|
|
24
|
+
userId: zod_1.z.string(),
|
|
25
|
+
ips: zod_1.z.array(zod_1.z.object({
|
|
26
|
+
ip: zod_1.z.string(),
|
|
27
|
+
lastSeen: zod_1.z
|
|
28
|
+
.string()
|
|
29
|
+
.datetime({
|
|
30
|
+
local: true,
|
|
31
|
+
offset: true,
|
|
32
|
+
})
|
|
33
|
+
.transform((str) => new Date(str)),
|
|
34
|
+
})),
|
|
35
|
+
})),
|
|
36
|
+
})
|
|
37
|
+
.nullable(),
|
|
38
|
+
}),
|
|
39
|
+
});
|
|
40
|
+
})(FetchUsersIpsResultCommand || (exports.FetchUsersIpsResultCommand = FetchUsersIpsResultCommand = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FetchUsersIpsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
var FetchUsersIpsCommand;
|
|
8
|
+
(function (FetchUsersIpsCommand) {
|
|
9
|
+
FetchUsersIpsCommand.url = api_1.REST_API.IP_CONTROL.FETCH_USERS_IPS;
|
|
10
|
+
FetchUsersIpsCommand.TSQ_url = FetchUsersIpsCommand.url(':nodeUuid');
|
|
11
|
+
FetchUsersIpsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.IP_CONTROL_ROUTES.FETCH_USERS_IPS(':nodeUuid'), 'post', 'Request Users IPs List for Node');
|
|
12
|
+
FetchUsersIpsCommand.RequestSchema = zod_1.z.object({
|
|
13
|
+
nodeUuid: zod_1.z.string().uuid(),
|
|
14
|
+
});
|
|
15
|
+
FetchUsersIpsCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
response: zod_1.z.object({
|
|
17
|
+
jobId: zod_1.z.string(),
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
})(FetchUsersIpsCommand || (exports.FetchUsersIpsCommand = FetchUsersIpsCommand = {}));
|
|
@@ -17,3 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./drop-connections.command"), exports);
|
|
18
18
|
__exportStar(require("./fetch-ips-result.command"), exports);
|
|
19
19
|
__exportStar(require("./fetch-ips.command"), exports);
|
|
20
|
+
__exportStar(require("./fetch-users-ips-result.command"), exports);
|
|
21
|
+
__exportStar(require("./fetch-users-ips.command"), exports);
|