pangea-node-sdk
TypeScript icon, indicating that this package has built-in type declarations

3.7.0 • Public • Published
Pangea Logo

documentation Slack

Pangea Node.js SDK

A Node.js SDK for integrating with Pangea services. Supports Node.js v18 and v20.

Installation

Via npm:

$ npm install pangea-node-sdk

Via yarn:

$ yarn add pangea-node-sdk

Usage

General usage would be to create a token for a service through the Pangea Console and then construct an API client for that respective service. The below example shows how this can be done for Secure Audit Log to log a simple event:

import process from "node:process";
import { PangeaConfig, AuditService } from "pangea-node-sdk";

// Load client configuration from environment variables `PANGEA_AUDIT_TOKEN` and
// `PANGEA_DOMAIN`.
const token = process.env.PANGEA_AUDIT_TOKEN;
const config = new PangeaConfig({ domain: process.env.PANGEA_DOMAIN });

// Create a Secure Audit Log client.
const audit = new AuditService(token, config);

// Log a basic event.
const response = await audit.log({ message: "Hello, World!" });

Readme

Keywords

none

Package Sidebar

Install

npm i pangea-node-sdk

Weekly Downloads

592

Version

3.7.0

License

MIT

Unpacked Size

353 kB

Total Files

72

Last publish

Collaborators

  • ggallien.pangea