{"_id":"@babbiorsetto/dhl-typescript-fetch-client","name":"@babbiorsetto/dhl-typescript-fetch-client","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.2":{"name":"@babbiorsetto/dhl-typescript-fetch-client","version":"0.0.2","description":"Client for the DHL Express API auto-generated from the OpenAPI definition","main":"index.js","types":"index.d.ts","scripts":{"build":"tsc","test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Alessandro Rubino"},"license":"ISC","homepage":"https://github.com/Babbiorsetto/dhl-typescript-fetch-client","repository":{"type":"git","url":"git+https://github.com/Babbiorsetto/dhl-typescript-fetch-client.git"},"devDependencies":{"@types/jest":"^29.5.0","typescript":"^5.0.2"},"dependencies":{"@types/node-fetch":"^2.6.2","node-fetch":"^2.6.9"},"gitHead":"05a2e1dd0b9e1b3f7054efdfa47399586751d7ce","bugs":{"url":"https://github.com/Babbiorsetto/dhl-typescript-fetch-client/issues"},"_id":"@babbiorsetto/dhl-typescript-fetch-client@0.0.2","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-KHnD8dwp25VUSqkv1d2kcRN3J9IasjI5ZaFiVWy4cXRV0U70Aqpud3lcr0srInNYJQIOYRTdxhzChrV/kjmF/Q==","shasum":"593febaa17f868ca69069ce48e249bef9897c1c6","tarball":"https://registry.npmjs.org/@babbiorsetto/dhl-typescript-fetch-client/-/dhl-typescript-fetch-client-0.0.2.tgz","fileCount":10,"unpackedSize":865384,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDzwjm5sZkU9p0oAONIClYFNrcLjDPRoZBFWFvnHrNiwIgKBWMvm9zzitkeHFG9E0QN1A8sbEuPULfeiADEhl0KaA="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkHCzqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpd/BAAojewzLT40+G7rHxUUQuQVsi1LCxYk4th4DKA6IL+VB543BVd\r\ngv07mXkCTupHgClN03BMpmYgl/Q1TwCC9wqwEpb5pC1ijuZlkOm8E0RMtTZV\r\nn19mrLwy8mr5FyQmyv01cCbjDRDMYgokn4MpeFu+vU9RZnVhCUnYger/oPfD\r\nakh8vX80v84+EC443VItLsoSP10Nyg6Gkbp34xcRYYaJg03k4tj3BXjhlQg2\r\npIWdhGG5EAtWjI8PjfZZpdpko6otQe5dTsqrlMWbcHr8z3KujvVn+xr50nl5\r\nu3irP/eMaFmLOMCiBkmxJRk1fmSIfxLIHNZ4ECBCsBlilujrx53o43MvWwus\r\nu7P1DyZXSu4BpPF0V3Z5Git6Rdrqzhn9Hoc27K7RfhlVOi3n51QtOzOt6yDg\r\nvv8vD9Ujdq1sjmFqIkyUa/M+RloyizyGMn82E/mt+Stf9wQRtxJ+bpwXENzy\r\nfZHDxAzYon3kExVlf2fXG1noez81i7L5g120fWc3X926LHwv/FhPZ3LLc962\r\nZ+bhGxu1GkqYL/S+nYp8Hr/1zOWEQhKvJhcg1NZK7XtcgIni0RWj7E2rA2W7\r\n14op+ZUNoeEx1yDBIel3SEDrwr0ff5VslFwi0jQOPWsH5zPyfzHiIC35Y4NX\r\ntUGbVAv2tyxocsHg5gwWBEt12qGBubMPGYA=\r\n=EV8X\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"babbiorsetto","email":"aleruby97@hotmail.it"},"directories":{},"maintainers":[{"name":"babbiorsetto","email":"aleruby97@hotmail.it"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dhl-typescript-fetch-client_0.0.2_1679568106711_0.5671104991724056"},"_hasShrinkwrap":false}},"time":{"created":"2023-03-23T10:41:46.618Z","0.0.2":"2023-03-23T10:41:46.880Z","modified":"2023-03-23T10:41:47.077Z"},"maintainers":[{"name":"babbiorsetto","email":"aleruby97@hotmail.it"}],"description":"Client for the DHL Express API auto-generated from the OpenAPI definition","homepage":"https://github.com/Babbiorsetto/dhl-typescript-fetch-client","repository":{"type":"git","url":"git+https://github.com/Babbiorsetto/dhl-typescript-fetch-client.git"},"author":{"name":"Alessandro Rubino"},"bugs":{"url":"https://github.com/Babbiorsetto/dhl-typescript-fetch-client/issues"},"license":"ISC","readme":"# Usage\r\n```typescript\r\nimport {RatingApi, Configuration} from '@babbiorsetto/dhl-typescript-fetch-client'\r\n\r\nconst config: Configuration = {\r\n    username: 'MyApiKey',\r\n    password: 'MyApiSecret'\r\n}\r\nconst rating = new RatingApi(config, 'https://express.api.dhl.com/mydhlapi/test')\r\n\r\ntry {\r\n    const resp = await rating.expApiRates('accountNumber', /*All required info*/)\r\n    console.log(JSON.stringify(resp.products))\r\n} catch(err) {\r\n    console.log(err)\r\n    // The body of the error message\r\n    // Has a detailed description in the 'detail' field\r\n    const errBody: SupermodelIoLogisticsExpressErrorResponse = await err.json()\r\n    console.log(errBody.detail)\r\n}\r\n```\r\n\r\nFull description of the API in the [official documentation](https://developer.dhl.com/api-reference/dhl-express-mydhl-api#reference-docs-section)\r\n","readmeFilename":"README.md"}