@remnawave/backend-contract 0.0.46 → 0.0.48

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,7 +20,7 @@ var GetSubscriptionInfoByShortUuidCommand;
20
20
  trafficUsed: zod_1.z.string(),
21
21
  trafficLimit: zod_1.z.string(),
22
22
  username: zod_1.z.string(),
23
- expiresAt: zod_1.z.date(),
23
+ expiresAt: zod_1.z.string().transform((str) => new Date(str)),
24
24
  isActive: zod_1.z.boolean(),
25
25
  userStatus: zod_1.z.enum([constants_1.USERS_STATUS_VALUES[0], ...constants_1.USERS_STATUS_VALUES]),
26
26
  }),
@@ -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.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 })),
23
+ subLastOpenedAt: zod_1.z.nullable(zod_1.z.string().transform((str) => new Date(str))),
24
+ expireAt: zod_1.z.nullable(zod_1.z.string().transform((str) => new Date(str))),
25
+ onlineAt: zod_1.z.nullable(zod_1.z.string().transform((str) => new Date(str))),
26
+ subRevokedAt: zod_1.z.nullable(zod_1.z.string().transform((str) => new Date(str))),
27
+ lastTrafficResetAt: zod_1.z.nullable(zod_1.z.string().transform((str) => new Date(str))),
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.string().datetime({ offset: true }),
32
- updatedAt: zod_1.z.string().datetime({ offset: true }),
31
+ createdAt: zod_1.z.string().transform((str) => new Date(str)),
32
+ updatedAt: zod_1.z.string().transform((str) => new Date(str)),
33
33
  activeUserInbounds: zod_1.z.array(inbounds_schema_1.InboundsSchema),
34
34
  });
@@ -21,7 +21,7 @@ export namespace GetSubscriptionInfoByShortUuidCommand {
21
21
  trafficUsed: z.string(),
22
22
  trafficLimit: z.string(),
23
23
  username: z.string(),
24
- expiresAt: z.date(),
24
+ expiresAt: z.string().transform((str) => new Date(str)),
25
25
  isActive: z.boolean(),
26
26
  userStatus: z.enum([USERS_STATUS_VALUES[0], ...USERS_STATUS_VALUES]),
27
27
  }),
@@ -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.nullable(z.string().datetime({ offset: true }))),
23
+ subLastOpenedAt: z.nullable(z.string().transform((str) => new Date(str))),
24
24
 
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 })),
25
+ expireAt: z.nullable(z.string().transform((str) => new Date(str))),
26
+ onlineAt: z.nullable(z.string().transform((str) => new Date(str))),
27
+ subRevokedAt: z.nullable(z.string().transform((str) => new Date(str))),
28
+ lastTrafficResetAt: z.nullable(z.string().transform((str) => new Date(str))),
29
29
 
30
30
  trojanPassword: z.string(),
31
31
  vlessUuid: z.string().uuid(),
32
32
  ssPassword: z.string(),
33
33
 
34
- createdAt: z.string().datetime({ offset: true }),
35
- updatedAt: z.string().datetime({ offset: true }),
34
+ createdAt: z.string().transform((str) => new Date(str)),
35
+ updatedAt: z.string().transform((str) => new Date(str)),
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.46",
3
+ "version": "0.0.48",
4
4
  "description": "A contract library for Remnawave",
5
5
  "main": "index.js",
6
6
  "scripts": {