@salesforce/apex-node
Version:
Salesforce JS library for Apex
52 lines (51 loc) • 1.86 kB
TypeScript
import { ApexDiagnostic, CommonOptions } from '../utils';
export type ApexExecuteOptions = CommonOptions & {
targetUsername?: string;
apexFilePath?: string;
apexCode?: string | Buffer;
userInput?: boolean;
};
export declare const soapEnv = "soapenv:Envelope";
export declare const soapBody = "soapenv:Body";
export declare const soapHeader = "soapenv:Header";
export declare const action = "executeAnonymous";
export declare const soapTemplate = "<env:Envelope xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\nxmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\"\nxmlns:cmd=\"http://soap.sforce.com/2006/08/apex\"\nxmlns:apex=\"http://soap.sforce.com/2006/08/apex\">\n <env:Header>\n <cmd:SessionHeader>\n <cmd:sessionId>%s</cmd:sessionId>\n </cmd:SessionHeader>\n %s\n </env:Header>\n <env:Body>\n <%s xmlns=\"http://soap.sforce.com/2006/08/apex\">\n %s\n </%s>\n </env:Body>\n</env:Envelope>";
export declare const xmlCharMap: {
[index: string]: string;
};
export interface SoapResponse {
[soapEnv]?: {
[soapHeader]?: {
DebuggingInfo: DebuggingInfo;
};
[soapBody]: {
executeAnonymousResponse: {
result: ExecAnonApiResponse;
};
};
};
}
export interface DebuggingInfo {
debugLog: string;
}
export interface RequestData {
method: string;
url: string;
body: string;
headers: {};
}
export type ExecuteAnonymousResponse = {
compiled: boolean;
success: boolean;
logs?: string;
diagnostic?: ApexDiagnostic[];
};
export type ExecAnonApiResponse = {
column: number;
compiled: string;
compileProblem: string | object;
exceptionMessage: string | object;
exceptionStackTrace: string | object;
line: number;
success: string;
};