salesforceOrigin (salesforce/transport.ts)

open-connector · src/providers/salesforce/transport.ts · typescript · Apache-2.0
crm, CRM / Leads, crm / leads

Provides Salesforce HTTP request utilities with error handling and timeout support.

// Source: https://github.com/oomol-lab/open-connector | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import { optionalRecord, optionalString } from "../../core/cast.ts";
import { assertPublicHttpUrl } from "../../core/request.ts";
import {
  isAbortLikeError,
  providerInputError,
  providerResponseError,
  ProviderRequestError,
  providerUserAgent,
  runProviderRequest,
} from "../provider-runtime.ts";

// File transfers have a deliberate five-minute budget; JSON uses the shared default.
export const salesforceFileRequestTimeoutMs = 300_000;

export function salesforceOrigin(value: string, fieldName: string): string {
  const url = assertPublicHttpUrl(value, { fieldName, create

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key