export interface FunctionResponseOptions { body?: Record; statusCode?: number; headers?: Record; message?: string; } export declare class FunctionResponse { body: Record; statusCode: number; headers: Record; message: string; constructor({ body, statusCode, headers, message }?: FunctionResponseOptions); } export type FunctionEvent = Record; export type DurableDuration = number | string; export type DurableTimestamp = number | Date | string; export interface DurableWaitForEventOptions { type: string; timeout?: DurableDuration; } export interface DurableFailureOptions { code?: string; details?: unknown; } export interface DurableWaitForEventEventResult { kind: 'event'; waitName: string; eventType: string; payload: T; } export interface DurableWaitForEventTimeoutResult { kind: 'timeout'; waitName: string; eventType: string; } export interface DurableWaitForEventResultHelpers { isEvent(): this is DurableWaitForEventEventResult & DurableWaitForEventResultHelpers; isTimeout(): this is DurableWaitForEventTimeoutResult & DurableWaitForEventResultHelpers; throwTimeout(this: DurableWaitForEventTimeoutResult & DurableWaitForEventResultHelpers): never; } export type DurableWaitForEventResult = (DurableWaitForEventEventResult & DurableWaitForEventResultHelpers) | (DurableWaitForEventTimeoutResult & DurableWaitForEventResultHelpers); export interface FunctionContext { env: { rippling_user_bearer_token: string | undefined; }; function: { company_id: string; function_id: string; function_version_id: string; run_id: string; role_id?: string; }; settings: Record; } export interface DurableFunctionContext extends FunctionContext { step(name: string, fn: () => Promise | T, opts?: unknown): Promise; sleep(name: string, duration: DurableDuration): Promise; sleepUntil(name: string, timestamp: DurableTimestamp): Promise; waitForEvent(name: string, opts: DurableWaitForEventOptions): Promise>; fail(message: string, opts?: DurableFailureOptions): never; } export declare class DataBridgeRecord { id: string; version: string; value: any; position: any; constructor(id: string, version: string, value: any, position: any); } export declare class DataBridgeTombstone { id: string; version: string; constructor(id: string, version: string); } export declare class DataBridgeFeed { streamName: string; extractAs: any; initialState: any; constructor(streamName: string, extractAs: any, initialState: any); } export interface DataBridgeResponseOptions { records?: any[]; tombstones?: any[]; checkpoint?: string; feeds?: any[]; last?: boolean; state?: Record; } export declare class DataBridgeResponse { records: any[]; tombstones: any[]; checkpoint: string; feeds: any[]; last: boolean; state: Record; constructor({ records, tombstones, checkpoint, feeds, last, state, }?: DataBridgeResponseOptions); } export interface DataBridgeRequest { parameters: { streamName: string; state: any; checkpoint: string; backfill: boolean; connectionId: string; }; } export declare class DataBridgeRateLimitError extends Error { waitTimeInSeconds: number; constructor(message: string, waitTimeInSeconds: number); } //# sourceMappingURL=functions.d.ts.map