UNPKG

@gentrace/core

Version:
1,577 lines (1,497 loc) 56 kB
/* 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. */ import type { Configuration } from "../configuration"; import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from "axios"; import axiosWithOptionalFetch from "../axios-instance"; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, } from "../common"; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError, } from "../base"; // @ts-ignore import { ExpandedTestResult } from "../models"; // @ts-ignore import { FeedbackRequest } from "../models"; // @ts-ignore import { FeedbackResponse } from "../models"; // @ts-ignore import { RunRequest } from "../models"; // @ts-ignore import { RunResponse } from "../models"; // @ts-ignore import { UpdateTestCase } from "../models"; // @ts-ignore import { V1FilesUploadPost201Response } from "../models"; // @ts-ignore import { V1FilesUploadPost400Response } from "../models"; // @ts-ignore import { V1PipelinesGet200Response } from "../models"; // @ts-ignore import { V1TestCaseGet200Response } from "../models"; // @ts-ignore import { V1TestCasePatch200Response } from "../models"; // @ts-ignore import { V1TestCasePost200Response } from "../models"; // @ts-ignore import { V1TestCasePostRequest } from "../models"; // @ts-ignore import { V1TestResultGet200Response } from "../models"; // @ts-ignore import { V1TestResultIdPostRequest } from "../models"; // @ts-ignore import { V1TestResultPost200Response } from "../models"; // @ts-ignore import { V1TestResultPostRequest } from "../models"; // @ts-ignore import { V1TestResultSimpleIdPostRequest } from "../models"; // @ts-ignore import { V1TestResultSimplePostRequest } from "../models"; // @ts-ignore import { V1TestResultStatusGet200Response } from "../models"; /** * V1Api - axios parameter creator * @export */ export const V1ApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * * @summary Submit feedback * @param {FeedbackRequest} feedbackRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ v1FeedbackPost: async ( feedbackRequest: FeedbackRequest, options: AxiosRequestConfig = {}, ): Promise<RequestArgs> => { // 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 = { method: "POST", ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearerAuth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter["Content-Type"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...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: async ( org?: string, file?: File, options: AxiosRequestConfig = {}, ): Promise<RequestArgs> => { 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 = { method: "POST", ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)(); // authentication bearerAuth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); if (org !== undefined) { localVarQueryParameter["org"] = org; } if (file !== undefined) { localVarFormParams.append("file", file as any); } localVarHeaderParameter["Content-Type"] = "multipart/form-data"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...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: async ( label?: string, slug?: string, options: AxiosRequestConfig = {}, ): Promise<RequestArgs> => { 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 = { method: "GET", ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearerAuth required // http bearer authentication required await 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 = { ...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: async ( runRequest: RunRequest, options: AxiosRequestConfig = {}, ): Promise<RequestArgs> => { // 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 = { method: "POST", ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearerAuth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter["Content-Type"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...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: async ( datasetId?: string, pipelineId?: string, pipelineSlug?: string, options: AxiosRequestConfig = {}, ): Promise<RequestArgs> => { 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 = { method: "GET", ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearerAuth required // http bearer authentication required await 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 = { ...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: async ( updateTestCase: UpdateTestCase, options: AxiosRequestConfig = {}, ): Promise<RequestArgs> => { // 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 = { method: "PATCH", ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearerAuth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter["Content-Type"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...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: async ( v1TestCasePostRequest: V1TestCasePostRequest, options: AxiosRequestConfig = {}, ): Promise<RequestArgs> => { // 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 = { method: "POST", ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearerAuth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter["Content-Type"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...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: async ( pipelineSlug: string, options: AxiosRequestConfig = {}, ): Promise<RequestArgs> => { // 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 = { method: "GET", ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearerAuth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); if (pipelineSlug !== undefined) { localVarQueryParameter["pipelineSlug"] = pipelineSlug; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...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: async ( id: string, options: AxiosRequestConfig = {}, ): Promise<RequestArgs> => { // 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 = { method: "GET", ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearerAuth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...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: async ( id: string, v1TestResultIdPostRequest: V1TestResultIdPostRequest, options: AxiosRequestConfig = {}, ): Promise<RequestArgs> => { // 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 = { method: "POST", ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearerAuth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter["Content-Type"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...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: async ( v1TestResultPostRequest: V1TestResultPostRequest, options: AxiosRequestConfig = {}, ): Promise<RequestArgs> => { // 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 = { method: "POST", ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearerAuth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter["Content-Type"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...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: async ( id: string, v1TestResultSimpleIdPostRequest: V1TestResultSimpleIdPostRequest, options: AxiosRequestConfig = {}, ): Promise<RequestArgs> => { // 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 = { method: "POST", ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearerAuth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter["Content-Type"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...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: async ( v1TestResultSimplePostRequest: V1TestResultSimplePostRequest, options: AxiosRequestConfig = {}, ): Promise<RequestArgs> => { // 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 = { method: "POST", ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearerAuth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); localVarHeaderParameter["Content-Type"] = "application/json"; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...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: async ( id: string, options: AxiosRequestConfig = {}, ): Promise<RequestArgs> => { // 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 = { method: "GET", ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearerAuth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration); if (id !== undefined) { localVarQueryParameter["id"] = id; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; /** * V1Api - functional programming interface * @export */ export const V1ApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = V1ApiAxiosParamCreator(configuration); return { /** * * @summary Submit feedback * @param {FeedbackRequest} feedbackRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async v1FeedbackPost( feedbackRequest: FeedbackRequest, options?: AxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise<FeedbackResponse> > { const localVarAxiosArgs = await 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} */ async v1FilesUploadPost( org?: string, file?: File, options?: AxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise<V1FilesUploadPost201Response> > { const localVarAxiosArgs = await 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} */ async v1PipelinesGet( label?: string, slug?: string, options?: AxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise<V1PipelinesGet200Response> > { const localVarAxiosArgs = await 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} */ async v1RunPost( runRequest: RunRequest, options?: AxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise<RunResponse> > { const localVarAxiosArgs = await 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} */ async v1TestCaseGet( datasetId?: string, pipelineId?: string, pipelineSlug?: string, options?: AxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise<V1TestCaseGet200Response> > { const localVarAxiosArgs = await 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} */ async v1TestCasePatch( updateTestCase: UpdateTestCase, options?: AxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise<V1TestCasePatch200Response> > { const localVarAxiosArgs = await 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} */ async v1TestCasePost( v1TestCasePostRequest: V1TestCasePostRequest, options?: AxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise<V1TestCasePost200Response> > { const localVarAxiosArgs = await 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} */ async v1TestResultGet( pipelineSlug: string, options?: AxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise<V1TestResultGet200Response> > { const localVarAxiosArgs = await 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} */ async v1TestResultIdGet( id: string, options?: AxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise<ExpandedTestResult> > { const localVarAxiosArgs = await 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} */ async v1TestResultIdPost( id: string, v1TestResultIdPostRequest: V1TestResultIdPostRequest, options?: AxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise<V1TestResultPost200Response> > { const localVarAxiosArgs = await 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} */ async v1TestResultPost( v1TestResultPostRequest: V1TestResultPostRequest, options?: AxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise<V1TestResultPost200Response> > { const localVarAxiosArgs = await 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} */ async v1TestResultSimpleIdPost( id: string, v1TestResultSimpleIdPostRequest: V1TestResultSimpleIdPostRequest, options?: AxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise<V1TestResultPost200Response> > { const localVarAxiosArgs = await 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} */ async v1TestResultSimplePost( v1TestResultSimplePostRequest: V1TestResultSimplePostRequest, options?: AxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise<V1TestResultPost200Response> > { const localVarAxiosArgs = await 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} */ async v1TestResultStatusGet( id: string, options?: AxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise<V1TestResultStatusGet200Response> > { const localVarAxiosArgs = await localVarAxiosParamCreator.v1TestResultStatusGet(id, options); return createRequestFunction( localVarAxiosArgs, axiosWithOptionalFetch, BASE_PATH, configuration, ); }, }; }; /** * V1Api - factory interface * @export */ export const V1ApiFactory = function ( configuration?: Configuration, basePath?: string, axios?: AxiosInstance, ) { const localVarFp = V1ApiFp(configuration); return { /** * * @summary Submit feedback * @param {FeedbackRequest} feedbackRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ v1FeedbackPost( feedbackRequest: FeedbackRequest, options?: any, ): AxiosPromise<FeedbackResponse> { 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?: string, file?: File, options?: any, ): AxiosPromise<V1FilesUploadPost201Response> { 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?: string, slug?: string, options?: any, ): AxiosPromise<V1PipelinesGet200Response> { 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: RunRequest, options?: any, ): AxiosPromise<RunResponse> { 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?: string, pipelineId?: string, pipelineSlug?: string, options?: any, ): AxiosPromise<V1TestCaseGet200Response> { 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: UpdateTestCase, options?: any, ): AxiosPromise<V1TestCasePatch200Response> { 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: V1TestCasePostRequest, options?: any, ): AxiosPromise<V1TestCasePost200Response> { 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: string, options?: any, ): AxiosPromise<V1TestResultGet200Response> { 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: string, options?: any, ): AxiosPromise<ExpandedTestResult> { 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: string, v1TestResultIdPostRequest: V1TestResultIdPostRequest, options?: any, ): AxiosPromise<V1TestResultPost200Response> { 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: V1TestResultPostRequest, options?: any, ): AxiosPromise<V1TestResultPost200Response> { 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: string, v1TestResultSimpleIdPostRequest: V1TestResultSimpleIdPostRequest, options?: any, ): AxiosPromise<V1TestResultPost200Response> { 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: V1TestResultSimplePostRequest, options?: any, ): AxiosPromise<V1TestResultPost200Response> { 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: string, options?: any, ): AxiosPromise<V1TestResultStatusGet200Response> { return localVarFp .v1TestResultStatusGet(id, options) .then((request) => request(axios, basePath)); }, }; }; /** * V1Api - object-oriented interface * @export * @class V1Api * @extends {BaseAPI} */ export class V1Api extends BaseAPI { /** * * @summary Submit feedback * @param {FeedbackRequest} feedbackRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof V1Api */ public v1FeedbackPost( feedbackRequest: FeedbackRequest, options?: AxiosRequestConfig, ) { 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 */ public v1FilesUploadPost( org?: string, file?: File, options?: AxiosRequestConfig, ) { 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 */ public v1PipelinesGet( label?: string, slug?: string, options?: AxiosRequestConfig, ) { return V1ApiFp(