
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@remkoj/optimizely-cms-api
Advanced tools
A Javascript client for the Integration API provided by the Optimizely CMS.
A Javascript client for the Integration API provided by the Optimizely CMS. It wraps the Optimizely CMS SaaS Core REST API.
This package is provides as part of one of the mono-repo style demo sites. Install this package by using a mono-repo style structure for your project and copying this package into your mono-repo.
This package works across browser and modern Node.JS environments, which provide an implementation for the Fetch API. The library has been tested with the Fetch API implementation in Node.JS v18 and above.
// Import the Client
import createClient, { ContentRoots } from '@remkoj/optimizely-cms-integration-api'
// Create an instance of the client
const client = createClient({
base: "https://example.com",
clientId: "apiClientID",
clientSecret: "apiClientSecret"
});
// Start using client
client.content.contentListItems(ContentRoots.SystemRoot).then(response => {
const items = response.items
items?.map(item => {
// Do something with the item
})
})
The configuration object for the createClient()
method is optional, if it is omitted, the configuration will be read from the environment variables.
The following configuration options are available for
Environment variable | Configuration key | Required | Usage |
---|---|---|---|
OPTIMIZELY_CMS_URL | base | yes | The URL where the CMS is available |
OPTIMIZELY_CMS_CLIENT_ID | clientId | yes | The API Client ID, as configured within the CMS |
OPTIMIZELY_CMS_CLIENT_SECRET | clientSecret | yes | The API Client Secret as generated by the CMS when creating the client |
OPTIMIZELY_CMS_USER_ID | actAs | no | The username of the CMS user to impersonate |
OPTIMIZELY_CMS_SCHEMA | cmsVersion | no | Override the target Optimizely CMS Version:OPTI-CMS-12 : Optimizely CMS 12, With CMS Service Preview 1 installed and working.OPTI-CMS-13 : Optimizely SaaS CMS / CMS 13Default: SaaS CMS / CMS 13 |
FAQs
A Javascript client for the Integration API provided by the Optimizely CMS.
The npm package @remkoj/optimizely-cms-api receives a total of 1,063 weekly downloads. As such, @remkoj/optimizely-cms-api popularity was classified as popular.
We found that @remkoj/optimizely-cms-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.