Creates HTTP headers for Salesforce API requests based on operation options.
// 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 type { SalesforceHandler } from "./context.ts";
import { requiredResponseRecord } from "../provider-runtime.ts";
import { queryPath, segment } from "./context.ts";
import { salesforceRequest } from "./transport.ts";
export const salesforceBaseHandlers: Record<string, SalesforceHandler> = {
async list_objects(_d, c) {
return c.object(`${c.base}/sobjects/`);
},
async describe_object(d, c) {
return c.object(`${c.base}/sobjects/${segment(d.objectName)}/describe`);
},
async query(d, c) {
const headers = new Headers({ authorization: `Bearer ${c.accessToken
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key