api2dat3
v1.1.1
Published
This npm package provides a DAT client with auto TypeScript source code generation based on a WSDL (Web Services Description Language) definition. It utilizes the **axios** library for making requests and the **fast-xml-parser** package for XML parsing.
Downloads
2
Readme
api2dat3 package
This npm package provides a DAT client with auto TypeScript source code generation based on a WSDL (Web Services Description Language) definition. It utilizes the axios library for making requests and the fast-xml-parser package for XML parsing.
One notable feature of this package is its ability to parse XML files based on an Example object This approach facilitates accurate and neat type conversion, array detection, and included value.
With the automated script implementations, this package enables automatic updates based on the API provided by the WSDL from the backend, ensuring that your application remains up-to-date. This capability not only accelerates the development process but also reduces the occurrence of bugs in your project.
How to use
Example:
import * as DAT3 from 'api2dat3';
async getTestList() {
const input: DAT3.MyClaimExternalService_schema1.listContracts = { pageLimit: 1, pageOffset: 0 };
const options: DAT3.Options = {
credentials: {
customerNumber: 'xxx',
customerLogin: 'xxx',
customerPassword: 'xxx'
}
};
return (await DAT3.MyClaimExternalService.listContracts(input, options)).responseObj;
}