0.0.7 • Published 8 months ago

@xflowpay/xflow-node-sdk v0.0.7

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
8 months ago

Xflow Node API Library

NPM version

This library provides convenient access to the Xflow Node REST API from server-side TypeScript or JavaScript.

The API documentation can be found here.

Installation

npm install --save @xflowpay/xflow-node-sdk
# or
yarn add @xflowpay/xflow-node-sdk

Usage

import { XFlow } from '@xflowpay/xflow-node-sdk';

const xFlow = new XFlow({
  bearerAuth: 'my bearer auth',
});

async function main() {
  // List Accounts:
  const accountList = await xFlow.accounts.listAccounts();
  console.log(accountList);

  // Retrieve Account:
  const account = await xFlow.accounts.retrieveAccount('<account id>');
  console.log(account);
}

main();

Request & Response types

This library includes TypeScript definitions for all request params and response fields. You may import and use them like so:

import { XFlow, ListAccountsResponse } from 'xflow';

const xFlow = new XFlow({
  bearerAuth: 'my bearer auth',
});

async function main() {
  const account: ListAccountsResponse = await xFlow.accounts.listAccounts();
}

main();

Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.

Semantic Versioning

This package generally attempts to follow SemVer conventions, though certain backwards-incompatible changes may be released as minor versions:

  1. Changes that only affect static types, without breaking runtime behavior.
  2. Changes to library internals which are technically public but not intended or documented for external use. (Please open a GitHub issue to let us know if you are relying on such internals).
  3. Changes that we do not expect to impact the vast majority of users in practice.

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an issue with questions, bugs, or suggestions.

Requirements

The following runtimes are supported:

  • Node.js 16 LTS or later (non-EOL) versions.

If you are interested in other runtime environments, please open or upvote an issue on GitHub.

0.0.8-canary.0

8 months ago

0.0.7

8 months ago

0.0.6

8 months ago

0.0.5

8 months ago

0.0.4

8 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.1

8 months ago