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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ketch-sdk/ketch-web-api

v1.6.6

Published

Ketch TypeScript Web API

Readme

ketch-web-api

Ketch Web API interface.

Constructor

import {KetchWebAPI} from '@ketch-sdk/ketch-web-api'

const baseUrl: string = 'https://global.ketchcdn.com/web/v2'

const s = new KetchWebAPI(baseUrl)

Create a new KetchWebAPI with the given base url

Get the bootstrap configuration

const request: GetBootstrapConfigurationRequest = {
  organizationCode: 'axonic',
  propertyCode: 'axonic',
}
const config: Configuration = await s.getBootstrapConfiguration(request)

Gets the bootstrap configuration for the specified parameters.

Get the full configuration

const request: GetFullConfigurationRequest = {
  organizationCode: 'axonic',
  propertyCode: 'axonic',
  environmentCode: 'production',
  jurisdictionCode: 'caccpa',
  languageCode: 'es',
}
const config: Configuration = await s.getFullConfiguration(request)

Gets the full configuration for the specified parameters.

Get consent

const request: GetConsentRequest = {
  organizationCode: 'axonic',
  // controllerCode: '', - optional controller
  propertyCode: 'axonic',
  environmentCode: 'production',
  jurisdictionCode: 'caccpa',
  identities: {
    'id1': 'val1',
  },
  purposes: {
    'analytics': {
       // allowed: 'true', - optional, pass in locally stored consent if available
       legalBasisCode: 'disclosure',
    },
  },
  // vendors: string[], - optional, list of TCF vendor ID opted out
  // collectedAt: number, - optional, UNIX timestamp in seconds when the given "allowed" consent was collected
}
const consent: GetConsentResponse = await s.getConsent(request)

Gets the current state of the user's consent flags.

Set consent

const request: SetConsentRequest = {
  organizationCode: 'axonic',
  // controllerCode: '', - optional controller
  propertyCode: 'axonic',
  environmentCode: 'production',
  jurisdictionCode: 'caccpa',
  identities: {
    'id1': 'val1',
  },
  purposes: {
    'analytics': {
      allowed: 'false',
      legalBasisCode: 'consent_optin',
    },
  },
  // vendors: string[], - optional, list of TCF vendor ID opted out
  collectedAt: 2141412414,
}
await s.setConsent(request)

Sets the user's consent flags.

Invoke right

const request: InvokeRightRequest = {
  organizationCode: 'axonic',
  // controllerCode: '',
  propertyCode: 'axonic',
  environmentCode: 'production',
  identities: {
    'id1': 'val1',
  },
  invokedAt: 387642873,
  jurisdictionCode: 'caccpa',
  rightCode: 'erasure',
  user: {
    email: '',
    firstName: '',
    lastName: '',
    // country: '', - optional, ISO-3166 country code
    // stateRegion: '', - optional, region code
    // description: '', - optional, description entered by the data subject
    // phone: '', - optional, ITU formatted telephone number
    // postalCode: '', - optional, postal code
    // addressLine1: '', - optional, address line 1
    // addressLine2: '', - optional, address line 2
    // typeCode: '', - optional, identifier representing the data subject type specified by the user
    // typeRelationshipDetails: '', - optional, additional information provided by the user describing their relation to the business
  },
  // recaptchaToken: string - optional recaptcha token
}
await invokeRight(request)

Invokes the specified rights.

Get preferences QR image

const request: GetPreferenceQRRequest = {
  organizationCode: 'axonic',
  propertyCode: 'axonic',
  environmentCode: 'production',
  // imageSize?: number - image size in pixels such as 256
  // path?: string - path on the property's specified domain
  // backgroundColor?: string - RGB hex of the background color such as ffffff
  // foregroundColor?: string - RGB hex of the foreground color such as 990000
  // parameters: {
  //   'key': 'value',
  // } - additional querystring parameters to pass to the destination page
}
const url: string = await preferenceQR(request)

Get the preferences QR code image URL