@remnawave/backend-contract 0.3.41 → 0.3.45
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 +5 -0
- package/build/backend/api/controllers/users.d.ts.map +1 -1
- package/build/backend/api/controllers/users.js +5 -0
- package/build/backend/api/routes.d.ts +5 -0
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +5 -0
- package/build/backend/commands/auth/register.command.js +1 -1
- package/build/backend/commands/users/bulk/bulk-update-users-inbounds.command.d.ts +35 -0
- package/build/backend/commands/users/bulk/bulk-update-users-inbounds.command.d.ts.map +1 -0
- package/build/backend/commands/users/bulk/bulk-update-users-inbounds.command.js +21 -0
- package/build/backend/commands/users/bulk/bulk-update-users.command.js +1 -1
- package/build/backend/commands/users/bulk/index.d.ts +1 -0
- package/build/backend/commands/users/bulk/index.d.ts.map +1 -1
- package/build/backend/commands/users/bulk/index.js +1 -0
- package/build/backend/commands/users/bulk-all/bulk-all-reset-traffic-users.command.d.ts +24 -0
- package/build/backend/commands/users/bulk-all/bulk-all-reset-traffic-users.command.d.ts.map +1 -0
- package/build/backend/commands/users/bulk-all/bulk-all-reset-traffic-users.command.js +15 -0
- package/build/backend/commands/users/bulk-all/bulk-all-update-users.command.d.ts +60 -0
- package/build/backend/commands/users/bulk-all/bulk-all-update-users.command.d.ts.map +1 -0
- package/build/backend/commands/users/bulk-all/bulk-all-update-users.command.js +43 -0
- package/build/backend/commands/users/bulk-all/index.d.ts +3 -0
- package/build/backend/commands/users/bulk-all/index.d.ts.map +1 -0
- package/build/backend/commands/users/bulk-all/index.js +18 -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/commands/users/update-user.command.js +1 -1
- package/build/backend/constants/errors/errors.d.ts +15 -0
- package/build/backend/constants/errors/errors.d.ts.map +1 -1
- package/build/backend/constants/errors/errors.js +15 -0
- package/build/frontend/api/controllers/users.js +5 -0
- package/build/frontend/api/routes.js +5 -0
- package/build/frontend/commands/auth/register.command.js +1 -1
- package/build/frontend/commands/users/bulk/bulk-update-users-inbounds.command.js +21 -0
- package/build/frontend/commands/users/bulk/bulk-update-users.command.js +1 -1
- package/build/frontend/commands/users/bulk/index.js +1 -0
- package/build/frontend/commands/users/bulk-all/bulk-all-reset-traffic-users.command.js +15 -0
- package/build/frontend/commands/users/bulk-all/bulk-all-update-users.command.js +43 -0
- package/build/frontend/commands/users/bulk-all/index.js +18 -0
- package/build/frontend/commands/users/index.js +1 -0
- package/build/frontend/commands/users/update-user.command.js +1 -1
- package/build/frontend/constants/errors/errors.js +15 -0
- package/package.json +1 -1
@@ -18,6 +18,11 @@ export declare const USERS_ROUTES: {
|
|
18
18
|
readonly RESET_TRAFFIC: "bulk/reset-traffic";
|
19
19
|
readonly REVOKE_SUBSCRIPTION: "bulk/revoke-subscription";
|
20
20
|
readonly DELETE: "bulk/delete";
|
21
|
+
readonly UPDATE_INBOUNDS: "bulk/update-inbounds";
|
22
|
+
readonly ALL: {
|
23
|
+
readonly UPDATE: "bulk/all/update";
|
24
|
+
readonly RESET_TRAFFIC: "bulk/all/reset-traffic";
|
25
|
+
};
|
21
26
|
};
|
22
27
|
readonly GET_BY_TELEGRAM_ID: "tg";
|
23
28
|
readonly GET_BY_EMAIL: "email";
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2Bf,CAAC"}
|
@@ -21,6 +21,11 @@ exports.USERS_ROUTES = {
|
|
21
21
|
RESET_TRAFFIC: 'bulk/reset-traffic',
|
22
22
|
REVOKE_SUBSCRIPTION: 'bulk/revoke-subscription',
|
23
23
|
DELETE: 'bulk/delete',
|
24
|
+
UPDATE_INBOUNDS: 'bulk/update-inbounds',
|
25
|
+
ALL: {
|
26
|
+
UPDATE: 'bulk/all/update',
|
27
|
+
RESET_TRAFFIC: 'bulk/all/reset-traffic',
|
28
|
+
},
|
24
29
|
},
|
25
30
|
GET_BY_TELEGRAM_ID: 'tg',
|
26
31
|
GET_BY_EMAIL: 'email',
|
@@ -64,6 +64,11 @@ export declare const REST_API: {
|
|
64
64
|
readonly RESET_TRAFFIC: "/api/users/bulk/reset-traffic";
|
65
65
|
readonly REVOKE_SUBSCRIPTION: "/api/users/bulk/revoke-subscription";
|
66
66
|
readonly DELETE: "/api/users/bulk/delete";
|
67
|
+
readonly UPDATE_INBOUNDS: "/api/users/bulk/update-inbounds";
|
68
|
+
readonly ALL: {
|
69
|
+
readonly UPDATE: "/api/users/bulk/all/update";
|
70
|
+
readonly RESET_TRAFFIC: "/api/users/bulk/all/reset-traffic";
|
71
|
+
};
|
67
72
|
};
|
68
73
|
readonly GET_BY_TELEGRAM_ID: (telegramId: string) => string;
|
69
74
|
readonly GET_BY_EMAIL: (email: 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;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
|
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;;;kCAIX,MAAM;0CAEE,MAAM;uCAET,MAAM;;;;;;;;gCASb,MAAM;iCAEL,MAAM;;;;;;;;;;;;;;;0CAgBG,MAAM;;;;;;;CAQ7B,CAAC"}
|
@@ -101,6 +101,11 @@ exports.REST_API = {
|
|
101
101
|
RESET_TRAFFIC: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.BULK.RESET_TRAFFIC}`,
|
102
102
|
REVOKE_SUBSCRIPTION: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.BULK.REVOKE_SUBSCRIPTION}`,
|
103
103
|
DELETE: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.BULK.DELETE}`,
|
104
|
+
UPDATE_INBOUNDS: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.BULK.UPDATE_INBOUNDS}`,
|
105
|
+
ALL: {
|
106
|
+
UPDATE: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.BULK.ALL.UPDATE}`,
|
107
|
+
RESET_TRAFFIC: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.BULK.ALL.RESET_TRAFFIC}`,
|
108
|
+
},
|
104
109
|
},
|
105
110
|
GET_BY_TELEGRAM_ID: (telegramId) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY_TELEGRAM_ID}/${telegramId}`,
|
106
111
|
GET_BY_EMAIL: (email) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY_EMAIL}/${email}`,
|
@@ -12,7 +12,7 @@ var RegisterCommand;
|
|
12
12
|
password: zod_1.z
|
13
13
|
.string()
|
14
14
|
.min(24, 'Password must contain at least 24 characters')
|
15
|
-
.regex(/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9]).{24,}$/, 'Password must contain uppercase and lowercase letters and numbers'),
|
15
|
+
.regex(/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9]).{24,}$/, 'Password must contain uppercase and lowercase letters and numbers, and be at least 24 characters long.'),
|
16
16
|
});
|
17
17
|
RegisterCommand.ResponseSchema = zod_1.z.object({
|
18
18
|
response: zod_1.z.object({
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export declare namespace BulkUpdateUsersInboundsCommand {
|
3
|
+
const url: "/api/users/bulk/update-inbounds";
|
4
|
+
const TSQ_url: "/api/users/bulk/update-inbounds";
|
5
|
+
const RequestSchema: z.ZodObject<{
|
6
|
+
uuids: z.ZodArray<z.ZodString, "many">;
|
7
|
+
activeUserInbounds: z.ZodArray<z.ZodString, "many">;
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
9
|
+
activeUserInbounds: string[];
|
10
|
+
uuids: string[];
|
11
|
+
}, {
|
12
|
+
activeUserInbounds: string[];
|
13
|
+
uuids: string[];
|
14
|
+
}>;
|
15
|
+
type Request = z.infer<typeof RequestSchema>;
|
16
|
+
const ResponseSchema: z.ZodObject<{
|
17
|
+
response: z.ZodObject<{
|
18
|
+
affectedRows: z.ZodNumber;
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
20
|
+
affectedRows: number;
|
21
|
+
}, {
|
22
|
+
affectedRows: number;
|
23
|
+
}>;
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
25
|
+
response: {
|
26
|
+
affectedRows: number;
|
27
|
+
};
|
28
|
+
}, {
|
29
|
+
response: {
|
30
|
+
affectedRows: number;
|
31
|
+
};
|
32
|
+
}>;
|
33
|
+
type Response = z.infer<typeof ResponseSchema>;
|
34
|
+
}
|
35
|
+
//# sourceMappingURL=bulk-update-users-inbounds.command.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"bulk-update-users-inbounds.command.d.ts","sourceRoot":"","sources":["../../../../../commands/users/bulk/bulk-update-users-inbounds.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,8BAA8B,CAAC;IACrC,MAAM,GAAG,mCAAsC,CAAC;IAChD,MAAM,OAAO,mCAAM,CAAC;IAEpB,MAAM,aAAa;;;;;;;;;MAKxB,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,21 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.BulkUpdateUsersInboundsCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../../api");
|
6
|
+
var BulkUpdateUsersInboundsCommand;
|
7
|
+
(function (BulkUpdateUsersInboundsCommand) {
|
8
|
+
BulkUpdateUsersInboundsCommand.url = api_1.REST_API.USERS.BULK.UPDATE_INBOUNDS;
|
9
|
+
BulkUpdateUsersInboundsCommand.TSQ_url = BulkUpdateUsersInboundsCommand.url;
|
10
|
+
BulkUpdateUsersInboundsCommand.RequestSchema = zod_1.z.object({
|
11
|
+
uuids: zod_1.z.array(zod_1.z.string().uuid()),
|
12
|
+
activeUserInbounds: zod_1.z.array(zod_1.z.string().uuid(), {
|
13
|
+
invalid_type_error: 'Enabled inbounds must be an array of UUIDs',
|
14
|
+
}),
|
15
|
+
});
|
16
|
+
BulkUpdateUsersInboundsCommand.ResponseSchema = zod_1.z.object({
|
17
|
+
response: zod_1.z.object({
|
18
|
+
affectedRows: zod_1.z.number(),
|
19
|
+
}),
|
20
|
+
});
|
21
|
+
})(BulkUpdateUsersInboundsCommand || (exports.BulkUpdateUsersInboundsCommand = BulkUpdateUsersInboundsCommand = {}));
|
@@ -27,7 +27,7 @@ var BulkUpdateUsersCommand;
|
|
27
27
|
.describe('Traffic limit reset strategy')),
|
28
28
|
expireAt: zod_1.z.optional(zod_1.z
|
29
29
|
.string()
|
30
|
-
.datetime({ message: 'Invalid date format' })
|
30
|
+
.datetime({ local: true, offset: true, message: 'Invalid date format' })
|
31
31
|
.transform((str) => new Date(str))
|
32
32
|
.refine((date) => date > new Date(), {
|
33
33
|
message: 'Expiration date cannot be in the past',
|
@@ -2,5 +2,6 @@ export * from './bulk-delete-users-by-status.command';
|
|
2
2
|
export * from './bulk-delete-users.command';
|
3
3
|
export * from './bulk-reset-traffic-users.command';
|
4
4
|
export * from './bulk-revoke-users-subscription.command';
|
5
|
+
export * from './bulk-update-users-inbounds.command';
|
5
6
|
export * from './bulk-update-users.command';
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../commands/users/bulk/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,0CAA0C,CAAC;AACzD,cAAc,6BAA6B,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../commands/users/bulk/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,0CAA0C,CAAC;AACzD,cAAc,sCAAsC,CAAC;AACrD,cAAc,6BAA6B,CAAC"}
|
@@ -18,4 +18,5 @@ __exportStar(require("./bulk-delete-users-by-status.command"), exports);
|
|
18
18
|
__exportStar(require("./bulk-delete-users.command"), exports);
|
19
19
|
__exportStar(require("./bulk-reset-traffic-users.command"), exports);
|
20
20
|
__exportStar(require("./bulk-revoke-users-subscription.command"), exports);
|
21
|
+
__exportStar(require("./bulk-update-users-inbounds.command"), exports);
|
21
22
|
__exportStar(require("./bulk-update-users.command"), exports);
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export declare namespace BulkAllResetTrafficUsersCommand {
|
3
|
+
const url: "/api/users/bulk/all/reset-traffic";
|
4
|
+
const TSQ_url: "/api/users/bulk/all/reset-traffic";
|
5
|
+
const ResponseSchema: z.ZodObject<{
|
6
|
+
response: z.ZodObject<{
|
7
|
+
eventSent: z.ZodBoolean;
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
9
|
+
eventSent: boolean;
|
10
|
+
}, {
|
11
|
+
eventSent: boolean;
|
12
|
+
}>;
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
14
|
+
response: {
|
15
|
+
eventSent: boolean;
|
16
|
+
};
|
17
|
+
}, {
|
18
|
+
response: {
|
19
|
+
eventSent: boolean;
|
20
|
+
};
|
21
|
+
}>;
|
22
|
+
type Response = z.infer<typeof ResponseSchema>;
|
23
|
+
}
|
24
|
+
//# sourceMappingURL=bulk-all-reset-traffic-users.command.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"bulk-all-reset-traffic-users.command.d.ts","sourceRoot":"","sources":["../../../../../commands/users/bulk-all/bulk-all-reset-traffic-users.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,+BAA+B,CAAC;IACtC,MAAM,GAAG,qCAAwC,CAAC;IAClD,MAAM,OAAO,qCAAM,CAAC;IAEpB,MAAM,cAAc;;;;;;;;;;;;;;;;MAIzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.BulkAllResetTrafficUsersCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../../api");
|
6
|
+
var BulkAllResetTrafficUsersCommand;
|
7
|
+
(function (BulkAllResetTrafficUsersCommand) {
|
8
|
+
BulkAllResetTrafficUsersCommand.url = api_1.REST_API.USERS.BULK.ALL.RESET_TRAFFIC;
|
9
|
+
BulkAllResetTrafficUsersCommand.TSQ_url = BulkAllResetTrafficUsersCommand.url;
|
10
|
+
BulkAllResetTrafficUsersCommand.ResponseSchema = zod_1.z.object({
|
11
|
+
response: zod_1.z.object({
|
12
|
+
eventSent: zod_1.z.boolean(),
|
13
|
+
}),
|
14
|
+
});
|
15
|
+
})(BulkAllResetTrafficUsersCommand || (exports.BulkAllResetTrafficUsersCommand = BulkAllResetTrafficUsersCommand = {}));
|
@@ -0,0 +1,60 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export declare namespace BulkAllUpdateUsersCommand {
|
3
|
+
const url: "/api/users/bulk/all/update";
|
4
|
+
const TSQ_url: "/api/users/bulk/all/update";
|
5
|
+
const RequestSchema: z.ZodObject<{
|
6
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodNativeEnum<{
|
7
|
+
readonly ACTIVE: "ACTIVE";
|
8
|
+
readonly DISABLED: "DISABLED";
|
9
|
+
readonly LIMITED: "LIMITED";
|
10
|
+
readonly EXPIRED: "EXPIRED";
|
11
|
+
}>>>;
|
12
|
+
trafficLimitBytes: z.ZodOptional<z.ZodNumber>;
|
13
|
+
trafficLimitStrategy: z.ZodOptional<z.ZodNativeEnum<{
|
14
|
+
readonly NO_RESET: "NO_RESET";
|
15
|
+
readonly DAY: "DAY";
|
16
|
+
readonly WEEK: "WEEK";
|
17
|
+
readonly MONTH: "MONTH";
|
18
|
+
}>>;
|
19
|
+
expireAt: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, Date, string>, Date, string>>;
|
20
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
21
|
+
telegramId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
22
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
24
|
+
status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
|
25
|
+
email?: string | null | undefined;
|
26
|
+
trafficLimitBytes?: number | undefined;
|
27
|
+
description?: string | null | undefined;
|
28
|
+
trafficLimitStrategy?: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | undefined;
|
29
|
+
expireAt?: Date | undefined;
|
30
|
+
telegramId?: number | null | undefined;
|
31
|
+
}, {
|
32
|
+
status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
|
33
|
+
email?: string | null | undefined;
|
34
|
+
trafficLimitBytes?: number | undefined;
|
35
|
+
description?: string | null | undefined;
|
36
|
+
trafficLimitStrategy?: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | undefined;
|
37
|
+
expireAt?: string | undefined;
|
38
|
+
telegramId?: number | null | undefined;
|
39
|
+
}>;
|
40
|
+
type Request = z.infer<typeof RequestSchema>;
|
41
|
+
const ResponseSchema: z.ZodObject<{
|
42
|
+
response: z.ZodObject<{
|
43
|
+
eventSent: z.ZodBoolean;
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
45
|
+
eventSent: boolean;
|
46
|
+
}, {
|
47
|
+
eventSent: boolean;
|
48
|
+
}>;
|
49
|
+
}, "strip", z.ZodTypeAny, {
|
50
|
+
response: {
|
51
|
+
eventSent: boolean;
|
52
|
+
};
|
53
|
+
}, {
|
54
|
+
response: {
|
55
|
+
eventSent: boolean;
|
56
|
+
};
|
57
|
+
}>;
|
58
|
+
type Response = z.infer<typeof ResponseSchema>;
|
59
|
+
}
|
60
|
+
//# sourceMappingURL=bulk-all-update-users.command.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"bulk-all-update-users.command.d.ts","sourceRoot":"","sources":["../../../../../commands/users/bulk-all/bulk-all-update-users.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,yBAAyB,CAAC;IAChC,MAAM,GAAG,8BAAiC,CAAC;IAC3C,MAAM,OAAO,8BAAM,CAAC;IAEpB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA+BxB,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,43 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.BulkAllUpdateUsersCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const constants_1 = require("../../../constants");
|
6
|
+
const models_1 = require("../../../models");
|
7
|
+
const api_1 = require("../../../api");
|
8
|
+
var BulkAllUpdateUsersCommand;
|
9
|
+
(function (BulkAllUpdateUsersCommand) {
|
10
|
+
BulkAllUpdateUsersCommand.url = api_1.REST_API.USERS.BULK.ALL.UPDATE;
|
11
|
+
BulkAllUpdateUsersCommand.TSQ_url = BulkAllUpdateUsersCommand.url;
|
12
|
+
BulkAllUpdateUsersCommand.RequestSchema = zod_1.z.object({
|
13
|
+
status: models_1.UsersSchema.shape.status.optional(),
|
14
|
+
trafficLimitBytes: zod_1.z.optional(zod_1.z
|
15
|
+
.number({
|
16
|
+
invalid_type_error: 'Traffic limit must be a number',
|
17
|
+
})
|
18
|
+
.int('Traffic limit must be an integer')
|
19
|
+
.min(0, 'Traffic limit must be greater than 0')
|
20
|
+
.describe('Traffic limit in bytes. 0 - unlimited')),
|
21
|
+
trafficLimitStrategy: zod_1.z.optional(zod_1.z
|
22
|
+
.nativeEnum(constants_1.RESET_PERIODS, {
|
23
|
+
description: 'Available reset periods',
|
24
|
+
})
|
25
|
+
.describe('Traffic limit reset strategy')),
|
26
|
+
expireAt: zod_1.z.optional(zod_1.z
|
27
|
+
.string()
|
28
|
+
.datetime({ local: true, offset: true, message: 'Invalid date format' })
|
29
|
+
.transform((str) => new Date(str))
|
30
|
+
.refine((date) => date > new Date(), {
|
31
|
+
message: 'Expiration date cannot be in the past',
|
32
|
+
})
|
33
|
+
.describe('Expiration date: 2025-01-17T15:38:45.065Z')),
|
34
|
+
description: zod_1.z.optional(zod_1.z.string().nullable()),
|
35
|
+
telegramId: zod_1.z.optional(zod_1.z.number().nullable()),
|
36
|
+
email: zod_1.z.optional(zod_1.z.string().email('Invalid email format').nullable()),
|
37
|
+
});
|
38
|
+
BulkAllUpdateUsersCommand.ResponseSchema = zod_1.z.object({
|
39
|
+
response: zod_1.z.object({
|
40
|
+
eventSent: zod_1.z.boolean(),
|
41
|
+
}),
|
42
|
+
});
|
43
|
+
})(BulkAllUpdateUsersCommand || (exports.BulkAllUpdateUsersCommand = BulkAllUpdateUsersCommand = {}));
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../commands/users/bulk-all/index.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAC;AACvD,cAAc,iCAAiC,CAAC"}
|
@@ -0,0 +1,18 @@
|
|
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-all-reset-traffic-users.command"), exports);
|
18
|
+
__exportStar(require("./bulk-all-update-users.command"), exports);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/users/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,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,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,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,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,uBAAuB,CAAC"}
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
17
|
__exportStar(require("./bulk"), exports);
|
18
|
+
__exportStar(require("./bulk-all"), exports);
|
18
19
|
__exportStar(require("./create-user.command"), exports);
|
19
20
|
__exportStar(require("./delete-user.command"), exports);
|
20
21
|
__exportStar(require("./disable-user.command"), exports);
|
@@ -42,7 +42,7 @@ var UpdateUserCommand;
|
|
42
42
|
.optional(),
|
43
43
|
expireAt: zod_1.z
|
44
44
|
.string()
|
45
|
-
.datetime({ message: 'Invalid date format' })
|
45
|
+
.datetime({ local: true, offset: true, message: 'Invalid date format' })
|
46
46
|
.transform((str) => new Date(str))
|
47
47
|
.refine((date) => date > new Date(), {
|
48
48
|
message: 'Expiration date cannot be in the past',
|
@@ -459,5 +459,20 @@ export declare const ERRORS: {
|
|
459
459
|
readonly message: "Bulk update users error";
|
460
460
|
readonly httpCode: 500;
|
461
461
|
};
|
462
|
+
readonly BULK_ADD_INBOUNDS_TO_USERS_ERROR: {
|
463
|
+
readonly code: "A088";
|
464
|
+
readonly message: "Bulk add inbounds to users error";
|
465
|
+
readonly httpCode: 500;
|
466
|
+
};
|
467
|
+
readonly BULK_UPDATE_ALL_USERS_ERROR: {
|
468
|
+
readonly code: "A087";
|
469
|
+
readonly message: "Bulk update all users error";
|
470
|
+
readonly httpCode: 500;
|
471
|
+
};
|
472
|
+
readonly INVALID_USER_STATUS_ERROR: {
|
473
|
+
readonly code: "A089";
|
474
|
+
readonly message: "LIMITED and EXPIRED statuses are not allowed to be set manually.";
|
475
|
+
readonly httpCode: 400;
|
476
|
+
};
|
462
477
|
};
|
463
478
|
//# 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
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+I3B,CAAC"}
|
@@ -430,4 +430,19 @@ exports.ERRORS = {
|
|
430
430
|
message: 'Bulk update users error',
|
431
431
|
httpCode: 500,
|
432
432
|
},
|
433
|
+
BULK_ADD_INBOUNDS_TO_USERS_ERROR: {
|
434
|
+
code: 'A088',
|
435
|
+
message: 'Bulk add inbounds to users error',
|
436
|
+
httpCode: 500,
|
437
|
+
},
|
438
|
+
BULK_UPDATE_ALL_USERS_ERROR: {
|
439
|
+
code: 'A087',
|
440
|
+
message: 'Bulk update all users error',
|
441
|
+
httpCode: 500,
|
442
|
+
},
|
443
|
+
INVALID_USER_STATUS_ERROR: {
|
444
|
+
code: 'A089',
|
445
|
+
message: 'LIMITED and EXPIRED statuses are not allowed to be set manually.',
|
446
|
+
httpCode: 400,
|
447
|
+
},
|
433
448
|
};
|
@@ -21,6 +21,11 @@ exports.USERS_ROUTES = {
|
|
21
21
|
RESET_TRAFFIC: 'bulk/reset-traffic',
|
22
22
|
REVOKE_SUBSCRIPTION: 'bulk/revoke-subscription',
|
23
23
|
DELETE: 'bulk/delete',
|
24
|
+
UPDATE_INBOUNDS: 'bulk/update-inbounds',
|
25
|
+
ALL: {
|
26
|
+
UPDATE: 'bulk/all/update',
|
27
|
+
RESET_TRAFFIC: 'bulk/all/reset-traffic',
|
28
|
+
},
|
24
29
|
},
|
25
30
|
GET_BY_TELEGRAM_ID: 'tg',
|
26
31
|
GET_BY_EMAIL: 'email',
|
@@ -101,6 +101,11 @@ exports.REST_API = {
|
|
101
101
|
RESET_TRAFFIC: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.BULK.RESET_TRAFFIC}`,
|
102
102
|
REVOKE_SUBSCRIPTION: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.BULK.REVOKE_SUBSCRIPTION}`,
|
103
103
|
DELETE: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.BULK.DELETE}`,
|
104
|
+
UPDATE_INBOUNDS: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.BULK.UPDATE_INBOUNDS}`,
|
105
|
+
ALL: {
|
106
|
+
UPDATE: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.BULK.ALL.UPDATE}`,
|
107
|
+
RESET_TRAFFIC: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.BULK.ALL.RESET_TRAFFIC}`,
|
108
|
+
},
|
104
109
|
},
|
105
110
|
GET_BY_TELEGRAM_ID: (telegramId) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY_TELEGRAM_ID}/${telegramId}`,
|
106
111
|
GET_BY_EMAIL: (email) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY_EMAIL}/${email}`,
|
@@ -12,7 +12,7 @@ var RegisterCommand;
|
|
12
12
|
password: zod_1.z
|
13
13
|
.string()
|
14
14
|
.min(24, 'Password must contain at least 24 characters')
|
15
|
-
.regex(/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9]).{24,}$/, 'Password must contain uppercase and lowercase letters and numbers'),
|
15
|
+
.regex(/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9]).{24,}$/, 'Password must contain uppercase and lowercase letters and numbers, and be at least 24 characters long.'),
|
16
16
|
});
|
17
17
|
RegisterCommand.ResponseSchema = zod_1.z.object({
|
18
18
|
response: zod_1.z.object({
|
@@ -0,0 +1,21 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.BulkUpdateUsersInboundsCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../../api");
|
6
|
+
var BulkUpdateUsersInboundsCommand;
|
7
|
+
(function (BulkUpdateUsersInboundsCommand) {
|
8
|
+
BulkUpdateUsersInboundsCommand.url = api_1.REST_API.USERS.BULK.UPDATE_INBOUNDS;
|
9
|
+
BulkUpdateUsersInboundsCommand.TSQ_url = BulkUpdateUsersInboundsCommand.url;
|
10
|
+
BulkUpdateUsersInboundsCommand.RequestSchema = zod_1.z.object({
|
11
|
+
uuids: zod_1.z.array(zod_1.z.string().uuid()),
|
12
|
+
activeUserInbounds: zod_1.z.array(zod_1.z.string().uuid(), {
|
13
|
+
invalid_type_error: 'Enabled inbounds must be an array of UUIDs',
|
14
|
+
}),
|
15
|
+
});
|
16
|
+
BulkUpdateUsersInboundsCommand.ResponseSchema = zod_1.z.object({
|
17
|
+
response: zod_1.z.object({
|
18
|
+
affectedRows: zod_1.z.number(),
|
19
|
+
}),
|
20
|
+
});
|
21
|
+
})(BulkUpdateUsersInboundsCommand || (exports.BulkUpdateUsersInboundsCommand = BulkUpdateUsersInboundsCommand = {}));
|
@@ -27,7 +27,7 @@ var BulkUpdateUsersCommand;
|
|
27
27
|
.describe('Traffic limit reset strategy')),
|
28
28
|
expireAt: zod_1.z.optional(zod_1.z
|
29
29
|
.string()
|
30
|
-
.datetime({ message: 'Invalid date format' })
|
30
|
+
.datetime({ local: true, offset: true, message: 'Invalid date format' })
|
31
31
|
.transform((str) => new Date(str))
|
32
32
|
.refine((date) => date > new Date(), {
|
33
33
|
message: 'Expiration date cannot be in the past',
|
@@ -18,4 +18,5 @@ __exportStar(require("./bulk-delete-users-by-status.command"), exports);
|
|
18
18
|
__exportStar(require("./bulk-delete-users.command"), exports);
|
19
19
|
__exportStar(require("./bulk-reset-traffic-users.command"), exports);
|
20
20
|
__exportStar(require("./bulk-revoke-users-subscription.command"), exports);
|
21
|
+
__exportStar(require("./bulk-update-users-inbounds.command"), exports);
|
21
22
|
__exportStar(require("./bulk-update-users.command"), exports);
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.BulkAllResetTrafficUsersCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../../api");
|
6
|
+
var BulkAllResetTrafficUsersCommand;
|
7
|
+
(function (BulkAllResetTrafficUsersCommand) {
|
8
|
+
BulkAllResetTrafficUsersCommand.url = api_1.REST_API.USERS.BULK.ALL.RESET_TRAFFIC;
|
9
|
+
BulkAllResetTrafficUsersCommand.TSQ_url = BulkAllResetTrafficUsersCommand.url;
|
10
|
+
BulkAllResetTrafficUsersCommand.ResponseSchema = zod_1.z.object({
|
11
|
+
response: zod_1.z.object({
|
12
|
+
eventSent: zod_1.z.boolean(),
|
13
|
+
}),
|
14
|
+
});
|
15
|
+
})(BulkAllResetTrafficUsersCommand || (exports.BulkAllResetTrafficUsersCommand = BulkAllResetTrafficUsersCommand = {}));
|
@@ -0,0 +1,43 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.BulkAllUpdateUsersCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const constants_1 = require("../../../constants");
|
6
|
+
const models_1 = require("../../../models");
|
7
|
+
const api_1 = require("../../../api");
|
8
|
+
var BulkAllUpdateUsersCommand;
|
9
|
+
(function (BulkAllUpdateUsersCommand) {
|
10
|
+
BulkAllUpdateUsersCommand.url = api_1.REST_API.USERS.BULK.ALL.UPDATE;
|
11
|
+
BulkAllUpdateUsersCommand.TSQ_url = BulkAllUpdateUsersCommand.url;
|
12
|
+
BulkAllUpdateUsersCommand.RequestSchema = zod_1.z.object({
|
13
|
+
status: models_1.UsersSchema.shape.status.optional(),
|
14
|
+
trafficLimitBytes: zod_1.z.optional(zod_1.z
|
15
|
+
.number({
|
16
|
+
invalid_type_error: 'Traffic limit must be a number',
|
17
|
+
})
|
18
|
+
.int('Traffic limit must be an integer')
|
19
|
+
.min(0, 'Traffic limit must be greater than 0')
|
20
|
+
.describe('Traffic limit in bytes. 0 - unlimited')),
|
21
|
+
trafficLimitStrategy: zod_1.z.optional(zod_1.z
|
22
|
+
.nativeEnum(constants_1.RESET_PERIODS, {
|
23
|
+
description: 'Available reset periods',
|
24
|
+
})
|
25
|
+
.describe('Traffic limit reset strategy')),
|
26
|
+
expireAt: zod_1.z.optional(zod_1.z
|
27
|
+
.string()
|
28
|
+
.datetime({ local: true, offset: true, message: 'Invalid date format' })
|
29
|
+
.transform((str) => new Date(str))
|
30
|
+
.refine((date) => date > new Date(), {
|
31
|
+
message: 'Expiration date cannot be in the past',
|
32
|
+
})
|
33
|
+
.describe('Expiration date: 2025-01-17T15:38:45.065Z')),
|
34
|
+
description: zod_1.z.optional(zod_1.z.string().nullable()),
|
35
|
+
telegramId: zod_1.z.optional(zod_1.z.number().nullable()),
|
36
|
+
email: zod_1.z.optional(zod_1.z.string().email('Invalid email format').nullable()),
|
37
|
+
});
|
38
|
+
BulkAllUpdateUsersCommand.ResponseSchema = zod_1.z.object({
|
39
|
+
response: zod_1.z.object({
|
40
|
+
eventSent: zod_1.z.boolean(),
|
41
|
+
}),
|
42
|
+
});
|
43
|
+
})(BulkAllUpdateUsersCommand || (exports.BulkAllUpdateUsersCommand = BulkAllUpdateUsersCommand = {}));
|
@@ -0,0 +1,18 @@
|
|
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-all-reset-traffic-users.command"), exports);
|
18
|
+
__exportStar(require("./bulk-all-update-users.command"), exports);
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
17
|
__exportStar(require("./bulk"), exports);
|
18
|
+
__exportStar(require("./bulk-all"), exports);
|
18
19
|
__exportStar(require("./create-user.command"), exports);
|
19
20
|
__exportStar(require("./delete-user.command"), exports);
|
20
21
|
__exportStar(require("./disable-user.command"), exports);
|
@@ -42,7 +42,7 @@ var UpdateUserCommand;
|
|
42
42
|
.optional(),
|
43
43
|
expireAt: zod_1.z
|
44
44
|
.string()
|
45
|
-
.datetime({ message: 'Invalid date format' })
|
45
|
+
.datetime({ local: true, offset: true, message: 'Invalid date format' })
|
46
46
|
.transform((str) => new Date(str))
|
47
47
|
.refine((date) => date > new Date(), {
|
48
48
|
message: 'Expiration date cannot be in the past',
|
@@ -430,4 +430,19 @@ exports.ERRORS = {
|
|
430
430
|
message: 'Bulk update users error',
|
431
431
|
httpCode: 500,
|
432
432
|
},
|
433
|
+
BULK_ADD_INBOUNDS_TO_USERS_ERROR: {
|
434
|
+
code: 'A088',
|
435
|
+
message: 'Bulk add inbounds to users error',
|
436
|
+
httpCode: 500,
|
437
|
+
},
|
438
|
+
BULK_UPDATE_ALL_USERS_ERROR: {
|
439
|
+
code: 'A087',
|
440
|
+
message: 'Bulk update all users error',
|
441
|
+
httpCode: 500,
|
442
|
+
},
|
443
|
+
INVALID_USER_STATUS_ERROR: {
|
444
|
+
code: 'A089',
|
445
|
+
message: 'LIMITED and EXPIRED statuses are not allowed to be set manually.',
|
446
|
+
httpCode: 400,
|
447
|
+
},
|
433
448
|
};
|