import { Effect } from "effect"; import { type StorageDeps, type StorageFailure } from "@executor-js/sdk/core"; import { GoogleDiscoveryMethodBinding, GoogleDiscoveryStoredSourceData } from "./types"; export declare const GOOGLE_DISCOVERY_OAUTH_SESSION_TTL_MS: number; export declare const googleDiscoverySchema: { google_discovery_source: import("fumadb/schema").Table<{ readonly name: import("fumadb/schema").Column<"string", string, string>; readonly config: import("fumadb/schema").Column<"json", unknown, unknown>; readonly auth_kind: import("fumadb/schema").Column<"string", string | null, string>; readonly auth_connection_id: import("fumadb/schema").Column<"string", string | null, string | null>; readonly auth_client_id_secret_id: import("fumadb/schema").Column<"string", string | null, string | null>; readonly auth_client_secret_secret_id: import("fumadb/schema").Column<"string", string | null, string | null>; readonly auth_scopes: import("fumadb/schema").Column<"json", unknown, unknown>; readonly created_at: import("fumadb/schema").Column<"timestamp", Date, Date>; readonly updated_at: import("fumadb/schema").Column<"timestamp", Date, Date>; } & { row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>; id: import("fumadb/schema").Column<"varchar(255)", string, string>; scope_id: import("fumadb/schema").Column<"varchar(255)", string, string>; }, {}>; google_discovery_source_credential_header: import("fumadb/schema").Table<{ readonly source_id: import("fumadb/schema").Column<"string", string, string>; readonly name: import("fumadb/schema").Column<"string", string, string>; readonly kind: import("fumadb/schema").Column<"string", string, string>; readonly text_value: import("fumadb/schema").Column<"string", string | null, string | null>; readonly secret_id: import("fumadb/schema").Column<"string", string | null, string | null>; readonly secret_prefix: import("fumadb/schema").Column<"string", string | null, string | null>; } & { row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>; id: import("fumadb/schema").Column<"varchar(255)", string, string>; scope_id: import("fumadb/schema").Column<"varchar(255)", string, string>; }, {}>; google_discovery_source_credential_query_param: import("fumadb/schema").Table<{ readonly source_id: import("fumadb/schema").Column<"string", string, string>; readonly name: import("fumadb/schema").Column<"string", string, string>; readonly kind: import("fumadb/schema").Column<"string", string, string>; readonly text_value: import("fumadb/schema").Column<"string", string | null, string | null>; readonly secret_id: import("fumadb/schema").Column<"string", string | null, string | null>; readonly secret_prefix: import("fumadb/schema").Column<"string", string | null, string | null>; } & { row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>; id: import("fumadb/schema").Column<"varchar(255)", string, string>; scope_id: import("fumadb/schema").Column<"varchar(255)", string, string>; }, {}>; google_discovery_binding: import("fumadb/schema").Table<{ readonly source_id: import("fumadb/schema").Column<"string", string, string>; readonly binding: import("fumadb/schema").Column<"json", unknown, unknown>; readonly created_at: import("fumadb/schema").Column<"timestamp", Date, Date>; } & { row_id: import("fumadb/schema").IdColumn<"varchar(255)", string | null, string>; id: import("fumadb/schema").Column<"varchar(255)", string, string>; scope_id: import("fumadb/schema").Column<"varchar(255)", string, string>; }, {}>; }; export type GoogleDiscoverySchema = typeof googleDiscoverySchema; export interface GoogleDiscoveryStoredSource { readonly namespace: string; /** Executor scope id this source row lives in. Writes stamp this on * `scope_id`; reads choose scope explicitly in the FumaDB query. */ readonly scope: string; readonly name: string; readonly config: GoogleDiscoveryStoredSourceData; } export interface GoogleDiscoveryStore { readonly getBinding: (toolId: string, scope: string) => Effect.Effect<{ readonly namespace: string; readonly binding: GoogleDiscoveryMethodBinding; } | null, StorageFailure>; readonly putBinding: (toolId: string, sourceId: string, scope: string, binding: GoogleDiscoveryMethodBinding) => Effect.Effect; readonly removeBindingsBySource: (sourceId: string, scope: string) => Effect.Effect; readonly getBindingsForSource: (sourceId: string, scope: string) => Effect.Effect, StorageFailure>; readonly putSource: (source: GoogleDiscoveryStoredSource) => Effect.Effect; readonly updateSourceMeta: (sourceId: string, scope: string, update: { readonly name?: string; readonly auth?: import("./types").GoogleDiscoveryAuth; }) => Effect.Effect; readonly removeSource: (sourceId: string, scope: string) => Effect.Effect; readonly getSource: (sourceId: string, scope: string) => Effect.Effect; readonly getSourceConfig: (sourceId: string, scope: string) => Effect.Effect; /** Source rows whose oauth2 auth columns reference the given secret id. * `slot` distinguishes client_id vs client_secret. */ readonly findSourcesBySecret: (secretId: string) => Effect.Effect; /** Source rows whose oauth2 auth points at the given connection id. */ readonly findSourcesByConnection: (connectionId: string) => Effect.Effect; /** Credential header / query_param child rows referencing the secret. */ readonly findCredentialRowsBySecret: (secretId: string) => Effect.Effect; readonly lookupSourceNames: (keys: readonly string[]) => Effect.Effect, StorageFailure>; } export declare const makeGoogleDiscoveryStore: (deps: StorageDeps) => GoogleDiscoveryStore;