@remnawave/backend-contract 0.1.1 → 0.1.3
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.
- package/build/backend/api/controllers/users.d.ts +3 -0
- package/build/backend/api/controllers/users.d.ts.map +1 -1
- package/build/backend/api/controllers/users.js +3 -0
- package/build/backend/api/routes.d.ts +3 -0
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +3 -0
- package/build/backend/commands/subscription/get-subscription-info-by-short-uuid.command.d.ts +27 -0
- package/build/backend/commands/subscription/get-subscription-info-by-short-uuid.command.d.ts.map +1 -1
- package/build/backend/commands/subscription/get-subscription-info-by-short-uuid.command.js +4 -0
- package/build/backend/commands/users/bulk/bulk-delete-users-by-status.command.d.ts +37 -0
- package/build/backend/commands/users/bulk/bulk-delete-users-by-status.command.d.ts.map +1 -0
- package/build/backend/commands/users/bulk/bulk-delete-users-by-status.command.js +19 -0
- package/build/backend/commands/users/bulk/index.d.ts +2 -0
- package/build/backend/commands/users/bulk/index.d.ts.map +1 -0
- package/build/backend/commands/users/bulk/index.js +17 -0
- package/build/backend/commands/users/index.d.ts +1 -0
- package/build/backend/commands/users/index.d.ts.map +1 -1
- package/build/backend/commands/users/index.js +1 -0
- package/build/backend/constants/errors/errors.d.ts +5 -0
- package/build/backend/constants/errors/errors.d.ts.map +1 -1
- package/build/backend/constants/errors/errors.js +5 -0
- package/build/frontend/api/controllers/users.js +3 -0
- package/build/frontend/api/routes.js +3 -0
- package/build/frontend/commands/subscription/get-subscription-info-by-short-uuid.command.js +4 -0
- package/build/frontend/commands/users/bulk/bulk-delete-users-by-status.command.js +19 -0
- package/build/frontend/commands/users/bulk/index.js +17 -0
- package/build/frontend/commands/users/index.js +1 -0
- package/build/frontend/constants/errors/errors.js +5 -0
- package/package.json +1 -1
@@ -12,5 +12,8 @@ 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 BULK: {
|
16
|
+
readonly DELETE_BY_STATUS: "bulk/delete-by-status";
|
17
|
+
};
|
15
18
|
};
|
16
19
|
//# sourceMappingURL=users.d.ts.map
|
@@ -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
|
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;;;;;;;;;;;;;;;;CAgBf,CAAC"}
|
@@ -47,6 +47,9 @@ export declare const REST_API: {
|
|
47
47
|
readonly UPDATE: "/api/users/update";
|
48
48
|
readonly GET_ALL_V2: "/api/users/v2";
|
49
49
|
readonly RESET_USER_TRAFFIC: (uuid: string) => string;
|
50
|
+
readonly BULK: {
|
51
|
+
readonly DELETE_BY_STATUS: "/api/users/bulk/delete-by-status";
|
52
|
+
};
|
50
53
|
};
|
51
54
|
readonly SUBSCRIPTION: {
|
52
55
|
readonly GET: (shortUuid: string) => string;
|
@@ -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;AAEhD,eAAO,MAAM,QAAQ;;;;;;gCAME,MAAM;;;;;;;;gCASN,MAAM;;;iCAIL,MAAM;iCAEN,MAAM;iCAEN,MAAM;gCAEP,MAAM;;;;;;;;;;;;;;;;qCAiBD,MAAM;gDAEK,MAAM;6CAET,MAAM;8DAEW,MAAM;6CAEvB,MAAM;sCAEb,MAAM;qCAEP,MAAM;qCAEN,MAAM;;;4CAIC,MAAM
|
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;AAEhD,eAAO,MAAM,QAAQ;;;;;;gCAME,MAAM;;;;;;;;gCASN,MAAM;;;iCAIL,MAAM;iCAEN,MAAM;iCAEN,MAAM;gCAEP,MAAM;;;;;;;;;;;;;;;;qCAiBD,MAAM;gDAEK,MAAM;6CAET,MAAM;8DAEW,MAAM;6CAEvB,MAAM;sCAEb,MAAM;qCAEP,MAAM;qCAEN,MAAM;;;4CAIC,MAAM;;;;;;kCAOhB,MAAM;uCAED,MAAM;;;;;;;;gCASb,MAAM;;;;;;;CAQnB,CAAC"}
|
@@ -84,6 +84,9 @@ exports.REST_API = {
|
|
84
84
|
UPDATE: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.UPDATE}`,
|
85
85
|
GET_ALL_V2: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_ALL_V2}`,
|
86
86
|
RESET_USER_TRAFFIC: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.RESET_USER_TRAFFIC}/${uuid}`,
|
87
|
+
BULK: {
|
88
|
+
DELETE_BY_STATUS: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.BULK.DELETE_BY_STATUS}`,
|
89
|
+
},
|
87
90
|
},
|
88
91
|
SUBSCRIPTION: {
|
89
92
|
GET: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET}/${shortUuid}`,
|
package/build/backend/commands/subscription/get-subscription-info-by-short-uuid.command.d.ts
CHANGED
@@ -27,9 +27,16 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
|
|
27
27
|
readonly LIMITED: "LIMITED";
|
28
28
|
readonly EXPIRED: "EXPIRED";
|
29
29
|
}>;
|
30
|
+
trafficLimitStrategy: z.ZodNativeEnum<{
|
31
|
+
readonly NO_RESET: "NO_RESET";
|
32
|
+
readonly DAY: "DAY";
|
33
|
+
readonly WEEK: "WEEK";
|
34
|
+
readonly MONTH: "MONTH";
|
35
|
+
}>;
|
30
36
|
}, "strip", z.ZodTypeAny, {
|
31
37
|
username: string;
|
32
38
|
shortUuid: string;
|
39
|
+
trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
|
33
40
|
daysLeft: number;
|
34
41
|
trafficUsed: string;
|
35
42
|
trafficLimit: string;
|
@@ -39,6 +46,7 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
|
|
39
46
|
}, {
|
40
47
|
username: string;
|
41
48
|
shortUuid: string;
|
49
|
+
trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
|
42
50
|
daysLeft: number;
|
43
51
|
trafficUsed: string;
|
44
52
|
trafficLimit: string;
|
@@ -46,11 +54,15 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
|
|
46
54
|
isActive: boolean;
|
47
55
|
userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
48
56
|
}>;
|
57
|
+
links: z.ZodArray<z.ZodString, "many">;
|
58
|
+
ssConfLinks: z.ZodRecord<z.ZodString, z.ZodString>;
|
59
|
+
subscriptionUrl: z.ZodString;
|
49
60
|
}, "strip", z.ZodTypeAny, {
|
50
61
|
isFound: boolean;
|
51
62
|
user: {
|
52
63
|
username: string;
|
53
64
|
shortUuid: string;
|
65
|
+
trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
|
54
66
|
daysLeft: number;
|
55
67
|
trafficUsed: string;
|
56
68
|
trafficLimit: string;
|
@@ -58,11 +70,15 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
|
|
58
70
|
isActive: boolean;
|
59
71
|
userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
60
72
|
};
|
73
|
+
links: string[];
|
74
|
+
ssConfLinks: Record<string, string>;
|
75
|
+
subscriptionUrl: string;
|
61
76
|
}, {
|
62
77
|
isFound: boolean;
|
63
78
|
user: {
|
64
79
|
username: string;
|
65
80
|
shortUuid: string;
|
81
|
+
trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
|
66
82
|
daysLeft: number;
|
67
83
|
trafficUsed: string;
|
68
84
|
trafficLimit: string;
|
@@ -70,6 +86,9 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
|
|
70
86
|
isActive: boolean;
|
71
87
|
userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
72
88
|
};
|
89
|
+
links: string[];
|
90
|
+
ssConfLinks: Record<string, string>;
|
91
|
+
subscriptionUrl: string;
|
73
92
|
}>;
|
74
93
|
}, "strip", z.ZodTypeAny, {
|
75
94
|
response: {
|
@@ -77,6 +96,7 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
|
|
77
96
|
user: {
|
78
97
|
username: string;
|
79
98
|
shortUuid: string;
|
99
|
+
trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
|
80
100
|
daysLeft: number;
|
81
101
|
trafficUsed: string;
|
82
102
|
trafficLimit: string;
|
@@ -84,6 +104,9 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
|
|
84
104
|
isActive: boolean;
|
85
105
|
userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
86
106
|
};
|
107
|
+
links: string[];
|
108
|
+
ssConfLinks: Record<string, string>;
|
109
|
+
subscriptionUrl: string;
|
87
110
|
};
|
88
111
|
}, {
|
89
112
|
response: {
|
@@ -91,6 +114,7 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
|
|
91
114
|
user: {
|
92
115
|
username: string;
|
93
116
|
shortUuid: string;
|
117
|
+
trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
|
94
118
|
daysLeft: number;
|
95
119
|
trafficUsed: string;
|
96
120
|
trafficLimit: string;
|
@@ -98,6 +122,9 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
|
|
98
122
|
isActive: boolean;
|
99
123
|
userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
100
124
|
};
|
125
|
+
links: string[];
|
126
|
+
ssConfLinks: Record<string, string>;
|
127
|
+
subscriptionUrl: string;
|
101
128
|
};
|
102
129
|
}>;
|
103
130
|
type Response = z.infer<typeof ResponseSchema>;
|
package/build/backend/commands/subscription/get-subscription-info-by-short-uuid.command.d.ts.map
CHANGED
@@ -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
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAkBzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
@@ -23,7 +23,11 @@ var GetSubscriptionInfoByShortUuidCommand;
|
|
23
23
|
expiresAt: zod_1.z.string().transform((str) => new Date(str)),
|
24
24
|
isActive: zod_1.z.boolean(),
|
25
25
|
userStatus: zod_1.z.nativeEnum(constants_1.USERS_STATUS),
|
26
|
+
trafficLimitStrategy: zod_1.z.nativeEnum(constants_1.RESET_PERIODS),
|
26
27
|
}),
|
28
|
+
links: zod_1.z.array(zod_1.z.string()),
|
29
|
+
ssConfLinks: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
|
30
|
+
subscriptionUrl: zod_1.z.string(),
|
27
31
|
}),
|
28
32
|
});
|
29
33
|
})(GetSubscriptionInfoByShortUuidCommand || (exports.GetSubscriptionInfoByShortUuidCommand = GetSubscriptionInfoByShortUuidCommand = {}));
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export declare namespace BulkDeleteUsersByStatusCommand {
|
3
|
+
const url: "/api/users/bulk/delete-by-status";
|
4
|
+
const TSQ_url: "/api/users/bulk/delete-by-status";
|
5
|
+
const RequestSchema: z.ZodObject<{
|
6
|
+
status: z.ZodDefault<z.ZodNativeEnum<{
|
7
|
+
readonly ACTIVE: "ACTIVE";
|
8
|
+
readonly DISABLED: "DISABLED";
|
9
|
+
readonly LIMITED: "LIMITED";
|
10
|
+
readonly EXPIRED: "EXPIRED";
|
11
|
+
}>>;
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
13
|
+
status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
14
|
+
}, {
|
15
|
+
status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
|
16
|
+
}>;
|
17
|
+
type Request = z.infer<typeof RequestSchema>;
|
18
|
+
const ResponseSchema: z.ZodObject<{
|
19
|
+
response: z.ZodObject<{
|
20
|
+
affectedRows: z.ZodNumber;
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
22
|
+
affectedRows: number;
|
23
|
+
}, {
|
24
|
+
affectedRows: number;
|
25
|
+
}>;
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
27
|
+
response: {
|
28
|
+
affectedRows: number;
|
29
|
+
};
|
30
|
+
}, {
|
31
|
+
response: {
|
32
|
+
affectedRows: number;
|
33
|
+
};
|
34
|
+
}>;
|
35
|
+
type Response = z.infer<typeof ResponseSchema>;
|
36
|
+
}
|
37
|
+
//# sourceMappingURL=bulk-delete-users-by-status.command.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"bulk-delete-users-by-status.command.d.ts","sourceRoot":"","sources":["../../../../../commands/users/bulk/bulk-delete-users-by-status.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,8BAA8B,CAAC;IACrC,MAAM,GAAG,oCAAuC,CAAC;IACjD,MAAM,OAAO,oCAAM,CAAC;IAEpB,MAAM,aAAa;;;;;;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;MAIzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.BulkDeleteUsersByStatusCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const models_1 = require("../../../models");
|
6
|
+
const api_1 = require("../../../api");
|
7
|
+
var BulkDeleteUsersByStatusCommand;
|
8
|
+
(function (BulkDeleteUsersByStatusCommand) {
|
9
|
+
BulkDeleteUsersByStatusCommand.url = api_1.REST_API.USERS.BULK.DELETE_BY_STATUS;
|
10
|
+
BulkDeleteUsersByStatusCommand.TSQ_url = BulkDeleteUsersByStatusCommand.url;
|
11
|
+
BulkDeleteUsersByStatusCommand.RequestSchema = zod_1.z.object({
|
12
|
+
status: models_1.UsersSchema.shape.status,
|
13
|
+
});
|
14
|
+
BulkDeleteUsersByStatusCommand.ResponseSchema = zod_1.z.object({
|
15
|
+
response: zod_1.z.object({
|
16
|
+
affectedRows: zod_1.z.number(),
|
17
|
+
}),
|
18
|
+
});
|
19
|
+
})(BulkDeleteUsersByStatusCommand || (exports.BulkDeleteUsersByStatusCommand = BulkDeleteUsersByStatusCommand = {}));
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../commands/users/bulk/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./bulk-delete-users-by-status.command"), exports);
|
@@ -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,kCAAkC,CAAC;AACjD,cAAc,yCAAyC,CAAC;AACxD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,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,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,yCAAyC,CAAC;AACxD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,uBAAuB,CAAC;AACtC,cAAc,QAAQ,CAAC"}
|
@@ -26,3 +26,4 @@ __exportStar(require("./get-user-by-uuid.command"), exports);
|
|
26
26
|
__exportStar(require("./reset-user-traffic.command"), exports);
|
27
27
|
__exportStar(require("./revoke-user-subscription.command"), exports);
|
28
28
|
__exportStar(require("./update-user.command"), exports);
|
29
|
+
__exportStar(require("./bulk"), exports);
|
@@ -309,5 +309,10 @@ export declare const ERRORS: {
|
|
309
309
|
readonly message: "Get all inbounds error";
|
310
310
|
readonly httpCode: 500;
|
311
311
|
};
|
312
|
+
readonly BULK_DELETE_USERS_BY_STATUS_ERROR: {
|
313
|
+
readonly code: "A059";
|
314
|
+
readonly message: "Bulk delete users by status error";
|
315
|
+
readonly httpCode: 500;
|
316
|
+
};
|
312
317
|
};
|
313
318
|
//# 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
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwJY,MAAM;;;;;;;;;;wCAUN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmI3B,CAAC"}
|
@@ -84,6 +84,9 @@ exports.REST_API = {
|
|
84
84
|
UPDATE: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.UPDATE}`,
|
85
85
|
GET_ALL_V2: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_ALL_V2}`,
|
86
86
|
RESET_USER_TRAFFIC: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.RESET_USER_TRAFFIC}/${uuid}`,
|
87
|
+
BULK: {
|
88
|
+
DELETE_BY_STATUS: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.BULK.DELETE_BY_STATUS}`,
|
89
|
+
},
|
87
90
|
},
|
88
91
|
SUBSCRIPTION: {
|
89
92
|
GET: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET}/${shortUuid}`,
|
@@ -23,7 +23,11 @@ var GetSubscriptionInfoByShortUuidCommand;
|
|
23
23
|
expiresAt: zod_1.z.string().transform((str) => new Date(str)),
|
24
24
|
isActive: zod_1.z.boolean(),
|
25
25
|
userStatus: zod_1.z.nativeEnum(constants_1.USERS_STATUS),
|
26
|
+
trafficLimitStrategy: zod_1.z.nativeEnum(constants_1.RESET_PERIODS),
|
26
27
|
}),
|
28
|
+
links: zod_1.z.array(zod_1.z.string()),
|
29
|
+
ssConfLinks: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
|
30
|
+
subscriptionUrl: zod_1.z.string(),
|
27
31
|
}),
|
28
32
|
});
|
29
33
|
})(GetSubscriptionInfoByShortUuidCommand || (exports.GetSubscriptionInfoByShortUuidCommand = GetSubscriptionInfoByShortUuidCommand = {}));
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.BulkDeleteUsersByStatusCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const models_1 = require("../../../models");
|
6
|
+
const api_1 = require("../../../api");
|
7
|
+
var BulkDeleteUsersByStatusCommand;
|
8
|
+
(function (BulkDeleteUsersByStatusCommand) {
|
9
|
+
BulkDeleteUsersByStatusCommand.url = api_1.REST_API.USERS.BULK.DELETE_BY_STATUS;
|
10
|
+
BulkDeleteUsersByStatusCommand.TSQ_url = BulkDeleteUsersByStatusCommand.url;
|
11
|
+
BulkDeleteUsersByStatusCommand.RequestSchema = zod_1.z.object({
|
12
|
+
status: models_1.UsersSchema.shape.status,
|
13
|
+
});
|
14
|
+
BulkDeleteUsersByStatusCommand.ResponseSchema = zod_1.z.object({
|
15
|
+
response: zod_1.z.object({
|
16
|
+
affectedRows: zod_1.z.number(),
|
17
|
+
}),
|
18
|
+
});
|
19
|
+
})(BulkDeleteUsersByStatusCommand || (exports.BulkDeleteUsersByStatusCommand = BulkDeleteUsersByStatusCommand = {}));
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./bulk-delete-users-by-status.command"), exports);
|
@@ -26,3 +26,4 @@ __exportStar(require("./get-user-by-uuid.command"), exports);
|
|
26
26
|
__exportStar(require("./reset-user-traffic.command"), exports);
|
27
27
|
__exportStar(require("./revoke-user-subscription.command"), exports);
|
28
28
|
__exportStar(require("./update-user.command"), exports);
|
29
|
+
__exportStar(require("./bulk"), exports);
|