@dgac/nmb2b-client
Version:
EUROCONTROL Network Manager B2B SOAP client
44 lines (42 loc) • 2.09 kB
JavaScript
import { prepareSecurity } from "../security.js";
import { getWSDLPath } from "../constants.js";
import { deserializer } from "../utils/transformers/index.js";
import { prepareQueryHotspots } from "./queryHotspots.js";
import { prepareQueryRegulations } from "./queryRegulations.js";
import { prepareQueryTrafficCountsByAirspace } from "./queryTrafficCountsByAirspace.js";
import { prepareQueryTrafficCountsByTrafficVolume } from "./queryTrafficCountsByTrafficVolume.js";
import { prepareRetrieveCapacityPlan } from "./retrieveCapacityPlan.js";
import { prepareRetrieveOTMVPlan } from "./retrieveOTMVPlan.js";
import { prepareRetrieveRunwayConfigurationPlan } from "./retrieveRunwayConfigurationPlan.js";
import { prepareRetrieveSectorConfigurationPlan } from "./retrieveSectorConfigurationPlan.js";
import { prepareUpdateCapacityPlan } from "./updateCapacityPlan.js";
import { prepareUpdateOTMVPlan } from "./updateOTMVPlan.js";
import { createClientAsync } from "soap";
//#region src/Flow/index.ts
async function getFlowClient(config) {
const WSDL = getWSDLPath({
service: "FlowServices",
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,
retrieveSectorConfigurationPlan: prepareRetrieveSectorConfigurationPlan(client),
queryTrafficCountsByAirspace: prepareQueryTrafficCountsByAirspace(client),
queryRegulations: prepareQueryRegulations(client),
queryHotspots: prepareQueryHotspots(client),
queryTrafficCountsByTrafficVolume: prepareQueryTrafficCountsByTrafficVolume(client),
retrieveOTMVPlan: prepareRetrieveOTMVPlan(client),
updateOTMVPlan: prepareUpdateOTMVPlan(client),
retrieveCapacityPlan: prepareRetrieveCapacityPlan(client),
updateCapacityPlan: prepareUpdateCapacityPlan(client),
retrieveRunwayConfigurationPlan: prepareRetrieveRunwayConfigurationPlan(client)
};
}
//#endregion
export { getFlowClient };
//# sourceMappingURL=index.js.map