npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

api2dat5

v1.5.3

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

65

Readme

api2dat5 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 DAT5 from 'api2dat5';

async function getTestList() {
    const input: DAT5.MyClaimExternalService_schema1.listContracts = { pageLimit: 1, pageOffset: 0 };
    const options: DAT5.Options = {
        credentials: {
            customerNumber: 'xxx',
            customerLogin: 'xxx',
            customerPassword: 'xxx'
        }
    };

    return (await DAT5.MyClaimExternalService.listContracts(input, options)).responseObj;
}

It is possible to use default options or redefine them with the function setDefaultOption. In this case, you don't always need to provide options for every call.

import * as DAT5 from 'api2dat5';

// options for default usage in entire application
const option: DAT5.Options = {
    credentials: {
            customerNumber: 'xxx',
            customerLogin: 'xxx',
            customerPassword: 'xxx'
        }
    environmentId: 'prod' // can be 'gold'
}

DAT5.setDefaultOption(option);

async function getTestList() {

    const input: DAT5.MyClaimExternalService_schema1.listContracts = { pageLimit: 1, pageOffset: 0 };

    return (await DAT5.MyClaimExternalService.listContracts(input)).responseObj;
}

There is a possibility to redefine the environment, such as the URL, for different services. You can create multiple environments and switch between them.

Full Description of Options:


export type Options = {
    credentials?: Credentials;
    headers?: {
        [key: string]: string
    }
    environmentId?: string;
    environmentServiceUrlConfig?: EnvironmentServiceUrlConfig;
    environmentInterfacePartnerData?: EnvironmentInterfacePartnerData;
};

export type EnvironmentServiceUrlConfig = {
    [environmentId: string]: {
        [serviceName: string]: string;
    };
};

export type EnvironmentInterfacePartnerData = {
    [environmentId: string]: {
        interfacePartnerNumber: string;
        interfacePartnerSignature: string;
    };
};

export type Credentials = CredentialsWithSignatures | CredentialsWithToken | CredentialsWithCustomerSignature;

export interface CredentialsWithSignatures {
    interfacePartnerNumber?: string;
    interfacePartnerSignature?: string;
    customerNumber: string;
    customerLogin: string;
    customerPassword: string;
}

export interface CredentialsWithToken {
    'dat-authorizationtoken': string;
}

The default configuration looks like this (actual values are better to check in the library):


export const defaultEnvironmentServiceUrlConfig: EnvironmentServiceUrlConfig = {
    prod: {
        ConversionFunctionsService: 'https://www.dat.de/myClaim/soap/v2/ConversionFunctionsService',
        FastTrackService: 'https://www.datgroup.com/myClaim/soap/FastTrackService',
        FastTrackServiceRest: 'https://www.dat.de/myClaim/rest/FastTrackService',
        MyClaimExternalAuthenticationService: 'https://www.dat.de/myClaim/soap/v2/MyClaimExternalAuthenticationService',
        MyClaimExternalService: 'https://www.dat.de/myClaim/soap/v2/MyClaimExternalService',
        SpareParts: 'https://www.dat.de/PartsInfo/services/SpareParts',
        VehicleIdentificationService: 'https://www.dat.de/myClaim/soap/v2/VehicleIdentificationService',
        VehicleRepairService: 'https://www.dat.de/myClaim/soap/v2/VehicleRepairService',
        VehicleRepairOnlineService: 'https://www.dat.de/VehicleRepairOnline/services/VehicleRepairService',
        VehicleSelectionService: 'https://www.dat.de/myClaim/soap/v2/VehicleSelectionService',

        Evaluation: 'https://www.dat.de/FinanceLine/soap/Evaluation',
        DossierN: 'https://www.dat.de/FinanceLine/soap/DossierN',
        Dossier1N: 'https://www.dat.de/valuateNG/soap/Dossier1N',

        Authentication: 'https://www.dat.de/rentalPrices/soap/Authentication',
        RentalPricesService: 'https://www.dat.de/rentalPrices/soap/RentalPricesService',

        VehicleRepairItalyService: 'https://www.dat.de/myClaim/soap/v2/VehicleRepairItalyService',
        VehicleImagery: 'https://www.dat.de/myClaim/soap/v2/VehicleImagery'
    },
    gold: {
        ConversionFunctionsService: 'https://gold.dat.de/myClaim/soap/v2/ConversionFunctionsService',
        FastTrackService: 'https://gold.datgroup.com/myClaim/soap/FastTrackService',
        FastTrackServiceRest: 'https://gold.dat.de/myClaim/rest/FastTrackService',
        MyClaimExternalAuthenticationService:
            'https://gold.dat.de/myClaim/soap/v2/MyClaimExternalAuthenticationService',
        MyClaimExternalService: 'https://gold.dat.de/myClaim/soap/v2/MyClaimExternalService',
        SpareParts: 'https://gold.dat.de/PartsInfo/services/SpareParts',
        VehicleIdentificationService: 'https://gold.dat.de/myClaim/soap/v2/VehicleIdentificationService',
        VehicleRepairService: 'https://gold.dat.de/myClaim/soap/v2/VehicleRepairService',
        VehicleRepairOnlineService: 'https://gold.dat.de/VehicleRepairOnline/services/VehicleRepairService',
        VehicleSelectionService: 'https://gold.dat.de/myClaim/soap/v2/VehicleSelectionService',

        Evaluation: 'https://gold.dat.de/FinanceLine/soap/Evaluation',
        DossierN: 'https://gold.dat.de/FinanceLine/soap/DossierN',
        Dossier1N: 'https://gold.dat.de/valuateNG/soap/Dossier1N',

        Authentication: 'https://gold.dat.de/rentalPrices/soap/Authentication',
        RentalPricesService: 'https://gold.dat.de/rentalPrices/soap/RentalPricesService',

        VehicleRepairItalyService: 'https://gold.dat.de/myClaim/soap/v2/VehicleRepairItalyService',
        VehicleImagery: 'https://gold.dat.de/myClaim/soap/v2/VehicleImagery'
    }
};

Update

release 1.5.3 24.05.2024 update SilverDat interface Version

release 1.5.1 25.01.2024 added 'VehicleRepairItalyService' wsdlUrl: 'https://www.dat.de/myClaim/soap/v2/VehicleRepairItalyService?wsdl' added 'VehicleImageryService' wsdlUrl: 'https://www.dat.de/myClaim/soap/v2/VehicleImagery?wsdl'

release 1.4.1 23.01.2024 added 'RentalPricesAuthentication' wsdlUrl: 'https://www.dat.de/rentalPrices/soap/Authentication?wsdl' added 'RentalPricesService' wsdlUrl: 'https://www.datgroup.com/rentalPrices/soap/RentalPricesService?wsdl'

release 1.3.1 17.01.2024 added 'FinanceLineEvaluationService' wsdlUrl: 'https://www.dat.de/FinanceLine/soap/Evaluation?wsdl' added 'FinanceLineDossierNService' wsdlUrl: 'https://www.datgroup.com/FinanceLine/soap/DossierN?wsdl' added 'ValuateNGDossier1NService' wsdlUrl: 'https://www.datgroup.com/valuateNG/soap/Dossier1N?wsdl'

22.11.2023 update SilverDat interface Version 2023-06 Nr. 82 Published 31/10/2023 added 'PartsService' wsdlUrl: 'https://www.dat.de/myClaim/soap/v2/PartsService?wsdl'