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 extends ServiceBubble> { 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>; credentials: import("zod").ZodOptional, import("zod").ZodString>>; }, "strip", import("zod").ZodTypeAny, { operation: "get_account"; record_id: string; credentials?: Partial> | undefined; fields?: string[] | undefined; }, { operation: "get_account"; record_id: string; credentials?: Partial> | undefined; fields?: string[] | undefined; }>, import("zod").ZodObject<{ operation: import("zod").ZodLiteral<"search_accounts">; where_clause: import("zod").ZodString; fields: import("zod").ZodOptional>; limit: import("zod").ZodDefault>; credentials: import("zod").ZodOptional, import("zod").ZodString>>; }, "strip", import("zod").ZodTypeAny, { operation: "search_accounts"; limit: number; where_clause: string; credentials?: Partial> | undefined; fields?: string[] | undefined; }, { operation: "search_accounts"; where_clause: string; credentials?: Partial> | 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>; credentials: import("zod").ZodOptional, import("zod").ZodString>>; }, "strip", import("zod").ZodTypeAny, { operation: "get_contact"; record_id: string; credentials?: Partial> | undefined; fields?: string[] | undefined; }, { operation: "get_contact"; record_id: string; credentials?: Partial> | undefined; fields?: string[] | undefined; }>, import("zod").ZodObject<{ operation: import("zod").ZodLiteral<"search_contacts">; where_clause: import("zod").ZodString; fields: import("zod").ZodOptional>; limit: import("zod").ZodDefault>; credentials: import("zod").ZodOptional, import("zod").ZodString>>; }, "strip", import("zod").ZodTypeAny, { operation: "search_contacts"; limit: number; where_clause: string; credentials?: Partial> | undefined; fields?: string[] | undefined; }, { operation: "search_contacts"; where_clause: string; credentials?: Partial> | 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").ZodString>>; }, "strip", import("zod").ZodTypeAny, { operation: "query"; soql: string; credentials?: Partial> | undefined; }, { operation: "query"; soql: string; credentials?: Partial> | undefined; }>, import("zod").ZodObject<{ operation: import("zod").ZodLiteral<"describe_object">; object_name: import("zod").ZodString; credentials: import("zod").ZodOptional, import("zod").ZodString>>; }, "strip", import("zod").ZodTypeAny, { operation: "describe_object"; object_name: string; credentials?: Partial> | undefined; }, { operation: "describe_object"; object_name: string; credentials?: Partial> | undefined; }>, import("zod").ZodObject<{ operation: import("zod").ZodLiteral<"list_objects">; include_custom_only: import("zod").ZodDefault>; credentials: import("zod").ZodOptional, import("zod").ZodString>>; }, "strip", import("zod").ZodTypeAny, { operation: "list_objects"; include_custom_only: boolean; credentials?: Partial> | undefined; }, { operation: "list_objects"; credentials?: Partial> | 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>; error: import("zod").ZodString; }, "strip", import("zod").ZodTypeAny, { error: string; success: boolean; operation: "get_account"; record?: Record | undefined; }, { error: string; success: boolean; operation: "get_account"; record?: Record | undefined; }>, import("zod").ZodObject<{ operation: import("zod").ZodLiteral<"search_accounts">; success: import("zod").ZodBoolean; records: import("zod").ZodOptional, "many">>; totalSize: import("zod").ZodOptional; done: import("zod").ZodOptional; error: import("zod").ZodString; }, "strip", import("zod").ZodTypeAny, { error: string; success: boolean; operation: "search_accounts"; done?: boolean | undefined; records?: Record[] | undefined; totalSize?: number | undefined; }, { error: string; success: boolean; operation: "search_accounts"; done?: boolean | undefined; records?: Record[] | undefined; totalSize?: number | undefined; }>, import("zod").ZodObject<{ operation: import("zod").ZodLiteral<"get_contact">; success: import("zod").ZodBoolean; record: import("zod").ZodOptional>; error: import("zod").ZodString; }, "strip", import("zod").ZodTypeAny, { error: string; success: boolean; operation: "get_contact"; record?: Record | undefined; }, { error: string; success: boolean; operation: "get_contact"; record?: Record | undefined; }>, import("zod").ZodObject<{ operation: import("zod").ZodLiteral<"search_contacts">; success: import("zod").ZodBoolean; records: import("zod").ZodOptional, "many">>; totalSize: import("zod").ZodOptional; done: import("zod").ZodOptional; error: import("zod").ZodString; }, "strip", import("zod").ZodTypeAny, { error: string; success: boolean; operation: "search_contacts"; done?: boolean | undefined; records?: Record[] | undefined; totalSize?: number | undefined; }, { error: string; success: boolean; operation: "search_contacts"; done?: boolean | undefined; records?: Record[] | undefined; totalSize?: number | undefined; }>, import("zod").ZodObject<{ operation: import("zod").ZodLiteral<"query">; success: import("zod").ZodBoolean; records: import("zod").ZodOptional, "many">>; totalSize: import("zod").ZodOptional; done: import("zod").ZodOptional; error: import("zod").ZodString; }, "strip", import("zod").ZodTypeAny, { error: string; success: boolean; operation: "query"; done?: boolean | undefined; records?: Record[] | undefined; totalSize?: number | undefined; }, { error: string; success: boolean; operation: "query"; done?: boolean | undefined; records?: Record[] | undefined; totalSize?: number | undefined; }>, import("zod").ZodObject<{ operation: import("zod").ZodLiteral<"describe_object">; success: import("zod").ZodBoolean; object_name: import("zod").ZodOptional; object_label: import("zod").ZodOptional; fields: import("zod").ZodOptional>; referenceTo: import("zod").ZodOptional>; }, "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, "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; private parseCredentials; protected chooseCredential(): string | undefined; private sfRequest; protected performAction(context?: BubbleContext): Promise>; private getAccount; private searchAccounts; private getContact; private searchContacts; private runQuery; private describeObject; private listObjects; } //# sourceMappingURL=salesforce.d.ts.map