@remnawave/backend-contract 0.0.43 → 0.0.45

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,7 +12,7 @@ exports.NodesSchema = zod_1.z.object({
12
12
  isConnecting: zod_1.z.boolean(),
13
13
  isNodeOnline: zod_1.z.boolean(),
14
14
  isXrayRunning: zod_1.z.boolean(),
15
- lastStatusChange: zod_1.z.nullable(zod_1.z.date()),
15
+ lastStatusChange: zod_1.z.nullable(zod_1.z.string().transform((str) => new Date(str))),
16
16
  lastStatusMessage: zod_1.z.nullable(zod_1.z.string()),
17
17
  xrayVersion: zod_1.z.nullable(zod_1.z.string()),
18
18
  isTrafficTrackingActive: zod_1.z.boolean(),
@@ -20,15 +20,15 @@ exports.UsersSchema = zod_1.z.object({
20
20
  })
21
21
  .default(constants_1.RESET_PERIODS_VALUES[0]),
22
22
  subLastUserAgent: zod_1.z.nullable(zod_1.z.string()),
23
- subLastOpenedAt: zod_1.z.nullable(zod_1.z.date()),
24
- expireAt: zod_1.z.date(),
25
- onlineAt: zod_1.z.date().nullable(),
26
- subRevokedAt: zod_1.z.date().nullable(),
27
- lastTrafficResetAt: zod_1.z.date().nullable(),
23
+ subLastOpenedAt: zod_1.z.nullable(zod_1.z.nullable(zod_1.z.string().datetime({ offset: true }))),
24
+ expireAt: zod_1.z.nullable(zod_1.z.string().datetime({ offset: true })),
25
+ onlineAt: zod_1.z.nullable(zod_1.z.string().datetime({ offset: true })),
26
+ subRevokedAt: zod_1.z.nullable(zod_1.z.string().datetime({ offset: true })),
27
+ lastTrafficResetAt: zod_1.z.nullable(zod_1.z.string().datetime({ offset: true })),
28
28
  trojanPassword: zod_1.z.string(),
29
29
  vlessUuid: zod_1.z.string().uuid(),
30
30
  ssPassword: zod_1.z.string(),
31
- createdAt: zod_1.z.date(),
32
- updatedAt: zod_1.z.date(),
31
+ createdAt: zod_1.z.string().datetime({ offset: true }),
32
+ updatedAt: zod_1.z.string().datetime({ offset: true }),
33
33
  activeUserInbounds: zod_1.z.array(inbounds_schema_1.InboundsSchema),
34
34
  });
@@ -10,7 +10,7 @@ export const NodesSchema = z.object({
10
10
  isConnecting: z.boolean(),
11
11
  isNodeOnline: z.boolean(),
12
12
  isXrayRunning: z.boolean(),
13
- lastStatusChange: z.nullable(z.date()),
13
+ lastStatusChange: z.nullable(z.string().transform((str) => new Date(str))),
14
14
  lastStatusMessage: z.nullable(z.string()),
15
15
  xrayVersion: z.nullable(z.string()),
16
16
  isTrafficTrackingActive: z.boolean(),
@@ -20,19 +20,19 @@ export const UsersSchema = z.object({
20
20
  })
21
21
  .default(RESET_PERIODS_VALUES[0]),
22
22
  subLastUserAgent: z.nullable(z.string()),
23
- subLastOpenedAt: z.nullable(z.date()),
23
+ subLastOpenedAt: z.nullable(z.nullable(z.string().datetime({ offset: true }))),
24
24
 
25
- expireAt: z.date(),
26
- onlineAt: z.date().nullable(),
27
- subRevokedAt: z.date().nullable(),
28
- lastTrafficResetAt: z.date().nullable(),
25
+ expireAt: z.nullable(z.string().datetime({ offset: true })),
26
+ onlineAt: z.nullable(z.string().datetime({ offset: true })),
27
+ subRevokedAt: z.nullable(z.string().datetime({ offset: true })),
28
+ lastTrafficResetAt: z.nullable(z.string().datetime({ offset: true })),
29
29
 
30
30
  trojanPassword: z.string(),
31
31
  vlessUuid: z.string().uuid(),
32
32
  ssPassword: z.string(),
33
33
 
34
- createdAt: z.date(),
35
- updatedAt: z.date(),
34
+ createdAt: z.string().datetime({ offset: true }),
35
+ updatedAt: z.string().datetime({ offset: true }),
36
36
 
37
37
  activeUserInbounds: z.array(InboundsSchema),
38
38
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "0.0.43",
3
+ "version": "0.0.45",
4
4
  "description": "A contract library for Remnawave",
5
5
  "main": "index.js",
6
6
  "scripts": {