UNPKG

@dgac/nmb2b-client

Version:

EUROCONTROL Network Manager B2B SOAP client

32 lines (30 loc) 1.17 kB
import { prepareSecurity } from "../security.js"; import { getWSDLPath } from "../constants.js"; import { deserializer } from "../utils/transformers/index.js"; import { prepareQueryCompleteAIXMDatasets } from "./queryCompleteAIXMDatasets.js"; import { prepareRetrieveAUP } from "./retrieveAUP.js"; import { prepareRetrieveAUPChain } from "./retrieveAUPChain.js"; import { prepareRetrieveEAUPChain } from "./retrieveEAUPChain.js"; import { createClientAsync } from "soap"; //#region src/Airspace/index.ts async function getAirspaceClient(config) { const WSDL = getWSDLPath({ service: "AirspaceServices", flavour: config.flavour, XSD_PATH: config.XSD_PATH }); const security = prepareSecurity(config); const client = await createClientAsync(WSDL, { customDeserializer: deserializer }); client.setSecurity(security); return { __soapClient: client, config, queryCompleteAIXMDatasets: prepareQueryCompleteAIXMDatasets(client), retrieveAUPChain: prepareRetrieveAUPChain(client), retrieveEAUPChain: prepareRetrieveEAUPChain(client), retrieveAUP: prepareRetrieveAUP(client) }; } //#endregion export { getAirspaceClient }; //# sourceMappingURL=index.js.map