# postmen-ts

> Typescript Postmen Wrapper

Latest version **0.0.10** (published 2022-01-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install postmen-ts
pnpm add postmen-ts
yarn add postmen-ts
bun add postmen-ts
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.10 |
| Published | 2022-01-05 |
| First published | 2021-12-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 19.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | austinkloske |

## Links

- npm: https://www.npmjs.com/package/postmen-ts
- Repository: https://github.com/austinkloske22/postmen
- Homepage: https://github.com/austinkloske22/postmen#readme
- Issues: https://github.com/austinkloske22/postmen/issues
- npm.io page: https://npm.io/package/postmen-ts

## Recent versions

- 0.0.10 (latest) — 2022-01-05
- 0.0.9 — 2022-01-05
- 0.0.8 — 2022-01-05
- 0.0.7 — 2021-12-31
- 0.0.6 — 2021-12-31
- 0.0.5 — 2021-12-31
- 0.0.4 — 2021-12-31
- 0.0.3 — 2021-12-31
- 0.0.2 — 2021-12-31
- 0.0.1 — 2021-12-31

## README

# postmen-ts

[![npm version](https://img.shields.io/npm/v/postmen-ts.svg?style=flat-square)](https://www.npmjs.org/package/postmen-ts)
[![install size](https://packagephobia.now.sh/badge?p=postmen-ts)](https://packagephobia.now.sh/result?p=postmen-ts)
[![npm downloads](https://img.shields.io/npm/dm/postmen-ts.svg?style=flat-square)](http://npm-stat.com/charts.html?package=postmen-ts)


Postmen types for third-party use

## Installing

Using npm:

```bash
$ npm install postmen-ts
```

## Example Usage

```ts

import { CalculateRatesRequest, CalculateRatesResponse, Common, ShipperAccount, Shipment } from "postmen-ts";
import axios, { AxiosError, AxiosInstance, AxiosResponse } from 'axios';

public Rate(shipment: any) {
    return new Promise<any> ((resolve, reject) => {
        const CalculateRatesRequest = {} as CalculateRatesRequest;
        CalculateRatesRequest.async = false;
        CalculateRatesRequest.is_document = false;
        CalculateRatesRequest.ship_date = new Date().toISOString().slice(0, 10);
        CalculateRatesRequest.shipment = this._mapShipment(shipment) as Shipment;
        CalculateRatesRequest.shipper_accounts = this._getShipperAccounts() as ShipperAccount[];

         this.axios.post(Common.Endpoint.Rates, CalculateRatesRequest)
        .then((response: AxiosResponse) => {
            const calculateRateResponse = response.data?.data as CalculateRatesResponse;
            resolve(calculateRateResponse);
        })
        .catch((error: any) => {
            reject(error);
        });
    });
}
```

---
_Source: https://npm.io/package/postmen-ts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
