@remnawave/backend-contract 0.7.12 → 0.7.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.
@@ -17,12 +17,12 @@ export declare namespace CreateUserCommand {
17
17
  vlessUuid: z.ZodOptional<z.ZodString>;
18
18
  ssPassword: z.ZodOptional<z.ZodString>;
19
19
  trafficLimitBytes: z.ZodOptional<z.ZodNumber>;
20
- trafficLimitStrategy: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodDefault<z.ZodNativeEnum<{
20
+ trafficLimitStrategy: z.ZodOptional<z.ZodEffects<z.ZodDefault<z.ZodDefault<z.ZodNativeEnum<{
21
21
  readonly NO_RESET: "NO_RESET";
22
22
  readonly DAY: "DAY";
23
23
  readonly WEEK: "WEEK";
24
24
  readonly MONTH: "MONTH";
25
- }>>>>, "MONTH" | "NO_RESET" | "DAY" | "WEEK", "MONTH" | "NO_RESET" | "DAY" | "WEEK" | undefined>;
25
+ }>>>, "MONTH" | "NO_RESET" | "DAY" | "WEEK", "MONTH" | "NO_RESET" | "DAY" | "WEEK" | undefined>>;
26
26
  activeUserInbounds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
27
27
  expireAt: z.ZodEffects<z.ZodString, Date, string>;
28
28
  createdAt: z.ZodOptional<z.ZodEffects<z.ZodString, Date, string>>;
@@ -36,7 +36,6 @@ export declare namespace CreateUserCommand {
36
36
  }, "strip", z.ZodTypeAny, {
37
37
  status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
38
38
  username: string;
39
- trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
40
39
  expireAt: Date;
41
40
  createdAt?: Date | undefined;
42
41
  tag?: string | null | undefined;
@@ -44,6 +43,7 @@ export declare namespace CreateUserCommand {
44
43
  shortUuid?: string | undefined;
45
44
  trafficLimitBytes?: number | undefined;
46
45
  description?: string | undefined;
46
+ trafficLimitStrategy?: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | undefined;
47
47
  lastTrafficResetAt?: Date | undefined;
48
48
  trojanPassword?: string | undefined;
49
49
  vlessUuid?: string | 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,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAwJxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,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,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAsJxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -68,9 +68,7 @@ var CreateUserCommand;
68
68
  .min(0, 'Traffic limit must be greater than 0')
69
69
  .optional()
70
70
  .describe('Optional. Traffic limit in bytes. Set to 0 for unlimited traffic.'),
71
- trafficLimitStrategy: models_1.UsersSchema.shape.trafficLimitStrategy
72
- .describe('Optional. Strategy for resetting traffic limits. Defaults to NO_RESET. Must be a valid reset period.')
73
- .optional()
71
+ trafficLimitStrategy: zod_1.z.optional(models_1.UsersSchema.shape.trafficLimitStrategy
74
72
  .default(constants_1.RESET_PERIODS.NO_RESET)
75
73
  .superRefine((val, ctx) => {
76
74
  if (val && !Object.values(constants_1.RESET_PERIODS).includes(val)) {
@@ -82,7 +80,7 @@ var CreateUserCommand;
82
80
  options: Object.values(constants_1.RESET_PERIODS),
83
81
  });
84
82
  }
85
- }),
83
+ })),
86
84
  activeUserInbounds: zod_1.z
87
85
  .array(zod_1.z.string().uuid(), {
88
86
  invalid_type_error: 'Enabled inbounds must be an array',
@@ -68,9 +68,7 @@ var CreateUserCommand;
68
68
  .min(0, 'Traffic limit must be greater than 0')
69
69
  .optional()
70
70
  .describe('Optional. Traffic limit in bytes. Set to 0 for unlimited traffic.'),
71
- trafficLimitStrategy: models_1.UsersSchema.shape.trafficLimitStrategy
72
- .describe('Optional. Strategy for resetting traffic limits. Defaults to NO_RESET. Must be a valid reset period.')
73
- .optional()
71
+ trafficLimitStrategy: zod_1.z.optional(models_1.UsersSchema.shape.trafficLimitStrategy
74
72
  .default(constants_1.RESET_PERIODS.NO_RESET)
75
73
  .superRefine((val, ctx) => {
76
74
  if (val && !Object.values(constants_1.RESET_PERIODS).includes(val)) {
@@ -82,7 +80,7 @@ var CreateUserCommand;
82
80
  options: Object.values(constants_1.RESET_PERIODS),
83
81
  });
84
82
  }
85
- }),
83
+ })),
86
84
  activeUserInbounds: zod_1.z
87
85
  .array(zod_1.z.string().uuid(), {
88
86
  invalid_type_error: 'Enabled inbounds must be an array',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "0.7.12",
3
+ "version": "0.7.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.",