@polinetwork/backend 0.9.1 → 0.9.2
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 +112 -44
- package/dist/index.d.ts +112 -44
- package/package.json +5 -5
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as _trpc_server from '@trpc/server';
|
|
2
|
-
import * as _trpc_server_unstable_core_do_not_import from '@trpc/server/unstable-core-do-not-import';
|
|
3
2
|
import * as better_auth from 'better-auth';
|
|
4
|
-
import { z } from 'zod
|
|
3
|
+
import { z } from 'zod';
|
|
5
4
|
|
|
6
5
|
declare const TRPC_PATH = "/api/trpc";
|
|
7
6
|
declare const AUTH_PATH = "/api/auth";
|
|
@@ -20,7 +19,7 @@ type TAuditType = (typeof AUDIT_TYPE)[keyof typeof AUDIT_TYPE];
|
|
|
20
19
|
*
|
|
21
20
|
* All routers added in /api/routers should be manually added here.
|
|
22
21
|
*/
|
|
23
|
-
declare const appRouter:
|
|
22
|
+
declare const appRouter: _trpc_server.TRPCBuiltRouter<{
|
|
24
23
|
ctx: {
|
|
25
24
|
userId?: string;
|
|
26
25
|
};
|
|
@@ -30,17 +29,17 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
30
29
|
zodError: {
|
|
31
30
|
errors: string[];
|
|
32
31
|
} | null;
|
|
33
|
-
code:
|
|
32
|
+
code: _trpc_server.TRPC_ERROR_CODE_KEY;
|
|
34
33
|
httpStatus: number;
|
|
35
34
|
path?: string;
|
|
36
35
|
stack?: string;
|
|
37
36
|
};
|
|
38
37
|
message: string;
|
|
39
|
-
code:
|
|
38
|
+
code: _trpc_server.TRPC_ERROR_CODE_NUMBER;
|
|
40
39
|
};
|
|
41
40
|
transformer: true;
|
|
42
|
-
},
|
|
43
|
-
test:
|
|
41
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
42
|
+
test: _trpc_server.TRPCBuiltRouter<{
|
|
44
43
|
ctx: {
|
|
45
44
|
userId?: string;
|
|
46
45
|
};
|
|
@@ -50,21 +49,22 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
50
49
|
zodError: {
|
|
51
50
|
errors: string[];
|
|
52
51
|
} | null;
|
|
53
|
-
code:
|
|
52
|
+
code: _trpc_server.TRPC_ERROR_CODE_KEY;
|
|
54
53
|
httpStatus: number;
|
|
55
54
|
path?: string;
|
|
56
55
|
stack?: string;
|
|
57
56
|
};
|
|
58
57
|
message: string;
|
|
59
|
-
code:
|
|
58
|
+
code: _trpc_server.TRPC_ERROR_CODE_NUMBER;
|
|
60
59
|
};
|
|
61
60
|
transformer: true;
|
|
62
|
-
},
|
|
61
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
63
62
|
dbQuery: _trpc_server.TRPCQueryProcedure<{
|
|
64
63
|
input: {
|
|
65
64
|
dbName: "web" | "tg";
|
|
66
65
|
};
|
|
67
66
|
output: string[];
|
|
67
|
+
meta: object;
|
|
68
68
|
}>;
|
|
69
69
|
dbInsert: _trpc_server.TRPCMutationProcedure<{
|
|
70
70
|
input: {
|
|
@@ -72,9 +72,10 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
72
72
|
dbName: "web" | "tg";
|
|
73
73
|
};
|
|
74
74
|
output: boolean;
|
|
75
|
+
meta: object;
|
|
75
76
|
}>;
|
|
76
77
|
}>>;
|
|
77
|
-
tg:
|
|
78
|
+
tg: _trpc_server.TRPCBuiltRouter<{
|
|
78
79
|
ctx: {
|
|
79
80
|
userId?: string;
|
|
80
81
|
};
|
|
@@ -84,17 +85,17 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
84
85
|
zodError: {
|
|
85
86
|
errors: string[];
|
|
86
87
|
} | null;
|
|
87
|
-
code:
|
|
88
|
+
code: _trpc_server.TRPC_ERROR_CODE_KEY;
|
|
88
89
|
httpStatus: number;
|
|
89
90
|
path?: string;
|
|
90
91
|
stack?: string;
|
|
91
92
|
};
|
|
92
93
|
message: string;
|
|
93
|
-
code:
|
|
94
|
+
code: _trpc_server.TRPC_ERROR_CODE_NUMBER;
|
|
94
95
|
};
|
|
95
96
|
transformer: true;
|
|
96
|
-
},
|
|
97
|
-
groups:
|
|
97
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
98
|
+
groups: _trpc_server.TRPCBuiltRouter<{
|
|
98
99
|
ctx: {
|
|
99
100
|
userId?: string;
|
|
100
101
|
};
|
|
@@ -104,16 +105,16 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
104
105
|
zodError: {
|
|
105
106
|
errors: string[];
|
|
106
107
|
} | null;
|
|
107
|
-
code:
|
|
108
|
+
code: _trpc_server.TRPC_ERROR_CODE_KEY;
|
|
108
109
|
httpStatus: number;
|
|
109
110
|
path?: string;
|
|
110
111
|
stack?: string;
|
|
111
112
|
};
|
|
112
113
|
message: string;
|
|
113
|
-
code:
|
|
114
|
+
code: _trpc_server.TRPC_ERROR_CODE_NUMBER;
|
|
114
115
|
};
|
|
115
116
|
transformer: true;
|
|
116
|
-
},
|
|
117
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
117
118
|
getAll: _trpc_server.TRPCQueryProcedure<{
|
|
118
119
|
input: void;
|
|
119
120
|
output: {
|
|
@@ -123,6 +124,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
123
124
|
title: string;
|
|
124
125
|
link: string | null;
|
|
125
126
|
}[];
|
|
127
|
+
meta: object;
|
|
126
128
|
}>;
|
|
127
129
|
search: _trpc_server.TRPCQueryProcedure<{
|
|
128
130
|
input: {
|
|
@@ -137,6 +139,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
137
139
|
}[];
|
|
138
140
|
count: number;
|
|
139
141
|
};
|
|
142
|
+
meta: object;
|
|
140
143
|
}>;
|
|
141
144
|
getById: _trpc_server.TRPCQueryProcedure<{
|
|
142
145
|
input: {
|
|
@@ -149,6 +152,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
149
152
|
title: string;
|
|
150
153
|
link: string | null;
|
|
151
154
|
}[];
|
|
155
|
+
meta: object;
|
|
152
156
|
}>;
|
|
153
157
|
create: _trpc_server.TRPCMutationProcedure<{
|
|
154
158
|
input: {
|
|
@@ -157,15 +161,17 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
157
161
|
link: string;
|
|
158
162
|
}[];
|
|
159
163
|
output: number[];
|
|
164
|
+
meta: object;
|
|
160
165
|
}>;
|
|
161
166
|
delete: _trpc_server.TRPCMutationProcedure<{
|
|
162
167
|
input: {
|
|
163
168
|
telegramId: number;
|
|
164
169
|
};
|
|
165
170
|
output: boolean;
|
|
171
|
+
meta: object;
|
|
166
172
|
}>;
|
|
167
173
|
}>>;
|
|
168
|
-
permissions:
|
|
174
|
+
permissions: _trpc_server.TRPCBuiltRouter<{
|
|
169
175
|
ctx: {
|
|
170
176
|
userId?: string;
|
|
171
177
|
};
|
|
@@ -175,16 +181,16 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
175
181
|
zodError: {
|
|
176
182
|
errors: string[];
|
|
177
183
|
} | null;
|
|
178
|
-
code:
|
|
184
|
+
code: _trpc_server.TRPC_ERROR_CODE_KEY;
|
|
179
185
|
httpStatus: number;
|
|
180
186
|
path?: string;
|
|
181
187
|
stack?: string;
|
|
182
188
|
};
|
|
183
189
|
message: string;
|
|
184
|
-
code:
|
|
190
|
+
code: _trpc_server.TRPC_ERROR_CODE_NUMBER;
|
|
185
191
|
};
|
|
186
192
|
transformer: true;
|
|
187
|
-
},
|
|
193
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
188
194
|
getRole: _trpc_server.TRPCQueryProcedure<{
|
|
189
195
|
input: {
|
|
190
196
|
userId: number;
|
|
@@ -193,6 +199,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
193
199
|
userId: number;
|
|
194
200
|
role: string;
|
|
195
201
|
};
|
|
202
|
+
meta: object;
|
|
196
203
|
}>;
|
|
197
204
|
setRole: _trpc_server.TRPCQueryProcedure<{
|
|
198
205
|
input: {
|
|
@@ -201,6 +208,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
201
208
|
adderId: number;
|
|
202
209
|
};
|
|
203
210
|
output: void;
|
|
211
|
+
meta: object;
|
|
204
212
|
}>;
|
|
205
213
|
checkGroup: _trpc_server.TRPCQueryProcedure<{
|
|
206
214
|
input: {
|
|
@@ -208,6 +216,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
208
216
|
groupId: number;
|
|
209
217
|
};
|
|
210
218
|
output: boolean;
|
|
219
|
+
meta: object;
|
|
211
220
|
}>;
|
|
212
221
|
addGroup: _trpc_server.TRPCQueryProcedure<{
|
|
213
222
|
input: {
|
|
@@ -216,6 +225,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
216
225
|
groupId: number;
|
|
217
226
|
};
|
|
218
227
|
output: void;
|
|
228
|
+
meta: object;
|
|
219
229
|
}>;
|
|
220
230
|
canAddBot: _trpc_server.TRPCQueryProcedure<{
|
|
221
231
|
input: {
|
|
@@ -228,9 +238,10 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
228
238
|
allowed: false;
|
|
229
239
|
error: "NOT_FOUND";
|
|
230
240
|
};
|
|
241
|
+
meta: object;
|
|
231
242
|
}>;
|
|
232
243
|
}>>;
|
|
233
|
-
link:
|
|
244
|
+
link: _trpc_server.TRPCBuiltRouter<{
|
|
234
245
|
ctx: {
|
|
235
246
|
userId?: string;
|
|
236
247
|
};
|
|
@@ -240,16 +251,16 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
240
251
|
zodError: {
|
|
241
252
|
errors: string[];
|
|
242
253
|
} | null;
|
|
243
|
-
code:
|
|
254
|
+
code: _trpc_server.TRPC_ERROR_CODE_KEY;
|
|
244
255
|
httpStatus: number;
|
|
245
256
|
path?: string;
|
|
246
257
|
stack?: string;
|
|
247
258
|
};
|
|
248
259
|
message: string;
|
|
249
|
-
code:
|
|
260
|
+
code: _trpc_server.TRPC_ERROR_CODE_NUMBER;
|
|
250
261
|
};
|
|
251
262
|
transformer: true;
|
|
252
|
-
},
|
|
263
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
253
264
|
link: _trpc_server.TRPCQueryProcedure<{
|
|
254
265
|
input: {
|
|
255
266
|
code: string;
|
|
@@ -263,9 +274,10 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
263
274
|
success: boolean;
|
|
264
275
|
error: undefined;
|
|
265
276
|
};
|
|
277
|
+
meta: object;
|
|
266
278
|
}>;
|
|
267
279
|
}>>;
|
|
268
|
-
messages:
|
|
280
|
+
messages: _trpc_server.TRPCBuiltRouter<{
|
|
269
281
|
ctx: {
|
|
270
282
|
userId?: string;
|
|
271
283
|
};
|
|
@@ -275,16 +287,16 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
275
287
|
zodError: {
|
|
276
288
|
errors: string[];
|
|
277
289
|
} | null;
|
|
278
|
-
code:
|
|
290
|
+
code: _trpc_server.TRPC_ERROR_CODE_KEY;
|
|
279
291
|
httpStatus: number;
|
|
280
292
|
path?: string;
|
|
281
293
|
stack?: string;
|
|
282
294
|
};
|
|
283
295
|
message: string;
|
|
284
|
-
code:
|
|
296
|
+
code: _trpc_server.TRPC_ERROR_CODE_NUMBER;
|
|
285
297
|
};
|
|
286
298
|
transformer: true;
|
|
287
|
-
},
|
|
299
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
288
300
|
get: _trpc_server.TRPCQueryProcedure<{
|
|
289
301
|
input: {
|
|
290
302
|
chatId: number;
|
|
@@ -303,6 +315,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
303
315
|
message: null;
|
|
304
316
|
error: "NOT_FOUND" | "DECRYPT_ERROR";
|
|
305
317
|
};
|
|
318
|
+
meta: object;
|
|
306
319
|
}>;
|
|
307
320
|
add: _trpc_server.TRPCMutationProcedure<{
|
|
308
321
|
input: {
|
|
@@ -317,9 +330,10 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
317
330
|
output: {
|
|
318
331
|
error: "ENCRYPT_ERROR" | null;
|
|
319
332
|
};
|
|
333
|
+
meta: object;
|
|
320
334
|
}>;
|
|
321
335
|
}>>;
|
|
322
|
-
auditLog:
|
|
336
|
+
auditLog: _trpc_server.TRPCBuiltRouter<{
|
|
323
337
|
ctx: {
|
|
324
338
|
userId?: string;
|
|
325
339
|
};
|
|
@@ -329,16 +343,16 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
329
343
|
zodError: {
|
|
330
344
|
errors: string[];
|
|
331
345
|
} | null;
|
|
332
|
-
code:
|
|
346
|
+
code: _trpc_server.TRPC_ERROR_CODE_KEY;
|
|
333
347
|
httpStatus: number;
|
|
334
348
|
path?: string;
|
|
335
349
|
stack?: string;
|
|
336
350
|
};
|
|
337
351
|
message: string;
|
|
338
|
-
code:
|
|
352
|
+
code: _trpc_server.TRPC_ERROR_CODE_NUMBER;
|
|
339
353
|
};
|
|
340
354
|
transformer: true;
|
|
341
|
-
},
|
|
355
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
342
356
|
create: _trpc_server.TRPCMutationProcedure<{
|
|
343
357
|
input: {
|
|
344
358
|
adminId: number;
|
|
@@ -349,6 +363,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
349
363
|
reason?: string | undefined;
|
|
350
364
|
};
|
|
351
365
|
output: void;
|
|
366
|
+
meta: object;
|
|
352
367
|
}>;
|
|
353
368
|
getById: _trpc_server.TRPCQueryProcedure<{
|
|
354
369
|
input: {
|
|
@@ -366,6 +381,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
366
381
|
until: Date | null;
|
|
367
382
|
reason: string | null;
|
|
368
383
|
}[];
|
|
384
|
+
meta: object;
|
|
369
385
|
}>;
|
|
370
386
|
}>>;
|
|
371
387
|
}>>;
|
|
@@ -415,11 +431,37 @@ declare const telegramPlugin: () => {
|
|
|
415
431
|
returnHeaders?: ReturnHeaders | undefined;
|
|
416
432
|
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
|
|
417
433
|
headers: Headers;
|
|
418
|
-
response:
|
|
434
|
+
response: {
|
|
435
|
+
status: ("BAD_REQUEST" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "CONFLICT" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "UNSUPPORTED_MEDIA_TYPE" | "TOO_MANY_REQUESTS" | "OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "GONE" | "LENGTH_REQUIRED" | "URI_TOO_LONG" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | better_auth.Status;
|
|
436
|
+
body: ({
|
|
437
|
+
message?: string;
|
|
438
|
+
code?: string;
|
|
439
|
+
cause?: unknown;
|
|
440
|
+
} & Record<string, any>) | undefined;
|
|
441
|
+
headers: HeadersInit;
|
|
442
|
+
statusCode: number;
|
|
443
|
+
name: string;
|
|
444
|
+
message: string;
|
|
445
|
+
stack?: string;
|
|
446
|
+
cause?: unknown;
|
|
447
|
+
} | {
|
|
419
448
|
code: string;
|
|
420
449
|
ttl: number;
|
|
421
450
|
};
|
|
422
|
-
} :
|
|
451
|
+
} : {
|
|
452
|
+
status: ("BAD_REQUEST" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "CONFLICT" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "UNSUPPORTED_MEDIA_TYPE" | "TOO_MANY_REQUESTS" | "OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "GONE" | "LENGTH_REQUIRED" | "URI_TOO_LONG" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | better_auth.Status;
|
|
453
|
+
body: ({
|
|
454
|
+
message?: string;
|
|
455
|
+
code?: string;
|
|
456
|
+
cause?: unknown;
|
|
457
|
+
} & Record<string, any>) | undefined;
|
|
458
|
+
headers: HeadersInit;
|
|
459
|
+
statusCode: number;
|
|
460
|
+
name: string;
|
|
461
|
+
message: string;
|
|
462
|
+
stack?: string;
|
|
463
|
+
cause?: unknown;
|
|
464
|
+
} | {
|
|
423
465
|
code: string;
|
|
424
466
|
ttl: number;
|
|
425
467
|
}>;
|
|
@@ -439,11 +481,11 @@ declare const telegramPlugin: () => {
|
|
|
439
481
|
};
|
|
440
482
|
user: Record<string, any> & {
|
|
441
483
|
id: string;
|
|
442
|
-
name: string;
|
|
443
|
-
email: string;
|
|
444
|
-
emailVerified: boolean;
|
|
445
484
|
createdAt: Date;
|
|
446
485
|
updatedAt: Date;
|
|
486
|
+
email: string;
|
|
487
|
+
emailVerified: boolean;
|
|
488
|
+
name: string;
|
|
447
489
|
image?: string | null | undefined;
|
|
448
490
|
};
|
|
449
491
|
};
|
|
@@ -481,11 +523,37 @@ declare const telegramPlugin: () => {
|
|
|
481
523
|
returnHeaders?: ReturnHeaders | undefined;
|
|
482
524
|
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
|
|
483
525
|
headers: Headers;
|
|
484
|
-
response:
|
|
526
|
+
response: {
|
|
527
|
+
status: ("BAD_REQUEST" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "CONFLICT" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "UNSUPPORTED_MEDIA_TYPE" | "TOO_MANY_REQUESTS" | "OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "GONE" | "LENGTH_REQUIRED" | "URI_TOO_LONG" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | better_auth.Status;
|
|
528
|
+
body: ({
|
|
529
|
+
message?: string;
|
|
530
|
+
code?: string;
|
|
531
|
+
cause?: unknown;
|
|
532
|
+
} & Record<string, any>) | undefined;
|
|
533
|
+
headers: HeadersInit;
|
|
534
|
+
statusCode: number;
|
|
535
|
+
name: string;
|
|
536
|
+
message: string;
|
|
537
|
+
stack?: string;
|
|
538
|
+
cause?: unknown;
|
|
539
|
+
} | {
|
|
485
540
|
expired: boolean;
|
|
486
541
|
verified: boolean;
|
|
487
542
|
};
|
|
488
|
-
} :
|
|
543
|
+
} : {
|
|
544
|
+
status: ("BAD_REQUEST" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "CONFLICT" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "UNSUPPORTED_MEDIA_TYPE" | "TOO_MANY_REQUESTS" | "OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "GONE" | "LENGTH_REQUIRED" | "URI_TOO_LONG" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | better_auth.Status;
|
|
545
|
+
body: ({
|
|
546
|
+
message?: string;
|
|
547
|
+
code?: string;
|
|
548
|
+
cause?: unknown;
|
|
549
|
+
} & Record<string, any>) | undefined;
|
|
550
|
+
headers: HeadersInit;
|
|
551
|
+
statusCode: number;
|
|
552
|
+
name: string;
|
|
553
|
+
message: string;
|
|
554
|
+
stack?: string;
|
|
555
|
+
cause?: unknown;
|
|
556
|
+
} | {
|
|
489
557
|
expired: boolean;
|
|
490
558
|
verified: boolean;
|
|
491
559
|
}>;
|
|
@@ -505,11 +573,11 @@ declare const telegramPlugin: () => {
|
|
|
505
573
|
};
|
|
506
574
|
user: Record<string, any> & {
|
|
507
575
|
id: string;
|
|
508
|
-
name: string;
|
|
509
|
-
email: string;
|
|
510
|
-
emailVerified: boolean;
|
|
511
576
|
createdAt: Date;
|
|
512
577
|
updatedAt: Date;
|
|
578
|
+
email: string;
|
|
579
|
+
emailVerified: boolean;
|
|
580
|
+
name: string;
|
|
513
581
|
image?: string | null | undefined;
|
|
514
582
|
};
|
|
515
583
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as _trpc_server from '@trpc/server';
|
|
2
|
-
import * as _trpc_server_unstable_core_do_not_import from '@trpc/server/unstable-core-do-not-import';
|
|
3
2
|
import * as better_auth from 'better-auth';
|
|
4
|
-
import { z } from 'zod
|
|
3
|
+
import { z } from 'zod';
|
|
5
4
|
|
|
6
5
|
declare const TRPC_PATH = "/api/trpc";
|
|
7
6
|
declare const AUTH_PATH = "/api/auth";
|
|
@@ -20,7 +19,7 @@ type TAuditType = (typeof AUDIT_TYPE)[keyof typeof AUDIT_TYPE];
|
|
|
20
19
|
*
|
|
21
20
|
* All routers added in /api/routers should be manually added here.
|
|
22
21
|
*/
|
|
23
|
-
declare const appRouter:
|
|
22
|
+
declare const appRouter: _trpc_server.TRPCBuiltRouter<{
|
|
24
23
|
ctx: {
|
|
25
24
|
userId?: string;
|
|
26
25
|
};
|
|
@@ -30,17 +29,17 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
30
29
|
zodError: {
|
|
31
30
|
errors: string[];
|
|
32
31
|
} | null;
|
|
33
|
-
code:
|
|
32
|
+
code: _trpc_server.TRPC_ERROR_CODE_KEY;
|
|
34
33
|
httpStatus: number;
|
|
35
34
|
path?: string;
|
|
36
35
|
stack?: string;
|
|
37
36
|
};
|
|
38
37
|
message: string;
|
|
39
|
-
code:
|
|
38
|
+
code: _trpc_server.TRPC_ERROR_CODE_NUMBER;
|
|
40
39
|
};
|
|
41
40
|
transformer: true;
|
|
42
|
-
},
|
|
43
|
-
test:
|
|
41
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
42
|
+
test: _trpc_server.TRPCBuiltRouter<{
|
|
44
43
|
ctx: {
|
|
45
44
|
userId?: string;
|
|
46
45
|
};
|
|
@@ -50,21 +49,22 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
50
49
|
zodError: {
|
|
51
50
|
errors: string[];
|
|
52
51
|
} | null;
|
|
53
|
-
code:
|
|
52
|
+
code: _trpc_server.TRPC_ERROR_CODE_KEY;
|
|
54
53
|
httpStatus: number;
|
|
55
54
|
path?: string;
|
|
56
55
|
stack?: string;
|
|
57
56
|
};
|
|
58
57
|
message: string;
|
|
59
|
-
code:
|
|
58
|
+
code: _trpc_server.TRPC_ERROR_CODE_NUMBER;
|
|
60
59
|
};
|
|
61
60
|
transformer: true;
|
|
62
|
-
},
|
|
61
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
63
62
|
dbQuery: _trpc_server.TRPCQueryProcedure<{
|
|
64
63
|
input: {
|
|
65
64
|
dbName: "web" | "tg";
|
|
66
65
|
};
|
|
67
66
|
output: string[];
|
|
67
|
+
meta: object;
|
|
68
68
|
}>;
|
|
69
69
|
dbInsert: _trpc_server.TRPCMutationProcedure<{
|
|
70
70
|
input: {
|
|
@@ -72,9 +72,10 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
72
72
|
dbName: "web" | "tg";
|
|
73
73
|
};
|
|
74
74
|
output: boolean;
|
|
75
|
+
meta: object;
|
|
75
76
|
}>;
|
|
76
77
|
}>>;
|
|
77
|
-
tg:
|
|
78
|
+
tg: _trpc_server.TRPCBuiltRouter<{
|
|
78
79
|
ctx: {
|
|
79
80
|
userId?: string;
|
|
80
81
|
};
|
|
@@ -84,17 +85,17 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
84
85
|
zodError: {
|
|
85
86
|
errors: string[];
|
|
86
87
|
} | null;
|
|
87
|
-
code:
|
|
88
|
+
code: _trpc_server.TRPC_ERROR_CODE_KEY;
|
|
88
89
|
httpStatus: number;
|
|
89
90
|
path?: string;
|
|
90
91
|
stack?: string;
|
|
91
92
|
};
|
|
92
93
|
message: string;
|
|
93
|
-
code:
|
|
94
|
+
code: _trpc_server.TRPC_ERROR_CODE_NUMBER;
|
|
94
95
|
};
|
|
95
96
|
transformer: true;
|
|
96
|
-
},
|
|
97
|
-
groups:
|
|
97
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
98
|
+
groups: _trpc_server.TRPCBuiltRouter<{
|
|
98
99
|
ctx: {
|
|
99
100
|
userId?: string;
|
|
100
101
|
};
|
|
@@ -104,16 +105,16 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
104
105
|
zodError: {
|
|
105
106
|
errors: string[];
|
|
106
107
|
} | null;
|
|
107
|
-
code:
|
|
108
|
+
code: _trpc_server.TRPC_ERROR_CODE_KEY;
|
|
108
109
|
httpStatus: number;
|
|
109
110
|
path?: string;
|
|
110
111
|
stack?: string;
|
|
111
112
|
};
|
|
112
113
|
message: string;
|
|
113
|
-
code:
|
|
114
|
+
code: _trpc_server.TRPC_ERROR_CODE_NUMBER;
|
|
114
115
|
};
|
|
115
116
|
transformer: true;
|
|
116
|
-
},
|
|
117
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
117
118
|
getAll: _trpc_server.TRPCQueryProcedure<{
|
|
118
119
|
input: void;
|
|
119
120
|
output: {
|
|
@@ -123,6 +124,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
123
124
|
title: string;
|
|
124
125
|
link: string | null;
|
|
125
126
|
}[];
|
|
127
|
+
meta: object;
|
|
126
128
|
}>;
|
|
127
129
|
search: _trpc_server.TRPCQueryProcedure<{
|
|
128
130
|
input: {
|
|
@@ -137,6 +139,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
137
139
|
}[];
|
|
138
140
|
count: number;
|
|
139
141
|
};
|
|
142
|
+
meta: object;
|
|
140
143
|
}>;
|
|
141
144
|
getById: _trpc_server.TRPCQueryProcedure<{
|
|
142
145
|
input: {
|
|
@@ -149,6 +152,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
149
152
|
title: string;
|
|
150
153
|
link: string | null;
|
|
151
154
|
}[];
|
|
155
|
+
meta: object;
|
|
152
156
|
}>;
|
|
153
157
|
create: _trpc_server.TRPCMutationProcedure<{
|
|
154
158
|
input: {
|
|
@@ -157,15 +161,17 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
157
161
|
link: string;
|
|
158
162
|
}[];
|
|
159
163
|
output: number[];
|
|
164
|
+
meta: object;
|
|
160
165
|
}>;
|
|
161
166
|
delete: _trpc_server.TRPCMutationProcedure<{
|
|
162
167
|
input: {
|
|
163
168
|
telegramId: number;
|
|
164
169
|
};
|
|
165
170
|
output: boolean;
|
|
171
|
+
meta: object;
|
|
166
172
|
}>;
|
|
167
173
|
}>>;
|
|
168
|
-
permissions:
|
|
174
|
+
permissions: _trpc_server.TRPCBuiltRouter<{
|
|
169
175
|
ctx: {
|
|
170
176
|
userId?: string;
|
|
171
177
|
};
|
|
@@ -175,16 +181,16 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
175
181
|
zodError: {
|
|
176
182
|
errors: string[];
|
|
177
183
|
} | null;
|
|
178
|
-
code:
|
|
184
|
+
code: _trpc_server.TRPC_ERROR_CODE_KEY;
|
|
179
185
|
httpStatus: number;
|
|
180
186
|
path?: string;
|
|
181
187
|
stack?: string;
|
|
182
188
|
};
|
|
183
189
|
message: string;
|
|
184
|
-
code:
|
|
190
|
+
code: _trpc_server.TRPC_ERROR_CODE_NUMBER;
|
|
185
191
|
};
|
|
186
192
|
transformer: true;
|
|
187
|
-
},
|
|
193
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
188
194
|
getRole: _trpc_server.TRPCQueryProcedure<{
|
|
189
195
|
input: {
|
|
190
196
|
userId: number;
|
|
@@ -193,6 +199,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
193
199
|
userId: number;
|
|
194
200
|
role: string;
|
|
195
201
|
};
|
|
202
|
+
meta: object;
|
|
196
203
|
}>;
|
|
197
204
|
setRole: _trpc_server.TRPCQueryProcedure<{
|
|
198
205
|
input: {
|
|
@@ -201,6 +208,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
201
208
|
adderId: number;
|
|
202
209
|
};
|
|
203
210
|
output: void;
|
|
211
|
+
meta: object;
|
|
204
212
|
}>;
|
|
205
213
|
checkGroup: _trpc_server.TRPCQueryProcedure<{
|
|
206
214
|
input: {
|
|
@@ -208,6 +216,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
208
216
|
groupId: number;
|
|
209
217
|
};
|
|
210
218
|
output: boolean;
|
|
219
|
+
meta: object;
|
|
211
220
|
}>;
|
|
212
221
|
addGroup: _trpc_server.TRPCQueryProcedure<{
|
|
213
222
|
input: {
|
|
@@ -216,6 +225,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
216
225
|
groupId: number;
|
|
217
226
|
};
|
|
218
227
|
output: void;
|
|
228
|
+
meta: object;
|
|
219
229
|
}>;
|
|
220
230
|
canAddBot: _trpc_server.TRPCQueryProcedure<{
|
|
221
231
|
input: {
|
|
@@ -228,9 +238,10 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
228
238
|
allowed: false;
|
|
229
239
|
error: "NOT_FOUND";
|
|
230
240
|
};
|
|
241
|
+
meta: object;
|
|
231
242
|
}>;
|
|
232
243
|
}>>;
|
|
233
|
-
link:
|
|
244
|
+
link: _trpc_server.TRPCBuiltRouter<{
|
|
234
245
|
ctx: {
|
|
235
246
|
userId?: string;
|
|
236
247
|
};
|
|
@@ -240,16 +251,16 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
240
251
|
zodError: {
|
|
241
252
|
errors: string[];
|
|
242
253
|
} | null;
|
|
243
|
-
code:
|
|
254
|
+
code: _trpc_server.TRPC_ERROR_CODE_KEY;
|
|
244
255
|
httpStatus: number;
|
|
245
256
|
path?: string;
|
|
246
257
|
stack?: string;
|
|
247
258
|
};
|
|
248
259
|
message: string;
|
|
249
|
-
code:
|
|
260
|
+
code: _trpc_server.TRPC_ERROR_CODE_NUMBER;
|
|
250
261
|
};
|
|
251
262
|
transformer: true;
|
|
252
|
-
},
|
|
263
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
253
264
|
link: _trpc_server.TRPCQueryProcedure<{
|
|
254
265
|
input: {
|
|
255
266
|
code: string;
|
|
@@ -263,9 +274,10 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
263
274
|
success: boolean;
|
|
264
275
|
error: undefined;
|
|
265
276
|
};
|
|
277
|
+
meta: object;
|
|
266
278
|
}>;
|
|
267
279
|
}>>;
|
|
268
|
-
messages:
|
|
280
|
+
messages: _trpc_server.TRPCBuiltRouter<{
|
|
269
281
|
ctx: {
|
|
270
282
|
userId?: string;
|
|
271
283
|
};
|
|
@@ -275,16 +287,16 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
275
287
|
zodError: {
|
|
276
288
|
errors: string[];
|
|
277
289
|
} | null;
|
|
278
|
-
code:
|
|
290
|
+
code: _trpc_server.TRPC_ERROR_CODE_KEY;
|
|
279
291
|
httpStatus: number;
|
|
280
292
|
path?: string;
|
|
281
293
|
stack?: string;
|
|
282
294
|
};
|
|
283
295
|
message: string;
|
|
284
|
-
code:
|
|
296
|
+
code: _trpc_server.TRPC_ERROR_CODE_NUMBER;
|
|
285
297
|
};
|
|
286
298
|
transformer: true;
|
|
287
|
-
},
|
|
299
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
288
300
|
get: _trpc_server.TRPCQueryProcedure<{
|
|
289
301
|
input: {
|
|
290
302
|
chatId: number;
|
|
@@ -303,6 +315,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
303
315
|
message: null;
|
|
304
316
|
error: "NOT_FOUND" | "DECRYPT_ERROR";
|
|
305
317
|
};
|
|
318
|
+
meta: object;
|
|
306
319
|
}>;
|
|
307
320
|
add: _trpc_server.TRPCMutationProcedure<{
|
|
308
321
|
input: {
|
|
@@ -317,9 +330,10 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
317
330
|
output: {
|
|
318
331
|
error: "ENCRYPT_ERROR" | null;
|
|
319
332
|
};
|
|
333
|
+
meta: object;
|
|
320
334
|
}>;
|
|
321
335
|
}>>;
|
|
322
|
-
auditLog:
|
|
336
|
+
auditLog: _trpc_server.TRPCBuiltRouter<{
|
|
323
337
|
ctx: {
|
|
324
338
|
userId?: string;
|
|
325
339
|
};
|
|
@@ -329,16 +343,16 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
329
343
|
zodError: {
|
|
330
344
|
errors: string[];
|
|
331
345
|
} | null;
|
|
332
|
-
code:
|
|
346
|
+
code: _trpc_server.TRPC_ERROR_CODE_KEY;
|
|
333
347
|
httpStatus: number;
|
|
334
348
|
path?: string;
|
|
335
349
|
stack?: string;
|
|
336
350
|
};
|
|
337
351
|
message: string;
|
|
338
|
-
code:
|
|
352
|
+
code: _trpc_server.TRPC_ERROR_CODE_NUMBER;
|
|
339
353
|
};
|
|
340
354
|
transformer: true;
|
|
341
|
-
},
|
|
355
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
342
356
|
create: _trpc_server.TRPCMutationProcedure<{
|
|
343
357
|
input: {
|
|
344
358
|
adminId: number;
|
|
@@ -349,6 +363,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
349
363
|
reason?: string | undefined;
|
|
350
364
|
};
|
|
351
365
|
output: void;
|
|
366
|
+
meta: object;
|
|
352
367
|
}>;
|
|
353
368
|
getById: _trpc_server.TRPCQueryProcedure<{
|
|
354
369
|
input: {
|
|
@@ -366,6 +381,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
366
381
|
until: Date | null;
|
|
367
382
|
reason: string | null;
|
|
368
383
|
}[];
|
|
384
|
+
meta: object;
|
|
369
385
|
}>;
|
|
370
386
|
}>>;
|
|
371
387
|
}>>;
|
|
@@ -415,11 +431,37 @@ declare const telegramPlugin: () => {
|
|
|
415
431
|
returnHeaders?: ReturnHeaders | undefined;
|
|
416
432
|
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
|
|
417
433
|
headers: Headers;
|
|
418
|
-
response:
|
|
434
|
+
response: {
|
|
435
|
+
status: ("BAD_REQUEST" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "CONFLICT" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "UNSUPPORTED_MEDIA_TYPE" | "TOO_MANY_REQUESTS" | "OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "GONE" | "LENGTH_REQUIRED" | "URI_TOO_LONG" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | better_auth.Status;
|
|
436
|
+
body: ({
|
|
437
|
+
message?: string;
|
|
438
|
+
code?: string;
|
|
439
|
+
cause?: unknown;
|
|
440
|
+
} & Record<string, any>) | undefined;
|
|
441
|
+
headers: HeadersInit;
|
|
442
|
+
statusCode: number;
|
|
443
|
+
name: string;
|
|
444
|
+
message: string;
|
|
445
|
+
stack?: string;
|
|
446
|
+
cause?: unknown;
|
|
447
|
+
} | {
|
|
419
448
|
code: string;
|
|
420
449
|
ttl: number;
|
|
421
450
|
};
|
|
422
|
-
} :
|
|
451
|
+
} : {
|
|
452
|
+
status: ("BAD_REQUEST" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "CONFLICT" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "UNSUPPORTED_MEDIA_TYPE" | "TOO_MANY_REQUESTS" | "OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "GONE" | "LENGTH_REQUIRED" | "URI_TOO_LONG" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | better_auth.Status;
|
|
453
|
+
body: ({
|
|
454
|
+
message?: string;
|
|
455
|
+
code?: string;
|
|
456
|
+
cause?: unknown;
|
|
457
|
+
} & Record<string, any>) | undefined;
|
|
458
|
+
headers: HeadersInit;
|
|
459
|
+
statusCode: number;
|
|
460
|
+
name: string;
|
|
461
|
+
message: string;
|
|
462
|
+
stack?: string;
|
|
463
|
+
cause?: unknown;
|
|
464
|
+
} | {
|
|
423
465
|
code: string;
|
|
424
466
|
ttl: number;
|
|
425
467
|
}>;
|
|
@@ -439,11 +481,11 @@ declare const telegramPlugin: () => {
|
|
|
439
481
|
};
|
|
440
482
|
user: Record<string, any> & {
|
|
441
483
|
id: string;
|
|
442
|
-
name: string;
|
|
443
|
-
email: string;
|
|
444
|
-
emailVerified: boolean;
|
|
445
484
|
createdAt: Date;
|
|
446
485
|
updatedAt: Date;
|
|
486
|
+
email: string;
|
|
487
|
+
emailVerified: boolean;
|
|
488
|
+
name: string;
|
|
447
489
|
image?: string | null | undefined;
|
|
448
490
|
};
|
|
449
491
|
};
|
|
@@ -481,11 +523,37 @@ declare const telegramPlugin: () => {
|
|
|
481
523
|
returnHeaders?: ReturnHeaders | undefined;
|
|
482
524
|
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
|
|
483
525
|
headers: Headers;
|
|
484
|
-
response:
|
|
526
|
+
response: {
|
|
527
|
+
status: ("BAD_REQUEST" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "CONFLICT" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "UNSUPPORTED_MEDIA_TYPE" | "TOO_MANY_REQUESTS" | "OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "GONE" | "LENGTH_REQUIRED" | "URI_TOO_LONG" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | better_auth.Status;
|
|
528
|
+
body: ({
|
|
529
|
+
message?: string;
|
|
530
|
+
code?: string;
|
|
531
|
+
cause?: unknown;
|
|
532
|
+
} & Record<string, any>) | undefined;
|
|
533
|
+
headers: HeadersInit;
|
|
534
|
+
statusCode: number;
|
|
535
|
+
name: string;
|
|
536
|
+
message: string;
|
|
537
|
+
stack?: string;
|
|
538
|
+
cause?: unknown;
|
|
539
|
+
} | {
|
|
485
540
|
expired: boolean;
|
|
486
541
|
verified: boolean;
|
|
487
542
|
};
|
|
488
|
-
} :
|
|
543
|
+
} : {
|
|
544
|
+
status: ("BAD_REQUEST" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "CONFLICT" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "UNSUPPORTED_MEDIA_TYPE" | "TOO_MANY_REQUESTS" | "OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "GONE" | "LENGTH_REQUIRED" | "URI_TOO_LONG" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | better_auth.Status;
|
|
545
|
+
body: ({
|
|
546
|
+
message?: string;
|
|
547
|
+
code?: string;
|
|
548
|
+
cause?: unknown;
|
|
549
|
+
} & Record<string, any>) | undefined;
|
|
550
|
+
headers: HeadersInit;
|
|
551
|
+
statusCode: number;
|
|
552
|
+
name: string;
|
|
553
|
+
message: string;
|
|
554
|
+
stack?: string;
|
|
555
|
+
cause?: unknown;
|
|
556
|
+
} | {
|
|
489
557
|
expired: boolean;
|
|
490
558
|
verified: boolean;
|
|
491
559
|
}>;
|
|
@@ -505,11 +573,11 @@ declare const telegramPlugin: () => {
|
|
|
505
573
|
};
|
|
506
574
|
user: Record<string, any> & {
|
|
507
575
|
id: string;
|
|
508
|
-
name: string;
|
|
509
|
-
email: string;
|
|
510
|
-
emailVerified: boolean;
|
|
511
576
|
createdAt: Date;
|
|
512
577
|
updatedAt: Date;
|
|
578
|
+
email: string;
|
|
579
|
+
emailVerified: boolean;
|
|
580
|
+
name: string;
|
|
513
581
|
image?: string | null | undefined;
|
|
514
582
|
};
|
|
515
583
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polinetwork/backend",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2",
|
|
4
4
|
"description": "Utils to interact with the backend.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"copyfiles": "^2.4.1",
|
|
32
32
|
"rimraf": "^6.0.1",
|
|
33
|
-
"tsup": "^8.
|
|
34
|
-
"typescript": "^
|
|
33
|
+
"tsup": "^8.5.0",
|
|
34
|
+
"typescript": "^5.9.2"
|
|
35
35
|
},
|
|
36
36
|
"engines": {
|
|
37
|
-
"
|
|
38
|
-
"node": ">=
|
|
37
|
+
"pnpm": ">=10.17.1",
|
|
38
|
+
"node": ">=24.8.0"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "rimraf ./dist && cd ../backend && pnpm install && pnpm run build:npm && cd ../package && copyfiles -u 3 ../backend/lib/* dist"
|