import { Value } from "../../values/index.js"; import { FunctionReference, FunctionReference_future } from "../../server/api.js"; export declare function setupActionCalls(requestId: string): { runQuery: (query: FunctionReference<"query", "public" | "internal"> | FunctionReference_future<"query", "public" | "internal">, args?: Record) => Promise; runMutation: (mutation: FunctionReference<"mutation", "public" | "internal"> | FunctionReference_future<"mutation", "public" | "internal">, args?: Record) => Promise; runAction: (action: FunctionReference<"action", "public" | "internal"> | FunctionReference_future<"action", "public" | "internal">, args?: Record) => Promise; }; /** * A Convex-managed service. The backend decides which names it accepts; this * type lists the ones the current release knows about. */ export type ServiceName = "ai-gateway"; /** * Get a short-lived credential for calling a Convex-managed service. * * This function can only be called while an action is running. The credential * is scoped to the current deployment and should be sent as a bearer token. * Credentials expire a few minutes after they're issued. The action runtime * caches and refreshes them as needed, so call this function whenever making * a service request rather than reusing one credential for a long action. * * @param service - The service the credential may access. * @returns A JWT to send as `Authorization: Bearer `. Keep it inside * the action: don't return it to clients or store it in environment * variables. */ export declare function getServiceToken(service: ServiceName): Promise; /** * Get the base URL of a Convex-managed service. * * This function can only be called while an action is running. Pair it with * {@link getServiceToken} to reach the service. * * @param service - The service to address. * @returns The service's origin, without a trailing slash. */ export declare function getServiceUrl(service: ServiceName): Promise; //# sourceMappingURL=actions_impl.d.ts.map