import type { FunctionContext } from "../../../functions.mjs"; import { COManager, type CustomObjectRecordsClient, type TypedCustomObjectRecordManager } from "./manager.mjs"; import type { AnyCustomObjectDefinition } from "./types.mjs"; /** SDK-shaped client surface consumed by {@link createCustomObjectFunctionRuntime}. */ export interface CustomObjectFunctionRuntimeClient { readonly customObjects: { readonly records: CustomObjectRecordsClient; }; } /** Constructor options for {@link createCustomObjectFunctionRuntime}. */ export interface CreateCustomObjectFunctionRuntimeOptions { /** Optional prebuilt SDK-shaped client used instead of constructing a new one from the function context. */ readonly client?: CustomObjectFunctionRuntimeClient; /** Optional bearer-token override used when constructing the default SDK client. */ readonly bearerToken?: string; } /** Shared runtime returned by {@link createCustomObjectFunctionRuntime}. */ export interface CustomObjectFunctionRuntime { /** SDK-shaped client used for low-level access beyond the typed manager lane. */ readonly client: CustomObjectFunctionRuntimeClient; /** Underlying records resource used by the typed manager lane. */ readonly records: CustomObjectRecordsClient; /** Root typed custom-object manager bound to the chosen client. */ readonly manager: COManager; /** Returns a typed record manager bound to one object definition. */ for(definition: TDefinition): TypedCustomObjectRecordManager; /** Alias for {@link for}. */ forObject(definition: TDefinition): TypedCustomObjectRecordManager; } /** * Creates one shared custom-object function runtime from a Rippling function context. * * This is the small bootstrap helper for custom-object-backed functions: it * constructs one SDK client from `context.env.rippling_user_bearer_token`, binds * a `COManager`, and exposes definition-scoped managers through `for(...)`. * * @param context - Function context whose bearer token should back the runtime. * @param options - Optional client injection or bearer-token override. * @returns Shared runtime containing the SDK client plus typed record managers. */ export declare function createCustomObjectFunctionRuntime(context: Pick, options?: CreateCustomObjectFunctionRuntimeOptions): CustomObjectFunctionRuntime; //# sourceMappingURL=function-runtime.d.mts.map