# pipedrive-client

> Typescript or Javascript client for the Pipedrive API

Latest version **0.2.1** (published 2019-04-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install pipedrive-client
pnpm add pipedrive-client
yarn add pipedrive-client
bun add pipedrive-client
```

## 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.2.1 |
| Published | 2019-04-25 |
| First published | 2019-04-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 62.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | jonathanstokes |
| Keywords | Pipedrive, client, promise, async, typescript |

## Links

- npm: https://www.npmjs.com/package/pipedrive-client
- Repository: https://github.com/casetext/pipedrive-client
- Homepage: https://github.com/casetext/pipedrive-client#readme
- Issues: https://github.com/casetext/pipedrive-client/issues
- npm.io page: https://npm.io/package/pipedrive-client

## Dependencies (4)

- [merge-deep](https://npm.io/package/merge-deep.md) ^3.0.2
- [query-string](https://npm.io/package/query-string.md) ^6.4.2
- [fast-deep-equal](https://npm.io/package/fast-deep-equal.md) ^2.0.1
- [typed-rest-client](https://npm.io/package/typed-rest-client.md) ^1.2.0

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 0.2.1 (latest) — 2019-04-25

## README

# pipedrive-client
Typescript or Javascript client for the Pipedrive API.

## Compatibility
This library is written using Promises, and meant to work with `async`/`await` in Typescript.

It will also work just fine in Javascript, but most of the examples are written for Typescript.

## Background

This library was originally written as a strongly typed, Promise-friendly alternative to the [pipedrive/client-nodejs](https://github.com/pipedrive/client-nodejs) library available from Pipedrive.  Where possible, the object structures and available functions in this library mimic those in `pipedrive/client-nodejs`, with signatures changed to use Promises instead of callback functions.

From that repo:
> Pipedrive is a sales pipeline software that gets you organized. It's a powerful sales CRM with effortless sales pipeline management. See www.pipedrive.com for details.

## Install

```
npm install pipedrive-client
```

## Usage

With a pre-set API token, in JavaScript:

```javascript
var Pipedrive = require('pipedrive-client');
var pipedrive = new Pipedrive.Client('YOUR_API_TOKEN_HERE', { strictMode: true });
```
(The `{ strictMode: true }` is here for backward compatibility, ignored, and can be omitted.)

In Typescript:
```typescript
import {Pipedrive} from 'pipedrive-client';
const pipedrive = new Pipedrive.Client('YOUR_API_TOKEN_HERE');
```

### A simple "Hello world" that lists some deals

Here's a quick example that will list some deals from your Pipedrive account:

```typescript
import {Pipedrive} from 'pipedrive-client';
const pipedrive = new Pipedrive.Client('YOUR_API_TOKEN_HERE');

const deals = pipedrive.Deals.getAll({limit: 5}).deals;
for (let i = 0; i < deals.length; i++) {
    console.log(deals[i].title + ' (worth ' + deals[i].value + ' ' + deals[i].currency + ')');
}
```

## Supported Objects

- Deals
- Persons

### To-be-supported Objects

These are not yet supported, but support could easily be added by willing contributors following the patterns already established:

- Activities
- ActivityTypes
- Authorizations
- Currencies
- CompanyFeatures
- CompanySettings
- DealFields
- Files
- Filters
- Goals
- Notes
- Organizations
- OrganizationFields
- PermissionSets
- PersonFields
- Pipelines
- Products
- ProductFields
- Roles
- SearchResults
- Stages
- Users
- Webhooks

## Supported operations for object collections

TODO: Document this (See Collection).

## Supported operations for each object

TODO: Document this (See PipedriveObject).

## Operations with nested objects

TODO: Document this

## Examples

### Get 15 first deals using the first deals filter

## API Documentation

The Pipedrive REST API documentation can be found at https://developers.pipedrive.com/v1.

## Testing

To run unit tests, execute `npm test`.

## Licence

TBD.  We built this at Casetext for ourselves, but we're willing to share with others.  If you're interested in using this library, email stokes@casetext.com to discuss.

## Contribution

TBD

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