@polinetwork/backend 0.8.1 → 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 +45 -32
- package/dist/index.d.ts +45 -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,12 +150,18 @@ 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
|
}>;
|
|
159
|
+
delete: _trpc_server.TRPCMutationProcedure<{
|
|
160
|
+
input: {
|
|
161
|
+
telegramId: number;
|
|
162
|
+
};
|
|
163
|
+
output: boolean;
|
|
164
|
+
}>;
|
|
152
165
|
}>>;
|
|
153
166
|
permissions: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
154
167
|
ctx: {
|
|
@@ -157,7 +170,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
157
170
|
meta: object;
|
|
158
171
|
errorShape: {
|
|
159
172
|
data: {
|
|
160
|
-
zodError:
|
|
173
|
+
zodError: {
|
|
174
|
+
errors: string[];
|
|
175
|
+
} | null;
|
|
161
176
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
162
177
|
httpStatus: number;
|
|
163
178
|
path?: string;
|
|
@@ -195,8 +210,8 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
195
210
|
addGroup: _trpc_server.TRPCQueryProcedure<{
|
|
196
211
|
input: {
|
|
197
212
|
userId: number;
|
|
198
|
-
groupId: number;
|
|
199
213
|
adderId: number;
|
|
214
|
+
groupId: number;
|
|
200
215
|
};
|
|
201
216
|
output: void;
|
|
202
217
|
}>;
|
|
@@ -205,11 +220,11 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
205
220
|
userId: number;
|
|
206
221
|
};
|
|
207
222
|
output: {
|
|
208
|
-
error: null;
|
|
209
223
|
allowed: boolean;
|
|
224
|
+
error: null;
|
|
210
225
|
} | {
|
|
211
|
-
error: "NOT_FOUND";
|
|
212
226
|
allowed: false;
|
|
227
|
+
error: "NOT_FOUND";
|
|
213
228
|
};
|
|
214
229
|
}>;
|
|
215
230
|
}>>;
|
|
@@ -220,7 +235,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
220
235
|
meta: object;
|
|
221
236
|
errorShape: {
|
|
222
237
|
data: {
|
|
223
|
-
zodError:
|
|
238
|
+
zodError: {
|
|
239
|
+
errors: string[];
|
|
240
|
+
} | null;
|
|
224
241
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
225
242
|
httpStatus: number;
|
|
226
243
|
path?: string;
|
|
@@ -233,9 +250,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
233
250
|
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
234
251
|
link: _trpc_server.TRPCQueryProcedure<{
|
|
235
252
|
input: {
|
|
253
|
+
code: string;
|
|
236
254
|
telegramId: number;
|
|
237
255
|
telegramUsername: string;
|
|
238
|
-
code: string;
|
|
239
256
|
};
|
|
240
257
|
output: {
|
|
241
258
|
success: boolean;
|
|
@@ -253,7 +270,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
253
270
|
meta: object;
|
|
254
271
|
errorShape: {
|
|
255
272
|
data: {
|
|
256
|
-
zodError:
|
|
273
|
+
zodError: {
|
|
274
|
+
errors: string[];
|
|
275
|
+
} | null;
|
|
257
276
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
258
277
|
httpStatus: number;
|
|
259
278
|
path?: string;
|
|
@@ -270,17 +289,17 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
270
289
|
messageId: number;
|
|
271
290
|
};
|
|
272
291
|
output: {
|
|
273
|
-
error: null;
|
|
274
292
|
message: {
|
|
275
293
|
chatId: number;
|
|
276
294
|
messageId: number;
|
|
277
295
|
authorId: number;
|
|
278
|
-
timestamp: Date;
|
|
279
296
|
message: string;
|
|
297
|
+
timestamp: Date;
|
|
280
298
|
};
|
|
299
|
+
error: null;
|
|
281
300
|
} | {
|
|
282
|
-
error: "NOT_FOUND" | "DECRYPT_ERROR";
|
|
283
301
|
message: null;
|
|
302
|
+
error: "NOT_FOUND" | "DECRYPT_ERROR";
|
|
284
303
|
};
|
|
285
304
|
}>;
|
|
286
305
|
add: _trpc_server.TRPCMutationProcedure<{
|
|
@@ -289,8 +308,8 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
289
308
|
chatId: number;
|
|
290
309
|
messageId: number;
|
|
291
310
|
authorId: number;
|
|
292
|
-
timestamp: Date;
|
|
293
311
|
message: string;
|
|
312
|
+
timestamp: Date;
|
|
294
313
|
}[];
|
|
295
314
|
};
|
|
296
315
|
output: {
|
|
@@ -305,7 +324,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
305
324
|
meta: object;
|
|
306
325
|
errorShape: {
|
|
307
326
|
data: {
|
|
308
|
-
zodError:
|
|
327
|
+
zodError: {
|
|
328
|
+
errors: string[];
|
|
329
|
+
} | null;
|
|
309
330
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
310
331
|
httpStatus: number;
|
|
311
332
|
path?: string;
|
|
@@ -318,10 +339,10 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
318
339
|
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
319
340
|
create: _trpc_server.TRPCMutationProcedure<{
|
|
320
341
|
input: {
|
|
321
|
-
groupId: number | null;
|
|
322
342
|
adminId: number;
|
|
323
343
|
targetId: number;
|
|
324
344
|
type: "ban" | "kick" | "mute" | "ban_all" | "mute_all";
|
|
345
|
+
groupId: number | null;
|
|
325
346
|
until: Date | null;
|
|
326
347
|
reason?: string | undefined;
|
|
327
348
|
};
|
|
@@ -426,12 +447,8 @@ declare const telegramPlugin: () => {
|
|
|
426
447
|
};
|
|
427
448
|
}>)[];
|
|
428
449
|
body: z.ZodObject<{
|
|
429
|
-
telegramUsername: z.
|
|
430
|
-
},
|
|
431
|
-
telegramUsername: string;
|
|
432
|
-
}, {
|
|
433
|
-
telegramUsername: string;
|
|
434
|
-
}>;
|
|
450
|
+
telegramUsername: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
451
|
+
}, z.core.$strip>;
|
|
435
452
|
} & {
|
|
436
453
|
use: any[];
|
|
437
454
|
};
|
|
@@ -497,11 +514,7 @@ declare const telegramPlugin: () => {
|
|
|
497
514
|
}>)[];
|
|
498
515
|
query: z.ZodObject<{
|
|
499
516
|
code: z.ZodString;
|
|
500
|
-
},
|
|
501
|
-
code: string;
|
|
502
|
-
}, {
|
|
503
|
-
code: string;
|
|
504
|
-
}>;
|
|
517
|
+
}, z.core.$strip>;
|
|
505
518
|
} & {
|
|
506
519
|
use: any[];
|
|
507
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,12 +150,18 @@ 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
|
}>;
|
|
159
|
+
delete: _trpc_server.TRPCMutationProcedure<{
|
|
160
|
+
input: {
|
|
161
|
+
telegramId: number;
|
|
162
|
+
};
|
|
163
|
+
output: boolean;
|
|
164
|
+
}>;
|
|
152
165
|
}>>;
|
|
153
166
|
permissions: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
154
167
|
ctx: {
|
|
@@ -157,7 +170,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
157
170
|
meta: object;
|
|
158
171
|
errorShape: {
|
|
159
172
|
data: {
|
|
160
|
-
zodError:
|
|
173
|
+
zodError: {
|
|
174
|
+
errors: string[];
|
|
175
|
+
} | null;
|
|
161
176
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
162
177
|
httpStatus: number;
|
|
163
178
|
path?: string;
|
|
@@ -195,8 +210,8 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
195
210
|
addGroup: _trpc_server.TRPCQueryProcedure<{
|
|
196
211
|
input: {
|
|
197
212
|
userId: number;
|
|
198
|
-
groupId: number;
|
|
199
213
|
adderId: number;
|
|
214
|
+
groupId: number;
|
|
200
215
|
};
|
|
201
216
|
output: void;
|
|
202
217
|
}>;
|
|
@@ -205,11 +220,11 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
205
220
|
userId: number;
|
|
206
221
|
};
|
|
207
222
|
output: {
|
|
208
|
-
error: null;
|
|
209
223
|
allowed: boolean;
|
|
224
|
+
error: null;
|
|
210
225
|
} | {
|
|
211
|
-
error: "NOT_FOUND";
|
|
212
226
|
allowed: false;
|
|
227
|
+
error: "NOT_FOUND";
|
|
213
228
|
};
|
|
214
229
|
}>;
|
|
215
230
|
}>>;
|
|
@@ -220,7 +235,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
220
235
|
meta: object;
|
|
221
236
|
errorShape: {
|
|
222
237
|
data: {
|
|
223
|
-
zodError:
|
|
238
|
+
zodError: {
|
|
239
|
+
errors: string[];
|
|
240
|
+
} | null;
|
|
224
241
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
225
242
|
httpStatus: number;
|
|
226
243
|
path?: string;
|
|
@@ -233,9 +250,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
233
250
|
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
234
251
|
link: _trpc_server.TRPCQueryProcedure<{
|
|
235
252
|
input: {
|
|
253
|
+
code: string;
|
|
236
254
|
telegramId: number;
|
|
237
255
|
telegramUsername: string;
|
|
238
|
-
code: string;
|
|
239
256
|
};
|
|
240
257
|
output: {
|
|
241
258
|
success: boolean;
|
|
@@ -253,7 +270,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
253
270
|
meta: object;
|
|
254
271
|
errorShape: {
|
|
255
272
|
data: {
|
|
256
|
-
zodError:
|
|
273
|
+
zodError: {
|
|
274
|
+
errors: string[];
|
|
275
|
+
} | null;
|
|
257
276
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
258
277
|
httpStatus: number;
|
|
259
278
|
path?: string;
|
|
@@ -270,17 +289,17 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
270
289
|
messageId: number;
|
|
271
290
|
};
|
|
272
291
|
output: {
|
|
273
|
-
error: null;
|
|
274
292
|
message: {
|
|
275
293
|
chatId: number;
|
|
276
294
|
messageId: number;
|
|
277
295
|
authorId: number;
|
|
278
|
-
timestamp: Date;
|
|
279
296
|
message: string;
|
|
297
|
+
timestamp: Date;
|
|
280
298
|
};
|
|
299
|
+
error: null;
|
|
281
300
|
} | {
|
|
282
|
-
error: "NOT_FOUND" | "DECRYPT_ERROR";
|
|
283
301
|
message: null;
|
|
302
|
+
error: "NOT_FOUND" | "DECRYPT_ERROR";
|
|
284
303
|
};
|
|
285
304
|
}>;
|
|
286
305
|
add: _trpc_server.TRPCMutationProcedure<{
|
|
@@ -289,8 +308,8 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
289
308
|
chatId: number;
|
|
290
309
|
messageId: number;
|
|
291
310
|
authorId: number;
|
|
292
|
-
timestamp: Date;
|
|
293
311
|
message: string;
|
|
312
|
+
timestamp: Date;
|
|
294
313
|
}[];
|
|
295
314
|
};
|
|
296
315
|
output: {
|
|
@@ -305,7 +324,9 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
305
324
|
meta: object;
|
|
306
325
|
errorShape: {
|
|
307
326
|
data: {
|
|
308
|
-
zodError:
|
|
327
|
+
zodError: {
|
|
328
|
+
errors: string[];
|
|
329
|
+
} | null;
|
|
309
330
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
310
331
|
httpStatus: number;
|
|
311
332
|
path?: string;
|
|
@@ -318,10 +339,10 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
318
339
|
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
319
340
|
create: _trpc_server.TRPCMutationProcedure<{
|
|
320
341
|
input: {
|
|
321
|
-
groupId: number | null;
|
|
322
342
|
adminId: number;
|
|
323
343
|
targetId: number;
|
|
324
344
|
type: "ban" | "kick" | "mute" | "ban_all" | "mute_all";
|
|
345
|
+
groupId: number | null;
|
|
325
346
|
until: Date | null;
|
|
326
347
|
reason?: string | undefined;
|
|
327
348
|
};
|
|
@@ -426,12 +447,8 @@ declare const telegramPlugin: () => {
|
|
|
426
447
|
};
|
|
427
448
|
}>)[];
|
|
428
449
|
body: z.ZodObject<{
|
|
429
|
-
telegramUsername: z.
|
|
430
|
-
},
|
|
431
|
-
telegramUsername: string;
|
|
432
|
-
}, {
|
|
433
|
-
telegramUsername: string;
|
|
434
|
-
}>;
|
|
450
|
+
telegramUsername: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
451
|
+
}, z.core.$strip>;
|
|
435
452
|
} & {
|
|
436
453
|
use: any[];
|
|
437
454
|
};
|
|
@@ -497,11 +514,7 @@ declare const telegramPlugin: () => {
|
|
|
497
514
|
}>)[];
|
|
498
515
|
query: z.ZodObject<{
|
|
499
516
|
code: z.ZodString;
|
|
500
|
-
},
|
|
501
|
-
code: string;
|
|
502
|
-
}, {
|
|
503
|
-
code: string;
|
|
504
|
-
}>;
|
|
517
|
+
}, z.core.$strip>;
|
|
505
518
|
} & {
|
|
506
519
|
use: any[];
|
|
507
520
|
};
|