New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@contentchef/contentchef-management-js-client

Package Overview
Dependencies
Maintainers
2
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contentchef/contentchef-management-js-client

ContentChef authoring+release javascript client

latest
Source
npmnpm
Version
10.0.0-alpha.1
Version published
Maintainers
2
Created
Source

ContentChef Management JS Client

Installing

Using npm:

    $ npm install @contentchef/contentchef-management-js-client

Using yarn:

    $ yarn add @contentchef/contentchef-management-js-client

Examples

  • Configuration example This code will show how to correctly configure your ContentChef Management JS Client
    class ContentChefApi {
        api: ContentChefClient;

        // The token is the authorizer that is needed to make actions in your space, for security problems the operation of setting the token
        // should me make in a server side application
        apiTokenResolver: AuthenticationTokenResolver = {
                getToken: async () => {
                   return await 'do stuffs to retrieve your api token';
                }
            };
            
        spaceIdResolver: SpaceIdResolver = {
            getSpaceId: async () => {
                return await 'do Stuff to retrieve your space id';
            }
        };

        initializeClient = () => {
            this.api = createChefSpaceClient(apiTokenResolver, spaceIdResolver, { apiRoot: 'https://api.contentchef.io' });
        }
    }

    // We do this to create a singleton of the client
    export const contentChefApi = new ContentChefApi().initializeClient();
  • Usage example This code will show how to correctly use your ContentChef Management JS Client after the initial configuration
    class ContentChefContentStore {
        api: ContentChefClient;

        constructor (chefApi: ContentChefClient) {
            this.api = chefApi
        }
    
        async getContent (reqParams: GetContentRequest) {
            try {
                const response = await this.api.contents.get(reqParam);
                console.log('This is the requested content');
                console.log(response);
            } catch (e) {
               console.log(`An error occurred retrieving the content with id ${reqParams.id}`);
               console.log(e); 
            } 
        }

    }

Docs

To generate a new Documentation simply run the command

Using yarn:

    $ yarn generate-docs

A new documentation will be created inside the folder docs in the root of the project, then simply serve the index.html file inside the docs folder in your browser

FAQs

Package last updated on 04 Mar 2026

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