kitcn 0.33.1 → 0.33.3
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/CHANGELOG.md +19 -0
- package/dist/aggregate/index.d.ts +1 -1
- package/dist/auth/client/index.js +1 -1
- package/dist/auth/generated/index.d.ts +1 -1
- package/dist/auth/index.d.ts +19 -19
- package/dist/auth/nextjs/index.d.ts +2 -2
- package/dist/auth/nextjs/index.js +2 -2
- package/dist/auth/start/server/index.d.ts +2 -2
- package/dist/auth/start/server/index.js +2 -2
- package/dist/{auth-store-BnsWs1xd.js → auth-store-x3_wvhTR.js} +17 -2
- package/dist/{caller-factory-C-N540BC.js → caller-factory-CEKbQdGY.js} +1 -1
- package/dist/cli.mjs +48 -7
- package/dist/crpc/index.d.ts +9 -5
- package/dist/crpc/index.js +1 -1
- package/dist/{error-Dyqhgbf6.js → error-CLgc9khF.js} +18 -3
- package/dist/{generated-contract-disabled-B_EaHGCP.d.ts → generated-contract-disabled-BPjuEPZD.d.ts} +43 -43
- package/dist/{http-types-8FBr10yl.d.ts → http-types-BhhPZtwa.d.ts} +79 -3
- package/dist/{middleware-D2hKJuSZ.d.ts → middleware-BBS7oLtT.d.ts} +1 -1
- package/dist/orm/index.d.ts +1 -1
- package/dist/orm/migrations/index.d.ts +1 -1
- package/dist/plugins/index.d.ts +1 -1
- package/dist/{procedure-name-kn-awLk1.d.ts → procedure-name-DRSOwAJY.d.ts} +139 -5
- package/dist/ratelimit/index.d.ts +2 -2
- package/dist/react/index.js +1 -1
- package/dist/rsc/index.d.ts +3 -4
- package/dist/rsc/index.js +1 -1
- package/dist/server/index.d.ts +4 -5
- package/dist/server/index.js +1 -1
- package/dist/solid/index.js +17 -2
- package/dist/{types-Cl0utsTL.d.ts → types-C7JkpfeY.d.ts} +1 -2
- package/dist/{where-clause-compiler-CoPVAVDO.d.ts → where-clause-compiler-jhCEPHxi.d.ts} +129 -129
- package/package.json +1 -1
- package/dist/caller-factory-C3pcbzo0.d.ts +0 -140
- package/dist/transformer-BEkxlnss.d.ts +0 -78
- /package/dist/{context-utils-ax351iFc.d.ts → context-utils-Cbv4r0AA.d.ts} +0 -0
- /package/dist/{token-CZpDQUHd.d.ts → token-tlbNKQS0.d.ts} +0 -0
- /package/dist/{types-CzGsrLrY.d.ts → types-Bkeicpo6.d.ts} +0 -0
package/dist/{generated-contract-disabled-B_EaHGCP.d.ts → generated-contract-disabled-BPjuEPZD.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as GetAuth } from "./types-ex0-J-SC.js";
|
|
2
|
-
import { t as GenericCtx } from "./context-utils-
|
|
2
|
+
import { t as GenericCtx } from "./context-utils-Cbv4r0AA.js";
|
|
3
3
|
import * as convex_server0 from "convex/server";
|
|
4
4
|
import { DocumentByName, FunctionReference, GenericDataModel, GenericMutationCtx, GenericSchema, PaginationResult, SchemaDefinition, TableNamesInDataModel, internalMutationGeneric } from "convex/server";
|
|
5
5
|
import * as better_auth_adapters0 from "better-auth/adapters";
|
|
@@ -199,20 +199,20 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
199
199
|
count: convex_server0.RegisteredQuery<"internal", {
|
|
200
200
|
where?: {
|
|
201
201
|
mode?: "sensitive" | "insensitive" | undefined;
|
|
202
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
203
202
|
connector?: "AND" | "OR" | undefined;
|
|
204
|
-
|
|
203
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
205
204
|
field: string;
|
|
205
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
206
206
|
}[] | undefined;
|
|
207
207
|
model: string;
|
|
208
208
|
}, Promise<number | null>>;
|
|
209
209
|
consumeOne: convex_server0.RegisteredMutation<"internal", {
|
|
210
210
|
input: {
|
|
211
211
|
where?: {
|
|
212
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
213
212
|
connector?: "AND" | "OR" | undefined;
|
|
214
|
-
|
|
213
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
215
214
|
field: string;
|
|
215
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
216
216
|
}[] | undefined;
|
|
217
217
|
model: string;
|
|
218
218
|
} | {
|
|
@@ -235,26 +235,26 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
235
235
|
};
|
|
236
236
|
}, Promise<any>>;
|
|
237
237
|
deleteMany: convex_server0.RegisteredMutation<"internal", {
|
|
238
|
-
paginationOpts: {
|
|
239
|
-
id?: number;
|
|
240
|
-
endCursor?: string | null;
|
|
241
|
-
maximumRowsRead?: number;
|
|
242
|
-
maximumBytesRead?: number;
|
|
243
|
-
numItems: number;
|
|
244
|
-
cursor: string | null;
|
|
245
|
-
};
|
|
246
238
|
input: {
|
|
247
239
|
where?: {
|
|
248
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
249
240
|
connector?: "AND" | "OR" | undefined;
|
|
250
|
-
|
|
241
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
251
242
|
field: string;
|
|
243
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
252
244
|
}[] | undefined;
|
|
253
245
|
model: string;
|
|
254
246
|
} | {
|
|
255
247
|
where?: any[] | undefined;
|
|
256
248
|
model: string;
|
|
257
249
|
};
|
|
250
|
+
paginationOpts: {
|
|
251
|
+
id?: number;
|
|
252
|
+
endCursor?: string | null;
|
|
253
|
+
maximumRowsRead?: number;
|
|
254
|
+
maximumBytesRead?: number;
|
|
255
|
+
numItems: number;
|
|
256
|
+
cursor: string | null;
|
|
257
|
+
};
|
|
258
258
|
}, Promise<{
|
|
259
259
|
count: number;
|
|
260
260
|
ids: any[];
|
|
@@ -266,10 +266,10 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
266
266
|
deleteOne: convex_server0.RegisteredMutation<"internal", {
|
|
267
267
|
input: {
|
|
268
268
|
where?: {
|
|
269
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
270
269
|
connector?: "AND" | "OR" | undefined;
|
|
271
|
-
|
|
270
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
272
271
|
field: string;
|
|
272
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
273
273
|
}[] | undefined;
|
|
274
274
|
model: string;
|
|
275
275
|
} | {
|
|
@@ -278,20 +278,21 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
278
278
|
};
|
|
279
279
|
}, Promise<Record<string, unknown> | undefined>>;
|
|
280
280
|
findMany: convex_server0.RegisteredQuery<"internal", {
|
|
281
|
-
join?: any;
|
|
282
281
|
limit?: number | undefined;
|
|
282
|
+
join?: any;
|
|
283
283
|
where?: {
|
|
284
284
|
mode?: "sensitive" | "insensitive" | undefined;
|
|
285
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
286
285
|
connector?: "AND" | "OR" | undefined;
|
|
287
|
-
|
|
286
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
288
287
|
field: string;
|
|
288
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
289
289
|
}[] | undefined;
|
|
290
290
|
offset?: number | undefined;
|
|
291
291
|
sortBy?: {
|
|
292
|
-
direction: "asc" | "desc";
|
|
293
292
|
field: string;
|
|
293
|
+
direction: "asc" | "desc";
|
|
294
294
|
} | undefined;
|
|
295
|
+
model: string;
|
|
295
296
|
paginationOpts: {
|
|
296
297
|
id?: number;
|
|
297
298
|
endCursor?: string | null;
|
|
@@ -300,16 +301,15 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
300
301
|
numItems: number;
|
|
301
302
|
cursor: string | null;
|
|
302
303
|
};
|
|
303
|
-
model: string;
|
|
304
304
|
}, Promise<PaginationResult<convex_server0.GenericDocument>>>;
|
|
305
305
|
findOne: convex_server0.RegisteredQuery<"internal", {
|
|
306
306
|
join?: any;
|
|
307
307
|
where?: {
|
|
308
308
|
mode?: "sensitive" | "insensitive" | undefined;
|
|
309
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
310
309
|
connector?: "AND" | "OR" | undefined;
|
|
311
|
-
|
|
310
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
312
311
|
field: string;
|
|
312
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
313
313
|
}[] | undefined;
|
|
314
314
|
select?: string[] | undefined;
|
|
315
315
|
model: string;
|
|
@@ -317,45 +317,45 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
317
317
|
getLatestJwks: convex_server0.RegisteredAction<"internal", {}, Promise<unknown>>;
|
|
318
318
|
incrementOne: convex_server0.RegisteredMutation<"internal", {
|
|
319
319
|
input: {
|
|
320
|
+
set?: Record<string, any> | undefined;
|
|
320
321
|
where?: {
|
|
321
322
|
mode?: "sensitive" | "insensitive" | undefined;
|
|
322
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
323
323
|
connector?: "AND" | "OR" | undefined;
|
|
324
|
-
|
|
324
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
325
325
|
field: string;
|
|
326
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
326
327
|
}[] | undefined;
|
|
327
|
-
set?: Record<string, any> | undefined;
|
|
328
328
|
model: string;
|
|
329
329
|
increment: Record<string, number>;
|
|
330
330
|
};
|
|
331
331
|
}, Promise<any>>;
|
|
332
332
|
rotateKeys: convex_server0.RegisteredAction<"internal", {}, Promise<unknown>>;
|
|
333
333
|
updateMany: convex_server0.RegisteredMutation<"internal", {
|
|
334
|
-
paginationOpts: {
|
|
335
|
-
id?: number;
|
|
336
|
-
endCursor?: string | null;
|
|
337
|
-
maximumRowsRead?: number;
|
|
338
|
-
maximumBytesRead?: number;
|
|
339
|
-
numItems: number;
|
|
340
|
-
cursor: string | null;
|
|
341
|
-
};
|
|
342
334
|
input: {
|
|
343
335
|
where?: {
|
|
344
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
345
336
|
connector?: "AND" | "OR" | undefined;
|
|
346
|
-
|
|
337
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
347
338
|
field: string;
|
|
339
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
348
340
|
}[] | undefined;
|
|
341
|
+
model: string;
|
|
349
342
|
update: {
|
|
350
343
|
[x: string]: unknown;
|
|
351
344
|
[x: number]: unknown;
|
|
352
345
|
[x: symbol]: unknown;
|
|
353
346
|
};
|
|
354
|
-
model: string;
|
|
355
347
|
} | {
|
|
356
348
|
where?: any[] | undefined;
|
|
357
|
-
update: any;
|
|
358
349
|
model: string;
|
|
350
|
+
update: any;
|
|
351
|
+
};
|
|
352
|
+
paginationOpts: {
|
|
353
|
+
id?: number;
|
|
354
|
+
endCursor?: string | null;
|
|
355
|
+
maximumRowsRead?: number;
|
|
356
|
+
maximumBytesRead?: number;
|
|
357
|
+
numItems: number;
|
|
358
|
+
cursor: string | null;
|
|
359
359
|
};
|
|
360
360
|
}, Promise<{
|
|
361
361
|
count: number;
|
|
@@ -368,21 +368,21 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
368
368
|
updateOne: convex_server0.RegisteredMutation<"internal", {
|
|
369
369
|
input: {
|
|
370
370
|
where?: {
|
|
371
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
372
371
|
connector?: "AND" | "OR" | undefined;
|
|
373
|
-
|
|
372
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
374
373
|
field: string;
|
|
374
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
375
375
|
}[] | undefined;
|
|
376
|
+
model: string;
|
|
376
377
|
update: {
|
|
377
378
|
[x: string]: unknown;
|
|
378
379
|
[x: number]: unknown;
|
|
379
380
|
[x: symbol]: unknown;
|
|
380
381
|
};
|
|
381
|
-
model: string;
|
|
382
382
|
} | {
|
|
383
383
|
where?: any[] | undefined;
|
|
384
|
-
update: any;
|
|
385
384
|
model: string;
|
|
385
|
+
update: any;
|
|
386
386
|
};
|
|
387
387
|
}, Promise<any>>;
|
|
388
388
|
};
|
|
@@ -1,10 +1,86 @@
|
|
|
1
1
|
import { o as Simplify } from "./types-Bqi_ivSd.js";
|
|
2
|
-
import { t as
|
|
3
|
-
import { g as UnsetMarker, t as AnyMiddleware } from "./types-CzGsrLrY.js";
|
|
2
|
+
import { g as UnsetMarker, t as AnyMiddleware } from "./types-Bkeicpo6.js";
|
|
4
3
|
import { GenericActionCtx, GenericDataModel, HttpRouter } from "convex/server";
|
|
5
4
|
import { z } from "zod";
|
|
6
5
|
import { Context, Hono } from "hono";
|
|
7
6
|
|
|
7
|
+
//#region src/crpc/transformer.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Generic transformer contract (mirrors tRPC shape).
|
|
10
|
+
*/
|
|
11
|
+
interface DataTransformer {
|
|
12
|
+
deserialize(object: any): any;
|
|
13
|
+
serialize(object: any): any;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Separate input/output transformers.
|
|
17
|
+
*/
|
|
18
|
+
interface CombinedDataTransformer {
|
|
19
|
+
input: DataTransformer;
|
|
20
|
+
output: DataTransformer;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Transformer config accepted by cRPC.
|
|
24
|
+
*/
|
|
25
|
+
type DataTransformerOptions = CombinedDataTransformer | DataTransformer;
|
|
26
|
+
/**
|
|
27
|
+
* Extensible tagged wire codec.
|
|
28
|
+
*/
|
|
29
|
+
interface WireCodec {
|
|
30
|
+
decode(value: unknown): unknown;
|
|
31
|
+
encode(value: unknown): unknown;
|
|
32
|
+
isType(value: unknown): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Declares that `isType` only ever claims a value where
|
|
35
|
+
* `typeof value === 'object' && value !== null` - never a primitive, a
|
|
36
|
+
* function, `null` or `undefined`.
|
|
37
|
+
*
|
|
38
|
+
* Lets `serialize` skip codec dispatch on primitives, which are the majority
|
|
39
|
+
* of visited nodes. It is opt-in because an arbitrary predicate cannot be
|
|
40
|
+
* classified by sampling values: a codec that claims, say, one specific
|
|
41
|
+
* number would be misread as object-only and silently lose its encoding.
|
|
42
|
+
* Codecs that leave it unset keep full dispatch.
|
|
43
|
+
*/
|
|
44
|
+
readonly objectsOnly?: boolean;
|
|
45
|
+
readonly tag: `$${string}`;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Date wire tag (Convex-style reserved key).
|
|
49
|
+
*/
|
|
50
|
+
declare const DATE_CODEC_TAG = "$date";
|
|
51
|
+
/**
|
|
52
|
+
* Built-in Date codec.
|
|
53
|
+
*/
|
|
54
|
+
declare const dateWireCodec: WireCodec;
|
|
55
|
+
/**
|
|
56
|
+
* Build a recursive tagged transformer from codecs.
|
|
57
|
+
*/
|
|
58
|
+
declare const createTaggedTransformer: (codecs: readonly WireCodec[]) => DataTransformer;
|
|
59
|
+
/**
|
|
60
|
+
* Default cRPC transformer (Date-enabled).
|
|
61
|
+
*/
|
|
62
|
+
declare const defaultCRPCTransformer: DataTransformer;
|
|
63
|
+
/**
|
|
64
|
+
* Normalize transformer config to split input/output shape.
|
|
65
|
+
* User transformers are additive and always composed with default Date handling.
|
|
66
|
+
*
|
|
67
|
+
* Idempotent: passing a transformer this function already resolved returns it
|
|
68
|
+
* unchanged.
|
|
69
|
+
*/
|
|
70
|
+
declare const getTransformer: (transformer?: DataTransformerOptions) => CombinedDataTransformer;
|
|
71
|
+
/**
|
|
72
|
+
* Encode request payloads (input direction).
|
|
73
|
+
*/
|
|
74
|
+
declare const encodeWire: (value: unknown, transformer?: DataTransformerOptions) => unknown;
|
|
75
|
+
/**
|
|
76
|
+
* Decode response payloads (output direction).
|
|
77
|
+
*/
|
|
78
|
+
declare const decodeWire: (value: unknown, transformer?: DataTransformerOptions) => unknown;
|
|
79
|
+
/**
|
|
80
|
+
* Exposed identity transformer for advanced composition.
|
|
81
|
+
*/
|
|
82
|
+
declare const identityTransformer: CombinedDataTransformer;
|
|
83
|
+
//#endregion
|
|
8
84
|
//#region src/server/http-types.d.ts
|
|
9
85
|
type ProcedureMeta = object;
|
|
10
86
|
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
@@ -259,4 +335,4 @@ declare class HttpClientError extends Error {
|
|
|
259
335
|
/** Type guard for HttpClientError */
|
|
260
336
|
declare const isHttpClientError: (error: unknown) => error is HttpClientError;
|
|
261
337
|
//#endregion
|
|
262
|
-
export { HttpProcedureBuilderDef as A, extractRouteMap as C, HttpHandlerOpts as D, HttpActionHandler as E, InferHttpInput$1 as M, ProcedureMeta as N, HttpMethod as O, createHttpRouterFactory as S, HttpActionConstructor as T, CRPCHttpRouter as _, HttpErrorCode as a, HttpRouterWithHono as b, HttpQueryKey as c, HttpRouteMap as d, InferHttpInput as f, isHttpClientError as g, buildHttpQueryPrefixKey as h, HttpClientFromRouter as i, HttpRouteDefinition as j, HttpProcedure as k, HttpQueryPrefixKey as l, buildHttpQueryKey as m, HttpClient as n, HttpMutationKey as o, InferHttpOutput as p, HttpClientError as r, HttpProcedureCall as s, HTTP_DEFAULT_STALE_TIME as t, HttpRouteInfo as u, HttpRouterDef as v, CRPCHonoHandler as w, createHttpRouter as x, HttpRouterRecord as y };
|
|
338
|
+
export { HttpProcedureBuilderDef as A, dateWireCodec as B, extractRouteMap as C, HttpHandlerOpts as D, HttpActionHandler as E, DATE_CODEC_TAG as F, identityTransformer as G, defaultCRPCTransformer as H, DataTransformer as I, DataTransformerOptions as L, InferHttpInput$1 as M, ProcedureMeta as N, HttpMethod as O, CombinedDataTransformer as P, WireCodec as R, createHttpRouterFactory as S, HttpActionConstructor as T, encodeWire as U, decodeWire as V, getTransformer as W, CRPCHttpRouter as _, HttpErrorCode as a, HttpRouterWithHono as b, HttpQueryKey as c, HttpRouteMap as d, InferHttpInput as f, isHttpClientError as g, buildHttpQueryPrefixKey as h, HttpClientFromRouter as i, HttpRouteDefinition as j, HttpProcedure as k, HttpQueryPrefixKey as l, buildHttpQueryKey as m, HttpClient as n, HttpMutationKey as o, InferHttpOutput as p, HttpClientError as r, HttpProcedureCall as s, HTTP_DEFAULT_STALE_TIME as t, HttpRouteInfo as u, HttpRouterDef as v, CRPCHonoHandler as w, createHttpRouter as x, HttpRouterRecord as y, createTaggedTransformer as z };
|
package/dist/orm/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $n as TableName, $t as OrmLifecycleChange, An as ConvexCheckBuilder, At as UpdateSet, Bn as ConvexTextBuilder, Br as IsPrimaryKey, Bt as RelationsBuilderColumnBase, C as MigrationStep, Cn as ConvexVectorIndexConfig, Cr as not, Ct as OrderByClause, D as defineMigration, Dn as searchIndex, Dr as startsWith, Dt as ReturningAll, E as buildMigrationPlan, En as rankIndex, Er as or, Et as PredicateWhereIndexConfig, Fn as ConvexUniqueConstraintBuilderOn, Fr as ColumnBuilderTypeConfig, Ft as ExtractTablesFromSchema, Gn as Columns, Gt as TablesRelationalConfig, H as RlsMode, Hn as text, Hr as NotNull, In as ConvexUniqueConstraintConfig, Ir as ColumnBuilderWithTableName, It as ExtractTablesWithRelations, Jn as OrmSchemaExtensionTables, Jt as ConvexDeletionBuilder, Kt as defineRelations, Ln as check, Lr as ColumnDataType, Lt as ManyConfig, M as DatabaseWithQuery, Mn as ConvexForeignKeyBuilder, Mr as ColumnBuilder, Mt as VectorSearchProvider, N as OrmReader$1, Nn as ConvexForeignKeyConfig, Nr as ColumnBuilderBaseConfig, Nt as unsetToken, O as defineMigrationSet, On as uniqueIndex, Ot as ReturningResult, P as OrmWriter$1, Pn as ConvexUniqueConstraintBuilder, Pr as ColumnBuilderRuntimeConfig, Qn as OrmSchemaTriggers, Qt as DiscriminatorBuilderConfig, Rn as foreignKey, Rr as DrizzleEntity, Rt as OneConfig, S as MigrationStateMap, Sn as ConvexVectorIndexBuilderOn, Sr as ne, St as MutationRunMode, T as MigrationWriteMode, Tn as index, Tr as notInArray, Tt as PaginatedResult, U as EdgeMetadata, V as RlsContext, Vn as ConvexTextBuilderInitial, Vr as IsUnique, Vt as RelationsBuilderColumnConfig, W as extractRelationsConfig, Wn as Brand, Wt as TableRelationalConfig, Xn as OrmSchemaExtensions, Xt as ConvexTable, Yt as ConvexDeletionConfig, Zn as OrmSchemaRelations, Zt as ConvexTableWithColumns, _ as MigrationManifestEntry, _n as ConvexRankIndexBuilderOn, _r as isNotNull, _t as MutationExecutionMode, an as RlsPolicy, ar as UnaryExpression, at as BuildRelationResult, b as MigrationRunStatus, bn as ConvexSearchIndexConfig, br as lt, bt as MutationResult, cn as rlsPolicy, cr as contains, ct as DBQueryConfig, d as MigrationAppliedState, dn as rlsRole, dr as fieldRef, dt as InferInsertModel, en as OrmLifecycleOperation, er as BinaryExpression, f as MigrationDefinition, fn as ConvexAggregateIndexBuilder, fr as gt, ft as InferModelFromColumns, g as MigrationDriftIssue, gn as ConvexRankIndexBuilder, gr as isFieldReference, gt as MutationExecuteResult, h as MigrationDocContext, hn as ConvexIndexBuilderOn, hr as inArray, ht as MutationExecuteConfig, i as OrmMigrationCapability, in as discriminator, ir as LogicalExpression, it as BuildQueryResult, j as DatabaseWithMutations, jn as ConvexCheckConfig, jr as AnyColumn, jt as VectorQueryConfig, k as detectMigrationDrift, kn as vectorIndex, kr as SystemFields, kt as ReturningSelection, ln as RlsRole, lr as endsWith, lt as FilterOperators, m as MigrationDoc, mn as ConvexIndexBuilder, mr as ilike, mt as InsertValue, n as OrmCapabilities, nn as convexTable, nr as FieldReference, nt as AggregateFieldValue, on as RlsPolicyConfig, or as and, ot as CountConfig, p as MigrationDirection, pn as ConvexAggregateIndexBuilderOn, pr as gte, pt as InferSelectModel, qt as defineRelationsPart, r as OrmCapability, rn as deletion, rr as FilterExpression, rt as AggregateResult, sn as RlsPolicyToOption, sr as between, st as CountResult, t as OrmAggregateCapability, tn as TableConfig, tr as ExpressionVisitor, tt as AggregateConfig, un as RlsRoleConfig, ur as eq, ut as GetColumnData, v as MigrationMigrateOne, vn as ConvexSearchIndexBuilder, vr as isNull, vt as MutationPaginateConfig, w as MigrationTableName, wn as aggregateIndex, wr as notBetween, wt as OrderDirection, x as MigrationSet, xn as ConvexVectorIndexBuilder, xr as lte, xt as MutationReturning, y as MigrationPlan, yn as ConvexSearchIndexBuilderOn, yr as like, yt as MutationPaginatedResult, zn as unique, zr as HasDefault, zt as RelationsBuilder } from "../capabilities-Bxzoofl4.js";
|
|
2
|
-
import { $ as OrmClientWithApi$1, A as ConvexDateMode, B as ConvexBytesBuilderInitial, C as ConvexNumberBuilderInitial, D as id, E as ConvexIdBuilderInitial, F as custom, G as ConvexBigIntBuilder, H as ConvexBooleanBuilder, I as json, J as CreateOrmOptions, K as ConvexBigIntBuilderInitial, L as objectOf, M as ConvexCustomBuilder, N as ConvexCustomBuilderInitial, O as ConvexDateBuilder, P as arrayOf, Q as OrmClientBase$1, R as unionOf, S as ConvexNumberBuilder, St as defineTriggers, T as ConvexIdBuilder, U as ConvexBooleanBuilderInitial, V as bytes, W as boolean, X as GenericOrmCtx$1, Y as GenericOrm$1, Z as OrmApiResult, _ as ConvexTimestampMode, _t as OrmBeforeResult, a as requireSchemaRelations, at as ScheduledMutationBatchArgs, b as ConvexTextEnumBuilderInitial, bt as OrmTriggerContext, c as TableConfigResult, ct as scheduledDeleteFactory, d as OrmNotFoundError, et as OrmFunctions, f as ConvexVectorBuilder, g as ConvexTimestampBuilderInitial, gt as defineSchemaExtension, h as ConvexTimestampBuilder, ht as SchemaExtension, i as getSchemaTriggers, it as createOrm, j as date, k as ConvexDateBuilderInitial, l as getTableColumns, m as vector, n as defineSchema, nt as OrmWriterCtx, o as asc, ot as scheduledMutationBatchFactory, p as ConvexVectorBuilderInitial, q as bigint, r as getSchemaRelations, rt as ResolveOrmSchema, s as desc, st as ScheduledDeleteArgs, t as WhereClauseResult, tt as OrmReaderCtx, u as getTableConfig, v as timestamp, vt as OrmTableTriggers, w as integer, x as textEnum, xt as OrmTriggers, y as ConvexTextEnumBuilder, yt as OrmTriggerChange, z as ConvexBytesBuilder } from "../where-clause-compiler-
|
|
2
|
+
import { $ as OrmClientWithApi$1, A as ConvexDateMode, B as ConvexBytesBuilderInitial, C as ConvexNumberBuilderInitial, D as id, E as ConvexIdBuilderInitial, F as custom, G as ConvexBigIntBuilder, H as ConvexBooleanBuilder, I as json, J as CreateOrmOptions, K as ConvexBigIntBuilderInitial, L as objectOf, M as ConvexCustomBuilder, N as ConvexCustomBuilderInitial, O as ConvexDateBuilder, P as arrayOf, Q as OrmClientBase$1, R as unionOf, S as ConvexNumberBuilder, St as defineTriggers, T as ConvexIdBuilder, U as ConvexBooleanBuilderInitial, V as bytes, W as boolean, X as GenericOrmCtx$1, Y as GenericOrm$1, Z as OrmApiResult, _ as ConvexTimestampMode, _t as OrmBeforeResult, a as requireSchemaRelations, at as ScheduledMutationBatchArgs, b as ConvexTextEnumBuilderInitial, bt as OrmTriggerContext, c as TableConfigResult, ct as scheduledDeleteFactory, d as OrmNotFoundError, et as OrmFunctions, f as ConvexVectorBuilder, g as ConvexTimestampBuilderInitial, gt as defineSchemaExtension, h as ConvexTimestampBuilder, ht as SchemaExtension, i as getSchemaTriggers, it as createOrm, j as date, k as ConvexDateBuilderInitial, l as getTableColumns, m as vector, n as defineSchema, nt as OrmWriterCtx, o as asc, ot as scheduledMutationBatchFactory, p as ConvexVectorBuilderInitial, q as bigint, r as getSchemaRelations, rt as ResolveOrmSchema, s as desc, st as ScheduledDeleteArgs, t as WhereClauseResult, tt as OrmReaderCtx, u as getTableConfig, v as timestamp, vt as OrmTableTriggers, w as integer, x as textEnum, xt as OrmTriggers, y as ConvexTextEnumBuilder, yt as OrmTriggerChange, z as ConvexBytesBuilder } from "../where-clause-compiler-jhCEPHxi.js";
|
|
3
3
|
import { i as pretendRequired, n as deprecated, r as pretend } from "../validators-0I-Ik1EN.js";
|
|
4
4
|
import { a as QueryCtxWithPreferredOrmQueryTable, i as QueryCtxWithOrmQueryTable, n as LookupByIdResultByCtx, o as getByIdWithOrmQueryFallback, r as QueryCtxWithOptionalOrmQueryTable, t as DocByCtx } from "../query-context-BkNjkDCk.js";
|
|
5
5
|
import { DefineSchemaOptions, GenericDatabaseReader, GenericDatabaseWriter, GenericSchema, SchemaDefinition } from "convex/server";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { C as MigrationStep, D as defineMigration, E as buildMigrationPlan, O as defineMigrationSet, S as MigrationStateMap, T as MigrationWriteMode, _ as MigrationManifestEntry, a as MAX_STATUS_RUN_LIMIT, b as MigrationRunStatus, c as MigrationRunChunkArgs, d as MigrationAppliedState, f as MigrationDefinition, g as MigrationDriftIssue, h as MigrationDocContext, k as detectMigrationDrift, l as MigrationStatusArgs, m as MigrationDoc, o as MigrationCancelArgs, p as MigrationDirection, s as MigrationRunArgs, u as createMigrationHandlers, v as MigrationMigrateOne, w as MigrationTableName, x as MigrationSet, y as MigrationPlan } from "../../capabilities-Bxzoofl4.js";
|
|
2
|
-
import { Ct as migrationCapability, dt as MIGRATION_STORAGE_TABLE_NAMES, ft as injectMigrationStorageTables, lt as MIGRATION_RUN_TABLE, mt as migrationStorageTables, pt as migrationExtension, ut as MIGRATION_STATE_TABLE } from "../../where-clause-compiler-
|
|
2
|
+
import { Ct as migrationCapability, dt as MIGRATION_STORAGE_TABLE_NAMES, ft as injectMigrationStorageTables, lt as MIGRATION_RUN_TABLE, mt as migrationStorageTables, pt as migrationExtension, ut as MIGRATION_STATE_TABLE } from "../../where-clause-compiler-jhCEPHxi.js";
|
|
3
3
|
export { MAX_STATUS_RUN_LIMIT, MIGRATION_RUN_TABLE, MIGRATION_STATE_TABLE, MIGRATION_STORAGE_TABLE_NAMES, type MigrationAppliedState, type MigrationCancelArgs, type MigrationDefinition, type MigrationDirection, type MigrationDoc, type MigrationDocContext, type MigrationDriftIssue, type MigrationManifestEntry, type MigrationMigrateOne, type MigrationPlan, type MigrationRunArgs, type MigrationRunChunkArgs, type MigrationRunStatus, type MigrationSet, type MigrationStateMap, type MigrationStatusArgs, type MigrationStep, type MigrationTableName, type MigrationWriteMode, buildMigrationPlan, createMigrationHandlers, defineMigration, defineMigrationSet, detectMigrationDrift, injectMigrationStorageTables, migrationCapability, migrationExtension, migrationStorageTables };
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PluginConfigureResolver, i as PluginConfigureInput, n as PluginApiScope, o as definePlugin, r as PluginConfigureContext, s as resolvePluginOptions, t as Plugin } from "../middleware-
|
|
1
|
+
import { a as PluginConfigureResolver, i as PluginConfigureInput, n as PluginApiScope, o as definePlugin, r as PluginConfigureContext, s as resolvePluginOptions, t as Plugin } from "../middleware-BBS7oLtT.js";
|
|
2
2
|
export { type Plugin, type PluginApiScope, type PluginConfigureContext, type PluginConfigureInput, type PluginConfigureResolver, definePlugin, resolvePluginOptions };
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import { t as VRequired } from "./validators-0I-Ik1EN.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { g as UnsetMarker, i as IntersectIfDefined, o as MiddlewareBuilder, p as Overwrite$1, s as MiddlewareFunction, t as AnyMiddleware } from "./types-CzGsrLrY.js";
|
|
5
|
-
import { A as HttpProcedureBuilderDef, D as HttpHandlerOpts, N as ProcedureMeta, O as HttpMethod, _ as CRPCHttpRouter, f as InferHttpInput, k as HttpProcedure, p as InferHttpOutput, y as HttpRouterRecord } from "./http-types-8FBr10yl.js";
|
|
2
|
+
import { A as HttpProcedureBuilderDef, D as HttpHandlerOpts, L as DataTransformerOptions, N as ProcedureMeta, O as HttpMethod, W as getTransformer, _ as CRPCHttpRouter, f as InferHttpInput, k as HttpProcedure, p as InferHttpOutput, y as HttpRouterRecord } from "./http-types-BhhPZtwa.js";
|
|
3
|
+
import { g as UnsetMarker, i as IntersectIfDefined, o as MiddlewareBuilder, p as Overwrite$1, s as MiddlewareFunction, t as AnyMiddleware } from "./types-Bkeicpo6.js";
|
|
6
4
|
import { ConvexError, GenericId, GenericValidator, ObjectType, OptionalProperty, PropertyValidators, VAny, VArray, VBoolean, VBytes, VFloat64, VId, VInt64, VLiteral, VNull, VObject, VOptional, VRecord, VString, VUnion, Validator, Value as Value$1 } from "convex/values";
|
|
7
5
|
import { ActionBuilder, ArgsArrayToObject, DefaultFunctionArgs, FunctionReference, FunctionReturnType, FunctionVisibility, GenericActionCtx, GenericDataModel, GenericMutationCtx, GenericQueryCtx, MutationBuilder, QueryBuilder, RegisteredAction, RegisteredMutation, RegisteredQuery, TableNamesInDataModel } from "convex/server";
|
|
8
6
|
import * as z$1 from "zod";
|
|
9
7
|
import * as z$2 from "zod/v4";
|
|
10
8
|
import * as zCore from "zod/v4/core";
|
|
11
9
|
|
|
10
|
+
//#region src/internal/upstream/index.d.ts
|
|
11
|
+
type EmptyObject = Record<string, never>;
|
|
12
|
+
/**
|
|
13
|
+
* Hack! This type causes TypeScript to simplify how it renders object types.
|
|
14
|
+
*
|
|
15
|
+
* It is functionally the identity for object types, but in practice it can
|
|
16
|
+
* simplify expressions like `A & B`.
|
|
17
|
+
*/
|
|
18
|
+
type Expand<ObjectType extends Record<any, any>> = ObjectType extends Record<any, any> ? { [Key in keyof ObjectType]: ObjectType[Key] } : never;
|
|
19
|
+
//#endregion
|
|
12
20
|
//#region src/internal/upstream/server/customFunctions.d.ts
|
|
13
21
|
/**
|
|
14
22
|
* A customization of a query, mutation, or action.
|
|
@@ -1001,6 +1009,132 @@ declare function createApiLeaf<TType extends ApiFunctionType, TExport, TMeta ext
|
|
|
1001
1009
|
};
|
|
1002
1010
|
declare function createGeneratedFunctionReference<TType extends ApiFunctionType, TVisibility extends GeneratedFunctionVisibility, TExport>(name: string): GeneratedFunctionRefFromExport<TType, TVisibility, TExport>;
|
|
1003
1011
|
//#endregion
|
|
1012
|
+
//#region src/server/caller.d.ts
|
|
1013
|
+
/** Metadata for a single function */
|
|
1014
|
+
type FnMeta = {
|
|
1015
|
+
type?: 'query' | 'mutation' | 'action';
|
|
1016
|
+
[key: string]: unknown;
|
|
1017
|
+
};
|
|
1018
|
+
/** Metadata for all functions in a module */
|
|
1019
|
+
type ModuleMeta = Record<string, FnMeta>;
|
|
1020
|
+
/** Metadata for all modules - from generated `@convex/api` */
|
|
1021
|
+
type CallerMeta = Record<string, ModuleMeta>;
|
|
1022
|
+
/** Options for individual caller function calls */
|
|
1023
|
+
type CallerOpts = {
|
|
1024
|
+
/** Skip query silently when unauthenticated (returns null instead of throwing) */skipUnauth?: boolean;
|
|
1025
|
+
};
|
|
1026
|
+
type CallerReturn<T, Opts extends CallerOpts | undefined> = Opts extends {
|
|
1027
|
+
skipUnauth: true;
|
|
1028
|
+
} ? T | null : T;
|
|
1029
|
+
type FetchFn<T extends 'query' | 'mutation' | 'action'> = <Fn extends FunctionReference<T>>(fn: Fn, args: Fn['_args'], opts?: CallerOpts) => Promise<FunctionReturnType<Fn> | null>;
|
|
1030
|
+
type CreateCallerOptions = {
|
|
1031
|
+
fetchQuery: FetchFn<'query'>;
|
|
1032
|
+
fetchMutation: FetchFn<'mutation'>;
|
|
1033
|
+
fetchAction: FetchFn<'action'>;
|
|
1034
|
+
meta: CallerMeta;
|
|
1035
|
+
transformer?: DataTransformerOptions;
|
|
1036
|
+
};
|
|
1037
|
+
type ServerCallerFn<TApi, K extends keyof TApi> = TApi[K] extends FunctionReference<infer T, 'public'> ? T extends 'query' | 'mutation' | 'action' ? keyof TApi[K]['_args'] extends never ? <Opts extends CallerOpts | undefined = undefined>(args?: EmptyObject, opts?: Opts) => Promise<CallerReturn<FunctionReturnType<TApi[K]>, Opts>> : EmptyObject extends TApi[K]['_args'] ? <Opts extends CallerOpts | undefined = undefined>(args?: TApi[K]['_args'], opts?: Opts) => Promise<CallerReturn<FunctionReturnType<TApi[K]>, Opts>> : <Opts extends CallerOpts | undefined = undefined>(args: TApi[K]['_args'], opts?: Opts) => Promise<CallerReturn<FunctionReturnType<TApi[K]>, Opts>> : never : ServerCaller<TApi[K]>;
|
|
1038
|
+
type ServerCaller<TApi> = { [K in keyof TApi as K extends string ? K extends `_${string}` ? never : K extends 'http' ? never : K : K]: ServerCallerFn<TApi, K> };
|
|
1039
|
+
/**
|
|
1040
|
+
* Create a server caller for direct data fetching without React Query.
|
|
1041
|
+
*
|
|
1042
|
+
* This is detached from React Query cache - data is NOT available in client components.
|
|
1043
|
+
* Use for server-only data that doesn't need to be shared with the client.
|
|
1044
|
+
*
|
|
1045
|
+
* @example
|
|
1046
|
+
* ```tsx
|
|
1047
|
+
* // src/lib/convex/rsc.tsx
|
|
1048
|
+
* export const caller = createServerCaller(api, {
|
|
1049
|
+
* fetchQuery: fetchAuthQuery,
|
|
1050
|
+
* fetchMutation: fetchAuthMutation,
|
|
1051
|
+
* });
|
|
1052
|
+
*
|
|
1053
|
+
* // app/page.tsx (RSC)
|
|
1054
|
+
* const posts = await caller.posts.list();
|
|
1055
|
+
* return <div>{posts?.length} posts</div>;
|
|
1056
|
+
* ```
|
|
1057
|
+
*/
|
|
1058
|
+
declare function createServerCaller<TApi extends Record<string, unknown>>(api: TApi, opts: CreateCallerOptions): ServerCaller<TApi>;
|
|
1059
|
+
//#endregion
|
|
1060
|
+
//#region src/server/lazy-caller.d.ts
|
|
1061
|
+
type CallerContext<TApi> = {
|
|
1062
|
+
caller: ServerCaller<TApi>;
|
|
1063
|
+
token: string | undefined;
|
|
1064
|
+
isAuthenticated: boolean;
|
|
1065
|
+
};
|
|
1066
|
+
/**
|
|
1067
|
+
* Lazy caller with auth helper methods.
|
|
1068
|
+
* Context is created on first procedure invocation, not at definition time.
|
|
1069
|
+
*/
|
|
1070
|
+
type LazyCaller<TApi> = ServerCaller<TApi> & {
|
|
1071
|
+
/** Check if user is authenticated */isAuth: () => Promise<boolean>; /** Check if user is unauthenticated */
|
|
1072
|
+
isUnauth: () => Promise<boolean>; /** Get the auth token (for RSC prefetching) */
|
|
1073
|
+
getToken: () => Promise<string | undefined>;
|
|
1074
|
+
};
|
|
1075
|
+
/**
|
|
1076
|
+
* Create a lazy caller that creates context on each procedure invocation.
|
|
1077
|
+
* Matches tRPC's `appRouter.createCaller(createTRPCContext)` pattern.
|
|
1078
|
+
*
|
|
1079
|
+
* @example
|
|
1080
|
+
* ```ts
|
|
1081
|
+
* // server.ts
|
|
1082
|
+
* const { createContext, createCaller } = createCallerFactory({...});
|
|
1083
|
+
*
|
|
1084
|
+
* // rsc.tsx
|
|
1085
|
+
* const createRSCContext = cache(async () => {
|
|
1086
|
+
* const heads = await headers();
|
|
1087
|
+
* return createContext({ headers: heads });
|
|
1088
|
+
* });
|
|
1089
|
+
* export const caller = createCaller(createRSCContext);
|
|
1090
|
+
*
|
|
1091
|
+
* // app/page.tsx - single call! Context created lazily
|
|
1092
|
+
* const posts = await caller.posts.list();
|
|
1093
|
+
* ```
|
|
1094
|
+
*/
|
|
1095
|
+
declare function createLazyCaller<TApi extends Record<string, unknown>>(api: TApi, createContext: () => Promise<CallerContext<TApi>>): LazyCaller<TApi>;
|
|
1096
|
+
//#endregion
|
|
1097
|
+
//#region src/server/caller-factory.d.ts
|
|
1098
|
+
type TokenResult = {
|
|
1099
|
+
token?: string;
|
|
1100
|
+
isFresh?: boolean;
|
|
1101
|
+
};
|
|
1102
|
+
type GetTokenFn = (siteUrl: string, headers: Headers, opts?: unknown) => Promise<TokenResult>;
|
|
1103
|
+
/** Auth options for server-side calls. */
|
|
1104
|
+
type AuthOptions = {
|
|
1105
|
+
/** Function to extract auth token from request headers. */getToken: GetTokenFn;
|
|
1106
|
+
/**
|
|
1107
|
+
* Custom function to detect UNAUTHORIZED errors.
|
|
1108
|
+
* Set this to resolve those errors to `null` instead of throwing.
|
|
1109
|
+
*
|
|
1110
|
+
* Refreshing an expired cached token and retrying does not require this:
|
|
1111
|
+
* that always falls back to `defaultIsUnauthorized`.
|
|
1112
|
+
*/
|
|
1113
|
+
isUnauthorized?: (error: unknown) => boolean;
|
|
1114
|
+
};
|
|
1115
|
+
type CreateCallerFactoryOptions<TApi> = {
|
|
1116
|
+
/** Your Convex API object. */api: TApi; /** Convex site URL (must end in `.convex.site`). */
|
|
1117
|
+
convexSiteUrl: string;
|
|
1118
|
+
/**
|
|
1119
|
+
* Convex deployment URL (must end in `.convex.cloud`).
|
|
1120
|
+
* Defaults to `convexSiteUrl` with the domain swapped.
|
|
1121
|
+
*/
|
|
1122
|
+
convexUrl?: string; /** Auth options. Pass to enable authenticated calls with JWT caching. */
|
|
1123
|
+
auth?: AuthOptions; /** Optional wire transformer for request/response payloads (always composed with Date). */
|
|
1124
|
+
transformer?: DataTransformerOptions;
|
|
1125
|
+
};
|
|
1126
|
+
type ConvexContext<TApi> = {
|
|
1127
|
+
token: string | undefined;
|
|
1128
|
+
isAuthenticated: boolean;
|
|
1129
|
+
caller: ServerCaller<TApi>;
|
|
1130
|
+
};
|
|
1131
|
+
declare function createCallerFactory<TApi extends Record<string, unknown>>(opts: CreateCallerFactoryOptions<TApi>): {
|
|
1132
|
+
createCaller: (ctxFn: () => Promise<ConvexContext<TApi>>) => LazyCaller<TApi>;
|
|
1133
|
+
createContext: (reqOpts: {
|
|
1134
|
+
headers: Headers;
|
|
1135
|
+
}) => Promise<ConvexContext<TApi>>;
|
|
1136
|
+
};
|
|
1137
|
+
//#endregion
|
|
1004
1138
|
//#region src/server/env.d.ts
|
|
1005
1139
|
type RuntimeEnv = Record<string, string | undefined>;
|
|
1006
1140
|
type CreateEnvOptions<TSchema extends z$1.ZodObject<z$1.ZodRawShape>> = {
|
|
@@ -1279,4 +1413,4 @@ type ProcedureNameLookup = Record<string, ProcedureNameEntry[]>;
|
|
|
1279
1413
|
declare function registerProcedureNameLookup(lookup: ProcedureNameLookup, functionsDirHint: string): void;
|
|
1280
1414
|
declare function inferProcedureNameFromCallsite(): string | undefined;
|
|
1281
1415
|
//#endregion
|
|
1282
|
-
export {
|
|
1416
|
+
export { ActionProcedureBuilder as $, CRPCError as A, RuntimeEnv as B, createProcedureHandlerFactory as C, zCustomQuery as Ct, WithHttpRouter as D, zodToConvex as Dt, typedProcedureResolver as E, zodOutputToConvexFields as Et, getCRPCErrorFromUnknown as F, createLazyCaller as G, ConvexContext as H, getHTTPStatusCodeFromError as I, ServerCaller as J, CallerMeta as K, isCRPCError as L, CRPCErrorData as M, CRPC_ERROR_CODES_BY_KEY as N, inferApiInputs as O, zodToConvexFields as Ot, CRPC_ERROR_CODE_TO_HTTP as P, getGeneratedValue as Q, toCRPCError as R, createProcedureCallerFactory as S, zCustomMutation as St, getGeneratedFunctionReference as T, zodOutputToConvex as Tt, createCallerFactory as U, createEnv as V, LazyCaller as W, createApiLeaf as X, createServerCaller as Y, createGeneratedFunctionReference as Z, ProcedureSchedulableCallerFromRegistry as _, ZodValidatorFromConvex as _t, CreateProcedureCallerFactoryOptions as a, initCRPC as at, createGenericCallerFactory as b, withSystemFields as bt, GeneratedRegistryCallerFactory as c, extractPathParams as ct, GeneratedRegistryHandlerForContext as d, ConvexValidatorFromZod as dt, CRPCFunctionTypeHint as et, ProcedureActionCallerFromRegistry as f, ConvexValidatorFromZodOutput as ft, ProcedureFromFunctionReference as g, ZodFromValidatorBase as gt, ProcedureDefinition as h, Zid as ht, registerProcedureNameLookup as i, createMiddlewareFactory as it, CRPCErrorCode as j, inferApiOutputs as k, GeneratedRegistryCallerForContext as l, handleHttpError as lt, ProcedureCallerFromRegistry as m, ZCustomCtx as mt, ProcedureNameLookup as n, ProcedureBuilder as nt, GeneratedProcedureRegistry as o, HttpProcedureBuilder as ot, ProcedureCaller as p, CustomBuilder as pt, CallerOpts as q, inferProcedureNameFromCallsite as r, QueryProcedureBuilder as rt, GeneratedProcedureRegistryEntry as s, createHttpProcedureBuilder as st, ProcedureNameEntry as t, MutationProcedureBuilder as tt, GeneratedRegistryHandlerFactory as u, matchPathParams as ut, ProcedureScheduleCallerFromRegistry as v, convexToZod as vt, defineProcedure as w, zid as wt, createGenericHandlerFactory as x, zCustomAction as xt, createGeneratedRegistryRuntime as y, convexToZodFields as yt, CreateEnvOptions as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as MiddlewareBuilder } from "../types-
|
|
2
|
-
import { t as Plugin } from "../middleware-
|
|
1
|
+
import { o as MiddlewareBuilder } from "../types-Bkeicpo6.js";
|
|
2
|
+
import { t as Plugin } from "../middleware-BBS7oLtT.js";
|
|
3
3
|
import * as convex_server0 from "convex/server";
|
|
4
4
|
|
|
5
5
|
//#region src/ratelimit/duration.d.ts
|
package/dist/react/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { A as CRPCClientError, C as decodeJwtExp, M as isCRPCClientError, O as writeAuthSessionFallbackData, S as useSafeConvexAuth, T as clearAuthSessionFallback, _ as useConvexAuthBridge, a as ConvexAuthRecoveryError, b as useIsAuth, c as MaybeAuthenticated, d as isSessionSyncGraceActive, f as useAuth, g as useAuthValue, h as useAuthStore, i as ConvexAuthBridge, j as defaultIsUnauthorized, k as writeAuthSessionFallbackToken, l as MaybeUnauthenticated, m as useAuthState, n as AuthProvider, o as ConvexProviderWithAuth, p as useAuthGuard, r as Authenticated, s as FetchAccessTokenContext, t as AUTH_SESSION_SYNC_GRACE_MS, u as Unauthenticated, v as useConvexAuthRecovery, w as decodeJwtIdentity, x as useMaybeAuth, y as useFetchAccessToken } from "../auth-store-
|
|
2
|
+
import { A as CRPCClientError, C as decodeJwtExp, M as isCRPCClientError, O as writeAuthSessionFallbackData, S as useSafeConvexAuth, T as clearAuthSessionFallback, _ as useConvexAuthBridge, a as ConvexAuthRecoveryError, b as useIsAuth, c as MaybeAuthenticated, d as isSessionSyncGraceActive, f as useAuth, g as useAuthValue, h as useAuthStore, i as ConvexAuthBridge, j as defaultIsUnauthorized, k as writeAuthSessionFallbackToken, l as MaybeUnauthenticated, m as useAuthState, n as AuthProvider, o as ConvexProviderWithAuth, p as useAuthGuard, r as Authenticated, s as FetchAccessTokenContext, t as AUTH_SESSION_SYNC_GRACE_MS, u as Unauthenticated, v as useConvexAuthRecovery, w as decodeJwtIdentity, x as useMaybeAuth, y as useFetchAccessToken } from "../auth-store-x3_wvhTR.js";
|
|
3
3
|
import { ConvexProvider, ConvexReactClient, ConvexReactClient as ConvexReactClient$1, useAction, useConvex, useMutation } from "convex/react";
|
|
4
4
|
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
package/dist/rsc/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { n as DeepPartial, o as Simplify, r as DistributiveOmit } from "../types-Bqi_ivSd.js";
|
|
2
|
-
import {
|
|
3
|
-
import { g as UnsetMarker } from "../types-
|
|
4
|
-
import { _ as
|
|
5
|
-
import { A as HttpInputArgs, C as ReservedMutationOptions$1, S as ReservedInfiniteQueryOptions, T as StaticQueryOptsParam, _ as IsPaginated, b as PaginatedFnMeta, c as ConvexMutationKey, d as ConvexQueryMeta, f as EmptyObject, g as InfiniteQueryInput, l as ConvexQueryHookOptions, m as FUNC_REF_SYMBOL, o as ConvexActionKey, p as ExtractPaginatedItem, s as ConvexInfiniteQueryMeta, u as ConvexQueryKey, w as ReservedQueryOptions$1, y as MutationVariables } from "../types-Cl0utsTL.js";
|
|
2
|
+
import { L as DataTransformerOptions, _ as CRPCHttpRouter, c as HttpQueryKey, k as HttpProcedure, o as HttpMutationKey, y as HttpRouterRecord } from "../http-types-BhhPZtwa.js";
|
|
3
|
+
import { g as UnsetMarker } from "../types-Bkeicpo6.js";
|
|
4
|
+
import { A as HttpInputArgs, C as ReservedMutationOptions$1, S as ReservedInfiniteQueryOptions, T as StaticQueryOptsParam, _ as IsPaginated, b as PaginatedFnMeta, c as ConvexMutationKey, d as ConvexQueryMeta, f as EmptyObject, g as InfiniteQueryInput, l as ConvexQueryHookOptions, m as FUNC_REF_SYMBOL, o as ConvexActionKey, p as ExtractPaginatedItem, s as ConvexInfiniteQueryMeta, u as ConvexQueryKey, w as ReservedQueryOptions$1, y as MutationVariables } from "../types-C7JkpfeY.js";
|
|
6
5
|
import { FunctionArgs, FunctionReference, FunctionReturnType } from "convex/server";
|
|
7
6
|
import { z } from "zod";
|
|
8
7
|
import { DefaultError, QueryFilters, SkipToken, UseMutationOptions, UseQueryOptions } from "@tanstack/react-query";
|
package/dist/rsc/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as defaultIsUnauthorized } from "../error-
|
|
1
|
+
import { n as defaultIsUnauthorized } from "../error-CLgc9khF.js";
|
|
2
2
|
import { n as getFuncRef, r as getFunctionMeta, t as buildMetaIndex } from "../meta-utils-Cc7neQOB.js";
|
|
3
3
|
import { o as encodeWire, s as getTransformer } from "../transformer-C8lVwHNT.js";
|
|
4
4
|
import { c as HTTP_DEFAULT_STALE_TIME, n as convexInfiniteQueryOptions, o as executeHttpRequest, r as convexQuery, u as buildHttpQueryKey } from "../query-options-DGG93--5.js";
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { a as MergeZodObjects, c as MiddlewareMarker, d as MiddlewareProcedureType, f as MiddlewareResult, g as UnsetMarker, h as Simplify, i as IntersectIfDefined, l as MiddlewareNext, m as ResolveIfSet, n as AnyMiddlewareBuilder, o as MiddlewareBuilder, p as Overwrite, r as GetRawInputFn, s as MiddlewareFunction, t as AnyMiddleware, u as MiddlewareProcedureInfo } from "../types-
|
|
4
|
-
import {
|
|
5
|
-
import { a as isMutationCtx, c as isSchedulerCtx, d as requireQueryCtx, f as requireRunMutationCtx, i as isActionCtx, l as requireActionCtx, n as RunMutationCtx, o as isQueryCtx, p as requireSchedulerCtx, r as SchedulerCtx, s as isRunMutationCtx, t as GenericCtx, u as requireMutationCtx } from "../context-utils-ax351iFc.js";
|
|
1
|
+
import { $ as ActionProcedureBuilder, A as CRPCError, B as RuntimeEnv, C as createProcedureHandlerFactory, Ct as zCustomQuery, D as WithHttpRouter, Dt as zodToConvex, E as typedProcedureResolver, Et as zodOutputToConvexFields, F as getCRPCErrorFromUnknown, G as createLazyCaller, H as ConvexContext, I as getHTTPStatusCodeFromError, J as ServerCaller, K as CallerMeta, L as isCRPCError, M as CRPCErrorData, N as CRPC_ERROR_CODES_BY_KEY, O as inferApiInputs, Ot as zodToConvexFields, P as CRPC_ERROR_CODE_TO_HTTP, Q as getGeneratedValue, R as toCRPCError, S as createProcedureCallerFactory, St as zCustomMutation, T as getGeneratedFunctionReference, Tt as zodOutputToConvex, U as createCallerFactory, V as createEnv, W as LazyCaller, X as createApiLeaf, Y as createServerCaller, Z as createGeneratedFunctionReference, _ as ProcedureSchedulableCallerFromRegistry, _t as ZodValidatorFromConvex, a as CreateProcedureCallerFactoryOptions, at as initCRPC, b as createGenericCallerFactory, bt as withSystemFields, c as GeneratedRegistryCallerFactory, ct as extractPathParams, d as GeneratedRegistryHandlerForContext, dt as ConvexValidatorFromZod, et as CRPCFunctionTypeHint, f as ProcedureActionCallerFromRegistry, ft as ConvexValidatorFromZodOutput, g as ProcedureFromFunctionReference, gt as ZodFromValidatorBase, h as ProcedureDefinition, ht as Zid, i as registerProcedureNameLookup, it as createMiddlewareFactory, j as CRPCErrorCode, k as inferApiOutputs, l as GeneratedRegistryCallerForContext, lt as handleHttpError, m as ProcedureCallerFromRegistry, mt as ZCustomCtx, n as ProcedureNameLookup, nt as ProcedureBuilder, o as GeneratedProcedureRegistry, ot as HttpProcedureBuilder, p as ProcedureCaller, pt as CustomBuilder, q as CallerOpts, r as inferProcedureNameFromCallsite, rt as QueryProcedureBuilder, s as GeneratedProcedureRegistryEntry, st as createHttpProcedureBuilder, t as ProcedureNameEntry, tt as MutationProcedureBuilder, u as GeneratedRegistryHandlerFactory, ut as matchPathParams, v as ProcedureScheduleCallerFromRegistry, vt as convexToZod, w as defineProcedure, wt as zid, x as createGenericHandlerFactory, xt as zCustomAction, y as createGeneratedRegistryRuntime, yt as convexToZodFields, z as CreateEnvOptions } from "../procedure-name-DRSOwAJY.js";
|
|
2
|
+
import { A as HttpProcedureBuilderDef, C as extractRouteMap, D as HttpHandlerOpts, E as HttpActionHandler, M as InferHttpInput, N as ProcedureMeta, O as HttpMethod, S as createHttpRouterFactory, T as HttpActionConstructor, _ as CRPCHttpRouter, b as HttpRouterWithHono, j as HttpRouteDefinition, k as HttpProcedure, v as HttpRouterDef, w as CRPCHonoHandler, x as createHttpRouter, y as HttpRouterRecord } from "../http-types-BhhPZtwa.js";
|
|
3
|
+
import { a as MergeZodObjects, c as MiddlewareMarker, d as MiddlewareProcedureType, f as MiddlewareResult, g as UnsetMarker, h as Simplify, i as IntersectIfDefined, l as MiddlewareNext, m as ResolveIfSet, n as AnyMiddlewareBuilder, o as MiddlewareBuilder, p as Overwrite, r as GetRawInputFn, s as MiddlewareFunction, t as AnyMiddleware, u as MiddlewareProcedureInfo } from "../types-Bkeicpo6.js";
|
|
4
|
+
import { a as isMutationCtx, c as isSchedulerCtx, d as requireQueryCtx, f as requireRunMutationCtx, i as isActionCtx, l as requireActionCtx, n as RunMutationCtx, o as isQueryCtx, p as requireSchedulerCtx, r as SchedulerCtx, s as isRunMutationCtx, t as GenericCtx, u as requireMutationCtx } from "../context-utils-Cbv4r0AA.js";
|
|
6
5
|
export { ActionProcedureBuilder, AnyMiddleware, AnyMiddlewareBuilder, CRPCError, CRPCErrorCode, CRPCErrorData, CRPCFunctionTypeHint, CRPCHonoHandler, CRPCHttpRouter, CRPC_ERROR_CODES_BY_KEY, CRPC_ERROR_CODE_TO_HTTP, CallerMeta, CallerOpts, ConvexContext, ConvexValidatorFromZod, ConvexValidatorFromZodOutput, CreateEnvOptions, CreateProcedureCallerFactoryOptions, CustomBuilder, GeneratedProcedureRegistry, GeneratedProcedureRegistryEntry, GeneratedRegistryCallerFactory, GeneratedRegistryCallerForContext, GeneratedRegistryHandlerFactory, GeneratedRegistryHandlerForContext, GenericCtx, GetRawInputFn, HttpActionConstructor, HttpActionHandler, HttpHandlerOpts, HttpMethod, HttpProcedure, HttpProcedureBuilder, HttpProcedureBuilderDef, HttpRouteDefinition, HttpRouterDef, HttpRouterRecord, HttpRouterWithHono, InferHttpInput, IntersectIfDefined, LazyCaller, MergeZodObjects, MiddlewareBuilder, MiddlewareFunction, MiddlewareMarker, MiddlewareNext, MiddlewareProcedureInfo, MiddlewareProcedureType, MiddlewareResult, MutationProcedureBuilder, Overwrite, ProcedureActionCallerFromRegistry, ProcedureBuilder, ProcedureCaller, ProcedureCallerFromRegistry, ProcedureDefinition, ProcedureFromFunctionReference, ProcedureMeta, ProcedureNameEntry, ProcedureNameLookup, ProcedureSchedulableCallerFromRegistry, ProcedureScheduleCallerFromRegistry, QueryProcedureBuilder, ResolveIfSet, RunMutationCtx, RuntimeEnv, SchedulerCtx, ServerCaller, Simplify, UnsetMarker, WithHttpRouter, ZCustomCtx, Zid, ZodFromValidatorBase, ZodValidatorFromConvex, convexToZod, convexToZodFields, createApiLeaf, createCallerFactory, createEnv, createGeneratedFunctionReference, createGeneratedRegistryRuntime, createGenericCallerFactory, createGenericHandlerFactory, createHttpProcedureBuilder, createHttpRouter, createHttpRouterFactory, createLazyCaller, createMiddlewareFactory, createProcedureCallerFactory, createProcedureHandlerFactory, createServerCaller, defineProcedure, extractPathParams, extractRouteMap, getCRPCErrorFromUnknown, getGeneratedFunctionReference, getGeneratedValue, getHTTPStatusCodeFromError, handleHttpError, inferApiInputs, inferApiOutputs, inferProcedureNameFromCallsite, initCRPC, isActionCtx, isCRPCError, isMutationCtx, isQueryCtx, isRunMutationCtx, isSchedulerCtx, matchPathParams, registerProcedureNameLookup, requireActionCtx, requireMutationCtx, requireQueryCtx, requireRunMutationCtx, requireSchedulerCtx, toCRPCError, typedProcedureResolver, withSystemFields, zCustomAction, zCustomMutation, zCustomQuery, zid, zodOutputToConvex, zodOutputToConvexFields, zodToConvex, zodToConvexFields };
|
package/dist/server/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as isMutationCtx, c as isSchedulerCtx, d as requireQueryCtx, f as requireRunMutationCtx, i as isActionCtx, l as requireActionCtx, n as createGeneratedFunctionReference, o as isQueryCtx, p as requireSchedulerCtx, r as getGeneratedValue, s as isRunMutationCtx, t as createApiLeaf, u as requireMutationCtx } from "../api-entry-Buvjl9hn.js";
|
|
2
|
-
import { n as createLazyCaller, r as createServerCaller, t as createCallerFactory } from "../caller-factory-
|
|
2
|
+
import { n as createLazyCaller, r as createServerCaller, t as createCallerFactory } from "../caller-factory-CEKbQdGY.js";
|
|
3
3
|
import { A as zid, C as toCRPCError, D as zCustomAction, E as withSystemFields, M as zodOutputToConvexFields, N as zodToConvex, O as zCustomMutation, P as zodToConvexFields, S as isCRPCError, T as convexToZodFields, _ as CRPCError, a as createMiddlewareFactory, b as getCRPCErrorFromUnknown, c as registerProcedureNameLookup, d as createHttpRouterFactory, f as extractRouteMap, g as matchPathParams, h as handleHttpError, i as QueryProcedureBuilder, j as zodOutputToConvex, k as zCustomQuery, l as HttpRouterWithHono, m as extractPathParams, n as MutationProcedureBuilder, o as initCRPC, p as createHttpProcedureBuilder, r as ProcedureBuilder, s as inferProcedureNameFromCallsite, t as ActionProcedureBuilder, u as createHttpRouter, v as CRPC_ERROR_CODES_BY_KEY, w as convexToZod, x as getHTTPStatusCodeFromError, y as CRPC_ERROR_CODE_TO_HTTP } from "../builder-DDYTlmTB.js";
|
|
4
4
|
import { a as createProcedureHandlerFactory, c as typedProcedureResolver, i as createProcedureCallerFactory, l as createEnv, n as createGenericCallerFactory, o as defineProcedure, r as createGenericHandlerFactory, s as getGeneratedFunctionReference, t as createGeneratedRegistryRuntime } from "../procedure-caller-DgGF_hA8.js";
|
|
5
5
|
|