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

pipedrive.ts

v0.12.0

Published

A Typescript Pipedrive package.

Downloads

21

Readme

A Typescript Pipedrive package.

This is a RESTful Client project, that is written in Typescript, for Pipedrive CRM.

Aim and Scope of project

For early phases of this project, only some operations will be included to the project. In the future there is a possibility of adding all operations defined in Open API specification of Pipedrive.

Getting Started

To get started, you need to install Node.js. This installation will come with npm tool that can be used to install packages to your projects. Enough said, let's install and include the project.

Installation

npm install --save pipedrive.ts

or

yarn add pipedrive.ts

Adding to your project

require statement

const { ... } = require("pipedrive.ts");

import statement

import { ... } from "pipedrive.ts";

... represents package exports. A clear example is PipedriveClient. You can find more about package exports down below.

Operations

As stated above, initial scope of this project is to implement some operations of Pipedrive. This list will be updated in the future when adding new operations. Implemented operations are;

Using operations

Before getting started with operations, we will declare a piece of code that will be used in all operations for the sake of DRY principle.

Reused piece of code(with import statement)

import { PipedriveClient } from "pipedrive.ts";

const client = new PipedriveClient("Your Pipedrive API token goes here.");

Get all deals

const deals = await client.GetAllDeals();

note that this operation needs to be used in an async function.

Alternatively, we can do something like this;

const promise = client.GetAllDeals();

promise
    .then((deals) => {
        //Use deals object for your case.
    })
    .catch((error) => {
        //Throw the operation error.
        throw error;
    });

client.GetAllDeals method takes couple of parameters;

| name | description | type | optional | | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | -------- | | user_id | If supplied, only deals matching the given user will be returned. However, filter_id and owned_by_you takes precedence over user_id when supplied. | number | true | | filter_id | The ID of the filter to use. | number | true | | stage_id | If supplied, only deals within the given stage will be returned. | number | true | | status | Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. | open, won, lost, deleted , all_not_deleted | true | | start | Pagination start. | number | true | | limit | Items shown per page. | number | true | | sort | The field names and sorting mode separated by a comma (field_name_1 ASC, field_name_2 DESC). Only first-level field keys are supported (no nested keys). | string | true | | owned_by_you | When supplied, only deals owned by you are returned. However, filter_id takes precedence over owned_by_you when both are supplied. | 0, 1 | true |

client.GetAllDeals method returns;

| name | description | type | may not be present | | ----------------- | ------------------------------------- | --------- | ------------------ | | success | If the response is successful or not. | boolean | true | | data | The array of deals. | array | true | | additional_data | The additional data of the list. | object | true | | related_objects | Related data of the call | object | true |

data, additional_data and related_objects types can be found in their links.