/* tslint:disable */ /* eslint-disable */ /** * Abaco API * Abaco (Actor Based Containers) is an API and distributed computing platform funded by the National Science Foundation to provide Functions-as-a-service to the research computing community. Abaco leverages Docker containers and the Actor Model of Concurrent Computation to provide generic function primitives that are portable, composable and scalable. * * The version of the OpenAPI document: 1 * Contact: cicsupport@tacc.utexas.edu * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import * as runtime from '../runtime'; import { RespSearchDatabase, RespSearchDatabaseFromJSON, RespSearchDatabaseToJSON, } from '../models'; export interface SearchDatabaseRequest { searchType: SearchDatabaseSearchTypeEnum; search?: string; limit?: number; skip?: number; } /** * */ export class SearchApi extends runtime.BaseAPI { /** * Return db records that match query * search_database */ async searchDatabaseRaw(requestParameters: SearchDatabaseRequest, initOverrides?: RequestInit): Promise> { if (requestParameters.searchType === null || requestParameters.searchType === undefined) { throw new runtime.RequiredError('searchType','Required parameter requestParameters.searchType was null or undefined when calling searchDatabase.'); } const queryParameters: any = {}; if (requestParameters.search !== undefined) { queryParameters['search'] = requestParameters.search; } if (requestParameters.limit !== undefined) { queryParameters['limit'] = requestParameters.limit; } if (requestParameters.skip !== undefined) { queryParameters['skip'] = requestParameters.skip; } const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { queryParameters["x-nonce"] = this.configuration.apiKey("x-nonce"); // nonce authentication } if (this.configuration && this.configuration.apiKey) { headerParameters["X-JWT-Assertion-DEV"] = this.configuration.apiKey("X-JWT-Assertion-DEV"); // wso2jwtDevAuth authentication } const response = await this.request({ path: `/actors/search/{search_type}`.replace(`{${"search_type"}}`, encodeURIComponent(String(requestParameters.searchType))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => RespSearchDatabaseFromJSON(jsonValue)); } /** * Return db records that match query * search_database */ async searchDatabase(requestParameters: SearchDatabaseRequest, initOverrides?: RequestInit): Promise { const response = await this.searchDatabaseRaw(requestParameters, initOverrides); return await response.value(); } } /** * @export * @enum {string} */ export enum SearchDatabaseSearchTypeEnum { Actors = 'actors', Workers = 'workers', Logs = 'logs', Executions = 'executions' }