@remnawave/backend-contract 0.0.87 → 0.0.88

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.
Files changed (30) hide show
  1. package/build/backend/commands/hosts/create.command.d.ts +16 -2
  2. package/build/backend/commands/hosts/create.command.d.ts.map +1 -1
  3. package/build/backend/commands/hosts/create.command.js +2 -2
  4. package/build/backend/commands/hosts/update.command.d.ts +16 -2
  5. package/build/backend/commands/hosts/update.command.d.ts.map +1 -1
  6. package/build/backend/commands/hosts/update.command.js +2 -2
  7. package/build/backend/commands/subscription/get-subscription-info-by-short-uuid.command.d.ts +6 -1
  8. package/build/backend/commands/subscription/get-subscription-info-by-short-uuid.command.d.ts.map +1 -1
  9. package/build/backend/commands/subscription/get-subscription-info-by-short-uuid.command.js +1 -1
  10. package/build/backend/commands/users/create-user.command.d.ts +9 -9
  11. package/build/backend/commands/users/create-user.command.d.ts.map +1 -1
  12. package/build/backend/commands/users/create-user.command.js +3 -9
  13. package/build/backend/commands/users/disable-user.command.ts.d.ts +4 -4
  14. package/build/backend/commands/users/enable-user.command.d.ts +4 -4
  15. package/build/backend/commands/users/get-all-users-v2.command.d.ts +5 -5
  16. package/build/backend/commands/users/get-user-by-short-uuid.command.d.ts +4 -4
  17. package/build/backend/commands/users/get-user-by-subscription-uuid.command.d.ts +4 -4
  18. package/build/backend/commands/users/get-user-by-username.command.d.ts +4 -4
  19. package/build/backend/commands/users/get-user-by-uuid.command.d.ts +4 -4
  20. package/build/backend/commands/users/reset-user-traffic.command.d.ts +4 -4
  21. package/build/backend/commands/users/revoke-user-subscription.command.d.ts +4 -4
  22. package/build/backend/commands/users/update-user.command.d.ts +8 -8
  23. package/build/backend/models/users.schema.d.ts +3 -3
  24. package/build/backend/models/users.schema.js +2 -2
  25. package/build/frontend/commands/hosts/create.command.js +2 -2
  26. package/build/frontend/commands/hosts/update.command.js +2 -2
  27. package/build/frontend/commands/subscription/get-subscription-info-by-short-uuid.command.js +1 -1
  28. package/build/frontend/commands/users/create-user.command.js +3 -9
  29. package/build/frontend/models/users.schema.js +2 -2
  30. package/package.json +1 -1
@@ -10,8 +10,22 @@ export declare namespace CreateHostCommand {
10
10
  path: z.ZodOptional<z.ZodString>;
11
11
  sni: z.ZodOptional<z.ZodString>;
12
12
  host: z.ZodOptional<z.ZodString>;
13
- alpn: z.ZodOptional<z.ZodNullable<z.ZodEnum<["http/1.1" | "h2" | "h2,http/1.1", ...("http/1.1" | "h2" | "h2,http/1.1")[]]>>>;
14
- fingerprint: z.ZodOptional<z.ZodNullable<z.ZodEnum<["chrome" | "firefox" | "safari" | "ios" | "android" | "edge" | "qq" | "random" | "randomized", ...("chrome" | "firefox" | "safari" | "ios" | "android" | "edge" | "qq" | "random" | "randomized")[]]>>>;
13
+ alpn: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
14
+ readonly HTTP_1_1: "http/1.1";
15
+ readonly H2: "h2";
16
+ readonly H_COMBINED: "h2,http/1.1";
17
+ }>>>;
18
+ fingerprint: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
19
+ readonly CHROME: "chrome";
20
+ readonly FIREFOX: "firefox";
21
+ readonly SAFARI: "safari";
22
+ readonly IOS: "ios";
23
+ readonly ANDROID: "android";
24
+ readonly EDGE: "edge";
25
+ readonly QQ: "qq";
26
+ readonly RANDOM: "random";
27
+ readonly RANDOMIZED: "randomized";
28
+ }>>>;
15
29
  allowInsecure: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
16
30
  isDisabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
17
31
  }, "strip", z.ZodTypeAny, {
@@ -1 +1 @@
1
- {"version":3,"file":"create.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/create.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,qBAAwB,CAAC;IAClC,MAAM,OAAO,qBAAM,CAAC;IAEpB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA8BxB,CAAC;IACH,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.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/create.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,qBAAwB,CAAC;IAClC,MAAM,OAAO,qBAAM,CAAC;IAEpB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA4BxB,CAAC;IACH,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"}
@@ -34,8 +34,8 @@ var CreateHostCommand;
34
34
  path: zod_1.z.string().optional(),
35
35
  sni: zod_1.z.string().optional(),
36
36
  host: zod_1.z.string().optional(),
37
- alpn: zod_1.z.optional(zod_1.z.enum([alpn_1.ALPN_VALUES[0], ...alpn_1.ALPN_VALUES]).nullable()),
38
- fingerprint: zod_1.z.optional(zod_1.z.enum([fingerprints_1.FINGERPRINTS_VALUES[0], ...fingerprints_1.FINGERPRINTS_VALUES]).nullable()),
37
+ alpn: zod_1.z.optional(zod_1.z.nativeEnum(alpn_1.ALPN).nullable()),
38
+ fingerprint: zod_1.z.optional(zod_1.z.nativeEnum(fingerprints_1.FINGERPRINTS).nullable()),
39
39
  allowInsecure: zod_1.z.optional(zod_1.z.boolean().default(false)),
40
40
  isDisabled: zod_1.z.optional(zod_1.z.boolean().default(false)),
41
41
  });
@@ -24,8 +24,22 @@ export declare namespace UpdateHostCommand {
24
24
  path: z.ZodOptional<z.ZodString>;
25
25
  sni: z.ZodOptional<z.ZodString>;
26
26
  host: z.ZodOptional<z.ZodString>;
27
- alpn: z.ZodOptional<z.ZodNullable<z.ZodEnum<["http/1.1" | "h2" | "h2,http/1.1", ...("http/1.1" | "h2" | "h2,http/1.1")[]]>>>;
28
- fingerprint: z.ZodOptional<z.ZodNullable<z.ZodEnum<["chrome" | "firefox" | "safari" | "ios" | "android" | "edge" | "qq" | "random" | "randomized", ...("chrome" | "firefox" | "safari" | "ios" | "android" | "edge" | "qq" | "random" | "randomized")[]]>>>;
27
+ alpn: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
28
+ readonly HTTP_1_1: "http/1.1";
29
+ readonly H2: "h2";
30
+ readonly H_COMBINED: "h2,http/1.1";
31
+ }>>>;
32
+ fingerprint: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<{
33
+ readonly CHROME: "chrome";
34
+ readonly FIREFOX: "firefox";
35
+ readonly SAFARI: "safari";
36
+ readonly IOS: "ios";
37
+ readonly ANDROID: "android";
38
+ readonly EDGE: "edge";
39
+ readonly QQ: "qq";
40
+ readonly RANDOM: "random";
41
+ readonly RANDOMIZED: "randomized";
42
+ }>>>;
29
43
  allowInsecure: z.ZodOptional<z.ZodBoolean>;
30
44
  isDisabled: z.ZodOptional<z.ZodBoolean>;
31
45
  }>, "strip", z.ZodTypeAny, {
@@ -1 +1 @@
1
- {"version":3,"file":"update.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/update.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,qBAAwB,CAAC;IAClC,MAAM,OAAO,qBAAM,CAAC;IAEpB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAqCxB,CAAC;IACH,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":"update.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/update.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,qBAAwB,CAAC;IAClC,MAAM,OAAO,qBAAM,CAAC;IAEpB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmCxB,CAAC;IACH,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"}
@@ -41,8 +41,8 @@ var UpdateHostCommand;
41
41
  path: zod_1.z.optional(zod_1.z.string()),
42
42
  sni: zod_1.z.optional(zod_1.z.string()),
43
43
  host: zod_1.z.optional(zod_1.z.string()),
44
- alpn: zod_1.z.optional(zod_1.z.enum([alpn_1.ALPN_VALUES[0], ...alpn_1.ALPN_VALUES]).nullable()),
45
- fingerprint: zod_1.z.optional(zod_1.z.enum([fingerprints_1.FINGERPRINTS_VALUES[0], ...fingerprints_1.FINGERPRINTS_VALUES]).nullable()),
44
+ alpn: zod_1.z.optional(zod_1.z.nativeEnum(alpn_1.ALPN).nullable()),
45
+ fingerprint: zod_1.z.optional(zod_1.z.nativeEnum(fingerprints_1.FINGERPRINTS).nullable()),
46
46
  allowInsecure: zod_1.z.optional(zod_1.z.boolean()),
47
47
  isDisabled: zod_1.z.optional(zod_1.z.boolean()),
48
48
  });
@@ -21,7 +21,12 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
21
21
  username: z.ZodString;
22
22
  expiresAt: z.ZodEffects<z.ZodString, Date, string>;
23
23
  isActive: z.ZodBoolean;
24
- userStatus: z.ZodEnum<["DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE", ...("DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE")[]]>;
24
+ userStatus: z.ZodNativeEnum<{
25
+ readonly ACTIVE: "ACTIVE";
26
+ readonly DISABLED: "DISABLED";
27
+ readonly LIMITED: "LIMITED";
28
+ readonly EXPIRED: "EXPIRED";
29
+ }>;
25
30
  }, "strip", z.ZodTypeAny, {
26
31
  username: string;
27
32
  shortUuid: string;
@@ -1 +1 @@
1
- {"version":3,"file":"get-subscription-info-by-short-uuid.command.d.ts","sourceRoot":"","sources":["../../../../commands/subscription/get-subscription-info-by-short-uuid.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,qCAAqC,CAAC;IAC5C,MAAM,GAAG,+BAAiC,CAAC;IAC3C,MAAM,OAAO,QAAoB,CAAC;IAElC,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAczB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"get-subscription-info-by-short-uuid.command.d.ts","sourceRoot":"","sources":["../../../../commands/subscription/get-subscription-info-by-short-uuid.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,qCAAqC,CAAC;IAC5C,MAAM,GAAG,+BAAiC,CAAC;IAC3C,MAAM,OAAO,QAAoB,CAAC;IAElC,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAczB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -22,7 +22,7 @@ var GetSubscriptionInfoByShortUuidCommand;
22
22
  username: zod_1.z.string(),
23
23
  expiresAt: zod_1.z.string().transform((str) => new Date(str)),
24
24
  isActive: zod_1.z.boolean(),
25
- userStatus: zod_1.z.enum([constants_1.USERS_STATUS_VALUES[0], ...constants_1.USERS_STATUS_VALUES]),
25
+ userStatus: zod_1.z.nativeEnum(constants_1.USERS_STATUS),
26
26
  }),
27
27
  }),
28
28
  });
@@ -4,12 +4,12 @@ export declare namespace CreateUserCommand {
4
4
  const TSQ_url: "/api/users/";
5
5
  const RequestSchema: z.ZodObject<{
6
6
  username: z.ZodString;
7
- status: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<{
7
+ status: z.ZodDefault<z.ZodOptional<z.ZodDefault<z.ZodNativeEnum<{
8
8
  readonly ACTIVE: "ACTIVE";
9
9
  readonly DISABLED: "DISABLED";
10
10
  readonly LIMITED: "LIMITED";
11
11
  readonly EXPIRED: "EXPIRED";
12
- }>>>;
12
+ }>>>>;
13
13
  subscriptionUuid: z.ZodOptional<z.ZodString>;
14
14
  shortUuid: z.ZodOptional<z.ZodString>;
15
15
  trojanPassword: z.ZodOptional<z.ZodString>;
@@ -25,9 +25,9 @@ export declare namespace CreateUserCommand {
25
25
  readonly CALENDAR_MONTH: "CALENDAR_MONTH";
26
26
  }>>>>, "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH", "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined>;
27
27
  activeUserInbounds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
28
- expireAt: z.ZodEffects<z.ZodDate, Date, Date>;
29
- createdAt: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, Date>>;
30
- lastTrafficResetAt: z.ZodOptional<z.ZodEffects<z.ZodDate, Date, Date>>;
28
+ expireAt: z.ZodDate;
29
+ createdAt: z.ZodOptional<z.ZodDate>;
30
+ lastTrafficResetAt: z.ZodOptional<z.ZodDate>;
31
31
  description: z.ZodOptional<z.ZodString>;
32
32
  activateAllInbounds: z.ZodOptional<z.ZodBoolean>;
33
33
  }, "strip", z.ZodTypeAny, {
@@ -70,12 +70,12 @@ export declare namespace CreateUserCommand {
70
70
  subscriptionUuid: z.ZodString;
71
71
  shortUuid: z.ZodString;
72
72
  username: z.ZodString;
73
- status: z.ZodNativeEnum<{
73
+ status: z.ZodDefault<z.ZodNativeEnum<{
74
74
  readonly ACTIVE: "ACTIVE";
75
75
  readonly DISABLED: "DISABLED";
76
76
  readonly LIMITED: "LIMITED";
77
77
  readonly EXPIRED: "EXPIRED";
78
- }>;
78
+ }>>;
79
79
  usedTrafficBytes: z.ZodNumber;
80
80
  lifetimeUsedTrafficBytes: z.ZodNumber;
81
81
  trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
@@ -142,7 +142,6 @@ export declare namespace CreateUserCommand {
142
142
  }, {
143
143
  uuid: string;
144
144
  username: string;
145
- status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
146
145
  createdAt: string;
147
146
  updatedAt: string;
148
147
  subscriptionUuid: string;
@@ -164,6 +163,7 @@ export declare namespace CreateUserCommand {
164
163
  type: string;
165
164
  tag: string;
166
165
  }[];
166
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
167
167
  trafficLimitBytes?: number | undefined;
168
168
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined;
169
169
  }>;
@@ -200,7 +200,6 @@ export declare namespace CreateUserCommand {
200
200
  response: {
201
201
  uuid: string;
202
202
  username: string;
203
- status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
204
203
  createdAt: string;
205
204
  updatedAt: string;
206
205
  subscriptionUuid: string;
@@ -222,6 +221,7 @@ export declare namespace CreateUserCommand {
222
221
  type: string;
223
222
  tag: string;
224
223
  }[];
224
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
225
225
  trafficLimitBytes?: number | undefined;
226
226
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined;
227
227
  };
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA8FxB,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"}
@@ -83,26 +83,20 @@ var CreateUserCommand;
83
83
  required_error: 'Expiration date is required',
84
84
  invalid_type_error: 'Invalid expiration date format',
85
85
  })
86
- .refine(() => new Date(), {
87
- message: 'Expiration date cannot be in the past',
88
- }),
86
+ .describe('Date format: 2025-01-17T15:38:45.065Z'),
89
87
  createdAt: zod_1.z.coerce
90
88
  .date({
91
89
  required_error: 'Expiration date is required',
92
90
  invalid_type_error: 'Invalid expiration date format',
93
91
  })
94
- .refine(() => new Date(), {
95
- message: 'Expiration date cannot be in the past',
96
- })
92
+ .describe('Date format: 2025-01-17T15:38:45.065Z')
97
93
  .optional(),
98
94
  lastTrafficResetAt: zod_1.z.coerce
99
95
  .date({
100
96
  required_error: 'Expiration date is required',
101
97
  invalid_type_error: 'Invalid expiration date format',
102
98
  })
103
- .refine(() => new Date(), {
104
- message: 'Expiration date cannot be in the past',
105
- })
99
+ .describe('Date format: 2025-01-17T15:38:45.065Z')
106
100
  .optional(),
107
101
  description: zod_1.z.string().optional(),
108
102
  activateAllInbounds: zod_1.z.boolean().optional(),
@@ -16,12 +16,12 @@ export declare namespace DisableUserCommand {
16
16
  subscriptionUuid: z.ZodString;
17
17
  shortUuid: z.ZodString;
18
18
  username: z.ZodString;
19
- status: z.ZodNativeEnum<{
19
+ status: z.ZodDefault<z.ZodNativeEnum<{
20
20
  readonly ACTIVE: "ACTIVE";
21
21
  readonly DISABLED: "DISABLED";
22
22
  readonly LIMITED: "LIMITED";
23
23
  readonly EXPIRED: "EXPIRED";
24
- }>;
24
+ }>>;
25
25
  usedTrafficBytes: z.ZodNumber;
26
26
  lifetimeUsedTrafficBytes: z.ZodNumber;
27
27
  trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
@@ -91,7 +91,6 @@ export declare namespace DisableUserCommand {
91
91
  }, {
92
92
  uuid: string;
93
93
  username: string;
94
- status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
95
94
  createdAt: string;
96
95
  updatedAt: string;
97
96
  subscriptionUuid: string;
@@ -114,6 +113,7 @@ export declare namespace DisableUserCommand {
114
113
  tag: string;
115
114
  }[];
116
115
  subscriptionUrl: string;
116
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
117
117
  trafficLimitBytes?: number | undefined;
118
118
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined;
119
119
  }>;
@@ -151,7 +151,6 @@ export declare namespace DisableUserCommand {
151
151
  response: {
152
152
  uuid: string;
153
153
  username: string;
154
- status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
155
154
  createdAt: string;
156
155
  updatedAt: string;
157
156
  subscriptionUuid: string;
@@ -174,6 +173,7 @@ export declare namespace DisableUserCommand {
174
173
  tag: string;
175
174
  }[];
176
175
  subscriptionUrl: string;
176
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
177
177
  trafficLimitBytes?: number | undefined;
178
178
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined;
179
179
  };
@@ -16,12 +16,12 @@ export declare namespace EnableUserCommand {
16
16
  subscriptionUuid: z.ZodString;
17
17
  shortUuid: z.ZodString;
18
18
  username: z.ZodString;
19
- status: z.ZodNativeEnum<{
19
+ status: z.ZodDefault<z.ZodNativeEnum<{
20
20
  readonly ACTIVE: "ACTIVE";
21
21
  readonly DISABLED: "DISABLED";
22
22
  readonly LIMITED: "LIMITED";
23
23
  readonly EXPIRED: "EXPIRED";
24
- }>;
24
+ }>>;
25
25
  usedTrafficBytes: z.ZodNumber;
26
26
  lifetimeUsedTrafficBytes: z.ZodNumber;
27
27
  trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
@@ -91,7 +91,6 @@ export declare namespace EnableUserCommand {
91
91
  }, {
92
92
  uuid: string;
93
93
  username: string;
94
- status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
95
94
  createdAt: string;
96
95
  updatedAt: string;
97
96
  subscriptionUuid: string;
@@ -114,6 +113,7 @@ export declare namespace EnableUserCommand {
114
113
  tag: string;
115
114
  }[];
116
115
  subscriptionUrl: string;
116
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
117
117
  trafficLimitBytes?: number | undefined;
118
118
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined;
119
119
  }>;
@@ -151,7 +151,6 @@ export declare namespace EnableUserCommand {
151
151
  response: {
152
152
  uuid: string;
153
153
  username: string;
154
- status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
155
154
  createdAt: string;
156
155
  updatedAt: string;
157
156
  subscriptionUuid: string;
@@ -174,6 +173,7 @@ export declare namespace EnableUserCommand {
174
173
  tag: string;
175
174
  }[];
176
175
  subscriptionUrl: string;
176
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
177
177
  trafficLimitBytes?: number | undefined;
178
178
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined;
179
179
  };
@@ -62,12 +62,12 @@ export declare namespace GetAllUsersV2Command {
62
62
  subscriptionUuid: z.ZodString;
63
63
  shortUuid: z.ZodString;
64
64
  username: z.ZodString;
65
- status: z.ZodNativeEnum<{
65
+ status: z.ZodDefault<z.ZodNativeEnum<{
66
66
  readonly ACTIVE: "ACTIVE";
67
67
  readonly DISABLED: "DISABLED";
68
68
  readonly LIMITED: "LIMITED";
69
69
  readonly EXPIRED: "EXPIRED";
70
- }>;
70
+ }>>;
71
71
  usedTrafficBytes: z.ZodNumber;
72
72
  lifetimeUsedTrafficBytes: z.ZodNumber;
73
73
  trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
@@ -151,7 +151,6 @@ export declare namespace GetAllUsersV2Command {
151
151
  }, {
152
152
  uuid: string;
153
153
  username: string;
154
- status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
155
154
  createdAt: string;
156
155
  updatedAt: string;
157
156
  subscriptionUuid: string;
@@ -178,6 +177,7 @@ export declare namespace GetAllUsersV2Command {
178
177
  nodeName: string;
179
178
  connectedAt: string;
180
179
  } | null;
180
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
181
181
  trafficLimitBytes?: number | undefined;
182
182
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined;
183
183
  }>, "many">;
@@ -221,7 +221,6 @@ export declare namespace GetAllUsersV2Command {
221
221
  users: {
222
222
  uuid: string;
223
223
  username: string;
224
- status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
225
224
  createdAt: string;
226
225
  updatedAt: string;
227
226
  subscriptionUuid: string;
@@ -248,6 +247,7 @@ export declare namespace GetAllUsersV2Command {
248
247
  nodeName: string;
249
248
  connectedAt: string;
250
249
  } | null;
250
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
251
251
  trafficLimitBytes?: number | undefined;
252
252
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined;
253
253
  }[];
@@ -295,7 +295,6 @@ export declare namespace GetAllUsersV2Command {
295
295
  users: {
296
296
  uuid: string;
297
297
  username: string;
298
- status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
299
298
  createdAt: string;
300
299
  updatedAt: string;
301
300
  subscriptionUuid: string;
@@ -322,6 +321,7 @@ export declare namespace GetAllUsersV2Command {
322
321
  nodeName: string;
323
322
  connectedAt: string;
324
323
  } | null;
324
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
325
325
  trafficLimitBytes?: number | undefined;
326
326
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined;
327
327
  }[];
@@ -16,12 +16,12 @@ export declare namespace GetUserByShortUuidCommand {
16
16
  subscriptionUuid: z.ZodString;
17
17
  shortUuid: z.ZodString;
18
18
  username: z.ZodString;
19
- status: z.ZodNativeEnum<{
19
+ status: z.ZodDefault<z.ZodNativeEnum<{
20
20
  readonly ACTIVE: "ACTIVE";
21
21
  readonly DISABLED: "DISABLED";
22
22
  readonly LIMITED: "LIMITED";
23
23
  readonly EXPIRED: "EXPIRED";
24
- }>;
24
+ }>>;
25
25
  usedTrafficBytes: z.ZodNumber;
26
26
  lifetimeUsedTrafficBytes: z.ZodNumber;
27
27
  trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
@@ -88,7 +88,6 @@ export declare namespace GetUserByShortUuidCommand {
88
88
  }, {
89
89
  uuid: string;
90
90
  username: string;
91
- status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
92
91
  createdAt: string;
93
92
  updatedAt: string;
94
93
  subscriptionUuid: string;
@@ -110,6 +109,7 @@ export declare namespace GetUserByShortUuidCommand {
110
109
  type: string;
111
110
  tag: string;
112
111
  }[];
112
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
113
113
  trafficLimitBytes?: number | undefined;
114
114
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined;
115
115
  }>;
@@ -146,7 +146,6 @@ export declare namespace GetUserByShortUuidCommand {
146
146
  response: {
147
147
  uuid: string;
148
148
  username: string;
149
- status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
150
149
  createdAt: string;
151
150
  updatedAt: string;
152
151
  subscriptionUuid: string;
@@ -168,6 +167,7 @@ export declare namespace GetUserByShortUuidCommand {
168
167
  type: string;
169
168
  tag: string;
170
169
  }[];
170
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
171
171
  trafficLimitBytes?: number | undefined;
172
172
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined;
173
173
  };
@@ -16,12 +16,12 @@ export declare namespace GetUserBySubscriptionUuidCommand {
16
16
  subscriptionUuid: z.ZodString;
17
17
  shortUuid: z.ZodString;
18
18
  username: z.ZodString;
19
- status: z.ZodNativeEnum<{
19
+ status: z.ZodDefault<z.ZodNativeEnum<{
20
20
  readonly ACTIVE: "ACTIVE";
21
21
  readonly DISABLED: "DISABLED";
22
22
  readonly LIMITED: "LIMITED";
23
23
  readonly EXPIRED: "EXPIRED";
24
- }>;
24
+ }>>;
25
25
  usedTrafficBytes: z.ZodNumber;
26
26
  lifetimeUsedTrafficBytes: z.ZodNumber;
27
27
  trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
@@ -88,7 +88,6 @@ export declare namespace GetUserBySubscriptionUuidCommand {
88
88
  }, {
89
89
  uuid: string;
90
90
  username: string;
91
- status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
92
91
  createdAt: string;
93
92
  updatedAt: string;
94
93
  subscriptionUuid: string;
@@ -110,6 +109,7 @@ export declare namespace GetUserBySubscriptionUuidCommand {
110
109
  type: string;
111
110
  tag: string;
112
111
  }[];
112
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
113
113
  trafficLimitBytes?: number | undefined;
114
114
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined;
115
115
  }>;
@@ -146,7 +146,6 @@ export declare namespace GetUserBySubscriptionUuidCommand {
146
146
  response: {
147
147
  uuid: string;
148
148
  username: string;
149
- status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
150
149
  createdAt: string;
151
150
  updatedAt: string;
152
151
  subscriptionUuid: string;
@@ -168,6 +167,7 @@ export declare namespace GetUserBySubscriptionUuidCommand {
168
167
  type: string;
169
168
  tag: string;
170
169
  }[];
170
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
171
171
  trafficLimitBytes?: number | undefined;
172
172
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined;
173
173
  };
@@ -16,12 +16,12 @@ export declare namespace GetUserByUsernameCommand {
16
16
  subscriptionUuid: z.ZodString;
17
17
  shortUuid: z.ZodString;
18
18
  username: z.ZodString;
19
- status: z.ZodNativeEnum<{
19
+ status: z.ZodDefault<z.ZodNativeEnum<{
20
20
  readonly ACTIVE: "ACTIVE";
21
21
  readonly DISABLED: "DISABLED";
22
22
  readonly LIMITED: "LIMITED";
23
23
  readonly EXPIRED: "EXPIRED";
24
- }>;
24
+ }>>;
25
25
  usedTrafficBytes: z.ZodNumber;
26
26
  lifetimeUsedTrafficBytes: z.ZodNumber;
27
27
  trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
@@ -88,7 +88,6 @@ export declare namespace GetUserByUsernameCommand {
88
88
  }, {
89
89
  uuid: string;
90
90
  username: string;
91
- status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
92
91
  createdAt: string;
93
92
  updatedAt: string;
94
93
  subscriptionUuid: string;
@@ -110,6 +109,7 @@ export declare namespace GetUserByUsernameCommand {
110
109
  type: string;
111
110
  tag: string;
112
111
  }[];
112
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
113
113
  trafficLimitBytes?: number | undefined;
114
114
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined;
115
115
  }>;
@@ -146,7 +146,6 @@ export declare namespace GetUserByUsernameCommand {
146
146
  response: {
147
147
  uuid: string;
148
148
  username: string;
149
- status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
150
149
  createdAt: string;
151
150
  updatedAt: string;
152
151
  subscriptionUuid: string;
@@ -168,6 +167,7 @@ export declare namespace GetUserByUsernameCommand {
168
167
  type: string;
169
168
  tag: string;
170
169
  }[];
170
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
171
171
  trafficLimitBytes?: number | undefined;
172
172
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined;
173
173
  };
@@ -16,12 +16,12 @@ export declare namespace GetUserByUuidCommand {
16
16
  subscriptionUuid: z.ZodString;
17
17
  shortUuid: z.ZodString;
18
18
  username: z.ZodString;
19
- status: z.ZodNativeEnum<{
19
+ status: z.ZodDefault<z.ZodNativeEnum<{
20
20
  readonly ACTIVE: "ACTIVE";
21
21
  readonly DISABLED: "DISABLED";
22
22
  readonly LIMITED: "LIMITED";
23
23
  readonly EXPIRED: "EXPIRED";
24
- }>;
24
+ }>>;
25
25
  usedTrafficBytes: z.ZodNumber;
26
26
  lifetimeUsedTrafficBytes: z.ZodNumber;
27
27
  trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
@@ -91,7 +91,6 @@ export declare namespace GetUserByUuidCommand {
91
91
  }, {
92
92
  uuid: string;
93
93
  username: string;
94
- status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
95
94
  createdAt: string;
96
95
  updatedAt: string;
97
96
  subscriptionUuid: string;
@@ -114,6 +113,7 @@ export declare namespace GetUserByUuidCommand {
114
113
  tag: string;
115
114
  }[];
116
115
  subscriptionUrl: string;
116
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
117
117
  trafficLimitBytes?: number | undefined;
118
118
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined;
119
119
  }>;
@@ -151,7 +151,6 @@ export declare namespace GetUserByUuidCommand {
151
151
  response: {
152
152
  uuid: string;
153
153
  username: string;
154
- status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
155
154
  createdAt: string;
156
155
  updatedAt: string;
157
156
  subscriptionUuid: string;
@@ -174,6 +173,7 @@ export declare namespace GetUserByUuidCommand {
174
173
  tag: string;
175
174
  }[];
176
175
  subscriptionUrl: string;
176
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
177
177
  trafficLimitBytes?: number | undefined;
178
178
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined;
179
179
  };
@@ -16,12 +16,12 @@ export declare namespace ResetUserTrafficCommand {
16
16
  subscriptionUuid: z.ZodString;
17
17
  shortUuid: z.ZodString;
18
18
  username: z.ZodString;
19
- status: z.ZodNativeEnum<{
19
+ status: z.ZodDefault<z.ZodNativeEnum<{
20
20
  readonly ACTIVE: "ACTIVE";
21
21
  readonly DISABLED: "DISABLED";
22
22
  readonly LIMITED: "LIMITED";
23
23
  readonly EXPIRED: "EXPIRED";
24
- }>;
24
+ }>>;
25
25
  usedTrafficBytes: z.ZodNumber;
26
26
  lifetimeUsedTrafficBytes: z.ZodNumber;
27
27
  trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
@@ -88,7 +88,6 @@ export declare namespace ResetUserTrafficCommand {
88
88
  }, {
89
89
  uuid: string;
90
90
  username: string;
91
- status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
92
91
  createdAt: string;
93
92
  updatedAt: string;
94
93
  subscriptionUuid: string;
@@ -110,6 +109,7 @@ export declare namespace ResetUserTrafficCommand {
110
109
  type: string;
111
110
  tag: string;
112
111
  }[];
112
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
113
113
  trafficLimitBytes?: number | undefined;
114
114
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined;
115
115
  }>;
@@ -146,7 +146,6 @@ export declare namespace ResetUserTrafficCommand {
146
146
  response: {
147
147
  uuid: string;
148
148
  username: string;
149
- status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
150
149
  createdAt: string;
151
150
  updatedAt: string;
152
151
  subscriptionUuid: string;
@@ -168,6 +167,7 @@ export declare namespace ResetUserTrafficCommand {
168
167
  type: string;
169
168
  tag: string;
170
169
  }[];
170
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
171
171
  trafficLimitBytes?: number | undefined;
172
172
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined;
173
173
  };
@@ -16,12 +16,12 @@ export declare namespace RevokeUserSubscriptionCommand {
16
16
  subscriptionUuid: z.ZodString;
17
17
  shortUuid: z.ZodString;
18
18
  username: z.ZodString;
19
- status: z.ZodNativeEnum<{
19
+ status: z.ZodDefault<z.ZodNativeEnum<{
20
20
  readonly ACTIVE: "ACTIVE";
21
21
  readonly DISABLED: "DISABLED";
22
22
  readonly LIMITED: "LIMITED";
23
23
  readonly EXPIRED: "EXPIRED";
24
- }>;
24
+ }>>;
25
25
  usedTrafficBytes: z.ZodNumber;
26
26
  lifetimeUsedTrafficBytes: z.ZodNumber;
27
27
  trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
@@ -91,7 +91,6 @@ export declare namespace RevokeUserSubscriptionCommand {
91
91
  }, {
92
92
  uuid: string;
93
93
  username: string;
94
- status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
95
94
  createdAt: string;
96
95
  updatedAt: string;
97
96
  subscriptionUuid: string;
@@ -114,6 +113,7 @@ export declare namespace RevokeUserSubscriptionCommand {
114
113
  tag: string;
115
114
  }[];
116
115
  subscriptionUrl: string;
116
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
117
117
  trafficLimitBytes?: number | undefined;
118
118
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined;
119
119
  }>;
@@ -151,7 +151,6 @@ export declare namespace RevokeUserSubscriptionCommand {
151
151
  response: {
152
152
  uuid: string;
153
153
  username: string;
154
- status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
155
154
  createdAt: string;
156
155
  updatedAt: string;
157
156
  subscriptionUuid: string;
@@ -174,6 +173,7 @@ export declare namespace RevokeUserSubscriptionCommand {
174
173
  tag: string;
175
174
  }[];
176
175
  subscriptionUrl: string;
176
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
177
177
  trafficLimitBytes?: number | undefined;
178
178
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined;
179
179
  };
@@ -7,12 +7,12 @@ export declare namespace UpdateUserCommand {
7
7
  subscriptionUuid: z.ZodString;
8
8
  shortUuid: z.ZodString;
9
9
  username: z.ZodString;
10
- status: z.ZodNativeEnum<{
10
+ status: z.ZodDefault<z.ZodNativeEnum<{
11
11
  readonly ACTIVE: "ACTIVE";
12
12
  readonly DISABLED: "DISABLED";
13
13
  readonly LIMITED: "LIMITED";
14
14
  readonly EXPIRED: "EXPIRED";
15
- }>;
15
+ }>>;
16
16
  usedTrafficBytes: z.ZodNumber;
17
17
  lifetimeUsedTrafficBytes: z.ZodNumber;
18
18
  trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
@@ -50,12 +50,12 @@ export declare namespace UpdateUserCommand {
50
50
  tag: string;
51
51
  }>, "many">;
52
52
  }, "uuid">, {
53
- status: z.ZodOptional<z.ZodNativeEnum<{
53
+ status: z.ZodOptional<z.ZodDefault<z.ZodNativeEnum<{
54
54
  readonly ACTIVE: "ACTIVE";
55
55
  readonly DISABLED: "DISABLED";
56
56
  readonly LIMITED: "LIMITED";
57
57
  readonly EXPIRED: "EXPIRED";
58
- }>>;
58
+ }>>>;
59
59
  trafficLimitBytes: z.ZodOptional<z.ZodNumber>;
60
60
  trafficLimitStrategy: z.ZodOptional<z.ZodEffects<z.ZodDefault<z.ZodNativeEnum<{
61
61
  readonly NO_RESET: "NO_RESET";
@@ -92,12 +92,12 @@ export declare namespace UpdateUserCommand {
92
92
  subscriptionUuid: z.ZodString;
93
93
  shortUuid: z.ZodString;
94
94
  username: z.ZodString;
95
- status: z.ZodNativeEnum<{
95
+ status: z.ZodDefault<z.ZodNativeEnum<{
96
96
  readonly ACTIVE: "ACTIVE";
97
97
  readonly DISABLED: "DISABLED";
98
98
  readonly LIMITED: "LIMITED";
99
99
  readonly EXPIRED: "EXPIRED";
100
- }>;
100
+ }>>;
101
101
  usedTrafficBytes: z.ZodNumber;
102
102
  lifetimeUsedTrafficBytes: z.ZodNumber;
103
103
  trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
@@ -167,7 +167,6 @@ export declare namespace UpdateUserCommand {
167
167
  }, {
168
168
  uuid: string;
169
169
  username: string;
170
- status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
171
170
  createdAt: string;
172
171
  updatedAt: string;
173
172
  subscriptionUuid: string;
@@ -190,6 +189,7 @@ export declare namespace UpdateUserCommand {
190
189
  tag: string;
191
190
  }[];
192
191
  subscriptionUrl: string;
192
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
193
193
  trafficLimitBytes?: number | undefined;
194
194
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined;
195
195
  }>;
@@ -227,7 +227,6 @@ export declare namespace UpdateUserCommand {
227
227
  response: {
228
228
  uuid: string;
229
229
  username: string;
230
- status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
231
230
  createdAt: string;
232
231
  updatedAt: string;
233
232
  subscriptionUuid: string;
@@ -250,6 +249,7 @@ export declare namespace UpdateUserCommand {
250
249
  tag: string;
251
250
  }[];
252
251
  subscriptionUrl: string;
252
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
253
253
  trafficLimitBytes?: number | undefined;
254
254
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined;
255
255
  };
@@ -4,12 +4,12 @@ export declare const UsersSchema: z.ZodObject<{
4
4
  subscriptionUuid: z.ZodString;
5
5
  shortUuid: z.ZodString;
6
6
  username: z.ZodString;
7
- status: z.ZodNativeEnum<{
7
+ status: z.ZodDefault<z.ZodNativeEnum<{
8
8
  readonly ACTIVE: "ACTIVE";
9
9
  readonly DISABLED: "DISABLED";
10
10
  readonly LIMITED: "LIMITED";
11
11
  readonly EXPIRED: "EXPIRED";
12
- }>;
12
+ }>>;
13
13
  usedTrafficBytes: z.ZodNumber;
14
14
  lifetimeUsedTrafficBytes: z.ZodNumber;
15
15
  trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
@@ -76,7 +76,6 @@ export declare const UsersSchema: z.ZodObject<{
76
76
  }, {
77
77
  uuid: string;
78
78
  username: string;
79
- status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
80
79
  createdAt: string;
81
80
  updatedAt: string;
82
81
  subscriptionUuid: string;
@@ -98,6 +97,7 @@ export declare const UsersSchema: z.ZodObject<{
98
97
  type: string;
99
98
  tag: string;
100
99
  }[];
100
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
101
101
  trafficLimitBytes?: number | undefined;
102
102
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | "CALENDAR_MONTH" | undefined;
103
103
  }>;
@@ -9,7 +9,7 @@ exports.UsersSchema = zod_1.z.object({
9
9
  subscriptionUuid: zod_1.z.string().uuid(),
10
10
  shortUuid: zod_1.z.string(),
11
11
  username: zod_1.z.string(),
12
- status: zod_1.z.nativeEnum(constants_1.USERS_STATUS),
12
+ status: zod_1.z.nativeEnum(constants_1.USERS_STATUS).default(constants_1.USERS_STATUS.ACTIVE),
13
13
  usedTrafficBytes: zod_1.z.number(),
14
14
  lifetimeUsedTrafficBytes: zod_1.z.number(),
15
15
  trafficLimitBytes: zod_1.z.number().int().default(0),
@@ -17,7 +17,7 @@ exports.UsersSchema = zod_1.z.object({
17
17
  .nativeEnum(constants_1.RESET_PERIODS, {
18
18
  description: 'Available reset periods',
19
19
  })
20
- .default(constants_1.RESET_PERIODS_VALUES[0]),
20
+ .default(constants_1.RESET_PERIODS.NO_RESET),
21
21
  subLastUserAgent: zod_1.z.nullable(zod_1.z.string()),
22
22
  subLastOpenedAt: zod_1.z.nullable(zod_1.z.string().transform((str) => new Date(str))),
23
23
  expireAt: zod_1.z.nullable(zod_1.z.string().transform((str) => new Date(str))),
@@ -34,8 +34,8 @@ var CreateHostCommand;
34
34
  path: zod_1.z.string().optional(),
35
35
  sni: zod_1.z.string().optional(),
36
36
  host: zod_1.z.string().optional(),
37
- alpn: zod_1.z.optional(zod_1.z.enum([alpn_1.ALPN_VALUES[0], ...alpn_1.ALPN_VALUES]).nullable()),
38
- fingerprint: zod_1.z.optional(zod_1.z.enum([fingerprints_1.FINGERPRINTS_VALUES[0], ...fingerprints_1.FINGERPRINTS_VALUES]).nullable()),
37
+ alpn: zod_1.z.optional(zod_1.z.nativeEnum(alpn_1.ALPN).nullable()),
38
+ fingerprint: zod_1.z.optional(zod_1.z.nativeEnum(fingerprints_1.FINGERPRINTS).nullable()),
39
39
  allowInsecure: zod_1.z.optional(zod_1.z.boolean().default(false)),
40
40
  isDisabled: zod_1.z.optional(zod_1.z.boolean().default(false)),
41
41
  });
@@ -41,8 +41,8 @@ var UpdateHostCommand;
41
41
  path: zod_1.z.optional(zod_1.z.string()),
42
42
  sni: zod_1.z.optional(zod_1.z.string()),
43
43
  host: zod_1.z.optional(zod_1.z.string()),
44
- alpn: zod_1.z.optional(zod_1.z.enum([alpn_1.ALPN_VALUES[0], ...alpn_1.ALPN_VALUES]).nullable()),
45
- fingerprint: zod_1.z.optional(zod_1.z.enum([fingerprints_1.FINGERPRINTS_VALUES[0], ...fingerprints_1.FINGERPRINTS_VALUES]).nullable()),
44
+ alpn: zod_1.z.optional(zod_1.z.nativeEnum(alpn_1.ALPN).nullable()),
45
+ fingerprint: zod_1.z.optional(zod_1.z.nativeEnum(fingerprints_1.FINGERPRINTS).nullable()),
46
46
  allowInsecure: zod_1.z.optional(zod_1.z.boolean()),
47
47
  isDisabled: zod_1.z.optional(zod_1.z.boolean()),
48
48
  });
@@ -22,7 +22,7 @@ var GetSubscriptionInfoByShortUuidCommand;
22
22
  username: zod_1.z.string(),
23
23
  expiresAt: zod_1.z.string().transform((str) => new Date(str)),
24
24
  isActive: zod_1.z.boolean(),
25
- userStatus: zod_1.z.enum([constants_1.USERS_STATUS_VALUES[0], ...constants_1.USERS_STATUS_VALUES]),
25
+ userStatus: zod_1.z.nativeEnum(constants_1.USERS_STATUS),
26
26
  }),
27
27
  }),
28
28
  });
@@ -83,26 +83,20 @@ var CreateUserCommand;
83
83
  required_error: 'Expiration date is required',
84
84
  invalid_type_error: 'Invalid expiration date format',
85
85
  })
86
- .refine(() => new Date(), {
87
- message: 'Expiration date cannot be in the past',
88
- }),
86
+ .describe('Date format: 2025-01-17T15:38:45.065Z'),
89
87
  createdAt: zod_1.z.coerce
90
88
  .date({
91
89
  required_error: 'Expiration date is required',
92
90
  invalid_type_error: 'Invalid expiration date format',
93
91
  })
94
- .refine(() => new Date(), {
95
- message: 'Expiration date cannot be in the past',
96
- })
92
+ .describe('Date format: 2025-01-17T15:38:45.065Z')
97
93
  .optional(),
98
94
  lastTrafficResetAt: zod_1.z.coerce
99
95
  .date({
100
96
  required_error: 'Expiration date is required',
101
97
  invalid_type_error: 'Invalid expiration date format',
102
98
  })
103
- .refine(() => new Date(), {
104
- message: 'Expiration date cannot be in the past',
105
- })
99
+ .describe('Date format: 2025-01-17T15:38:45.065Z')
106
100
  .optional(),
107
101
  description: zod_1.z.string().optional(),
108
102
  activateAllInbounds: zod_1.z.boolean().optional(),
@@ -9,7 +9,7 @@ exports.UsersSchema = zod_1.z.object({
9
9
  subscriptionUuid: zod_1.z.string().uuid(),
10
10
  shortUuid: zod_1.z.string(),
11
11
  username: zod_1.z.string(),
12
- status: zod_1.z.nativeEnum(constants_1.USERS_STATUS),
12
+ status: zod_1.z.nativeEnum(constants_1.USERS_STATUS).default(constants_1.USERS_STATUS.ACTIVE),
13
13
  usedTrafficBytes: zod_1.z.number(),
14
14
  lifetimeUsedTrafficBytes: zod_1.z.number(),
15
15
  trafficLimitBytes: zod_1.z.number().int().default(0),
@@ -17,7 +17,7 @@ exports.UsersSchema = zod_1.z.object({
17
17
  .nativeEnum(constants_1.RESET_PERIODS, {
18
18
  description: 'Available reset periods',
19
19
  })
20
- .default(constants_1.RESET_PERIODS_VALUES[0]),
20
+ .default(constants_1.RESET_PERIODS.NO_RESET),
21
21
  subLastUserAgent: zod_1.z.nullable(zod_1.z.string()),
22
22
  subLastOpenedAt: zod_1.z.nullable(zod_1.z.string().transform((str) => new Date(str))),
23
23
  expireAt: zod_1.z.nullable(zod_1.z.string().transform((str) => new Date(str))),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "0.0.87",
3
+ "version": "0.0.88",
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.",