@fine-dev/fine-js
Version:
Javascript client for Fine BaaS
28 lines • 1.07 kB
TypeScript
import FineAIClient from "./ai";
import D1RestClient, { GenericSchema } from "./d1";
import { createAuthClient } from "better-auth/react";
import FineStorageClient from "./storage";
import { FineTranscriber } from "./transcribe";
import { createOAuthApprovalHook } from "./oauth";
export type { EntityReference } from "./storage";
type FineConfig = {
restUrl: string;
authUrl: string;
aiUrl: string;
storageUrl: string;
transcribeUrl: string;
mcpUrl: string;
};
export declare class FineClient<Database extends GenericSchema = GenericSchema> extends D1RestClient<Database> {
private config;
auth: ReturnType<typeof createAuthClient>;
useOAuthApproval: ReturnType<typeof createOAuthApprovalHook>;
ai: FineAIClient;
storage: FineStorageClient;
/**
* @param config Path to the Fine API or a FineConfig object. Pass a string beginning with `/` to use the current origin with a path relative to it.
*/
constructor(config: string | FineConfig);
transcriber(): FineTranscriber;
}
//# sourceMappingURL=index.d.ts.map