
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@dopt/blocks-javascript-client
Advanced tools
The Dopt blocks JavaScript client is a friendly server-side package for accessing the Dopt blocks API to access and updates block and flow state for a particular user in Dopt.
It is published to npm as @dopt/blocks-javascript-client.
Via npm:
npm install @dopt/blocks-javascript-client
Via Yarn:
yarn add @dopt/blocks-javascript-client
Via pnpm:
pnpm add @dopt/blocks-javascript-client
To configure the blocks JavaScript client you will need
import { DoptApiClient } from '@dopt/blocks-javascript-client';
const client = new DoptApiClient({
apiKey: process.env.DOPT_BLOCKS_API_KEY as string,
});
Get block data using the getBlock method:
const block = await client.blocks.getBlock('model-block-1', {
version: 3,
userIdentifier: 'example-user-idenitifer',
});
Transition a block using the transition method:
await client.blocks.transition('model-block-1', {
version: 3,
userIdentifier: 'example-user-identifier',
transitions: 'complete',
});
Get flow data using the getFlow method:
const flow = await client.flows.getFlow('example-flow-identifier', {
version: 2,
userIdentifier: 'example-user-identifier',
});
Transition a flow using the flowIntent method:
await client.flows.intent('example-flow-identifier', 'finish', {
version: 3,
userIdentifier: 'example-user-identifier',
});
FAQs
A JavaScript client for the Dopt Blocks API
The npm package @dopt/blocks-javascript-client receives a total of 13 weekly downloads. As such, @dopt/blocks-javascript-client popularity was classified as not popular.
We found that @dopt/blocks-javascript-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.