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
214
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.1.7 to 0.1.8

7

dist/authentication/types.d.ts

@@ -12,2 +12,9 @@ export declare type Credentials = {

password: string;
} | {
grant_type: 'authorization_code';
client_id: string;
client_secret?: string;
code: string;
code_verifier: string;
redirect_uri: string;
};

3

dist/serverCommunication/index.d.ts
import Base from '../baseApi';
import { ServerCommunication as Model } from './types';
export default class ServerCommunication extends Base {
read(account: string): Promise<import("../utils/response/apiResponse").ApiResponseOnSuccess<unknown>>;
read(account: string): Promise<Model>;
}

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

const response = axios_1.default.get(`${this.getApiPath()}${resourceName}/read`, { withCredentials: false });
return responseHandlers_1.default.toApiResponse(response);
return responseHandlers_1.default.requiredObject(response);
}

@@ -14,0 +14,0 @@ }

@@ -5,2 +5,3 @@ import { AxiosResponse } from 'axios';

toApiResponse<T>(promise: Promise<AxiosResponse>): Promise<ApiResponseOnSuccess<T>>;
requiredObject<T>(promise: Promise<AxiosResponse>): Promise<T>;
required<T>(promise: Promise<AxiosResponse>): Promise<T>;

@@ -7,0 +8,0 @@ requiredList<T>(promise: Promise<AxiosResponse>): Promise<T[]>;

@@ -23,2 +23,12 @@ "use strict";

}
requiredObject(promise) {
return this.toApiResponse(promise).then((response) => {
if (response.NumResults > 0) {
return response.Results;
}
else {
throw 'There are no results.';
}
});
}
required(promise) {

@@ -30,3 +40,3 @@ return this.toApiResponse(promise).then((response) => {

else {
throw new Error('There are no results.');
throw 'There are no results.';
}

@@ -41,3 +51,3 @@ });

else {
throw new Error('There are no results.');
throw 'There are no results.';
}

@@ -44,0 +54,0 @@ });

{
"name": "@timetac/js-client-library",
"version": "0.1.7",
"version": "0.1.8",
"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

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