0.9.2 • Published 2 years ago

@haulmont/jmix-rest v0.9.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

Jmix REST

Build Status

JavaScript library for web and Node.js which facilitates Jmix REST API usage.

Installation

npm

npm install @haulmont/jmix-rest --save

Import as module

const jmixRest = require('@haulmont/jmix-rest');

Or using ES6 imports:

import * as jmixRest from '@haulmont/jmix-rest';

Dependencies and requirements

Library has no external dependencies. It's assumed that Promise and fetch -compatible API are available or polyfilled i.e. in node environment:

npm install node-fetch --save
global.fetch = require('node-fetch');

Usage

import * as cuba from 'cuba-rest-js';

const app = cuba.initializeApp({
  name: 'myApp',
  apiUrl: 'http://localhost:8080/app/rest/'
});

app.getUserInfo().then((d) => {
  console.log(d);
});

// retrieve app by name

const myApp = cuba.getApp('myApp');

or use if you want to manage instances yourself

const myApp = new JmixRestConnection("myApp", "/rest/")
myApp.loadEntities('sec$User', {view: '_minimal', sort: 'login'}).then((users) => {
  console.log(users);
});

Full API reference

Development

Tests

In order to run integration tests you need Java to be installed.

Integration tests

npm run test:integration

Running manually

Start test CUBA app

npm run start-test-app

Run tests

npm test

Stop test app

npm run teardown-test-app

Build

npm run dist

Lint

npm run lint
2.0.0-next.11

2 years ago

1.2.0

2 years ago

3.1.0-next.0

2 years ago

3.2.0-next.1

2 years ago

3.2.0-next.2

2 years ago

0.9.2

2 years ago

3.2.0-next.0

2 years ago

2.0.0-next.8

2 years ago

2.0.0-next.9

2 years ago

2.0.0-next.6

2 years ago

2.0.0-next.7

2 years ago

2.0.0-next.5

2 years ago

2.0.0-next.10

2 years ago

1.1.0

2 years ago

2.0.0-next.4

2 years ago

2.0.0-next.2

2 years ago

2.0.0-next.3

2 years ago

2.0.0-next.1

3 years ago

2.0.0-next.0

3 years ago

1.0.1-next.7

3 years ago

1.0.1-next.6

3 years ago

1.0.1-next.3

3 years ago

1.0.1-next.5

3 years ago

1.0.1

3 years ago

1.0.1-next.2

3 years ago

1.0.1-next.1

3 years ago

1.0.1-next.0

3 years ago

1.0.0

3 years ago

1.0.0-next.21

3 years ago

1.0.0-next.20

3 years ago

1.0.0-next.7

3 years ago

1.0.0-next.8

3 years ago

1.0.0-next.0

3 years ago

1.0.0-next.1

3 years ago

1.0.0-next.2

3 years ago

1.0.0-next.3

3 years ago

1.0.0-next.4

3 years ago

1.0.0-next.5

3 years ago

1.0.0-next.6

3 years ago

0.9.1

3 years ago

0.9.0

3 years ago

0.9.0-beta.1

3 years ago

0.9.0-beta.0

3 years ago

0.3.0

3 years ago

0.3.0-beta.2

3 years ago

0.3.0-beta.1

3 years ago

0.3.0-beta.0

3 years ago

0.2.0-dev.1

3 years ago

0.2.0-dev.0

3 years ago