Files
wiki/convex/_generated/api.d.ts

1254 lines
32 KiB
TypeScript

/* eslint-disable */
/**
* Generated `api` utility.
*
* THIS CODE IS AUTOMATICALLY GENERATED.
*
* To regenerate, run `npx convex dev`.
* @module
*/
import type * as aiChatActions from "../aiChatActions.js";
import type * as aiChats from "../aiChats.js";
import type * as aiImageGeneration from "../aiImageGeneration.js";
import type * as askAI from "../askAI.js";
import type * as cms from "../cms.js";
import type * as contact from "../contact.js";
import type * as contactActions from "../contactActions.js";
import type * as crons from "../crons.js";
import type * as embeddings from "../embeddings.js";
import type * as embeddingsQueries from "../embeddingsQueries.js";
import type * as files from "../files.js";
import type * as fs from "../fs.js";
import type * as http from "../http.js";
import type * as importAction from "../importAction.js";
import type * as newsletter from "../newsletter.js";
import type * as newsletterActions from "../newsletterActions.js";
import type * as pages from "../pages.js";
import type * as posts from "../posts.js";
import type * as rss from "../rss.js";
import type * as search from "../search.js";
import type * as semanticSearch from "../semanticSearch.js";
import type * as semanticSearchQueries from "../semanticSearchQueries.js";
import type * as stats from "../stats.js";
import type * as versions from "../versions.js";
import type {
ApiFromModules,
FilterApi,
FunctionReference,
} from "convex/server";
declare const fullApi: ApiFromModules<{
aiChatActions: typeof aiChatActions;
aiChats: typeof aiChats;
aiImageGeneration: typeof aiImageGeneration;
askAI: typeof askAI;
cms: typeof cms;
contact: typeof contact;
contactActions: typeof contactActions;
crons: typeof crons;
embeddings: typeof embeddings;
embeddingsQueries: typeof embeddingsQueries;
files: typeof files;
fs: typeof fs;
http: typeof http;
importAction: typeof importAction;
newsletter: typeof newsletter;
newsletterActions: typeof newsletterActions;
pages: typeof pages;
posts: typeof posts;
rss: typeof rss;
search: typeof search;
semanticSearch: typeof semanticSearch;
semanticSearchQueries: typeof semanticSearchQueries;
stats: typeof stats;
versions: typeof versions;
}>;
/**
* A utility for referencing Convex functions in your app's public API.
*
* Usage:
* ```js
* const myFunctionReference = api.myModule.myFunction;
* ```
*/
export declare const api: FilterApi<
typeof fullApi,
FunctionReference<any, "public">
>;
/**
* A utility for referencing Convex functions in your app's internal API.
*
* Usage:
* ```js
* const myFunctionReference = internal.myModule.myFunction;
* ```
*/
export declare const internal: FilterApi<
typeof fullApi,
FunctionReference<any, "internal">
>;
export declare const components: {
pageViewsByPath: {
btree: {
aggregateBetween: FunctionReference<
"query",
"internal",
{ k1?: any; k2?: any; namespace?: any },
{ count: number; sum: number }
>;
aggregateBetweenBatch: FunctionReference<
"query",
"internal",
{ queries: Array<{ k1?: any; k2?: any; namespace?: any }> },
Array<{ count: number; sum: number }>
>;
atNegativeOffset: FunctionReference<
"query",
"internal",
{ k1?: any; k2?: any; namespace?: any; offset: number },
{ k: any; s: number; v: any }
>;
atOffset: FunctionReference<
"query",
"internal",
{ k1?: any; k2?: any; namespace?: any; offset: number },
{ k: any; s: number; v: any }
>;
atOffsetBatch: FunctionReference<
"query",
"internal",
{
queries: Array<{
k1?: any;
k2?: any;
namespace?: any;
offset: number;
}>;
},
Array<{ k: any; s: number; v: any }>
>;
get: FunctionReference<
"query",
"internal",
{ key: any; namespace?: any },
null | { k: any; s: number; v: any }
>;
offset: FunctionReference<
"query",
"internal",
{ k1?: any; key: any; namespace?: any },
number
>;
offsetUntil: FunctionReference<
"query",
"internal",
{ k2?: any; key: any; namespace?: any },
number
>;
paginate: FunctionReference<
"query",
"internal",
{
cursor?: string;
k1?: any;
k2?: any;
limit: number;
namespace?: any;
order: "asc" | "desc";
},
{
cursor: string;
isDone: boolean;
page: Array<{ k: any; s: number; v: any }>;
}
>;
paginateNamespaces: FunctionReference<
"query",
"internal",
{ cursor?: string; limit: number },
{ cursor: string; isDone: boolean; page: Array<any> }
>;
validate: FunctionReference<
"query",
"internal",
{ namespace?: any },
any
>;
};
inspect: {
display: FunctionReference<"query", "internal", { namespace?: any }, any>;
dump: FunctionReference<"query", "internal", { namespace?: any }, string>;
inspectNode: FunctionReference<
"query",
"internal",
{ namespace?: any; node?: string },
null
>;
listTreeNodes: FunctionReference<
"query",
"internal",
{ take?: number },
Array<{
_creationTime: number;
_id: string;
aggregate?: { count: number; sum: number };
items: Array<{ k: any; s: number; v: any }>;
subtrees: Array<string>;
}>
>;
listTrees: FunctionReference<
"query",
"internal",
{ take?: number },
Array<{
_creationTime: number;
_id: string;
maxNodeSize: number;
namespace?: any;
root: string;
}>
>;
};
public: {
clear: FunctionReference<
"mutation",
"internal",
{ maxNodeSize?: number; namespace?: any; rootLazy?: boolean },
null
>;
delete_: FunctionReference<
"mutation",
"internal",
{ key: any; namespace?: any },
null
>;
deleteIfExists: FunctionReference<
"mutation",
"internal",
{ key: any; namespace?: any },
any
>;
init: FunctionReference<
"mutation",
"internal",
{ maxNodeSize?: number; namespace?: any; rootLazy?: boolean },
null
>;
insert: FunctionReference<
"mutation",
"internal",
{ key: any; namespace?: any; summand?: number; value: any },
null
>;
makeRootLazy: FunctionReference<
"mutation",
"internal",
{ namespace?: any },
null
>;
replace: FunctionReference<
"mutation",
"internal",
{
currentKey: any;
namespace?: any;
newKey: any;
newNamespace?: any;
summand?: number;
value: any;
},
null
>;
replaceOrInsert: FunctionReference<
"mutation",
"internal",
{
currentKey: any;
namespace?: any;
newKey: any;
newNamespace?: any;
summand?: number;
value: any;
},
any
>;
};
};
totalPageViews: {
btree: {
aggregateBetween: FunctionReference<
"query",
"internal",
{ k1?: any; k2?: any; namespace?: any },
{ count: number; sum: number }
>;
aggregateBetweenBatch: FunctionReference<
"query",
"internal",
{ queries: Array<{ k1?: any; k2?: any; namespace?: any }> },
Array<{ count: number; sum: number }>
>;
atNegativeOffset: FunctionReference<
"query",
"internal",
{ k1?: any; k2?: any; namespace?: any; offset: number },
{ k: any; s: number; v: any }
>;
atOffset: FunctionReference<
"query",
"internal",
{ k1?: any; k2?: any; namespace?: any; offset: number },
{ k: any; s: number; v: any }
>;
atOffsetBatch: FunctionReference<
"query",
"internal",
{
queries: Array<{
k1?: any;
k2?: any;
namespace?: any;
offset: number;
}>;
},
Array<{ k: any; s: number; v: any }>
>;
get: FunctionReference<
"query",
"internal",
{ key: any; namespace?: any },
null | { k: any; s: number; v: any }
>;
offset: FunctionReference<
"query",
"internal",
{ k1?: any; key: any; namespace?: any },
number
>;
offsetUntil: FunctionReference<
"query",
"internal",
{ k2?: any; key: any; namespace?: any },
number
>;
paginate: FunctionReference<
"query",
"internal",
{
cursor?: string;
k1?: any;
k2?: any;
limit: number;
namespace?: any;
order: "asc" | "desc";
},
{
cursor: string;
isDone: boolean;
page: Array<{ k: any; s: number; v: any }>;
}
>;
paginateNamespaces: FunctionReference<
"query",
"internal",
{ cursor?: string; limit: number },
{ cursor: string; isDone: boolean; page: Array<any> }
>;
validate: FunctionReference<
"query",
"internal",
{ namespace?: any },
any
>;
};
inspect: {
display: FunctionReference<"query", "internal", { namespace?: any }, any>;
dump: FunctionReference<"query", "internal", { namespace?: any }, string>;
inspectNode: FunctionReference<
"query",
"internal",
{ namespace?: any; node?: string },
null
>;
listTreeNodes: FunctionReference<
"query",
"internal",
{ take?: number },
Array<{
_creationTime: number;
_id: string;
aggregate?: { count: number; sum: number };
items: Array<{ k: any; s: number; v: any }>;
subtrees: Array<string>;
}>
>;
listTrees: FunctionReference<
"query",
"internal",
{ take?: number },
Array<{
_creationTime: number;
_id: string;
maxNodeSize: number;
namespace?: any;
root: string;
}>
>;
};
public: {
clear: FunctionReference<
"mutation",
"internal",
{ maxNodeSize?: number; namespace?: any; rootLazy?: boolean },
null
>;
delete_: FunctionReference<
"mutation",
"internal",
{ key: any; namespace?: any },
null
>;
deleteIfExists: FunctionReference<
"mutation",
"internal",
{ key: any; namespace?: any },
any
>;
init: FunctionReference<
"mutation",
"internal",
{ maxNodeSize?: number; namespace?: any; rootLazy?: boolean },
null
>;
insert: FunctionReference<
"mutation",
"internal",
{ key: any; namespace?: any; summand?: number; value: any },
null
>;
makeRootLazy: FunctionReference<
"mutation",
"internal",
{ namespace?: any },
null
>;
replace: FunctionReference<
"mutation",
"internal",
{
currentKey: any;
namespace?: any;
newKey: any;
newNamespace?: any;
summand?: number;
value: any;
},
null
>;
replaceOrInsert: FunctionReference<
"mutation",
"internal",
{
currentKey: any;
namespace?: any;
newKey: any;
newNamespace?: any;
summand?: number;
value: any;
},
any
>;
};
};
uniqueVisitors: {
btree: {
aggregateBetween: FunctionReference<
"query",
"internal",
{ k1?: any; k2?: any; namespace?: any },
{ count: number; sum: number }
>;
aggregateBetweenBatch: FunctionReference<
"query",
"internal",
{ queries: Array<{ k1?: any; k2?: any; namespace?: any }> },
Array<{ count: number; sum: number }>
>;
atNegativeOffset: FunctionReference<
"query",
"internal",
{ k1?: any; k2?: any; namespace?: any; offset: number },
{ k: any; s: number; v: any }
>;
atOffset: FunctionReference<
"query",
"internal",
{ k1?: any; k2?: any; namespace?: any; offset: number },
{ k: any; s: number; v: any }
>;
atOffsetBatch: FunctionReference<
"query",
"internal",
{
queries: Array<{
k1?: any;
k2?: any;
namespace?: any;
offset: number;
}>;
},
Array<{ k: any; s: number; v: any }>
>;
get: FunctionReference<
"query",
"internal",
{ key: any; namespace?: any },
null | { k: any; s: number; v: any }
>;
offset: FunctionReference<
"query",
"internal",
{ k1?: any; key: any; namespace?: any },
number
>;
offsetUntil: FunctionReference<
"query",
"internal",
{ k2?: any; key: any; namespace?: any },
number
>;
paginate: FunctionReference<
"query",
"internal",
{
cursor?: string;
k1?: any;
k2?: any;
limit: number;
namespace?: any;
order: "asc" | "desc";
},
{
cursor: string;
isDone: boolean;
page: Array<{ k: any; s: number; v: any }>;
}
>;
paginateNamespaces: FunctionReference<
"query",
"internal",
{ cursor?: string; limit: number },
{ cursor: string; isDone: boolean; page: Array<any> }
>;
validate: FunctionReference<
"query",
"internal",
{ namespace?: any },
any
>;
};
inspect: {
display: FunctionReference<"query", "internal", { namespace?: any }, any>;
dump: FunctionReference<"query", "internal", { namespace?: any }, string>;
inspectNode: FunctionReference<
"query",
"internal",
{ namespace?: any; node?: string },
null
>;
listTreeNodes: FunctionReference<
"query",
"internal",
{ take?: number },
Array<{
_creationTime: number;
_id: string;
aggregate?: { count: number; sum: number };
items: Array<{ k: any; s: number; v: any }>;
subtrees: Array<string>;
}>
>;
listTrees: FunctionReference<
"query",
"internal",
{ take?: number },
Array<{
_creationTime: number;
_id: string;
maxNodeSize: number;
namespace?: any;
root: string;
}>
>;
};
public: {
clear: FunctionReference<
"mutation",
"internal",
{ maxNodeSize?: number; namespace?: any; rootLazy?: boolean },
null
>;
delete_: FunctionReference<
"mutation",
"internal",
{ key: any; namespace?: any },
null
>;
deleteIfExists: FunctionReference<
"mutation",
"internal",
{ key: any; namespace?: any },
any
>;
init: FunctionReference<
"mutation",
"internal",
{ maxNodeSize?: number; namespace?: any; rootLazy?: boolean },
null
>;
insert: FunctionReference<
"mutation",
"internal",
{ key: any; namespace?: any; summand?: number; value: any },
null
>;
makeRootLazy: FunctionReference<
"mutation",
"internal",
{ namespace?: any },
null
>;
replace: FunctionReference<
"mutation",
"internal",
{
currentKey: any;
namespace?: any;
newKey: any;
newNamespace?: any;
summand?: number;
value: any;
},
null
>;
replaceOrInsert: FunctionReference<
"mutation",
"internal",
{
currentKey: any;
namespace?: any;
newKey: any;
newNamespace?: any;
summand?: number;
value: any;
},
any
>;
};
};
persistentTextStreaming: {
lib: {
addChunk: FunctionReference<
"mutation",
"internal",
{ final: boolean; streamId: string; text: string },
any
>;
createStream: FunctionReference<"mutation", "internal", {}, any>;
getStreamStatus: FunctionReference<
"query",
"internal",
{ streamId: string },
"pending" | "streaming" | "done" | "error" | "timeout"
>;
getStreamText: FunctionReference<
"query",
"internal",
{ streamId: string },
{
status: "pending" | "streaming" | "done" | "error" | "timeout";
text: string;
}
>;
setStreamStatus: FunctionReference<
"mutation",
"internal",
{
status: "pending" | "streaming" | "done" | "error" | "timeout";
streamId: string;
},
any
>;
};
};
fs: {
lib: {
commitFiles: FunctionReference<
"mutation",
"internal",
{
config: {
blobGracePeriod?: number;
downloadUrlTtl?: number;
storage:
| {
apiKey: string;
cdnHostname: string;
region?: string;
storageZoneName: string;
tokenKey?: string;
type: "bunny";
}
| { type: "test" };
};
files: Array<{
attributes?: { expiresAt?: number };
basis?: null | string;
blobId: string;
path: string;
}>;
},
null
>;
copyByPath: FunctionReference<
"mutation",
"internal",
{
config: {
blobGracePeriod?: number;
downloadUrlTtl?: number;
storage:
| {
apiKey: string;
cdnHostname: string;
region?: string;
storageZoneName: string;
tokenKey?: string;
type: "bunny";
}
| { type: "test" };
};
destPath: string;
sourcePath: string;
},
null
>;
deleteByPath: FunctionReference<
"mutation",
"internal",
{
config: {
blobGracePeriod?: number;
downloadUrlTtl?: number;
storage:
| {
apiKey: string;
cdnHostname: string;
region?: string;
storageZoneName: string;
tokenKey?: string;
type: "bunny";
}
| { type: "test" };
};
path: string;
},
null
>;
getDownloadUrl: FunctionReference<
"action",
"internal",
{
blobId: string;
config: {
blobGracePeriod?: number;
downloadUrlTtl?: number;
storage:
| {
apiKey: string;
cdnHostname: string;
region?: string;
storageZoneName: string;
tokenKey?: string;
type: "bunny";
}
| { type: "test" };
};
extraParams?: Record<string, string>;
},
string
>;
list: FunctionReference<
"query",
"internal",
{
config: {
blobGracePeriod?: number;
downloadUrlTtl?: number;
storage:
| {
apiKey: string;
cdnHostname: string;
region?: string;
storageZoneName: string;
tokenKey?: string;
type: "bunny";
}
| { type: "test" };
};
paginationOpts: {
cursor: string | null;
endCursor?: string | null;
id?: number;
maximumBytesRead?: number;
maximumRowsRead?: number;
numItems: number;
};
prefix?: string;
},
{
continueCursor: string;
isDone: boolean;
page: Array<{
attributes?: { expiresAt?: number };
blobId: string;
contentType: string;
path: string;
size: number;
}>;
}
>;
moveByPath: FunctionReference<
"mutation",
"internal",
{
config: {
blobGracePeriod?: number;
downloadUrlTtl?: number;
storage:
| {
apiKey: string;
cdnHostname: string;
region?: string;
storageZoneName: string;
tokenKey?: string;
type: "bunny";
}
| { type: "test" };
};
destPath: string;
sourcePath: string;
},
null
>;
registerPendingUpload: FunctionReference<
"mutation",
"internal",
{
blobId: string;
config: {
blobGracePeriod?: number;
downloadUrlTtl?: number;
storage:
| {
apiKey: string;
cdnHostname: string;
region?: string;
storageZoneName: string;
tokenKey?: string;
type: "bunny";
}
| { type: "test" };
};
contentType: string;
size: number;
},
null
>;
stat: FunctionReference<
"query",
"internal",
{
config: {
blobGracePeriod?: number;
downloadUrlTtl?: number;
storage:
| {
apiKey: string;
cdnHostname: string;
region?: string;
storageZoneName: string;
tokenKey?: string;
type: "bunny";
}
| { type: "test" };
};
path: string;
},
null | {
attributes?: { expiresAt?: number };
blobId: string;
contentType: string;
path: string;
size: number;
}
>;
transact: FunctionReference<
"mutation",
"internal",
{
config: {
blobGracePeriod?: number;
downloadUrlTtl?: number;
storage:
| {
apiKey: string;
cdnHostname: string;
region?: string;
storageZoneName: string;
tokenKey?: string;
type: "bunny";
}
| { type: "test" };
};
ops: Array<
| {
dest: { basis?: null | string; path: string };
op: "move";
source: {
attributes?: { expiresAt?: number };
blobId: string;
contentType: string;
path: string;
size: number;
};
}
| {
dest: { basis?: null | string; path: string };
op: "copy";
source: {
attributes?: { expiresAt?: number };
blobId: string;
contentType: string;
path: string;
size: number;
};
}
| {
op: "delete";
source: {
attributes?: { expiresAt?: number };
blobId: string;
contentType: string;
path: string;
size: number;
};
}
| {
attributes: { expiresAt?: null | number };
op: "setAttributes";
source: {
attributes?: { expiresAt?: number };
blobId: string;
contentType: string;
path: string;
size: number;
};
}
>;
},
null
>;
};
ops: {
basics: {
copyByPath: FunctionReference<
"mutation",
"internal",
{
config: {
blobGracePeriod?: number;
downloadUrlTtl?: number;
storage:
| {
apiKey: string;
cdnHostname: string;
region?: string;
storageZoneName: string;
tokenKey?: string;
type: "bunny";
}
| { type: "test" };
};
destPath: string;
sourcePath: string;
},
null
>;
deleteByPath: FunctionReference<
"mutation",
"internal",
{
config: {
blobGracePeriod?: number;
downloadUrlTtl?: number;
storage:
| {
apiKey: string;
cdnHostname: string;
region?: string;
storageZoneName: string;
tokenKey?: string;
type: "bunny";
}
| { type: "test" };
};
path: string;
},
null
>;
list: FunctionReference<
"query",
"internal",
{
config: {
blobGracePeriod?: number;
downloadUrlTtl?: number;
storage:
| {
apiKey: string;
cdnHostname: string;
region?: string;
storageZoneName: string;
tokenKey?: string;
type: "bunny";
}
| { type: "test" };
};
paginationOpts: {
cursor: string | null;
endCursor?: string | null;
id?: number;
maximumBytesRead?: number;
maximumRowsRead?: number;
numItems: number;
};
prefix?: string;
},
{
continueCursor: string;
isDone: boolean;
page: Array<{
attributes?: { expiresAt?: number };
blobId: string;
contentType: string;
path: string;
size: number;
}>;
}
>;
moveByPath: FunctionReference<
"mutation",
"internal",
{
config: {
blobGracePeriod?: number;
downloadUrlTtl?: number;
storage:
| {
apiKey: string;
cdnHostname: string;
region?: string;
storageZoneName: string;
tokenKey?: string;
type: "bunny";
}
| { type: "test" };
};
destPath: string;
sourcePath: string;
},
null
>;
stat: FunctionReference<
"query",
"internal",
{
config: {
blobGracePeriod?: number;
downloadUrlTtl?: number;
storage:
| {
apiKey: string;
cdnHostname: string;
region?: string;
storageZoneName: string;
tokenKey?: string;
type: "bunny";
}
| { type: "test" };
};
path: string;
},
null | {
attributes?: { expiresAt?: number };
blobId: string;
contentType: string;
path: string;
size: number;
}
>;
};
transact: {
commitFiles: FunctionReference<
"mutation",
"internal",
{
config: {
blobGracePeriod?: number;
downloadUrlTtl?: number;
storage:
| {
apiKey: string;
cdnHostname: string;
region?: string;
storageZoneName: string;
tokenKey?: string;
type: "bunny";
}
| { type: "test" };
};
files: Array<{
attributes?: { expiresAt?: number };
basis?: null | string;
blobId: string;
path: string;
}>;
},
null
>;
transact: FunctionReference<
"mutation",
"internal",
{
config: {
blobGracePeriod?: number;
downloadUrlTtl?: number;
storage:
| {
apiKey: string;
cdnHostname: string;
region?: string;
storageZoneName: string;
tokenKey?: string;
type: "bunny";
}
| { type: "test" };
};
ops: Array<
| {
dest: { basis?: null | string; path: string };
op: "move";
source: {
attributes?: { expiresAt?: number };
blobId: string;
contentType: string;
path: string;
size: number;
};
}
| {
dest: { basis?: null | string; path: string };
op: "copy";
source: {
attributes?: { expiresAt?: number };
blobId: string;
contentType: string;
path: string;
size: number;
};
}
| {
op: "delete";
source: {
attributes?: { expiresAt?: number };
blobId: string;
contentType: string;
path: string;
size: number;
};
}
| {
attributes: { expiresAt?: null | number };
op: "setAttributes";
source: {
attributes?: { expiresAt?: number };
blobId: string;
contentType: string;
path: string;
size: number;
};
}
>;
},
null
>;
};
};
transfer: {
getDownloadUrl: FunctionReference<
"action",
"internal",
{
blobId: string;
config: {
blobGracePeriod?: number;
downloadUrlTtl?: number;
storage:
| {
apiKey: string;
cdnHostname: string;
region?: string;
storageZoneName: string;
tokenKey?: string;
type: "bunny";
}
| { type: "test" };
};
extraParams?: Record<string, string>;
},
string
>;
registerPendingUpload: FunctionReference<
"mutation",
"internal",
{
blobId: string;
config: {
blobGracePeriod?: number;
downloadUrlTtl?: number;
storage:
| {
apiKey: string;
cdnHostname: string;
region?: string;
storageZoneName: string;
tokenKey?: string;
type: "bunny";
}
| { type: "test" };
};
contentType: string;
size: number;
},
null
>;
};
};
};