import { Effect, Schema } from "effect"; import { type PluginCtx, type StorageFailure } from "@executor-js/sdk/core"; import { type GoogleDiscoveryStore } from "./binding-store"; import { GoogleDiscoveryParseError, GoogleDiscoverySourceError } from "./errors"; import { GoogleDiscoveryAuth } from "./types"; export interface GoogleDiscoveryProbeOperation { readonly toolPath: string; readonly method: string; readonly pathTemplate: string; readonly description: string | null; } export interface GoogleDiscoveryProbeResult { readonly name: string; readonly title: string | null; readonly service: string; readonly version: string; readonly toolCount: number; readonly scopes: readonly string[]; readonly operations: readonly GoogleDiscoveryProbeOperation[]; } export interface GoogleDiscoveryUpdateSourceInput { readonly name?: string; /** Rewrite the source's auth — typically after a successful * re-authenticate, to point at a freshly minted Connection. */ readonly auth?: GoogleDiscoveryAuth; } declare const GoogleDiscoveryProbeInputSchema: Schema.Struct<{ readonly discoveryUrl: Schema.String; readonly credentials: Schema.optional; }>]>>>; readonly queryParams: Schema.optional; }>]>>>; }>>; }>; declare const GoogleDiscoveryAddSourceInputSchema: Schema.Struct<{ readonly name: Schema.String; readonly scope: Schema.String; readonly discoveryUrl: Schema.String; readonly credentials: Schema.optional; }>]>>>; readonly queryParams: Schema.optional; }>]>>>; }>>; readonly namespace: Schema.optional; readonly auth: Schema.Union; }>, Schema.Struct<{ readonly kind: Schema.Literal<"oauth2">; readonly connectionId: Schema.String; readonly clientIdSecretId: Schema.String; readonly clientSecretSecretId: Schema.NullOr; readonly scopes: Schema.$Array; }>]>; }>; export type GoogleDiscoveryProbeInput = typeof GoogleDiscoveryProbeInputSchema.Type; export type GoogleDiscoveryAddSourceInput = typeof GoogleDiscoveryAddSourceInputSchema.Type; /** * Errors any Google Discovery extension method may surface. */ export type GoogleDiscoveryExtensionFailure = GoogleDiscoveryParseError | GoogleDiscoverySourceError | StorageFailure; declare const makeGoogleDiscoveryPluginExtension: (ctx: PluginCtx) => { probeDiscovery: (input: string | GoogleDiscoveryProbeInput) => Effect.Effect<{ name: string; title: string | null; service: string; version: string; toolCount: number; scopes: string[]; operations: { toolPath: string; method: "post" | "options" | "delete" | "get" | "put" | "patch" | "head"; pathTemplate: string; description: string | null; }[]; }, GoogleDiscoveryParseError | GoogleDiscoverySourceError, never>; addSource: (input: GoogleDiscoveryAddSourceInput) => Effect.Effect<{ toolCount: number; namespace: string; }, StorageFailure | GoogleDiscoveryParseError | GoogleDiscoverySourceError, never>; removeSource: (namespace: string, scope: string) => Effect.Effect; getSource: (namespace: string, scope: string) => Effect.Effect; updateSource: (namespace: string, scope: string, input: GoogleDiscoveryUpdateSourceInput) => Effect.Effect; }; export type GoogleDiscoveryPluginExtension = ReturnType; export declare const googleDiscoveryPlugin: import("@executor-js/sdk/core").ConfiguredPlugin<"googleDiscovery", { probeDiscovery: (input: string | GoogleDiscoveryProbeInput) => Effect.Effect<{ name: string; title: string | null; service: string; version: string; toolCount: number; scopes: string[]; operations: { toolPath: string; method: "post" | "options" | "delete" | "get" | "put" | "patch" | "head"; pathTemplate: string; description: string | null; }[]; }, GoogleDiscoveryParseError | GoogleDiscoverySourceError, never>; addSource: (input: GoogleDiscoveryAddSourceInput) => Effect.Effect<{ toolCount: number; namespace: string; }, StorageFailure | GoogleDiscoveryParseError | GoogleDiscoverySourceError, never>; removeSource: (namespace: string, scope: string) => Effect.Effect; getSource: (namespace: string, scope: string) => Effect.Effect; updateSource: (namespace: string, scope: string, input: GoogleDiscoveryUpdateSourceInput) => Effect.Effect; }, GoogleDiscoveryStore, {}, { 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>; }, {}>; }, undefined, import("effect/Layer").Layer, import("effect/unstable/httpapi/HttpApiGroup").Any>; export {};