1.2.3 • Published 5 years ago
rms-ts v1.2.3
rms-ts
RMS Javascript SDK written in Typescript
This library allows for easy interaction with RMS resources using Javascript or Typescript.
Installation
Install using a package manager of your choice.
// using npm
$ npm i rms-ts
// using yarn
$ yarn add rms-ts
Usage
Import the library first, then sign in using your RMS credentials. See the extensive documentation for all available usage options.
import rms from 'rms-ts'
rms
.signIn({
username: 'username',
password: 'secret'
})
.then(() => {
console.log('Signed in!')
})
Typings
As the library is written fully in Typescript and well documented, you can use the power of your IDE to get suggestions about available methods and their usage.
Filter builder
One of the most powerful features of the library is the filter builder. Use it to query the database using intuitive sentence-based syntax.
import { collection, filterBuilder } from 'rms-ts'
const { field, and, or } = filterBuilder
const filter = and(
field('IsActive').is.true(),
or(
field('LastName').does.not.contain.any.of(['Smith', 'Doe']),
field('FirstName').does.start.with('John'),
field('BirthYear').is.between(1990, 2000)
)
)
collection('Users')
.limit(10)
.filter(filter)
.get()
Documentation
Full documentation is available at https://tomaszbe.github.io/rms-ts