import { Tool } from "./base.js"; import { AsyncCaller, AsyncCallerParams } from "../util/async_caller.js"; import { Serializable } from "../load/serializable.js"; export type ZapierValues = Record; export interface ZapierNLAWrapperParams extends AsyncCallerParams { /** * NLA API Key. Found in the NLA documentation https://nla.zapier.com/docs/authentication/#api-key * Can also be set via the environment variable `ZAPIER_NLA_API_KEY` */ apiKey?: string; /** * NLA OAuth Access Token. Found in the NLA documentation https://nla.zapier.com/docs/authentication/#oauth-credentials * Can also be set via the environment variable `ZAPIER_NLA_OAUTH_ACCESS_TOKEN` */ oauthAccessToken?: string; } export declare class ZapierNLAWrapper extends Serializable { lc_namespace: string[]; get lc_secrets(): { [key: string]: string; } | undefined; zapierNlaApiKey?: string; zapierNlaOAuthAccessToken?: string; zapierNlaApiBase: string; caller: AsyncCaller; constructor(params?: ZapierNLAWrapperParams); protected _getHeaders(): Record; protected _getActionRequest(actionId: string, instructions: string, params?: ZapierValues): Promise; /** * Executes an action that is identified by action_id, must be exposed * (enabled) by the current user (associated with the set api_key or access token). * @param actionId * @param instructions * @param params */ runAction(actionId: string, instructions: string, params?: ZapierValues): Promise; /** * Same as run, but instead of actually executing the action, will * instead return a preview of params that have been guessed by the AI in * case you need to explicitly review before executing. * @param actionId * @param instructions * @param params */ previewAction(actionId: string, instructions: string, params?: ZapierValues): Promise; /** * Returns a list of all exposed (enabled) actions associated with * current user (associated with the set api_key or access token). */ listActions(): Promise; /** * Same as run, but returns a stringified version of the result. * @param actionId * @param instructions * @param params */ runAsString(actionId: string, instructions: string, params?: ZapierValues): Promise; /** * Same as preview, but returns a stringified version of the result. * @param actionId * @param instructions * @param params */ previewAsString(actionId: string, instructions: string, params?: ZapierValues): Promise; /** * Same as list, but returns a stringified version of the result. */ listActionsAsString(): Promise; } export declare class ZapierNLARunAction extends Tool { apiWrapper: ZapierNLAWrapper; actionId: string; params?: ZapierValues; name: string; description: string; constructor(apiWrapper: ZapierNLAWrapper, actionId: string, zapierDescription: string, paramsSchema: ZapierValues, params?: ZapierValues); /** @ignore */ _call(arg: string): Promise; }