soap
Version:
A minimal node SOAP client
45 lines (44 loc) • 1.99 kB
TypeScript
import { IMTOMAttachments, IWSDLCache } from './types';
import { WSDL } from './wsdl';
export declare function isObject(value: unknown): value is object;
export declare function isPlainObject(value: unknown): value is Record<string, unknown>;
export declare function merge<T>(target: T, ...sources: any[]): T;
export declare function mergeWith<T>(target: T, ...args: any[]): T;
export declare function defaults<T>(target: T, ...sources: any[]): T;
export declare function defaultsDeep<T>(target: T, ...sources: any[]): T;
export declare function pickBy<T extends Record<string, any>>(object: T, predicate: (value: any, key: string) => boolean): Partial<T>;
export declare function once<T extends (...args: any[]) => any>(func: T): T;
export declare function getByPath(obj: any, path: any): any;
export declare function passwordDigest(nonce: string, created: string, password: string): string;
export declare const TNS_PREFIX = "__tns__";
/**
* Find a key from an object based on the value
* @param {Object} Namespace prefix/uri mapping
* @param {*} nsURI value
* @returns {String} The matching key
*/
export declare function findPrefix(xmlnsMapping: any, nsURI: any): string;
export declare function splitQName<T>(nsName: T): {
prefix: string;
name: T;
} | {
prefix: string;
name: string;
};
export declare function xmlEscape(obj: any): any;
export declare function parseMTOMResp(payload: Buffer, boundary: string, callback: (err?: Error, resp?: IMTOMAttachments) => void): Promise<void>;
export declare function streamToText(stream: NodeJS.ReadableStream): Promise<string>;
/**
* Strip UTF-8 byte order mark (BOM) from a string.
*/
export declare function stripBom(str: string): string;
declare class DefaultWSDLCache implements IWSDLCache {
private cache;
constructor();
has(key: string): boolean;
get(key: string): WSDL;
set(key: string, wsdl: WSDL): void;
clear(): void;
}
export declare const wsdlCacheSingleton: DefaultWSDLCache;
export {};