2.2.0 • Published 18 days ago

@janiscommerce/app-request v2.2.0

Weekly downloads
-
License
-
Repository
-
Last release
18 days ago

@janiscommerce/app-request

janis-logo

This package is intended to help to do requests at Janis Apps.

Installation

npm i @janiscommerce/app-request

Usage

import Request from '@janiscommerce/app-request'
import {JANIS_ENV} from 'env.json'


const request = new Request({JANIS_ENV})

// GET to a janis service
const sessionData = await request.get({service: 'picking', namespace: 'session', id: '123'});


// GET (list) to a janis service
const sessionList = await request.list({
				namespace: 'session',
				service: 'picking',
				headers: {page: 3},
				queryParams: {
					filters: {sessionOwnershipVisibility, pickingPointId: activeWarehouseId},
					sort: sessionSortingCriteria,
				},
			})


// GET to an external endpoint

const data = await request.get({endpoint: 'https://url.external/userdata/123'})
2.2.0

18 days ago

2.1.0

1 month ago

2.0.0

1 month ago

1.2.1

2 months ago

1.2.0

2 months ago

1.1.2

2 months ago

1.1.1

3 months ago

1.1.0

3 months ago

1.0.0

4 months ago