← Public packages
@kody/salesforce
Salesforce REST helpers for identity, SOQL, multi-org routing, and error investigation.
src/resolve-org.ts
16 lines · 633 B · TypeScriptimport { requireOrgResolveInput, resolveOrg } from './orgs.ts'
/**
* Resolve which saved integration to use for a Salesforce organization id.
* Prefer an explicit integrationName, then a caller-owned orgMap (from
* packageStorage), then live discovery. Unknown org ids fail closed.
* @example
* import resolveOrg from 'kody:@kody/salesforce/resolve-org'
* const org = await resolveOrg({
* organizationId: '00D000000000001AAA',
* orgMap: { '00D000000000001AAA': 'salesforce-acme' },
* })
*/
export default async function resolveOrgEntrypoint(params: unknown = {}) {
return resolveOrg(requireOrgResolveInput(params))
}