Socket
Socket
Sign inDemoInstall

antbox-sdk

Package Overview
Dependencies
0
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    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.


Version published
Maintainers
2
Created

Readme

Source

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
  • Usage

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
MethodDescription
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
MethodDescription
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
MethodDescription
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
MethodDescription
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.

FAQs

Last updated on 08 May 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc