@remnawave/backend-contract 0.0.60 → 0.0.62

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. package/build/backend/api/controllers/users.d.ts +1 -0
  2. package/build/backend/api/controllers/users.d.ts.map +1 -1
  3. package/build/backend/api/controllers/users.js +1 -0
  4. package/build/backend/api/routes.d.ts +1 -0
  5. package/build/backend/api/routes.d.ts.map +1 -1
  6. package/build/backend/api/routes.js +1 -0
  7. package/build/backend/commands/users/create-user.command.d.ts +13 -8
  8. package/build/backend/commands/users/create-user.command.d.ts.map +1 -1
  9. package/build/backend/commands/users/disable-user.command.ts.d.ts +12 -7
  10. package/build/backend/commands/users/disable-user.command.ts.d.ts.map +1 -1
  11. package/build/backend/commands/users/enable-user.command.d.ts +12 -7
  12. package/build/backend/commands/users/enable-user.command.d.ts.map +1 -1
  13. package/build/backend/commands/users/get-all-users-v2.command.d.ts +17 -10
  14. package/build/backend/commands/users/get-all-users-v2.command.d.ts.map +1 -1
  15. package/build/backend/commands/users/get-all-users.command.d.ts +21 -14
  16. package/build/backend/commands/users/get-all-users.command.d.ts.map +1 -1
  17. package/build/backend/commands/users/get-user-by-short-uuid.command.d.ts +12 -7
  18. package/build/backend/commands/users/get-user-by-short-uuid.command.d.ts.map +1 -1
  19. package/build/backend/commands/users/get-user-by-subscription-uuid.command.d.ts +12 -7
  20. package/build/backend/commands/users/get-user-by-subscription-uuid.command.d.ts.map +1 -1
  21. package/build/backend/commands/users/get-user-by-username.command.d.ts +160 -0
  22. package/build/backend/commands/users/get-user-by-username.command.d.ts.map +1 -0
  23. package/build/backend/commands/users/get-user-by-username.command.js +17 -0
  24. package/build/backend/commands/users/get-user-by-uuid.command.d.ts +12 -7
  25. package/build/backend/commands/users/get-user-by-uuid.command.d.ts.map +1 -1
  26. package/build/backend/commands/users/index.d.ts +1 -0
  27. package/build/backend/commands/users/index.d.ts.map +1 -1
  28. package/build/backend/commands/users/index.js +1 -0
  29. package/build/backend/commands/users/revoke-user-subscription.command.d.ts +12 -7
  30. package/build/backend/commands/users/revoke-user-subscription.command.d.ts.map +1 -1
  31. package/build/backend/commands/users/update-user.command.d.ts +14 -8
  32. package/build/backend/commands/users/update-user.command.d.ts.map +1 -1
  33. package/build/backend/models/users.schema.d.ts +7 -4
  34. package/build/backend/models/users.schema.d.ts.map +1 -1
  35. package/build/backend/models/users.schema.js +2 -1
  36. package/build/frontend/api/controllers/users.js +1 -0
  37. package/build/frontend/api/routes.js +1 -0
  38. package/build/frontend/commands/users/get-user-by-username.command.js +17 -0
  39. package/build/frontend/commands/users/index.js +1 -0
  40. package/build/frontend/models/users.schema.js +2 -1
  41. package/package.json +1 -1
@@ -17,7 +17,8 @@ export declare namespace GetUserByShortUuidCommand {
17
17
  shortUuid: z.ZodString;
18
18
  username: z.ZodString;
19
19
  status: z.ZodDefault<z.ZodEnum<["DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED", ...("DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED")[]]>>;
20
- usedTrafficBytes: z.ZodDefault<z.ZodNumber>;
20
+ usedTrafficBytes: z.ZodNumber;
21
+ lifetimeUsedTrafficBytes: z.ZodNumber;
21
22
  trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
22
23
  trafficLimitStrategy: z.ZodDefault<z.ZodEnum<["MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK", ...("MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK")[]]>>;
23
24
  subLastUserAgent: z.ZodNullable<z.ZodString>;
@@ -46,14 +47,15 @@ export declare namespace GetUserByShortUuidCommand {
46
47
  }>, "many">;
47
48
  }, "strip", z.ZodTypeAny, {
48
49
  uuid: string;
50
+ username: string;
49
51
  status: "DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED";
50
52
  createdAt: Date;
51
53
  updatedAt: Date;
52
- username: string;
53
54
  trafficLimitBytes: number;
54
55
  subscriptionUuid: string;
55
56
  shortUuid: string;
56
57
  usedTrafficBytes: number;
58
+ lifetimeUsedTrafficBytes: number;
57
59
  trafficLimitStrategy: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK";
58
60
  subLastUserAgent: string | null;
59
61
  subLastOpenedAt: Date | null;
@@ -71,11 +73,13 @@ export declare namespace GetUserByShortUuidCommand {
71
73
  }[];
72
74
  }, {
73
75
  uuid: string;
76
+ username: string;
74
77
  createdAt: string;
75
78
  updatedAt: string;
76
- username: string;
77
79
  subscriptionUuid: string;
78
80
  shortUuid: string;
81
+ usedTrafficBytes: number;
82
+ lifetimeUsedTrafficBytes: number;
79
83
  subLastUserAgent: string | null;
80
84
  subLastOpenedAt: string | null;
81
85
  expireAt: string | null;
@@ -92,20 +96,20 @@ export declare namespace GetUserByShortUuidCommand {
92
96
  }[];
93
97
  status?: "DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED" | undefined;
94
98
  trafficLimitBytes?: number | undefined;
95
- usedTrafficBytes?: number | undefined;
96
99
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | undefined;
97
100
  }>;
98
101
  }, "strip", z.ZodTypeAny, {
99
102
  response: {
100
103
  uuid: string;
104
+ username: string;
101
105
  status: "DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED";
102
106
  createdAt: Date;
103
107
  updatedAt: Date;
104
- username: string;
105
108
  trafficLimitBytes: number;
106
109
  subscriptionUuid: string;
107
110
  shortUuid: string;
108
111
  usedTrafficBytes: number;
112
+ lifetimeUsedTrafficBytes: number;
109
113
  trafficLimitStrategy: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK";
110
114
  subLastUserAgent: string | null;
111
115
  subLastOpenedAt: Date | null;
@@ -125,11 +129,13 @@ export declare namespace GetUserByShortUuidCommand {
125
129
  }, {
126
130
  response: {
127
131
  uuid: string;
132
+ username: string;
128
133
  createdAt: string;
129
134
  updatedAt: string;
130
- username: string;
131
135
  subscriptionUuid: string;
132
136
  shortUuid: string;
137
+ usedTrafficBytes: number;
138
+ lifetimeUsedTrafficBytes: number;
133
139
  subLastUserAgent: string | null;
134
140
  subLastOpenedAt: string | null;
135
141
  expireAt: string | null;
@@ -146,7 +152,6 @@ export declare namespace GetUserByShortUuidCommand {
146
152
  }[];
147
153
  status?: "DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED" | undefined;
148
154
  trafficLimitBytes?: number | undefined;
149
- usedTrafficBytes?: number | undefined;
150
155
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | undefined;
151
156
  };
152
157
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"get-user-by-short-uuid.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/get-user-by-short-uuid.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,yBAAyB,CAAC;IAChC,MAAM,GAAG,+BAAmC,CAAC;IAC7C,MAAM,OAAO,QAAoB,CAAC;IAElC,MAAM,aAAa;;;;;;MAExB,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":"get-user-by-short-uuid.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/get-user-by-short-uuid.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,yBAAyB,CAAC;IAChC,MAAM,GAAG,+BAAmC,CAAC;IAC7C,MAAM,OAAO,QAAoB,CAAC;IAElC,MAAM,aAAa;;;;;;MAExB,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"}
@@ -17,7 +17,8 @@ export declare namespace GetUserBySubscriptionUuidCommand {
17
17
  shortUuid: z.ZodString;
18
18
  username: z.ZodString;
19
19
  status: z.ZodDefault<z.ZodEnum<["DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED", ...("DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED")[]]>>;
20
- usedTrafficBytes: z.ZodDefault<z.ZodNumber>;
20
+ usedTrafficBytes: z.ZodNumber;
21
+ lifetimeUsedTrafficBytes: z.ZodNumber;
21
22
  trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
22
23
  trafficLimitStrategy: z.ZodDefault<z.ZodEnum<["MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK", ...("MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK")[]]>>;
23
24
  subLastUserAgent: z.ZodNullable<z.ZodString>;
@@ -46,14 +47,15 @@ export declare namespace GetUserBySubscriptionUuidCommand {
46
47
  }>, "many">;
47
48
  }, "strip", z.ZodTypeAny, {
48
49
  uuid: string;
50
+ username: string;
49
51
  status: "DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED";
50
52
  createdAt: Date;
51
53
  updatedAt: Date;
52
- username: string;
53
54
  trafficLimitBytes: number;
54
55
  subscriptionUuid: string;
55
56
  shortUuid: string;
56
57
  usedTrafficBytes: number;
58
+ lifetimeUsedTrafficBytes: number;
57
59
  trafficLimitStrategy: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK";
58
60
  subLastUserAgent: string | null;
59
61
  subLastOpenedAt: Date | null;
@@ -71,11 +73,13 @@ export declare namespace GetUserBySubscriptionUuidCommand {
71
73
  }[];
72
74
  }, {
73
75
  uuid: string;
76
+ username: string;
74
77
  createdAt: string;
75
78
  updatedAt: string;
76
- username: string;
77
79
  subscriptionUuid: string;
78
80
  shortUuid: string;
81
+ usedTrafficBytes: number;
82
+ lifetimeUsedTrafficBytes: number;
79
83
  subLastUserAgent: string | null;
80
84
  subLastOpenedAt: string | null;
81
85
  expireAt: string | null;
@@ -92,20 +96,20 @@ export declare namespace GetUserBySubscriptionUuidCommand {
92
96
  }[];
93
97
  status?: "DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED" | undefined;
94
98
  trafficLimitBytes?: number | undefined;
95
- usedTrafficBytes?: number | undefined;
96
99
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | undefined;
97
100
  }>;
98
101
  }, "strip", z.ZodTypeAny, {
99
102
  response: {
100
103
  uuid: string;
104
+ username: string;
101
105
  status: "DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED";
102
106
  createdAt: Date;
103
107
  updatedAt: Date;
104
- username: string;
105
108
  trafficLimitBytes: number;
106
109
  subscriptionUuid: string;
107
110
  shortUuid: string;
108
111
  usedTrafficBytes: number;
112
+ lifetimeUsedTrafficBytes: number;
109
113
  trafficLimitStrategy: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK";
110
114
  subLastUserAgent: string | null;
111
115
  subLastOpenedAt: Date | null;
@@ -125,11 +129,13 @@ export declare namespace GetUserBySubscriptionUuidCommand {
125
129
  }, {
126
130
  response: {
127
131
  uuid: string;
132
+ username: string;
128
133
  createdAt: string;
129
134
  updatedAt: string;
130
- username: string;
131
135
  subscriptionUuid: string;
132
136
  shortUuid: string;
137
+ usedTrafficBytes: number;
138
+ lifetimeUsedTrafficBytes: number;
133
139
  subLastUserAgent: string | null;
134
140
  subLastOpenedAt: string | null;
135
141
  expireAt: string | null;
@@ -146,7 +152,6 @@ export declare namespace GetUserBySubscriptionUuidCommand {
146
152
  }[];
147
153
  status?: "DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED" | undefined;
148
154
  trafficLimitBytes?: number | undefined;
149
- usedTrafficBytes?: number | undefined;
150
155
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | undefined;
151
156
  };
152
157
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"get-user-by-subscription-uuid.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/get-user-by-subscription-uuid.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,gCAAgC,CAAC;IACvC,MAAM,GAAG,sCAA0C,CAAC;IACpD,MAAM,OAAO,QAA2B,CAAC;IAEzC,MAAM,aAAa;;;;;;MAExB,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":"get-user-by-subscription-uuid.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/get-user-by-subscription-uuid.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,gCAAgC,CAAC;IACvC,MAAM,GAAG,sCAA0C,CAAC;IACpD,MAAM,OAAO,QAA2B,CAAC;IAEzC,MAAM,aAAa;;;;;;MAExB,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"}
@@ -0,0 +1,160 @@
1
+ import { z } from 'zod';
2
+ export declare namespace GetUserByUsernameCommand {
3
+ const url: (username: string) => string;
4
+ const TSQ_url: string;
5
+ const RequestSchema: z.ZodObject<{
6
+ username: z.ZodString;
7
+ }, "strip", z.ZodTypeAny, {
8
+ username: string;
9
+ }, {
10
+ username: string;
11
+ }>;
12
+ type Request = z.infer<typeof RequestSchema>;
13
+ const ResponseSchema: z.ZodObject<{
14
+ response: z.ZodObject<{
15
+ uuid: z.ZodString;
16
+ subscriptionUuid: z.ZodString;
17
+ shortUuid: z.ZodString;
18
+ username: z.ZodString;
19
+ status: z.ZodDefault<z.ZodEnum<["DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED", ...("DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED")[]]>>;
20
+ usedTrafficBytes: z.ZodNumber;
21
+ lifetimeUsedTrafficBytes: z.ZodNumber;
22
+ trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
23
+ trafficLimitStrategy: z.ZodDefault<z.ZodEnum<["MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK", ...("MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK")[]]>>;
24
+ subLastUserAgent: z.ZodNullable<z.ZodString>;
25
+ subLastOpenedAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
26
+ expireAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
27
+ onlineAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
28
+ subRevokedAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
29
+ lastTrafficResetAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
30
+ trojanPassword: z.ZodString;
31
+ vlessUuid: z.ZodString;
32
+ ssPassword: z.ZodString;
33
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
34
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
35
+ activeUserInbounds: z.ZodArray<z.ZodObject<{
36
+ uuid: z.ZodString;
37
+ tag: z.ZodString;
38
+ type: z.ZodString;
39
+ }, "strip", z.ZodTypeAny, {
40
+ uuid: string;
41
+ type: string;
42
+ tag: string;
43
+ }, {
44
+ uuid: string;
45
+ type: string;
46
+ tag: string;
47
+ }>, "many">;
48
+ }, "strip", z.ZodTypeAny, {
49
+ uuid: string;
50
+ username: string;
51
+ status: "DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED";
52
+ createdAt: Date;
53
+ updatedAt: Date;
54
+ trafficLimitBytes: number;
55
+ subscriptionUuid: string;
56
+ shortUuid: string;
57
+ usedTrafficBytes: number;
58
+ lifetimeUsedTrafficBytes: number;
59
+ trafficLimitStrategy: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK";
60
+ subLastUserAgent: string | null;
61
+ subLastOpenedAt: Date | null;
62
+ expireAt: Date | null;
63
+ onlineAt: Date | null;
64
+ subRevokedAt: Date | null;
65
+ lastTrafficResetAt: Date | null;
66
+ trojanPassword: string;
67
+ vlessUuid: string;
68
+ ssPassword: string;
69
+ activeUserInbounds: {
70
+ uuid: string;
71
+ type: string;
72
+ tag: string;
73
+ }[];
74
+ }, {
75
+ uuid: string;
76
+ username: string;
77
+ createdAt: string;
78
+ updatedAt: string;
79
+ subscriptionUuid: string;
80
+ shortUuid: string;
81
+ usedTrafficBytes: number;
82
+ lifetimeUsedTrafficBytes: number;
83
+ subLastUserAgent: string | null;
84
+ subLastOpenedAt: string | null;
85
+ expireAt: string | null;
86
+ onlineAt: string | null;
87
+ subRevokedAt: string | null;
88
+ lastTrafficResetAt: string | null;
89
+ trojanPassword: string;
90
+ vlessUuid: string;
91
+ ssPassword: string;
92
+ activeUserInbounds: {
93
+ uuid: string;
94
+ type: string;
95
+ tag: string;
96
+ }[];
97
+ status?: "DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED" | undefined;
98
+ trafficLimitBytes?: number | undefined;
99
+ trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | undefined;
100
+ }>;
101
+ }, "strip", z.ZodTypeAny, {
102
+ response: {
103
+ uuid: string;
104
+ username: string;
105
+ status: "DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED";
106
+ createdAt: Date;
107
+ updatedAt: Date;
108
+ trafficLimitBytes: number;
109
+ subscriptionUuid: string;
110
+ shortUuid: string;
111
+ usedTrafficBytes: number;
112
+ lifetimeUsedTrafficBytes: number;
113
+ trafficLimitStrategy: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK";
114
+ subLastUserAgent: string | null;
115
+ subLastOpenedAt: Date | null;
116
+ expireAt: Date | null;
117
+ onlineAt: Date | null;
118
+ subRevokedAt: Date | null;
119
+ lastTrafficResetAt: Date | null;
120
+ trojanPassword: string;
121
+ vlessUuid: string;
122
+ ssPassword: string;
123
+ activeUserInbounds: {
124
+ uuid: string;
125
+ type: string;
126
+ tag: string;
127
+ }[];
128
+ };
129
+ }, {
130
+ response: {
131
+ uuid: string;
132
+ username: string;
133
+ createdAt: string;
134
+ updatedAt: string;
135
+ subscriptionUuid: string;
136
+ shortUuid: string;
137
+ usedTrafficBytes: number;
138
+ lifetimeUsedTrafficBytes: number;
139
+ subLastUserAgent: string | null;
140
+ subLastOpenedAt: string | null;
141
+ expireAt: string | null;
142
+ onlineAt: string | null;
143
+ subRevokedAt: string | null;
144
+ lastTrafficResetAt: string | null;
145
+ trojanPassword: string;
146
+ vlessUuid: string;
147
+ ssPassword: string;
148
+ activeUserInbounds: {
149
+ uuid: string;
150
+ type: string;
151
+ tag: string;
152
+ }[];
153
+ status?: "DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED" | undefined;
154
+ trafficLimitBytes?: number | undefined;
155
+ trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | undefined;
156
+ };
157
+ }>;
158
+ type Response = z.infer<typeof ResponseSchema>;
159
+ }
160
+ //# sourceMappingURL=get-user-by-username.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-user-by-username.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/get-user-by-username.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,wBAAwB,CAAC;IAC/B,MAAM,GAAG,8BAAiC,CAAC;IAC3C,MAAM,OAAO,QAAmB,CAAC;IAEjC,MAAM,aAAa;;;;;;MAExB,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"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetUserByUsernameCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../api");
6
+ const users_schema_1 = require("../../models/users.schema");
7
+ var GetUserByUsernameCommand;
8
+ (function (GetUserByUsernameCommand) {
9
+ GetUserByUsernameCommand.url = api_1.REST_API.USERS.GET_BY_USERNAME;
10
+ GetUserByUsernameCommand.TSQ_url = GetUserByUsernameCommand.url(':username');
11
+ GetUserByUsernameCommand.RequestSchema = zod_1.z.object({
12
+ username: zod_1.z.string(),
13
+ });
14
+ GetUserByUsernameCommand.ResponseSchema = zod_1.z.object({
15
+ response: users_schema_1.UsersSchema,
16
+ });
17
+ })(GetUserByUsernameCommand || (exports.GetUserByUsernameCommand = GetUserByUsernameCommand = {}));
@@ -17,7 +17,8 @@ export declare namespace GetUserByUuidCommand {
17
17
  shortUuid: z.ZodString;
18
18
  username: z.ZodString;
19
19
  status: z.ZodDefault<z.ZodEnum<["DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED", ...("DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED")[]]>>;
20
- usedTrafficBytes: z.ZodDefault<z.ZodNumber>;
20
+ usedTrafficBytes: z.ZodNumber;
21
+ lifetimeUsedTrafficBytes: z.ZodNumber;
21
22
  trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
22
23
  trafficLimitStrategy: z.ZodDefault<z.ZodEnum<["MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK", ...("MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK")[]]>>;
23
24
  subLastUserAgent: z.ZodNullable<z.ZodString>;
@@ -46,14 +47,15 @@ export declare namespace GetUserByUuidCommand {
46
47
  }>, "many">;
47
48
  }, "strip", z.ZodTypeAny, {
48
49
  uuid: string;
50
+ username: string;
49
51
  status: "DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED";
50
52
  createdAt: Date;
51
53
  updatedAt: Date;
52
- username: string;
53
54
  trafficLimitBytes: number;
54
55
  subscriptionUuid: string;
55
56
  shortUuid: string;
56
57
  usedTrafficBytes: number;
58
+ lifetimeUsedTrafficBytes: number;
57
59
  trafficLimitStrategy: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK";
58
60
  subLastUserAgent: string | null;
59
61
  subLastOpenedAt: Date | null;
@@ -71,11 +73,13 @@ export declare namespace GetUserByUuidCommand {
71
73
  }[];
72
74
  }, {
73
75
  uuid: string;
76
+ username: string;
74
77
  createdAt: string;
75
78
  updatedAt: string;
76
- username: string;
77
79
  subscriptionUuid: string;
78
80
  shortUuid: string;
81
+ usedTrafficBytes: number;
82
+ lifetimeUsedTrafficBytes: number;
79
83
  subLastUserAgent: string | null;
80
84
  subLastOpenedAt: string | null;
81
85
  expireAt: string | null;
@@ -92,20 +96,20 @@ export declare namespace GetUserByUuidCommand {
92
96
  }[];
93
97
  status?: "DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED" | undefined;
94
98
  trafficLimitBytes?: number | undefined;
95
- usedTrafficBytes?: number | undefined;
96
99
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | undefined;
97
100
  }>;
98
101
  }, "strip", z.ZodTypeAny, {
99
102
  response: {
100
103
  uuid: string;
104
+ username: string;
101
105
  status: "DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED";
102
106
  createdAt: Date;
103
107
  updatedAt: Date;
104
- username: string;
105
108
  trafficLimitBytes: number;
106
109
  subscriptionUuid: string;
107
110
  shortUuid: string;
108
111
  usedTrafficBytes: number;
112
+ lifetimeUsedTrafficBytes: number;
109
113
  trafficLimitStrategy: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK";
110
114
  subLastUserAgent: string | null;
111
115
  subLastOpenedAt: Date | null;
@@ -125,11 +129,13 @@ export declare namespace GetUserByUuidCommand {
125
129
  }, {
126
130
  response: {
127
131
  uuid: string;
132
+ username: string;
128
133
  createdAt: string;
129
134
  updatedAt: string;
130
- username: string;
131
135
  subscriptionUuid: string;
132
136
  shortUuid: string;
137
+ usedTrafficBytes: number;
138
+ lifetimeUsedTrafficBytes: number;
133
139
  subLastUserAgent: string | null;
134
140
  subLastOpenedAt: string | null;
135
141
  expireAt: string | null;
@@ -146,7 +152,6 @@ export declare namespace GetUserByUuidCommand {
146
152
  }[];
147
153
  status?: "DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED" | undefined;
148
154
  trafficLimitBytes?: number | undefined;
149
- usedTrafficBytes?: number | undefined;
150
155
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | undefined;
151
156
  };
152
157
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"get-user-by-uuid.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/get-user-by-uuid.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,oBAAoB,CAAC;IAC3B,MAAM,GAAG,0BAA6B,CAAC;IACvC,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,aAAa;;;;;;MAExB,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":"get-user-by-uuid.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/get-user-by-uuid.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,oBAAoB,CAAC;IAC3B,MAAM,GAAG,0BAA6B,CAAC;IACvC,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,aAAa;;;;;;MAExB,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"}
@@ -9,4 +9,5 @@ export * from './get-user-by-subscription-uuid.command';
9
9
  export * from './get-user-by-uuid.command';
10
10
  export * from './revoke-user-subscription.command';
11
11
  export * from './update-user.command';
12
+ export * from './get-user-by-username.command';
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/users/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,kCAAkC,CAAC;AACjD,cAAc,yCAAyC,CAAC;AACxD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/users/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,kCAAkC,CAAC;AACjD,cAAc,yCAAyC,CAAC;AACxD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC"}
@@ -25,3 +25,4 @@ __exportStar(require("./get-user-by-subscription-uuid.command"), exports);
25
25
  __exportStar(require("./get-user-by-uuid.command"), exports);
26
26
  __exportStar(require("./revoke-user-subscription.command"), exports);
27
27
  __exportStar(require("./update-user.command"), exports);
28
+ __exportStar(require("./get-user-by-username.command"), exports);
@@ -17,7 +17,8 @@ export declare namespace RevokeUserSubscriptionCommand {
17
17
  shortUuid: z.ZodString;
18
18
  username: z.ZodString;
19
19
  status: z.ZodDefault<z.ZodEnum<["DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED", ...("DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED")[]]>>;
20
- usedTrafficBytes: z.ZodDefault<z.ZodNumber>;
20
+ usedTrafficBytes: z.ZodNumber;
21
+ lifetimeUsedTrafficBytes: z.ZodNumber;
21
22
  trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
22
23
  trafficLimitStrategy: z.ZodDefault<z.ZodEnum<["MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK", ...("MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK")[]]>>;
23
24
  subLastUserAgent: z.ZodNullable<z.ZodString>;
@@ -46,14 +47,15 @@ export declare namespace RevokeUserSubscriptionCommand {
46
47
  }>, "many">;
47
48
  }, "strip", z.ZodTypeAny, {
48
49
  uuid: string;
50
+ username: string;
49
51
  status: "DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED";
50
52
  createdAt: Date;
51
53
  updatedAt: Date;
52
- username: string;
53
54
  trafficLimitBytes: number;
54
55
  subscriptionUuid: string;
55
56
  shortUuid: string;
56
57
  usedTrafficBytes: number;
58
+ lifetimeUsedTrafficBytes: number;
57
59
  trafficLimitStrategy: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK";
58
60
  subLastUserAgent: string | null;
59
61
  subLastOpenedAt: Date | null;
@@ -71,11 +73,13 @@ export declare namespace RevokeUserSubscriptionCommand {
71
73
  }[];
72
74
  }, {
73
75
  uuid: string;
76
+ username: string;
74
77
  createdAt: string;
75
78
  updatedAt: string;
76
- username: string;
77
79
  subscriptionUuid: string;
78
80
  shortUuid: string;
81
+ usedTrafficBytes: number;
82
+ lifetimeUsedTrafficBytes: number;
79
83
  subLastUserAgent: string | null;
80
84
  subLastOpenedAt: string | null;
81
85
  expireAt: string | null;
@@ -92,20 +96,20 @@ export declare namespace RevokeUserSubscriptionCommand {
92
96
  }[];
93
97
  status?: "DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED" | undefined;
94
98
  trafficLimitBytes?: number | undefined;
95
- usedTrafficBytes?: number | undefined;
96
99
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | undefined;
97
100
  }>;
98
101
  }, "strip", z.ZodTypeAny, {
99
102
  response: {
100
103
  uuid: string;
104
+ username: string;
101
105
  status: "DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED";
102
106
  createdAt: Date;
103
107
  updatedAt: Date;
104
- username: string;
105
108
  trafficLimitBytes: number;
106
109
  subscriptionUuid: string;
107
110
  shortUuid: string;
108
111
  usedTrafficBytes: number;
112
+ lifetimeUsedTrafficBytes: number;
109
113
  trafficLimitStrategy: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK";
110
114
  subLastUserAgent: string | null;
111
115
  subLastOpenedAt: Date | null;
@@ -125,11 +129,13 @@ export declare namespace RevokeUserSubscriptionCommand {
125
129
  }, {
126
130
  response: {
127
131
  uuid: string;
132
+ username: string;
128
133
  createdAt: string;
129
134
  updatedAt: string;
130
- username: string;
131
135
  subscriptionUuid: string;
132
136
  shortUuid: string;
137
+ usedTrafficBytes: number;
138
+ lifetimeUsedTrafficBytes: number;
133
139
  subLastUserAgent: string | null;
134
140
  subLastOpenedAt: string | null;
135
141
  expireAt: string | null;
@@ -146,7 +152,6 @@ export declare namespace RevokeUserSubscriptionCommand {
146
152
  }[];
147
153
  status?: "DISABLED" | "ACTIVE" | "LIMITED" | "EXPIRED" | undefined;
148
154
  trafficLimitBytes?: number | undefined;
149
- usedTrafficBytes?: number | undefined;
150
155
  trafficLimitStrategy?: "MONTH" | "YEAR" | "NO_RESET" | "DAY" | "WEEK" | undefined;
151
156
  };
152
157
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"revoke-user-subscription.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/revoke-user-subscription.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,6BAA6B,CAAC;IACpC,MAAM,GAAG,0BAAqC,CAAC;IAC/C,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,aAAa;;;;;;MAExB,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":"revoke-user-subscription.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/revoke-user-subscription.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,6BAA6B,CAAC;IACpC,MAAM,GAAG,0BAAqC,CAAC;IAC/C,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,aAAa;;;;;;MAExB,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"}