0.1.1 • Published 6 months ago

@moneta-network/publisher-gateway-sdk v0.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
6 months ago

Publisher Gateway JavaScript/TypeScript SDK

Overview

This SDK provides a TypeScript/JavaScript interface for interacting with the publisher Gateway system.

Installation

npm install @moneta-network/publisher-gateway-sdk

Quick Start

import { PublisherGatewayClient } from '@moneta-network/publisher-gateway-sdk';

const client = new PublisherGatewayClient({
  lago: { baseUrl: 'https://lago.example.com', apiKey: 'lago-token' },
  revenue: { baseUrl: 'https://revenue.example.com', apiKey: 'revenue-key' }
});

// Use the Lago sub-client
await client.lago.createCustomer({ /* ... */ });

// Use the Revenue sub-client
await client.revenue.getTaxes({ country: 'US' });

Development

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn

Setup

  1. Clone the repository
  2. Install dependencies:
npm install

Build

npm run build

Test

npm test

Documentation

To run the documentation locally:

npm run docs:dev

Contributing

Please read our contributing guidelines before submitting PRs.

License

ISC