UNPKG

@gentrace/core

Version:
990 lines (988 loc) 54.2 kB
'use strict'; 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()); }); }; /** * 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 common.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, common.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 common.setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter["Content-Type"] = "application/json"; common.setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); localVarRequestOptions.data = common.serializeDataIfNeeded(feedbackRequest, localVarRequestOptions, configuration); return { url: common.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, common.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 common.setBearerAuthToObject(localVarHeaderParameter, configuration); if (org !== undefined) { localVarQueryParameter["org"] = org; } if (file !== undefined) { localVarFormParams.append("file", file); } localVarHeaderParameter["Content-Type"] = "multipart/form-data"; common.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: common.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, 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 (label !== undefined) { localVarQueryParameter["label"] = label; } if (slug !== undefined) { localVarQueryParameter["slug"] = slug; } 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, }; }), /** * * @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 common.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, common.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 common.setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter["Content-Type"] = "application/json"; common.setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); localVarRequestOptions.data = common.serializeDataIfNeeded(runRequest, localVarRequestOptions, configuration); return { url: common.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, 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 (datasetId !== undefined) { localVarQueryParameter["datasetId"] = datasetId; } if (pipelineId !== undefined) { localVarQueryParameter["pipelineId"] = pipelineId; } if (pipelineSlug !== undefined) { localVarQueryParameter["pipelineSlug"] = pipelineSlug; } 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, }; }), /** * * @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 common.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, common.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 common.setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter["Content-Type"] = "application/json"; common.setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); localVarRequestOptions.data = common.serializeDataIfNeeded(updateTestCase, localVarRequestOptions, configuration); return { url: common.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 common.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, common.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 common.setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter["Content-Type"] = "application/json"; common.setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); localVarRequestOptions.data = common.serializeDataIfNeeded(v1TestCasePostRequest, localVarRequestOptions, configuration); return { url: common.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 common.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, 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 (pipelineSlug !== undefined) { localVarQueryParameter["pipelineSlug"] = pipelineSlug; } 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, }; }), /** * * @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 common.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, 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); 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, }; }), /** * * @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 common.assertParamExists("v1TestResultIdPost", "id", id); // verify required parameter 'v1TestResultIdPostRequest' is not null or undefined common.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, common.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 common.setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter["Content-Type"] = "application/json"; common.setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); localVarRequestOptions.data = common.serializeDataIfNeeded(v1TestResultIdPostRequest, localVarRequestOptions, configuration); return { url: common.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 common.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, common.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 common.setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter["Content-Type"] = "application/json"; common.setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); localVarRequestOptions.data = common.serializeDataIfNeeded(v1TestResultPostRequest, localVarRequestOptions, configuration); return { url: common.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 common.assertParamExists("v1TestResultSimpleIdPost", "id", id); // verify required parameter 'v1TestResultSimpleIdPostRequest' is not null or undefined common.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, common.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 common.setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter["Content-Type"] = "application/json"; common.setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); localVarRequestOptions.data = common.serializeDataIfNeeded(v1TestResultSimpleIdPostRequest, localVarRequestOptions, configuration); return { url: common.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 common.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, common.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 common.setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter["Content-Type"] = "application/json"; common.setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); localVarRequestOptions.data = common.serializeDataIfNeeded(v1TestResultSimplePostRequest, localVarRequestOptions, configuration); return { url: common.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 common.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, 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 (id !== undefined) { localVarQueryParameter["id"] = id; } 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, }; }), }; }; /** * 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 common.createRequestFunction(localVarAxiosArgs, axiosInstance, base.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 common.createRequestFunction(localVarAxiosArgs, axiosInstance, base.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 common.createRequestFunction(localVarAxiosArgs, axiosInstance, base.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 common.createRequestFunction(localVarAxiosArgs, axiosInstance, base.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 common.createRequestFunction(localVarAxiosArgs, axiosInstance, base.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 common.createRequestFunction(localVarAxiosArgs, axiosInstance, base.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 common.createRequestFunction(localVarAxiosArgs, axiosInstance, base.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 common.createRequestFunction(localVarAxiosArgs, axiosInstance, base.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 common.createRequestFunction(localVarAxiosArgs, axiosInstance, base.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 common.createRequestFunction(localVarAxiosArgs, axiosInstance, base.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 common.createRequestFunction(localVarAxiosArgs, axiosInstance, base.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 common.createRequestFunction(localVarAxiosArgs, axiosInstance, base.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 common.createRequestFunction(localVarAxiosArgs, axiosInstance, base.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 common.createRequestFunction(localVarAxiosArgs, axiosInstance, base.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 base.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) .