moysklad-ts
TypeScript icon, indicating that this package has built-in type declarations

0.0.34 • Public • Published

moysklad-ts

npm npm package minimized gzipped size (select exports) GitHub Workflow Status (with event) GitHub

This library is in alpha stage and is not ready for production use.

moysklad-ts is a fully-typed API wrapper for Moysklad.

Usage

Installation

npm

npm i moysklad-ts
Other package managers

pnpm

pnpm add moysklad-ts

Yarn

yarn add moysklad-ts

bun

bun add moysklad-ts

Deno

import { Moysklad } from "https://esm.sh/moysklad-ts";

Example

import { Moysklad, MoyskladApiError } from "moysklad-ts";

const moysklad = new Moysklad({
  auth: {
    token: "123"
  }
});

try {
  const { rows: bonusTransactions } = await moysklad.bonusTransaction.list({
    expand: { bonusProgram: true }
  });
} catch (error) {
  if (error instanceof MoyskladApiError) {
    console.error(error.message, error.code, error.moreInfo);
		return;
  }

	console.error(error);
}

Documentation

The documentation is available here.

Документация на русском языке доступна здесь.

Contributing

Please read the contributing guidelines before submitting a pull request.

License

This project is licensed under the GPL-3.0 license.

Roadmap

Core features

Endpoints

Package Sidebar

Install

npm i moysklad-ts

Weekly Downloads

24

Version

0.0.34

License

GPL-3.0-only

Unpacked Size

418 kB

Total Files

109

Last publish

Collaborators

  • cto_of_everything