@polinetwork/backend 0.7.0 → 0.8.1

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/dist/index.d.cts CHANGED
@@ -7,6 +7,15 @@ import * as better_auth from 'better-auth';
7
7
  declare const TRPC_PATH = "/api/trpc";
8
8
  declare const AUTH_PATH = "/api/auth";
9
9
 
10
+ declare const AUDIT_TYPE: {
11
+ readonly BAN: "ban";
12
+ readonly KICK: "kick";
13
+ readonly MUTE: "mute";
14
+ readonly BAN_ALL: "ban_all";
15
+ readonly MUTE_ALL: "mute_all";
16
+ };
17
+ type TAuditType = (typeof AUDIT_TYPE)[keyof typeof AUDIT_TYPE];
18
+
10
19
  /**
11
20
  * This is the primary router for your server.
12
21
  *
@@ -103,7 +112,6 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
103
112
  output: {
104
113
  updatedAt: Date | null;
105
114
  createdAt: Date;
106
- id: number;
107
115
  telegramId: number;
108
116
  title: string;
109
117
  link: string | null;
@@ -116,7 +124,6 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
116
124
  output: {
117
125
  updatedAt: Date | null;
118
126
  createdAt: Date;
119
- id: number;
120
127
  telegramId: number;
121
128
  title: string;
122
129
  link: string | null;
@@ -129,7 +136,6 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
129
136
  output: {
130
137
  updatedAt: Date | null;
131
138
  createdAt: Date;
132
- id: number;
133
139
  telegramId: number;
134
140
  title: string;
135
141
  link: string | null;
@@ -292,6 +298,53 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
292
298
  };
293
299
  }>;
294
300
  }>>;
301
+ auditLog: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
302
+ ctx: {
303
+ userId?: string;
304
+ };
305
+ meta: object;
306
+ errorShape: {
307
+ data: {
308
+ zodError: zod.typeToFlattenedError<any, string> | null;
309
+ code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
310
+ httpStatus: number;
311
+ path?: string;
312
+ stack?: string;
313
+ };
314
+ message: string;
315
+ code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
316
+ };
317
+ transformer: true;
318
+ }, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
319
+ create: _trpc_server.TRPCMutationProcedure<{
320
+ input: {
321
+ groupId: number | null;
322
+ adminId: number;
323
+ targetId: number;
324
+ type: "ban" | "kick" | "mute" | "ban_all" | "mute_all";
325
+ until: Date | null;
326
+ reason?: string | undefined;
327
+ };
328
+ output: void;
329
+ }>;
330
+ getById: _trpc_server.TRPCQueryProcedure<{
331
+ input: {
332
+ targetId: number;
333
+ };
334
+ output: {
335
+ groupTitle: string | undefined;
336
+ updatedAt: Date | null;
337
+ createdAt: Date;
338
+ id: number;
339
+ adminId: number;
340
+ targetId: number;
341
+ groupId: number | null;
342
+ type: TAuditType;
343
+ until: Date | null;
344
+ reason: string | null;
345
+ }[];
346
+ }>;
347
+ }>>;
295
348
  }>>;
296
349
  }>>;
297
350
  type AppRouter = typeof appRouter;
package/dist/index.d.ts CHANGED
@@ -7,6 +7,15 @@ import * as better_auth from 'better-auth';
7
7
  declare const TRPC_PATH = "/api/trpc";
8
8
  declare const AUTH_PATH = "/api/auth";
9
9
 
10
+ declare const AUDIT_TYPE: {
11
+ readonly BAN: "ban";
12
+ readonly KICK: "kick";
13
+ readonly MUTE: "mute";
14
+ readonly BAN_ALL: "ban_all";
15
+ readonly MUTE_ALL: "mute_all";
16
+ };
17
+ type TAuditType = (typeof AUDIT_TYPE)[keyof typeof AUDIT_TYPE];
18
+
10
19
  /**
11
20
  * This is the primary router for your server.
12
21
  *
@@ -103,7 +112,6 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
103
112
  output: {
104
113
  updatedAt: Date | null;
105
114
  createdAt: Date;
106
- id: number;
107
115
  telegramId: number;
108
116
  title: string;
109
117
  link: string | null;
@@ -116,7 +124,6 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
116
124
  output: {
117
125
  updatedAt: Date | null;
118
126
  createdAt: Date;
119
- id: number;
120
127
  telegramId: number;
121
128
  title: string;
122
129
  link: string | null;
@@ -129,7 +136,6 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
129
136
  output: {
130
137
  updatedAt: Date | null;
131
138
  createdAt: Date;
132
- id: number;
133
139
  telegramId: number;
134
140
  title: string;
135
141
  link: string | null;
@@ -292,6 +298,53 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
292
298
  };
293
299
  }>;
294
300
  }>>;
301
+ auditLog: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
302
+ ctx: {
303
+ userId?: string;
304
+ };
305
+ meta: object;
306
+ errorShape: {
307
+ data: {
308
+ zodError: zod.typeToFlattenedError<any, string> | null;
309
+ code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
310
+ httpStatus: number;
311
+ path?: string;
312
+ stack?: string;
313
+ };
314
+ message: string;
315
+ code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
316
+ };
317
+ transformer: true;
318
+ }, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
319
+ create: _trpc_server.TRPCMutationProcedure<{
320
+ input: {
321
+ groupId: number | null;
322
+ adminId: number;
323
+ targetId: number;
324
+ type: "ban" | "kick" | "mute" | "ban_all" | "mute_all";
325
+ until: Date | null;
326
+ reason?: string | undefined;
327
+ };
328
+ output: void;
329
+ }>;
330
+ getById: _trpc_server.TRPCQueryProcedure<{
331
+ input: {
332
+ targetId: number;
333
+ };
334
+ output: {
335
+ groupTitle: string | undefined;
336
+ updatedAt: Date | null;
337
+ createdAt: Date;
338
+ id: number;
339
+ adminId: number;
340
+ targetId: number;
341
+ groupId: number | null;
342
+ type: TAuditType;
343
+ until: Date | null;
344
+ reason: string | null;
345
+ }[];
346
+ }>;
347
+ }>>;
295
348
  }>>;
296
349
  }>>;
297
350
  type AppRouter = typeof appRouter;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polinetwork/backend",
3
- "version": "0.7.0",
3
+ "version": "0.8.1",
4
4
  "description": "Utils to interact with the backend.",
5
5
  "repository": {
6
6
  "type": "git",