@polinetwork/backend 0.8.2 → 0.9.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 +39 -32
- package/dist/index.d.ts +39 -32
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as _trpc_server from '@trpc/server';
|
|
2
2
|
import * as _trpc_server_unstable_core_do_not_import from '@trpc/server/unstable-core-do-not-import';
|
|
3
|
-
import * as zod from 'zod';
|
|
4
|
-
import { z } from 'zod';
|
|
5
3
|
import * as better_auth from 'better-auth';
|
|
4
|
+
import { z } from 'zod/v4';
|
|
6
5
|
|
|
7
6
|
declare const TRPC_PATH = "/api/trpc";
|
|
8
7
|
declare const AUTH_PATH = "/api/auth";
|
|
@@ -28,7 +27,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
28
27
|
meta: object;
|
|
29
28
|
errorShape: {
|
|
30
29
|
data: {
|
|
31
|
-
zodError:
|
|
30
|
+
zodError: {
|
|
31
|
+
errors: string[];
|
|
32
|
+
} | null;
|
|
32
33
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
33
34
|
httpStatus: number;
|
|
34
35
|
path?: string;
|
|
@@ -46,7 +47,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
46
47
|
meta: object;
|
|
47
48
|
errorShape: {
|
|
48
49
|
data: {
|
|
49
|
-
zodError:
|
|
50
|
+
zodError: {
|
|
51
|
+
errors: string[];
|
|
52
|
+
} | null;
|
|
50
53
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
51
54
|
httpStatus: number;
|
|
52
55
|
path?: string;
|
|
@@ -78,7 +81,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
78
81
|
meta: object;
|
|
79
82
|
errorShape: {
|
|
80
83
|
data: {
|
|
81
|
-
zodError:
|
|
84
|
+
zodError: {
|
|
85
|
+
errors: string[];
|
|
86
|
+
} | null;
|
|
82
87
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
83
88
|
httpStatus: number;
|
|
84
89
|
path?: string;
|
|
@@ -96,7 +101,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
96
101
|
meta: object;
|
|
97
102
|
errorShape: {
|
|
98
103
|
data: {
|
|
99
|
-
zodError:
|
|
104
|
+
zodError: {
|
|
105
|
+
errors: string[];
|
|
106
|
+
} | null;
|
|
100
107
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
101
108
|
httpStatus: number;
|
|
102
109
|
path?: string;
|
|
@@ -143,9 +150,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
143
150
|
}>;
|
|
144
151
|
create: _trpc_server.TRPCMutationProcedure<{
|
|
145
152
|
input: {
|
|
146
|
-
link: string;
|
|
147
|
-
telegramId: number;
|
|
148
153
|
title: string;
|
|
154
|
+
telegramId: number;
|
|
155
|
+
link: string;
|
|
149
156
|
}[];
|
|
150
157
|
output: number[];
|
|
151
158
|
}>;
|
|
@@ -163,7 +170,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
163
170
|
meta: object;
|
|
164
171
|
errorShape: {
|
|
165
172
|
data: {
|
|
166
|
-
zodError:
|
|
173
|
+
zodError: {
|
|
174
|
+
errors: string[];
|
|
175
|
+
} | null;
|
|
167
176
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
168
177
|
httpStatus: number;
|
|
169
178
|
path?: string;
|
|
@@ -201,8 +210,8 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
201
210
|
addGroup: _trpc_server.TRPCQueryProcedure<{
|
|
202
211
|
input: {
|
|
203
212
|
userId: number;
|
|
204
|
-
groupId: number;
|
|
205
213
|
adderId: number;
|
|
214
|
+
groupId: number;
|
|
206
215
|
};
|
|
207
216
|
output: void;
|
|
208
217
|
}>;
|
|
@@ -211,11 +220,11 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
211
220
|
userId: number;
|
|
212
221
|
};
|
|
213
222
|
output: {
|
|
214
|
-
error: null;
|
|
215
223
|
allowed: boolean;
|
|
224
|
+
error: null;
|
|
216
225
|
} | {
|
|
217
|
-
error: "NOT_FOUND";
|
|
218
226
|
allowed: false;
|
|
227
|
+
error: "NOT_FOUND";
|
|
219
228
|
};
|
|
220
229
|
}>;
|
|
221
230
|
}>>;
|
|
@@ -226,7 +235,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
226
235
|
meta: object;
|
|
227
236
|
errorShape: {
|
|
228
237
|
data: {
|
|
229
|
-
zodError:
|
|
238
|
+
zodError: {
|
|
239
|
+
errors: string[];
|
|
240
|
+
} | null;
|
|
230
241
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
231
242
|
httpStatus: number;
|
|
232
243
|
path?: string;
|
|
@@ -239,9 +250,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
239
250
|
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
240
251
|
link: _trpc_server.TRPCQueryProcedure<{
|
|
241
252
|
input: {
|
|
253
|
+
code: string;
|
|
242
254
|
telegramId: number;
|
|
243
255
|
telegramUsername: string;
|
|
244
|
-
code: string;
|
|
245
256
|
};
|
|
246
257
|
output: {
|
|
247
258
|
success: boolean;
|
|
@@ -259,7 +270,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
259
270
|
meta: object;
|
|
260
271
|
errorShape: {
|
|
261
272
|
data: {
|
|
262
|
-
zodError:
|
|
273
|
+
zodError: {
|
|
274
|
+
errors: string[];
|
|
275
|
+
} | null;
|
|
263
276
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
264
277
|
httpStatus: number;
|
|
265
278
|
path?: string;
|
|
@@ -276,17 +289,17 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
276
289
|
messageId: number;
|
|
277
290
|
};
|
|
278
291
|
output: {
|
|
279
|
-
error: null;
|
|
280
292
|
message: {
|
|
281
293
|
chatId: number;
|
|
282
294
|
messageId: number;
|
|
283
295
|
authorId: number;
|
|
284
|
-
timestamp: Date;
|
|
285
296
|
message: string;
|
|
297
|
+
timestamp: Date;
|
|
286
298
|
};
|
|
299
|
+
error: null;
|
|
287
300
|
} | {
|
|
288
|
-
error: "NOT_FOUND" | "DECRYPT_ERROR";
|
|
289
301
|
message: null;
|
|
302
|
+
error: "NOT_FOUND" | "DECRYPT_ERROR";
|
|
290
303
|
};
|
|
291
304
|
}>;
|
|
292
305
|
add: _trpc_server.TRPCMutationProcedure<{
|
|
@@ -295,8 +308,8 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
295
308
|
chatId: number;
|
|
296
309
|
messageId: number;
|
|
297
310
|
authorId: number;
|
|
298
|
-
timestamp: Date;
|
|
299
311
|
message: string;
|
|
312
|
+
timestamp: Date;
|
|
300
313
|
}[];
|
|
301
314
|
};
|
|
302
315
|
output: {
|
|
@@ -311,7 +324,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
311
324
|
meta: object;
|
|
312
325
|
errorShape: {
|
|
313
326
|
data: {
|
|
314
|
-
zodError:
|
|
327
|
+
zodError: {
|
|
328
|
+
errors: string[];
|
|
329
|
+
} | null;
|
|
315
330
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
316
331
|
httpStatus: number;
|
|
317
332
|
path?: string;
|
|
@@ -324,10 +339,10 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
324
339
|
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
325
340
|
create: _trpc_server.TRPCMutationProcedure<{
|
|
326
341
|
input: {
|
|
327
|
-
groupId: number | null;
|
|
328
342
|
adminId: number;
|
|
329
343
|
targetId: number;
|
|
330
344
|
type: "ban" | "kick" | "mute" | "ban_all" | "mute_all";
|
|
345
|
+
groupId: number | null;
|
|
331
346
|
until: Date | null;
|
|
332
347
|
reason?: string | undefined;
|
|
333
348
|
};
|
|
@@ -432,12 +447,8 @@ declare const telegramPlugin: () => {
|
|
|
432
447
|
};
|
|
433
448
|
}>)[];
|
|
434
449
|
body: z.ZodObject<{
|
|
435
|
-
telegramUsername: z.
|
|
436
|
-
},
|
|
437
|
-
telegramUsername: string;
|
|
438
|
-
}, {
|
|
439
|
-
telegramUsername: string;
|
|
440
|
-
}>;
|
|
450
|
+
telegramUsername: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
451
|
+
}, z.core.$strip>;
|
|
441
452
|
} & {
|
|
442
453
|
use: any[];
|
|
443
454
|
};
|
|
@@ -503,11 +514,7 @@ declare const telegramPlugin: () => {
|
|
|
503
514
|
}>)[];
|
|
504
515
|
query: z.ZodObject<{
|
|
505
516
|
code: z.ZodString;
|
|
506
|
-
},
|
|
507
|
-
code: string;
|
|
508
|
-
}, {
|
|
509
|
-
code: string;
|
|
510
|
-
}>;
|
|
517
|
+
}, z.core.$strip>;
|
|
511
518
|
} & {
|
|
512
519
|
use: any[];
|
|
513
520
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as _trpc_server from '@trpc/server';
|
|
2
2
|
import * as _trpc_server_unstable_core_do_not_import from '@trpc/server/unstable-core-do-not-import';
|
|
3
|
-
import * as zod from 'zod';
|
|
4
|
-
import { z } from 'zod';
|
|
5
3
|
import * as better_auth from 'better-auth';
|
|
4
|
+
import { z } from 'zod/v4';
|
|
6
5
|
|
|
7
6
|
declare const TRPC_PATH = "/api/trpc";
|
|
8
7
|
declare const AUTH_PATH = "/api/auth";
|
|
@@ -28,7 +27,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
28
27
|
meta: object;
|
|
29
28
|
errorShape: {
|
|
30
29
|
data: {
|
|
31
|
-
zodError:
|
|
30
|
+
zodError: {
|
|
31
|
+
errors: string[];
|
|
32
|
+
} | null;
|
|
32
33
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
33
34
|
httpStatus: number;
|
|
34
35
|
path?: string;
|
|
@@ -46,7 +47,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
46
47
|
meta: object;
|
|
47
48
|
errorShape: {
|
|
48
49
|
data: {
|
|
49
|
-
zodError:
|
|
50
|
+
zodError: {
|
|
51
|
+
errors: string[];
|
|
52
|
+
} | null;
|
|
50
53
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
51
54
|
httpStatus: number;
|
|
52
55
|
path?: string;
|
|
@@ -78,7 +81,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
78
81
|
meta: object;
|
|
79
82
|
errorShape: {
|
|
80
83
|
data: {
|
|
81
|
-
zodError:
|
|
84
|
+
zodError: {
|
|
85
|
+
errors: string[];
|
|
86
|
+
} | null;
|
|
82
87
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
83
88
|
httpStatus: number;
|
|
84
89
|
path?: string;
|
|
@@ -96,7 +101,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
96
101
|
meta: object;
|
|
97
102
|
errorShape: {
|
|
98
103
|
data: {
|
|
99
|
-
zodError:
|
|
104
|
+
zodError: {
|
|
105
|
+
errors: string[];
|
|
106
|
+
} | null;
|
|
100
107
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
101
108
|
httpStatus: number;
|
|
102
109
|
path?: string;
|
|
@@ -143,9 +150,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
143
150
|
}>;
|
|
144
151
|
create: _trpc_server.TRPCMutationProcedure<{
|
|
145
152
|
input: {
|
|
146
|
-
link: string;
|
|
147
|
-
telegramId: number;
|
|
148
153
|
title: string;
|
|
154
|
+
telegramId: number;
|
|
155
|
+
link: string;
|
|
149
156
|
}[];
|
|
150
157
|
output: number[];
|
|
151
158
|
}>;
|
|
@@ -163,7 +170,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
163
170
|
meta: object;
|
|
164
171
|
errorShape: {
|
|
165
172
|
data: {
|
|
166
|
-
zodError:
|
|
173
|
+
zodError: {
|
|
174
|
+
errors: string[];
|
|
175
|
+
} | null;
|
|
167
176
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
168
177
|
httpStatus: number;
|
|
169
178
|
path?: string;
|
|
@@ -201,8 +210,8 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
201
210
|
addGroup: _trpc_server.TRPCQueryProcedure<{
|
|
202
211
|
input: {
|
|
203
212
|
userId: number;
|
|
204
|
-
groupId: number;
|
|
205
213
|
adderId: number;
|
|
214
|
+
groupId: number;
|
|
206
215
|
};
|
|
207
216
|
output: void;
|
|
208
217
|
}>;
|
|
@@ -211,11 +220,11 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
211
220
|
userId: number;
|
|
212
221
|
};
|
|
213
222
|
output: {
|
|
214
|
-
error: null;
|
|
215
223
|
allowed: boolean;
|
|
224
|
+
error: null;
|
|
216
225
|
} | {
|
|
217
|
-
error: "NOT_FOUND";
|
|
218
226
|
allowed: false;
|
|
227
|
+
error: "NOT_FOUND";
|
|
219
228
|
};
|
|
220
229
|
}>;
|
|
221
230
|
}>>;
|
|
@@ -226,7 +235,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
226
235
|
meta: object;
|
|
227
236
|
errorShape: {
|
|
228
237
|
data: {
|
|
229
|
-
zodError:
|
|
238
|
+
zodError: {
|
|
239
|
+
errors: string[];
|
|
240
|
+
} | null;
|
|
230
241
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
231
242
|
httpStatus: number;
|
|
232
243
|
path?: string;
|
|
@@ -239,9 +250,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
239
250
|
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
240
251
|
link: _trpc_server.TRPCQueryProcedure<{
|
|
241
252
|
input: {
|
|
253
|
+
code: string;
|
|
242
254
|
telegramId: number;
|
|
243
255
|
telegramUsername: string;
|
|
244
|
-
code: string;
|
|
245
256
|
};
|
|
246
257
|
output: {
|
|
247
258
|
success: boolean;
|
|
@@ -259,7 +270,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
259
270
|
meta: object;
|
|
260
271
|
errorShape: {
|
|
261
272
|
data: {
|
|
262
|
-
zodError:
|
|
273
|
+
zodError: {
|
|
274
|
+
errors: string[];
|
|
275
|
+
} | null;
|
|
263
276
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
264
277
|
httpStatus: number;
|
|
265
278
|
path?: string;
|
|
@@ -276,17 +289,17 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
276
289
|
messageId: number;
|
|
277
290
|
};
|
|
278
291
|
output: {
|
|
279
|
-
error: null;
|
|
280
292
|
message: {
|
|
281
293
|
chatId: number;
|
|
282
294
|
messageId: number;
|
|
283
295
|
authorId: number;
|
|
284
|
-
timestamp: Date;
|
|
285
296
|
message: string;
|
|
297
|
+
timestamp: Date;
|
|
286
298
|
};
|
|
299
|
+
error: null;
|
|
287
300
|
} | {
|
|
288
|
-
error: "NOT_FOUND" | "DECRYPT_ERROR";
|
|
289
301
|
message: null;
|
|
302
|
+
error: "NOT_FOUND" | "DECRYPT_ERROR";
|
|
290
303
|
};
|
|
291
304
|
}>;
|
|
292
305
|
add: _trpc_server.TRPCMutationProcedure<{
|
|
@@ -295,8 +308,8 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
295
308
|
chatId: number;
|
|
296
309
|
messageId: number;
|
|
297
310
|
authorId: number;
|
|
298
|
-
timestamp: Date;
|
|
299
311
|
message: string;
|
|
312
|
+
timestamp: Date;
|
|
300
313
|
}[];
|
|
301
314
|
};
|
|
302
315
|
output: {
|
|
@@ -311,7 +324,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
311
324
|
meta: object;
|
|
312
325
|
errorShape: {
|
|
313
326
|
data: {
|
|
314
|
-
zodError:
|
|
327
|
+
zodError: {
|
|
328
|
+
errors: string[];
|
|
329
|
+
} | null;
|
|
315
330
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
316
331
|
httpStatus: number;
|
|
317
332
|
path?: string;
|
|
@@ -324,10 +339,10 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
324
339
|
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
325
340
|
create: _trpc_server.TRPCMutationProcedure<{
|
|
326
341
|
input: {
|
|
327
|
-
groupId: number | null;
|
|
328
342
|
adminId: number;
|
|
329
343
|
targetId: number;
|
|
330
344
|
type: "ban" | "kick" | "mute" | "ban_all" | "mute_all";
|
|
345
|
+
groupId: number | null;
|
|
331
346
|
until: Date | null;
|
|
332
347
|
reason?: string | undefined;
|
|
333
348
|
};
|
|
@@ -432,12 +447,8 @@ declare const telegramPlugin: () => {
|
|
|
432
447
|
};
|
|
433
448
|
}>)[];
|
|
434
449
|
body: z.ZodObject<{
|
|
435
|
-
telegramUsername: z.
|
|
436
|
-
},
|
|
437
|
-
telegramUsername: string;
|
|
438
|
-
}, {
|
|
439
|
-
telegramUsername: string;
|
|
440
|
-
}>;
|
|
450
|
+
telegramUsername: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
451
|
+
}, z.core.$strip>;
|
|
441
452
|
} & {
|
|
442
453
|
use: any[];
|
|
443
454
|
};
|
|
@@ -503,11 +514,7 @@ declare const telegramPlugin: () => {
|
|
|
503
514
|
}>)[];
|
|
504
515
|
query: z.ZodObject<{
|
|
505
516
|
code: z.ZodString;
|
|
506
|
-
},
|
|
507
|
-
code: string;
|
|
508
|
-
}, {
|
|
509
|
-
code: string;
|
|
510
|
-
}>;
|
|
517
|
+
}, z.core.$strip>;
|
|
511
518
|
} & {
|
|
512
519
|
use: any[];
|
|
513
520
|
};
|