Socket
Socket
Sign inDemoInstall

integrations-lib

Package Overview
Dependencies
6
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    integrations-lib

Shared library to work with 3rd Party APIs with shared interfaces


Version published
Weekly downloads
1
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Abstracts multiple APIs to give you a shared library to call against different services such as Mail, Calendar, Work Tracking.

image

  • ✅ All communication handled directly from library
  • ✅ Promise Based Methods
  • ✅ Typescript Bindings
  • ✅ Support for Mail, Calendar, Task and Work Tracking
  • 😇 Used in Amna

Everything is handled within the library using REST calls and data transformations. It can be an alternate to services such as Nylas or Kloudless.

You may use the library for free, and purchase a one-time access token for complete library usage.

Purchase Here

Free Tier

  • 10 function calls per run in Calendar and Mail APIs
  • Only checkout 1 Task Service (Google, Todoist, Microsoft) at a time

Docs

See all available methods and interfaces in the Wiki

Usage

import {
  Integrations,
  IntegrationOptions,
  MailServiceType,
} from "integrations-lib"

// after successful oauth, pass in a set of access tokens.
const opts: IntegrationOptions = {
  authorizers: {
    Microsoft: {
      apiToken: "<user access token>",
    },
    Google: {
      apiToken: "<user access token>",
    },
  },
}

const integrations = new Integrations(opts, "DEMO_TOKEN")

const outlook = integrations.getMailService(MailServiceType.Microsoft)
const gmail = integrations.getMailService(MailServiceType.Google)

const draftMessage = {
  to: ["integrations@getamna.com"],
  cc: [],
  bcc: [],
  subject: "Whoa, this library works!",
  body: "Hey, we just sent you and email from our awesome library!",
}

sendMail()

async function sendMail() {
  // send an email
  const gmailResp = await gmail.send(draftMessage)
  const outlookResp = await outlook.send(draftMessage)
}

Authentication

This library does not provide UI for authentication to an OAuth Provider. If you purchased a token, you can purchase our OAuth Helper for Javascript that works with most 3rd party providers.

You can obtain tokens from Google and Microsoft for testing

Interface and API Definitions

All interface definitions can be found in our Public Github Repo

Not all methods have been implemented. There may also be slight variations between two APIs. Please read the wiki.

Open an Issue

Support

Library supporters have the ability to open support tickets. Because we are strapped on resources, we will prioritize token purchasers first.

Open an Issue

Keywords

FAQs

Last updated on 16 Mar 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc