npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

antbox-sdk

v1.1.0-beta.9

Published

Antbox SDK provides a Node client for the Antbox ECM, offering a clear and consistent API to interact with the system. With this SDK, developers can seamlessly integrate Antbox's functionalities into their applications.

Downloads

83

Readme

Antbox SDK

Antbox SDK provides a Node client for the Antbox ECM, offering a clear and consistent API to interact with the system. With this SDK, developers can seamlessly integrate Antbox's functionalities into their applications.

Table of Contents

Installation

To get started, you can install the package using npm:

npm install antbox-sdk

Usage

Importing the Clients

To use a client, you first need to import it:

import {
  ActionServiceClient,
  AspectServiceClient,
  LoginClient,
  NodeServiceClient,
  WebContentService,
} from "antbox-sdk";

Clients and Methods

Below are the provided clients with their associated methods:

1. ActionServiceClient

| Method | Description | | ------------------------- | --------------------------------------------- | | get(uuid) | Retrieves an action by its UUID. | | run(uuid, uuids, params?) | Executes a specific action on multiple nodes. | | list() | Lists all available actions. |

Example:

const actionService = new ActionServiceClient(serverOpts);
actionService.get("sample-uuid").then((action) => {
  console.log(action);
});

2. AspectServiceClient

| Method | Description | | --------- | -------------------------------- | | get(uuid) | Retrieves an aspect by its UUID. | | list() | Lists all available aspects. |

Example:

const aspectService = new AspectServiceClient(serverOpts);
aspectService.get("sample-uuid").then((aspect) => {
  console.log(aspect);
});

3. LoginClient

| Method | Description | | -------------- | ------------------------------------------ | | loginRoot(pwd) | Logs in as the root user using a password. |

Example:

const loginClient = new LoginClient(serverOpts);
loginClient.loginRoot("your-password").then((response) => {
  console.log(response);
});

4. NodeServiceClient

| Method | Description | | ------------------------------------- | ------------------------------------------------------------ | | getNodeUrl(uuid) | Retrieves the URL for a specific node by its UUID. | | copy(uuid, to) | Copies a node to a specified location. | | duplicate(uuid) | Duplicates a node. | | createFolder(metadata) | Creates a new folder node with the given metadata. | | createFile(file, metadata) | Creates a new file node with the provided file and metadata. | | createMetanode(metadata) | Creates a new meta node with the specified metadata. | | updateFile(uuid, file) | Updates an existing file node with a new file. | | delete(uuid) | Deletes a node by its UUID. | | get(uuid) | Retrieves a node by its UUID. | | list(parent?) | Lists all nodes, optionally filtered by their parent. | | query(filters, pageSize?, pageToken?) | Queries nodes based on given filters and pagination options. | | update(uuid, node) | Updates a node's metadata. | | evaluate(uuid) | Evaluates a smart folder node. | | export(uuid) | Exports a node's content. |

Example:

const nodeService = new NodeServiceClient(serverOpts);
nodeService.get("sample-uuid").then((node) => {
  console.log(node);
});

5. WebContentService

This section is left blank because the provided code does not have any methods or descriptions for the WebContentService client.

ServerOpts

For all the examples above, the serverOpts should be an object that provides necessary configurations for the client to communicate with the server. Typically, it would include the URL of the server.

Example:

const serverOpts = {
  url: "https://your-antbox-server-url.com",
};

Conclusion

The Antbox SDK offers a comprehensive interface to work with the Antbox ECM, ensuring that developers can easily integrate and leverage its capabilities. Make sure to consult the official Antbox documentation for more details on the available features and functionalities.