Skip to content

oomol-lab/connector-types

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@oomol-lab/connector-types

Optional type augmentation for @oomol-lab/connector.

Import a per-provider subpath to get precise input/output types and JSDoc for that provider's actions. @oomol-lab/connector works fine without it — actions are just loosely typed.

Install

npm install @oomol-lab/connector-types

@oomol-lab/connector is a peer dependency.

Usage

Import only the providers you use:

import "@oomol-lab/connector-types/gmail";
import "@oomol-lab/connector-types/slack";

import { Connector } from "@oomol-lab/connector";

const oomol = new Connector({ apiKey: process.env.OOMOL_API_KEY! });

// Typed input + output
const { threads } = await oomol.gmail.search_threads({ query: "from:boss" });

Providers you don't import stay loosely typed but remain fully callable.

Requirements

Subpath types resolve via package exports, so set moduleResolution to bundler, node16, or nodenext in your tsconfig.json. Classic node (node10) also works via a typesVersions fallback.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors