kitcn 0.32.2 → 0.33.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/CHANGELOG.md +109 -0
- package/dist/aggregate/index.d.ts +2 -2
- package/dist/auth/generated/index.d.ts +1 -1
- package/dist/auth/index.d.ts +16 -16
- package/dist/auth/index.js +1 -1
- package/dist/auth/nextjs/index.d.ts +2 -2
- package/dist/auth/start/server/index.d.ts +2 -2
- package/dist/{builder-Cyd5nCxZ.js → builder-DDYTlmTB.js} +12 -3
- package/dist/caller-factory-C3pcbzo0.d.ts +140 -0
- package/dist/{capabilities-BJm_VSDT.d.ts → capabilities-Bxzoofl4.d.ts} +149 -9
- package/dist/crpc/index.d.ts +3 -2
- package/dist/{generated-contract-disabled-BRm1dNQE.d.ts → generated-contract-disabled-B_EaHGCP.d.ts} +33 -33
- package/dist/{http-types-BhhPZtwa.d.ts → http-types-8FBr10yl.d.ts} +3 -79
- package/dist/{middleware-BBS7oLtT.d.ts → middleware-D2hKJuSZ.d.ts} +1 -1
- package/dist/{middleware-D61Nm-iB.js → middleware-LvZov-hA.js} +1 -1
- package/dist/orm/aggregate-index/index.d.ts +1 -1
- package/dist/orm/aggregate-index/index.js +226 -96
- package/dist/orm/index.d.ts +2 -2
- package/dist/orm/index.js +364 -108
- package/dist/orm/migrations/index.d.ts +2 -2
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.js +1 -1
- package/dist/{procedure-caller-DgMiD0-a.js → procedure-caller-DgGF_hA8.js} +1 -1
- package/dist/{procedure-name-DPYyLiVS.d.ts → procedure-name-kn-awLk1.d.ts} +12 -142
- package/dist/{query-context-D4z1CnDH.js → query-context-DQLv58LH.js} +34 -1
- package/dist/ratelimit/index.d.ts +2 -2
- package/dist/ratelimit/index.js +2 -2
- package/dist/react/index.d.ts +5 -6
- package/dist/react/index.js +24 -69
- package/dist/rsc/index.d.ts +4 -3
- package/dist/{schema-Bh7AmJwY.js → schema-BF4P0ZjS.js} +322 -1
- package/dist/server/index.d.ts +5 -4
- package/dist/server/index.js +2 -2
- package/dist/solid/index.d.ts +5 -6
- package/dist/solid/index.js +20 -66
- package/dist/transformer-BEkxlnss.d.ts +78 -0
- package/dist/{types-BXpu7xIU.d.ts → types-Cl0utsTL.d.ts} +4 -3
- package/dist/{where-clause-compiler-Dgf4lrO-.d.ts → where-clause-compiler-CoPVAVDO.d.ts} +136 -136
- package/package.json +1 -1
- package/skills/kitcn/SKILL.md +2 -1
- package/skills/kitcn/references/features/aggregates.md +13 -0
- package/skills/kitcn/references/features/auth-admin.md +1 -0
- package/skills/kitcn/references/features/orm.md +24 -4
- package/skills/kitcn/references/features/react.md +4 -5
- /package/dist/{context-utils-Cbv4r0AA.d.ts → context-utils-ax351iFc.d.ts} +0 -0
- /package/dist/{token-tlbNKQS0.d.ts → token-CZpDQUHd.d.ts} +0 -0
- /package/dist/{types-Bkeicpo6.d.ts → types-CzGsrLrY.d.ts} +0 -0
|
@@ -2149,7 +2149,7 @@ declare const createAggregateError: (code: AggregateErrorCode, message: string)
|
|
|
2149
2149
|
declare const ensureCountAllowedForRls: (tableConfig: TableRelationalConfig, rlsMode: "skip" | "default" | undefined) => void;
|
|
2150
2150
|
declare const ensureAggregateAllowedForRls: (tableConfig: TableRelationalConfig, rlsMode: "skip" | "default" | undefined, methodName: string) => void;
|
|
2151
2151
|
declare namespace runtime_d_exports$1 {
|
|
2152
|
-
export { AGGREGATE_ERROR, AGGREGATE_STATE_KIND_METRIC, AGGREGATE_STATE_KIND_RANK, AggregateBucketDelta, AggregateErrorCode, AggregateExtremaDelta, AggregateIndexDefinition, AggregateMemberWrite, AggregateMembershipDelta, AggregateQueryPlan, AggregateRangeConstraint, COUNT_ERROR, COUNT_STATUS_BUILDING, COUNT_STATUS_CLEARING, COUNT_STATUS_READY, ClearIndexChunkResult, CountErrorCode, CountIndexDefinition, CountQueryPlan, CountState, NULLISH_PROBE_VALUES, PlanBucketReadCache, applyAggregateIndexesForChange, applyCountIndexesForChange, asUnknownArray, assertAggregateIndexesWritable, clearCountIndexChunk, compileAggregateQueryPlan, compileCountFieldQueryPlan, compileCountQueryPlan, computeAggregateMembershipDelta, computeAggregateMetricValues, computeCountKeyParts, createAggregateError, createCountError, ensureAggregateAllowedForRls, ensureAggregateIndexReady, ensureCountAllowedForRls, ensureCountIndexReady, flushAggregateMembershipDeltas, getAggregateIndexDefinitions, getCountIndexDefinitions, getCountIndexValuesForFields, getCountState, isAggregatePlanZero, isIndexCountZero, listCountStates, listSchemaAggregateIndexes, listSchemaCountIndexes, parseAggregateWhere, parseCountWhere, readAverageFromBuckets, readCountFieldFromBuckets, readCountFromBuckets, readExtremaFromBuckets, readPlanBuckets, readSumFromBuckets, reconcileAggregateMembership, serializeCountKeyParts, setCountState, setCountStateError };
|
|
2152
|
+
export { AGGREGATE_ERROR, AGGREGATE_STATE_KIND_METRIC, AGGREGATE_STATE_KIND_RANK, AggregateBucketDelta, AggregateErrorCode, AggregateExtremaDelta, AggregateIndexDefinition, AggregateMemberWrite, AggregateMembershipDelta, AggregateQueryPlan, AggregateRangeConstraint, COUNT_ERROR, COUNT_STATUS_BUILDING, COUNT_STATUS_CLEARING, COUNT_STATUS_READY, ClearIndexChunkResult, CountErrorCode, CountIndexDefinition, CountMemberRow, CountQueryPlan, CountState, NULLISH_PROBE_VALUES, PlanBucketReadCache, applyAggregateIndexesForChange, applyCountIndexesForChange, asUnknownArray, assertAggregateIndexesWritable, clearCountIndexChunk, compileAggregateQueryPlan, compileCountFieldQueryPlan, compileCountQueryPlan, computeAggregateMembershipDelta, computeAggregateMetricValues, computeCountKeyParts, createAggregateError, createCountError, ensureAggregateAllowedForRls, ensureAggregateIndexReady, ensureCountAllowedForRls, ensureCountIndexReady, flushAggregateMembershipDeltas, getAggregateIndexDefinitions, getCountIndexDefinitions, getCountIndexValuesForFields, getCountState, isAggregatePlanZero, isIndexCountZero, listCountStates, listSchemaAggregateIndexes, listSchemaCountIndexes, parseAggregateWhere, parseCountWhere, readAverageFromBuckets, readCountFieldFromBuckets, readCountFromBuckets, readExtremaFromBuckets, readPlanBuckets, readSumFromBuckets, reconcileAggregateMembership, serializeCountKeyParts, setCountState, setCountStateError };
|
|
2153
2153
|
}
|
|
2154
2154
|
declare const AGGREGATE_STATE_KIND_METRIC = "metric";
|
|
2155
2155
|
declare const AGGREGATE_STATE_KIND_RANK = "rank";
|
|
@@ -2188,6 +2188,21 @@ type CountState = {
|
|
|
2188
2188
|
completedAt?: number | null;
|
|
2189
2189
|
lastError?: string | null;
|
|
2190
2190
|
};
|
|
2191
|
+
type CountMemberRow = {
|
|
2192
|
+
_id: GenericId<any>;
|
|
2193
|
+
kind: string;
|
|
2194
|
+
tableKey: string;
|
|
2195
|
+
indexName: string;
|
|
2196
|
+
docId: string;
|
|
2197
|
+
keyHash: string;
|
|
2198
|
+
keyParts: unknown[];
|
|
2199
|
+
sumValues: Record<string, number>;
|
|
2200
|
+
nonNullCountValues: Record<string, number>;
|
|
2201
|
+
extremaValues: Record<string, unknown>;
|
|
2202
|
+
rankNamespace?: unknown;
|
|
2203
|
+
rankKey?: unknown;
|
|
2204
|
+
rankSumValue?: number;
|
|
2205
|
+
};
|
|
2191
2206
|
type CountBucketRow = {
|
|
2192
2207
|
_id: GenericId<any>;
|
|
2193
2208
|
tableKey: string;
|
|
@@ -2261,6 +2276,11 @@ type AggregateExtremaDelta = {
|
|
|
2261
2276
|
value: unknown;
|
|
2262
2277
|
delta: number;
|
|
2263
2278
|
};
|
|
2279
|
+
/**
|
|
2280
|
+
* `post` is what the write leaves in the member table, so the flush can bring
|
|
2281
|
+
* the member memo forward without reading the row back. The `_id` is missing
|
|
2282
|
+
* because an insert only learns it once the insert returns.
|
|
2283
|
+
*/
|
|
2264
2284
|
type AggregateMemberWrite = {
|
|
2265
2285
|
kind: 'none';
|
|
2266
2286
|
} | {
|
|
@@ -2270,11 +2290,13 @@ type AggregateMemberWrite = {
|
|
|
2270
2290
|
kind: 'patch';
|
|
2271
2291
|
id: GenericId<any>;
|
|
2272
2292
|
doc: Record<string, unknown>;
|
|
2293
|
+
post: Omit<CountMemberRow, '_id'>;
|
|
2273
2294
|
} | {
|
|
2274
2295
|
kind: 'insert';
|
|
2275
|
-
doc:
|
|
2296
|
+
doc: Omit<CountMemberRow, '_id'>;
|
|
2276
2297
|
};
|
|
2277
2298
|
type AggregateMembershipDelta = {
|
|
2299
|
+
/** The document this delta reconciles, and the member memo's key. */docId: string;
|
|
2278
2300
|
buckets: AggregateBucketDelta[];
|
|
2279
2301
|
extrema: AggregateExtremaDelta[];
|
|
2280
2302
|
member: AggregateMemberWrite;
|
|
@@ -2293,8 +2315,28 @@ declare const computeAggregateMembershipDelta: (db: GenericDatabaseWriter<any>,
|
|
|
2293
2315
|
*/
|
|
2294
2316
|
declare const flushAggregateMembershipDeltas: (db: GenericDatabaseWriter<any>, tableName: string, indexName: string, deltas: AggregateMembershipDelta[]) => Promise<void>;
|
|
2295
2317
|
/**
|
|
2296
|
-
* Single-document reconciliation.
|
|
2297
|
-
*
|
|
2318
|
+
* Single-document reconciliation.
|
|
2319
|
+
*
|
|
2320
|
+
* The bucket and extrema writes always go on the transaction's write queue,
|
|
2321
|
+
* never straight to storage: `applyBucketDelta` writes an absolute count
|
|
2322
|
+
* computed from the row it just read, so two of them interleaving would be a
|
|
2323
|
+
* lost update, and routing every one of them through a single drain is what
|
|
2324
|
+
* keeps them serialized. Inside a mutation statement the queue is held to the
|
|
2325
|
+
* end of the statement, which is what lets the fold collapse a page of
|
|
2326
|
+
* documents into one write per key tuple; outside one it is drained
|
|
2327
|
+
* immediately, so a raw `ctx.db` write behaves exactly as it did before.
|
|
2328
|
+
*
|
|
2329
|
+
* The member row is written per document either way, because it is the
|
|
2330
|
+
* pre-image the next reconciliation of this document subtracts. Outside a
|
|
2331
|
+
* statement it is still written after the bucket, preserving the previous
|
|
2332
|
+
* order; inside one it necessarily lands first, and a flush that throws
|
|
2333
|
+
* part-way leaves the index needing a backfill — which a partially applied fold
|
|
2334
|
+
* would anyway, whichever order the two halves ran in.
|
|
2335
|
+
*
|
|
2336
|
+
* Deferral is invisible to aggregate readers: every bucket- and extrema-backed
|
|
2337
|
+
* read path drains the queue first, so user code reading a count later in the
|
|
2338
|
+
* same mutation — including from a trigger firing mid-statement — still sees
|
|
2339
|
+
* its own writes.
|
|
2298
2340
|
*/
|
|
2299
2341
|
declare const reconcileAggregateMembership: (db: GenericDatabaseWriter<any>, params: {
|
|
2300
2342
|
tableName: string;
|
|
@@ -2755,6 +2797,7 @@ declare class ConvexDeleteBuilder<TTable extends ConvexTable<any>, TReturning ex
|
|
|
2755
2797
|
}): this;
|
|
2756
2798
|
executeAsync(this: ConvexDeleteExecutableThis<TTable, TReturning, TMode>, ...args: TMode extends 'single' ? [config?: Omit<MutationExecuteConfig, 'mode'>] : [config: never]): Promise<TMode extends 'single' ? MutationExecuteResult<TTable, TReturning, 'single'> : never>;
|
|
2757
2799
|
execute(this: ConvexDeleteExecutableThis<TTable, TReturning, TMode>, ...args: TMode extends 'single' ? [config?: MutationExecuteConfig] : [config?: never]): Promise<MutationExecuteResult<TTable, TReturning, TMode>>;
|
|
2800
|
+
private _runStatement;
|
|
2758
2801
|
}
|
|
2759
2802
|
//#endregion
|
|
2760
2803
|
//#region src/orm/insert.d.ts
|
|
@@ -2795,6 +2838,7 @@ declare class ConvexInsertBuilder<TTable extends ConvexTable<any>, TReturning ex
|
|
|
2795
2838
|
onConflictDoNothing(config?: InsertOnConflictDoNothingConfig<TTable>): ConvexInsertWithout<this, 'onConflictDoNothing' | 'onConflictDoUpdate'>;
|
|
2796
2839
|
onConflictDoUpdate(config: InsertOnConflictDoUpdateConfig<TTable>): ConvexInsertWithout<this, 'onConflictDoNothing' | 'onConflictDoUpdate'>;
|
|
2797
2840
|
execute(): Promise<MutationResult<TTable, TReturning>>;
|
|
2841
|
+
private _runStatement;
|
|
2798
2842
|
private resolveReturningRow;
|
|
2799
2843
|
private handleConflict;
|
|
2800
2844
|
private findConflictRow;
|
|
@@ -3065,8 +3109,41 @@ declare class GelRelationalQuery<TSchema extends TablesRelationalConfig, TTableC
|
|
|
3065
3109
|
private _finalizeRows;
|
|
3066
3110
|
private _getSchemaDefinitionOrThrow;
|
|
3067
3111
|
private _applyEqBounds;
|
|
3068
|
-
|
|
3069
|
-
|
|
3112
|
+
/**
|
|
3113
|
+
* The row filter for an already-resolved pipeline stage `where`.
|
|
3114
|
+
*
|
|
3115
|
+
* Takes the resolved shape rather than the clause so the rows that are read
|
|
3116
|
+
* and the rows that are kept come from the same resolution. Resolving twice
|
|
3117
|
+
* would let a `where` callback that closes over changing state — a clock, a
|
|
3118
|
+
* counter — bound the read with one expression and filter it with another,
|
|
3119
|
+
* dropping rows that the second expression matched but the first never read.
|
|
3120
|
+
*/
|
|
3121
|
+
private _buildResolvedWherePredicate;
|
|
3122
|
+
/**
|
|
3123
|
+
* What a pipeline stage `where` is, resolved once.
|
|
3124
|
+
*
|
|
3125
|
+
* Object clauses and callbacks that return an expression can be compiled and
|
|
3126
|
+
* therefore index-lowered. `predicate(...)` is opaque JavaScript and never
|
|
3127
|
+
* can be. Both the anchoring check and the index lowering need to tell those
|
|
3128
|
+
* apart, and a callback `where` should be run once per read rather than once
|
|
3129
|
+
* per caller that asks.
|
|
3130
|
+
*/
|
|
3131
|
+
private _resolvePipelineWhere;
|
|
3132
|
+
/**
|
|
3133
|
+
* Reject a `predicate(...)` stage `where` on a read nothing bounds.
|
|
3134
|
+
*
|
|
3135
|
+
* A predicate can only run after the row is read, so it costs one read per
|
|
3136
|
+
* candidate row. That is fine over an index range and unbounded over a table
|
|
3137
|
+
* scan, which is the same line `findMany` draws for a chain-level
|
|
3138
|
+
* `predicate(...)`. An object `where` is not held to it: the compiler
|
|
3139
|
+
* lowers what it can and post-filters the rest, exactly as the chain-level
|
|
3140
|
+
* read does.
|
|
3141
|
+
*
|
|
3142
|
+
* `remedy` is per call site because the anchor a caller can add differs: a
|
|
3143
|
+
* union source takes an index, a `flatMap` stage has no index option at all
|
|
3144
|
+
* and is anchored by the relation's own declared index.
|
|
3145
|
+
*/
|
|
3146
|
+
private _assertPipelineWhereIsAnchored;
|
|
3070
3147
|
private _isFilterExpressionNode;
|
|
3071
3148
|
private _isPredicateWhereClause;
|
|
3072
3149
|
private _createFilterOperators;
|
|
@@ -3099,14 +3176,31 @@ declare class GelRelationalQuery<TSchema extends TablesRelationalConfig, TTableC
|
|
|
3099
3176
|
/**
|
|
3100
3177
|
* The compiled index union, as one ordered stream.
|
|
3101
3178
|
*
|
|
3102
|
-
* Each probe is its own index range, so the union is only usable where
|
|
3103
|
-
*
|
|
3104
|
-
*
|
|
3179
|
+
* Each probe is its own index range, so the union is only usable where its
|
|
3180
|
+
* order is the order the read has to produce. `mergedStream` orders by a
|
|
3181
|
+
* suffix of the index key, and a suffix may only drop key components the
|
|
3105
3182
|
* probes all pin to a single value — so the requested field has to sit inside
|
|
3106
3183
|
* the pinned run or immediately after it. Returns null when it does not, and
|
|
3107
3184
|
* the caller falls back to the plan's plain index range or a bounded scan.
|
|
3185
|
+
*
|
|
3186
|
+
* Two executors, because a union that is too wide to merge is not too wide to
|
|
3187
|
+
* read. A merge registers every probe up front and holds them open for the
|
|
3188
|
+
* life of the read, which is what `MAX_INDEX_UNION_PROBES` refuses; past that
|
|
3189
|
+
* width the probes are concatenated instead, one open query at a time. What
|
|
3190
|
+
* the cap picks is therefore fan-out versus sequential — never index versus
|
|
3191
|
+
* table scan, which is a trade no read wins.
|
|
3108
3192
|
*/
|
|
3109
3193
|
private _buildProbeUnionStream;
|
|
3194
|
+
/**
|
|
3195
|
+
* `probeFilters` in the order a scan of `indexField` reaches them, or null
|
|
3196
|
+
* when they cannot be proven to be pairwise-disjoint ranges on that field.
|
|
3197
|
+
*
|
|
3198
|
+
* Concatenation stands in for a merge only under those two properties, and
|
|
3199
|
+
* both have to come from the filters themselves rather than from trust in the
|
|
3200
|
+
* compiler that emitted them: overlapping probes would emit a row twice, and
|
|
3201
|
+
* probes handed over out of order would emit index keys backwards.
|
|
3202
|
+
*/
|
|
3203
|
+
private _orderDisjointProbes;
|
|
3110
3204
|
/**
|
|
3111
3205
|
* The read the compiled plan describes, as a stream, with nothing filtered
|
|
3112
3206
|
* yet.
|
|
@@ -3138,7 +3232,41 @@ declare class GelRelationalQuery<TSchema extends TablesRelationalConfig, TTableC
|
|
|
3138
3232
|
* the caller then falls back to its plain-query path.
|
|
3139
3233
|
*/
|
|
3140
3234
|
private _buildResidualFilterStream;
|
|
3235
|
+
/**
|
|
3236
|
+
* One `pipeline.union` source, as a stream.
|
|
3237
|
+
*
|
|
3238
|
+
* The source's own `where` is compiled into an index plan first, so an
|
|
3239
|
+
* object `where` bounds the read instead of being discarded row by row after
|
|
3240
|
+
* it. Two rules keep that from changing what the union produces:
|
|
3241
|
+
*
|
|
3242
|
+
* - `_compileQueryPlan` discards a plan that would displace an index the
|
|
3243
|
+
* caller pinned, so a source's own range (a tenant scope, say) still wins.
|
|
3244
|
+
* - A merged union is ordered by `interleaveBy`, which only some index
|
|
3245
|
+
* shapes can supply. The lowered read is checked against that before it is
|
|
3246
|
+
* committed to, and the unlowered scan is used when it cannot serve the
|
|
3247
|
+
* merge — an index that saves reads is not worth an ordering that throws.
|
|
3248
|
+
*
|
|
3249
|
+
* The `where` stays applied in JS either way. The index range is a bound on
|
|
3250
|
+
* what is read, not a replacement for the predicate.
|
|
3251
|
+
*/
|
|
3141
3252
|
private _buildUnionSourceStream;
|
|
3253
|
+
/**
|
|
3254
|
+
* The index a `flatMap` stage `where` can ride on top of the join keys.
|
|
3255
|
+
*
|
|
3256
|
+
* The join is only correct while `targetFields` stay pinned by equality, and
|
|
3257
|
+
* a Convex range builder pins fields in index-key order with no gaps, so the
|
|
3258
|
+
* candidates are exactly the declared indexes that lead with `targetFields`
|
|
3259
|
+
* and carry at least one more field. Those trailing fields are what the
|
|
3260
|
+
* stage `where` is compiled against — the compiler never sees the join keys,
|
|
3261
|
+
* because their values are per parent and the index choice has to be made
|
|
3262
|
+
* once for all of them.
|
|
3263
|
+
*
|
|
3264
|
+
* Returns null when nothing is gained, and the caller keeps the relation's
|
|
3265
|
+
* own index plus the post-filter. A multi-probe plan is refused: each probe
|
|
3266
|
+
* is its own range, and a union of ranges per parent is a different stream
|
|
3267
|
+
* shape than the one `flatMap` was handed as `mappedIndexFields`.
|
|
3268
|
+
*/
|
|
3269
|
+
private _resolveFlatMapStageIndex;
|
|
3142
3270
|
private _applyFlatMapStage;
|
|
3143
3271
|
private _applyPipelineStages;
|
|
3144
3272
|
private _tryNativeUnfilteredCount;
|
|
@@ -3203,6 +3331,17 @@ declare class GelRelationalQuery<TSchema extends TablesRelationalConfig, TTableC
|
|
|
3203
3331
|
* Phase 4 implementation with WhereClauseCompiler
|
|
3204
3332
|
*/
|
|
3205
3333
|
private _toConvexQuery;
|
|
3334
|
+
/**
|
|
3335
|
+
* The read plan for one `where` on this table.
|
|
3336
|
+
*
|
|
3337
|
+
* Split out of `_toConvexQuery` because the chain-level `where` is not the
|
|
3338
|
+
* only one that has to be index-lowered: a `pipeline.union` source carries
|
|
3339
|
+
* its own `where` and its own pinned index, and compiles against the same
|
|
3340
|
+
* table with a different ordering contract (`interleaveBy`, not `orderBy`).
|
|
3341
|
+
* Both go through here so a plain-object `where` is planned the same way
|
|
3342
|
+
* wherever it is written.
|
|
3343
|
+
*/
|
|
3344
|
+
private _compileQueryPlan;
|
|
3206
3345
|
private _buildRelationKey;
|
|
3207
3346
|
/**
|
|
3208
3347
|
* How many leading fields of the scanned index are pinned to a single value.
|
|
@@ -3634,6 +3773,7 @@ declare class ConvexUpdateBuilder<TTable extends ConvexTable<any>, TReturning ex
|
|
|
3634
3773
|
allowFullScan(): ConvexUpdateBuilder<TTable, TReturning, TMode, true>;
|
|
3635
3774
|
executeAsync(this: ConvexUpdateExecutableThis<TTable, TReturning, TMode>, ...args: TMode extends 'single' ? [config?: Omit<MutationExecuteConfig, 'mode'>] : [config: never]): Promise<TMode extends 'single' ? MutationExecuteResult<TTable, TReturning, 'single'> : never>;
|
|
3636
3775
|
execute(this: ConvexUpdateExecutableThis<TTable, TReturning, TMode>, ...args: TMode extends 'single' ? [config?: MutationExecuteConfig] : [config?: never]): Promise<MutationExecuteResult<TTable, TReturning, TMode>>;
|
|
3776
|
+
private _runStatement;
|
|
3637
3777
|
}
|
|
3638
3778
|
//#endregion
|
|
3639
3779
|
//#region src/orm/database.d.ts
|
package/dist/crpc/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { a as WireCodec, c as decodeWire, d as getTransformer, f as identityTransformer, i as DataTransformerOptions, l as defaultCRPCTransformer, n as DATE_CODEC_TAG, o as createTaggedTransformer, r as DataTransformer, s as dateWireCodec, t as CombinedDataTransformer, u as encodeWire } from "../transformer-BEkxlnss.js";
|
|
2
|
+
import { a as HttpErrorCode, c as HttpQueryKey, d as HttpRouteMap, f as InferHttpInput, g as isHttpClientError, h as buildHttpQueryPrefixKey, i as HttpClientFromRouter, l as HttpQueryPrefixKey, m as buildHttpQueryKey, n as HttpClient, o as HttpMutationKey, p as InferHttpOutput, r as HttpClientError, s as HttpProcedureCall, t as HTTP_DEFAULT_STALE_TIME, u as HttpRouteInfo } from "../http-types-8FBr10yl.js";
|
|
3
|
+
import { A as HttpInputArgs, C as ReservedMutationOptions, D as VanillaMutation, E as VanillaAction, F as replaceUrlParam, M as RESERVED_KEYS, N as buildSearchParams, O as HttpClientOptions, P as executeHttpRequest, S as ReservedInfiniteQueryOptions, T as StaticQueryOptsParam, _ as IsPaginated, a as BaseInfiniteQueryOptsParam, b as PaginatedFnMeta, c as ConvexMutationKey, d as ConvexQueryMeta, f as EmptyObject, g as InfiniteQueryInput, h as FnMeta, i as BaseConvexQueryOptions, j as HttpProxyBaseOptions, k as HttpFormValue, l as ConvexQueryHookOptions, m as FUNC_REF_SYMBOL, n as BaseConvexActionOptions, o as ConvexActionKey, p as ExtractPaginatedItem, r as BaseConvexInfiniteQueryOptions, s as ConvexInfiniteQueryMeta, t as AuthType, u as ConvexQueryKey, v as Meta, w as ReservedQueryOptions, x as PaginationOpts, y as MutationVariables } from "../types-Cl0utsTL.js";
|
|
3
4
|
import { FunctionArgs, FunctionReference } from "convex/server";
|
|
4
5
|
|
|
5
6
|
//#region src/crpc/auth-error.d.ts
|
package/dist/{generated-contract-disabled-BRm1dNQE.d.ts → generated-contract-disabled-B_EaHGCP.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-ax351iFc.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,8 +199,8 @@ 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;
|
|
202
203
|
connector?: "AND" | "OR" | undefined;
|
|
203
|
-
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
204
204
|
value: string | number | boolean | string[] | number[] | null;
|
|
205
205
|
field: string;
|
|
206
206
|
}[] | undefined;
|
|
@@ -209,8 +209,8 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
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;
|
|
212
213
|
connector?: "AND" | "OR" | undefined;
|
|
213
|
-
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
214
214
|
value: string | number | boolean | string[] | number[] | null;
|
|
215
215
|
field: string;
|
|
216
216
|
}[] | undefined;
|
|
@@ -235,10 +235,18 @@ 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
|
+
};
|
|
238
246
|
input: {
|
|
239
247
|
where?: {
|
|
248
|
+
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
240
249
|
connector?: "AND" | "OR" | undefined;
|
|
241
|
-
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
242
250
|
value: string | number | boolean | string[] | number[] | null;
|
|
243
251
|
field: string;
|
|
244
252
|
}[] | undefined;
|
|
@@ -247,14 +255,6 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
247
255
|
where?: any[] | undefined;
|
|
248
256
|
model: string;
|
|
249
257
|
};
|
|
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,8 +266,8 @@ 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;
|
|
269
270
|
connector?: "AND" | "OR" | undefined;
|
|
270
|
-
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
271
271
|
value: string | number | boolean | string[] | number[] | null;
|
|
272
272
|
field: string;
|
|
273
273
|
}[] | undefined;
|
|
@@ -279,20 +279,19 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
279
279
|
}, Promise<Record<string, unknown> | undefined>>;
|
|
280
280
|
findMany: convex_server0.RegisteredQuery<"internal", {
|
|
281
281
|
join?: any;
|
|
282
|
+
limit?: number | undefined;
|
|
282
283
|
where?: {
|
|
283
284
|
mode?: "sensitive" | "insensitive" | undefined;
|
|
285
|
+
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
284
286
|
connector?: "AND" | "OR" | undefined;
|
|
285
|
-
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
286
287
|
value: string | number | boolean | string[] | number[] | null;
|
|
287
288
|
field: string;
|
|
288
289
|
}[] | undefined;
|
|
289
|
-
limit?: number | undefined;
|
|
290
290
|
offset?: number | undefined;
|
|
291
291
|
sortBy?: {
|
|
292
|
-
field: string;
|
|
293
292
|
direction: "asc" | "desc";
|
|
293
|
+
field: string;
|
|
294
294
|
} | undefined;
|
|
295
|
-
model: string;
|
|
296
295
|
paginationOpts: {
|
|
297
296
|
id?: number;
|
|
298
297
|
endCursor?: string | null;
|
|
@@ -301,13 +300,14 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
301
300
|
numItems: number;
|
|
302
301
|
cursor: string | null;
|
|
303
302
|
};
|
|
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;
|
|
309
310
|
connector?: "AND" | "OR" | undefined;
|
|
310
|
-
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
311
311
|
value: string | number | boolean | string[] | number[] | null;
|
|
312
312
|
field: string;
|
|
313
313
|
}[] | undefined;
|
|
@@ -319,8 +319,8 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
319
319
|
input: {
|
|
320
320
|
where?: {
|
|
321
321
|
mode?: "sensitive" | "insensitive" | undefined;
|
|
322
|
+
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
322
323
|
connector?: "AND" | "OR" | undefined;
|
|
323
|
-
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
324
324
|
value: string | number | boolean | string[] | number[] | null;
|
|
325
325
|
field: string;
|
|
326
326
|
}[] | undefined;
|
|
@@ -331,31 +331,31 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
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
|
+
};
|
|
334
342
|
input: {
|
|
335
343
|
where?: {
|
|
344
|
+
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
336
345
|
connector?: "AND" | "OR" | undefined;
|
|
337
|
-
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
338
346
|
value: string | number | boolean | string[] | number[] | null;
|
|
339
347
|
field: string;
|
|
340
348
|
}[] | undefined;
|
|
341
|
-
model: string;
|
|
342
349
|
update: {
|
|
343
350
|
[x: string]: unknown;
|
|
344
351
|
[x: number]: unknown;
|
|
345
352
|
[x: symbol]: unknown;
|
|
346
353
|
};
|
|
354
|
+
model: string;
|
|
347
355
|
} | {
|
|
348
356
|
where?: any[] | undefined;
|
|
349
|
-
model: string;
|
|
350
357
|
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;
|
|
358
|
+
model: string;
|
|
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;
|
|
371
372
|
connector?: "AND" | "OR" | undefined;
|
|
372
|
-
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
373
373
|
value: string | number | boolean | string[] | number[] | null;
|
|
374
374
|
field: string;
|
|
375
375
|
}[] | undefined;
|
|
376
|
-
model: string;
|
|
377
376
|
update: {
|
|
378
377
|
[x: string]: unknown;
|
|
379
378
|
[x: number]: unknown;
|
|
380
379
|
[x: symbol]: unknown;
|
|
381
380
|
};
|
|
381
|
+
model: string;
|
|
382
382
|
} | {
|
|
383
383
|
where?: any[] | undefined;
|
|
384
|
-
model: string;
|
|
385
384
|
update: any;
|
|
385
|
+
model: string;
|
|
386
386
|
};
|
|
387
387
|
}, Promise<any>>;
|
|
388
388
|
};
|
|
@@ -1,86 +1,10 @@
|
|
|
1
1
|
import { o as Simplify } from "./types-Bqi_ivSd.js";
|
|
2
|
-
import {
|
|
2
|
+
import { t as CombinedDataTransformer } from "./transformer-BEkxlnss.js";
|
|
3
|
+
import { g as UnsetMarker, t as AnyMiddleware } from "./types-CzGsrLrY.js";
|
|
3
4
|
import { GenericActionCtx, GenericDataModel, HttpRouter } from "convex/server";
|
|
4
5
|
import { z } from "zod";
|
|
5
6
|
import { Context, Hono } from "hono";
|
|
6
7
|
|
|
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
|
|
84
8
|
//#region src/server/http-types.d.ts
|
|
85
9
|
type ProcedureMeta = object;
|
|
86
10
|
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
@@ -335,4 +259,4 @@ declare class HttpClientError extends Error {
|
|
|
335
259
|
/** Type guard for HttpClientError */
|
|
336
260
|
declare const isHttpClientError: (error: unknown) => error is HttpClientError;
|
|
337
261
|
//#endregion
|
|
338
|
-
export { HttpProcedureBuilderDef as A,
|
|
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 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as RankIndexDefinition, G as CountBackfillChunkArgs, J as CountBackfillStatusArgs, K as CountBackfillKickoffArgs, Q as CountIndexDefinition, X as CountQueryPlan, Y as AggregateQueryPlan, Z as AggregateIndexDefinition, et as RankOrderField, q as CountBackfillMode, r as OrmCapability } from "../../capabilities-
|
|
1
|
+
import { $ as RankIndexDefinition, G as CountBackfillChunkArgs, J as CountBackfillStatusArgs, K as CountBackfillKickoffArgs, Q as CountIndexDefinition, X as CountQueryPlan, Y as AggregateQueryPlan, Z as AggregateIndexDefinition, et as RankOrderField, q as CountBackfillMode, r as OrmCapability } from "../../capabilities-Bxzoofl4.js";
|
|
2
2
|
|
|
3
3
|
//#region src/orm/aggregate-index/capability.d.ts
|
|
4
4
|
/**
|