@databake/server-api-client
Advanced tools
Comparing version 0.0.1 to 0.0.2
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, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
45618
898