@polinetwork/backend 0.2.0 → 0.2.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 +67 -248
- package/dist/index.d.ts +67 -248
- package/package.json +5 -5
- package/dist/index.global.js +0 -6
- package/dist/index.global.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _trpc_server from '@trpc/server';
|
|
2
|
-
import * as
|
|
2
|
+
import * as _trpc_server_unstable_core_do_not_import from '@trpc/server/unstable-core-do-not-import';
|
|
3
3
|
import * as zod from 'zod';
|
|
4
4
|
import * as fastify_types_type_provider from 'fastify/types/type-provider';
|
|
5
5
|
import * as http from 'http';
|
|
@@ -12,7 +12,7 @@ declare const TRPC_PATH = "/api/trpc";
|
|
|
12
12
|
*
|
|
13
13
|
* All routers added in /api/routers should be manually added here.
|
|
14
14
|
*/
|
|
15
|
-
declare const appRouter:
|
|
15
|
+
declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
16
16
|
ctx: {
|
|
17
17
|
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
18
18
|
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
@@ -22,17 +22,17 @@ declare const appRouter: _trpc_server.CreateRouterInner<_trpc_server.RootConfig<
|
|
|
22
22
|
errorShape: {
|
|
23
23
|
data: {
|
|
24
24
|
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
25
|
-
code:
|
|
25
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
26
26
|
httpStatus: number;
|
|
27
27
|
path?: string;
|
|
28
28
|
stack?: string;
|
|
29
29
|
};
|
|
30
30
|
message: string;
|
|
31
|
-
code:
|
|
31
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
32
32
|
};
|
|
33
|
-
transformer:
|
|
34
|
-
}
|
|
35
|
-
test:
|
|
33
|
+
transformer: false;
|
|
34
|
+
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
35
|
+
test: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
36
36
|
ctx: {
|
|
37
37
|
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
38
38
|
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
@@ -42,92 +42,31 @@ declare const appRouter: _trpc_server.CreateRouterInner<_trpc_server.RootConfig<
|
|
|
42
42
|
errorShape: {
|
|
43
43
|
data: {
|
|
44
44
|
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
45
|
-
code:
|
|
45
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
46
46
|
httpStatus: number;
|
|
47
47
|
path?: string;
|
|
48
48
|
stack?: string;
|
|
49
49
|
};
|
|
50
50
|
message: string;
|
|
51
|
-
code:
|
|
51
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
52
52
|
};
|
|
53
|
-
transformer:
|
|
54
|
-
}
|
|
55
|
-
dbQuery: _trpc_server.
|
|
56
|
-
|
|
57
|
-
ctx: {
|
|
58
|
-
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
59
|
-
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
60
|
-
userId: string;
|
|
61
|
-
};
|
|
62
|
-
meta: object;
|
|
63
|
-
errorShape: {
|
|
64
|
-
data: {
|
|
65
|
-
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
66
|
-
code: _trpc_server_rpc.TRPC_ERROR_CODE_KEY;
|
|
67
|
-
httpStatus: number;
|
|
68
|
-
path?: string;
|
|
69
|
-
stack?: string;
|
|
70
|
-
};
|
|
71
|
-
message: string;
|
|
72
|
-
code: _trpc_server_rpc.TRPC_ERROR_CODE_NUMBER;
|
|
73
|
-
};
|
|
74
|
-
transformer: _trpc_server.DefaultDataTransformer;
|
|
75
|
-
}>;
|
|
76
|
-
_meta: object;
|
|
77
|
-
_ctx_out: {
|
|
78
|
-
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
79
|
-
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
80
|
-
userId: string;
|
|
81
|
-
};
|
|
82
|
-
_input_in: {
|
|
83
|
-
dbName: "web" | "tg";
|
|
84
|
-
};
|
|
85
|
-
_input_out: {
|
|
86
|
-
dbName: "web" | "tg";
|
|
87
|
-
};
|
|
88
|
-
_output_in: typeof _trpc_server.unsetMarker;
|
|
89
|
-
_output_out: typeof _trpc_server.unsetMarker;
|
|
90
|
-
}, string[]>;
|
|
91
|
-
dbInsert: _trpc_server.BuildProcedure<"mutation", {
|
|
92
|
-
_config: _trpc_server.RootConfig<{
|
|
93
|
-
ctx: {
|
|
94
|
-
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
95
|
-
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
96
|
-
userId: string;
|
|
97
|
-
};
|
|
98
|
-
meta: object;
|
|
99
|
-
errorShape: {
|
|
100
|
-
data: {
|
|
101
|
-
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
102
|
-
code: _trpc_server_rpc.TRPC_ERROR_CODE_KEY;
|
|
103
|
-
httpStatus: number;
|
|
104
|
-
path?: string;
|
|
105
|
-
stack?: string;
|
|
106
|
-
};
|
|
107
|
-
message: string;
|
|
108
|
-
code: _trpc_server_rpc.TRPC_ERROR_CODE_NUMBER;
|
|
109
|
-
};
|
|
110
|
-
transformer: _trpc_server.DefaultDataTransformer;
|
|
111
|
-
}>;
|
|
112
|
-
_meta: object;
|
|
113
|
-
_ctx_out: {
|
|
114
|
-
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
115
|
-
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
116
|
-
userId: string;
|
|
117
|
-
};
|
|
118
|
-
_input_in: {
|
|
119
|
-
text: string;
|
|
53
|
+
transformer: false;
|
|
54
|
+
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
55
|
+
dbQuery: _trpc_server.TRPCQueryProcedure<{
|
|
56
|
+
input: {
|
|
120
57
|
dbName: "web" | "tg";
|
|
121
58
|
};
|
|
122
|
-
|
|
59
|
+
output: string[];
|
|
60
|
+
}>;
|
|
61
|
+
dbInsert: _trpc_server.TRPCMutationProcedure<{
|
|
62
|
+
input: {
|
|
123
63
|
text: string;
|
|
124
64
|
dbName: "web" | "tg";
|
|
125
65
|
};
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
tg: _trpc_server.CreateRouterInner<_trpc_server.RootConfig<{
|
|
66
|
+
output: boolean;
|
|
67
|
+
}>;
|
|
68
|
+
}>>;
|
|
69
|
+
tg: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
131
70
|
ctx: {
|
|
132
71
|
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
133
72
|
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
@@ -137,17 +76,17 @@ declare const appRouter: _trpc_server.CreateRouterInner<_trpc_server.RootConfig<
|
|
|
137
76
|
errorShape: {
|
|
138
77
|
data: {
|
|
139
78
|
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
140
|
-
code:
|
|
79
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
141
80
|
httpStatus: number;
|
|
142
81
|
path?: string;
|
|
143
82
|
stack?: string;
|
|
144
83
|
};
|
|
145
84
|
message: string;
|
|
146
|
-
code:
|
|
85
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
147
86
|
};
|
|
148
|
-
transformer:
|
|
149
|
-
}
|
|
150
|
-
groups:
|
|
87
|
+
transformer: false;
|
|
88
|
+
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
89
|
+
groups: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
151
90
|
ctx: {
|
|
152
91
|
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
153
92
|
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
@@ -157,184 +96,64 @@ declare const appRouter: _trpc_server.CreateRouterInner<_trpc_server.RootConfig<
|
|
|
157
96
|
errorShape: {
|
|
158
97
|
data: {
|
|
159
98
|
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
160
|
-
code:
|
|
99
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
161
100
|
httpStatus: number;
|
|
162
101
|
path?: string;
|
|
163
102
|
stack?: string;
|
|
164
103
|
};
|
|
165
104
|
message: string;
|
|
166
|
-
code:
|
|
105
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
167
106
|
};
|
|
168
|
-
transformer:
|
|
169
|
-
}
|
|
170
|
-
getAll: _trpc_server.
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
path?: string;
|
|
184
|
-
stack?: string;
|
|
185
|
-
};
|
|
186
|
-
message: string;
|
|
187
|
-
code: _trpc_server_rpc.TRPC_ERROR_CODE_NUMBER;
|
|
188
|
-
};
|
|
189
|
-
transformer: _trpc_server.DefaultDataTransformer;
|
|
190
|
-
}>;
|
|
191
|
-
_meta: object;
|
|
192
|
-
_ctx_out: {
|
|
193
|
-
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
194
|
-
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
195
|
-
userId: string;
|
|
196
|
-
};
|
|
197
|
-
_input_in: typeof _trpc_server.unsetMarker;
|
|
198
|
-
_input_out: typeof _trpc_server.unsetMarker;
|
|
199
|
-
_output_in: typeof _trpc_server.unsetMarker;
|
|
200
|
-
_output_out: typeof _trpc_server.unsetMarker;
|
|
201
|
-
}, {
|
|
202
|
-
updatedAt: Date | null;
|
|
203
|
-
createdAt: Date;
|
|
204
|
-
id: number;
|
|
205
|
-
telegramId: number;
|
|
206
|
-
title: string;
|
|
207
|
-
link: string | null;
|
|
208
|
-
}[]>;
|
|
209
|
-
search: _trpc_server.BuildProcedure<"query", {
|
|
210
|
-
_config: _trpc_server.RootConfig<{
|
|
211
|
-
ctx: {
|
|
212
|
-
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
213
|
-
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
214
|
-
userId: string;
|
|
215
|
-
};
|
|
216
|
-
meta: object;
|
|
217
|
-
errorShape: {
|
|
218
|
-
data: {
|
|
219
|
-
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
220
|
-
code: _trpc_server_rpc.TRPC_ERROR_CODE_KEY;
|
|
221
|
-
httpStatus: number;
|
|
222
|
-
path?: string;
|
|
223
|
-
stack?: string;
|
|
224
|
-
};
|
|
225
|
-
message: string;
|
|
226
|
-
code: _trpc_server_rpc.TRPC_ERROR_CODE_NUMBER;
|
|
227
|
-
};
|
|
228
|
-
transformer: _trpc_server.DefaultDataTransformer;
|
|
229
|
-
}>;
|
|
230
|
-
_meta: object;
|
|
231
|
-
_ctx_out: {
|
|
232
|
-
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
233
|
-
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
234
|
-
userId: string;
|
|
235
|
-
};
|
|
236
|
-
_input_in: {
|
|
237
|
-
query: string;
|
|
238
|
-
};
|
|
239
|
-
_input_out: {
|
|
107
|
+
transformer: false;
|
|
108
|
+
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
109
|
+
getAll: _trpc_server.TRPCQueryProcedure<{
|
|
110
|
+
input: void;
|
|
111
|
+
output: {
|
|
112
|
+
updatedAt: Date | null;
|
|
113
|
+
createdAt: Date;
|
|
114
|
+
id: number;
|
|
115
|
+
telegramId: number;
|
|
116
|
+
title: string;
|
|
117
|
+
link: string | null;
|
|
118
|
+
}[];
|
|
119
|
+
}>;
|
|
120
|
+
search: _trpc_server.TRPCQueryProcedure<{
|
|
121
|
+
input: {
|
|
240
122
|
query: string;
|
|
241
123
|
};
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
link: string | null;
|
|
246
|
-
id: number;
|
|
247
|
-
telegramId: number;
|
|
248
|
-
title: string;
|
|
249
|
-
updatedAt: Date | null;
|
|
250
|
-
createdAt: Date;
|
|
251
|
-
}[]>;
|
|
252
|
-
getById: _trpc_server.BuildProcedure<"query", {
|
|
253
|
-
_config: _trpc_server.RootConfig<{
|
|
254
|
-
ctx: {
|
|
255
|
-
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
256
|
-
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
257
|
-
userId: string;
|
|
258
|
-
};
|
|
259
|
-
meta: object;
|
|
260
|
-
errorShape: {
|
|
261
|
-
data: {
|
|
262
|
-
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
263
|
-
code: _trpc_server_rpc.TRPC_ERROR_CODE_KEY;
|
|
264
|
-
httpStatus: number;
|
|
265
|
-
path?: string;
|
|
266
|
-
stack?: string;
|
|
267
|
-
};
|
|
268
|
-
message: string;
|
|
269
|
-
code: _trpc_server_rpc.TRPC_ERROR_CODE_NUMBER;
|
|
270
|
-
};
|
|
271
|
-
transformer: _trpc_server.DefaultDataTransformer;
|
|
272
|
-
}>;
|
|
273
|
-
_meta: object;
|
|
274
|
-
_ctx_out: {
|
|
275
|
-
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
276
|
-
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
277
|
-
userId: string;
|
|
278
|
-
};
|
|
279
|
-
_input_in: {
|
|
124
|
+
output: {
|
|
125
|
+
link: string | null;
|
|
126
|
+
id: number;
|
|
280
127
|
telegramId: number;
|
|
281
|
-
|
|
282
|
-
|
|
128
|
+
title: string;
|
|
129
|
+
updatedAt: Date | null;
|
|
130
|
+
createdAt: Date;
|
|
131
|
+
}[];
|
|
132
|
+
}>;
|
|
133
|
+
getById: _trpc_server.TRPCQueryProcedure<{
|
|
134
|
+
input: {
|
|
283
135
|
telegramId: number;
|
|
284
136
|
};
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
link: string | null;
|
|
289
|
-
id: number;
|
|
290
|
-
telegramId: number;
|
|
291
|
-
title: string;
|
|
292
|
-
updatedAt: Date | null;
|
|
293
|
-
createdAt: Date;
|
|
294
|
-
} | undefined>;
|
|
295
|
-
create: _trpc_server.BuildProcedure<"mutation", {
|
|
296
|
-
_config: _trpc_server.RootConfig<{
|
|
297
|
-
ctx: {
|
|
298
|
-
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
299
|
-
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
300
|
-
userId: string;
|
|
301
|
-
};
|
|
302
|
-
meta: object;
|
|
303
|
-
errorShape: {
|
|
304
|
-
data: {
|
|
305
|
-
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
306
|
-
code: _trpc_server_rpc.TRPC_ERROR_CODE_KEY;
|
|
307
|
-
httpStatus: number;
|
|
308
|
-
path?: string;
|
|
309
|
-
stack?: string;
|
|
310
|
-
};
|
|
311
|
-
message: string;
|
|
312
|
-
code: _trpc_server_rpc.TRPC_ERROR_CODE_NUMBER;
|
|
313
|
-
};
|
|
314
|
-
transformer: _trpc_server.DefaultDataTransformer;
|
|
315
|
-
}>;
|
|
316
|
-
_meta: object;
|
|
317
|
-
_ctx_out: {
|
|
318
|
-
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
319
|
-
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
320
|
-
userId: string;
|
|
321
|
-
};
|
|
322
|
-
_input_in: {
|
|
323
|
-
link: string;
|
|
137
|
+
output: {
|
|
138
|
+
link: string | null;
|
|
139
|
+
id: number;
|
|
324
140
|
telegramId: number;
|
|
325
141
|
title: string;
|
|
326
|
-
|
|
327
|
-
|
|
142
|
+
updatedAt: Date | null;
|
|
143
|
+
createdAt: Date;
|
|
144
|
+
} | undefined;
|
|
145
|
+
}>;
|
|
146
|
+
create: _trpc_server.TRPCMutationProcedure<{
|
|
147
|
+
input: {
|
|
328
148
|
link: string;
|
|
329
149
|
telegramId: number;
|
|
330
150
|
title: string;
|
|
331
151
|
}[];
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
}>;
|
|
152
|
+
output: number[];
|
|
153
|
+
}>;
|
|
154
|
+
}>>;
|
|
155
|
+
}>>;
|
|
156
|
+
}>>;
|
|
338
157
|
type AppRouter = typeof appRouter;
|
|
339
158
|
|
|
340
159
|
export { type AppRouter, TRPC_PATH };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _trpc_server from '@trpc/server';
|
|
2
|
-
import * as
|
|
2
|
+
import * as _trpc_server_unstable_core_do_not_import from '@trpc/server/unstable-core-do-not-import';
|
|
3
3
|
import * as zod from 'zod';
|
|
4
4
|
import * as fastify_types_type_provider from 'fastify/types/type-provider';
|
|
5
5
|
import * as http from 'http';
|
|
@@ -12,7 +12,7 @@ declare const TRPC_PATH = "/api/trpc";
|
|
|
12
12
|
*
|
|
13
13
|
* All routers added in /api/routers should be manually added here.
|
|
14
14
|
*/
|
|
15
|
-
declare const appRouter:
|
|
15
|
+
declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
16
16
|
ctx: {
|
|
17
17
|
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
18
18
|
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
@@ -22,17 +22,17 @@ declare const appRouter: _trpc_server.CreateRouterInner<_trpc_server.RootConfig<
|
|
|
22
22
|
errorShape: {
|
|
23
23
|
data: {
|
|
24
24
|
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
25
|
-
code:
|
|
25
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
26
26
|
httpStatus: number;
|
|
27
27
|
path?: string;
|
|
28
28
|
stack?: string;
|
|
29
29
|
};
|
|
30
30
|
message: string;
|
|
31
|
-
code:
|
|
31
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
32
32
|
};
|
|
33
|
-
transformer:
|
|
34
|
-
}
|
|
35
|
-
test:
|
|
33
|
+
transformer: false;
|
|
34
|
+
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
35
|
+
test: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
36
36
|
ctx: {
|
|
37
37
|
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
38
38
|
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
@@ -42,92 +42,31 @@ declare const appRouter: _trpc_server.CreateRouterInner<_trpc_server.RootConfig<
|
|
|
42
42
|
errorShape: {
|
|
43
43
|
data: {
|
|
44
44
|
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
45
|
-
code:
|
|
45
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
46
46
|
httpStatus: number;
|
|
47
47
|
path?: string;
|
|
48
48
|
stack?: string;
|
|
49
49
|
};
|
|
50
50
|
message: string;
|
|
51
|
-
code:
|
|
51
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
52
52
|
};
|
|
53
|
-
transformer:
|
|
54
|
-
}
|
|
55
|
-
dbQuery: _trpc_server.
|
|
56
|
-
|
|
57
|
-
ctx: {
|
|
58
|
-
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
59
|
-
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
60
|
-
userId: string;
|
|
61
|
-
};
|
|
62
|
-
meta: object;
|
|
63
|
-
errorShape: {
|
|
64
|
-
data: {
|
|
65
|
-
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
66
|
-
code: _trpc_server_rpc.TRPC_ERROR_CODE_KEY;
|
|
67
|
-
httpStatus: number;
|
|
68
|
-
path?: string;
|
|
69
|
-
stack?: string;
|
|
70
|
-
};
|
|
71
|
-
message: string;
|
|
72
|
-
code: _trpc_server_rpc.TRPC_ERROR_CODE_NUMBER;
|
|
73
|
-
};
|
|
74
|
-
transformer: _trpc_server.DefaultDataTransformer;
|
|
75
|
-
}>;
|
|
76
|
-
_meta: object;
|
|
77
|
-
_ctx_out: {
|
|
78
|
-
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
79
|
-
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
80
|
-
userId: string;
|
|
81
|
-
};
|
|
82
|
-
_input_in: {
|
|
83
|
-
dbName: "web" | "tg";
|
|
84
|
-
};
|
|
85
|
-
_input_out: {
|
|
86
|
-
dbName: "web" | "tg";
|
|
87
|
-
};
|
|
88
|
-
_output_in: typeof _trpc_server.unsetMarker;
|
|
89
|
-
_output_out: typeof _trpc_server.unsetMarker;
|
|
90
|
-
}, string[]>;
|
|
91
|
-
dbInsert: _trpc_server.BuildProcedure<"mutation", {
|
|
92
|
-
_config: _trpc_server.RootConfig<{
|
|
93
|
-
ctx: {
|
|
94
|
-
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
95
|
-
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
96
|
-
userId: string;
|
|
97
|
-
};
|
|
98
|
-
meta: object;
|
|
99
|
-
errorShape: {
|
|
100
|
-
data: {
|
|
101
|
-
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
102
|
-
code: _trpc_server_rpc.TRPC_ERROR_CODE_KEY;
|
|
103
|
-
httpStatus: number;
|
|
104
|
-
path?: string;
|
|
105
|
-
stack?: string;
|
|
106
|
-
};
|
|
107
|
-
message: string;
|
|
108
|
-
code: _trpc_server_rpc.TRPC_ERROR_CODE_NUMBER;
|
|
109
|
-
};
|
|
110
|
-
transformer: _trpc_server.DefaultDataTransformer;
|
|
111
|
-
}>;
|
|
112
|
-
_meta: object;
|
|
113
|
-
_ctx_out: {
|
|
114
|
-
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
115
|
-
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
116
|
-
userId: string;
|
|
117
|
-
};
|
|
118
|
-
_input_in: {
|
|
119
|
-
text: string;
|
|
53
|
+
transformer: false;
|
|
54
|
+
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
55
|
+
dbQuery: _trpc_server.TRPCQueryProcedure<{
|
|
56
|
+
input: {
|
|
120
57
|
dbName: "web" | "tg";
|
|
121
58
|
};
|
|
122
|
-
|
|
59
|
+
output: string[];
|
|
60
|
+
}>;
|
|
61
|
+
dbInsert: _trpc_server.TRPCMutationProcedure<{
|
|
62
|
+
input: {
|
|
123
63
|
text: string;
|
|
124
64
|
dbName: "web" | "tg";
|
|
125
65
|
};
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
tg: _trpc_server.CreateRouterInner<_trpc_server.RootConfig<{
|
|
66
|
+
output: boolean;
|
|
67
|
+
}>;
|
|
68
|
+
}>>;
|
|
69
|
+
tg: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
131
70
|
ctx: {
|
|
132
71
|
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
133
72
|
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
@@ -137,17 +76,17 @@ declare const appRouter: _trpc_server.CreateRouterInner<_trpc_server.RootConfig<
|
|
|
137
76
|
errorShape: {
|
|
138
77
|
data: {
|
|
139
78
|
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
140
|
-
code:
|
|
79
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
141
80
|
httpStatus: number;
|
|
142
81
|
path?: string;
|
|
143
82
|
stack?: string;
|
|
144
83
|
};
|
|
145
84
|
message: string;
|
|
146
|
-
code:
|
|
85
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
147
86
|
};
|
|
148
|
-
transformer:
|
|
149
|
-
}
|
|
150
|
-
groups:
|
|
87
|
+
transformer: false;
|
|
88
|
+
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
89
|
+
groups: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
151
90
|
ctx: {
|
|
152
91
|
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
153
92
|
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
@@ -157,184 +96,64 @@ declare const appRouter: _trpc_server.CreateRouterInner<_trpc_server.RootConfig<
|
|
|
157
96
|
errorShape: {
|
|
158
97
|
data: {
|
|
159
98
|
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
160
|
-
code:
|
|
99
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
161
100
|
httpStatus: number;
|
|
162
101
|
path?: string;
|
|
163
102
|
stack?: string;
|
|
164
103
|
};
|
|
165
104
|
message: string;
|
|
166
|
-
code:
|
|
105
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
167
106
|
};
|
|
168
|
-
transformer:
|
|
169
|
-
}
|
|
170
|
-
getAll: _trpc_server.
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
path?: string;
|
|
184
|
-
stack?: string;
|
|
185
|
-
};
|
|
186
|
-
message: string;
|
|
187
|
-
code: _trpc_server_rpc.TRPC_ERROR_CODE_NUMBER;
|
|
188
|
-
};
|
|
189
|
-
transformer: _trpc_server.DefaultDataTransformer;
|
|
190
|
-
}>;
|
|
191
|
-
_meta: object;
|
|
192
|
-
_ctx_out: {
|
|
193
|
-
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
194
|
-
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
195
|
-
userId: string;
|
|
196
|
-
};
|
|
197
|
-
_input_in: typeof _trpc_server.unsetMarker;
|
|
198
|
-
_input_out: typeof _trpc_server.unsetMarker;
|
|
199
|
-
_output_in: typeof _trpc_server.unsetMarker;
|
|
200
|
-
_output_out: typeof _trpc_server.unsetMarker;
|
|
201
|
-
}, {
|
|
202
|
-
updatedAt: Date | null;
|
|
203
|
-
createdAt: Date;
|
|
204
|
-
id: number;
|
|
205
|
-
telegramId: number;
|
|
206
|
-
title: string;
|
|
207
|
-
link: string | null;
|
|
208
|
-
}[]>;
|
|
209
|
-
search: _trpc_server.BuildProcedure<"query", {
|
|
210
|
-
_config: _trpc_server.RootConfig<{
|
|
211
|
-
ctx: {
|
|
212
|
-
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
213
|
-
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
214
|
-
userId: string;
|
|
215
|
-
};
|
|
216
|
-
meta: object;
|
|
217
|
-
errorShape: {
|
|
218
|
-
data: {
|
|
219
|
-
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
220
|
-
code: _trpc_server_rpc.TRPC_ERROR_CODE_KEY;
|
|
221
|
-
httpStatus: number;
|
|
222
|
-
path?: string;
|
|
223
|
-
stack?: string;
|
|
224
|
-
};
|
|
225
|
-
message: string;
|
|
226
|
-
code: _trpc_server_rpc.TRPC_ERROR_CODE_NUMBER;
|
|
227
|
-
};
|
|
228
|
-
transformer: _trpc_server.DefaultDataTransformer;
|
|
229
|
-
}>;
|
|
230
|
-
_meta: object;
|
|
231
|
-
_ctx_out: {
|
|
232
|
-
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
233
|
-
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
234
|
-
userId: string;
|
|
235
|
-
};
|
|
236
|
-
_input_in: {
|
|
237
|
-
query: string;
|
|
238
|
-
};
|
|
239
|
-
_input_out: {
|
|
107
|
+
transformer: false;
|
|
108
|
+
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
109
|
+
getAll: _trpc_server.TRPCQueryProcedure<{
|
|
110
|
+
input: void;
|
|
111
|
+
output: {
|
|
112
|
+
updatedAt: Date | null;
|
|
113
|
+
createdAt: Date;
|
|
114
|
+
id: number;
|
|
115
|
+
telegramId: number;
|
|
116
|
+
title: string;
|
|
117
|
+
link: string | null;
|
|
118
|
+
}[];
|
|
119
|
+
}>;
|
|
120
|
+
search: _trpc_server.TRPCQueryProcedure<{
|
|
121
|
+
input: {
|
|
240
122
|
query: string;
|
|
241
123
|
};
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
link: string | null;
|
|
246
|
-
id: number;
|
|
247
|
-
telegramId: number;
|
|
248
|
-
title: string;
|
|
249
|
-
updatedAt: Date | null;
|
|
250
|
-
createdAt: Date;
|
|
251
|
-
}[]>;
|
|
252
|
-
getById: _trpc_server.BuildProcedure<"query", {
|
|
253
|
-
_config: _trpc_server.RootConfig<{
|
|
254
|
-
ctx: {
|
|
255
|
-
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
256
|
-
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
257
|
-
userId: string;
|
|
258
|
-
};
|
|
259
|
-
meta: object;
|
|
260
|
-
errorShape: {
|
|
261
|
-
data: {
|
|
262
|
-
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
263
|
-
code: _trpc_server_rpc.TRPC_ERROR_CODE_KEY;
|
|
264
|
-
httpStatus: number;
|
|
265
|
-
path?: string;
|
|
266
|
-
stack?: string;
|
|
267
|
-
};
|
|
268
|
-
message: string;
|
|
269
|
-
code: _trpc_server_rpc.TRPC_ERROR_CODE_NUMBER;
|
|
270
|
-
};
|
|
271
|
-
transformer: _trpc_server.DefaultDataTransformer;
|
|
272
|
-
}>;
|
|
273
|
-
_meta: object;
|
|
274
|
-
_ctx_out: {
|
|
275
|
-
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
276
|
-
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
277
|
-
userId: string;
|
|
278
|
-
};
|
|
279
|
-
_input_in: {
|
|
124
|
+
output: {
|
|
125
|
+
link: string | null;
|
|
126
|
+
id: number;
|
|
280
127
|
telegramId: number;
|
|
281
|
-
|
|
282
|
-
|
|
128
|
+
title: string;
|
|
129
|
+
updatedAt: Date | null;
|
|
130
|
+
createdAt: Date;
|
|
131
|
+
}[];
|
|
132
|
+
}>;
|
|
133
|
+
getById: _trpc_server.TRPCQueryProcedure<{
|
|
134
|
+
input: {
|
|
283
135
|
telegramId: number;
|
|
284
136
|
};
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
link: string | null;
|
|
289
|
-
id: number;
|
|
290
|
-
telegramId: number;
|
|
291
|
-
title: string;
|
|
292
|
-
updatedAt: Date | null;
|
|
293
|
-
createdAt: Date;
|
|
294
|
-
} | undefined>;
|
|
295
|
-
create: _trpc_server.BuildProcedure<"mutation", {
|
|
296
|
-
_config: _trpc_server.RootConfig<{
|
|
297
|
-
ctx: {
|
|
298
|
-
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
299
|
-
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
300
|
-
userId: string;
|
|
301
|
-
};
|
|
302
|
-
meta: object;
|
|
303
|
-
errorShape: {
|
|
304
|
-
data: {
|
|
305
|
-
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
306
|
-
code: _trpc_server_rpc.TRPC_ERROR_CODE_KEY;
|
|
307
|
-
httpStatus: number;
|
|
308
|
-
path?: string;
|
|
309
|
-
stack?: string;
|
|
310
|
-
};
|
|
311
|
-
message: string;
|
|
312
|
-
code: _trpc_server_rpc.TRPC_ERROR_CODE_NUMBER;
|
|
313
|
-
};
|
|
314
|
-
transformer: _trpc_server.DefaultDataTransformer;
|
|
315
|
-
}>;
|
|
316
|
-
_meta: object;
|
|
317
|
-
_ctx_out: {
|
|
318
|
-
req: fastify.FastifyRequest<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown, fastify.FastifyBaseLogger, fastify_types_type_provider.ResolveFastifyRequestType<fastify.FastifyTypeProviderDefault, fastify.FastifySchema, fastify.RouteGenericInterface>>;
|
|
319
|
-
res: fastify.FastifyReply<fastify.RouteGenericInterface, fastify.RawServerDefault, http.IncomingMessage, http.ServerResponse<http.IncomingMessage>, unknown, fastify.FastifySchema, fastify.FastifyTypeProviderDefault, unknown>;
|
|
320
|
-
userId: string;
|
|
321
|
-
};
|
|
322
|
-
_input_in: {
|
|
323
|
-
link: string;
|
|
137
|
+
output: {
|
|
138
|
+
link: string | null;
|
|
139
|
+
id: number;
|
|
324
140
|
telegramId: number;
|
|
325
141
|
title: string;
|
|
326
|
-
|
|
327
|
-
|
|
142
|
+
updatedAt: Date | null;
|
|
143
|
+
createdAt: Date;
|
|
144
|
+
} | undefined;
|
|
145
|
+
}>;
|
|
146
|
+
create: _trpc_server.TRPCMutationProcedure<{
|
|
147
|
+
input: {
|
|
328
148
|
link: string;
|
|
329
149
|
telegramId: number;
|
|
330
150
|
title: string;
|
|
331
151
|
}[];
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
}>;
|
|
152
|
+
output: number[];
|
|
153
|
+
}>;
|
|
154
|
+
}>>;
|
|
155
|
+
}>>;
|
|
156
|
+
}>>;
|
|
338
157
|
type AppRouter = typeof appRouter;
|
|
339
158
|
|
|
340
159
|
export { type AppRouter, TRPC_PATH };
|
package/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polinetwork/backend",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Utils to interact with the backend.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "PoliNetwork APS",
|
|
7
7
|
"license": "ISC",
|
|
8
|
-
"types": "dist/index.d.ts",
|
|
9
8
|
"main": "dist/index.cjs",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
10
|
"module": "dist/index.js",
|
|
11
11
|
"files": [
|
|
12
12
|
"dist"
|
|
13
13
|
],
|
|
14
14
|
"exports": {
|
|
15
15
|
".": {
|
|
16
|
-
"types": "./dist/index.d.ts",
|
|
17
16
|
"require": "./dist/index.cjs",
|
|
18
|
-
"import": "./dist/index.js"
|
|
17
|
+
"import": "./dist/index.js",
|
|
18
|
+
"types": "./dist/index.d.ts"
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
@@ -25,6 +25,6 @@
|
|
|
25
25
|
"typescript": "^4.9.4"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
|
-
"build": "cd ../backend && pnpm install && pnpm run build:npm && cd ../package && copyfiles -u 3 ../backend/lib/* dist"
|
|
28
|
+
"build": "rimraf ./dist && cd ../backend && pnpm install && pnpm run build:npm && cd ../package && copyfiles -u 3 ../backend/lib/* dist"
|
|
29
29
|
}
|
|
30
30
|
}
|
package/dist/index.global.js
DELETED
package/dist/index.global.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/constants.ts"],"sourcesContent":["export const TRPC_PATH = \"/api/trpc\";\n"],"mappings":";;;AAAO,MAAM,YAAY;","names":[]}
|