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

@databake/server-api-client

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@databake/server-api-client - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

dist/api/auth/check-auth.d.ts
import BaseApi from '../base-api';
declare const checkAuthApiBuilder: (baseApi: BaseApi) => (token: string) => Promise<any>;
declare const checkAuthApiBuilder: (baseApi: BaseApi) => () => Promise<any>;
export default checkAuthApiBuilder;

@@ -14,7 +14,4 @@ "use strict";

const ENDPOINT = '/authcheck/:token';
const checkAuthApiBuilder = (baseApi) => (token) => __awaiter(void 0, void 0, void 0, function* () {
if (!baseApi.OAuthToken) {
return {};
}
const response = yield baseApi.client.makeApiCall(http_client_1.METHODS.GET, ENDPOINT.replace(':token', token), {
const checkAuthApiBuilder = (baseApi) => () => __awaiter(void 0, void 0, void 0, function* () {
const response = yield baseApi.client.makeApiCall(http_client_1.METHODS.GET, ENDPOINT.replace(':token', baseApi.OAuthToken), {
json: false

@@ -21,0 +18,0 @@ });

import BaseApi from '../base-api';
declare const AuthApiBuilder: (baseApi: BaseApi) => {
check: (token: string) => Promise<any>;
check: () => Promise<any>;
};
export default AuthApiBuilder;

@@ -15,5 +15,2 @@ "use strict";

const backupModelApiBuilder = (baseApi) => (metric) => __awaiter(void 0, void 0, void 0, function* () {
if (!baseApi.OAuthToken) {
return {};
}
const response = yield baseApi.client.makeApiCall(http_client_1.METHODS.GET, ENDPOINT.replace(':metric', metric), {

@@ -20,0 +17,0 @@ useAuth: true,

@@ -15,5 +15,2 @@ "use strict";

const getModelConfigApiBuilder = (baseApi) => (metric) => __awaiter(void 0, void 0, void 0, function* () {
if (!baseApi.OAuthToken) {
return {};
}
const response = yield baseApi.client.makeApiCall(http_client_1.METHODS.GET, ENDPOINT.replace(':metric', metric), {

@@ -20,0 +17,0 @@ useAuth: true,

@@ -15,5 +15,2 @@ "use strict";

const pauseModelApiBuilder = (baseApi) => (metric) => __awaiter(void 0, void 0, void 0, function* () {
if (!baseApi.OAuthToken) {
return {};
}
const response = yield baseApi.client.makeApiCall(http_client_1.METHODS.GET, ENDPOINT.replace(':metric', metric), {

@@ -20,0 +17,0 @@ useAuth: true,

@@ -15,5 +15,2 @@ "use strict";

const predictModelApiBuilder = (baseApi) => (metric) => __awaiter(void 0, void 0, void 0, function* () {
if (!baseApi.OAuthToken) {
return {};
}
const response = yield baseApi.client.makeApiCall(http_client_1.METHODS.GET, ENDPOINT.replace(':metric', metric), {

@@ -20,0 +17,0 @@ useAuth: true,

@@ -15,5 +15,2 @@ "use strict";

const trainModelApiBuilder = (baseApi) => (metric) => __awaiter(void 0, void 0, void 0, function* () {
if (!baseApi.OAuthToken) {
return {};
}
const response = yield baseApi.client.makeApiCall(http_client_1.METHODS.GET, ENDPOINT.replace(':metric', metric), {

@@ -20,0 +17,0 @@ useAuth: true,

@@ -15,5 +15,2 @@ "use strict";

const addPredictionApiBuilder = (baseApi) => (metric) => __awaiter(void 0, void 0, void 0, function* () {
if (!baseApi.OAuthToken) {
return {};
}
const response = yield baseApi.client.makeApiCall(http_client_1.METHODS.GET, ENDPOINT.replace(':metric', metric), {

@@ -20,0 +17,0 @@ useAuth: true,

@@ -15,5 +15,2 @@ "use strict";

const getPredictionApiBuilder = (baseApi) => () => __awaiter(void 0, void 0, void 0, function* () {
if (!baseApi.OAuthToken) {
return {};
}
const response = yield baseApi.client.makeApiCall(http_client_1.METHODS.GET, ENDPOINT, {

@@ -20,0 +17,0 @@ useAuth: true,

@@ -15,5 +15,2 @@ "use strict";

const removePredictionApiBuilder = (baseApi) => (metric) => __awaiter(void 0, void 0, void 0, function* () {
if (!baseApi.OAuthToken) {
return {};
}
const response = yield baseApi.client.makeApiCall(http_client_1.METHODS.GET, ENDPOINT.replace(':metric', metric), {

@@ -20,0 +17,0 @@ useAuth: true,

@@ -9,3 +9,3 @@ import BaseApi from './api/base-api';

auth: {
check: (token: string) => Promise<any>;
check: () => Promise<any>;
};

@@ -12,0 +12,0 @@ model: {

{
"name": "@databake/server-api-client",
"version": "0.0.1",
"version": "0.0.2",
"description": "",
"main": "dist/index.js",
"scripts": {
"build": "tsc",
"build": "rm -rf dist; tsc",
"test": "echo \"Error: no test specified\" && exit 1"

@@ -9,0 +9,0 @@ },

@@ -6,10 +6,6 @@ import { METHODS } from '../../lib/http-client';

const checkAuthApiBuilder = (baseApi: BaseApi) => async (token: string) => {
if (!baseApi.OAuthToken) {
return {};
}
const checkAuthApiBuilder = (baseApi: BaseApi) => async () => {
const response = await baseApi.client.makeApiCall(
METHODS.GET,
ENDPOINT.replace(':token', token),
ENDPOINT.replace(':token', baseApi.OAuthToken),
{

@@ -16,0 +12,0 @@ json: false

@@ -7,6 +7,2 @@ import { METHODS } from '../../lib/http-client';

const backupModelApiBuilder = (baseApi: BaseApi) => async (metric: string) => {
if (!baseApi.OAuthToken) {
return {};
}
const response = await baseApi.client.makeApiCall(

@@ -13,0 +9,0 @@ METHODS.GET,

@@ -7,5 +7,2 @@ import { METHODS } from '../../../lib/http-client';

const getModelConfigApiBuilder = (baseApi: BaseApi) => async (metric: string) => {
if (!baseApi.OAuthToken) {
return {};
}
const response = await baseApi.client.makeApiCall(

@@ -12,0 +9,0 @@ METHODS.GET,

@@ -7,6 +7,2 @@ import { METHODS } from '../../lib/http-client';

const pauseModelApiBuilder = (baseApi: BaseApi) => async (metric: string) => {
if (!baseApi.OAuthToken) {
return {};
}
const response = await baseApi.client.makeApiCall(

@@ -13,0 +9,0 @@ METHODS.GET,

@@ -7,6 +7,2 @@ import { METHODS } from '../../lib/http-client';

const predictModelApiBuilder = (baseApi: BaseApi) => async (metric: string) => {
if (!baseApi.OAuthToken) {
return {};
}
const response = await baseApi.client.makeApiCall(

@@ -13,0 +9,0 @@ METHODS.GET,

@@ -7,6 +7,2 @@ import { METHODS } from '../../lib/http-client';

const trainModelApiBuilder = (baseApi: BaseApi) => async (metric: string) => {
if (!baseApi.OAuthToken) {
return {};
}
const response = await baseApi.client.makeApiCall(

@@ -13,0 +9,0 @@ METHODS.GET,

@@ -7,6 +7,2 @@ import { METHODS } from '../../lib/http-client';

const addPredictionApiBuilder = (baseApi: BaseApi) => async (metric: string) => {
if (!baseApi.OAuthToken) {
return {};
}
const response = await baseApi.client.makeApiCall(

@@ -13,0 +9,0 @@ METHODS.GET,

@@ -7,6 +7,2 @@ import { METHODS } from '../../lib/http-client';

const getPredictionApiBuilder = (baseApi: BaseApi) => async () => {
if (!baseApi.OAuthToken) {
return {};
}
const response = await baseApi.client.makeApiCall(

@@ -13,0 +9,0 @@ METHODS.GET,

@@ -7,6 +7,2 @@ import { METHODS } from '../../lib/http-client';

const removePredictionApiBuilder = (baseApi: BaseApi) => async (metric: string) => {
if (!baseApi.OAuthToken) {
return {};
}
const response = await baseApi.client.makeApiCall(

@@ -13,0 +9,0 @@ METHODS.GET,

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