@polinetwork/backend 0.5.4 → 0.6.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.cjs.map +1 -1
- package/dist/index.d.cts +58 -6
- package/dist/index.d.ts +58 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/constants.ts"],"sourcesContent":["export { TRPC_PATH, AUTH_PATH } from \"./constants\"\nexport { type AppRouter } from \"./routers\"\nimport type { telegramPlugin } from \"./auth/plugins/telegram\"\n\nexport type TelegramPlugin = typeof telegramPlugin\n","export const TRPC_PATH = \"/api/trpc\";\nexport const AUTH_PATH = \"/api/auth\";\n\nexport const TRUSTED_ORIGINS = [\n \"http://localhost:3001\",\n \"http://localhost:3002\",\n \"http://localhost:3003\",\n \"http://localhost:5173\",\n \"http://localhost:5174\",\n \"http://localhost:5175\",\n]\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,YAAY;AAClB,IAAM,YAAY;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/constants.ts"],"sourcesContent":["export { TRPC_PATH, AUTH_PATH } from \"./constants\"\nexport { type AppRouter } from \"./routers\"\nimport type { telegramPlugin } from \"./auth/plugins/telegram\"\n\nexport type TelegramPlugin = typeof telegramPlugin\n","export const TRPC_PATH = \"/api/trpc\";\nexport const AUTH_PATH = \"/api/auth\";\n\nexport const TRUSTED_ORIGINS = [\n \"http://localhost:3001\",\n \"http://localhost:3002\",\n \"http://localhost:3003\",\n \"http://localhost:5173\",\n \"http://localhost:5174\",\n \"http://localhost:5175\",\n]\n\nexport const MESSAGES_RETENTION_DAYS = 7\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,YAAY;AAClB,IAAM,YAAY;","names":[]}
|
package/dist/index.d.cts
CHANGED
|
@@ -28,7 +28,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
28
28
|
message: string;
|
|
29
29
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
30
30
|
};
|
|
31
|
-
transformer:
|
|
31
|
+
transformer: true;
|
|
32
32
|
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
33
33
|
test: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
34
34
|
ctx: {
|
|
@@ -46,7 +46,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
46
46
|
message: string;
|
|
47
47
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
48
48
|
};
|
|
49
|
-
transformer:
|
|
49
|
+
transformer: true;
|
|
50
50
|
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
51
51
|
dbQuery: _trpc_server.TRPCQueryProcedure<{
|
|
52
52
|
input: {
|
|
@@ -78,7 +78,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
78
78
|
message: string;
|
|
79
79
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
80
80
|
};
|
|
81
|
-
transformer:
|
|
81
|
+
transformer: true;
|
|
82
82
|
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
83
83
|
groups: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
84
84
|
ctx: {
|
|
@@ -96,7 +96,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
96
96
|
message: string;
|
|
97
97
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
98
98
|
};
|
|
99
|
-
transformer:
|
|
99
|
+
transformer: true;
|
|
100
100
|
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
101
101
|
getAll: _trpc_server.TRPCQueryProcedure<{
|
|
102
102
|
input: void;
|
|
@@ -160,7 +160,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
160
160
|
message: string;
|
|
161
161
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
162
162
|
};
|
|
163
|
-
transformer:
|
|
163
|
+
transformer: true;
|
|
164
164
|
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
165
165
|
getRole: _trpc_server.TRPCQueryProcedure<{
|
|
166
166
|
input: {
|
|
@@ -211,7 +211,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
211
211
|
message: string;
|
|
212
212
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
213
213
|
};
|
|
214
|
-
transformer:
|
|
214
|
+
transformer: true;
|
|
215
215
|
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
216
216
|
link: _trpc_server.TRPCQueryProcedure<{
|
|
217
217
|
input: {
|
|
@@ -228,6 +228,58 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
228
228
|
};
|
|
229
229
|
}>;
|
|
230
230
|
}>>;
|
|
231
|
+
messages: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
232
|
+
ctx: {
|
|
233
|
+
userId?: string;
|
|
234
|
+
};
|
|
235
|
+
meta: object;
|
|
236
|
+
errorShape: {
|
|
237
|
+
data: {
|
|
238
|
+
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
239
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
240
|
+
httpStatus: number;
|
|
241
|
+
path?: string;
|
|
242
|
+
stack?: string;
|
|
243
|
+
};
|
|
244
|
+
message: string;
|
|
245
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
246
|
+
};
|
|
247
|
+
transformer: true;
|
|
248
|
+
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
249
|
+
get: _trpc_server.TRPCQueryProcedure<{
|
|
250
|
+
input: {
|
|
251
|
+
chatId: number;
|
|
252
|
+
messageId: number;
|
|
253
|
+
};
|
|
254
|
+
output: {
|
|
255
|
+
error: null;
|
|
256
|
+
message: {
|
|
257
|
+
chatId: number;
|
|
258
|
+
messageId: number;
|
|
259
|
+
authorId: number;
|
|
260
|
+
timestamp: Date;
|
|
261
|
+
message: string;
|
|
262
|
+
};
|
|
263
|
+
} | {
|
|
264
|
+
error: "NOT_FOUND" | "DECRYPT_ERROR";
|
|
265
|
+
message: null;
|
|
266
|
+
};
|
|
267
|
+
}>;
|
|
268
|
+
add: _trpc_server.TRPCMutationProcedure<{
|
|
269
|
+
input: {
|
|
270
|
+
messages: {
|
|
271
|
+
chatId: number;
|
|
272
|
+
messageId: number;
|
|
273
|
+
authorId: number;
|
|
274
|
+
timestamp: Date;
|
|
275
|
+
message: string;
|
|
276
|
+
}[];
|
|
277
|
+
};
|
|
278
|
+
output: {
|
|
279
|
+
error: "ENCRYPT_ERROR" | null;
|
|
280
|
+
};
|
|
281
|
+
}>;
|
|
282
|
+
}>>;
|
|
231
283
|
}>>;
|
|
232
284
|
}>>;
|
|
233
285
|
type AppRouter = typeof appRouter;
|
package/dist/index.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
28
28
|
message: string;
|
|
29
29
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
30
30
|
};
|
|
31
|
-
transformer:
|
|
31
|
+
transformer: true;
|
|
32
32
|
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
33
33
|
test: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
34
34
|
ctx: {
|
|
@@ -46,7 +46,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
46
46
|
message: string;
|
|
47
47
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
48
48
|
};
|
|
49
|
-
transformer:
|
|
49
|
+
transformer: true;
|
|
50
50
|
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
51
51
|
dbQuery: _trpc_server.TRPCQueryProcedure<{
|
|
52
52
|
input: {
|
|
@@ -78,7 +78,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
78
78
|
message: string;
|
|
79
79
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
80
80
|
};
|
|
81
|
-
transformer:
|
|
81
|
+
transformer: true;
|
|
82
82
|
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
83
83
|
groups: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
84
84
|
ctx: {
|
|
@@ -96,7 +96,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
96
96
|
message: string;
|
|
97
97
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
98
98
|
};
|
|
99
|
-
transformer:
|
|
99
|
+
transformer: true;
|
|
100
100
|
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
101
101
|
getAll: _trpc_server.TRPCQueryProcedure<{
|
|
102
102
|
input: void;
|
|
@@ -160,7 +160,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
160
160
|
message: string;
|
|
161
161
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
162
162
|
};
|
|
163
|
-
transformer:
|
|
163
|
+
transformer: true;
|
|
164
164
|
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
165
165
|
getRole: _trpc_server.TRPCQueryProcedure<{
|
|
166
166
|
input: {
|
|
@@ -211,7 +211,7 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
211
211
|
message: string;
|
|
212
212
|
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
213
213
|
};
|
|
214
|
-
transformer:
|
|
214
|
+
transformer: true;
|
|
215
215
|
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
216
216
|
link: _trpc_server.TRPCQueryProcedure<{
|
|
217
217
|
input: {
|
|
@@ -228,6 +228,58 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
|
228
228
|
};
|
|
229
229
|
}>;
|
|
230
230
|
}>>;
|
|
231
|
+
messages: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
232
|
+
ctx: {
|
|
233
|
+
userId?: string;
|
|
234
|
+
};
|
|
235
|
+
meta: object;
|
|
236
|
+
errorShape: {
|
|
237
|
+
data: {
|
|
238
|
+
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
239
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_KEY;
|
|
240
|
+
httpStatus: number;
|
|
241
|
+
path?: string;
|
|
242
|
+
stack?: string;
|
|
243
|
+
};
|
|
244
|
+
message: string;
|
|
245
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
246
|
+
};
|
|
247
|
+
transformer: true;
|
|
248
|
+
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<{
|
|
249
|
+
get: _trpc_server.TRPCQueryProcedure<{
|
|
250
|
+
input: {
|
|
251
|
+
chatId: number;
|
|
252
|
+
messageId: number;
|
|
253
|
+
};
|
|
254
|
+
output: {
|
|
255
|
+
error: null;
|
|
256
|
+
message: {
|
|
257
|
+
chatId: number;
|
|
258
|
+
messageId: number;
|
|
259
|
+
authorId: number;
|
|
260
|
+
timestamp: Date;
|
|
261
|
+
message: string;
|
|
262
|
+
};
|
|
263
|
+
} | {
|
|
264
|
+
error: "NOT_FOUND" | "DECRYPT_ERROR";
|
|
265
|
+
message: null;
|
|
266
|
+
};
|
|
267
|
+
}>;
|
|
268
|
+
add: _trpc_server.TRPCMutationProcedure<{
|
|
269
|
+
input: {
|
|
270
|
+
messages: {
|
|
271
|
+
chatId: number;
|
|
272
|
+
messageId: number;
|
|
273
|
+
authorId: number;
|
|
274
|
+
timestamp: Date;
|
|
275
|
+
message: string;
|
|
276
|
+
}[];
|
|
277
|
+
};
|
|
278
|
+
output: {
|
|
279
|
+
error: "ENCRYPT_ERROR" | null;
|
|
280
|
+
};
|
|
281
|
+
}>;
|
|
282
|
+
}>>;
|
|
231
283
|
}>>;
|
|
232
284
|
}>>;
|
|
233
285
|
type AppRouter = typeof appRouter;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/constants.ts"],"sourcesContent":["export const TRPC_PATH = \"/api/trpc\";\nexport const AUTH_PATH = \"/api/auth\";\n\nexport const TRUSTED_ORIGINS = [\n \"http://localhost:3001\",\n \"http://localhost:3002\",\n \"http://localhost:3003\",\n \"http://localhost:5173\",\n \"http://localhost:5174\",\n \"http://localhost:5175\",\n]\n"],"mappings":";AAAO,IAAM,YAAY;AAClB,IAAM,YAAY;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/constants.ts"],"sourcesContent":["export const TRPC_PATH = \"/api/trpc\";\nexport const AUTH_PATH = \"/api/auth\";\n\nexport const TRUSTED_ORIGINS = [\n \"http://localhost:3001\",\n \"http://localhost:3002\",\n \"http://localhost:3003\",\n \"http://localhost:5173\",\n \"http://localhost:5174\",\n \"http://localhost:5175\",\n]\n\nexport const MESSAGES_RETENTION_DAYS = 7\n"],"mappings":";AAAO,IAAM,YAAY;AAClB,IAAM,YAAY;","names":[]}
|