@remnawave/backend-contract 0.1.12 → 0.1.13

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.
@@ -23,7 +23,7 @@ export declare namespace CreateUserCommand {
23
23
  readonly MONTH: "MONTH";
24
24
  }>>>>, "MONTH" | "NO_RESET" | "DAY" | "WEEK", "MONTH" | "NO_RESET" | "DAY" | "WEEK" | undefined>;
25
25
  activeUserInbounds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
26
- expireAt: z.ZodEffects<z.ZodString, Date, string>;
26
+ expireAt: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodDate]>, Date, string | Date>;
27
27
  createdAt: z.ZodOptional<z.ZodEffects<z.ZodString, Date, string>>;
28
28
  lastTrafficResetAt: z.ZodOptional<z.ZodEffects<z.ZodString, Date, string>>;
29
29
  description: z.ZodOptional<z.ZodString>;
@@ -46,7 +46,7 @@ export declare namespace CreateUserCommand {
46
46
  activateAllInbounds?: boolean | undefined;
47
47
  }, {
48
48
  username: string;
49
- expireAt: string;
49
+ expireAt: string | Date;
50
50
  status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
51
51
  createdAt?: string | undefined;
52
52
  trafficLimitBytes?: number | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"create-user.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/create-user.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,eAAwB,CAAC;IAClC,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAoGxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"create-user.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/create-user.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,eAAwB,CAAC;IAClC,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmGxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -79,12 +79,11 @@ var CreateUserCommand;
79
79
  })
80
80
  .optional(),
81
81
  expireAt: zod_1.z
82
- .string({
83
- required_error: 'Expiration date is required',
84
- invalid_type_error: 'Invalid date format',
85
- })
86
- .datetime({ message: 'Invalid date format', offset: true })
87
- .transform((str) => new Date(str))
82
+ .union([
83
+ zod_1.z.string().datetime({ message: 'Invalid date format', offset: true }),
84
+ zod_1.z.date(),
85
+ ])
86
+ .transform((val) => (val instanceof Date ? val : new Date(val)))
88
87
  .describe('Date format: 2025-01-17T15:38:45.065Z'),
89
88
  createdAt: zod_1.z
90
89
  .string({
@@ -79,12 +79,11 @@ var CreateUserCommand;
79
79
  })
80
80
  .optional(),
81
81
  expireAt: zod_1.z
82
- .string({
83
- required_error: 'Expiration date is required',
84
- invalid_type_error: 'Invalid date format',
85
- })
86
- .datetime({ message: 'Invalid date format', offset: true })
87
- .transform((str) => new Date(str))
82
+ .union([
83
+ zod_1.z.string().datetime({ message: 'Invalid date format', offset: true }),
84
+ zod_1.z.date(),
85
+ ])
86
+ .transform((val) => (val instanceof Date ? val : new Date(val)))
88
87
  .describe('Date format: 2025-01-17T15:38:45.065Z'),
89
88
  createdAt: zod_1.z
90
89
  .string({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "public": true,
5
5
  "license": "AGPL-3.0-only",
6
6
  "description": "A contract library for Remnawave Backend. It can be used in backend and frontend.",