Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@botpress/client

Package Overview
Dependencies
Maintainers
5
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@botpress/client

Botpress Client

  • 0.0.8
  • npm
  • Socket score

Version published
Weekly downloads
1.4K
decreased by-5.98%
Maintainers
5
Weekly downloads
 
Created
Source

Botpress Client

Official Botpress HTTP client for TypeScript. Queries the Botpress API.

Disclaimer ⚠️

This package is still in development and is not ready for production use. Use it at your own risk.

Installation

npm install --save @botpress/client # for npm
yarn add @botpress/client # for yarn
pnpm add @botpress/client # for pnpm

Usage

import { Client } from '@botpress/client'

type ListBotsResponse = Awaited<ReturnType<Client['listBots']>>
type Bot = ListBotsResponse['bots'][number]

const main = async () => {
  const token = 'your-token'
  const workspaceId = 'your-workspace-id'
  const client = new Client({ token, workspaceId })

  const allBots: Bot[] = []
  let nextToken: string | undefined
  do {
    const resp = await client.listBots({ nextToken })
    nextToken = resp.meta.nextToken
    allBots.push(...resp.bots)
  } while (nextToken)

  console.log(allBots)
}
void main()

FAQs

Package last updated on 03 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc