@chec/integration-handler
v0.0.16
Published
Type definitions for creating integrations that run on the Chec infrastructure
Downloads
31
Keywords
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;