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

@integrationos/connections

v1.1.0

Published

IntegrationOS is a fully managed event bus lets you send and receive data across mission-critical cloud apps, databases and warehouses.

Downloads

5

Readme

@integrationos/connections

A guide on how to use IntegrationOS's modern and lightweight SDK to programmatically manage your Connections.

IntegrationOS's SDK requires an IntegrationOS API Key, which can be created via the settings page in your Developer Dashboard

Getting Started

To start using the IntegrationOS SDK, install the package:

> npm install @integrationos/connections

Initialize

We'll start off by initializing the client, which requires your IntegrationOS API Key. You can specify the environment as either "sandbox" or "production". If you do not specify an environment, the SDK will default to "sandbox".

import { createClient } from '@integrationos/connections';

const client = createClient(process.env.INTEGRATIONOS_API_KEY, {
  environment: "sandbox"
});

Create a Source

Next, we'll create a source using the createSource function. It requires the following parameters:

  1. type: Type of Source to create (i.e., Stripe, Shopify, FTP Server, etc..)
  2. group: A meaningful and unique group for the data (i.e., Customer ID)
  3. label: A human-readable label to easily identify the source later
  4. config: Any additional configuration settings (i.e., access credentials)

Here's an example:

import { createSource } from '@integrationos/connections';

const source = await createSource<"stripe">(client, {
  type: "stripe", 
  group: "customer-abc", 
  label: "Production Stripe", 
  config: {
    STRIPE_SECRET_KEY: process.env.STRIPE_SECRET_KEY,
  }
});

Set your IntegrationOS Subscriptions

Having set up our source, we'll subscribe to events using the setEvents function. It requires the following parameters:

  1. type: Type of Source to create (i.e., Stripe, Shopify, FTP Server, etc..)
  2. key: The Source's unique key
  3. events: The events you'd like to ingest

Here's an example:

import { setEvents } from '@integrationos/connections';

await setEvents<"stripe">(client, {
  type: "stripe",
  key: source.key,
  events: ["customer.created"],
});

Create a Destination

Next, we'll create a Destination using the createDestination function. It requires the following parameters:

  1. type: Type of Destination to create (i.e., Snowflake, Redshift, BigQuery, etc..)
  2. group: A meaningful and unique group for the data (i.e., Customer ID)
  3. label: A human-readable label to easily identify the destination later
  4. config: Any additional configuration settings (i.e., access credentials)

Here's an example:

import { createDestination } from '@integrationos/connections';

const destination = await createDestination<"mongodb">(client, {
  type: "mongodb", 
  group: "customer-abc",
  label: "Production MongoDB",
  config: {
    MONGODB_URI: process.env.MONDODB_URI,
  },
});

License

© 2023, IntegrationOS - Released under the MIT License