Options
All
  • Public
  • Public/Protected
  • All
Menu

@bity/models

This project is a collection of useful models that are reused throughout our frontend systems. They ensure consistency and provide error checking, in an effort to prevent mistakes.

It's main purpose is to be used in combination with the @bity/api package.

Installation

npm install @bity/models, then you can use them as normal ES6 packages.

Categories of models

Since there are many models which can be used for various reasons, below are several typical scenarios you'd start from.

Exchange API

Creating orders

See the Order class. The documentation is organized so each class will show you how it would normally be used, or how a class uses other classes.

Viewing order payment details

See OrderPaymentDetails to learn about the payment information Bity requests from users. OrderPaymentDetails.paymentDetails is the actual payment information and is specific to the type of order that has been created.

Miscellaneous

For a bag of simple (but important) types for various uses, see the shared module. When TypeScript's type system becomes more powerful, these types will become more strict. For now they act as types that document the code and provide no real extra functionality.

Generated using TypeDoc