@gentrace/core
Version:
Core Gentrace Node.JS library
1,000 lines (999 loc) • 53.7 kB
JavaScript
import axiosWithOptionalFetch from '../axios-instance.mjs';
import { assertParamExists, DUMMY_BASE_URL, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common.mjs';
import { BaseAPI, BASE_PATH } from '../base.mjs';
/* 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());
});
};
/**
* V1Api - axios parameter creator
* @export
*/
const V1ApiAxiosParamCreator = function (configuration) {
return {
/**
*
* @summary Submit feedback
* @param {FeedbackRequest} feedbackRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1FeedbackPost: (feedbackRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'feedbackRequest' is not null or undefined
assertParamExists("v1FeedbackPost", "feedbackRequest", feedbackRequest);
const localVarPath = `/v1/feedback`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: "POST" }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication bearerAuth required
// http bearer authentication required
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
localVarHeaderParameter["Content-Type"] = "application/json";
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = serializeDataIfNeeded(feedbackRequest, localVarRequestOptions, configuration);
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
*
* @summary Upload an image file
* @param {string} [org] (If not using an organization API Key) the ID of the organization
* @param {File} [file] The file to upload.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1FilesUploadPost: (org, file, options = {}) => __awaiter(this, void 0, void 0, function* () {
const localVarPath = `/v1/files/upload`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: "POST" }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
const localVarFormParams = new ((configuration &&
configuration.formDataCtor) ||
FormData)();
// authentication bearerAuth required
// http bearer authentication required
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
if (org !== undefined) {
localVarQueryParameter["org"] = org;
}
if (file !== undefined) {
localVarFormParams.append("file", file);
}
localVarHeaderParameter["Content-Type"] = "multipart/form-data";
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = localVarFormParams;
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
*
* @summary Get pipelines, optionally filtered by label
* @param {string} [label] The label to filter pipelines by
* @param {string} [slug] The slug to filter pipelines by
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1PipelinesGet: (label, slug, options = {}) => __awaiter(this, void 0, void 0, function* () {
const localVarPath = `/v1/pipelines`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 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 setBearerAuthToObject(localVarHeaderParameter, configuration);
if (label !== undefined) {
localVarQueryParameter["label"] = label;
}
if (slug !== undefined) {
localVarQueryParameter["slug"] = slug;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
*
* @summary Create a run
* @param {RunRequest} runRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1RunPost: (runRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'runRequest' is not null or undefined
assertParamExists("v1RunPost", "runRequest", runRequest);
const localVarPath = `/v1/run`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: "POST" }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication bearerAuth required
// http bearer authentication required
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
localVarHeaderParameter["Content-Type"] = "application/json";
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = serializeDataIfNeeded(runRequest, localVarRequestOptions, configuration);
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* At least one of datasetId, pipelineId, or pipelineSlug must be provided
* @summary Get test cases for a pipeline or dataset
* @param {string} [datasetId] The ID of the Dataset to retrieve test cases for
* @param {string} [pipelineId] The ID of the Pipeline to retrieve test cases for
* @param {string} [pipelineSlug] The slug of the Pipeline to retrieve test cases for
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestCaseGet: (datasetId, pipelineId, pipelineSlug, options = {}) => __awaiter(this, void 0, void 0, function* () {
const localVarPath = `/v1/test-case`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 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 setBearerAuthToObject(localVarHeaderParameter, configuration);
if (datasetId !== undefined) {
localVarQueryParameter["datasetId"] = datasetId;
}
if (pipelineId !== undefined) {
localVarQueryParameter["pipelineId"] = pipelineId;
}
if (pipelineSlug !== undefined) {
localVarQueryParameter["pipelineSlug"] = pipelineSlug;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
*
* @summary Update an existing test case
* @param {UpdateTestCase} updateTestCase
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestCasePatch: (updateTestCase, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'updateTestCase' is not null or undefined
assertParamExists("v1TestCasePatch", "updateTestCase", updateTestCase);
const localVarPath = `/v1/test-case`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: "PATCH" }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication bearerAuth required
// http bearer authentication required
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
localVarHeaderParameter["Content-Type"] = "application/json";
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = serializeDataIfNeeded(updateTestCase, localVarRequestOptions, configuration);
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
*
* @summary Create a new test case
* @param {V1TestCasePostRequest} v1TestCasePostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestCasePost: (v1TestCasePostRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'v1TestCasePostRequest' is not null or undefined
assertParamExists("v1TestCasePost", "v1TestCasePostRequest", v1TestCasePostRequest);
const localVarPath = `/v1/test-case`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: "POST" }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication bearerAuth required
// http bearer authentication required
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
localVarHeaderParameter["Content-Type"] = "application/json";
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = serializeDataIfNeeded(v1TestCasePostRequest, localVarRequestOptions, configuration);
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
*
* @summary Get test results for a pipeline
* @param {string} pipelineSlug The slug of the pipeline
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestResultGet: (pipelineSlug, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'pipelineSlug' is not null or undefined
assertParamExists("v1TestResultGet", "pipelineSlug", pipelineSlug);
const localVarPath = `/v1/test-result`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 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 setBearerAuthToObject(localVarHeaderParameter, configuration);
if (pipelineSlug !== undefined) {
localVarQueryParameter["pipelineSlug"] = pipelineSlug;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
*
* @summary Fetch test result by ID
* @param {string} id The ID of the test result
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestResultIdGet: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'id' is not null or undefined
assertParamExists("v1TestResultIdGet", "id", id);
const localVarPath = `/v1/test-result/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 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 setBearerAuthToObject(localVarHeaderParameter, configuration);
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
*
* @summary Add more test runs to a result
* @param {string} id The ID of the test result
* @param {V1TestResultIdPostRequest} v1TestResultIdPostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestResultIdPost: (id, v1TestResultIdPostRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'id' is not null or undefined
assertParamExists("v1TestResultIdPost", "id", id);
// verify required parameter 'v1TestResultIdPostRequest' is not null or undefined
assertParamExists("v1TestResultIdPost", "v1TestResultIdPostRequest", v1TestResultIdPostRequest);
const localVarPath = `/v1/test-result/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: "POST" }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication bearerAuth required
// http bearer authentication required
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
localVarHeaderParameter["Content-Type"] = "application/json";
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = serializeDataIfNeeded(v1TestResultIdPostRequest, localVarRequestOptions, configuration);
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
*
* @summary Create a new test result from runs
* @param {V1TestResultPostRequest} v1TestResultPostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestResultPost: (v1TestResultPostRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'v1TestResultPostRequest' is not null or undefined
assertParamExists("v1TestResultPost", "v1TestResultPostRequest", v1TestResultPostRequest);
const localVarPath = `/v1/test-result`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: "POST" }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication bearerAuth required
// http bearer authentication required
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
localVarHeaderParameter["Content-Type"] = "application/json";
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = serializeDataIfNeeded(v1TestResultPostRequest, localVarRequestOptions, configuration);
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
*
* @summary Add more test runs to a result (simple version)
* @param {string} id The ID of the test result
* @param {V1TestResultSimpleIdPostRequest} v1TestResultSimpleIdPostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestResultSimpleIdPost: (id, v1TestResultSimpleIdPostRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'id' is not null or undefined
assertParamExists("v1TestResultSimpleIdPost", "id", id);
// verify required parameter 'v1TestResultSimpleIdPostRequest' is not null or undefined
assertParamExists("v1TestResultSimpleIdPost", "v1TestResultSimpleIdPostRequest", v1TestResultSimpleIdPostRequest);
const localVarPath = `/v1/test-result-simple/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: "POST" }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication bearerAuth required
// http bearer authentication required
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
localVarHeaderParameter["Content-Type"] = "application/json";
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = serializeDataIfNeeded(v1TestResultSimpleIdPostRequest, localVarRequestOptions, configuration);
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
*
* @summary Create a new test result from test runs
* @param {V1TestResultSimplePostRequest} v1TestResultSimplePostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestResultSimplePost: (v1TestResultSimplePostRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'v1TestResultSimplePostRequest' is not null or undefined
assertParamExists("v1TestResultSimplePost", "v1TestResultSimplePostRequest", v1TestResultSimplePostRequest);
const localVarPath = `/v1/test-result-simple`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: "POST" }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication bearerAuth required
// http bearer authentication required
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
localVarHeaderParameter["Content-Type"] = "application/json";
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = serializeDataIfNeeded(v1TestResultSimplePostRequest, localVarRequestOptions, configuration);
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
*
* @summary Get status of the test result
* @param {string} id The ID of the test result
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestResultStatusGet: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'id' is not null or undefined
assertParamExists("v1TestResultStatusGet", "id", id);
const localVarPath = `/v1/test-result/status`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 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 setBearerAuthToObject(localVarHeaderParameter, configuration);
if (id !== undefined) {
localVarQueryParameter["id"] = id;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
};
};
/**
* V1Api - functional programming interface
* @export
*/
const V1ApiFp = function (configuration) {
const localVarAxiosParamCreator = V1ApiAxiosParamCreator(configuration);
return {
/**
*
* @summary Submit feedback
* @param {FeedbackRequest} feedbackRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1FeedbackPost(feedbackRequest, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.v1FeedbackPost(feedbackRequest, options);
return createRequestFunction(localVarAxiosArgs, axiosWithOptionalFetch, BASE_PATH, configuration);
});
},
/**
*
* @summary Upload an image file
* @param {string} [org] (If not using an organization API Key) the ID of the organization
* @param {File} [file] The file to upload.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1FilesUploadPost(org, file, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.v1FilesUploadPost(org, file, options);
return createRequestFunction(localVarAxiosArgs, axiosWithOptionalFetch, BASE_PATH, configuration);
});
},
/**
*
* @summary Get pipelines, optionally filtered by label
* @param {string} [label] The label to filter pipelines by
* @param {string} [slug] The slug to filter pipelines by
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1PipelinesGet(label, slug, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.v1PipelinesGet(label, slug, options);
return createRequestFunction(localVarAxiosArgs, axiosWithOptionalFetch, BASE_PATH, configuration);
});
},
/**
*
* @summary Create a run
* @param {RunRequest} runRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1RunPost(runRequest, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.v1RunPost(runRequest, options);
return createRequestFunction(localVarAxiosArgs, axiosWithOptionalFetch, BASE_PATH, configuration);
});
},
/**
* At least one of datasetId, pipelineId, or pipelineSlug must be provided
* @summary Get test cases for a pipeline or dataset
* @param {string} [datasetId] The ID of the Dataset to retrieve test cases for
* @param {string} [pipelineId] The ID of the Pipeline to retrieve test cases for
* @param {string} [pipelineSlug] The slug of the Pipeline to retrieve test cases for
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestCaseGet(datasetId, pipelineId, pipelineSlug, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.v1TestCaseGet(datasetId, pipelineId, pipelineSlug, options);
return createRequestFunction(localVarAxiosArgs, axiosWithOptionalFetch, BASE_PATH, configuration);
});
},
/**
*
* @summary Update an existing test case
* @param {UpdateTestCase} updateTestCase
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestCasePatch(updateTestCase, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.v1TestCasePatch(updateTestCase, options);
return createRequestFunction(localVarAxiosArgs, axiosWithOptionalFetch, BASE_PATH, configuration);
});
},
/**
*
* @summary Create a new test case
* @param {V1TestCasePostRequest} v1TestCasePostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestCasePost(v1TestCasePostRequest, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.v1TestCasePost(v1TestCasePostRequest, options);
return createRequestFunction(localVarAxiosArgs, axiosWithOptionalFetch, BASE_PATH, configuration);
});
},
/**
*
* @summary Get test results for a pipeline
* @param {string} pipelineSlug The slug of the pipeline
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestResultGet(pipelineSlug, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.v1TestResultGet(pipelineSlug, options);
return createRequestFunction(localVarAxiosArgs, axiosWithOptionalFetch, BASE_PATH, configuration);
});
},
/**
*
* @summary Fetch test result by ID
* @param {string} id The ID of the test result
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestResultIdGet(id, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.v1TestResultIdGet(id, options);
return createRequestFunction(localVarAxiosArgs, axiosWithOptionalFetch, BASE_PATH, configuration);
});
},
/**
*
* @summary Add more test runs to a result
* @param {string} id The ID of the test result
* @param {V1TestResultIdPostRequest} v1TestResultIdPostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestResultIdPost(id, v1TestResultIdPostRequest, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.v1TestResultIdPost(id, v1TestResultIdPostRequest, options);
return createRequestFunction(localVarAxiosArgs, axiosWithOptionalFetch, BASE_PATH, configuration);
});
},
/**
*
* @summary Create a new test result from runs
* @param {V1TestResultPostRequest} v1TestResultPostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestResultPost(v1TestResultPostRequest, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.v1TestResultPost(v1TestResultPostRequest, options);
return createRequestFunction(localVarAxiosArgs, axiosWithOptionalFetch, BASE_PATH, configuration);
});
},
/**
*
* @summary Add more test runs to a result (simple version)
* @param {string} id The ID of the test result
* @param {V1TestResultSimpleIdPostRequest} v1TestResultSimpleIdPostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestResultSimpleIdPost(id, v1TestResultSimpleIdPostRequest, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.v1TestResultSimpleIdPost(id, v1TestResultSimpleIdPostRequest, options);
return createRequestFunction(localVarAxiosArgs, axiosWithOptionalFetch, BASE_PATH, configuration);
});
},
/**
*
* @summary Create a new test result from test runs
* @param {V1TestResultSimplePostRequest} v1TestResultSimplePostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestResultSimplePost(v1TestResultSimplePostRequest, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.v1TestResultSimplePost(v1TestResultSimplePostRequest, options);
return createRequestFunction(localVarAxiosArgs, axiosWithOptionalFetch, BASE_PATH, configuration);
});
},
/**
*
* @summary Get status of the test result
* @param {string} id The ID of the test result
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestResultStatusGet(id, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.v1TestResultStatusGet(id, options);
return createRequestFunction(localVarAxiosArgs, axiosWithOptionalFetch, BASE_PATH, configuration);
});
},
};
};
/**
* V1Api - factory interface
* @export
*/
const V1ApiFactory = function (configuration, basePath, axios) {
const localVarFp = V1ApiFp(configuration);
return {
/**
*
* @summary Submit feedback
* @param {FeedbackRequest} feedbackRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1FeedbackPost(feedbackRequest, options) {
return localVarFp
.v1FeedbackPost(feedbackRequest, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary Upload an image file
* @param {string} [org] (If not using an organization API Key) the ID of the organization
* @param {File} [file] The file to upload.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1FilesUploadPost(org, file, options) {
return localVarFp
.v1FilesUploadPost(org, file, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary Get pipelines, optionally filtered by label
* @param {string} [label] The label to filter pipelines by
* @param {string} [slug] The slug to filter pipelines by
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1PipelinesGet(label, slug, options) {
return localVarFp
.v1PipelinesGet(label, slug, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary Create a run
* @param {RunRequest} runRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1RunPost(runRequest, options) {
return localVarFp
.v1RunPost(runRequest, options)
.then((request) => request(axios, basePath));
},
/**
* At least one of datasetId, pipelineId, or pipelineSlug must be provided
* @summary Get test cases for a pipeline or dataset
* @param {string} [datasetId] The ID of the Dataset to retrieve test cases for
* @param {string} [pipelineId] The ID of the Pipeline to retrieve test cases for
* @param {string} [pipelineSlug] The slug of the Pipeline to retrieve test cases for
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestCaseGet(datasetId, pipelineId, pipelineSlug, options) {
return localVarFp
.v1TestCaseGet(datasetId, pipelineId, pipelineSlug, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary Update an existing test case
* @param {UpdateTestCase} updateTestCase
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestCasePatch(updateTestCase, options) {
return localVarFp
.v1TestCasePatch(updateTestCase, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary Create a new test case
* @param {V1TestCasePostRequest} v1TestCasePostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestCasePost(v1TestCasePostRequest, options) {
return localVarFp
.v1TestCasePost(v1TestCasePostRequest, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary Get test results for a pipeline
* @param {string} pipelineSlug The slug of the pipeline
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestResultGet(pipelineSlug, options) {
return localVarFp
.v1TestResultGet(pipelineSlug, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary Fetch test result by ID
* @param {string} id The ID of the test result
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestResultIdGet(id, options) {
return localVarFp
.v1TestResultIdGet(id, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary Add more test runs to a result
* @param {string} id The ID of the test result
* @param {V1TestResultIdPostRequest} v1TestResultIdPostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestResultIdPost(id, v1TestResultIdPostRequest, options) {
return localVarFp
.v1TestResultIdPost(id, v1TestResultIdPostRequest, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary Create a new test result from runs
* @param {V1TestResultPostRequest} v1TestResultPostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestResultPost(v1TestResultPostRequest, options) {
return localVarFp
.v1TestResultPost(v1TestResultPostRequest, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary Add more test runs to a result (simple version)
* @param {string} id The ID of the test result
* @param {V1TestResultSimpleIdPostRequest} v1TestResultSimpleIdPostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestResultSimpleIdPost(id, v1TestResultSimpleIdPostRequest, options) {
return localVarFp
.v1TestResultSimpleIdPost(id, v1TestResultSimpleIdPostRequest, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary Create a new test result from test runs
* @param {V1TestResultSimplePostRequest} v1TestResultSimplePostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestResultSimplePost(v1TestResultSimplePostRequest, options) {
return localVarFp
.v1TestResultSimplePost(v1TestResultSimplePostRequest, options)
.then((request) => request(axios, basePath));
},
/**
*
* @summary Get status of the test result
* @param {string} id The ID of the test result
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
v1TestResultStatusGet(id, options) {
return localVarFp
.v1TestResultStatusGet(id, options)
.then((request) => request(axios, basePath));
},
};
};
/**
* V1Api - object-oriented interface
* @export
* @class V1Api
* @extends {BaseAPI}
*/
class V1Api extends BaseAPI {
/**
*
* @summary Submit feedback
* @param {FeedbackRequest} feedbackRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof V1Api
*/
v1FeedbackPost(feedbackRequest, options) {
return V1ApiFp(this.configuration)
.v1FeedbackPost(feedbackRequest, options)
.then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Upload an image file
* @param {string} [org] (If not using an organization API Key) the ID of the organization
* @param {File} [file] The file to upload.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof V1Api
*/
v1FilesUploadPost(org, file, options) {
return V1ApiFp(this.configuration)
.v1FilesUploadPost(org, file, options)
.then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Get pipelines, optionally filtered by label
* @param {string} [label] The label to filter pipelines by
* @param {string} [slug] The slug to filter pipelines by
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof V1Api
*/
v1PipelinesGet(label, slug, options) {
return V1ApiFp(this.configuration)
.v1PipelinesGet(label, slug, options)
.then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Create a run
* @param {RunRequest} runRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof V1Api
*/
v1RunPost(runRequest, options) {
return V1ApiFp(this.configuration)
.v1RunPost(runRequest, options)
.then((request) => request(this.axios, this.basePath));
}
/**
* At least one of datasetId, pipelineId, or pipelineSlug must be provided
* @summary Get test cases for a pipeline or dataset
* @param {string} [datasetId] The ID of the Dataset to retrieve test cases for
* @param {string} [pipelineId] The ID of the Pipeline to retrieve test cases for
* @param {string} [pipelineSlug] The slug of the Pipeline to retrieve test cases for
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof V1Api
*/
v1TestCaseGet(datasetId, pipelineId, pipelineSlug, options) {
return V1ApiFp(this.configuration)
.v1TestCaseGet(datasetId, pipelineId, pipelineSlug, options)
.then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Update an existing test case
* @param {UpdateTestCase} updateTestCase
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof V1Api
*/
v1TestCasePatch(updateTestCase, options) {
return V1ApiFp(this.configuration)
.v1TestCasePatch(updateTestCase, options)
.then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Create a new test case
* @param {V1TestCasePostRequest} v1TestCasePostRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof V1Api
*/
v1TestCasePost(v1TestCasePostRequest, options) {
return V1ApiFp(this.configuration)
.v1TestCasePost(v1TestCasePostRequest, options