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

1254 lines
32 KiB
TypeScript
Raw Normal View History

/* eslint-disable */
/**
* Generated `api` utility.
*
* THIS CODE IS AUTOMATICALLY GENERATED.
*
* To regenerate, run `npx convex dev`.
* @module
*/
feat: add AI Agent chat integration with Anthropic Claude API Add AI writing assistant (Agent) powered by Anthropic Claude API. Agent can be enabled on Write page (replaces textarea) and optionally in RightSidebar on posts/pages via frontmatter. Features: - AIChatView component with per-page chat history - Page content context support for AI responses - Markdown rendering for AI responses - User-friendly error handling for missing API keys - System prompt configurable via Convex environment variables - Anonymous session authentication using localStorage Environment variables required: - ANTHROPIC_API_KEY (required) - CLAUDE_PROMPT_STYLE, CLAUDE_PROMPT_COMMUNITY, CLAUDE_PROMPT_RULES (optional split prompts) - CLAUDE_SYSTEM_PROMPT (optional single prompt fallback) Configuration: - siteConfig.aiChat.enabledOnWritePage: Enable Agent toggle on /write page - siteConfig.aiChat.enabledOnContent: Allow Agent on posts/pages via frontmatter - Frontmatter aiChat: true (requires rightSidebar: true) Updated files: - src/components/AIChatView.tsx: AI chat interface component - src/components/RightSidebar.tsx: Conditional Agent rendering - src/pages/Write.tsx: Agent mode toggle (title changes to Agent) - convex/aiChats.ts: Chat history queries and mutations - convex/aiChatActions.ts: Claude API integration with error handling - convex/schema.ts: aiChats table with indexes - src/config/siteConfig.ts: AIChatConfig interface - Documentation updated across all files Documentation: - files.md: Updated component descriptions - changelog.md: Added v1.33.0 entry - TASK.md: Marked AI chat tasks as completed - README.md: Added AI Agent Chat section - content/pages/docs.md: Added AI Agent chat documentation - content/blog/setup-guide.md: Added AI Agent chat setup instructions - public/raw/changelog.md: Added v1.33.0 entry
2025-12-26 12:31:33 -08:00
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<{
feat: add AI Agent chat integration with Anthropic Claude API Add AI writing assistant (Agent) powered by Anthropic Claude API. Agent can be enabled on Write page (replaces textarea) and optionally in RightSidebar on posts/pages via frontmatter. Features: - AIChatView component with per-page chat history - Page content context support for AI responses - Markdown rendering for AI responses - User-friendly error handling for missing API keys - System prompt configurable via Convex environment variables - Anonymous session authentication using localStorage Environment variables required: - ANTHROPIC_API_KEY (required) - CLAUDE_PROMPT_STYLE, CLAUDE_PROMPT_COMMUNITY, CLAUDE_PROMPT_RULES (optional split prompts) - CLAUDE_SYSTEM_PROMPT (optional single prompt fallback) Configuration: - siteConfig.aiChat.enabledOnWritePage: Enable Agent toggle on /write page - siteConfig.aiChat.enabledOnContent: Allow Agent on posts/pages via frontmatter - Frontmatter aiChat: true (requires rightSidebar: true) Updated files: - src/components/AIChatView.tsx: AI chat interface component - src/components/RightSidebar.tsx: Conditional Agent rendering - src/pages/Write.tsx: Agent mode toggle (title changes to Agent) - convex/aiChats.ts: Chat history queries and mutations - convex/aiChatActions.ts: Claude API integration with error handling - convex/schema.ts: aiChats table with indexes - src/config/siteConfig.ts: AIChatConfig interface - Documentation updated across all files Documentation: - files.md: Updated component descriptions - changelog.md: Added v1.33.0 entry - TASK.md: Marked AI chat tasks as completed - README.md: Added AI Agent Chat section - content/pages/docs.md: Added AI Agent chat documentation - content/blog/setup-guide.md: Added AI Agent chat setup instructions - public/raw/changelog.md: Added v1.33.0 entry
2025-12-26 12:31:33 -08:00
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
>;
};
};
};