@remnawave/backend-contract 2.9.26 → 2.9.28
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/models/export-stream/export-stream.schema.d.ts +3 -3
- package/build/backend/models/export-stream/export-stream.schema.d.ts.map +1 -1
- package/build/backend/models/export-stream/export-stream.schema.js +14 -4
- package/build/frontend/models/export-stream/export-stream.schema.js +14 -4
- package/package.json +1 -1
|
@@ -32,18 +32,18 @@ export declare const NodeConnectionUserSchema: z.ZodObject<{
|
|
|
32
32
|
userId: z.ZodString;
|
|
33
33
|
ips: z.ZodArray<z.ZodObject<{
|
|
34
34
|
ip: z.ZodString;
|
|
35
|
-
lastSeen: z.
|
|
35
|
+
lastSeen: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>;
|
|
36
36
|
}, z.core.$strip>>;
|
|
37
37
|
}, z.core.$strip>;
|
|
38
38
|
export declare const RemnawaveNodeConnectionsStreamMessageSchema: z.ZodObject<{
|
|
39
39
|
v: z.ZodLiteral<"1">;
|
|
40
|
-
|
|
40
|
+
nodeId: z.ZodString;
|
|
41
41
|
ts: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>;
|
|
42
42
|
users: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>, z.ZodArray<z.ZodObject<{
|
|
43
43
|
userId: z.ZodString;
|
|
44
44
|
ips: z.ZodArray<z.ZodObject<{
|
|
45
45
|
ip: z.ZodString;
|
|
46
|
-
lastSeen: z.
|
|
46
|
+
lastSeen: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>;
|
|
47
47
|
}, z.core.$strip>>;
|
|
48
48
|
}, z.core.$strip>>>;
|
|
49
49
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export-stream.schema.d.ts","sourceRoot":"","sources":["../../../../models/export-stream/export-stream.schema.ts"],"names":[],"mappings":"AAAA,OAAO,C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,MAAM,wBAAwB;;;;;;iBAanC,CAAC;AAEH,eAAO,MAAM,2CAA2C;;;;;;;;;;;iBAkClD,CAAC;AAEP,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC3E,MAAM,MAAM,sCAAsC,GAAG,CAAC,CAAC,KAAK,CACxD,OAAO,2CAA2C,CACrD,CAAC"}
|
|
@@ -66,8 +66,9 @@ exports.NodeConnectionUserSchema = zod_1.default.object({
|
|
|
66
66
|
ips: zod_1.default
|
|
67
67
|
.array(zod_1.default.object({
|
|
68
68
|
ip: zod_1.default.string().describe('Client IP address.'),
|
|
69
|
-
lastSeen: zod_1.default.
|
|
70
|
-
.
|
|
69
|
+
lastSeen: zod_1.default.iso
|
|
70
|
+
.datetime()
|
|
71
|
+
.transform((str) => new Date(str))
|
|
71
72
|
.describe('Last time this IP was seen on the node (ISO 8601, UTC).'),
|
|
72
73
|
}))
|
|
73
74
|
.describe('IP addresses the user is connected from.'),
|
|
@@ -75,7 +76,10 @@ exports.NodeConnectionUserSchema = zod_1.default.object({
|
|
|
75
76
|
exports.RemnawaveNodeConnectionsStreamMessageSchema = zod_1.default
|
|
76
77
|
.object({
|
|
77
78
|
v: zod_1.default.literal(exports.NODE_CONNECTIONS_STREAM_MESSAGE_VERSION).describe('Message schema version.'),
|
|
78
|
-
|
|
79
|
+
nodeId: zod_1.default
|
|
80
|
+
.string()
|
|
81
|
+
.regex(/^\d+$/)
|
|
82
|
+
.describe('Node ID the snapshot belongs to (bigint as string).'),
|
|
79
83
|
ts: zod_1.default.iso
|
|
80
84
|
.datetime()
|
|
81
85
|
.transform((str) => new Date(str))
|
|
@@ -92,7 +96,13 @@ exports.RemnawaveNodeConnectionsStreamMessageSchema = zod_1.default
|
|
|
92
96
|
}
|
|
93
97
|
})
|
|
94
98
|
.pipe(zod_1.default.array(exports.NodeConnectionUserSchema))
|
|
95
|
-
.describe(
|
|
99
|
+
.describe([
|
|
100
|
+
'JSON-encoded array of users connected to the node with their IPs.',
|
|
101
|
+
'Example:',
|
|
102
|
+
'```json',
|
|
103
|
+
'[{ "userId": "42", "ips": [{ "ip": "1.2.3.4", "lastSeen": "2026-07-16T11:59:30.000Z" }] }]',
|
|
104
|
+
'```',
|
|
105
|
+
].join('\n')),
|
|
96
106
|
})
|
|
97
107
|
.meta({
|
|
98
108
|
description: `A single message of the "${NODE_CONNECTIONS_STREAM_KEY}" Redis Stream (EXPORT_TO_STREAM_ENABLED). Snapshot of connections on one node; retention is time-based.`,
|
|
@@ -66,8 +66,9 @@ exports.NodeConnectionUserSchema = zod_1.default.object({
|
|
|
66
66
|
ips: zod_1.default
|
|
67
67
|
.array(zod_1.default.object({
|
|
68
68
|
ip: zod_1.default.string().describe('Client IP address.'),
|
|
69
|
-
lastSeen: zod_1.default.
|
|
70
|
-
.
|
|
69
|
+
lastSeen: zod_1.default.iso
|
|
70
|
+
.datetime()
|
|
71
|
+
.transform((str) => new Date(str))
|
|
71
72
|
.describe('Last time this IP was seen on the node (ISO 8601, UTC).'),
|
|
72
73
|
}))
|
|
73
74
|
.describe('IP addresses the user is connected from.'),
|
|
@@ -75,7 +76,10 @@ exports.NodeConnectionUserSchema = zod_1.default.object({
|
|
|
75
76
|
exports.RemnawaveNodeConnectionsStreamMessageSchema = zod_1.default
|
|
76
77
|
.object({
|
|
77
78
|
v: zod_1.default.literal(exports.NODE_CONNECTIONS_STREAM_MESSAGE_VERSION).describe('Message schema version.'),
|
|
78
|
-
|
|
79
|
+
nodeId: zod_1.default
|
|
80
|
+
.string()
|
|
81
|
+
.regex(/^\d+$/)
|
|
82
|
+
.describe('Node ID the snapshot belongs to (bigint as string).'),
|
|
79
83
|
ts: zod_1.default.iso
|
|
80
84
|
.datetime()
|
|
81
85
|
.transform((str) => new Date(str))
|
|
@@ -92,7 +96,13 @@ exports.RemnawaveNodeConnectionsStreamMessageSchema = zod_1.default
|
|
|
92
96
|
}
|
|
93
97
|
})
|
|
94
98
|
.pipe(zod_1.default.array(exports.NodeConnectionUserSchema))
|
|
95
|
-
.describe(
|
|
99
|
+
.describe([
|
|
100
|
+
'JSON-encoded array of users connected to the node with their IPs.',
|
|
101
|
+
'Example:',
|
|
102
|
+
'```json',
|
|
103
|
+
'[{ "userId": "42", "ips": [{ "ip": "1.2.3.4", "lastSeen": "2026-07-16T11:59:30.000Z" }] }]',
|
|
104
|
+
'```',
|
|
105
|
+
].join('\n')),
|
|
96
106
|
})
|
|
97
107
|
.meta({
|
|
98
108
|
description: `A single message of the "${NODE_CONNECTIONS_STREAM_KEY}" Redis Stream (EXPORT_TO_STREAM_ENABLED). Snapshot of connections on one node; retention is time-based.`,
|
package/package.json
CHANGED