@gentrace/core
Version:
Core Gentrace Node.JS library
141 lines (137 loc) • 5.41 kB
JavaScript
;
var axiosInstance = require('../axios-instance.js');
var common = require('../common.js');
var base = require('../base.js');
/* tslint:disable */
/* eslint-disable */
/**
* Gentrace API
* These API routes are designed to ingest events from clients.
*
* The version of the OpenAPI document: 0.27.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
/**
* V3Api - axios parameter creator
* @export
*/
const V3ApiAxiosParamCreator = function (configuration) {
return {
/**
*
* @summary Get evaluations
* @param {string} resultId The ID of the result to get evaluations for
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v3EvaluationsGet: (resultId, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'resultId' is not null or undefined
common.assertParamExists("v3EvaluationsGet", "resultId", resultId);
const localVarPath = `/v3/evaluations`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: "GET" }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication bearerAuth required
// http bearer authentication required
yield common.setBearerAuthToObject(localVarHeaderParameter, configuration);
if (resultId !== undefined) {
localVarQueryParameter["resultId"] = resultId;
}
common.setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: common.toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
};
};
/**
* V3Api - functional programming interface
* @export
*/
const V3ApiFp = function (configuration) {
const localVarAxiosParamCreator = V3ApiAxiosParamCreator(configuration);
return {
/**
*
* @summary Get evaluations
* @param {string} resultId The ID of the result to get evaluations for
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v3EvaluationsGet(resultId, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.v3EvaluationsGet(resultId, options);
return common.createRequestFunction(localVarAxiosArgs, axiosInstance, base.BASE_PATH, configuration);
});
},
};
};
/**
* V3Api - factory interface
* @export
*/
const V3ApiFactory = function (configuration, basePath, axios) {
const localVarFp = V3ApiFp(configuration);
return {
/**
*
* @summary Get evaluations
* @param {string} resultId The ID of the result to get evaluations for
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v3EvaluationsGet(resultId, options) {
return localVarFp
.v3EvaluationsGet(resultId, options)
.then((request) => request(axios, basePath));
},
};
};
/**
* V3Api - object-oriented interface
* @export
* @class V3Api
* @extends {BaseAPI}
*/
class V3Api extends base.BaseAPI {
/**
*
* @summary Get evaluations
* @param {string} resultId The ID of the result to get evaluations for
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof V3Api
*/
v3EvaluationsGet(resultId, options) {
return V3ApiFp(this.configuration)
.v3EvaluationsGet(resultId, options)
.then((request) => request(this.axios, this.basePath));
}
}
exports.V3Api = V3Api;
exports.V3ApiAxiosParamCreator = V3ApiAxiosParamCreator;
exports.V3ApiFactory = V3ApiFactory;
exports.V3ApiFp = V3ApiFp;
//# sourceMappingURL=v3-api.js.map