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

directus-sdk-javascript

Package Overview
Dependencies
Maintainers
3
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

directus-sdk-javascript - npm Package Compare versions

Comparing version 3.0.0-18 to 3.0.0-19

2

package.json
{
"name": "directus-sdk-javascript",
"version": "3.0.0-18",
"version": "3.0.0-19",
"description": "WIP - Directus SDK for JavaScript (Node and Browser)",

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

@@ -107,14 +107,17 @@ const axios = require('axios');

// Delete access token in case it still contained an expired one
this.accessToken = null;
this.getToken({ email, password })
.then(res => res.data)
.then(data => {
this.accessToken = data.token;
.then(res => res.data)
.then(data => {
this.accessToken = data.token;
this.emit('login:success');
resolve();
})
.catch((error) => {
this.emit('login:failed', error);
reject(error);
});
this.emit('login:success');
resolve();
})
.catch((error) => {
this.emit('login:failed', error);
reject(error);
});
});

@@ -131,3 +134,3 @@ }

refresh(token) {
refresh(token = null) {
this.accessToken = token;

@@ -193,10 +196,8 @@

getPreferences(collection, user, params = {}) {
params = Object.assign(params, {
'filter[title][null]': null,
'filter[collection][eq]': collection,
'filter[user][eq]': user,
});
getFields(collection, params = {}) {
return this.request('get', `fields/${collection}`, params);
}
return this.request('get', `collection_presets/${collection}`);
getSettings(params = {}) {
return this.request('get', 'settings', params);
}

@@ -203,0 +204,0 @@

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