@remnawave/backend-contract 0.1.13 → 0.1.15

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.ZodUnion<[z.ZodString, z.ZodDate]>, Date, string | Date>;
26
+ expireAt: z.ZodEffects<z.ZodString, Date, string>;
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 | Date;
49
+ expireAt: string;
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAkGxB,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,15 +79,15 @@ var CreateUserCommand;
79
79
  })
80
80
  .optional(),
81
81
  expireAt: zod_1.z
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)))
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, local: true })
87
+ .transform((str) => new Date(str))
87
88
  .describe('Date format: 2025-01-17T15:38:45.065Z'),
88
89
  createdAt: zod_1.z
89
90
  .string({
90
- required_error: 'Expiration date is required',
91
91
  invalid_type_error: 'Invalid date format',
92
92
  })
93
93
  .datetime({ message: 'Invalid date format', offset: true })
@@ -96,7 +96,6 @@ var CreateUserCommand;
96
96
  .optional(),
97
97
  lastTrafficResetAt: zod_1.z
98
98
  .string({
99
- required_error: 'Expiration date is required',
100
99
  invalid_type_error: 'Invalid date format',
101
100
  })
102
101
  .datetime({ message: 'Invalid date format', offset: true })
@@ -4,19 +4,19 @@ export declare namespace GetXrayConfigCommand {
4
4
  const TSQ_url: "/api/xray/get-config";
5
5
  const ResponseSchema: z.ZodObject<{
6
6
  response: z.ZodObject<{
7
- config: z.ZodRecord<z.ZodString, z.ZodAny>;
7
+ config: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
8
8
  }, "strip", z.ZodTypeAny, {
9
- config: Record<string, any>;
9
+ config: {};
10
10
  }, {
11
- config: Record<string, any>;
11
+ config: {};
12
12
  }>;
13
13
  }, "strip", z.ZodTypeAny, {
14
14
  response: {
15
- config: Record<string, any>;
15
+ config: {};
16
16
  };
17
17
  }, {
18
18
  response: {
19
- config: Record<string, any>;
19
+ config: {};
20
20
  };
21
21
  }>;
22
22
  type Response = z.infer<typeof ResponseSchema>;
@@ -9,7 +9,7 @@ var GetXrayConfigCommand;
9
9
  GetXrayConfigCommand.TSQ_url = GetXrayConfigCommand.url;
10
10
  GetXrayConfigCommand.ResponseSchema = zod_1.z.object({
11
11
  response: zod_1.z.object({
12
- config: zod_1.z.record(zod_1.z.any()),
12
+ config: zod_1.z.object({}),
13
13
  }),
14
14
  });
15
15
  })(GetXrayConfigCommand || (exports.GetXrayConfigCommand = GetXrayConfigCommand = {}));
@@ -2,23 +2,23 @@ import { z } from 'zod';
2
2
  export declare namespace UpdateXrayConfigCommand {
3
3
  const url: "/api/xray/update-config";
4
4
  const TSQ_url: "/api/xray/update-config";
5
- const RequestSchema: z.ZodRecord<z.ZodString, z.ZodAny>;
5
+ const RequestSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
6
6
  type Request = z.infer<typeof RequestSchema>;
7
7
  const ResponseSchema: z.ZodObject<{
8
8
  response: z.ZodObject<{
9
- config: z.ZodRecord<z.ZodString, z.ZodAny>;
9
+ config: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
10
10
  }, "strip", z.ZodTypeAny, {
11
- config: Record<string, any>;
11
+ config: {};
12
12
  }, {
13
- config: Record<string, any>;
13
+ config: {};
14
14
  }>;
15
15
  }, "strip", z.ZodTypeAny, {
16
16
  response: {
17
- config: Record<string, any>;
17
+ config: {};
18
18
  };
19
19
  }, {
20
20
  response: {
21
- config: Record<string, any>;
21
+ config: {};
22
22
  };
23
23
  }>;
24
24
  type Response = z.infer<typeof ResponseSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"update-config.command.d.ts","sourceRoot":"","sources":["../../../../commands/xray/update-config.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,uBAAuB,CAAC;IAC9B,MAAM,GAAG,2BAA8B,CAAC;IACxC,MAAM,OAAO,2BAAM,CAAC;IAEpB,MAAM,aAAa,oCAAoB,CAAC;IAE/C,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"}
1
+ {"version":3,"file":"update-config.command.d.ts","sourceRoot":"","sources":["../../../../commands/xray/update-config.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,uBAAuB,CAAC;IAC9B,MAAM,GAAG,2BAA8B,CAAC;IACxC,MAAM,OAAO,2BAAM,CAAC;IAEpB,MAAM,aAAa,gDAAe,CAAC;IAE1C,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"}
@@ -7,10 +7,10 @@ var UpdateXrayConfigCommand;
7
7
  (function (UpdateXrayConfigCommand) {
8
8
  UpdateXrayConfigCommand.url = api_1.REST_API.XRAY.UPDATE_CONFIG;
9
9
  UpdateXrayConfigCommand.TSQ_url = UpdateXrayConfigCommand.url;
10
- UpdateXrayConfigCommand.RequestSchema = zod_1.z.record(zod_1.z.any());
10
+ UpdateXrayConfigCommand.RequestSchema = zod_1.z.object({});
11
11
  UpdateXrayConfigCommand.ResponseSchema = zod_1.z.object({
12
12
  response: zod_1.z.object({
13
- config: zod_1.z.record(zod_1.z.any()),
13
+ config: zod_1.z.object({}),
14
14
  }),
15
15
  });
16
16
  })(UpdateXrayConfigCommand || (exports.UpdateXrayConfigCommand = UpdateXrayConfigCommand = {}));
@@ -79,15 +79,15 @@ var CreateUserCommand;
79
79
  })
80
80
  .optional(),
81
81
  expireAt: zod_1.z
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)))
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, local: true })
87
+ .transform((str) => new Date(str))
87
88
  .describe('Date format: 2025-01-17T15:38:45.065Z'),
88
89
  createdAt: zod_1.z
89
90
  .string({
90
- required_error: 'Expiration date is required',
91
91
  invalid_type_error: 'Invalid date format',
92
92
  })
93
93
  .datetime({ message: 'Invalid date format', offset: true })
@@ -96,7 +96,6 @@ var CreateUserCommand;
96
96
  .optional(),
97
97
  lastTrafficResetAt: zod_1.z
98
98
  .string({
99
- required_error: 'Expiration date is required',
100
99
  invalid_type_error: 'Invalid date format',
101
100
  })
102
101
  .datetime({ message: 'Invalid date format', offset: true })
@@ -9,7 +9,7 @@ var GetXrayConfigCommand;
9
9
  GetXrayConfigCommand.TSQ_url = GetXrayConfigCommand.url;
10
10
  GetXrayConfigCommand.ResponseSchema = zod_1.z.object({
11
11
  response: zod_1.z.object({
12
- config: zod_1.z.record(zod_1.z.any()),
12
+ config: zod_1.z.object({}),
13
13
  }),
14
14
  });
15
15
  })(GetXrayConfigCommand || (exports.GetXrayConfigCommand = GetXrayConfigCommand = {}));
@@ -7,10 +7,10 @@ var UpdateXrayConfigCommand;
7
7
  (function (UpdateXrayConfigCommand) {
8
8
  UpdateXrayConfigCommand.url = api_1.REST_API.XRAY.UPDATE_CONFIG;
9
9
  UpdateXrayConfigCommand.TSQ_url = UpdateXrayConfigCommand.url;
10
- UpdateXrayConfigCommand.RequestSchema = zod_1.z.record(zod_1.z.any());
10
+ UpdateXrayConfigCommand.RequestSchema = zod_1.z.object({});
11
11
  UpdateXrayConfigCommand.ResponseSchema = zod_1.z.object({
12
12
  response: zod_1.z.object({
13
- config: zod_1.z.record(zod_1.z.any()),
13
+ config: zod_1.z.object({}),
14
14
  }),
15
15
  });
16
16
  })(UpdateXrayConfigCommand || (exports.UpdateXrayConfigCommand = UpdateXrayConfigCommand = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
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.",