@chec/integration-handler

Type definitions for creating integrations that run on the Chec infrastructure

Usage no npm install needed!

<script type="module">
  import checIntegrationHandler from 'https://cdn.skypack.dev/@chec/integration-handler';
</script>

README

Chec Integration Handler

This package serves to provide TypeScript types for integrations created to work with the Chec infrastructure and dashboard. Please refer to the integration guide for getting started with an integration.

Installation

npm install -D @chec/integration-handler
# OR
yarn add -D @chec/integration-handler

Usage

Like the integration configuration SDK you can specify a type for your integration configuration. This will ensure that proper types are provided when using various APIs provided by the context parameter, which is used for fetch configuration for your integration.

import { IntegrationHandler } from '@chec/integration-handler';

interface MyIntegrationConfiguration {
  configKey: string
}

const handler: IntegrationHandler<MyIntegrationConfiguration> = async (request, context) => {

};

export = handler;