//#region ../../node_modules/.pnpm/convex@1.27.0_react@19.2.1/node_modules/convex/dist/cjs-types/values/value.d.ts /** * The type of JavaScript values serializable to JSON. * * @public */ type JSONValue = null | boolean | number | string | JSONValue[] | { [key: string]: JSONValue; }; /** * An identifier for a document in Convex. * * Convex documents are uniquely identified by their `Id`, which is accessible * on the `_id` field. To learn more, see [Document IDs](https://docs.convex.dev/database/document-ids). * * Documents can be loaded using `db.get(id)` in query and mutation functions. * * IDs are base 32 encoded strings which are URL safe. * * IDs are just strings at runtime, but this type can be used to distinguish them from other * strings at compile time. * * If you're using code generation, use the `Id` type generated for your data model in * `convex/_generated/dataModel.d.ts`. * * @typeParam TableName - A string literal type of the table name (like "users"). * * @public */ type Id = string & { __tableName: TableName; }; /** * A value supported by Convex. * * Values can be: * - stored inside of documents. * - used as arguments and return types to queries and mutation functions. * * You can see the full set of supported types at * [Types](https://docs.convex.dev/using/types). * * @public */ type Value$1 = null | bigint | number | boolean | string | ArrayBuffer | Value$1[] | { [key: string]: undefined | Value$1; }; /** * The types of {@link Value} that can be used to represent numbers. * * @public */ type NumericValue = bigint | number; //#endregion //#region ../../node_modules/.pnpm/convex@1.27.0_react@19.2.1/node_modules/convex/dist/cjs-types/type_utils.d.ts /** * Common utilities for manipulating TypeScript types. * @module */ /** * Hack! This type causes TypeScript to simplify how it renders object types. * * It is functionally the identity for object types, but in practice it can * simplify expressions like `A & B`. */ type Expand> = ObjectType extends Record ? { [Key in keyof ObjectType]: ObjectType[Key] } : never; //#endregion //#region ../../node_modules/.pnpm/convex@1.27.0_react@19.2.1/node_modules/convex/dist/cjs-types/values/validators.d.ts type TableNameFromType = T extends Id ? TableName : string; /** * Avoid using `instanceof BaseValidator`; this is inheritence for code reuse * not type heirarchy. */ declare abstract class BaseValidator { /** * Only for TypeScript, the TS type of the JS values validated * by this validator. */ readonly type: Type; /** * Only for TypeScript, if this an Object validator, then * this is the TS type of its property names. */ readonly fieldPaths: FieldPaths; /** * Whether this is an optional Object property value validator. */ readonly isOptional: IsOptional; /** * Always `"true"`. */ readonly isConvexValidator: true; constructor({ isOptional }: { isOptional: IsOptional; }); /** @deprecated - use isOptional instead */ get optional(): boolean; } /** * The type of the `v.id(tableName)` validator. */ declare class VId extends BaseValidator { /** * The name of the table that the validated IDs must belong to. */ readonly tableName: TableNameFromType; /** * The kind of validator, `"id"`. */ readonly kind: "id"; /** * Usually you'd use `v.id(tableName)` instead. */ constructor({ isOptional, tableName }: { isOptional: IsOptional; tableName: TableNameFromType; }); } /** * The type of the `v.float64()` validator. */ declare class VFloat64 extends BaseValidator { /** * The kind of validator, `"float64"`. */ readonly kind: "float64"; } /** * The type of the `v.int64()` validator. */ declare class VInt64 extends BaseValidator { /** * The kind of validator, `"int64"`. */ readonly kind: "int64"; } /** * The type of the `v.boolean()` validator. */ declare class VBoolean extends BaseValidator { /** * The kind of validator, `"boolean"`. */ readonly kind: "boolean"; } /** * The type of the `v.bytes()` validator. */ declare class VBytes extends BaseValidator { /** * The kind of validator, `"bytes"`. */ readonly kind: "bytes"; } /** * The type of the `v.string()` validator. */ declare class VString extends BaseValidator { /** * The kind of validator, `"string"`. */ readonly kind: "string"; } /** * The type of the `v.null()` validator. */ declare class VNull extends BaseValidator { /** * The kind of validator, `"null"`. */ readonly kind: "null"; } /** * The type of the `v.any()` validator. */ declare class VAny extends BaseValidator { /** * The kind of validator, `"any"`. */ readonly kind: "any"; } /** * The type of the `v.object()` validator. */ declare class VObject, IsOptional extends OptionalProperty = "required", FieldPaths extends string = { [Property in keyof Fields]: JoinFieldPaths | Property }[keyof Fields] & string> extends BaseValidator { /** * An object with the validator for each property. */ readonly fields: Fields; /** * The kind of validator, `"object"`. */ readonly kind: "object"; /** * Usually you'd use `v.object({ ... })` instead. */ constructor({ isOptional, fields }: { isOptional: IsOptional; fields: Fields; }); } /** * The type of the `v.literal()` validator. */ declare class VLiteral extends BaseValidator { /** * The value that the validated values must be equal to. */ readonly value: Type; /** * The kind of validator, `"literal"`. */ readonly kind: "literal"; /** * Usually you'd use `v.literal(value)` instead. */ constructor({ isOptional, value }: { isOptional: IsOptional; value: Type; }); } /** * The type of the `v.array()` validator. */ declare class VArray, IsOptional extends OptionalProperty = "required"> extends BaseValidator { /** * The validator for the elements of the array. */ readonly element: Element; /** * The kind of validator, `"array"`. */ readonly kind: "array"; /** * Usually you'd use `v.array(element)` instead. */ constructor({ isOptional, element }: { isOptional: IsOptional; element: Element; }); } /** * The type of the `v.record()` validator. */ declare class VRecord, Value extends Validator, IsOptional extends OptionalProperty = "required", FieldPaths extends string = string> extends BaseValidator { /** * The validator for the keys of the record. */ readonly key: Key; /** * The validator for the values of the record. */ readonly value: Value; /** * The kind of validator, `"record"`. */ readonly kind: "record"; /** * Usually you'd use `v.record(key, value)` instead. */ constructor({ isOptional, key, value }: { isOptional: IsOptional; key: Key; value: Value; }); } /** * The type of the `v.union()` validator. */ declare class VUnion[], IsOptional extends OptionalProperty = "required", FieldPaths extends string = T[number]["fieldPaths"]> extends BaseValidator { /** * The array of validators, one of which must match the value. */ readonly members: T; /** * The kind of validator, `"union"`. */ readonly kind: "union"; /** * Usually you'd use `v.union(...members)` instead. */ constructor({ isOptional, members }: { isOptional: IsOptional; members: T; }); } /** * Type representing whether a property in an object is optional or required. * * @public */ type OptionalProperty = "optional" | "required"; /** * A validator for a Convex value. * * This should be constructed using the validator builder, {@link v}. * * A validator encapsulates: * - The TypeScript type of this value. * - Whether this field should be optional if it's included in an object. * - The TypeScript type for the set of index field paths that can be used to * build indexes on this value. * - A JSON representation of the validator. * * Specific types of validators contain additional information: for example * an `ArrayValidator` contains an `element` property with the validator * used to validate each element of the list. Use the shared 'kind' property * to identity the type of validator. * * More validators can be added in future releases so an exhaustive * switch statement on validator `kind` should be expected to break * in future releases of Convex. * * @public */ type Validator = VId | VString | VFloat64 | VInt64 | VBoolean | VNull | VAny | VLiteral | VBytes | VObject>, IsOptional, FieldPaths> | VArray, IsOptional> | VRecord, Validator, IsOptional, FieldPaths> | VUnion[], IsOptional, FieldPaths>; /** * Join together two index field paths. * * This is used within the validator builder, {@link v}. * @public */ type JoinFieldPaths = `${Start}.${End}`; //#endregion //#region ../../node_modules/.pnpm/convex@1.27.0_react@19.2.1/node_modules/convex/dist/cjs-types/values/validator.d.ts /** * The type that all validators must extend. * * @public */ type GenericValidator = Validator; //#endregion //#region ../../node_modules/.pnpm/convex@1.27.0_react@19.2.1/node_modules/convex/dist/cjs-types/server/authentication.d.ts /** * Information about an authenticated user, derived from a * [JWT](https://datatracker.ietf.org/doc/html/rfc7519). * * The only fields guaranteed to be present are * {@link UserIdentity.tokenIdentifier} and {@link UserIdentity.issuer}. All * remaining fields may or may not be present depending on the information given * by the identity provider. * * The explicitly listed fields are derived from the OpenID Connect (OIDC) standard fields, * see the [OIDC specification](https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims) * for more information on these fields. * * Any additional fields are custom claims that may be present in the JWT, * and their type depends on your identity provider configuration. If you * know the type of the field, you can assert it in TypeScript like this * (for example as a `string`): * * ```typescript * const identity = await ctx.auth.getUserIdentity(); * if (identity === null) { * return null; * } * const customClaim = identity.custom_claim as string; * ``` * * @public */ interface UserIdentity { /** * A stable and globally unique string for this identity (i.e. no other * user, even from a different identity provider, will have the same string.) * * JWT claims: `sub` + `iss` */ readonly tokenIdentifier: string; /** * Identifier for the end-user from the identity provider, not necessarily * unique across different providers. * * JWT claim: `sub` */ readonly subject: string; /** * The hostname of the identity provider used to authenticate this user. * * JWT claim: `iss` */ readonly issuer: string; /** * JWT claim: `name` */ readonly name?: string; /** * JWT claim: `given_name` */ readonly givenName?: string; /** * JWT claim: `family_name` */ readonly familyName?: string; /** * JWT claim: `nickname` */ readonly nickname?: string; /** * JWT claim: `preferred_username` */ readonly preferredUsername?: string; /** * JWT claim: `profile` */ readonly profileUrl?: string; /** * JWT claim: `picture` */ readonly pictureUrl?: string; /** * JWT claim: `email` */ readonly email?: string; /** * JWT claim: `email_verified` */ readonly emailVerified?: boolean; /** * JWT claim: `gender` */ readonly gender?: string; /** * JWT claim: `birthdate` */ readonly birthday?: string; /** * JWT claim: `zoneinfo` */ readonly timezone?: string; /** * JWT claim: `locale` */ readonly language?: string; /** * JWT claim: `phone_number` */ readonly phoneNumber?: string; /** * JWT claim: `phone_number_verified` */ readonly phoneNumberVerified?: boolean; /** * JWT claim: `address` */ readonly address?: string; /** * JWT claim: `updated_at` */ readonly updatedAt?: string; /** * Any custom claims. */ [key: string]: JSONValue | undefined; } /** * An interface to access information about the currently authenticated user * within Convex query and mutation functions. * * @public */ interface Auth { /** * Get details about the currently authenticated user. * * @returns A promise that resolves to a {@link UserIdentity} if the Convex * client was configured with a valid ID token, or if not, will: * + returns `null` on Convex queries, mutations, actions. * + `throw` on HTTP Actions. */ getUserIdentity(): Promise; } //#endregion //#region ../../node_modules/.pnpm/convex@1.27.0_react@19.2.1/node_modules/convex/dist/cjs-types/server/data_model.d.ts /** * A document stored in Convex. * @public */ type GenericDocument = Record; /** * A type describing all of the document fields in a table. * * These can either be field names (like "name") or references to fields on * nested objects (like "properties.name"). * @public */ type GenericFieldPaths = string; /** * A type describing the ordered fields in an index. * * These can either be field names (like "name") or references to fields on * nested objects (like "properties.name"). * @public */ type GenericIndexFields = string[]; /** * A type describing the indexes in a table. * * It's an object mapping each index name to the fields in the index. * @public */ type GenericTableIndexes = Record; /** * A type describing the configuration of a search index. * @public */ type GenericSearchIndexConfig = { searchField: string; filterFields: string; }; /** * A type describing all of the search indexes in a table. * * This is an object mapping each index name to the config for the index. * @public */ type GenericTableSearchIndexes = Record; /** * A type describing the configuration of a vector index. * @public */ type GenericVectorIndexConfig = { vectorField: string; dimensions: number; filterFields: string; }; /** * A type describing all of the vector indexes in a table. * * This is an object mapping each index name to the config for the index. * @public */ type GenericTableVectorIndexes = Record; /** * If we have A | B | C, this finds A[Key] | B[Key] | C[Key], where we default to * `Default` if the Key isn't found. * * Conditional types apparently loop over the variants in a union, so the `T extends T` * is enough to force this behavior. * https://stackoverflow.com/questions/49401866/all-possible-keys-of-an-union-type */ type ValueFromUnion = T extends T ? Key extends keyof T ? T[Key] : Default : never; /** * The type of a field in a document. * * Note that this supports both simple fields like "name" and nested fields like * "properties.name". * * If the field is not present in the document it is considered to be `undefined`. * * @public */ type FieldTypeFromFieldPath = FieldTypeFromFieldPathInner extends Value$1 | undefined ? FieldTypeFromFieldPathInner : Value$1 | undefined; /** * The inner type of {@link FieldTypeFromFieldPath}. * * It's wrapped in a helper to coerce the type to `Value | undefined` since some * versions of TypeScript fail to infer this type correctly. * * @public */ type FieldTypeFromFieldPathInner = FieldPath extends `${infer First}.${infer Second}` ? ValueFromUnion> extends infer FieldValue ? FieldValue extends GenericDocument ? FieldTypeFromFieldPath : undefined : undefined : ValueFromUnion; /** * A type describing the document type and indexes in a table. * @public */ type GenericTableInfo = { document: GenericDocument; fieldPaths: GenericFieldPaths; indexes: GenericTableIndexes; searchIndexes: GenericTableSearchIndexes; vectorIndexes: GenericTableVectorIndexes; }; /** * The type of a document in a table for a given {@link GenericTableInfo}. * @public */ type DocumentByInfo = TableInfo["document"]; /** * The field paths in a table for a given {@link GenericTableInfo}. * * These can either be field names (like "name") or references to fields on * nested objects (like "properties.name"). * @public */ type FieldPaths$1 = TableInfo["fieldPaths"]; /** * The database indexes in a table for a given {@link GenericTableInfo}. * * This will be an object mapping index names to the fields in the index. * @public */ type Indexes$1 = TableInfo["indexes"]; /** * The names of indexes in a table for a given {@link GenericTableInfo}. * @public */ type IndexNames = keyof Indexes$1; /** * Extract the fields of an index from a {@link GenericTableInfo} by name. * @public */ type NamedIndex> = Indexes$1[IndexName]; /** * The search indexes in a table for a given {@link GenericTableInfo}. * * This will be an object mapping index names to the search index config. * @public */ type SearchIndexes$1 = TableInfo["searchIndexes"]; /** * The names of search indexes in a table for a given {@link GenericTableInfo}. * @public */ type SearchIndexNames = keyof SearchIndexes$1; /** * Extract the config of a search index from a {@link GenericTableInfo} by name. * @public */ type NamedSearchIndex> = SearchIndexes$1[IndexName]; /** * A type describing the tables in a Convex project. * * This is designed to be code generated with `npx convex dev`. * @public */ type GenericDataModel = Record; /** * A {@link GenericDataModel} that considers documents to be `any` and does not * support indexes. * * This is the default before a schema is defined. * @public */ type AnyDataModel = { [tableName: string]: { document: any; fieldPaths: GenericFieldPaths; indexes: {}; searchIndexes: {}; vectorIndexes: {}; }; }; /** * A type of all of the table names defined in a {@link GenericDataModel}. * @public */ type TableNamesInDataModel = keyof DataModel & string; /** * Extract the `TableInfo` for a table in a {@link GenericDataModel} by table * name. * * @public */ type NamedTableInfo = DataModel[TableName]; /** * The type of a document in a {@link GenericDataModel} by table name. * @public */ type DocumentByName> = DataModel[TableName]["document"]; //#endregion //#region ../../node_modules/.pnpm/convex@1.27.0_react@19.2.1/node_modules/convex/dist/cjs-types/server/filter_builder.d.ts /** * Expressions are evaluated to produce a {@link values.Value} in the course of executing a query. * * To construct an expression, use the {@link FilterBuilder} provided within * {@link OrderedQuery.filter}. * * @typeParam T - The type that this expression evaluates to. * @public */ declare abstract class Expression { private _isExpression; private _value; } /** * An {@link Expression} or a constant {@link values.Value} * * @public */ type ExpressionOrValue = Expression | T; /** * An interface for defining filters in queries. * * `FilterBuilder` has various methods that produce {@link Expression}s. * These expressions can be nested together along with constants to express * a filter predicate. * * `FilterBuilder` is used within {@link OrderedQuery.filter} to create query * filters. * * Here are the available methods: * * | | | * |-------------------------------|-----------------------------------------------| * | **Comparisons** | Error when `l` and `r` are not the same type. | * | [`eq(l, r)`](#eq) | `l === r` | * | [`neq(l, r)`](#neq) | `l !== r` | * | [`lt(l, r)`](#lt) | `l < r` | * | [`lte(l, r)`](#lte) | `l <= r` | * | [`gt(l, r)`](#gt) | `l > r` | * | [`gte(l, r)`](#gte) | `l >= r` | * | | | * | **Arithmetic** | Error when `l` and `r` are not the same type. | * | [`add(l, r)`](#add) | `l + r` | * | [`sub(l, r)`](#sub) | `l - r` | * | [`mul(l, r)`](#mul) | `l * r` | * | [`div(l, r)`](#div) | `l / r` | * | [`mod(l, r)`](#mod) | `l % r` | * | [`neg(x)`](#neg) | `-x` | * | | | * | **Logic** | Error if any param is not a `bool`. | * | [`not(x)`](#not) | `!x` | * | [`and(a, b, ..., z)`](#and) | `a && b && ... && z` | * | [`or(a, b, ..., z)`](#or) | a || b || ... || z | * | | | * | **Other** | | * | [`field(fieldPath)`](#field) | Evaluates to the field at `fieldPath`. | * @public */ interface FilterBuilder { /** * `l === r` * * @public * */ eq(l: ExpressionOrValue, r: ExpressionOrValue): Expression; /** * `l !== r` * * @public * */ neq(l: ExpressionOrValue, r: ExpressionOrValue): Expression; /** * `l < r` * * @public */ lt(l: ExpressionOrValue, r: ExpressionOrValue): Expression; /** * `l <= r` * * @public */ lte(l: ExpressionOrValue, r: ExpressionOrValue): Expression; /** * `l > r` * * @public */ gt(l: ExpressionOrValue, r: ExpressionOrValue): Expression; /** * `l >= r` * * @public */ gte(l: ExpressionOrValue, r: ExpressionOrValue): Expression; /** * `l + r` * * @public */ add(l: ExpressionOrValue, r: ExpressionOrValue): Expression; /** * `l - r` * * @public */ sub(l: ExpressionOrValue, r: ExpressionOrValue): Expression; /** * `l * r` * * @public */ mul(l: ExpressionOrValue, r: ExpressionOrValue): Expression; /** * `l / r` * * @public */ div(l: ExpressionOrValue, r: ExpressionOrValue): Expression; /** * `l % r` * * @public */ mod(l: ExpressionOrValue, r: ExpressionOrValue): Expression; /** * `-x` * * @public */ neg(x: ExpressionOrValue): Expression; /** * `exprs[0] && exprs[1] && ... && exprs[n]` * * @public */ and(...exprs: Array>): Expression; /** * `exprs[0] || exprs[1] || ... || exprs[n]` * * @public */ or(...exprs: Array>): Expression; /** * `!x` * * @public */ not(x: ExpressionOrValue): Expression; /** * Evaluates to the field at the given `fieldPath`. * * For example, in {@link OrderedQuery.filter} this can be used to examine the values being filtered. * * #### Example * * On this object: * ``` * { * "user": { * "isActive": true * } * } * ``` * * `field("user.isActive")` evaluates to `true`. * * @public */ field>(fieldPath: FieldPath): Expression, FieldPath>>; } //#endregion //#region ../../node_modules/.pnpm/convex@1.27.0_react@19.2.1/node_modules/convex/dist/cjs-types/server/index_range_builder.d.ts /** * A type that adds 1 to a number literal type (up to 14). * * This is necessary to step through the fields in an index. */ type PlusOne = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15][N]; /** * Builder to define an index range to query. * * An index range is a description of which documents Convex should consider * when running the query. * * An index range is always a chained list of: * 1. 0 or more equality expressions defined with `.eq`. * 2. [Optionally] A lower bound expression defined with `.gt` or `.gte`. * 3. [Optionally] An upper bound expression defined with `.lt` or `.lte`. * * **You must step through fields in index order.** * * Each equality expression must compare a different index field, starting from * the beginning and in order. The upper and lower bounds must follow the * equality expressions and compare the next field. * * For example, if there is an index of messages on * `["projectId", "priority"]`, a range searching for "messages in 'myProjectId' * with priority at least 100" would look like: * ```ts * q.eq("projectId", myProjectId) * .gte("priority", 100) * ``` * * **The performance of your query is based on the specificity of the range.** * * This class is designed to only allow you to specify ranges that Convex can * efficiently use your index to find. For all other filtering use * {@link OrderedQuery.filter}. * * To learn about indexes, see [Indexes](https://docs.convex.dev/using/indexes). * @public */ interface IndexRangeBuilder extends LowerBoundIndexRangeBuilder { /** * Restrict this range to documents where `doc[fieldName] === value`. * * @param fieldName - The name of the field to compare. Must be the next field * in the index. * @param value - The value to compare against. */ eq(fieldName: IndexFields[FieldNum], value: FieldTypeFromFieldPath): NextIndexRangeBuilder; } /** * An {@link IndexRangeBuilder} for the next field of the index. * * This type is careful to check if adding one to the `FieldNum` will exceed * the length of the `IndexFields`. */ type NextIndexRangeBuilder = PlusOne extends IndexFields["length"] ? IndexRange : IndexRangeBuilder>; /** * Builder to define the lower bound of an index range. * * See {@link IndexRangeBuilder}. * * @public */ interface LowerBoundIndexRangeBuilder extends UpperBoundIndexRangeBuilder { /** * Restrict this range to documents where `doc[fieldName] > value`. * * @param fieldName - The name of the field to compare. Must be the next field * in the index. * @param value - The value to compare against. */ gt(fieldName: IndexFieldName, value: FieldTypeFromFieldPath): UpperBoundIndexRangeBuilder; /** * Restrict this range to documents where `doc[fieldName] >= value`. * * @param fieldName - The name of the field to compare. Must be the next field * in the index. * @param value - The value to compare against. */ gte(fieldName: IndexFieldName, value: FieldTypeFromFieldPath): UpperBoundIndexRangeBuilder; } /** * Builder to define the upper bound of an index range. * * See {@link IndexRangeBuilder}. * * @public */ interface UpperBoundIndexRangeBuilder extends IndexRange { /** * Restrict this range to documents where `doc[fieldName] < value`. * * @param fieldName - The name of the field to compare. Must be the same index * field used in the lower bound (`.gt` or `.gte`) or the next field if no * lower bound was specified. * @param value - The value to compare against. */ lt(fieldName: IndexFieldName, value: FieldTypeFromFieldPath): IndexRange; /** * Restrict this range to documents where `doc[fieldName] <= value`. * * @param fieldName - The name of the field to compare. Must be the same index * field used in the lower bound (`.gt` or `.gte`) or the next field if no * lower bound was specified. * @param value - The value to compare against. */ lte(fieldName: IndexFieldName, value: FieldTypeFromFieldPath): IndexRange; } /** * An expression representing an index range created by * {@link IndexRangeBuilder}. * @public */ declare abstract class IndexRange { private _isIndexRange; } //#endregion //#region ../../node_modules/.pnpm/convex@1.27.0_react@19.2.1/node_modules/convex/dist/cjs-types/server/pagination.d.ts /** * An opaque identifier used for paginating a database query. * * Cursors are returned from {@link OrderedQuery.paginate} and represent the * point of the query where the page of results ended. * * To continue paginating, pass the cursor back into * {@link OrderedQuery.paginate} in the {@link PaginationOptions} object to * fetch another page of results. * * Note: Cursors can only be passed to _exactly_ the same database query that * they were generated from. You may not reuse a cursor between different * database queries. * * @public */ type Cursor = string; /** * The result of paginating using {@link OrderedQuery.paginate}. * * @public */ interface PaginationResult { /** * The page of results. */ page: T[]; /** * Have we reached the end of the results? */ isDone: boolean; /** * A {@link Cursor} to continue loading more results. */ continueCursor: Cursor; /** * A {@link Cursor} to split the page into two, so the page from * (cursor, continueCursor] can be replaced by two pages (cursor, splitCursor] * and (splitCursor, continueCursor]. */ splitCursor?: Cursor | null; /** * When a query reads too much data, it may return 'SplitRecommended' to * indicate that the page should be split into two with `splitCursor`. * When a query reads so much data that `page` might be incomplete, its status * becomes 'SplitRequired'. */ pageStatus?: "SplitRecommended" | "SplitRequired" | null; } /** * The options passed to {@link OrderedQuery.paginate}. * * To use this type in [argument validation](https://docs.convex.dev/functions/validation), * use the {@link paginationOptsValidator}. * * @public */ interface PaginationOptions { /** * Number of items to load in this page of results. * * Note: This is only an initial value! * * If you are running this paginated query in a reactive query function, you * may receive more or less items than this if items were added to or removed * from the query range. */ numItems: number; /** * A {@link Cursor} representing the start of this page or `null` to start * at the beginning of the query results. */ cursor: Cursor | null; } //#endregion //#region ../../node_modules/.pnpm/convex@1.27.0_react@19.2.1/node_modules/convex/dist/cjs-types/server/search_filter_builder.d.ts /** * Builder for defining search filters. * * A search filter is a chained list of: * 1. One search expression constructed with `.search`. * 2. Zero or more equality expressions constructed with `.eq`. * * The search expression must search for text in the index's `searchField`. The * filter expressions can use any of the `filterFields` defined in the index. * * For all other filtering use {@link OrderedQuery.filter}. * * To learn about full text search, see [Indexes](https://docs.convex.dev/text-search). * @public */ interface SearchFilterBuilder { /** * Search for the terms in `query` within `doc[fieldName]`. * * This will do a full text search that returns results where any word of of * `query` appears in the field. * * Documents will be returned based on their relevance to the query. This * takes into account: * - How many words in the query appear in the text? * - How many times do they appear? * - How long is the text field? * * @param fieldName - The name of the field to search in. This must be listed * as the index's `searchField`. * @param query - The query text to search for. */ search(fieldName: SearchIndexConfig["searchField"], query: string): SearchFilterFinalizer; } /** * Builder to define equality expressions as part of a search filter. * * See {@link SearchFilterBuilder}. * * @public */ interface SearchFilterFinalizer extends SearchFilter { /** * Restrict this query to documents where `doc[fieldName] === value`. * * @param fieldName - The name of the field to compare. This must be listed in * the search index's `filterFields`. * @param value - The value to compare against. */ eq(fieldName: FieldName, value: FieldTypeFromFieldPath): SearchFilterFinalizer; } /** * An expression representing a search filter created by * {@link SearchFilterBuilder}. * * @public */ declare abstract class SearchFilter { private _isSearchFilter; } //#endregion //#region ../../node_modules/.pnpm/convex@1.27.0_react@19.2.1/node_modules/convex/dist/cjs-types/server/query.d.ts /** * The {@link QueryInitializer} interface is the entry point for building a {@link Query} * over a Convex database table. * * There are two types of queries: * 1. Full table scans: Queries created with {@link QueryInitializer.fullTableScan} which * iterate over all of the documents in the table in insertion order. * 2. Indexed Queries: Queries created with {@link QueryInitializer.withIndex} which iterate * over an index range in index order. * * For convenience, {@link QueryInitializer} extends the {@link Query} interface, implicitly * starting a full table scan. * * @public */ interface QueryInitializer extends Query { /** * Query by reading all of the values out of this table. * * This query's cost is relative to the size of the entire table, so this * should only be used on tables that will stay very small (say between a few * hundred and a few thousand documents) and are updated infrequently. * * @returns - The {@link Query} that iterates over every document of the table. */ fullTableScan(): Query; /** * Query by reading documents from an index on this table. * * This query's cost is relative to the number of documents that match the * index range expression. * * Results will be returned in index order. * * To learn about indexes, see [Indexes](https://docs.convex.dev/using/indexes). * * @param indexName - The name of the index to query. * @param indexRange - An optional index range constructed with the supplied * {@link IndexRangeBuilder}. An index range is a description of which * documents Convex should consider when running the query. If no index * range is present, the query will consider all documents in the index. * @returns - The query that yields documents in the index. */ withIndex>(indexName: IndexName, indexRange?: (q: IndexRangeBuilder, NamedIndex>) => IndexRange): Query; /** * Query by running a full text search against a search index. * * Search queries must always search for some text within the index's * `searchField`. This query can optionally add equality filters for any * `filterFields` specified in the index. * * Documents will be returned in relevance order based on how well they * match the search text. * * To learn about full text search, see [Indexes](https://docs.convex.dev/text-search). * * @param indexName - The name of the search index to query. * @param searchFilter - A search filter expression constructed with the * supplied {@link SearchFilterBuilder}. This defines the full text search to run * along with equality filtering to run within the search index. * @returns - A query that searches for matching documents, returning them * in relevancy order. */ withSearchIndex>(indexName: IndexName, searchFilter: (q: SearchFilterBuilder, NamedSearchIndex>) => SearchFilter): OrderedQuery; } /** * The {@link Query} interface allows functions to read values out of the database. * * **If you only need to load an object by ID, use `db.get(id)` instead.** * * Executing a query consists of calling * 1. (Optional) {@link Query.order} to define the order * 2. (Optional) {@link Query.filter} to refine the results * 3. A *consumer* method to obtain the results * * Queries are lazily evaluated. No work is done until iteration begins, so constructing and * extending a query is free. The query is executed incrementally as the results are iterated over, * so early terminating also reduces the cost of the query. * * It is more efficient to use `filter` expression rather than executing JavaScript to filter. * * | | | * |----------------------------------------------|-| * | **Ordering** | | * | [`order("asc")`](#order) | Define the order of query results. | * | | | * | **Filtering** | | * | [`filter(...)`](#filter) | Filter the query results to only the values that match some condition. | * | | | * | **Consuming** | Execute a query and return results in different ways. | * | [`[Symbol.asyncIterator]()`](#asynciterator) | The query's results can be iterated over using a `for await..of` loop. | * | [`collect()`](#collect) | Return all of the results as an array. | * | [`take(n: number)`](#take) | Return the first `n` results as an array. | * | [`first()`](#first) | Return the first result. | * | [`unique()`](#unique) | Return the only result, and throw if there is more than one result. | * * To learn more about how to write queries, see [Querying the Database](https://docs.convex.dev/using/database-queries). * * @public */ interface Query extends OrderedQuery { /** * Define the order of the query output. * * Use `"asc"` for an ascending order and `"desc"` for a descending order. If not specified, the order defaults to ascending. * @param order - The order to return results in. */ order(order: "asc" | "desc"): OrderedQuery; } /** * A {@link Query} with an order that has already been defined. * * @public */ interface OrderedQuery extends AsyncIterable> { /** * Filter the query output, returning only the values for which `predicate` evaluates to true. * * @param predicate - An {@link Expression} constructed with the supplied {@link FilterBuilder} that specifies which documents to keep. * @returns - A new {@link OrderedQuery} with the given filter predicate applied. */ filter(predicate: (q: FilterBuilder) => ExpressionOrValue): this; /** * Load a page of `n` results and obtain a {@link Cursor} for loading more. * * Note: If this is called from a reactive query function the number of * results may not match `paginationOpts.numItems`! * * `paginationOpts.numItems` is only an initial value. After the first invocation, * `paginate` will return all items in the original query range. This ensures * that all pages will remain adjacent and non-overlapping. * * @param paginationOpts - A {@link PaginationOptions} object containing the number * of items to load and the cursor to start at. * @returns A {@link PaginationResult} containing the page of results and a * cursor to continue paginating. */ paginate(paginationOpts: PaginationOptions): Promise>>; /** * Execute the query and return all of the results as an array. * * Note: when processing a query with a lot of results, it's often better to use the `Query` as an * `AsyncIterable` instead. * * @returns - An array of all of the query's results. */ collect(): Promise>>; /** * Execute the query and return the first `n` results. * * @param n - The number of items to take. * @returns - An array of the first `n` results of the query (or less if the * query doesn't have `n` results). */ take(n: number): Promise>>; /** * Execute the query and return the first result if there is one. * * @returns - The first value of the query or `null` if the query returned no results. * */ first(): Promise | null>; /** * Execute the query and return the singular result if there is one. * * @returns - The single result returned from the query or null if none exists. * @throws Will throw an error if the query returns more than one result. */ unique(): Promise | null>; } //#endregion //#region ../../node_modules/.pnpm/convex@1.27.0_react@19.2.1/node_modules/convex/dist/cjs-types/server/system_fields.d.ts /** * The fields that Convex automatically adds to documents, not including `_id`. * * This is an object type mapping field name to field type. * @public */ type SystemFields = { _creationTime: number; }; /** * The `_id` field that Convex automatically adds to documents. * @public */ type IdField = { _id: Id; }; /** * The indexes that Convex automatically adds to every table. * * This is an object mapping index names to index field paths. * @public */ type SystemIndexes = { by_id: ["_id"]; by_creation_time: ["_creationTime"]; }; /** * Convex automatically appends "_creationTime" to the end of every index to * break ties if all of the other fields are identical. * @public */ type IndexTiebreakerField = "_creationTime"; //#endregion //#region ../../node_modules/.pnpm/convex@1.27.0_react@19.2.1/node_modules/convex/dist/cjs-types/server/schema.d.ts /** * Extract all of the index field paths within a {@link Validator}. * * This is used within {@link defineTable}. * @public */ type ExtractFieldPaths> = T["fieldPaths"] | keyof SystemFields; /** * Extract the {@link GenericDocument} within a {@link Validator} and * add on the system fields. * * This is used within {@link defineTable}. * @public */ type ExtractDocument> = Expand; interface DbIndexConfig { /** * The fields to index, in order. Must specify at least one field. */ fields: [FirstFieldPath, ...RestFieldPaths]; } /** * The configuration for a full text search index. * * @public */ interface SearchIndexConfig { /** * The field to index for full text search. * * This must be a field of type `string`. */ searchField: SearchField; /** * Additional fields to index for fast filtering when running search queries. */ filterFields?: FilterFields[]; } /** * The configuration for a vector index. * * @public */ interface VectorIndexConfig { /** * The field to index for vector search. * * This must be a field of type `v.array(v.float64())` (or a union) */ vectorField: VectorField; /** * The length of the vectors indexed. This must be between 2 and 2048 inclusive. */ dimensions: number; /** * Additional fields to index for fast filtering when running vector searches. */ filterFields?: FilterFields[]; } /** * Options for defining an index. * * @public */ interface IndexOptions { /** * Whether the index should be staged. * * For large tables, index backfill can be slow. Staging an index allows you * to push the schema and enable the index later. * * If `staged` is `true`, the index will be staged and will not be enabled * until the staged flag is removed. Staged indexes do not block push * completion. Staged indexes cannot be used in queries. */ staged?: boolean; } /** * The definition of a table within a schema. * * This should be produced by using {@link defineTable}. * @public */ declare class TableDefinition = Validator, Indexes extends GenericTableIndexes = {}, SearchIndexes extends GenericTableSearchIndexes = {}, VectorIndexes extends GenericTableVectorIndexes = {}> { private indexes; private stagedDbIndexes; private searchIndexes; private stagedSearchIndexes; private vectorIndexes; private stagedVectorIndexes; validator: DocumentType; /** * This API is experimental: it may change or disappear. * * Returns indexes defined on this table. * Intended for the advanced use cases of dynamically deciding which index to use for a query. * If you think you need this, please chime in on ths issue in the Convex JS GitHub repo. * https://github.com/get-convex/convex-js/issues/49 */ " indexes"(): { indexDescriptor: string; fields: string[]; }[]; /** * Define an index on this table. * * To learn about indexes, see [Defining Indexes](https://docs.convex.dev/using/indexes). * * @param name - The name of the index. * @param indexConfig - The index configuration object. * @returns A {@link TableDefinition} with this index included. */ index, RestFieldPaths extends ExtractFieldPaths[]>(name: IndexName, indexConfig: Expand & IndexOptions & { staged?: false; }>): TableDefinition>, SearchIndexes, VectorIndexes>; /** * Define an index on this table. * * To learn about indexes, see [Defining Indexes](https://docs.convex.dev/using/indexes). * * @param name - The name of the index. * @param fields - The fields to index, in order. Must specify at least one * field. * @returns A {@link TableDefinition} with this index included. */ index, RestFieldPaths extends ExtractFieldPaths[]>(name: IndexName, fields: [FirstFieldPath, ...RestFieldPaths]): TableDefinition>, SearchIndexes, VectorIndexes>; /** * Define a staged index on this table. * * For large tables, index backfill can be slow. Staging an index allows you * to push the schema and enable the index later. * * If `staged` is `true`, the index will be staged and will not be enabled * until the staged flag is removed. Staged indexes do not block push * completion. Staged indexes cannot be used in queries. * * To learn about indexes, see [Defining Indexes](https://docs.convex.dev/using/indexes). * * @param name - The name of the index. * @param indexConfig - The index configuration object. * @returns A {@link TableDefinition} with this index included. */ index, RestFieldPaths extends ExtractFieldPaths[]>(name: IndexName, indexConfig: Expand & IndexOptions & { staged: true; }>): TableDefinition; /** * Define a search index on this table. * * To learn about search indexes, see [Search](https://docs.convex.dev/text-search). * * @param name - The name of the index. * @param indexConfig - The search index configuration object. * @returns A {@link TableDefinition} with this search index included. */ searchIndex, FilterFields extends ExtractFieldPaths = never>(name: IndexName, indexConfig: Expand & IndexOptions & { staged?: false; }>): TableDefinition>, VectorIndexes>; /** * Define a staged search index on this table. * * For large tables, index backfill can be slow. Staging an index allows you * to push the schema and enable the index later. * * If `staged` is `true`, the index will be staged and will not be enabled * until the staged flag is removed. Staged indexes do not block push * completion. Staged indexes cannot be used in queries. * * To learn about search indexes, see [Search](https://docs.convex.dev/text-search). * * @param name - The name of the index. * @param indexConfig - The search index configuration object. * @returns A {@link TableDefinition} with this search index included. */ searchIndex, FilterFields extends ExtractFieldPaths = never>(name: IndexName, indexConfig: Expand & IndexOptions & { staged: true; }>): TableDefinition; /** * Define a vector index on this table. * * To learn about vector indexes, see [Vector Search](https://docs.convex.dev/vector-search). * * @param name - The name of the index. * @param indexConfig - The vector index configuration object. * @returns A {@link TableDefinition} with this vector index included. */ vectorIndex, FilterFields extends ExtractFieldPaths = never>(name: IndexName, indexConfig: Expand & IndexOptions & { staged?: false; }>): TableDefinition>>; /** * Define a staged vector index on this table. * * For large tables, index backfill can be slow. Staging an index allows you * to push the schema and enable the index later. * * If `staged` is `true`, the index will be staged and will not be enabled * until the staged flag is removed. Staged indexes do not block push * completion. Staged indexes cannot be used in queries. * * To learn about vector indexes, see [Vector Search](https://docs.convex.dev/vector-search). * * @param name - The name of the index. * @param indexConfig - The vector index configuration object. * @returns A {@link TableDefinition} with this vector index included. */ vectorIndex, FilterFields extends ExtractFieldPaths = never>(name: IndexName, indexConfig: Expand & IndexOptions & { staged: true; }>): TableDefinition; /** * Work around for https://github.com/microsoft/TypeScript/issues/57035 */ protected self(): TableDefinition; } /** * A type describing the schema of a Convex project. * * This should be constructed using {@link defineSchema}, {@link defineTable}, * and {@link v}. * @public */ type GenericSchema = Record; /** * * The definition of a Convex project schema. * * This should be produced by using {@link defineSchema}. * @public */ declare class SchemaDefinition { tables: Schema; strictTableNameTypes: StrictTableTypes; readonly schemaValidation: boolean; } /** * Internal type used in Convex code generation! * * Convert a {@link SchemaDefinition} into a {@link server.GenericDataModel}. * * @public */ type DataModelFromSchemaDefinition> = MaybeMakeLooseDataModel<{ [TableName in keyof SchemaDef["tables"] & string]: SchemaDef["tables"][TableName] extends TableDefinition ? { document: Expand & ExtractDocument>; fieldPaths: keyof IdField | ExtractFieldPaths; indexes: Expand; searchIndexes: SearchIndexes; vectorIndexes: VectorIndexes; } : never }, SchemaDef["strictTableNameTypes"]>; type MaybeMakeLooseDataModel = StrictTableNameTypes extends true ? DataModel : Expand; declare const _systemSchema: SchemaDefinition<{ _scheduled_functions: TableDefinition; args: VArray, "required">; scheduledTime: VFloat64; completedTime: VFloat64; state: VUnion<{ kind: "pending"; } | { kind: "inProgress"; } | { kind: "success"; } | { kind: "failed"; error: string; } | { kind: "canceled"; }, [VObject<{ kind: "pending"; }, { kind: VLiteral<"pending", "required">; }, "required", "kind">, VObject<{ kind: "inProgress"; }, { kind: VLiteral<"inProgress", "required">; }, "required", "kind">, VObject<{ kind: "success"; }, { kind: VLiteral<"success", "required">; }, "required", "kind">, VObject<{ kind: "failed"; error: string; }, { kind: VLiteral<"failed", "required">; error: VString; }, "required", "kind" | "error">, VObject<{ kind: "canceled"; }, { kind: VLiteral<"canceled", "required">; }, "required", "kind">], "required", "kind" | "error">; }, "required", "name" | "args" | "scheduledTime" | "completedTime" | "state" | "state.kind" | "state.error">, {}, {}, {}>; _storage: TableDefinition; size: VFloat64; contentType: VString; }, "required", "sha256" | "size" | "contentType">, {}, {}, {}>; }, true>; interface SystemDataModel extends DataModelFromSchemaDefinition {} //#endregion //#region ../../node_modules/.pnpm/convex@1.27.0_react@19.2.1/node_modules/convex/dist/cjs-types/server/database.d.ts interface BaseDatabaseReader { /** * Fetch a single document from the database by its {@link values.GenericId}. * * @param id - The {@link values.GenericId} of the document to fetch from the database. * @returns - The {@link GenericDocument} of the document at the given {@link values.GenericId}, or `null` if it no longer exists. */ get>(id: Id): Promise | null>; /** * Begin a query for the given table name. * * Queries don't execute immediately, so calling this method and extending its * query are free until the results are actually used. * * @param tableName - The name of the table to query. * @returns - A {@link QueryInitializer} object to start building a query. */ query>(tableName: TableName): QueryInitializer>; /** * Returns the string ID format for the ID in a given table, or null if the ID * is from a different table or is not a valid ID. * * This accepts the string ID format as well as the `.toString()` representation * of the legacy class-based ID format. * * This does not guarantee that the ID exists (i.e. `db.get(id)` may return `null`). * * @param tableName - The name of the table. * @param id - The ID string. */ normalizeId>(tableName: TableName, id: string): Id | null; } /** * An interface to read from the database within Convex query functions. * * The two entry points are: * - {@link GenericDatabaseReader.get}, which fetches a single document * by its {@link values.GenericId}. * - {@link GenericDatabaseReader.query}, which starts building a query. * * If you're using code generation, use the `DatabaseReader` type in * `convex/_generated/server.d.ts` which is typed for your data model. * * @public */ interface GenericDatabaseReader extends BaseDatabaseReader { /** * An interface to read from the system tables within Convex query functions * * The two entry points are: * - {@link GenericDatabaseReader.get}, which fetches a single document * by its {@link values.GenericId}. * - {@link GenericDatabaseReader.query}, which starts building a query. * * @public */ system: BaseDatabaseReader; } //#endregion //#region ../../node_modules/.pnpm/convex@1.27.0_react@19.2.1/node_modules/convex/dist/cjs-types/server/api.d.ts /** * The type of a Convex function. * * @public */ type FunctionType = "query" | "mutation" | "action"; /** * A reference to a registered Convex function. * * You can create a {@link FunctionReference} using the generated `api` utility: * ```js * import { api } from "../convex/_generated/api"; * * const reference = api.myModule.myFunction; * ``` * * If you aren't using code generation, you can create references using * {@link anyApi}: * ```js * import { anyApi } from "convex/server"; * * const reference = anyApi.myModule.myFunction; * ``` * * Function references can be used to invoke functions from the client. For * example, in React you can pass references to the {@link react.useQuery} hook: * ```js * const result = useQuery(api.myModule.myFunction); * ``` * * @typeParam Type - The type of the function ("query", "mutation", or "action"). * @typeParam Visibility - The visibility of the function ("public" or "internal"). * @typeParam Args - The arguments to this function. This is an object mapping * argument names to their types. * @typeParam ReturnType - The return type of this function. * @public */ type FunctionReference = { _type: Type; _visibility: Visibility; _args: Args; _returnType: ReturnType; _componentPath: ComponentPath; }; /** * A {@link FunctionReference} of any type and any visibility with any * arguments and any return type. * * @public */ type AnyFunctionReference = FunctionReference; /** * A tuple type of the (maybe optional) arguments to `FuncRef`. * * This type is used to make methods involving arguments type safe while allowing * skipping the arguments for functions that don't require arguments. * * @public */ type OptionalRestArgs = FuncRef["_args"] extends EmptyObject ? [args?: EmptyObject] : [args: FuncRef["_args"]]; /** * Given a {@link FunctionReference}, get the return type of the function. * * @public */ type FunctionReturnType = FuncRef["_returnType"]; //#endregion //#region ../../node_modules/.pnpm/convex@1.27.0_react@19.2.1/node_modules/convex/dist/cjs-types/server/registration.d.ts /** * A set of services for use within Convex query functions. * * The query context is passed as the first argument to any Convex query * function run on the server. * * This differs from the {@link MutationCtx} because all of the services are * read-only. * * * @public */ interface GenericQueryCtx { /** * A utility for reading data in the database. */ db: GenericDatabaseReader; /** * Information about the currently authenticated user. */ auth: Auth; /** * A utility for reading files in storage. */ storage: StorageReader; /** * Call a query function within the same transaction. * * NOTE: often you can call the query's function directly instead of using this. * `runQuery` incurs overhead of running argument and return value validation, * and creating a new isolated JS context. */ runQuery: >(query: Query, ...args: OptionalRestArgs) => Promise>; } /** * The default arguments type for a Convex query, mutation, or action function. * * Convex functions always take an arguments object that maps the argument * names to their values. * * @public */ type DefaultFunctionArgs = Record; /** * A type for the empty object `{}`. * * Note that we don't use `type EmptyObject = {}` because that matches every object. */ type EmptyObject = Record; /** * A type representing the visibility of a Convex function. * * @public */ type FunctionVisibility = "public" | "internal"; //#endregion //#region ../../node_modules/.pnpm/convex@1.27.0_react@19.2.1/node_modules/convex/dist/cjs-types/server/storage.d.ts /** * A reference to a file in storage. * * This is used in the {@link StorageReader} and {@link StorageWriter} which are accessible in * Convex queries and mutations via {@link QueryCtx} and {@link MutationCtx} respectively. * * @public */ type StorageId = string; /** * Metadata for a single file as returned by {@link StorageReader.getMetadata | storage.getMetadata}. * * @public */ type FileMetadata = { /** * ID for referencing the file (eg. via {@link StorageReader.getUrl | storage.getUrl}) */ storageId: StorageId; /** * Hex encoded sha256 checksum of file contents */ sha256: string; /** * Size of the file in bytes */ size: number; /** * ContentType of the file if it was provided on upload */ contentType: string | null; }; /** * An interface to read files from storage within Convex query functions. * * @public */ interface StorageReader { /** * Get the URL for a file in storage by its `Id<"_storage">`. * * The GET response includes a standard HTTP Digest header with a sha256 checksum. * * @param storageId - The `Id<"_storage">` of the file to fetch from Convex storage. * @returns - A url which fetches the file via an HTTP GET, or `null` if it no longer exists. */ getUrl(storageId: Id<"_storage">): Promise; /** * @deprecated Passing a string is deprecated, use `storage.getUrl(Id<"_storage">)` instead. * * Get the URL for a file in storage by its {@link StorageId}. * * The GET response includes a standard HTTP Digest header with a sha256 checksum. * * @param storageId - The {@link StorageId} of the file to fetch from Convex storage. * @returns - A url which fetches the file via an HTTP GET, or `null` if it no longer exists. */ getUrl(storageId: T extends { __tableName: any; } ? never : T): Promise; /** * @deprecated This function is deprecated, use `db.system.get(Id<"_storage">)` instead. * * Get metadata for a file. * * @param storageId - The `Id<"_storage">` of the file. * @returns - A {@link FileMetadata} object if found or `null` if not found. */ getMetadata(storageId: Id<"_storage">): Promise; /** * @deprecated This function is deprecated, use `db.system.get(Id<"_storage">)` instead. * * Get metadata for a file. * * @param storageId - The {@link StorageId} of the file. * @returns - A {@link FileMetadata} object if found or `null` if not found. */ getMetadata(storageId: T extends { __tableName: any; } ? never : T): Promise; } //#endregion export { FunctionReference as n, UserIdentity as r, GenericQueryCtx as t }; //# sourceMappingURL=storage-kTmOAWHW.d.ts.map