@ai-grator/api 0.2.64 → 0.2.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/admin/endpoints/admin.ts +4 -0
  2. package/admin/endpoints/commands/ban-admin-users.command.ts +44 -0
  3. package/admin/endpoints/commands/index.ts +1 -0
  4. package/admin/endpoints/queries/get-admin-linked-account-clusters.query.ts +56 -0
  5. package/admin/endpoints/queries/index.ts +1 -0
  6. package/admin/enums/admin-bulk-ban-result.enum.ts +4 -0
  7. package/admin/enums/admin-bulk-ban-skip-reason.enum.ts +6 -0
  8. package/admin/enums/index.ts +4 -0
  9. package/admin/enums/linked-account-reason-type.enum.ts +5 -0
  10. package/admin/enums/linked-accounts-period.enum.ts +5 -0
  11. package/admin/models/admin-linked-account-cluster.schema.ts +62 -0
  12. package/admin/models/index.ts +1 -0
  13. package/build/admin/endpoints/admin.d.ts +2 -0
  14. package/build/admin/endpoints/admin.d.ts.map +1 -1
  15. package/build/admin/endpoints/admin.js +3 -0
  16. package/build/admin/endpoints/commands/ban-admin-users.command.d.ts +46 -0
  17. package/build/admin/endpoints/commands/ban-admin-users.command.d.ts.map +1 -0
  18. package/build/admin/endpoints/commands/ban-admin-users.command.js +38 -0
  19. package/build/admin/endpoints/commands/index.d.ts +1 -0
  20. package/build/admin/endpoints/commands/index.d.ts.map +1 -1
  21. package/build/admin/endpoints/commands/index.js +1 -0
  22. package/build/admin/endpoints/queries/get-admin-linked-account-clusters.query.d.ts +150 -0
  23. package/build/admin/endpoints/queries/get-admin-linked-account-clusters.query.d.ts.map +1 -0
  24. package/build/admin/endpoints/queries/get-admin-linked-account-clusters.query.js +50 -0
  25. package/build/admin/endpoints/queries/index.d.ts +1 -0
  26. package/build/admin/endpoints/queries/index.d.ts.map +1 -1
  27. package/build/admin/endpoints/queries/index.js +1 -0
  28. package/build/admin/enums/admin-bulk-ban-result.enum.d.ts +5 -0
  29. package/build/admin/enums/admin-bulk-ban-result.enum.d.ts.map +1 -0
  30. package/build/admin/enums/admin-bulk-ban-result.enum.js +8 -0
  31. package/build/admin/enums/admin-bulk-ban-skip-reason.enum.d.ts +7 -0
  32. package/build/admin/enums/admin-bulk-ban-skip-reason.enum.d.ts.map +1 -0
  33. package/build/admin/enums/admin-bulk-ban-skip-reason.enum.js +10 -0
  34. package/build/admin/enums/index.d.ts +4 -0
  35. package/build/admin/enums/index.d.ts.map +1 -1
  36. package/build/admin/enums/index.js +4 -0
  37. package/build/admin/enums/linked-account-reason-type.enum.d.ts +6 -0
  38. package/build/admin/enums/linked-account-reason-type.enum.d.ts.map +1 -0
  39. package/build/admin/enums/linked-account-reason-type.enum.js +9 -0
  40. package/build/admin/enums/linked-accounts-period.enum.d.ts +6 -0
  41. package/build/admin/enums/linked-accounts-period.enum.d.ts.map +1 -0
  42. package/build/admin/enums/linked-accounts-period.enum.js +9 -0
  43. package/build/admin/models/admin-linked-account-cluster.schema.d.ts +118 -0
  44. package/build/admin/models/admin-linked-account-cluster.schema.d.ts.map +1 -0
  45. package/build/admin/models/admin-linked-account-cluster.schema.js +52 -0
  46. package/build/admin/models/index.d.ts +1 -0
  47. package/build/admin/models/index.d.ts.map +1 -1
  48. package/build/admin/models/index.js +1 -0
  49. package/build/errors/errors.d.ts +5 -0
  50. package/build/errors/errors.d.ts.map +1 -1
  51. package/build/errors/errors.js +5 -0
  52. package/build/tsconfig.tsbuildinfo +1 -1
  53. package/errors/errors.ts +5 -0
  54. package/package.json +1 -1
@@ -32,6 +32,10 @@ export const ADMIN_ROUTES = {
32
32
  GET_USER: (userId: string) => `users/${userId}`,
33
33
  GET_USER_TRANSACTIONS: (userId: string) => `users/${userId}/transactions`,
34
34
  BAN_USER: (userId: string) => `users/${userId}/ban`,
35
+ BAN_USERS: 'users/ban',
36
+
37
+ // LINKED ACCOUNTS
38
+ GET_LINKED_ACCOUNT_CLUSTERS: 'linked-accounts/clusters',
35
39
 
36
40
  // SUPPORT
37
41
  GET_SUPPORT_CHATS: 'support/chats',
@@ -0,0 +1,44 @@
1
+ import { z } from 'zod';
2
+ import { defineContract, HTTP_METHODS, HttpErrorResponseSchema } from '../../../_common';
3
+ import { ADMIN_BULK_BAN_RESULT, ADMIN_BULK_BAN_SKIP_REASON } from '../../enums';
4
+ import { ADMIN_ROUTES } from '../admin';
5
+
6
+ export const ADMIN_BULK_BAN_MAX_USERS = 100;
7
+
8
+ export const BanAdminUsersCommandBody = z.object({
9
+ userIds: z
10
+ .array(z.uuid())
11
+ .min(1)
12
+ .max(ADMIN_BULK_BAN_MAX_USERS)
13
+ .refine((userIds) => new Set(userIds).size === userIds.length, 'userIds не должны повторяться'),
14
+ });
15
+
16
+ export const AdminBulkBanItemResultSchema = z.object({
17
+ userId: z.uuid(),
18
+ result: z.enum(ADMIN_BULK_BAN_RESULT),
19
+ reason: z.enum(ADMIN_BULK_BAN_SKIP_REASON).nullable(),
20
+ });
21
+
22
+ export const BanAdminUsersCommandResponse = z.object({
23
+ results: z.array(AdminBulkBanItemResultSchema),
24
+ });
25
+
26
+ export const BanAdminUsersCommand = defineContract({
27
+ method: HTTP_METHODS.POST,
28
+ path: ADMIN_ROUTES.BAN_USERS,
29
+ summary: 'Ban several users at once, returning a per-user result',
30
+ request: {
31
+ body: BanAdminUsersCommandBody,
32
+ },
33
+ responses: {
34
+ 200: BanAdminUsersCommandResponse,
35
+ 400: HttpErrorResponseSchema,
36
+ 401: HttpErrorResponseSchema,
37
+ 403: HttpErrorResponseSchema,
38
+ 500: HttpErrorResponseSchema,
39
+ },
40
+ });
41
+
42
+ export type BanAdminUsersCommandBodyType = z.infer<typeof BanAdminUsersCommandBody>;
43
+ export type AdminBulkBanItemResultSchemaType = z.infer<typeof AdminBulkBanItemResultSchema>;
44
+ export type BanAdminUsersCommandResponseType = z.infer<typeof BanAdminUsersCommandResponse>;
@@ -12,3 +12,4 @@ export * from './create-admin-model-family.command';
12
12
  export * from './update-admin-model-family.command';
13
13
  export * from './delete-admin-model-family.command';
14
14
  export * from './update-admin-organization.command';
15
+ export * from './ban-admin-users.command';
@@ -0,0 +1,56 @@
1
+ import { z } from 'zod';
2
+ import { defineContract, defineOffsetPaginationQuery, HTTP_METHODS, HttpErrorResponseSchema } from '../../../_common';
3
+ import { LINKED_ACCOUNTS_PERIOD } from '../../enums';
4
+ import { AdminLinkedAccountClusterSchema } from '../../models';
5
+ import { ADMIN_ROUTES } from '../admin';
6
+
7
+ export const LINKED_ACCOUNT_CLUSTER_DEFAULT_MIN_SIZE = 2;
8
+
9
+ const SORT_ORDER = z.enum(['asc', 'desc']);
10
+ const SORT_BY = z.enum(['size', 'referralBonusesTotal']);
11
+
12
+ export const GetAdminLinkedAccountClustersQueryQuery = defineOffsetPaginationQuery()
13
+ .extend({
14
+ period: z.enum(LINKED_ACCOUNTS_PERIOD).optional(),
15
+ from: z.iso.date().optional(),
16
+ to: z.iso.date().optional(),
17
+ minSize: z.coerce.number().int().min(2).default(LINKED_ACCOUNT_CLUSTER_DEFAULT_MIN_SIZE),
18
+ hasUnbanned: z.stringbool().optional(),
19
+ sortBy: SORT_BY.default('size'),
20
+ sortOrder: SORT_ORDER.default('desc'),
21
+ })
22
+ .refine((query) => !(query.period && (query.from || query.to)), {
23
+ message: 'Нельзя одновременно передавать period и from/to',
24
+ path: ['period'],
25
+ })
26
+ .refine((query) => !(query.from && query.to && query.from > query.to), {
27
+ message: 'from не может быть позже to',
28
+ path: ['from'],
29
+ });
30
+
31
+ export const GetAdminLinkedAccountClustersQueryResponse = z.object({
32
+ clusters: z.array(AdminLinkedAccountClusterSchema),
33
+ total: z.number().int().nonnegative(),
34
+ page: z.number().int().positive(),
35
+ limit: z.number().int().positive(),
36
+ });
37
+
38
+ export const GetAdminLinkedAccountClustersQuery = defineContract({
39
+ method: HTTP_METHODS.GET,
40
+ path: ADMIN_ROUTES.GET_LINKED_ACCOUNT_CLUSTERS,
41
+ summary:
42
+ 'Get clusters of accounts linked by shared signals within a period (Moscow day boundaries, defaults to the last 7 days)',
43
+ request: {
44
+ query: GetAdminLinkedAccountClustersQueryQuery,
45
+ },
46
+ responses: {
47
+ 200: GetAdminLinkedAccountClustersQueryResponse,
48
+ 400: HttpErrorResponseSchema,
49
+ 401: HttpErrorResponseSchema,
50
+ 403: HttpErrorResponseSchema,
51
+ 500: HttpErrorResponseSchema,
52
+ },
53
+ });
54
+
55
+ export type GetAdminLinkedAccountClustersQueryQueryType = z.infer<typeof GetAdminLinkedAccountClustersQueryQuery>;
56
+ export type GetAdminLinkedAccountClustersQueryResponseType = z.infer<typeof GetAdminLinkedAccountClustersQueryResponse>;
@@ -21,3 +21,4 @@ export * from './get-admin-partner-referrals-deposits-stats.query';
21
21
  export * from './get-admin-partner-referral-deposits.query';
22
22
  export * from './get-admin-dashboard.query';
23
23
  export * from './export-admin-dashboard.query';
24
+ export * from './get-admin-linked-account-clusters.query';
@@ -0,0 +1,4 @@
1
+ export enum ADMIN_BULK_BAN_RESULT {
2
+ BANNED = 'banned',
3
+ SKIPPED = 'skipped',
4
+ }
@@ -0,0 +1,6 @@
1
+ export enum ADMIN_BULK_BAN_SKIP_REASON {
2
+ ADMIN = 'admin',
3
+ NOT_FOUND = 'not_found',
4
+ ALREADY_BANNED = 'already_banned',
5
+ ERROR = 'error',
6
+ }
@@ -6,3 +6,7 @@ export * from './admin-users-export-format.enum';
6
6
  export * from './admin-partner-status.enum';
7
7
  export * from './admin-dashboard-metric.enum';
8
8
  export * from './admin-dashboard-export-format.enum';
9
+ export * from './linked-account-reason-type.enum';
10
+ export * from './linked-accounts-period.enum';
11
+ export * from './admin-bulk-ban-result.enum';
12
+ export * from './admin-bulk-ban-skip-reason.enum';
@@ -0,0 +1,5 @@
1
+ export enum LINKED_ACCOUNT_REASON_TYPE {
2
+ SHARED_IP = 'shared_ip',
3
+ SHARED_VISITOR_ID = 'shared_visitor_id',
4
+ REFERRER_IN_CLUSTER = 'referrer_in_cluster',
5
+ }
@@ -0,0 +1,5 @@
1
+ export enum LINKED_ACCOUNTS_PERIOD {
2
+ TODAY = 'today',
3
+ YESTERDAY = 'yesterday',
4
+ LAST_7_DAYS = 'last_7_days',
5
+ }
@@ -0,0 +1,62 @@
1
+ import { z } from 'zod';
2
+ import { USER_ROLE, USER_STATUS } from '../../users';
3
+ import { LINKED_ACCOUNT_REASON_TYPE } from '../enums';
4
+
5
+ export const AdminLinkedAccountRefSchema = z.object({
6
+ uuid: z.uuid(),
7
+ email: z.email(),
8
+ });
9
+
10
+ export const AdminLinkedAccountReferrerSchema = AdminLinkedAccountRefSchema.extend({
11
+ inCluster: z.boolean(),
12
+ });
13
+
14
+ export const AdminLinkedAccountIpSchema = z.object({
15
+ ip: z.string(),
16
+ firstSeenAt: z.iso.datetime(),
17
+ lastSeenAt: z.iso.datetime(),
18
+ count: z.number().int().positive(),
19
+ userAgent: z.string().nullable(),
20
+ shared: z.boolean(),
21
+ });
22
+
23
+ export const AdminLinkedAccountReasonSchema = z.object({
24
+ type: z.enum(LINKED_ACCOUNT_REASON_TYPE),
25
+ value: z.string().nullable(),
26
+ linkedWith: z.array(AdminLinkedAccountRefSchema),
27
+ firstSeenAt: z.iso.datetime().nullable(),
28
+ lastSeenAt: z.iso.datetime().nullable(),
29
+ text: z.string(),
30
+ });
31
+
32
+ export const AdminLinkedAccountUserSchema = z.object({
33
+ uuid: z.uuid(),
34
+ email: z.email(),
35
+ name: z.string().nullable(),
36
+ status: z.enum(USER_STATUS),
37
+ role: z.enum(USER_ROLE),
38
+ cashBalance: z.number(),
39
+ bonusBalance: z.number(),
40
+ depositsTotal: z.number().nonnegative(),
41
+ referralBonusesTotal: z.number().nonnegative(),
42
+ createdAt: z.iso.datetime(),
43
+ lastLoginAt: z.iso.datetime().nullable(),
44
+ referrer: AdminLinkedAccountReferrerSchema.nullable(),
45
+ ips: z.array(AdminLinkedAccountIpSchema),
46
+ reasons: z.array(AdminLinkedAccountReasonSchema),
47
+ });
48
+
49
+ export const AdminLinkedAccountClusterSchema = z.object({
50
+ size: z.number().int().positive(),
51
+ depositsTotal: z.number().nonnegative(),
52
+ referralBonusesTotal: z.number().nonnegative(),
53
+ hasSelfReferral: z.boolean(),
54
+ users: z.array(AdminLinkedAccountUserSchema),
55
+ });
56
+
57
+ export type AdminLinkedAccountRefSchemaType = z.infer<typeof AdminLinkedAccountRefSchema>;
58
+ export type AdminLinkedAccountReferrerSchemaType = z.infer<typeof AdminLinkedAccountReferrerSchema>;
59
+ export type AdminLinkedAccountIpSchemaType = z.infer<typeof AdminLinkedAccountIpSchema>;
60
+ export type AdminLinkedAccountReasonSchemaType = z.infer<typeof AdminLinkedAccountReasonSchema>;
61
+ export type AdminLinkedAccountUserSchemaType = z.infer<typeof AdminLinkedAccountUserSchema>;
62
+ export type AdminLinkedAccountClusterSchemaType = z.infer<typeof AdminLinkedAccountClusterSchema>;
@@ -16,3 +16,4 @@ export * from './admin-page-issue.schema';
16
16
  export * from './admin-page-response.schema';
17
17
  export * from './admin-dashboard-response.schema';
18
18
  export * from './admin-time-zone.schema';
19
+ export * from './admin-linked-account-cluster.schema';
@@ -21,6 +21,8 @@ export declare const ADMIN_ROUTES: {
21
21
  readonly GET_USER: (userId: string) => string;
22
22
  readonly GET_USER_TRANSACTIONS: (userId: string) => string;
23
23
  readonly BAN_USER: (userId: string) => string;
24
+ readonly BAN_USERS: "users/ban";
25
+ readonly GET_LINKED_ACCOUNT_CLUSTERS: "linked-accounts/clusters";
24
26
  readonly GET_SUPPORT_CHATS: "support/chats";
25
27
  readonly GET_SUPPORT_CHAT_MESSAGES: (userId: string) => string;
26
28
  readonly SEND_SUPPORT_REPLY: (userId: string) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../../admin/endpoints/admin.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,YAAY;;sCAGI,MAAM;gDACI,MAAM;iDACL,MAAM;sDACD,MAAM;yDACH,MAAM;kDACb,MAAM;+DACO,MAAM;wDACb,MAAM,aAAa,MAAM;uDAE1B,MAAM;yDACJ,MAAM;;;;;;;;gCAgB/B,MAAM;6CACO,MAAM;gCACnB,MAAM;;iDAIW,MAAM;0CACb,MAAM;8CACF,MAAM;;;gCAKpB,MAAM;mCACH,MAAM;mCACN,MAAM;0CACC,MAAM;;;6CAKH,MAAM;6CACN,MAAM;;;CAKhC,CAAC"}
1
+ {"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../../admin/endpoints/admin.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,YAAY;;sCAGI,MAAM;gDACI,MAAM;iDACL,MAAM;sDACD,MAAM;yDACH,MAAM;kDACb,MAAM;+DACO,MAAM;wDACb,MAAM,aAAa,MAAM;uDAE1B,MAAM;yDACJ,MAAM;;;;;;;;gCAgB/B,MAAM;6CACO,MAAM;gCACnB,MAAM;;;;iDAQW,MAAM;0CACb,MAAM;8CACF,MAAM;;;gCAKpB,MAAM;mCACH,MAAM;mCACN,MAAM;0CACC,MAAM;;;6CAKH,MAAM;6CACN,MAAM;;;CAKhC,CAAC"}
@@ -29,6 +29,9 @@ exports.ADMIN_ROUTES = {
29
29
  GET_USER: (userId) => `users/${userId}`,
30
30
  GET_USER_TRANSACTIONS: (userId) => `users/${userId}/transactions`,
31
31
  BAN_USER: (userId) => `users/${userId}/ban`,
32
+ BAN_USERS: 'users/ban',
33
+ // LINKED ACCOUNTS
34
+ GET_LINKED_ACCOUNT_CLUSTERS: 'linked-accounts/clusters',
32
35
  // SUPPORT
33
36
  GET_SUPPORT_CHATS: 'support/chats',
34
37
  GET_SUPPORT_CHAT_MESSAGES: (userId) => `support/chats/${userId}/messages`,
@@ -0,0 +1,46 @@
1
+ import { z } from 'zod';
2
+ import { HTTP_METHODS } from '../../../_common';
3
+ import { ADMIN_BULK_BAN_RESULT, ADMIN_BULK_BAN_SKIP_REASON } from '../../enums';
4
+ export declare const ADMIN_BULK_BAN_MAX_USERS = 100;
5
+ export declare const BanAdminUsersCommandBody: z.ZodObject<{
6
+ userIds: z.ZodArray<z.ZodUUID>;
7
+ }, z.core.$strip>;
8
+ export declare const AdminBulkBanItemResultSchema: z.ZodObject<{
9
+ userId: z.ZodUUID;
10
+ result: z.ZodEnum<typeof ADMIN_BULK_BAN_RESULT>;
11
+ reason: z.ZodNullable<z.ZodEnum<typeof ADMIN_BULK_BAN_SKIP_REASON>>;
12
+ }, z.core.$strip>;
13
+ export declare const BanAdminUsersCommandResponse: z.ZodObject<{
14
+ results: z.ZodArray<z.ZodObject<{
15
+ userId: z.ZodUUID;
16
+ result: z.ZodEnum<typeof ADMIN_BULK_BAN_RESULT>;
17
+ reason: z.ZodNullable<z.ZodEnum<typeof ADMIN_BULK_BAN_SKIP_REASON>>;
18
+ }, z.core.$strip>>;
19
+ }, z.core.$strip>;
20
+ export declare const BanAdminUsersCommand: {
21
+ method: HTTP_METHODS.POST;
22
+ path: "users/ban";
23
+ summary: string;
24
+ request: {
25
+ body: z.ZodObject<{
26
+ userIds: z.ZodArray<z.ZodUUID>;
27
+ }, z.core.$strip>;
28
+ };
29
+ responses: {
30
+ 200: z.ZodObject<{
31
+ results: z.ZodArray<z.ZodObject<{
32
+ userId: z.ZodUUID;
33
+ result: z.ZodEnum<typeof ADMIN_BULK_BAN_RESULT>;
34
+ reason: z.ZodNullable<z.ZodEnum<typeof ADMIN_BULK_BAN_SKIP_REASON>>;
35
+ }, z.core.$strip>>;
36
+ }, z.core.$strip>;
37
+ 400: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
38
+ 401: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
39
+ 403: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
40
+ 500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
41
+ };
42
+ };
43
+ export type BanAdminUsersCommandBodyType = z.infer<typeof BanAdminUsersCommandBody>;
44
+ export type AdminBulkBanItemResultSchemaType = z.infer<typeof AdminBulkBanItemResultSchema>;
45
+ export type BanAdminUsersCommandResponseType = z.infer<typeof BanAdminUsersCommandResponse>;
46
+ //# sourceMappingURL=ban-admin-users.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ban-admin-users.command.d.ts","sourceRoot":"","sources":["../../../../admin/endpoints/commands/ban-admin-users.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AACzF,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAGhF,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAE5C,eAAO,MAAM,wBAAwB;;iBAMnC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;iBAIvC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;iBAEvC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;CAc/B,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AACpF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAC5F,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BanAdminUsersCommand = exports.BanAdminUsersCommandResponse = exports.AdminBulkBanItemResultSchema = exports.BanAdminUsersCommandBody = exports.ADMIN_BULK_BAN_MAX_USERS = void 0;
4
+ const zod_1 = require("zod");
5
+ const _common_1 = require("../../../_common");
6
+ const enums_1 = require("../../enums");
7
+ const admin_1 = require("../admin");
8
+ exports.ADMIN_BULK_BAN_MAX_USERS = 100;
9
+ exports.BanAdminUsersCommandBody = zod_1.z.object({
10
+ userIds: zod_1.z
11
+ .array(zod_1.z.uuid())
12
+ .min(1)
13
+ .max(exports.ADMIN_BULK_BAN_MAX_USERS)
14
+ .refine((userIds) => new Set(userIds).size === userIds.length, 'userIds не должны повторяться'),
15
+ });
16
+ exports.AdminBulkBanItemResultSchema = zod_1.z.object({
17
+ userId: zod_1.z.uuid(),
18
+ result: zod_1.z.enum(enums_1.ADMIN_BULK_BAN_RESULT),
19
+ reason: zod_1.z.enum(enums_1.ADMIN_BULK_BAN_SKIP_REASON).nullable(),
20
+ });
21
+ exports.BanAdminUsersCommandResponse = zod_1.z.object({
22
+ results: zod_1.z.array(exports.AdminBulkBanItemResultSchema),
23
+ });
24
+ exports.BanAdminUsersCommand = (0, _common_1.defineContract)({
25
+ method: _common_1.HTTP_METHODS.POST,
26
+ path: admin_1.ADMIN_ROUTES.BAN_USERS,
27
+ summary: 'Ban several users at once, returning a per-user result',
28
+ request: {
29
+ body: exports.BanAdminUsersCommandBody,
30
+ },
31
+ responses: {
32
+ 200: exports.BanAdminUsersCommandResponse,
33
+ 400: _common_1.HttpErrorResponseSchema,
34
+ 401: _common_1.HttpErrorResponseSchema,
35
+ 403: _common_1.HttpErrorResponseSchema,
36
+ 500: _common_1.HttpErrorResponseSchema,
37
+ },
38
+ });
@@ -12,4 +12,5 @@ export * from './create-admin-model-family.command';
12
12
  export * from './update-admin-model-family.command';
13
13
  export * from './delete-admin-model-family.command';
14
14
  export * from './update-admin-organization.command';
15
+ export * from './ban-admin-users.command';
15
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../admin/endpoints/commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,gDAAgD,CAAC;AAC/D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../admin/endpoints/commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,gDAAgD,CAAC;AAC/D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC"}
@@ -28,3 +28,4 @@ __exportStar(require("./create-admin-model-family.command"), exports);
28
28
  __exportStar(require("./update-admin-model-family.command"), exports);
29
29
  __exportStar(require("./delete-admin-model-family.command"), exports);
30
30
  __exportStar(require("./update-admin-organization.command"), exports);
31
+ __exportStar(require("./ban-admin-users.command"), exports);
@@ -0,0 +1,150 @@
1
+ import { z } from 'zod';
2
+ import { HTTP_METHODS } from '../../../_common';
3
+ import { LINKED_ACCOUNTS_PERIOD } from '../../enums';
4
+ export declare const LINKED_ACCOUNT_CLUSTER_DEFAULT_MIN_SIZE = 2;
5
+ export declare const GetAdminLinkedAccountClustersQueryQuery: z.ZodObject<{
6
+ page: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
7
+ limit: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
8
+ period: z.ZodOptional<z.ZodEnum<typeof LINKED_ACCOUNTS_PERIOD>>;
9
+ from: z.ZodOptional<z.ZodISODate>;
10
+ to: z.ZodOptional<z.ZodISODate>;
11
+ minSize: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
12
+ hasUnbanned: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodBoolean>>;
13
+ sortBy: z.ZodDefault<z.ZodEnum<{
14
+ size: "size";
15
+ referralBonusesTotal: "referralBonusesTotal";
16
+ }>>;
17
+ sortOrder: z.ZodDefault<z.ZodEnum<{
18
+ asc: "asc";
19
+ desc: "desc";
20
+ }>>;
21
+ }, z.core.$strip>;
22
+ export declare const GetAdminLinkedAccountClustersQueryResponse: z.ZodObject<{
23
+ clusters: z.ZodArray<z.ZodObject<{
24
+ size: z.ZodNumber;
25
+ depositsTotal: z.ZodNumber;
26
+ referralBonusesTotal: z.ZodNumber;
27
+ hasSelfReferral: z.ZodBoolean;
28
+ users: z.ZodArray<z.ZodObject<{
29
+ uuid: z.ZodUUID;
30
+ email: z.ZodEmail;
31
+ name: z.ZodNullable<z.ZodString>;
32
+ status: z.ZodEnum<typeof import("../../..").USER_STATUS>;
33
+ role: z.ZodEnum<typeof import("../../..").USER_ROLE>;
34
+ cashBalance: z.ZodNumber;
35
+ bonusBalance: z.ZodNumber;
36
+ depositsTotal: z.ZodNumber;
37
+ referralBonusesTotal: z.ZodNumber;
38
+ createdAt: z.ZodISODateTime;
39
+ lastLoginAt: z.ZodNullable<z.ZodISODateTime>;
40
+ referrer: z.ZodNullable<z.ZodObject<{
41
+ uuid: z.ZodUUID;
42
+ email: z.ZodEmail;
43
+ inCluster: z.ZodBoolean;
44
+ }, z.core.$strip>>;
45
+ ips: z.ZodArray<z.ZodObject<{
46
+ ip: z.ZodString;
47
+ firstSeenAt: z.ZodISODateTime;
48
+ lastSeenAt: z.ZodISODateTime;
49
+ count: z.ZodNumber;
50
+ userAgent: z.ZodNullable<z.ZodString>;
51
+ shared: z.ZodBoolean;
52
+ }, z.core.$strip>>;
53
+ reasons: z.ZodArray<z.ZodObject<{
54
+ type: z.ZodEnum<typeof import("../../enums").LINKED_ACCOUNT_REASON_TYPE>;
55
+ value: z.ZodNullable<z.ZodString>;
56
+ linkedWith: z.ZodArray<z.ZodObject<{
57
+ uuid: z.ZodUUID;
58
+ email: z.ZodEmail;
59
+ }, z.core.$strip>>;
60
+ firstSeenAt: z.ZodNullable<z.ZodISODateTime>;
61
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
62
+ text: z.ZodString;
63
+ }, z.core.$strip>>;
64
+ }, z.core.$strip>>;
65
+ }, z.core.$strip>>;
66
+ total: z.ZodNumber;
67
+ page: z.ZodNumber;
68
+ limit: z.ZodNumber;
69
+ }, z.core.$strip>;
70
+ export declare const GetAdminLinkedAccountClustersQuery: {
71
+ method: HTTP_METHODS.GET;
72
+ path: "linked-accounts/clusters";
73
+ summary: string;
74
+ request: {
75
+ query: z.ZodObject<{
76
+ page: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
77
+ limit: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
78
+ period: z.ZodOptional<z.ZodEnum<typeof LINKED_ACCOUNTS_PERIOD>>;
79
+ from: z.ZodOptional<z.ZodISODate>;
80
+ to: z.ZodOptional<z.ZodISODate>;
81
+ minSize: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
82
+ hasUnbanned: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodBoolean>>;
83
+ sortBy: z.ZodDefault<z.ZodEnum<{
84
+ size: "size";
85
+ referralBonusesTotal: "referralBonusesTotal";
86
+ }>>;
87
+ sortOrder: z.ZodDefault<z.ZodEnum<{
88
+ asc: "asc";
89
+ desc: "desc";
90
+ }>>;
91
+ }, z.core.$strip>;
92
+ };
93
+ responses: {
94
+ 200: z.ZodObject<{
95
+ clusters: z.ZodArray<z.ZodObject<{
96
+ size: z.ZodNumber;
97
+ depositsTotal: z.ZodNumber;
98
+ referralBonusesTotal: z.ZodNumber;
99
+ hasSelfReferral: z.ZodBoolean;
100
+ users: z.ZodArray<z.ZodObject<{
101
+ uuid: z.ZodUUID;
102
+ email: z.ZodEmail;
103
+ name: z.ZodNullable<z.ZodString>;
104
+ status: z.ZodEnum<typeof import("../../..").USER_STATUS>;
105
+ role: z.ZodEnum<typeof import("../../..").USER_ROLE>;
106
+ cashBalance: z.ZodNumber;
107
+ bonusBalance: z.ZodNumber;
108
+ depositsTotal: z.ZodNumber;
109
+ referralBonusesTotal: z.ZodNumber;
110
+ createdAt: z.ZodISODateTime;
111
+ lastLoginAt: z.ZodNullable<z.ZodISODateTime>;
112
+ referrer: z.ZodNullable<z.ZodObject<{
113
+ uuid: z.ZodUUID;
114
+ email: z.ZodEmail;
115
+ inCluster: z.ZodBoolean;
116
+ }, z.core.$strip>>;
117
+ ips: z.ZodArray<z.ZodObject<{
118
+ ip: z.ZodString;
119
+ firstSeenAt: z.ZodISODateTime;
120
+ lastSeenAt: z.ZodISODateTime;
121
+ count: z.ZodNumber;
122
+ userAgent: z.ZodNullable<z.ZodString>;
123
+ shared: z.ZodBoolean;
124
+ }, z.core.$strip>>;
125
+ reasons: z.ZodArray<z.ZodObject<{
126
+ type: z.ZodEnum<typeof import("../../enums").LINKED_ACCOUNT_REASON_TYPE>;
127
+ value: z.ZodNullable<z.ZodString>;
128
+ linkedWith: z.ZodArray<z.ZodObject<{
129
+ uuid: z.ZodUUID;
130
+ email: z.ZodEmail;
131
+ }, z.core.$strip>>;
132
+ firstSeenAt: z.ZodNullable<z.ZodISODateTime>;
133
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
134
+ text: z.ZodString;
135
+ }, z.core.$strip>>;
136
+ }, z.core.$strip>>;
137
+ }, z.core.$strip>>;
138
+ total: z.ZodNumber;
139
+ page: z.ZodNumber;
140
+ limit: z.ZodNumber;
141
+ }, z.core.$strip>;
142
+ 400: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
143
+ 401: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
144
+ 403: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
145
+ 500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
146
+ };
147
+ };
148
+ export type GetAdminLinkedAccountClustersQueryQueryType = z.infer<typeof GetAdminLinkedAccountClustersQueryQuery>;
149
+ export type GetAdminLinkedAccountClustersQueryResponseType = z.infer<typeof GetAdminLinkedAccountClustersQueryResponse>;
150
+ //# sourceMappingURL=get-admin-linked-account-clusters.query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-admin-linked-account-clusters.query.d.ts","sourceRoot":"","sources":["../../../../admin/endpoints/queries/get-admin-linked-account-clusters.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAA+C,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AACtH,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAIrD,eAAO,MAAM,uCAAuC,IAAI,CAAC;AAKzD,eAAO,MAAM,uCAAuC;;;;;;;;;;;;;;;;iBAiB9C,CAAC;AAEP,eAAO,MAAM,0CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKrD,CAAC;AAEH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAe7C,CAAC;AAEH,MAAM,MAAM,2CAA2C,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,CAAC;AAClH,MAAM,MAAM,8CAA8C,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0CAA0C,CAAC,CAAC"}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetAdminLinkedAccountClustersQuery = exports.GetAdminLinkedAccountClustersQueryResponse = exports.GetAdminLinkedAccountClustersQueryQuery = exports.LINKED_ACCOUNT_CLUSTER_DEFAULT_MIN_SIZE = void 0;
4
+ const zod_1 = require("zod");
5
+ const _common_1 = require("../../../_common");
6
+ const enums_1 = require("../../enums");
7
+ const models_1 = require("../../models");
8
+ const admin_1 = require("../admin");
9
+ exports.LINKED_ACCOUNT_CLUSTER_DEFAULT_MIN_SIZE = 2;
10
+ const SORT_ORDER = zod_1.z.enum(['asc', 'desc']);
11
+ const SORT_BY = zod_1.z.enum(['size', 'referralBonusesTotal']);
12
+ exports.GetAdminLinkedAccountClustersQueryQuery = (0, _common_1.defineOffsetPaginationQuery)()
13
+ .extend({
14
+ period: zod_1.z.enum(enums_1.LINKED_ACCOUNTS_PERIOD).optional(),
15
+ from: zod_1.z.iso.date().optional(),
16
+ to: zod_1.z.iso.date().optional(),
17
+ minSize: zod_1.z.coerce.number().int().min(2).default(exports.LINKED_ACCOUNT_CLUSTER_DEFAULT_MIN_SIZE),
18
+ hasUnbanned: zod_1.z.stringbool().optional(),
19
+ sortBy: SORT_BY.default('size'),
20
+ sortOrder: SORT_ORDER.default('desc'),
21
+ })
22
+ .refine((query) => !(query.period && (query.from || query.to)), {
23
+ message: 'Нельзя одновременно передавать period и from/to',
24
+ path: ['period'],
25
+ })
26
+ .refine((query) => !(query.from && query.to && query.from > query.to), {
27
+ message: 'from не может быть позже to',
28
+ path: ['from'],
29
+ });
30
+ exports.GetAdminLinkedAccountClustersQueryResponse = zod_1.z.object({
31
+ clusters: zod_1.z.array(models_1.AdminLinkedAccountClusterSchema),
32
+ total: zod_1.z.number().int().nonnegative(),
33
+ page: zod_1.z.number().int().positive(),
34
+ limit: zod_1.z.number().int().positive(),
35
+ });
36
+ exports.GetAdminLinkedAccountClustersQuery = (0, _common_1.defineContract)({
37
+ method: _common_1.HTTP_METHODS.GET,
38
+ path: admin_1.ADMIN_ROUTES.GET_LINKED_ACCOUNT_CLUSTERS,
39
+ summary: 'Get clusters of accounts linked by shared signals within a period (Moscow day boundaries, defaults to the last 7 days)',
40
+ request: {
41
+ query: exports.GetAdminLinkedAccountClustersQueryQuery,
42
+ },
43
+ responses: {
44
+ 200: exports.GetAdminLinkedAccountClustersQueryResponse,
45
+ 400: _common_1.HttpErrorResponseSchema,
46
+ 401: _common_1.HttpErrorResponseSchema,
47
+ 403: _common_1.HttpErrorResponseSchema,
48
+ 500: _common_1.HttpErrorResponseSchema,
49
+ },
50
+ });
@@ -21,4 +21,5 @@ export * from './get-admin-partner-referrals-deposits-stats.query';
21
21
  export * from './get-admin-partner-referral-deposits.query';
22
22
  export * from './get-admin-dashboard.query';
23
23
  export * from './export-admin-dashboard.query';
24
+ export * from './get-admin-linked-account-clusters.query';
24
25
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../admin/endpoints/queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,wBAAwB,CAAC;AACvC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qCAAqC,CAAC;AACpD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,yCAAyC,CAAC;AACxD,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC;AACtD,cAAc,oDAAoD,CAAC;AACnE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../admin/endpoints/queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,wBAAwB,CAAC;AACvC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qCAAqC,CAAC;AACpD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,yCAAyC,CAAC;AACxD,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC;AACtD,cAAc,oDAAoD,CAAC;AACnE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2CAA2C,CAAC"}
@@ -37,3 +37,4 @@ __exportStar(require("./get-admin-partner-referrals-deposits-stats.query"), expo
37
37
  __exportStar(require("./get-admin-partner-referral-deposits.query"), exports);
38
38
  __exportStar(require("./get-admin-dashboard.query"), exports);
39
39
  __exportStar(require("./export-admin-dashboard.query"), exports);
40
+ __exportStar(require("./get-admin-linked-account-clusters.query"), exports);
@@ -0,0 +1,5 @@
1
+ export declare enum ADMIN_BULK_BAN_RESULT {
2
+ BANNED = "banned",
3
+ SKIPPED = "skipped"
4
+ }
5
+ //# sourceMappingURL=admin-bulk-ban-result.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-bulk-ban-result.enum.d.ts","sourceRoot":"","sources":["../../../admin/enums/admin-bulk-ban-result.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,qBAAqB;IAC7B,MAAM,WAAW;IACjB,OAAO,YAAY;CACtB"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ADMIN_BULK_BAN_RESULT = void 0;
4
+ var ADMIN_BULK_BAN_RESULT;
5
+ (function (ADMIN_BULK_BAN_RESULT) {
6
+ ADMIN_BULK_BAN_RESULT["BANNED"] = "banned";
7
+ ADMIN_BULK_BAN_RESULT["SKIPPED"] = "skipped";
8
+ })(ADMIN_BULK_BAN_RESULT || (exports.ADMIN_BULK_BAN_RESULT = ADMIN_BULK_BAN_RESULT = {}));
@@ -0,0 +1,7 @@
1
+ export declare enum ADMIN_BULK_BAN_SKIP_REASON {
2
+ ADMIN = "admin",
3
+ NOT_FOUND = "not_found",
4
+ ALREADY_BANNED = "already_banned",
5
+ ERROR = "error"
6
+ }
7
+ //# sourceMappingURL=admin-bulk-ban-skip-reason.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-bulk-ban-skip-reason.enum.d.ts","sourceRoot":"","sources":["../../../admin/enums/admin-bulk-ban-skip-reason.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,0BAA0B;IAClC,KAAK,UAAU;IACf,SAAS,cAAc;IACvB,cAAc,mBAAmB;IACjC,KAAK,UAAU;CAClB"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ADMIN_BULK_BAN_SKIP_REASON = void 0;
4
+ var ADMIN_BULK_BAN_SKIP_REASON;
5
+ (function (ADMIN_BULK_BAN_SKIP_REASON) {
6
+ ADMIN_BULK_BAN_SKIP_REASON["ADMIN"] = "admin";
7
+ ADMIN_BULK_BAN_SKIP_REASON["NOT_FOUND"] = "not_found";
8
+ ADMIN_BULK_BAN_SKIP_REASON["ALREADY_BANNED"] = "already_banned";
9
+ ADMIN_BULK_BAN_SKIP_REASON["ERROR"] = "error";
10
+ })(ADMIN_BULK_BAN_SKIP_REASON || (exports.ADMIN_BULK_BAN_SKIP_REASON = ADMIN_BULK_BAN_SKIP_REASON = {}));