
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
@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 0 weekly downloads. As such, @dopt/blocks-javascript-client popularity was classified as not popular.
We found that @dopt/blocks-javascript-client demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.