Skip to main content
Glama
problem-occurrence-api.ts10.9 kB
/* tslint:disable */ /* eslint-disable */ /** * TeamCity REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 2018.1 (current) * * * 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 { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // @ts-ignore import { BASE_PATH, BaseAPI, COLLECTION_FORMATS, type RequestArgs, RequiredError, operationServerMap, } from '../base'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, createRequestFunction, serializeDataIfNeeded, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, toPathString, } from '../common'; import type { Configuration } from '../configuration'; // @ts-ignore import type { ProblemOccurrence } from '../models'; // @ts-ignore import type { ProblemOccurrences } from '../models'; /** * ProblemOccurrenceApi - axios parameter creator * @export */ export const ProblemOccurrenceApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * * @summary Get all build problem occurrences. * @param {string} [locator] * @param {string} [fields] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAllBuildProblemOccurrences: async ( locator?: string, fields?: string, options: RawAxiosRequestConfig = {} ): Promise<RequestArgs> => { const localVarPath = `/app/rest/problemOccurrences`; // 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 Record<string, string>; const localVarQueryParameter = {} as Record<string, string>; if (locator !== undefined) { localVarQueryParameter['locator'] = String(locator); } if (fields !== undefined) { localVarQueryParameter['fields'] = String(fields); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions["headers"] ? baseOptions["headers"] : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options["headers"], }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get a matching build problem occurrence. * @param {string} problemLocator * @param {string} [fields] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBuildProblemOccurrence: async ( problemLocator: string, fields?: string, options: RawAxiosRequestConfig = {} ): Promise<RequestArgs> => { // verify required parameter 'problemLocator' is not null or undefined assertParamExists('getBuildProblemOccurrence', 'problemLocator', problemLocator); const localVarPath = `/app/rest/problemOccurrences/{problemLocator}`.replace( `{${'problemLocator'}}`, encodeURIComponent(String(problemLocator)) ); // 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 Record<string, string>; const localVarQueryParameter = {} as Record<string, string>; if (fields !== undefined) { localVarQueryParameter['fields'] = String(fields); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions["headers"] ? baseOptions["headers"] : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options["headers"], }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; /** * ProblemOccurrenceApi - functional programming interface * @export */ export const ProblemOccurrenceApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = ProblemOccurrenceApiAxiosParamCreator(configuration); return { /** * * @summary Get all build problem occurrences. * @param {string} [locator] * @param {string} [fields] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getAllBuildProblemOccurrences( locator?: string, fields?: string, options?: RawAxiosRequestConfig ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProblemOccurrences>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getAllBuildProblemOccurrences( locator, fields, options ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ProblemOccurrenceApi.getAllBuildProblemOccurrences']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get a matching build problem occurrence. * @param {string} problemLocator * @param {string} [fields] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getBuildProblemOccurrence( problemLocator: string, fields?: string, options?: RawAxiosRequestConfig ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProblemOccurrence>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getBuildProblemOccurrence( problemLocator, fields, options ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['ProblemOccurrenceApi.getBuildProblemOccurrence']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * ProblemOccurrenceApi - factory interface * @export */ export const ProblemOccurrenceApiFactory = function ( configuration?: Configuration, basePath?: string, axios?: AxiosInstance ) { const localVarFp = ProblemOccurrenceApiFp(configuration); return { /** * * @summary Get all build problem occurrences. * @param {string} [locator] * @param {string} [fields] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAllBuildProblemOccurrences( locator?: string, fields?: string, options?: RawAxiosRequestConfig ): AxiosPromise<ProblemOccurrences> { return localVarFp .getAllBuildProblemOccurrences(locator, fields, options) .then((request) => request(axios, basePath)); }, /** * * @summary Get a matching build problem occurrence. * @param {string} problemLocator * @param {string} [fields] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBuildProblemOccurrence( problemLocator: string, fields?: string, options?: RawAxiosRequestConfig ): AxiosPromise<ProblemOccurrence> { return localVarFp .getBuildProblemOccurrence(problemLocator, fields, options) .then((request) => request(axios, basePath)); }, }; }; /** * ProblemOccurrenceApi - interface * @export * @interface ProblemOccurrenceApi */ export interface ProblemOccurrenceApiInterface { /** * * @summary Get all build problem occurrences. * @param {string} [locator] * @param {string} [fields] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProblemOccurrenceApiInterface */ getAllBuildProblemOccurrences( locator?: string, fields?: string, options?: RawAxiosRequestConfig ): AxiosPromise<ProblemOccurrences>; /** * * @summary Get a matching build problem occurrence. * @param {string} problemLocator * @param {string} [fields] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProblemOccurrenceApiInterface */ getBuildProblemOccurrence( problemLocator: string, fields?: string, options?: RawAxiosRequestConfig ): AxiosPromise<ProblemOccurrence>; } /** * ProblemOccurrenceApi - object-oriented interface * @export * @class ProblemOccurrenceApi * @extends {BaseAPI} */ export class ProblemOccurrenceApi extends BaseAPI implements ProblemOccurrenceApiInterface { /** * * @summary Get all build problem occurrences. * @param {string} [locator] * @param {string} [fields] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProblemOccurrenceApi */ public getAllBuildProblemOccurrences( locator?: string, fields?: string, options?: RawAxiosRequestConfig ) { return ProblemOccurrenceApiFp(this.configuration) .getAllBuildProblemOccurrences(locator, fields, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Get a matching build problem occurrence. * @param {string} problemLocator * @param {string} [fields] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProblemOccurrenceApi */ public getBuildProblemOccurrence( problemLocator: string, fields?: string, options?: RawAxiosRequestConfig ) { return ProblemOccurrenceApiFp(this.configuration) .getBuildProblemOccurrence(problemLocator, fields, options) .then((request) => request(this.axios, this.basePath)); } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Daghis/teamcity-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server