@polinetwork/backend 0.6.1 → 0.8.0
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 +68 -1
- package/dist/index.d.ts +68 -1
- package/package.json +1 -1
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
|
*
|
|
@@ -174,7 +183,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
174
183
|
setRole: _trpc_server.TRPCQueryProcedure<{
|
|
175
184
|
input: {
|
|
176
185
|
userId: number;
|
|
177
|
-
role: "admin" | "hr" | "direttivo" | "owner";
|
|
186
|
+
role: "admin" | "hr" | "direttivo" | "creator" | "owner";
|
|
178
187
|
adderId: number;
|
|
179
188
|
};
|
|
180
189
|
output: void;
|
|
@@ -194,6 +203,18 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
194
203
|
};
|
|
195
204
|
output: void;
|
|
196
205
|
}>;
|
|
206
|
+
canAddBot: _trpc_server.TRPCQueryProcedure<{
|
|
207
|
+
input: {
|
|
208
|
+
userId: number;
|
|
209
|
+
};
|
|
210
|
+
output: {
|
|
211
|
+
error: null;
|
|
212
|
+
allowed: boolean;
|
|
213
|
+
} | {
|
|
214
|
+
error: "NOT_FOUND";
|
|
215
|
+
allowed: false;
|
|
216
|
+
};
|
|
217
|
+
}>;
|
|
197
218
|
}>>;
|
|
198
219
|
link: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
199
220
|
ctx: {
|
|
@@ -280,6 +301,52 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
280
301
|
};
|
|
281
302
|
}>;
|
|
282
303
|
}>>;
|
|
304
|
+
auditLog: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
305
|
+
ctx: {
|
|
306
|
+
userId?: string;
|
|
307
|
+
};
|
|
308
|
+
meta: object;
|
|
309
|
+
errorShape: {
|
|
310
|
+
data: {
|
|
311
|
+
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
312
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
313
|
+
httpStatus: number;
|
|
314
|
+
path?: string;
|
|
315
|
+
stack?: string;
|
|
316
|
+
};
|
|
317
|
+
message: string;
|
|
318
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
319
|
+
};
|
|
320
|
+
transformer: true;
|
|
321
|
+
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
322
|
+
create: _trpc_server.TRPCMutationProcedure<{
|
|
323
|
+
input: {
|
|
324
|
+
groupId: number | null;
|
|
325
|
+
adminId: number;
|
|
326
|
+
targetId: number;
|
|
327
|
+
type: "ban" | "kick" | "mute" | "ban_all" | "mute_all";
|
|
328
|
+
until: Date | null;
|
|
329
|
+
reason?: string | undefined;
|
|
330
|
+
};
|
|
331
|
+
output: void;
|
|
332
|
+
}>;
|
|
333
|
+
getById: _trpc_server.TRPCQueryProcedure<{
|
|
334
|
+
input: {
|
|
335
|
+
targetId: number;
|
|
336
|
+
};
|
|
337
|
+
output: {
|
|
338
|
+
updatedAt: Date | null;
|
|
339
|
+
createdAt: Date;
|
|
340
|
+
id: number;
|
|
341
|
+
adminId: number;
|
|
342
|
+
targetId: number;
|
|
343
|
+
groupId: number | null;
|
|
344
|
+
type: TAuditType;
|
|
345
|
+
until: Date | null;
|
|
346
|
+
reason: string | null;
|
|
347
|
+
}[];
|
|
348
|
+
}>;
|
|
349
|
+
}>>;
|
|
283
350
|
}>>;
|
|
284
351
|
}>>;
|
|
285
352
|
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
|
*
|
|
@@ -174,7 +183,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
174
183
|
setRole: _trpc_server.TRPCQueryProcedure<{
|
|
175
184
|
input: {
|
|
176
185
|
userId: number;
|
|
177
|
-
role: "admin" | "hr" | "direttivo" | "owner";
|
|
186
|
+
role: "admin" | "hr" | "direttivo" | "creator" | "owner";
|
|
178
187
|
adderId: number;
|
|
179
188
|
};
|
|
180
189
|
output: void;
|
|
@@ -194,6 +203,18 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
194
203
|
};
|
|
195
204
|
output: void;
|
|
196
205
|
}>;
|
|
206
|
+
canAddBot: _trpc_server.TRPCQueryProcedure<{
|
|
207
|
+
input: {
|
|
208
|
+
userId: number;
|
|
209
|
+
};
|
|
210
|
+
output: {
|
|
211
|
+
error: null;
|
|
212
|
+
allowed: boolean;
|
|
213
|
+
} | {
|
|
214
|
+
error: "NOT_FOUND";
|
|
215
|
+
allowed: false;
|
|
216
|
+
};
|
|
217
|
+
}>;
|
|
197
218
|
}>>;
|
|
198
219
|
link: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
199
220
|
ctx: {
|
|
@@ -280,6 +301,52 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
280
301
|
};
|
|
281
302
|
}>;
|
|
282
303
|
}>>;
|
|
304
|
+
auditLog: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
305
|
+
ctx: {
|
|
306
|
+
userId?: string;
|
|
307
|
+
};
|
|
308
|
+
meta: object;
|
|
309
|
+
errorShape: {
|
|
310
|
+
data: {
|
|
311
|
+
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
312
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
313
|
+
httpStatus: number;
|
|
314
|
+
path?: string;
|
|
315
|
+
stack?: string;
|
|
316
|
+
};
|
|
317
|
+
message: string;
|
|
318
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
319
|
+
};
|
|
320
|
+
transformer: true;
|
|
321
|
+
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
322
|
+
create: _trpc_server.TRPCMutationProcedure<{
|
|
323
|
+
input: {
|
|
324
|
+
groupId: number | null;
|
|
325
|
+
adminId: number;
|
|
326
|
+
targetId: number;
|
|
327
|
+
type: "ban" | "kick" | "mute" | "ban_all" | "mute_all";
|
|
328
|
+
until: Date | null;
|
|
329
|
+
reason?: string | undefined;
|
|
330
|
+
};
|
|
331
|
+
output: void;
|
|
332
|
+
}>;
|
|
333
|
+
getById: _trpc_server.TRPCQueryProcedure<{
|
|
334
|
+
input: {
|
|
335
|
+
targetId: number;
|
|
336
|
+
};
|
|
337
|
+
output: {
|
|
338
|
+
updatedAt: Date | null;
|
|
339
|
+
createdAt: Date;
|
|
340
|
+
id: number;
|
|
341
|
+
adminId: number;
|
|
342
|
+
targetId: number;
|
|
343
|
+
groupId: number | null;
|
|
344
|
+
type: TAuditType;
|
|
345
|
+
until: Date | null;
|
|
346
|
+
reason: string | null;
|
|
347
|
+
}[];
|
|
348
|
+
}>;
|
|
349
|
+
}>>;
|
|
283
350
|
}>>;
|
|
284
351
|
}>>;
|
|
285
352
|
type AppRouter = typeof appRouter;
|