1.1.2 • Published 5 months ago

@simo.js/simo-api-types v1.1.2

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

Simo API Types

Type definitions for Simo API

  • Lightweight and easy to use
  • Supports all types used

Installation

The only way to install simo-api-types is via npm

npm install @simo.js/simo-api-types

Using

The name structure of the types is divided into some parts:

  • Types exported with suffix Payload means that the data comes from REST API
  • Types export with prefix REST means that the data comes from or is directly related to the REST API
    • Example: RESTPostCreateTeamResult and RESTPostCreateTeamOptions
    • Types that are exported as never means that the data is a 204: No Content (it's safe)
  • Types that are exported from globals.ts file means that the type are used in the entire API (It doesn't follow the type name structure)

Example

import { REST, Routes } from '@simo.js/rest';
import { UserPayload } from '@simo.js/simo-api-types';

const rest = new REST({ auth: 'some-api-key' });

rest.get<UserPayload>(Routes.getUser('some-user-id')).then(console.log);

Util Links

Help

If you don't understand something or you are experiencing problems, please join simo Server

1.1.2

5 months ago

1.1.1

5 months ago

1.1.0

5 months ago

1.0.8

5 months ago

1.0.7

5 months ago

1.0.6

5 months ago

1.0.5

5 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago