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

@timetac/js-client-library

Package Overview
Dependencies
Maintainers
2
Versions
215
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@timetac/js-client-library - npm Package Compare versions

Comparing version 0.3.5 to 0.3.6

2

dist/baseApi.js

@@ -45,3 +45,3 @@ "use strict";

}
return `${this.config.https ? 'https' : 'http'}://${(_a = this.config.host) !== null && _a !== void 0 ? _a : DEFAULT_HOST}/${this.config.account}/`;
return `${(_a = axios_1.default.defaults.baseURL) !== null && _a !== void 0 ? _a : DEFAULT_HOST}/${this.config.account}/`;
}

@@ -48,0 +48,0 @@ setAccount(account) {

@@ -74,2 +74,4 @@ import { AbsenceDaysEndpoint } from './absenceDays';

setAccount(account: string): void;
setConfig(config: any): void;
getConfig(): ApiConfig;
}

@@ -47,6 +47,5 @@ "use strict";

constructor(config) {
var _a, _b, _c;
this.config = config;
this.config.autoRefreshToken = (_a = config.autoRefreshToken) !== null && _a !== void 0 ? _a : true;
this.config.https = (_b = config.https) !== null && _b !== void 0 ? _b : true;
var _a, _b;
this.setConfig(Object.assign(Object.assign({}, config), { autoRefreshToken: (_a = config.autoRefreshToken) !== null && _a !== void 0 ? _a : true, https: (_b = config.https) !== null && _b !== void 0 ? _b : true }));
this.config = this.getConfig();
this.state = {

@@ -75,3 +74,2 @@ refreshingToken: false,

axiosSetup_1.interceptor({ state: this.state, config: this.config, authentication: this.authentication });
axiosSetup_1.setAxiosDefaults({ baseURL: `${this.config.https ? 'https' : 'http'}://${(_c = this.config.host) !== null && _c !== void 0 ? _c : DEFAULT_HOST}/` });
}

@@ -81,4 +79,12 @@ setAccount(account) {

}
setConfig(config) {
var _a;
this.config = Object.assign(Object.assign({}, this.config), config);
axiosSetup_1.setAxiosDefaults({ baseURL: `${this.config.https ? 'https' : 'http'}://${(_a = this.config.host) !== null && _a !== void 0 ? _a : DEFAULT_HOST}` });
}
getConfig() {
return this.config;
}
}
exports.default = Api;
//# sourceMappingURL=index.js.map

@@ -0,1 +1,2 @@

import { AxiosRequestConfig } from 'axios';
import { AuthenticationEndpoint } from '../authentication';

@@ -9,3 +10,3 @@ import { ApiConfig, ApiState } from '../baseApi';

export declare const interceptor: (apiInstanceData: interceptorParams) => void;
export declare const setAxiosDefaults: (defaults: object) => void;
export declare const setAxiosDefaults: (defaults: AxiosRequestConfig) => void;
export {};
{
"name": "@timetac/js-client-library",
"version": "0.3.5",
"version": "0.3.6",
"description": "TimeTac API JS client library",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/TimeTac/js-client-library#readme",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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