Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

deskbookers

Package Overview
Dependencies
Maintainers
5
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deskbookers - npm Package Compare versions

Comparing version 4.0.1 to 5.0.0

4

CHANGELOG.md

@@ -7,2 +7,6 @@ # Change Log

## 5.0.0 - 2017-07-24
### Changes
- Added parameter `country` on `Features` list and changed for object parameters
## 3.2.5 - 2017-06-30

@@ -9,0 +13,0 @@ ### Changes

49

dist/resources/Features.js

@@ -126,4 +126,10 @@ (function (global, factory) {

var _ref2 = _asyncToGenerator(regeneratorRuntime.mark(function _callee() {
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
var noCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
_ref3$type = _ref3.type,
type = _ref3$type === undefined ? '' : _ref3$type,
_ref3$noCache = _ref3.noCache,
noCache = _ref3$noCache === undefined ? false : _ref3$noCache,
_ref3$country = _ref3.country,
country = _ref3$country === undefined ? '' : _ref3$country;
return regeneratorRuntime.wrap(function _callee$(_context) {

@@ -137,3 +143,4 @@ while (1) {

params: {
noCache: noCache
noCache: noCache,
country: country
}

@@ -162,3 +169,3 @@ });

value: function () {
var _ref3 = _asyncToGenerator(regeneratorRuntime.mark(function _callee2(feature) {
var _ref4 = _asyncToGenerator(regeneratorRuntime.mark(function _callee2(feature) {
return regeneratorRuntime.wrap(function _callee2$(_context2) {

@@ -186,4 +193,4 @@ while (1) {

function create(_x3) {
return _ref3.apply(this, arguments);
function create(_x2) {
return _ref4.apply(this, arguments);
}

@@ -196,3 +203,3 @@

value: function () {
var _ref4 = _asyncToGenerator(regeneratorRuntime.mark(function _callee3(featureName, feature) {
var _ref5 = _asyncToGenerator(regeneratorRuntime.mark(function _callee3(featureName, feature) {
return regeneratorRuntime.wrap(function _callee3$(_context3) {

@@ -220,4 +227,4 @@ while (1) {

function update(_x4, _x5) {
return _ref4.apply(this, arguments);
function update(_x3, _x4) {
return _ref5.apply(this, arguments);
}

@@ -230,3 +237,3 @@

value: function () {
var _ref5 = _asyncToGenerator(regeneratorRuntime.mark(function _callee4(featureName) {
var _ref6 = _asyncToGenerator(regeneratorRuntime.mark(function _callee4(featureName) {
return regeneratorRuntime.wrap(function _callee4$(_context4) {

@@ -253,4 +260,4 @@ while (1) {

function _delete(_x6) {
return _ref5.apply(this, arguments);
function _delete(_x5) {
return _ref6.apply(this, arguments);
}

@@ -263,3 +270,3 @@

value: function () {
var _ref6 = _asyncToGenerator(regeneratorRuntime.mark(function _callee5(venueId) {
var _ref7 = _asyncToGenerator(regeneratorRuntime.mark(function _callee5(venueId) {
var noCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

@@ -289,4 +296,4 @@ return regeneratorRuntime.wrap(function _callee5$(_context5) {

function listByVenue(_x7) {
return _ref6.apply(this, arguments);
function listByVenue(_x6) {
return _ref7.apply(this, arguments);
}

@@ -299,3 +306,3 @@

value: function () {
var _ref7 = _asyncToGenerator(regeneratorRuntime.mark(function _callee6(venueId, featureName) {
var _ref8 = _asyncToGenerator(regeneratorRuntime.mark(function _callee6(venueId, featureName) {
var noCache = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;

@@ -327,4 +334,4 @@ var result;

function checkFeatureByVenue(_x9, _x10) {
return _ref7.apply(this, arguments);
function checkFeatureByVenue(_x8, _x9) {
return _ref8.apply(this, arguments);
}

@@ -337,3 +344,3 @@

value: function () {
var _ref8 = _asyncToGenerator(regeneratorRuntime.mark(function _callee7(venueId, featureName, feature) {
var _ref9 = _asyncToGenerator(regeneratorRuntime.mark(function _callee7(venueId, featureName, feature) {
return regeneratorRuntime.wrap(function _callee7$(_context7) {

@@ -361,4 +368,4 @@ while (1) {

function updateFeatureByVenue(_x12, _x13, _x14) {
return _ref8.apply(this, arguments);
function updateFeatureByVenue(_x11, _x12, _x13) {
return _ref9.apply(this, arguments);
}

@@ -365,0 +372,0 @@

# Features
## `list(type)`
List all avaiable features for a given `type`(optional).
List all avaiable features for a given `type`(optional) or `country`(optional).

@@ -86,2 +86,28 @@ ```js

```js
const data = await deskbookers.feature.list({type: 'booking'})
```
#### Example response
```json
[
{
"description": "Booking tool",
"features": [
{
"description": "Booking Tool Son 1",
"id": 8,
"name": "btSon1",
"parentId": 2,
"readonly": true,
"type": "booking"
}
],
"id": 2,
"name": "bookingTool",
"parentId": null,
"readonly": true,
"type": "booking"
}
]
```
```js
const data = await deskbookers.feature.list('booking')

@@ -88,0 +114,0 @@ ```

{
"name": "deskbookers",
"version": "4.0.1",
"version": "5.0.0",
"description": "Deskbookers API JavaScript SDK",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -48,7 +48,7 @@ import dotenv from 'dotenv'

const data = await deskbookers.features.list('booking')
const data = await deskbookers.features.list({type: 'booking'})
t.truthy(data)
})
test('list venue features', async t => {
test('list features with country', async t => {
// Prepare API

@@ -58,7 +58,7 @@ const deskbookers = await client(true)

const data = await deskbookers.features.listByVenue(1)
const data = await deskbookers.features.list({country: 'Hyrule'})
t.truthy(data)
})
test('check feature is enabled for venue', async t => {
test('list venue features', async t => {
// Prepare API

@@ -68,5 +68,3 @@ const deskbookers = await client(true)

const data = await deskbookers.features.checkFeatureByVenue(
1, 'regularCustumerDiscounts'
)
const data = await deskbookers.features.listByVenue(1)
t.truthy(data)

@@ -124,2 +122,13 @@ })

t.truthy(data)
})
test('check feature is enabled for venue', async t => {
// Prepare API
const deskbookers = await client(true)
t.truthy(deskbookers.session)
const data = await deskbookers.features.checkFeatureByVenue(
2, 'bookingTool'
)
t.truthy(data)
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc