CheckCourt
TypeScript SDK

TypeScript SDK

The official SDK for apps and integrations, with a typed API client, token handling, and webhook and extension verification

@checkcourt/sdk takes care of the repetitive parts of a CheckCourt integration. Everything it does can also be built with plain HTTP; the rest of the developer documentation describes the protocol. The SDK saves you the parts that are easy to get wrong: token rotation, signatures, PKCE.

What's included

AreaPurpose
createCheckCourtClientTyped client for every endpoint under /api/v1, generated from the API reference
apiKeyAuth, installationAuth, userAuthThe three ways to authenticate, with token caching and safe refresh
getInstallation, getMeYour club installation with its settings, or who connected your member app
createPkcePair, buildAuthorizeUrl, exchangeCode, …OAuth 2.1 for member apps
verifyWebhookVerify the signature, get the event back as a type
verifyExtensionContext, verifyExtensionRequest, uiDeclarative UI extensions
@checkcourt/sdk/iframeiframe extensions in the browser: height, toasts, navigation, theme
sendNotificationNotify members through CheckCourt
getObjectMetadata, putObjectMetadata, publishAppEvent, …Connections between apps
defineManifestFully typed manifest, including permissions and every extension point

The SDK is written in TypeScript, ships its own type definitions and runs as an ES module on Node.js 20 or later. It uses WebCrypto, so webhook and extension verification also work on edge runtimes such as Cloudflare Workers, Vercel Edge or Deno. Its only dependency is openapi-fetch.

Installation

The SDK is open source at CheckCourt/sdk.

Version 0.x

The API may still change before version 1.0. Read the changelog before you upgrade.

Install the package

npm install @checkcourt/sdk

The package ships its compiled build and type definitions. This documentation describes version 0.12.0; where a feature needs a newer version than you have, the page says so. The changes in each release are listed in the changelog.

Import it

import { createCheckCourtClient, installationAuth, verifyWebhook } from "@checkcourt/sdk";

In the browser, for iframe extensions, import only the browser entry point:

import { connectExtensionFrame } from "@checkcourt/sdk/iframe";

Entry points

ImportRuns inContents
@checkcourt/sdkServerEverything except the iframe part
@checkcourt/sdk/oauthServerOAuth and installation tokens only
@checkcourt/sdk/webhooksServer, edgeWebhook verification and event types only
@checkcourt/sdk/extensionsServer, edgeContext tokens, request verification, UI builder
@checkcourt/sdk/manifestAnywheredefineManifest and constants
@checkcourt/sdk/iframeBrowserconnectExtensionFrame and messages

Client secrets, signing secrets and refresh tokens belong on your server only. The browser entry point needs none of them.

On this page