kitcn 0.12.18 → 0.12.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aggregate/index.d.ts +1 -1
- package/dist/{api-entry-BckXqaLb.js → api-entry-BUAh_K4k.js} +10 -2
- package/dist/auth/generated/index.d.ts +1 -1
- package/dist/auth/index.d.ts +2 -2
- package/dist/auth/index.js +1 -1
- package/dist/auth/nextjs/index.d.ts +1 -1
- package/dist/{backend-core-CGjsBIOp.mjs → backend-core-C0uwGXLx.mjs} +107 -14
- package/dist/{builder-Bh18Y2t0.js → builder-Cb6gloDB.js} +160 -6
- package/dist/cli.mjs +1 -1
- package/dist/{context-utils-HPC5nXzx.d.ts → context-utils-BvWW0Ilq.d.ts} +8 -1
- package/dist/crpc/index.d.ts +2 -2
- package/dist/{generated-contract-disabled-Dzx2IRId.d.ts → generated-contract-disabled-21YxPk5W.d.ts} +1 -1
- package/dist/{http-types-BS63Nsug.d.ts → http-types-BLFA9zS7.d.ts} +2 -1
- package/dist/{middleware-C5P1Q29c.js → middleware-DkIhQXwg.js} +1 -1
- package/dist/{middleware-CU0mDiRs.d.ts → middleware-nS_qXecO.d.ts} +1 -1
- package/dist/orm/index.d.ts +1 -1
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.js +1 -1
- package/dist/{procedure-caller-DL0Ubgky.js → procedure-caller-AjLfkHyF.js} +1 -1
- package/dist/{procedure-caller-DloN1DNv.d.ts → procedure-name-D-fDCBlo.d.ts} +28 -128
- package/dist/ratelimit/index.d.ts +2 -2
- package/dist/ratelimit/index.js +3 -3
- package/dist/rsc/index.d.ts +3 -3
- package/dist/server/index.d.ts +5 -5
- package/dist/server/index.js +4 -4
- package/dist/{types-DrB2VeNb.d.ts → types-C6pQrnzD.d.ts} +1 -1
- package/dist/{types-BqUIoMfT.d.ts → types-a-RHmrDZ.d.ts} +9 -1
- package/dist/watcher.mjs +12 -9
- package/dist/{where-clause-compiler-Dw3EVdi6.d.ts → where-clause-compiler-DdjN63Io.d.ts} +23 -23
- package/package.json +1 -1
- package/skills/convex/SKILL.md +8 -5
- package/skills/convex/references/features/auth-organizations.md +7 -2
package/dist/crpc/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as DataTransformer, F as decodeWire, I as defaultCRPCTransformer, L as encodeWire, M as WireCodec, N as createTaggedTransformer, O as CombinedDataTransformer, P as dateWireCodec, R as getTransformer, a as HttpProcedureCall, c as InferHttpInput, i as HttpErrorCode, j as DataTransformerOptions, k as DATE_CODEC_TAG, l as InferHttpOutput, n as HttpClientError, o as HttpRouteInfo, r as HttpClientFromRouter, s as HttpRouteMap, t as HttpClient, u as isHttpClientError, z as identityTransformer } from "../http-types-
|
|
2
|
-
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-
|
|
1
|
+
import { A as DataTransformer, F as decodeWire, I as defaultCRPCTransformer, L as encodeWire, M as WireCodec, N as createTaggedTransformer, O as CombinedDataTransformer, P as dateWireCodec, R as getTransformer, a as HttpProcedureCall, c as InferHttpInput, i as HttpErrorCode, j as DataTransformerOptions, k as DATE_CODEC_TAG, l as InferHttpOutput, n as HttpClientError, o as HttpRouteInfo, r as HttpClientFromRouter, s as HttpRouteMap, t as HttpClient, u as isHttpClientError, z as identityTransformer } from "../http-types-BLFA9zS7.js";
|
|
2
|
+
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-C6pQrnzD.js";
|
|
3
3
|
import { FunctionArgs, FunctionReference } from "convex/server";
|
|
4
4
|
|
|
5
5
|
//#region src/crpc/auth-error.d.ts
|
package/dist/{generated-contract-disabled-Dzx2IRId.d.ts → generated-contract-disabled-21YxPk5W.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as GetAuth } from "./types-BiJE7qxR.js";
|
|
2
|
-
import { t as GenericCtx } from "./context-utils-
|
|
2
|
+
import { t as GenericCtx } from "./context-utils-BvWW0Ilq.js";
|
|
3
3
|
import * as convex_server0 from "convex/server";
|
|
4
4
|
import { DocumentByName, FunctionReference, GenericDataModel, GenericMutationCtx, GenericSchema, SchemaDefinition, TableNamesInDataModel, internalMutationGeneric } from "convex/server";
|
|
5
5
|
import * as better_auth_adapters0 from "better-auth/adapters";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as Simplify } from "./types-BTb_4BaU.js";
|
|
2
|
-
import {
|
|
2
|
+
import { g as UnsetMarker, t as AnyMiddleware } from "./types-a-RHmrDZ.js";
|
|
3
3
|
import { GenericActionCtx, GenericDataModel, HttpRouter } from "convex/server";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { Context, Hono } from "hono";
|
|
@@ -103,6 +103,7 @@ interface HttpProcedureBuilderDef<TCtx, TInput extends UnsetMarker | z.ZodTypeAn
|
|
|
103
103
|
middlewares: AnyMiddleware[];
|
|
104
104
|
outputSchema?: z.ZodTypeAny;
|
|
105
105
|
paramsSchema?: z.ZodTypeAny;
|
|
106
|
+
procedureName?: string;
|
|
106
107
|
querySchema?: z.ZodTypeAny;
|
|
107
108
|
route?: HttpRouteDefinition<TMethod>;
|
|
108
109
|
}
|
package/dist/orm/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as GenericOrmCtx$1, $n as unique, $r as endsWith, $t as ManyConfig, A as ConvexDateMode, An as ConvexRankIndexBuilder, Ar as ReturningResult, At as MigrationManifestEntry, B as ConvexBytesBuilderInitial, Bn as rankIndex, Br as OrmSchemaRelations, Bt as defineMigration, C as ConvexNumberBuilderInitial, Ci as ColumnBuilderWithTableName, Cn as RlsRole, Cr as MutationReturning, Ct as MigrationStatusArgs, D as id, Di as IsPrimaryKey, Dn as ConvexAggregateIndexBuilderOn, Dr as PaginatedResult, Dt as MigrationDoc, E as ConvexIdBuilderInitial, Ei as HasDefault, En as ConvexAggregateIndexBuilder, Er as OrderDirection, Et as MigrationDirection, F as custom, Fn as ConvexVectorIndexBuilder, Fr as unsetToken, Ft as MigrationStateMap, G as ConvexBigIntBuilder, Gn as ConvexCheckConfig, Gr as ExpressionVisitor, Gt as OrmReader$1, H as ConvexBooleanBuilder, Hn as uniqueIndex, Hr as TableName, Ht as detectMigrationDrift, I as json, In as ConvexVectorIndexBuilderOn, Ir as Brand, It as MigrationStep, J as CountBackfillChunkArgs, Jn as ConvexUniqueConstraintBuilder, Jr as LogicalExpression, Jt as RlsMode, K as ConvexBigIntBuilderInitial, Kn as ConvexForeignKeyBuilder, Kr as FieldReference, Kt as OrmWriter$1, L as objectOf, Ln as ConvexVectorIndexConfig, Lr as Columns, Lt as MigrationTableName, M as ConvexCustomBuilder, Mn as ConvexSearchIndexBuilder, Mr as UpdateSet, Mt as MigrationPlan, N as ConvexCustomBuilderInitial, Nn as ConvexSearchIndexBuilderOn, Nr as VectorQueryConfig, Nt as MigrationRunStatus, O as ConvexDateBuilder, Oi as IsUnique, On as ConvexIndexBuilder, Or as PredicateWhereIndexConfig, Ot as MigrationDocContext, P as arrayOf, Pn as ConvexSearchIndexConfig, Pr as VectorSearchProvider, Pt as MigrationSet, Q as GenericOrm$1, Qn as foreignKey, Qr as contains, Qt as ExtractTablesWithRelations, R as unionOf, Rn as aggregateIndex, Rr as OrmSchemaExtensionTables, Rt as MigrationWriteMode, S as ConvexNumberBuilder, Si as ColumnBuilderTypeConfig, Sn as rlsPolicy, Sr as MutationResult, St as MigrationRunChunkArgs, T as ConvexIdBuilder, Ti as DrizzleEntity, Tn as rlsRole, Tr as OrderByClause, Tt as MigrationDefinition, U as ConvexBooleanBuilderInitial, Un as vectorIndex, Ur as SystemFields, Ut as DatabaseWithMutations, V as bytes, Vn as searchIndex, Vr as OrmSchemaTriggers, Vt as defineMigrationSet, W as boolean, Wn as ConvexCheckBuilder, Wr as BinaryExpression, Wt as DatabaseWithQuery, X as CountBackfillStatusArgs, Xn as ConvexUniqueConstraintConfig, Xr as and, Xt as extractRelationsConfig, Y as CountBackfillKickoffArgs, Yn as ConvexUniqueConstraintBuilderOn, Yr as UnaryExpression, Yt as EdgeMetadata, Z as CreateOrmOptions, Zn as check, Zr as between, Zt as ExtractTablesFromSchema, _ as ConvexTimestampMode, _i as startsWith, _n as deletion, _r as MutationExecuteConfig, _t as OrmTriggerContext, a as requireSchemaRelations, ai as inArray, an as TablesRelationalConfig, ar as AggregateResult, at as OrmWriterCtx, b as ConvexTextEnumBuilderInitial, bi as ColumnBuilderBaseConfig, bn as RlsPolicyConfig, br as MutationPaginateConfig, bt as MigrationCancelArgs, c as TableConfigResult, ci as isNull, cn as ConvexDeletionBuilder, cr as CountConfig, ct as ScheduledMutationBatchArgs, d as OrmNotFoundError, di as lte, dn as ConvexTableWithColumns, dr as FilterOperators, dt as scheduledDeleteFactory, ei as eq, en as OneConfig, er as ConvexTextBuilder, et as OrmApiResult, f as ConvexVectorBuilder, fi as ne, fn as DiscriminatorBuilderConfig, fr as GetColumnData, ft as SchemaExtension, g as ConvexTimestampBuilderInitial, gi as or, gn as convexTable, gr as InsertValue, gt as OrmTriggerChange, h as ConvexTimestampBuilder, hi as notInArray, hn as TableConfig, hr as InferSelectModel, ht as OrmTableTriggers, i as getSchemaTriggers, ii as ilike, in as TableRelationalConfig, ir as AggregateFieldValue, it as OrmReaderCtx, j as date, jn as ConvexRankIndexBuilderOn, jr as ReturningSelection, jt as MigrationMigrateOne, k as ConvexDateBuilderInitial, ki as NotNull, kn as ConvexIndexBuilderOn, kr as ReturningAll, kt as MigrationDriftIssue, l as getTableColumns, li as like, ln as ConvexDeletionConfig, lr as CountResult, lt as scheduledMutationBatchFactory, m as vector, mi as notBetween, mn as OrmLifecycleOperation, mr as InferModelFromColumns, mt as OrmBeforeResult, n as defineSchema, ni as gt, nn as RelationsBuilderColumnBase, nr as text, nt as OrmClientWithApi$1, o as asc, oi as isFieldReference, on as defineRelations, or as BuildQueryResult, ot as ResolveOrmSchema, p as ConvexVectorBuilderInitial, pi as not, pn as OrmLifecycleChange, pr as InferInsertModel, pt as defineSchemaExtension, q as bigint, qn as ConvexForeignKeyConfig, qr as FilterExpression, qt as RlsContext, r as getSchemaRelations, ri as gte, rn as RelationsBuilderColumnConfig, rr as AggregateConfig, rt as OrmFunctions, s as desc, si as isNotNull, sn as defineRelationsPart, sr as BuildRelationResult, st as createOrm, t as WhereClauseResult, ti as fieldRef, tn as RelationsBuilder, tr as ConvexTextBuilderInitial, tt as OrmClientBase$1, u as getTableConfig, ui as lt, un as ConvexTable, ur as DBQueryConfig, ut as ScheduledDeleteArgs, v as timestamp, vi as AnyColumn, vn as discriminator, vr as MutationExecuteResult, vt as OrmTriggers, w as integer, wi as ColumnDataType, wn as RlsRoleConfig, wr as MutationRunMode, wt as MigrationAppliedState, x as textEnum, xi as ColumnBuilderRuntimeConfig, xn as RlsPolicyToOption, xr as MutationPaginatedResult, xt as MigrationRunArgs, y as ConvexTextEnumBuilder, yi as ColumnBuilder, yn as RlsPolicy, yr as MutationExecutionMode, yt as defineTriggers, z as ConvexBytesBuilder, zn as index, zr as OrmSchemaExtensions, zt as buildMigrationPlan } from "../where-clause-compiler-
|
|
1
|
+
import { $ as GenericOrmCtx$1, $n as unique, $r as endsWith, $t as ManyConfig, A as ConvexDateMode, An as ConvexRankIndexBuilder, Ar as ReturningResult, At as MigrationManifestEntry, B as ConvexBytesBuilderInitial, Bn as rankIndex, Br as OrmSchemaRelations, Bt as defineMigration, C as ConvexNumberBuilderInitial, Ci as ColumnBuilderWithTableName, Cn as RlsRole, Cr as MutationReturning, Ct as MigrationStatusArgs, D as id, Di as IsPrimaryKey, Dn as ConvexAggregateIndexBuilderOn, Dr as PaginatedResult, Dt as MigrationDoc, E as ConvexIdBuilderInitial, Ei as HasDefault, En as ConvexAggregateIndexBuilder, Er as OrderDirection, Et as MigrationDirection, F as custom, Fn as ConvexVectorIndexBuilder, Fr as unsetToken, Ft as MigrationStateMap, G as ConvexBigIntBuilder, Gn as ConvexCheckConfig, Gr as ExpressionVisitor, Gt as OrmReader$1, H as ConvexBooleanBuilder, Hn as uniqueIndex, Hr as TableName, Ht as detectMigrationDrift, I as json, In as ConvexVectorIndexBuilderOn, Ir as Brand, It as MigrationStep, J as CountBackfillChunkArgs, Jn as ConvexUniqueConstraintBuilder, Jr as LogicalExpression, Jt as RlsMode, K as ConvexBigIntBuilderInitial, Kn as ConvexForeignKeyBuilder, Kr as FieldReference, Kt as OrmWriter$1, L as objectOf, Ln as ConvexVectorIndexConfig, Lr as Columns, Lt as MigrationTableName, M as ConvexCustomBuilder, Mn as ConvexSearchIndexBuilder, Mr as UpdateSet, Mt as MigrationPlan, N as ConvexCustomBuilderInitial, Nn as ConvexSearchIndexBuilderOn, Nr as VectorQueryConfig, Nt as MigrationRunStatus, O as ConvexDateBuilder, Oi as IsUnique, On as ConvexIndexBuilder, Or as PredicateWhereIndexConfig, Ot as MigrationDocContext, P as arrayOf, Pn as ConvexSearchIndexConfig, Pr as VectorSearchProvider, Pt as MigrationSet, Q as GenericOrm$1, Qn as foreignKey, Qr as contains, Qt as ExtractTablesWithRelations, R as unionOf, Rn as aggregateIndex, Rr as OrmSchemaExtensionTables, Rt as MigrationWriteMode, S as ConvexNumberBuilder, Si as ColumnBuilderTypeConfig, Sn as rlsPolicy, Sr as MutationResult, St as MigrationRunChunkArgs, T as ConvexIdBuilder, Ti as DrizzleEntity, Tn as rlsRole, Tr as OrderByClause, Tt as MigrationDefinition, U as ConvexBooleanBuilderInitial, Un as vectorIndex, Ur as SystemFields, Ut as DatabaseWithMutations, V as bytes, Vn as searchIndex, Vr as OrmSchemaTriggers, Vt as defineMigrationSet, W as boolean, Wn as ConvexCheckBuilder, Wr as BinaryExpression, Wt as DatabaseWithQuery, X as CountBackfillStatusArgs, Xn as ConvexUniqueConstraintConfig, Xr as and, Xt as extractRelationsConfig, Y as CountBackfillKickoffArgs, Yn as ConvexUniqueConstraintBuilderOn, Yr as UnaryExpression, Yt as EdgeMetadata, Z as CreateOrmOptions, Zn as check, Zr as between, Zt as ExtractTablesFromSchema, _ as ConvexTimestampMode, _i as startsWith, _n as deletion, _r as MutationExecuteConfig, _t as OrmTriggerContext, a as requireSchemaRelations, ai as inArray, an as TablesRelationalConfig, ar as AggregateResult, at as OrmWriterCtx, b as ConvexTextEnumBuilderInitial, bi as ColumnBuilderBaseConfig, bn as RlsPolicyConfig, br as MutationPaginateConfig, bt as MigrationCancelArgs, c as TableConfigResult, ci as isNull, cn as ConvexDeletionBuilder, cr as CountConfig, ct as ScheduledMutationBatchArgs, d as OrmNotFoundError, di as lte, dn as ConvexTableWithColumns, dr as FilterOperators, dt as scheduledDeleteFactory, ei as eq, en as OneConfig, er as ConvexTextBuilder, et as OrmApiResult, f as ConvexVectorBuilder, fi as ne, fn as DiscriminatorBuilderConfig, fr as GetColumnData, ft as SchemaExtension, g as ConvexTimestampBuilderInitial, gi as or, gn as convexTable, gr as InsertValue, gt as OrmTriggerChange, h as ConvexTimestampBuilder, hi as notInArray, hn as TableConfig, hr as InferSelectModel, ht as OrmTableTriggers, i as getSchemaTriggers, ii as ilike, in as TableRelationalConfig, ir as AggregateFieldValue, it as OrmReaderCtx, j as date, jn as ConvexRankIndexBuilderOn, jr as ReturningSelection, jt as MigrationMigrateOne, k as ConvexDateBuilderInitial, ki as NotNull, kn as ConvexIndexBuilderOn, kr as ReturningAll, kt as MigrationDriftIssue, l as getTableColumns, li as like, ln as ConvexDeletionConfig, lr as CountResult, lt as scheduledMutationBatchFactory, m as vector, mi as notBetween, mn as OrmLifecycleOperation, mr as InferModelFromColumns, mt as OrmBeforeResult, n as defineSchema, ni as gt, nn as RelationsBuilderColumnBase, nr as text, nt as OrmClientWithApi$1, o as asc, oi as isFieldReference, on as defineRelations, or as BuildQueryResult, ot as ResolveOrmSchema, p as ConvexVectorBuilderInitial, pi as not, pn as OrmLifecycleChange, pr as InferInsertModel, pt as defineSchemaExtension, q as bigint, qn as ConvexForeignKeyConfig, qr as FilterExpression, qt as RlsContext, r as getSchemaRelations, ri as gte, rn as RelationsBuilderColumnConfig, rr as AggregateConfig, rt as OrmFunctions, s as desc, si as isNotNull, sn as defineRelationsPart, sr as BuildRelationResult, st as createOrm, t as WhereClauseResult, ti as fieldRef, tn as RelationsBuilder, tr as ConvexTextBuilderInitial, tt as OrmClientBase$1, u as getTableConfig, ui as lt, un as ConvexTable, ur as DBQueryConfig, ut as ScheduledDeleteArgs, v as timestamp, vi as AnyColumn, vn as discriminator, vr as MutationExecuteResult, vt as OrmTriggers, w as integer, wi as ColumnDataType, wn as RlsRoleConfig, wr as MutationRunMode, wt as MigrationAppliedState, x as textEnum, xi as ColumnBuilderRuntimeConfig, xn as RlsPolicyToOption, xr as MutationPaginatedResult, xt as MigrationRunArgs, y as ConvexTextEnumBuilder, yi as ColumnBuilder, yn as RlsPolicy, yr as MutationExecutionMode, yt as defineTriggers, z as ConvexBytesBuilder, zn as index, zr as OrmSchemaExtensions, zt as buildMigrationPlan } from "../where-clause-compiler-DdjN63Io.js";
|
|
2
2
|
import { i as pretendRequired, n as deprecated, r as pretend } from "../validators-vzRKjBJC.js";
|
|
3
3
|
import { a as QueryCtxWithPreferredOrmQueryTable, i as QueryCtxWithOrmQueryTable, n as LookupByIdResultByCtx, o as getByIdWithOrmQueryFallback, r as QueryCtxWithOptionalOrmQueryTable, t as DocByCtx } from "../query-context-CFZqIvD7.js";
|
|
4
4
|
import { DefineSchemaOptions, GenericDatabaseReader, GenericDatabaseWriter, GenericSchema, SchemaDefinition } from "convex/server";
|
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-nS_qXecO.js";
|
|
2
2
|
export { type Plugin, type PluginApiScope, type PluginConfigureContext, type PluginConfigureInput, type PluginConfigureResolver, definePlugin, resolvePluginOptions };
|
package/dist/plugins/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { t as VRequired } from "./validators-vzRKjBJC.js";
|
|
2
|
-
import { C as HttpProcedure, D as ProcedureMeta, R as getTransformer, S as HttpMethod, c as InferHttpInput, d as CRPCHttpRouter, j as DataTransformerOptions, l as InferHttpOutput, p as HttpRouterRecord, w as HttpProcedureBuilderDef, x as HttpHandlerOpts } from "./http-types-
|
|
3
|
-
import {
|
|
2
|
+
import { C as HttpProcedure, D as ProcedureMeta, R as getTransformer, S as HttpMethod, c as InferHttpInput, d as CRPCHttpRouter, j as DataTransformerOptions, l as InferHttpOutput, p as HttpRouterRecord, w as HttpProcedureBuilderDef, x as HttpHandlerOpts } from "./http-types-BLFA9zS7.js";
|
|
3
|
+
import { g as UnsetMarker, i as IntersectIfDefined, o as MiddlewareBuilder, p as Overwrite$1, s as MiddlewareFunction, t as AnyMiddleware } from "./types-a-RHmrDZ.js";
|
|
4
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";
|
|
5
|
-
import * as convex_server0 from "convex/server";
|
|
6
5
|
import { ActionBuilder, ArgsArrayToObject, DefaultFunctionArgs, FunctionReference, FunctionReturnType, FunctionVisibility, GenericActionCtx, GenericDataModel, GenericMutationCtx, GenericQueryCtx, MutationBuilder, QueryBuilder, RegisteredAction, RegisteredMutation, RegisteredQuery, TableNamesInDataModel } from "convex/server";
|
|
7
6
|
import { z } from "zod";
|
|
8
7
|
import * as z$1 from "zod/v4";
|
|
@@ -593,6 +592,8 @@ interface HttpProcedureBuilder<TInitialCtx, TCtx, TInput extends UnsetMarker | z
|
|
|
593
592
|
* Return Response for custom responses, or plain object for auto JSON serialization.
|
|
594
593
|
*/
|
|
595
594
|
mutation<TResult>(handler: (opts: HttpHandlerOpts<TCtx, TInput, TParams, TQuery, TForm>) => Promise<Response | (TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult)>): HttpProcedure<TInput, TOutput, TParams, TQuery, TMethod, TForm>;
|
|
595
|
+
/** Set a server-only procedure name for middleware/logging */
|
|
596
|
+
name(value: string): HttpProcedureBuilder<TInitialCtx, TCtx, TInput, TOutput, TParams, TQuery, TMeta, TMethod, TForm>;
|
|
596
597
|
/** Define response schema */
|
|
597
598
|
output<TSchema extends z.ZodTypeAny>(schema: TSchema): HttpProcedureBuilder<TInitialCtx, TCtx, TInput, TSchema, TParams, TQuery, TMeta, TMethod, TForm>;
|
|
598
599
|
/** Define path parameter schema (for :param in path) */
|
|
@@ -736,6 +737,7 @@ type ProcedureBuilderDef<TMeta = object> = {
|
|
|
736
737
|
inputSchemas: Record<string, any>[];
|
|
737
738
|
outputSchema?: z.ZodTypeAny;
|
|
738
739
|
meta?: TMeta;
|
|
740
|
+
procedureName?: string;
|
|
739
741
|
functionConfig: InternalFunctionConfig; /** Whether this procedure uses internal function (not exposed to clients) */
|
|
740
742
|
isInternal?: boolean;
|
|
741
743
|
};
|
|
@@ -760,39 +762,11 @@ declare class ProcedureBuilder<TBaseCtx, _TContext, TContextOverrides extends Un
|
|
|
760
762
|
protected _output<TNewOutput extends z.ZodTypeAny>(schema: TNewOutput): ProcedureBuilderDef<TMeta>;
|
|
761
763
|
/** Set procedure metadata (shallow merged when chained) - to be overridden by subclasses */
|
|
762
764
|
protected _meta(value: TMeta): ProcedureBuilderDef<TMeta>;
|
|
765
|
+
/** Set server-only procedure name for middleware/logging */
|
|
766
|
+
protected _name(value: string): ProcedureBuilderDef<TMeta>;
|
|
763
767
|
/** Merge all input schemas into one */
|
|
764
768
|
protected _getMergedInput(): Record<string, any> | undefined;
|
|
765
|
-
protected _createFunction(handler: any, baseFunction: any, customFn: typeof zCustomQuery | typeof zCustomMutation | typeof zCustomAction, fnType: 'query' | 'mutation' | 'action'):
|
|
766
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
767
|
-
}>, z.core.$strip> ? TShape : Record<string, never>] extends [z.core.$ZodObject<any, z.core.$ZodObjectConfig>] ? [z.core.input<z.core.$ZodObject<any, z.core.$ZodObjectConfig> & (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
768
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
769
|
-
}>, z.core.$strip> ? TShape : Record<string, never>)>] : (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
770
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
771
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) extends infer T ? T extends (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
772
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
773
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) ? T extends Record<string, never> ? [{}] : [T] extends [Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>] ? [z.core.$InferObjectInput<T, {}>] : [convex_server0.DefaultFunctionArgs] : never : never>, (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) extends infer T_1 ? T_1 extends (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) ? T_1 extends void ? Promise<any> : [T_1] extends [z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>] ? Promise<z.core.output<T_1> extends infer T_2 ? T_2 extends z.core.output<T_1> ? T_2 extends null ? void | T_2 | undefined : T_2 : never : never> | (z.core.output<T_1> extends infer T_3 ? T_3 extends z.core.output<T_1> ? T_3 extends null ? void | T_3 | undefined : T_3 : never : never) : [T_1] extends [{
|
|
774
|
-
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
775
|
-
}] ? Promise<z.core.$InferObjectOutput<T_1, {}> extends infer T_4 ? T_4 extends z.core.$InferObjectOutput<T_1, {}> ? T_4 extends null ? void | T_4 | undefined : T_4 : never : never> | (z.core.$InferObjectOutput<T_1, {}> extends infer T_5 ? T_5 extends z.core.$InferObjectOutput<T_1, {}> ? T_5 extends null ? void | T_5 | undefined : T_5 : never : never) : any : never : never> | convex_server0.RegisteredQuery<convex_server0.FunctionVisibility, convex_server0.ArgsArrayToObject<[TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
776
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
777
|
-
}>, z.core.$strip> ? TShape : Record<string, never>] extends [z.core.$ZodObject<any, z.core.$ZodObjectConfig>] ? [z.core.input<z.core.$ZodObject<any, z.core.$ZodObjectConfig> & (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
778
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
779
|
-
}>, z.core.$strip> ? TShape : Record<string, never>)>] : (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
780
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
781
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) extends infer T_6 ? T_6 extends (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
782
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
783
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) ? T_6 extends Record<string, never> ? [{}] : [T_6] extends [Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>] ? [z.core.$InferObjectInput<T_6, {}>] : [convex_server0.DefaultFunctionArgs] : never : never>, (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) extends infer T_7 ? T_7 extends (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) ? T_7 extends void ? Promise<any> : [T_7] extends [z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>] ? Promise<z.core.output<T_7> extends infer T_8 ? T_8 extends z.core.output<T_7> ? T_8 extends null ? void | T_8 | undefined : T_8 : never : never> | (z.core.output<T_7> extends infer T_9 ? T_9 extends z.core.output<T_7> ? T_9 extends null ? void | T_9 | undefined : T_9 : never : never) : [T_7] extends [{
|
|
784
|
-
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
785
|
-
}] ? Promise<z.core.$InferObjectOutput<T_7, {}> extends infer T_10 ? T_10 extends z.core.$InferObjectOutput<T_7, {}> ? T_10 extends null ? void | T_10 | undefined : T_10 : never : never> | (z.core.$InferObjectOutput<T_7, {}> extends infer T_11 ? T_11 extends z.core.$InferObjectOutput<T_7, {}> ? T_11 extends null ? void | T_11 | undefined : T_11 : never : never) : any : never : never> | convex_server0.RegisteredAction<convex_server0.FunctionVisibility, convex_server0.ArgsArrayToObject<[TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
786
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
787
|
-
}>, z.core.$strip> ? TShape : Record<string, never>] extends [z.core.$ZodObject<any, z.core.$ZodObjectConfig>] ? [z.core.input<z.core.$ZodObject<any, z.core.$ZodObjectConfig> & (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
788
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
789
|
-
}>, z.core.$strip> ? TShape : Record<string, never>)>] : (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
790
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
791
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) extends infer T_12 ? T_12 extends (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
792
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
793
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) ? T_12 extends Record<string, never> ? [{}] : [T_12] extends [Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>] ? [z.core.$InferObjectInput<T_12, {}>] : [convex_server0.DefaultFunctionArgs] : never : never>, (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) extends infer T_13 ? T_13 extends (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) ? T_13 extends void ? Promise<any> : [T_13] extends [z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>] ? Promise<z.core.output<T_13> extends infer T_14 ? T_14 extends z.core.output<T_13> ? T_14 extends null ? void | T_14 | undefined : T_14 : never : never> | (z.core.output<T_13> extends infer T_15 ? T_15 extends z.core.output<T_13> ? T_15 extends null ? void | T_15 | undefined : T_15 : never : never) : [T_13] extends [{
|
|
794
|
-
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
795
|
-
}] ? Promise<z.core.$InferObjectOutput<T_13, {}> extends infer T_16 ? T_16 extends z.core.$InferObjectOutput<T_13, {}> ? T_16 extends null ? void | T_16 | undefined : T_16 : never : never> | (z.core.$InferObjectOutput<T_13, {}> extends infer T_17 ? T_17 extends z.core.$InferObjectOutput<T_13, {}> ? T_17 extends null ? void | T_17 | undefined : T_17 : never : never) : any : never : never>;
|
|
769
|
+
protected _createFunction(handler: any, baseFunction: any, customFn: typeof zCustomQuery | typeof zCustomMutation | typeof zCustomAction, fnType: 'query' | 'mutation' | 'action'): Record<string, unknown>;
|
|
796
770
|
}
|
|
797
771
|
/**
|
|
798
772
|
* Query-specific procedure builder
|
|
@@ -808,6 +782,8 @@ declare class QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides extend
|
|
|
808
782
|
TMeta, $ContextOverridesOut, InferMiddlewareInput<TInput>>): QueryProcedureBuilder<TBaseCtx, TContext, Overwrite$1<TContextOverrides, $ContextOverridesOut>, TInput, TClientInput, TOutput, TMeta>;
|
|
809
783
|
/** Set procedure metadata (shallow merged when chained) */
|
|
810
784
|
meta(value: TMeta): QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TClientInput, TOutput, TMeta>;
|
|
785
|
+
/** Set a server-only procedure name for middleware/logging */
|
|
786
|
+
name(value: string): QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TClientInput, TOutput, TMeta>;
|
|
811
787
|
/** Define input schema (chainable - schemas are merged) */
|
|
812
788
|
input<TNewInput extends z.ZodObject<any>>(schema: TNewInput): QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides, IntersectIfDefined<TInput, TNewInput>, IntersectIfDefined<TClientInput, TNewInput>, TOutput, TMeta>;
|
|
813
789
|
/**
|
|
@@ -833,37 +809,7 @@ declare class QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides extend
|
|
|
833
809
|
query<TResult>(handler: (opts: {
|
|
834
810
|
ctx: Overwrite$1<TContext, TContextOverrides>;
|
|
835
811
|
input: InferInput<TInput>;
|
|
836
|
-
}) => Promise<TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult>):
|
|
837
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
838
|
-
}>, z.core.$strip> ? TShape : Record<string, never>] extends [z.core.$ZodObject<any, z.core.$ZodObjectConfig>] ? [z.core.input<z.core.$ZodObject<any, z.core.$ZodObjectConfig> & (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
839
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
840
|
-
}>, z.core.$strip> ? TShape : Record<string, never>)>] : (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
841
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
842
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) extends infer T ? T extends (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
843
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
844
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) ? T extends Record<string, never> ? [{}] : [T] extends [Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>] ? [z.core.$InferObjectInput<T, {}>] : [convex_server0.DefaultFunctionArgs] : never : never>, (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) extends infer T_1 ? T_1 extends (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) ? T_1 extends void ? Promise<any> : [T_1] extends [z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>] ? Promise<z.core.output<T_1> extends infer T_2 ? T_2 extends z.core.output<T_1> ? T_2 extends null ? void | T_2 | undefined : T_2 : never : never> | (z.core.output<T_1> extends infer T_3 ? T_3 extends z.core.output<T_1> ? T_3 extends null ? void | T_3 | undefined : T_3 : never : never) : [T_1] extends [{
|
|
845
|
-
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
846
|
-
}] ? Promise<z.core.$InferObjectOutput<T_1, {}> extends infer T_4 ? T_4 extends z.core.$InferObjectOutput<T_1, {}> ? T_4 extends null ? void | T_4 | undefined : T_4 : never : never> | (z.core.$InferObjectOutput<T_1, {}> extends infer T_5 ? T_5 extends z.core.$InferObjectOutput<T_1, {}> ? T_5 extends null ? void | T_5 | undefined : T_5 : never : never) : any : never : never> | convex_server0.RegisteredQuery<convex_server0.FunctionVisibility, convex_server0.ArgsArrayToObject<[TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
847
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
848
|
-
}>, z.core.$strip> ? TShape : Record<string, never>] extends [z.core.$ZodObject<any, z.core.$ZodObjectConfig>] ? [z.core.input<z.core.$ZodObject<any, z.core.$ZodObjectConfig> & (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
849
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
850
|
-
}>, z.core.$strip> ? TShape : Record<string, never>)>] : (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
851
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
852
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) extends infer T_6 ? T_6 extends (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
853
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
854
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) ? T_6 extends Record<string, never> ? [{}] : [T_6] extends [Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>] ? [z.core.$InferObjectInput<T_6, {}>] : [convex_server0.DefaultFunctionArgs] : never : never>, (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) extends infer T_7 ? T_7 extends (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) ? T_7 extends void ? Promise<any> : [T_7] extends [z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>] ? Promise<z.core.output<T_7> extends infer T_8 ? T_8 extends z.core.output<T_7> ? T_8 extends null ? void | T_8 | undefined : T_8 : never : never> | (z.core.output<T_7> extends infer T_9 ? T_9 extends z.core.output<T_7> ? T_9 extends null ? void | T_9 | undefined : T_9 : never : never) : [T_7] extends [{
|
|
855
|
-
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
856
|
-
}] ? Promise<z.core.$InferObjectOutput<T_7, {}> extends infer T_10 ? T_10 extends z.core.$InferObjectOutput<T_7, {}> ? T_10 extends null ? void | T_10 | undefined : T_10 : never : never> | (z.core.$InferObjectOutput<T_7, {}> extends infer T_11 ? T_11 extends z.core.$InferObjectOutput<T_7, {}> ? T_11 extends null ? void | T_11 | undefined : T_11 : never : never) : any : never : never> | convex_server0.RegisteredAction<convex_server0.FunctionVisibility, convex_server0.ArgsArrayToObject<[TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
857
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
858
|
-
}>, z.core.$strip> ? TShape : Record<string, never>] extends [z.core.$ZodObject<any, z.core.$ZodObjectConfig>] ? [z.core.input<z.core.$ZodObject<any, z.core.$ZodObjectConfig> & (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
859
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
860
|
-
}>, z.core.$strip> ? TShape : Record<string, never>)>] : (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
861
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
862
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) extends infer T_12 ? T_12 extends (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
863
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
864
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) ? T_12 extends Record<string, never> ? [{}] : [T_12] extends [Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>] ? [z.core.$InferObjectInput<T_12, {}>] : [convex_server0.DefaultFunctionArgs] : never : never>, (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) extends infer T_13 ? T_13 extends (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) ? T_13 extends void ? Promise<any> : [T_13] extends [z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>] ? Promise<z.core.output<T_13> extends infer T_14 ? T_14 extends z.core.output<T_13> ? T_14 extends null ? void | T_14 | undefined : T_14 : never : never> | (z.core.output<T_13> extends infer T_15 ? T_15 extends z.core.output<T_13> ? T_15 extends null ? void | T_15 | undefined : T_15 : never : never) : [T_13] extends [{
|
|
865
|
-
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
866
|
-
}] ? Promise<z.core.$InferObjectOutput<T_13, {}> extends infer T_16 ? T_16 extends z.core.$InferObjectOutput<T_13, {}> ? T_16 extends null ? void | T_16 | undefined : T_16 : never : never> | (z.core.$InferObjectOutput<T_13, {}> extends infer T_17 ? T_17 extends z.core.$InferObjectOutput<T_13, {}> ? T_17 extends null ? void | T_17 | undefined : T_17 : never : never) : any : never : never>) & CRPCFunctionTypeHint<InferClientInput<TClientInput>, TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult>;
|
|
812
|
+
}) => Promise<TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult>): Record<string, unknown> & CRPCFunctionTypeHint<InferClientInput<TClientInput>, TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult>;
|
|
867
813
|
/** Mark as internal - returns chainable builder using internal function */
|
|
868
814
|
internal(): QueryProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TClientInput, TOutput, TMeta>;
|
|
869
815
|
}
|
|
@@ -881,6 +827,8 @@ declare class MutationProcedureBuilder<TBaseCtx, TContext, TContextOverrides ext
|
|
|
881
827
|
TMeta, $ContextOverridesOut, InferMiddlewareInput<TInput>>): MutationProcedureBuilder<TBaseCtx, TContext, Overwrite$1<TContextOverrides, $ContextOverridesOut>, TInput, TOutput, TMeta>;
|
|
882
828
|
/** Set procedure metadata (shallow merged when chained) */
|
|
883
829
|
meta(value: TMeta): MutationProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TOutput, TMeta>;
|
|
830
|
+
/** Set a server-only procedure name for middleware/logging */
|
|
831
|
+
name(value: string): MutationProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TOutput, TMeta>;
|
|
884
832
|
/** Define input schema (chainable - schemas are merged) */
|
|
885
833
|
input<TNewInput extends z.ZodObject<any>>(schema: TNewInput): MutationProcedureBuilder<TBaseCtx, TContext, TContextOverrides, IntersectIfDefined<TInput, TNewInput>, TOutput, TMeta>;
|
|
886
834
|
/** Define output schema */
|
|
@@ -889,37 +837,7 @@ declare class MutationProcedureBuilder<TBaseCtx, TContext, TContextOverrides ext
|
|
|
889
837
|
mutation<TResult>(handler: (opts: {
|
|
890
838
|
ctx: Overwrite$1<TContext, TContextOverrides>;
|
|
891
839
|
input: InferInput<TInput>;
|
|
892
|
-
}) => Promise<TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult>):
|
|
893
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
894
|
-
}>, z.core.$strip> ? TShape : Record<string, never>] extends [z.core.$ZodObject<any, z.core.$ZodObjectConfig>] ? [z.core.input<z.core.$ZodObject<any, z.core.$ZodObjectConfig> & (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
895
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
896
|
-
}>, z.core.$strip> ? TShape : Record<string, never>)>] : (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
897
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
898
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) extends infer T ? T extends (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
899
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
900
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) ? T extends Record<string, never> ? [{}] : [T] extends [Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>] ? [z.core.$InferObjectInput<T, {}>] : [convex_server0.DefaultFunctionArgs] : never : never>, (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) extends infer T_1 ? T_1 extends (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) ? T_1 extends void ? Promise<any> : [T_1] extends [z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>] ? Promise<z.core.output<T_1> extends infer T_2 ? T_2 extends z.core.output<T_1> ? T_2 extends null ? void | T_2 | undefined : T_2 : never : never> | (z.core.output<T_1> extends infer T_3 ? T_3 extends z.core.output<T_1> ? T_3 extends null ? void | T_3 | undefined : T_3 : never : never) : [T_1] extends [{
|
|
901
|
-
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
902
|
-
}] ? Promise<z.core.$InferObjectOutput<T_1, {}> extends infer T_4 ? T_4 extends z.core.$InferObjectOutput<T_1, {}> ? T_4 extends null ? void | T_4 | undefined : T_4 : never : never> | (z.core.$InferObjectOutput<T_1, {}> extends infer T_5 ? T_5 extends z.core.$InferObjectOutput<T_1, {}> ? T_5 extends null ? void | T_5 | undefined : T_5 : never : never) : any : never : never> | convex_server0.RegisteredQuery<convex_server0.FunctionVisibility, convex_server0.ArgsArrayToObject<[TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
903
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
904
|
-
}>, z.core.$strip> ? TShape : Record<string, never>] extends [z.core.$ZodObject<any, z.core.$ZodObjectConfig>] ? [z.core.input<z.core.$ZodObject<any, z.core.$ZodObjectConfig> & (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
905
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
906
|
-
}>, z.core.$strip> ? TShape : Record<string, never>)>] : (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
907
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
908
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) extends infer T_6 ? T_6 extends (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
909
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
910
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) ? T_6 extends Record<string, never> ? [{}] : [T_6] extends [Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>] ? [z.core.$InferObjectInput<T_6, {}>] : [convex_server0.DefaultFunctionArgs] : never : never>, (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) extends infer T_7 ? T_7 extends (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) ? T_7 extends void ? Promise<any> : [T_7] extends [z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>] ? Promise<z.core.output<T_7> extends infer T_8 ? T_8 extends z.core.output<T_7> ? T_8 extends null ? void | T_8 | undefined : T_8 : never : never> | (z.core.output<T_7> extends infer T_9 ? T_9 extends z.core.output<T_7> ? T_9 extends null ? void | T_9 | undefined : T_9 : never : never) : [T_7] extends [{
|
|
911
|
-
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
912
|
-
}] ? Promise<z.core.$InferObjectOutput<T_7, {}> extends infer T_10 ? T_10 extends z.core.$InferObjectOutput<T_7, {}> ? T_10 extends null ? void | T_10 | undefined : T_10 : never : never> | (z.core.$InferObjectOutput<T_7, {}> extends infer T_11 ? T_11 extends z.core.$InferObjectOutput<T_7, {}> ? T_11 extends null ? void | T_11 | undefined : T_11 : never : never) : any : never : never> | convex_server0.RegisteredAction<convex_server0.FunctionVisibility, convex_server0.ArgsArrayToObject<[TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
913
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
914
|
-
}>, z.core.$strip> ? TShape : Record<string, never>] extends [z.core.$ZodObject<any, z.core.$ZodObjectConfig>] ? [z.core.input<z.core.$ZodObject<any, z.core.$ZodObjectConfig> & (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
915
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
916
|
-
}>, z.core.$strip> ? TShape : Record<string, never>)>] : (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
917
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
918
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) extends infer T_12 ? T_12 extends (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
919
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
920
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) ? T_12 extends Record<string, never> ? [{}] : [T_12] extends [Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>] ? [z.core.$InferObjectInput<T_12, {}>] : [convex_server0.DefaultFunctionArgs] : never : never>, (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) extends infer T_13 ? T_13 extends (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) ? T_13 extends void ? Promise<any> : [T_13] extends [z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>] ? Promise<z.core.output<T_13> extends infer T_14 ? T_14 extends z.core.output<T_13> ? T_14 extends null ? void | T_14 | undefined : T_14 : never : never> | (z.core.output<T_13> extends infer T_15 ? T_15 extends z.core.output<T_13> ? T_15 extends null ? void | T_15 | undefined : T_15 : never : never) : [T_13] extends [{
|
|
921
|
-
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
922
|
-
}] ? Promise<z.core.$InferObjectOutput<T_13, {}> extends infer T_16 ? T_16 extends z.core.$InferObjectOutput<T_13, {}> ? T_16 extends null ? void | T_16 | undefined : T_16 : never : never> | (z.core.$InferObjectOutput<T_13, {}> extends infer T_17 ? T_17 extends z.core.$InferObjectOutput<T_13, {}> ? T_17 extends null ? void | T_17 | undefined : T_17 : never : never) : any : never : never>) & CRPCFunctionTypeHint<InferClientInput<TInput>, TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult>;
|
|
840
|
+
}) => Promise<TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult>): Record<string, unknown> & CRPCFunctionTypeHint<InferClientInput<TInput>, TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult>;
|
|
923
841
|
/** Mark as internal - returns chainable builder using internal function */
|
|
924
842
|
internal(): MutationProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TOutput, TMeta>;
|
|
925
843
|
}
|
|
@@ -933,6 +851,8 @@ declare class ActionProcedureBuilder<TBaseCtx, TContext, TContextOverrides exten
|
|
|
933
851
|
TMeta, $ContextOverridesOut, InferMiddlewareInput<TInput>>): ActionProcedureBuilder<TBaseCtx, TContext, Overwrite$1<TContextOverrides, $ContextOverridesOut>, TInput, TOutput, TMeta>;
|
|
934
852
|
/** Set procedure metadata (shallow merged when chained) */
|
|
935
853
|
meta(value: TMeta): ActionProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TOutput, TMeta>;
|
|
854
|
+
/** Set a server-only procedure name for middleware/logging */
|
|
855
|
+
name(value: string): ActionProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TOutput, TMeta>;
|
|
936
856
|
/** Define input schema (chainable - schemas are merged) */
|
|
937
857
|
input<TNewInput extends z.ZodObject<any>>(schema: TNewInput): ActionProcedureBuilder<TBaseCtx, TContext, TContextOverrides, IntersectIfDefined<TInput, TNewInput>, TOutput, TMeta>;
|
|
938
858
|
/** Define output schema */
|
|
@@ -941,37 +861,7 @@ declare class ActionProcedureBuilder<TBaseCtx, TContext, TContextOverrides exten
|
|
|
941
861
|
action<TResult>(handler: (opts: {
|
|
942
862
|
ctx: Overwrite$1<TContext, TContextOverrides>;
|
|
943
863
|
input: InferInput<TInput>;
|
|
944
|
-
}) => Promise<TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult>):
|
|
945
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
946
|
-
}>, z.core.$strip> ? TShape : Record<string, never>] extends [z.core.$ZodObject<any, z.core.$ZodObjectConfig>] ? [z.core.input<z.core.$ZodObject<any, z.core.$ZodObjectConfig> & (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
947
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
948
|
-
}>, z.core.$strip> ? TShape : Record<string, never>)>] : (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
949
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
950
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) extends infer T ? T extends (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
951
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
952
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) ? T extends Record<string, never> ? [{}] : [T] extends [Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>] ? [z.core.$InferObjectInput<T, {}>] : [convex_server0.DefaultFunctionArgs] : never : never>, (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) extends infer T_1 ? T_1 extends (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) ? T_1 extends void ? Promise<any> : [T_1] extends [z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>] ? Promise<z.core.output<T_1> extends infer T_2 ? T_2 extends z.core.output<T_1> ? T_2 extends null ? void | T_2 | undefined : T_2 : never : never> | (z.core.output<T_1> extends infer T_3 ? T_3 extends z.core.output<T_1> ? T_3 extends null ? void | T_3 | undefined : T_3 : never : never) : [T_1] extends [{
|
|
953
|
-
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
954
|
-
}] ? Promise<z.core.$InferObjectOutput<T_1, {}> extends infer T_4 ? T_4 extends z.core.$InferObjectOutput<T_1, {}> ? T_4 extends null ? void | T_4 | undefined : T_4 : never : never> | (z.core.$InferObjectOutput<T_1, {}> extends infer T_5 ? T_5 extends z.core.$InferObjectOutput<T_1, {}> ? T_5 extends null ? void | T_5 | undefined : T_5 : never : never) : any : never : never> | convex_server0.RegisteredQuery<convex_server0.FunctionVisibility, convex_server0.ArgsArrayToObject<[TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
955
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
956
|
-
}>, z.core.$strip> ? TShape : Record<string, never>] extends [z.core.$ZodObject<any, z.core.$ZodObjectConfig>] ? [z.core.input<z.core.$ZodObject<any, z.core.$ZodObjectConfig> & (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
957
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
958
|
-
}>, z.core.$strip> ? TShape : Record<string, never>)>] : (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
959
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
960
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) extends infer T_6 ? T_6 extends (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
961
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
962
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) ? T_6 extends Record<string, never> ? [{}] : [T_6] extends [Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>] ? [z.core.$InferObjectInput<T_6, {}>] : [convex_server0.DefaultFunctionArgs] : never : never>, (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) extends infer T_7 ? T_7 extends (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) ? T_7 extends void ? Promise<any> : [T_7] extends [z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>] ? Promise<z.core.output<T_7> extends infer T_8 ? T_8 extends z.core.output<T_7> ? T_8 extends null ? void | T_8 | undefined : T_8 : never : never> | (z.core.output<T_7> extends infer T_9 ? T_9 extends z.core.output<T_7> ? T_9 extends null ? void | T_9 | undefined : T_9 : never : never) : [T_7] extends [{
|
|
963
|
-
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
964
|
-
}] ? Promise<z.core.$InferObjectOutput<T_7, {}> extends infer T_10 ? T_10 extends z.core.$InferObjectOutput<T_7, {}> ? T_10 extends null ? void | T_10 | undefined : T_10 : never : never> | (z.core.$InferObjectOutput<T_7, {}> extends infer T_11 ? T_11 extends z.core.$InferObjectOutput<T_7, {}> ? T_11 extends null ? void | T_11 | undefined : T_11 : never : never) : any : never : never> | convex_server0.RegisteredAction<convex_server0.FunctionVisibility, convex_server0.ArgsArrayToObject<[TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
965
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
966
|
-
}>, z.core.$strip> ? TShape : Record<string, never>] extends [z.core.$ZodObject<any, z.core.$ZodObjectConfig>] ? [z.core.input<z.core.$ZodObject<any, z.core.$ZodObjectConfig> & (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
967
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
968
|
-
}>, z.core.$strip> ? TShape : Record<string, never>)>] : (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
969
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
970
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) extends infer T_12 ? T_12 extends (TInput extends z.ZodObject<infer TShape extends Readonly<{
|
|
971
|
-
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
972
|
-
}>, z.core.$strip> ? TShape : Record<string, never>) ? T_12 extends Record<string, never> ? [{}] : [T_12] extends [Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>] ? [z.core.$InferObjectInput<T_12, {}>] : [convex_server0.DefaultFunctionArgs] : never : never>, (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) extends infer T_13 ? T_13 extends (TOutput extends z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> ? TOutput : never) ? T_13 extends void ? Promise<any> : [T_13] extends [z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>] ? Promise<z.core.output<T_13> extends infer T_14 ? T_14 extends z.core.output<T_13> ? T_14 extends null ? void | T_14 | undefined : T_14 : never : never> | (z.core.output<T_13> extends infer T_15 ? T_15 extends z.core.output<T_13> ? T_15 extends null ? void | T_15 | undefined : T_15 : never : never) : [T_13] extends [{
|
|
973
|
-
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
974
|
-
}] ? Promise<z.core.$InferObjectOutput<T_13, {}> extends infer T_16 ? T_16 extends z.core.$InferObjectOutput<T_13, {}> ? T_16 extends null ? void | T_16 | undefined : T_16 : never : never> | (z.core.$InferObjectOutput<T_13, {}> extends infer T_17 ? T_17 extends z.core.$InferObjectOutput<T_13, {}> ? T_17 extends null ? void | T_17 | undefined : T_17 : never : never) : any : never : never>) & CRPCFunctionTypeHint<InferClientInput<TInput>, TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult>;
|
|
864
|
+
}) => Promise<TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult>): Record<string, unknown> & CRPCFunctionTypeHint<InferClientInput<TInput>, TOutput extends z.ZodTypeAny ? z.infer<TOutput> : TResult>;
|
|
975
865
|
/** Mark as internal - returns chainable builder using internal function */
|
|
976
866
|
internal(): ActionProcedureBuilder<TBaseCtx, TContext, TContextOverrides, TInput, TOutput, TMeta>;
|
|
977
867
|
}
|
|
@@ -1466,4 +1356,14 @@ type GeneratedRegistrySource<TCallerRegistry extends GeneratedProcedureRegistry,
|
|
|
1466
1356
|
type GeneratedRegistryRuntimeResult<TQueryCtx, TMutationCtx, TCallerRegistry extends GeneratedProcedureRegistry, TActionCtx, THandlerRegistry extends GeneratedProcedureRegistry | undefined> = THandlerRegistry extends GeneratedProcedureRegistry ? GeneratedRegistryRuntimeWithHandler<TQueryCtx, TMutationCtx, TCallerRegistry, Exclude<THandlerRegistry, undefined>, TActionCtx> : GeneratedRegistryRuntime<TQueryCtx, TMutationCtx, TCallerRegistry, TActionCtx>;
|
|
1467
1357
|
declare function createGeneratedRegistryRuntime<TQueryCtx, TMutationCtx, TCallerRegistry extends GeneratedProcedureRegistry, TActionCtx = never, THandlerRegistry extends GeneratedProcedureRegistry | undefined = undefined>(createRegistryOrRegistry: GeneratedRegistrySource<TCallerRegistry, THandlerRegistry>): GeneratedRegistryRuntimeResult<TQueryCtx, TMutationCtx, TCallerRegistry, TActionCtx, THandlerRegistry>;
|
|
1468
1358
|
//#endregion
|
|
1469
|
-
|
|
1359
|
+
//#region src/server/procedure-name.d.ts
|
|
1360
|
+
type ProcedureNameEntry = {
|
|
1361
|
+
column: number;
|
|
1362
|
+
line: number;
|
|
1363
|
+
name: string;
|
|
1364
|
+
};
|
|
1365
|
+
type ProcedureNameLookup = Record<string, ProcedureNameEntry[]>;
|
|
1366
|
+
declare function registerProcedureNameLookup(lookup: ProcedureNameLookup, functionsDirHint: string): void;
|
|
1367
|
+
declare function inferProcedureNameFromCallsite(): string | undefined;
|
|
1368
|
+
//#endregion
|
|
1369
|
+
export { CRPCFunctionTypeHint as $, CRPCError as A, createEnv as B, createProcedureHandlerFactory as C, zid as Ct, WithHttpRouter as D, zodToConvexFields as Dt, typedProcedureResolver as E, zodToConvex as Et, getCRPCErrorFromUnknown as F, CallerMeta as G, createCallerFactory as H, getHTTPStatusCodeFromError as I, createServerCaller as J, CallerOpts as K, isCRPCError as L, CRPCErrorData as M, CRPC_ERROR_CODES_BY_KEY as N, inferApiInputs as O, CRPC_ERROR_CODE_TO_HTTP as P, ActionProcedureBuilder as Q, toCRPCError as R, createProcedureCallerFactory as S, zCustomQuery as St, getGeneratedFunctionReference as T, zodOutputToConvexFields as Tt, LazyCaller as U, ConvexContext as V, createLazyCaller as W, createGeneratedFunctionReference as X, createApiLeaf as Y, getGeneratedValue as Z, ProcedureSchedulableCallerFromRegistry as _, convexToZod as _t, CreateProcedureCallerFactoryOptions as a, HttpProcedureBuilder as at, createGenericCallerFactory as b, zCustomAction as bt, GeneratedRegistryCallerFactory as c, handleHttpError as ct, GeneratedRegistryHandlerForContext as d, ConvexValidatorFromZodOutput as dt, MutationProcedureBuilder as et, ProcedureActionCallerFromRegistry as f, CustomBuilder as ft, ProcedureFromFunctionReference as g, ZodValidatorFromConvex as gt, ProcedureDefinition as h, ZodFromValidatorBase as ht, registerProcedureNameLookup as i, initCRPC as it, CRPCErrorCode as j, inferApiOutputs as k, GeneratedRegistryCallerForContext as l, matchPathParams as lt, ProcedureCallerFromRegistry as m, Zid as mt, ProcedureNameLookup as n, QueryProcedureBuilder as nt, GeneratedProcedureRegistry as o, createHttpProcedureBuilder as ot, ProcedureCaller as p, ZCustomCtx as pt, ServerCaller as q, inferProcedureNameFromCallsite as r, createMiddlewareFactory as rt, GeneratedProcedureRegistryEntry as s, extractPathParams as st, ProcedureNameEntry as t, ProcedureBuilder as tt, GeneratedRegistryHandlerFactory as u, ConvexValidatorFromZod as ut, ProcedureScheduleCallerFromRegistry as v, convexToZodFields as vt, defineProcedure as w, zodOutputToConvex as wt, createGenericHandlerFactory as x, zCustomMutation as xt, createGeneratedRegistryRuntime as y, withSystemFields 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-a-RHmrDZ.js";
|
|
2
|
+
import { t as Plugin } from "../middleware-nS_qXecO.js";
|
|
3
3
|
import * as convex_server0 from "convex/server";
|
|
4
4
|
|
|
5
5
|
//#region src/ratelimit/duration.d.ts
|
package/dist/ratelimit/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as definePlugin } from "../middleware-
|
|
1
|
+
import { u as requireMutationCtx } from "../api-entry-BUAh_K4k.js";
|
|
2
|
+
import { _ as CRPCError } from "../builder-Cb6gloDB.js";
|
|
3
|
+
import { t as definePlugin } from "../middleware-DkIhQXwg.js";
|
|
4
4
|
import { v } from "convex/values";
|
|
5
5
|
import { mutationGeneric, queryGeneric } from "convex/server";
|
|
6
6
|
|
package/dist/rsc/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as DeepPartial, o as Simplify, r as DistributiveOmit } from "../types-BTb_4BaU.js";
|
|
2
|
-
import { C as HttpProcedure, d as CRPCHttpRouter, j as DataTransformerOptions, p as HttpRouterRecord } from "../http-types-
|
|
3
|
-
import {
|
|
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-
|
|
2
|
+
import { C as HttpProcedure, d as CRPCHttpRouter, j as DataTransformerOptions, p as HttpRouterRecord } from "../http-types-BLFA9zS7.js";
|
|
3
|
+
import { g as UnsetMarker } from "../types-a-RHmrDZ.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-C6pQrnzD.js";
|
|
5
5
|
import { FunctionArgs, FunctionReference, FunctionReturnType } from "convex/server";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { DefaultError, QueryFilters, SkipToken, UseMutationOptions, UseQueryOptions } from "@tanstack/react-query";
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { C as HttpProcedure, D as ProcedureMeta, E as InferHttpInput, S as HttpMethod, T as HttpRouteDefinition, _ as extractRouteMap, b as HttpActionHandler, d as CRPCHttpRouter, f as HttpRouterDef, g as createHttpRouterFactory, h as createHttpRouter, m as HttpRouterWithHono, p as HttpRouterRecord, v as CRPCHonoHandler, w as HttpProcedureBuilderDef, x as HttpHandlerOpts, y as HttpActionConstructor } from "../http-types-
|
|
3
|
-
import { a as MergeZodObjects, c as MiddlewareMarker, d as
|
|
4
|
-
import { a as
|
|
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, MiddlewareResult, MutationProcedureBuilder, Overwrite, ProcedureActionCallerFromRegistry, ProcedureBuilder, ProcedureCaller, ProcedureCallerFromRegistry, ProcedureDefinition, ProcedureFromFunctionReference, ProcedureMeta, ProcedureSchedulableCallerFromRegistry, ProcedureScheduleCallerFromRegistry, QueryProcedureBuilder, ResolveIfSet, RunMutationCtx, 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, initCRPC, isActionCtx, isCRPCError, isMutationCtx, isQueryCtx, isRunMutationCtx, matchPathParams, requireActionCtx, requireMutationCtx, requireQueryCtx, requireRunMutationCtx, toCRPCError, typedProcedureResolver, withSystemFields, zCustomAction, zCustomMutation, zCustomQuery, zid, zodOutputToConvex, zodOutputToConvexFields, zodToConvex, zodToConvexFields };
|
|
1
|
+
import { $ as CRPCFunctionTypeHint, A as CRPCError, B as createEnv, C as createProcedureHandlerFactory, Ct as zid, D as WithHttpRouter, Dt as zodToConvexFields, E as typedProcedureResolver, Et as zodToConvex, F as getCRPCErrorFromUnknown, G as CallerMeta, H as createCallerFactory, I as getHTTPStatusCodeFromError, J as createServerCaller, K as CallerOpts, L as isCRPCError, M as CRPCErrorData, N as CRPC_ERROR_CODES_BY_KEY, O as inferApiInputs, P as CRPC_ERROR_CODE_TO_HTTP, Q as ActionProcedureBuilder, R as toCRPCError, S as createProcedureCallerFactory, St as zCustomQuery, T as getGeneratedFunctionReference, Tt as zodOutputToConvexFields, U as LazyCaller, V as ConvexContext, W as createLazyCaller, X as createGeneratedFunctionReference, Y as createApiLeaf, Z as getGeneratedValue, _ as ProcedureSchedulableCallerFromRegistry, _t as convexToZod, a as CreateProcedureCallerFactoryOptions, at as HttpProcedureBuilder, b as createGenericCallerFactory, bt as zCustomAction, c as GeneratedRegistryCallerFactory, ct as handleHttpError, d as GeneratedRegistryHandlerForContext, dt as ConvexValidatorFromZodOutput, et as MutationProcedureBuilder, f as ProcedureActionCallerFromRegistry, ft as CustomBuilder, g as ProcedureFromFunctionReference, gt as ZodValidatorFromConvex, h as ProcedureDefinition, ht as ZodFromValidatorBase, i as registerProcedureNameLookup, it as initCRPC, j as CRPCErrorCode, k as inferApiOutputs, l as GeneratedRegistryCallerForContext, lt as matchPathParams, m as ProcedureCallerFromRegistry, mt as Zid, n as ProcedureNameLookup, nt as QueryProcedureBuilder, o as GeneratedProcedureRegistry, ot as createHttpProcedureBuilder, p as ProcedureCaller, pt as ZCustomCtx, q as ServerCaller, r as inferProcedureNameFromCallsite, rt as createMiddlewareFactory, s as GeneratedProcedureRegistryEntry, st as extractPathParams, t as ProcedureNameEntry, tt as ProcedureBuilder, u as GeneratedRegistryHandlerFactory, ut as ConvexValidatorFromZod, v as ProcedureScheduleCallerFromRegistry, vt as convexToZodFields, w as defineProcedure, wt as zodOutputToConvex, x as createGenericHandlerFactory, xt as zCustomMutation, y as createGeneratedRegistryRuntime, yt as withSystemFields, z as CreateEnvOptions } from "../procedure-name-D-fDCBlo.js";
|
|
2
|
+
import { C as HttpProcedure, D as ProcedureMeta, E as InferHttpInput, S as HttpMethod, T as HttpRouteDefinition, _ as extractRouteMap, b as HttpActionHandler, d as CRPCHttpRouter, f as HttpRouterDef, g as createHttpRouterFactory, h as createHttpRouter, m as HttpRouterWithHono, p as HttpRouterRecord, v as CRPCHonoHandler, w as HttpProcedureBuilderDef, x as HttpHandlerOpts, y as HttpActionConstructor } from "../http-types-BLFA9zS7.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-a-RHmrDZ.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-BvWW0Ilq.js";
|
|
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, 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,6 +1,6 @@
|
|
|
1
|
-
import { a as isMutationCtx, c as
|
|
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-BUAh_K4k.js";
|
|
2
2
|
import { n as createLazyCaller, r as createServerCaller, t as createCallerFactory } from "../caller-factory-cTXNvYdz.js";
|
|
3
|
-
import { A as
|
|
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-
|
|
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-Cb6gloDB.js";
|
|
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-AjLfkHyF.js";
|
|
5
5
|
|
|
6
|
-
export { ActionProcedureBuilder, CRPCError, CRPC_ERROR_CODES_BY_KEY, CRPC_ERROR_CODE_TO_HTTP, HttpRouterWithHono, MutationProcedureBuilder, ProcedureBuilder, QueryProcedureBuilder, 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, initCRPC, isActionCtx, isCRPCError, isMutationCtx, isQueryCtx, isRunMutationCtx, matchPathParams, requireActionCtx, requireMutationCtx, requireQueryCtx, requireRunMutationCtx, toCRPCError, typedProcedureResolver, withSystemFields, zCustomAction, zCustomMutation, zCustomQuery, zid, zodOutputToConvex, zodOutputToConvexFields, zodToConvex, zodToConvexFields };
|
|
6
|
+
export { ActionProcedureBuilder, CRPCError, CRPC_ERROR_CODES_BY_KEY, CRPC_ERROR_CODE_TO_HTTP, HttpRouterWithHono, MutationProcedureBuilder, ProcedureBuilder, QueryProcedureBuilder, 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, 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 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as CombinedDataTransformer, n as HttpClientError } from "./http-types-
|
|
1
|
+
import { O as CombinedDataTransformer, n as HttpClientError } from "./http-types-BLFA9zS7.js";
|
|
2
2
|
import { FunctionArgs, FunctionReference, FunctionReturnType } from "convex/server";
|
|
3
3
|
|
|
4
4
|
//#region src/crpc/http-client.d.ts
|
|
@@ -9,6 +9,13 @@ type UnsetMarker = {
|
|
|
9
9
|
type MiddlewareMarker = {
|
|
10
10
|
readonly __brand: 'MiddlewareMarker';
|
|
11
11
|
};
|
|
12
|
+
type MiddlewareProcedureType = 'query' | 'mutation' | 'action' | 'httpAction';
|
|
13
|
+
type MiddlewareProcedureInfo = {
|
|
14
|
+
readonly type: MiddlewareProcedureType;
|
|
15
|
+
readonly name?: string;
|
|
16
|
+
readonly method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
17
|
+
readonly path?: string;
|
|
18
|
+
};
|
|
12
19
|
/** Flatten intersection types for better IDE display */
|
|
13
20
|
type Simplify<T> = { [K in keyof T]: T[K] } & {};
|
|
14
21
|
/**
|
|
@@ -68,6 +75,7 @@ type MiddlewareNext<TContext, TContextOverridesIn> = <TNextContext extends objec
|
|
|
68
75
|
type MiddlewareFunction<TContext, TMeta, TContextOverridesIn, $ContextOverridesOut, TInputOut = unknown> = (opts: {
|
|
69
76
|
ctx: CurrentMiddlewareContext<TContext, TContextOverridesIn>;
|
|
70
77
|
meta: TMeta;
|
|
78
|
+
procedure: MiddlewareProcedureInfo;
|
|
71
79
|
input: TInputOut;
|
|
72
80
|
getRawInput: GetRawInputFn;
|
|
73
81
|
next: MiddlewareNext<TContext, TContextOverridesIn>;
|
|
@@ -90,4 +98,4 @@ type MiddlewareBuilder<TContext, TMeta, $ContextOverridesOut, TInputOut = unknow
|
|
|
90
98
|
/** Type-erased middleware builder for runtime */
|
|
91
99
|
type AnyMiddlewareBuilder = MiddlewareBuilder<any, any, any, any>;
|
|
92
100
|
//#endregion
|
|
93
|
-
export { MergeZodObjects as a, MiddlewareMarker as c,
|
|
101
|
+
export { MergeZodObjects as a, MiddlewareMarker as c, MiddlewareProcedureType as d, MiddlewareResult as f, UnsetMarker as g, Simplify as h, IntersectIfDefined as i, MiddlewareNext as l, ResolveIfSet as m, AnyMiddlewareBuilder as n, MiddlewareBuilder as o, Overwrite as p, GetRawInputFn as r, MiddlewareFunction as s, AnyMiddleware as t, MiddlewareProcedureInfo as u };
|
package/dist/watcher.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { A as resolveConfiguredBackend, Ct as generateMeta, P as resolveRunDeps, Tt as logger, wt as getConvexConfig } from "./backend-core-
|
|
2
|
+
import { A as resolveConfiguredBackend, Ct as generateMeta, K as withLocalCodegenEnv, P as resolveRunDeps, Tt as logger, wt as getConvexConfig } from "./backend-core-C0uwGXLx.mjs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
|
|
@@ -44,22 +44,25 @@ function shouldIgnoreWatchPath(watchedPath, functionsDir, outputFile) {
|
|
|
44
44
|
if (normalizedPath === generatedFile) return true;
|
|
45
45
|
if (normalizedPath === convexGeneratedDir || normalizedPath.startsWith(`${convexGeneratedDir}${path.sep}`)) return true;
|
|
46
46
|
if (normalizedPath === generatedDir || normalizedPath.startsWith(`${generatedDir}${path.sep}`)) return true;
|
|
47
|
-
return normalizedPath.endsWith(".runtime.ts");
|
|
47
|
+
return normalizedPath.endsWith(".runtime.ts") || normalizedPath.endsWith(".kitcn-parse.ts");
|
|
48
48
|
}
|
|
49
49
|
async function runWatcherCodegen(params, deps = {}) {
|
|
50
50
|
const resolveRunDepsFn = deps.resolveRunDeps ?? resolveRunDeps;
|
|
51
51
|
const resolveConfiguredBackendFn = deps.resolveConfiguredBackendFn ?? resolveConfiguredBackend;
|
|
52
52
|
const { execa: execaFn, generateMeta: generateMetaFn, loadCliConfig: loadCliConfigFn } = resolveRunDepsFn();
|
|
53
53
|
const config = loadCliConfigFn(params.configPath);
|
|
54
|
-
|
|
54
|
+
const backend = resolveConfiguredBackendFn({
|
|
55
55
|
backendArg: params.backendArg,
|
|
56
56
|
config
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
});
|
|
58
|
+
if (backend !== "concave") {
|
|
59
|
+
await withLocalCodegenEnv(params.sharedDir, backend, async () => {
|
|
60
|
+
await generateMetaFn(params.sharedDir, {
|
|
61
|
+
debug: params.debug,
|
|
62
|
+
silent: true,
|
|
63
|
+
scope: params.scope,
|
|
64
|
+
trimSegments: params.trimSegments
|
|
65
|
+
});
|
|
63
66
|
});
|
|
64
67
|
return;
|
|
65
68
|
}
|