import { ServiceBubble } from '../../../types/service-bubble-class.js';
import type { BubbleContext } from '../../../types/bubble.js';
import { CredentialType } from '@bubblelab/shared-schemas';
import { type SalesforceParamsInput, type SalesforceResult } from './salesforce.schema.js';
/**
 * Salesforce CRM Service Bubble
 *
 * Salesforce integration for querying accounts, contacts,
 * and running arbitrary SOQL queries via the Salesforce REST API.
 * Primary use case: account-level field lookup by business ID or Salesforce ID.
 */
export declare class SalesforceBubble<T extends SalesforceParamsInput = SalesforceParamsInput> extends ServiceBubble<T, Extract<SalesforceResult, {
    operation: T['operation'];
}>> {
    static readonly type: "service";
    static readonly service = "salesforce";
    static readonly authType: "oauth";
    static readonly bubbleName = "salesforce";
    static readonly schema: import("zod").ZodDiscriminatedUnion<"operation", [import("zod").ZodObject<{
        operation: import("zod").ZodLiteral<"get_account">;
        record_id: import("zod").ZodString;
        fields: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
        credentials: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodNativeEnum<typeof CredentialType>, import("zod").ZodString>>;
    }, "strip", import("zod").ZodTypeAny, {
        operation: "get_account";
        record_id: string;
        credentials?: Partial<Record<CredentialType, string>> | undefined;
        fields?: string[] | undefined;
    }, {
        operation: "get_account";
        record_id: string;
        credentials?: Partial<Record<CredentialType, string>> | undefined;
        fields?: string[] | undefined;
    }>, import("zod").ZodObject<{
        operation: import("zod").ZodLiteral<"search_accounts">;
        where_clause: import("zod").ZodString;
        fields: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
        limit: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
        credentials: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodNativeEnum<typeof CredentialType>, import("zod").ZodString>>;
    }, "strip", import("zod").ZodTypeAny, {
        operation: "search_accounts";
        limit: number;
        where_clause: string;
        credentials?: Partial<Record<CredentialType, string>> | undefined;
        fields?: string[] | undefined;
    }, {
        operation: "search_accounts";
        where_clause: string;
        credentials?: Partial<Record<CredentialType, string>> | undefined;
        fields?: string[] | undefined;
        limit?: number | undefined;
    }>, import("zod").ZodObject<{
        operation: import("zod").ZodLiteral<"get_contact">;
        record_id: import("zod").ZodString;
        fields: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
        credentials: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodNativeEnum<typeof CredentialType>, import("zod").ZodString>>;
    }, "strip", import("zod").ZodTypeAny, {
        operation: "get_contact";
        record_id: string;
        credentials?: Partial<Record<CredentialType, string>> | undefined;
        fields?: string[] | undefined;
    }, {
        operation: "get_contact";
        record_id: string;
        credentials?: Partial<Record<CredentialType, string>> | undefined;
        fields?: string[] | undefined;
    }>, import("zod").ZodObject<{
        operation: import("zod").ZodLiteral<"search_contacts">;
        where_clause: import("zod").ZodString;
        fields: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
        limit: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
        credentials: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodNativeEnum<typeof CredentialType>, import("zod").ZodString>>;
    }, "strip", import("zod").ZodTypeAny, {
        operation: "search_contacts";
        limit: number;
        where_clause: string;
        credentials?: Partial<Record<CredentialType, string>> | undefined;
        fields?: string[] | undefined;
    }, {
        operation: "search_contacts";
        where_clause: string;
        credentials?: Partial<Record<CredentialType, string>> | undefined;
        fields?: string[] | undefined;
        limit?: number | undefined;
    }>, import("zod").ZodObject<{
        operation: import("zod").ZodLiteral<"query">;
        soql: import("zod").ZodString;
        credentials: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodNativeEnum<typeof CredentialType>, import("zod").ZodString>>;
    }, "strip", import("zod").ZodTypeAny, {
        operation: "query";
        soql: string;
        credentials?: Partial<Record<CredentialType, string>> | undefined;
    }, {
        operation: "query";
        soql: string;
        credentials?: Partial<Record<CredentialType, string>> | undefined;
    }>, import("zod").ZodObject<{
        operation: import("zod").ZodLiteral<"describe_object">;
        object_name: import("zod").ZodString;
        credentials: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodNativeEnum<typeof CredentialType>, import("zod").ZodString>>;
    }, "strip", import("zod").ZodTypeAny, {
        operation: "describe_object";
        object_name: string;
        credentials?: Partial<Record<CredentialType, string>> | undefined;
    }, {
        operation: "describe_object";
        object_name: string;
        credentials?: Partial<Record<CredentialType, string>> | undefined;
    }>, import("zod").ZodObject<{
        operation: import("zod").ZodLiteral<"list_objects">;
        include_custom_only: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
        credentials: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodNativeEnum<typeof CredentialType>, import("zod").ZodString>>;
    }, "strip", import("zod").ZodTypeAny, {
        operation: "list_objects";
        include_custom_only: boolean;
        credentials?: Partial<Record<CredentialType, string>> | undefined;
    }, {
        operation: "list_objects";
        credentials?: Partial<Record<CredentialType, string>> | undefined;
        include_custom_only?: boolean | undefined;
    }>]>;
    static readonly resultSchema: import("zod").ZodDiscriminatedUnion<"operation", [import("zod").ZodObject<{
        operation: import("zod").ZodLiteral<"get_account">;
        success: import("zod").ZodBoolean;
        record: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
        error: import("zod").ZodString;
    }, "strip", import("zod").ZodTypeAny, {
        error: string;
        success: boolean;
        operation: "get_account";
        record?: Record<string, unknown> | undefined;
    }, {
        error: string;
        success: boolean;
        operation: "get_account";
        record?: Record<string, unknown> | undefined;
    }>, import("zod").ZodObject<{
        operation: import("zod").ZodLiteral<"search_accounts">;
        success: import("zod").ZodBoolean;
        records: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>, "many">>;
        totalSize: import("zod").ZodOptional<import("zod").ZodNumber>;
        done: import("zod").ZodOptional<import("zod").ZodBoolean>;
        error: import("zod").ZodString;
    }, "strip", import("zod").ZodTypeAny, {
        error: string;
        success: boolean;
        operation: "search_accounts";
        done?: boolean | undefined;
        records?: Record<string, unknown>[] | undefined;
        totalSize?: number | undefined;
    }, {
        error: string;
        success: boolean;
        operation: "search_accounts";
        done?: boolean | undefined;
        records?: Record<string, unknown>[] | undefined;
        totalSize?: number | undefined;
    }>, import("zod").ZodObject<{
        operation: import("zod").ZodLiteral<"get_contact">;
        success: import("zod").ZodBoolean;
        record: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
        error: import("zod").ZodString;
    }, "strip", import("zod").ZodTypeAny, {
        error: string;
        success: boolean;
        operation: "get_contact";
        record?: Record<string, unknown> | undefined;
    }, {
        error: string;
        success: boolean;
        operation: "get_contact";
        record?: Record<string, unknown> | undefined;
    }>, import("zod").ZodObject<{
        operation: import("zod").ZodLiteral<"search_contacts">;
        success: import("zod").ZodBoolean;
        records: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>, "many">>;
        totalSize: import("zod").ZodOptional<import("zod").ZodNumber>;
        done: import("zod").ZodOptional<import("zod").ZodBoolean>;
        error: import("zod").ZodString;
    }, "strip", import("zod").ZodTypeAny, {
        error: string;
        success: boolean;
        operation: "search_contacts";
        done?: boolean | undefined;
        records?: Record<string, unknown>[] | undefined;
        totalSize?: number | undefined;
    }, {
        error: string;
        success: boolean;
        operation: "search_contacts";
        done?: boolean | undefined;
        records?: Record<string, unknown>[] | undefined;
        totalSize?: number | undefined;
    }>, import("zod").ZodObject<{
        operation: import("zod").ZodLiteral<"query">;
        success: import("zod").ZodBoolean;
        records: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>, "many">>;
        totalSize: import("zod").ZodOptional<import("zod").ZodNumber>;
        done: import("zod").ZodOptional<import("zod").ZodBoolean>;
        error: import("zod").ZodString;
    }, "strip", import("zod").ZodTypeAny, {
        error: string;
        success: boolean;
        operation: "query";
        done?: boolean | undefined;
        records?: Record<string, unknown>[] | undefined;
        totalSize?: number | undefined;
    }, {
        error: string;
        success: boolean;
        operation: "query";
        done?: boolean | undefined;
        records?: Record<string, unknown>[] | undefined;
        totalSize?: number | undefined;
    }>, import("zod").ZodObject<{
        operation: import("zod").ZodLiteral<"describe_object">;
        success: import("zod").ZodBoolean;
        object_name: import("zod").ZodOptional<import("zod").ZodString>;
        object_label: import("zod").ZodOptional<import("zod").ZodString>;
        fields: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
            apiName: import("zod").ZodString;
            label: import("zod").ZodString;
            type: import("zod").ZodString;
            custom: import("zod").ZodBoolean;
            picklistValues: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
            referenceTo: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
        }, "strip", import("zod").ZodTypeAny, {
            type: string;
            custom: boolean;
            label: string;
            apiName: string;
            picklistValues?: string[] | undefined;
            referenceTo?: string[] | undefined;
        }, {
            type: string;
            custom: boolean;
            label: string;
            apiName: string;
            picklistValues?: string[] | undefined;
            referenceTo?: string[] | undefined;
        }>, "many">>;
        error: import("zod").ZodString;
    }, "strip", import("zod").ZodTypeAny, {
        error: string;
        success: boolean;
        operation: "describe_object";
        fields?: {
            type: string;
            custom: boolean;
            label: string;
            apiName: string;
            picklistValues?: string[] | undefined;
            referenceTo?: string[] | undefined;
        }[] | undefined;
        object_name?: string | undefined;
        object_label?: string | undefined;
    }, {
        error: string;
        success: boolean;
        operation: "describe_object";
        fields?: {
            type: string;
            custom: boolean;
            label: string;
            apiName: string;
            picklistValues?: string[] | undefined;
            referenceTo?: string[] | undefined;
        }[] | undefined;
        object_name?: string | undefined;
        object_label?: string | undefined;
    }>, import("zod").ZodObject<{
        operation: import("zod").ZodLiteral<"list_objects">;
        success: import("zod").ZodBoolean;
        objects: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
            apiName: import("zod").ZodString;
            label: import("zod").ZodString;
            custom: import("zod").ZodBoolean;
            queryable: import("zod").ZodBoolean;
        }, "strip", import("zod").ZodTypeAny, {
            custom: boolean;
            label: string;
            apiName: string;
            queryable: boolean;
        }, {
            custom: boolean;
            label: string;
            apiName: string;
            queryable: boolean;
        }>, "many">>;
        error: import("zod").ZodString;
    }, "strip", import("zod").ZodTypeAny, {
        error: string;
        success: boolean;
        operation: "list_objects";
        objects?: {
            custom: boolean;
            label: string;
            apiName: string;
            queryable: boolean;
        }[] | undefined;
    }, {
        error: string;
        success: boolean;
        operation: "list_objects";
        objects?: {
            custom: boolean;
            label: string;
            apiName: string;
            queryable: boolean;
        }[] | undefined;
    }>]>;
    static readonly shortDescription = "Salesforce CRM integration for accounts, contacts, and SOQL queries";
    static readonly longDescription = "\n    Salesforce CRM integration for querying and searching CRM records.\n\n    Operations:\n    - get_account / get_contact: retrieve a record by Salesforce ID\n    - search_accounts / search_contacts: SOQL WHERE-clause search\n    - query: run arbitrary SOQL against any object\n    - describe_object: list a sObject's fields with both API name AND user-facing label\n    - list_objects: list all sObjects in the org with API name AND label\n\n    IMPORTANT \u2014 label vs API name:\n    Salesforce fields and objects have a backend API name (used in SOQL, e.g.\n    \"Treasury_Status__c\") that differs from the user-facing label shown in the UI\n    (e.g. \"Saving Status\"). Users almost always describe fields by their UI label,\n    not the API name. Custom fields (suffixed __c) are especially prone to this.\n\n    When the user references a field or object whose API name is NOT obviously a\n    standard Salesforce field (e.g. Id, Name, Industry, BillingCity, Email,\n    AnnualRevenue, AccountNumber, Type, OwnerId), you MUST first call\n    describe_object (or list_objects for object discovery) to fetch the\n    label\u2192apiName mapping, then construct your SOQL using the apiName. Do not\n    guess custom field API names from labels \u2014 call describe_object first.\n\n    If multiple fields plausibly match the user's term, ask a clarification\n    question rather than guessing.\n\n    Result shapes:\n    - describe_object \u2192 { object_name, object_label, fields: [{ apiName, label, type, custom, picklistValues?, referenceTo? }] }\n    - list_objects \u2192 { objects: [{ apiName, label, custom, queryable }] }\n    - get_account / get_contact \u2192 { record: {...} }\n    - search_accounts / search_contacts / query \u2192 { records: [...], totalSize, done }\n\n    Security Features:\n    - OAuth 2.0 authentication with Salesforce\n    - Instance-scoped access (each org has a unique API endpoint)\n    - Secure credential handling with base64-encoded payloads\n  ";
    static readonly alias = "";
    constructor(params?: T, context?: BubbleContext);
    testCredential(): Promise<boolean>;
    private parseCredentials;
    protected chooseCredential(): string | undefined;
    private sfRequest;
    protected performAction(context?: BubbleContext): Promise<Extract<SalesforceResult, {
        operation: T['operation'];
    }>>;
    private getAccount;
    private searchAccounts;
    private getContact;
    private searchContacts;
    private runQuery;
    private describeObject;
    private listObjects;
}
//# sourceMappingURL=salesforce.d.ts.map