@remnawave/backend-contract 0.3.62 → 0.3.63

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.
@@ -12,6 +12,7 @@ export declare const USERS_ROUTES: {
12
12
  readonly DELETE_USER: "delete";
13
13
  readonly UPDATE: "update";
14
14
  readonly RESET_USER_TRAFFIC: "reset-traffic";
15
+ readonly ACTIVATE_ALL_INBOUNDS: "activate-all-inbounds";
15
16
  readonly BULK: {
16
17
  readonly DELETE_BY_STATUS: "bulk/delete-by-status";
17
18
  readonly UPDATE: "bulk/update";
@@ -1 +1 @@
1
- {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../../api/controllers/users.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8Bf,CAAC"}
1
+ {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../../api/controllers/users.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+Bf,CAAC"}
@@ -15,6 +15,7 @@ exports.USERS_ROUTES = {
15
15
  DELETE_USER: 'delete',
16
16
  UPDATE: 'update',
17
17
  RESET_USER_TRAFFIC: 'reset-traffic',
18
+ ACTIVATE_ALL_INBOUNDS: 'activate-all-inbounds',
18
19
  BULK: {
19
20
  DELETE_BY_STATUS: 'bulk/delete-by-status',
20
21
  UPDATE: 'bulk/update',
@@ -56,6 +56,7 @@ export declare const REST_API: {
56
56
  readonly ENABLE_USER: (uuid: string) => string;
57
57
  readonly DELETE_USER: (uuid: string) => string;
58
58
  readonly UPDATE: "/api/users/update";
59
+ readonly ACTIVATE_ALL_INBOUNDS: (uuid: string) => string;
59
60
  readonly GET_ALL_V2: "/api/users/v2";
60
61
  readonly RESET_USER_TRAFFIC: (uuid: string) => string;
61
62
  readonly BULK: {
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,YAAY,EAAG,UAAmB,CAAC;AAChD,eAAO,MAAM,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;gCAQE,MAAM;;;;;;;;gCASN,MAAM;;;iCAIL,MAAM;iCAEN,MAAM;iCAEN,MAAM;gCAEP,MAAM;;;;;;;;;;;;;;kDAeY,MAAM;;;;;;;;;;qCAWnB,MAAM;gDAEK,MAAM;6CAET,MAAM;8DAEW,MAAM;6CAEvB,MAAM;sCAEb,MAAM;qCAEP,MAAM;qCAEN,MAAM;;;4CAIC,MAAM;;;;;;;;;;;;;kDAcA,MAAM;uCAEjB,MAAM;;gDAGG,MAAM;;;;kCAKpB,MAAM;0CAEE,MAAM;uCAET,MAAM;;;;;;;;gCASb,MAAM;iCAEL,MAAM;;;;;;;;;;;;;;;0CAgBG,MAAM;;;;;;;CAQ7B,CAAC"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,YAAY,EAAG,UAAmB,CAAC;AAChD,eAAO,MAAM,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;gCAQE,MAAM;;;;;;;;gCASN,MAAM;;;iCAIL,MAAM;iCAEN,MAAM;iCAEN,MAAM;gCAEP,MAAM;;;;;;;;;;;;;;kDAeY,MAAM;;;;;;;;;;qCAWnB,MAAM;gDAEK,MAAM;6CAET,MAAM;8DAEW,MAAM;6CAEvB,MAAM;sCAEb,MAAM;qCAEP,MAAM;qCAEN,MAAM;;+CAGI,MAAM;;4CAGT,MAAM;;;;;;;;;;;;;kDAcA,MAAM;uCAEjB,MAAM;;gDAGG,MAAM;;;;kCAKpB,MAAM;0CAEE,MAAM;uCAET,MAAM;;;;;;;;gCASb,MAAM;iCAEL,MAAM;;;;;;;;;;;;;;;0CAgBG,MAAM;;;;;;;CAQ7B,CAAC"}
@@ -93,6 +93,7 @@ exports.REST_API = {
93
93
  ENABLE_USER: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ENABLE_USER}/${uuid}`,
94
94
  DELETE_USER: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.DELETE_USER}/${uuid}`,
95
95
  UPDATE: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.UPDATE}`,
96
+ ACTIVATE_ALL_INBOUNDS: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ACTIVATE_ALL_INBOUNDS}/${uuid}`,
96
97
  GET_ALL_V2: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_ALL_V2}`,
97
98
  RESET_USER_TRAFFIC: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.RESET_USER_TRAFFIC}/${uuid}`,
98
99
  BULK: {
@@ -0,0 +1,231 @@
1
+ import { z } from 'zod';
2
+ export declare namespace ActivateAllInboundsCommand {
3
+ const url: (uuid: string) => string;
4
+ const TSQ_url: string;
5
+ const RequestSchema: z.ZodObject<{
6
+ uuid: z.ZodString;
7
+ }, "strip", z.ZodTypeAny, {
8
+ uuid: string;
9
+ }, {
10
+ uuid: string;
11
+ }>;
12
+ type Request = z.infer<typeof RequestSchema>;
13
+ const ResponseSchema: z.ZodObject<{
14
+ response: z.ZodObject<z.objectUtil.extendShape<{
15
+ uuid: z.ZodString;
16
+ subscriptionUuid: z.ZodString;
17
+ shortUuid: z.ZodString;
18
+ username: z.ZodString;
19
+ status: z.ZodDefault<z.ZodNativeEnum<{
20
+ readonly ACTIVE: "ACTIVE";
21
+ readonly DISABLED: "DISABLED";
22
+ readonly LIMITED: "LIMITED";
23
+ readonly EXPIRED: "EXPIRED";
24
+ }>>;
25
+ usedTrafficBytes: z.ZodNumber;
26
+ lifetimeUsedTrafficBytes: z.ZodNumber;
27
+ trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
28
+ trafficLimitStrategy: z.ZodDefault<z.ZodNativeEnum<{
29
+ readonly NO_RESET: "NO_RESET";
30
+ readonly DAY: "DAY";
31
+ readonly WEEK: "WEEK";
32
+ readonly MONTH: "MONTH";
33
+ }>>;
34
+ subLastUserAgent: z.ZodNullable<z.ZodString>;
35
+ subLastOpenedAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
36
+ expireAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
37
+ onlineAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
38
+ subRevokedAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
39
+ lastTrafficResetAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
40
+ trojanPassword: z.ZodString;
41
+ vlessUuid: z.ZodString;
42
+ ssPassword: z.ZodString;
43
+ description: z.ZodNullable<z.ZodString>;
44
+ telegramId: z.ZodNullable<z.ZodNumber>;
45
+ email: z.ZodNullable<z.ZodString>;
46
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
47
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
48
+ activeUserInbounds: z.ZodArray<z.ZodObject<{
49
+ uuid: z.ZodString;
50
+ tag: z.ZodString;
51
+ type: z.ZodString;
52
+ network: z.ZodNullable<z.ZodString>;
53
+ security: z.ZodNullable<z.ZodString>;
54
+ }, "strip", z.ZodTypeAny, {
55
+ uuid: string;
56
+ type: string;
57
+ tag: string;
58
+ network: string | null;
59
+ security: string | null;
60
+ }, {
61
+ uuid: string;
62
+ type: string;
63
+ tag: string;
64
+ network: string | null;
65
+ security: string | null;
66
+ }>, "many">;
67
+ }, {
68
+ subscriptionUrl: z.ZodString;
69
+ lastConnectedNode: z.ZodNullable<z.ZodObject<{
70
+ connectedAt: z.ZodEffects<z.ZodString, Date, string>;
71
+ nodeName: z.ZodString;
72
+ }, "strip", z.ZodTypeAny, {
73
+ connectedAt: Date;
74
+ nodeName: string;
75
+ }, {
76
+ connectedAt: string;
77
+ nodeName: string;
78
+ }>>;
79
+ }>, "strip", z.ZodTypeAny, {
80
+ status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
81
+ uuid: string;
82
+ username: string;
83
+ email: string | null;
84
+ createdAt: Date;
85
+ updatedAt: Date;
86
+ trafficLimitBytes: number;
87
+ subscriptionUuid: string;
88
+ shortUuid: string;
89
+ usedTrafficBytes: number;
90
+ lifetimeUsedTrafficBytes: number;
91
+ description: string | null;
92
+ trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
93
+ subLastUserAgent: string | null;
94
+ subLastOpenedAt: Date | null;
95
+ expireAt: Date | null;
96
+ onlineAt: Date | null;
97
+ subRevokedAt: Date | null;
98
+ lastTrafficResetAt: Date | null;
99
+ trojanPassword: string;
100
+ vlessUuid: string;
101
+ ssPassword: string;
102
+ telegramId: number | null;
103
+ activeUserInbounds: {
104
+ uuid: string;
105
+ type: string;
106
+ tag: string;
107
+ network: string | null;
108
+ security: string | null;
109
+ }[];
110
+ subscriptionUrl: string;
111
+ lastConnectedNode: {
112
+ connectedAt: Date;
113
+ nodeName: string;
114
+ } | null;
115
+ }, {
116
+ uuid: string;
117
+ username: string;
118
+ email: string | null;
119
+ createdAt: string;
120
+ updatedAt: string;
121
+ subscriptionUuid: string;
122
+ shortUuid: string;
123
+ usedTrafficBytes: number;
124
+ lifetimeUsedTrafficBytes: number;
125
+ description: string | null;
126
+ subLastUserAgent: string | null;
127
+ subLastOpenedAt: string | null;
128
+ expireAt: string | null;
129
+ onlineAt: string | null;
130
+ subRevokedAt: string | null;
131
+ lastTrafficResetAt: string | null;
132
+ trojanPassword: string;
133
+ vlessUuid: string;
134
+ ssPassword: string;
135
+ telegramId: number | null;
136
+ activeUserInbounds: {
137
+ uuid: string;
138
+ type: string;
139
+ tag: string;
140
+ network: string | null;
141
+ security: string | null;
142
+ }[];
143
+ subscriptionUrl: string;
144
+ lastConnectedNode: {
145
+ connectedAt: string;
146
+ nodeName: string;
147
+ } | null;
148
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
149
+ trafficLimitBytes?: number | undefined;
150
+ trafficLimitStrategy?: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | undefined;
151
+ }>;
152
+ }, "strip", z.ZodTypeAny, {
153
+ response: {
154
+ status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
155
+ uuid: string;
156
+ username: string;
157
+ email: string | null;
158
+ createdAt: Date;
159
+ updatedAt: Date;
160
+ trafficLimitBytes: number;
161
+ subscriptionUuid: string;
162
+ shortUuid: string;
163
+ usedTrafficBytes: number;
164
+ lifetimeUsedTrafficBytes: number;
165
+ description: string | null;
166
+ trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
167
+ subLastUserAgent: string | null;
168
+ subLastOpenedAt: Date | null;
169
+ expireAt: Date | null;
170
+ onlineAt: Date | null;
171
+ subRevokedAt: Date | null;
172
+ lastTrafficResetAt: Date | null;
173
+ trojanPassword: string;
174
+ vlessUuid: string;
175
+ ssPassword: string;
176
+ telegramId: number | null;
177
+ activeUserInbounds: {
178
+ uuid: string;
179
+ type: string;
180
+ tag: string;
181
+ network: string | null;
182
+ security: string | null;
183
+ }[];
184
+ subscriptionUrl: string;
185
+ lastConnectedNode: {
186
+ connectedAt: Date;
187
+ nodeName: string;
188
+ } | null;
189
+ };
190
+ }, {
191
+ response: {
192
+ uuid: string;
193
+ username: string;
194
+ email: string | null;
195
+ createdAt: string;
196
+ updatedAt: string;
197
+ subscriptionUuid: string;
198
+ shortUuid: string;
199
+ usedTrafficBytes: number;
200
+ lifetimeUsedTrafficBytes: number;
201
+ description: string | null;
202
+ subLastUserAgent: string | null;
203
+ subLastOpenedAt: string | null;
204
+ expireAt: string | null;
205
+ onlineAt: string | null;
206
+ subRevokedAt: string | null;
207
+ lastTrafficResetAt: string | null;
208
+ trojanPassword: string;
209
+ vlessUuid: string;
210
+ ssPassword: string;
211
+ telegramId: number | null;
212
+ activeUserInbounds: {
213
+ uuid: string;
214
+ type: string;
215
+ tag: string;
216
+ network: string | null;
217
+ security: string | null;
218
+ }[];
219
+ subscriptionUrl: string;
220
+ lastConnectedNode: {
221
+ connectedAt: string;
222
+ nodeName: string;
223
+ } | null;
224
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
225
+ trafficLimitBytes?: number | undefined;
226
+ trafficLimitStrategy?: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | undefined;
227
+ };
228
+ }>;
229
+ type Response = z.infer<typeof ResponseSchema>;
230
+ }
231
+ //# sourceMappingURL=activate-all-inbounds.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activate-all-inbounds.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/activate-all-inbounds.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,0BAA0B,CAAC;IACjC,MAAM,GAAG,0BAAuC,CAAC;IACjD,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,aAAa;;;;;;MAExB,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"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActivateAllInboundsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ const api_1 = require("../../api");
7
+ var ActivateAllInboundsCommand;
8
+ (function (ActivateAllInboundsCommand) {
9
+ ActivateAllInboundsCommand.url = api_1.REST_API.USERS.ACTIVATE_ALL_INBOUNDS;
10
+ ActivateAllInboundsCommand.TSQ_url = ActivateAllInboundsCommand.url(':uuid');
11
+ ActivateAllInboundsCommand.RequestSchema = zod_1.z.object({
12
+ uuid: zod_1.z.string().uuid(),
13
+ });
14
+ ActivateAllInboundsCommand.ResponseSchema = zod_1.z.object({
15
+ response: models_1.UsersSchema.extend({
16
+ subscriptionUrl: zod_1.z.string(),
17
+ lastConnectedNode: models_1.LastConnectedNodeSchema,
18
+ }),
19
+ });
20
+ })(ActivateAllInboundsCommand || (exports.ActivateAllInboundsCommand = ActivateAllInboundsCommand = {}));
@@ -1,3 +1,4 @@
1
+ export * from './activate-all-inbounds.command';
1
2
  export * from './bulk';
2
3
  export * from './bulk-all';
3
4
  export * from './create-user.command';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/users/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,yCAAyC,CAAC;AACxD,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/users/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,yCAAyC,CAAC;AACxD,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,uBAAuB,CAAC"}
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./activate-all-inbounds.command"), exports);
17
18
  __exportStar(require("./bulk"), exports);
18
19
  __exportStar(require("./bulk-all"), exports);
19
20
  __exportStar(require("./create-user.command"), exports);
@@ -484,5 +484,15 @@ export declare const ERRORS: {
484
484
  readonly message: "Get user usage by range error";
485
485
  readonly httpCode: 500;
486
486
  };
487
+ readonly KEYPAIR_NOT_FOUND: {
488
+ readonly code: "A092";
489
+ readonly message: "Keypair not found. Restart app.";
490
+ readonly httpCode: 500;
491
+ };
492
+ readonly ACTIVATE_ALL_INBOUNDS_ERROR: {
493
+ readonly code: "A093";
494
+ readonly message: "Activate all inbounds error";
495
+ readonly httpCode: 500;
496
+ };
487
497
  };
488
498
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwJY,MAAM;;;;;;;;;;wCAUN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA4IN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyJ3B,CAAC"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwJY,MAAM;;;;;;;;;;wCAUN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA4IN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmK3B,CAAC"}
@@ -455,4 +455,14 @@ exports.ERRORS = {
455
455
  message: 'Get user usage by range error',
456
456
  httpCode: 500,
457
457
  },
458
+ KEYPAIR_NOT_FOUND: {
459
+ code: 'A092',
460
+ message: 'Keypair not found. Restart app.',
461
+ httpCode: 500,
462
+ },
463
+ ACTIVATE_ALL_INBOUNDS_ERROR: {
464
+ code: 'A093',
465
+ message: 'Activate all inbounds error',
466
+ httpCode: 500,
467
+ },
458
468
  };
@@ -10,6 +10,12 @@ export declare const EVENTS: {
10
10
  readonly EXPIRED: "user.expired";
11
11
  readonly TRAFFIC_RESET: "user.traffic_reset";
12
12
  readonly TRAFFIC_REACHED: "user.traffic_reached";
13
+ readonly EXPIRE_NOTIFY: {
14
+ readonly EXPIRES_IN_72_HOURS: "user.expires_in_72_hours";
15
+ readonly EXPIRES_IN_48_HOURS: "user.expires_in_48_hours";
16
+ readonly EXPIRES_IN_24_HOURS: "user.expires_in_24_hours";
17
+ readonly EXPIRED_24_HOURS_AGO: "user.expired_24_hours_ago";
18
+ };
13
19
  };
14
20
  readonly NODE: {
15
21
  readonly CREATED: "node.created";
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../constants/events/events.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BT,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;AACzE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC"}
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../constants/events/events.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCT,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;AACzE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC"}
@@ -13,6 +13,12 @@ exports.EVENTS = {
13
13
  EXPIRED: 'user.expired',
14
14
  TRAFFIC_RESET: 'user.traffic_reset',
15
15
  TRAFFIC_REACHED: 'user.traffic_reached',
16
+ EXPIRE_NOTIFY: {
17
+ EXPIRES_IN_72_HOURS: 'user.expires_in_72_hours',
18
+ EXPIRES_IN_48_HOURS: 'user.expires_in_48_hours',
19
+ EXPIRES_IN_24_HOURS: 'user.expires_in_24_hours',
20
+ EXPIRED_24_HOURS_AGO: 'user.expired_24_hours_ago',
21
+ },
16
22
  },
17
23
  NODE: {
18
24
  CREATED: 'node.created',
@@ -15,6 +15,7 @@ exports.USERS_ROUTES = {
15
15
  DELETE_USER: 'delete',
16
16
  UPDATE: 'update',
17
17
  RESET_USER_TRAFFIC: 'reset-traffic',
18
+ ACTIVATE_ALL_INBOUNDS: 'activate-all-inbounds',
18
19
  BULK: {
19
20
  DELETE_BY_STATUS: 'bulk/delete-by-status',
20
21
  UPDATE: 'bulk/update',
@@ -93,6 +93,7 @@ exports.REST_API = {
93
93
  ENABLE_USER: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ENABLE_USER}/${uuid}`,
94
94
  DELETE_USER: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.DELETE_USER}/${uuid}`,
95
95
  UPDATE: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.UPDATE}`,
96
+ ACTIVATE_ALL_INBOUNDS: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ACTIVATE_ALL_INBOUNDS}/${uuid}`,
96
97
  GET_ALL_V2: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_ALL_V2}`,
97
98
  RESET_USER_TRAFFIC: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.RESET_USER_TRAFFIC}/${uuid}`,
98
99
  BULK: {
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActivateAllInboundsCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ const api_1 = require("../../api");
7
+ var ActivateAllInboundsCommand;
8
+ (function (ActivateAllInboundsCommand) {
9
+ ActivateAllInboundsCommand.url = api_1.REST_API.USERS.ACTIVATE_ALL_INBOUNDS;
10
+ ActivateAllInboundsCommand.TSQ_url = ActivateAllInboundsCommand.url(':uuid');
11
+ ActivateAllInboundsCommand.RequestSchema = zod_1.z.object({
12
+ uuid: zod_1.z.string().uuid(),
13
+ });
14
+ ActivateAllInboundsCommand.ResponseSchema = zod_1.z.object({
15
+ response: models_1.UsersSchema.extend({
16
+ subscriptionUrl: zod_1.z.string(),
17
+ lastConnectedNode: models_1.LastConnectedNodeSchema,
18
+ }),
19
+ });
20
+ })(ActivateAllInboundsCommand || (exports.ActivateAllInboundsCommand = ActivateAllInboundsCommand = {}));
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./activate-all-inbounds.command"), exports);
17
18
  __exportStar(require("./bulk"), exports);
18
19
  __exportStar(require("./bulk-all"), exports);
19
20
  __exportStar(require("./create-user.command"), exports);
@@ -455,4 +455,14 @@ exports.ERRORS = {
455
455
  message: 'Get user usage by range error',
456
456
  httpCode: 500,
457
457
  },
458
+ KEYPAIR_NOT_FOUND: {
459
+ code: 'A092',
460
+ message: 'Keypair not found. Restart app.',
461
+ httpCode: 500,
462
+ },
463
+ ACTIVATE_ALL_INBOUNDS_ERROR: {
464
+ code: 'A093',
465
+ message: 'Activate all inbounds error',
466
+ httpCode: 500,
467
+ },
458
468
  };
@@ -13,6 +13,12 @@ exports.EVENTS = {
13
13
  EXPIRED: 'user.expired',
14
14
  TRAFFIC_RESET: 'user.traffic_reset',
15
15
  TRAFFIC_REACHED: 'user.traffic_reached',
16
+ EXPIRE_NOTIFY: {
17
+ EXPIRES_IN_72_HOURS: 'user.expires_in_72_hours',
18
+ EXPIRES_IN_48_HOURS: 'user.expires_in_48_hours',
19
+ EXPIRES_IN_24_HOURS: 'user.expires_in_24_hours',
20
+ EXPIRED_24_HOURS_AGO: 'user.expired_24_hours_ago',
21
+ },
16
22
  },
17
23
  NODE: {
18
24
  CREATED: 'node.created',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "0.3.62",
3
+ "version": "0.3.63",
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.",