Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@dopt/blocks-javascript-client
Advanced tools
The Dopt blocks JavaScript client is a friendly server-side and client-side package for accessing the Dopt blocks API to get and mutate block and flow state for a particular user in Dopt.
The client lives in our open-source monorepo odopt.
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 { Configuration, BlocksApi } from "@dopt/blocks-javascript-client";
const doptBlocksClient = new BlocksApi(
new Configuration({
apiKey: "BLOCKS_API_KEY",
})
);
Get block data using the findBlocks
method:
const version = 3;
const userId = "example-user-idenitifer";
const uid = "xqC0wpZgoaYXbAPk8W0sk";
doptBlocksClient.findBlocks(
version,
userId,
uid
);
Transition a block using the blockTransitions
method:
const transitions = new Set(['complete']);
const version = 3;
const userId = "example-user-identifier";
const uid = "xqC0wpZgoaYXbAPk8W0sk";
doptBlocksClient.blockTransitions(
transitions,
version,
userId,
uid
);
Get flow data using the getFlow
method:
const version = 3;
const userId = "example-user-identifier";
const sid = "example-flow-identifier";
doptBlocksClient.getFlow(
version,
userId,
sid
);
Transition a flow using the flowIntent
method:
const version = 3;
const userId = "example-user-identifier";
const sid = "example-flow-identifier";
const intent = "finish";
doptBlocksClient.flowIntent(
version,
userId,
sid,
intent
);
FAQs
A JavaScript client for the Dopt Blocks API
The npm package @dopt/blocks-javascript-client receives a total of 4 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.