@agravity/private
Version:
The Agravity GlobalDAM API which allowes authenticated user to access the Agravity GlobalDAM Backend
1,008 lines (919 loc) • 44.1 kB
text/typescript
/**
* Agravity OpenAPI Documentation - Private Functions
*
* Contact: office@agravity.io
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';
// @ts-ignore
import { AgravityErrorResponse } from '../model/agravityErrorResponse.agravity';
// @ts-ignore
import { AgravityInfoResponse } from '../model/agravityInfoResponse.agravity';
// @ts-ignore
import { SearchAdminStatus } from '../model/searchAdminStatus.agravity';
// @ts-ignore
import { SearchFacet } from '../model/searchFacet.agravity';
// @ts-ignore
import { SearchResult } from '../model/searchResult.agravity';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { AgravityConfiguration } from '../configuration';
export interface HttpAzureDeleteSearchCompletelyRequestParams {
/** If the search should be redirected to a specific portal. */
portalId?: string;
}
export interface HttpAzureRecreateGlobalIndexRequestParams {
/** If the search should be redirected to a specific portal. */
portalId?: string;
}
export interface HttpGetSearchFacetteByNameRequestParams {
/** The name of the facette. */
name: string;
/** The search string which should be found. */
s: string;
/** Limits the result on all collections from the given collectiontypeid parameter. */
collectiontypeid?: string;
/** Limits the result on collection id (and siblings). Will be overwritten by collectiontypeid parameter. */
collectionid?: string;
/** Two modes supported: \"any\" or \"all\" search terms should be applied. (Only if Azure Search is enabled) */
mode?: string;
/** Key value filter for filterable strings and string collections separated by special \',,,\'. For date or numbers \"<\", \"=\" and \">\" are possible. Mode influences AND (all) and OR (any) of all filters. Multiple filters are separated by semicolons. (Only if Azure Search is enabled) */
filter?: string;
/** Colon separated key value filter for additional scopes. It applies the same conventions as for filter parameter. */
scopefilter?: string;
/** Comma separated values list with all ids which should be returned. */
ids?: string;
/** If the search should be redirected to a specific portal. */
portalId?: string;
}
export interface HttpGlobalSearchRequestParams {
/** The search string which should be found. */
s: string;
/** How many results should be returend. 0 is backend configuration limit. */
limit?: number;
/** (default: 0) - Used for paging - how many items should be skipped before next limit results will be fetched. */
skip?: number;
/** Limits the result on all collections from the given collectiontypeid parameter. */
collectiontypeid?: string;
/** Limits the result on collection id (and siblings). Will be overwritten by collectiontypeid parameter. */
collectionid?: string;
/** Two modes supported: \"any\" or \"all\" search terms should be applied. (Only if Azure Search is enabled) */
mode?: string;
/** This will expose the thumbnail asset blob incl. URL with SAS Token. */
expose?: boolean;
/** Key value filter for filterable strings and string collections separated by special \',,,\'. For date or numbers \"<\", \"=\" and \">\" are possible. Mode influences AND (all) and OR (any) of all filters. Multiple filters are separated by semicolons. (Only if Azure Search is enabled) */
filter?: string;
/** Search Broadness: Can be 0, 1 or 2. (0 is the most exact search, 2 is the broadest search) (1, 2 is with AI) */
broadness?: number;
/** The ID of the relation which this search is limited to. (Only the assets in this relation are returend) */
relId?: string;
/** Colon separated key value filter for additional scopes. It applies the same conventions as for filter parameter. */
scopefilter?: string;
/** Sortable fields can be used. For descendant sorting use leading \"!\". (Only if Azure Search is enabled) */
orderby?: string;
/** Comma separated values list with all ids which should be returned. */
ids?: string;
/** If the search should be redirected to a specific portal. */
portalId?: string;
/** When default language should be returned and the translation dictionary is delivered. (Ignores the \"Accept-Language\" header) */
translations?: boolean;
/** The requested language of the response. If not matching it falls back to default language. */
acceptLanguage?: string;
}
export interface HttpPatchCleanSearchFromDeletedAssetsRequestParams {
/** If the search should be redirected to a specific portal. */
portalId?: string;
}
export interface HttpPatchReIndexAssetsRequestParams {
/** The ID of the entity (collection type, collection or asset). */
id: string;
}
export interface HttpSearchAdminGetStatusRequestParams {
/** If the search should be redirected to a specific portal. */
portalId?: string;
/** If all information is needed (incl. datasource, etc.). */
full?: boolean;
}
export interface HttpSearchAdminRunRequestParams {
/** If the a specific portal should be run. */
portalId?: string;
}
export class SearchManagementService {
protected basePath = 'http://localhost:7071/api';
public defaultHeaders = new HttpHeaders();
public configuration = new AgravityConfiguration();
public encoder: HttpParameterCodec;
constructor(
protected httpClient: HttpClient,
basePath: string | string[],
configuration: AgravityConfiguration
) {
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
if (typeof value === 'object' && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
} else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
if (value == null) {
return httpParams;
}
if (typeof value === 'object') {
if (Array.isArray(value)) {
(value as any[]).forEach((elem) => (httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)));
} else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
} else {
throw Error('key may not be null if value is Date');
}
} else {
Object.keys(value).forEach((k) => (httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k)));
}
} else if (key != null) {
httpParams = httpParams.append(key, value);
} else {
throw Error('key may not be null if value is not object or array');
}
return httpParams;
}
/**
* This endpoint deletes the index, indexes and data source connection. Has to be recreated with recreate endpoint.
* @param requestParameters
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public httpAzureDeleteSearchCompletely(
requestParameters?: HttpAzureDeleteSearchCompletelyRequestParams,
observe?: 'body',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<AgravityInfoResponse>;
public httpAzureDeleteSearchCompletely(
requestParameters?: HttpAzureDeleteSearchCompletelyRequestParams,
observe?: 'response',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpResponse<AgravityInfoResponse>>;
public httpAzureDeleteSearchCompletely(
requestParameters?: HttpAzureDeleteSearchCompletelyRequestParams,
observe?: 'events',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpEvent<AgravityInfoResponse>>;
public httpAzureDeleteSearchCompletely(
requestParameters?: HttpAzureDeleteSearchCompletelyRequestParams,
observe: any = 'body',
reportProgress: boolean = false,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<any> {
const portalId = requestParameters?.portalId;
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (portalId !== undefined && portalId !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>portalId, 'portal_id');
}
let localVarHeaders = this.defaultHeaders;
let localVarCredential: string | undefined;
// authentication (msal_auth) required
localVarCredential = this.configuration.lookupCredential('msal_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json'];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarPath = `/searchadmin/delete`;
return this.httpClient.request<AgravityInfoResponse>('patch', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
/**
* This endpoint recreates the index and creates the indexes, skillset and data source connection if not existing
* @param requestParameters
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public httpAzureRecreateGlobalIndex(
requestParameters?: HttpAzureRecreateGlobalIndexRequestParams,
observe?: 'body',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<AgravityInfoResponse>;
public httpAzureRecreateGlobalIndex(
requestParameters?: HttpAzureRecreateGlobalIndexRequestParams,
observe?: 'response',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpResponse<AgravityInfoResponse>>;
public httpAzureRecreateGlobalIndex(
requestParameters?: HttpAzureRecreateGlobalIndexRequestParams,
observe?: 'events',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpEvent<AgravityInfoResponse>>;
public httpAzureRecreateGlobalIndex(
requestParameters?: HttpAzureRecreateGlobalIndexRequestParams,
observe: any = 'body',
reportProgress: boolean = false,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<any> {
const portalId = requestParameters?.portalId;
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (portalId !== undefined && portalId !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>portalId, 'portal_id');
}
let localVarHeaders = this.defaultHeaders;
let localVarCredential: string | undefined;
// authentication (msal_auth) required
localVarCredential = this.configuration.lookupCredential('msal_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json'];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarPath = `/searchadmin/recreate`;
return this.httpClient.request<AgravityInfoResponse>('patch', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
/**
* This endpoint returns one facette based on the search parameters.
* @param requestParameters
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public httpGetSearchFacetteByName(
requestParameters?: HttpGetSearchFacetteByNameRequestParams,
observe?: 'body',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<SearchFacet>;
public httpGetSearchFacetteByName(
requestParameters?: HttpGetSearchFacetteByNameRequestParams,
observe?: 'response',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpResponse<SearchFacet>>;
public httpGetSearchFacetteByName(
requestParameters?: HttpGetSearchFacetteByNameRequestParams,
observe?: 'events',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpEvent<SearchFacet>>;
public httpGetSearchFacetteByName(
requestParameters?: HttpGetSearchFacetteByNameRequestParams,
observe: any = 'body',
reportProgress: boolean = false,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<any> {
const name = requestParameters?.name;
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling httpGetSearchFacetteByName.');
}
const s = requestParameters?.s;
if (s === null || s === undefined) {
throw new Error('Required parameter s was null or undefined when calling httpGetSearchFacetteByName.');
}
const collectiontypeid = requestParameters?.collectiontypeid;
const collectionid = requestParameters?.collectionid;
const mode = requestParameters?.mode;
const filter = requestParameters?.filter;
const scopefilter = requestParameters?.scopefilter;
const ids = requestParameters?.ids;
const portalId = requestParameters?.portalId;
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (name !== undefined && name !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>name, 'name');
}
if (s !== undefined && s !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>s, 's');
}
if (collectiontypeid !== undefined && collectiontypeid !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>collectiontypeid, 'collectiontypeid');
}
if (collectionid !== undefined && collectionid !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>collectionid, 'collectionid');
}
if (mode !== undefined && mode !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>mode, 'mode');
}
if (filter !== undefined && filter !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>filter, 'filter');
}
if (scopefilter !== undefined && scopefilter !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>scopefilter, 'scopefilter');
}
if (ids !== undefined && ids !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>ids, 'ids');
}
if (portalId !== undefined && portalId !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>portalId, 'portal_id');
}
let localVarHeaders = this.defaultHeaders;
let localVarCredential: string | undefined;
// authentication (msal_auth) required
localVarCredential = this.configuration.lookupCredential('msal_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json'];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarPath = `/search/facette`;
return this.httpClient.request<SearchFacet>('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
/**
* This endpoint returns a configured max amount of results for search terms.
* @param requestParameters
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public httpGlobalSearch(
requestParameters?: HttpGlobalSearchRequestParams,
observe?: 'body',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<SearchResult>;
public httpGlobalSearch(
requestParameters?: HttpGlobalSearchRequestParams,
observe?: 'response',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpResponse<SearchResult>>;
public httpGlobalSearch(
requestParameters?: HttpGlobalSearchRequestParams,
observe?: 'events',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpEvent<SearchResult>>;
public httpGlobalSearch(
requestParameters?: HttpGlobalSearchRequestParams,
observe: any = 'body',
reportProgress: boolean = false,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<any> {
const s = requestParameters?.s;
if (s === null || s === undefined) {
throw new Error('Required parameter s was null or undefined when calling httpGlobalSearch.');
}
const limit = requestParameters?.limit;
const skip = requestParameters?.skip;
const collectiontypeid = requestParameters?.collectiontypeid;
const collectionid = requestParameters?.collectionid;
const mode = requestParameters?.mode;
const expose = requestParameters?.expose;
const filter = requestParameters?.filter;
const broadness = requestParameters?.broadness;
const relId = requestParameters?.relId;
const scopefilter = requestParameters?.scopefilter;
const orderby = requestParameters?.orderby;
const ids = requestParameters?.ids;
const portalId = requestParameters?.portalId;
const translations = requestParameters?.translations;
const acceptLanguage = requestParameters?.acceptLanguage;
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (s !== undefined && s !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>s, 's');
}
if (limit !== undefined && limit !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>limit, 'limit');
}
if (skip !== undefined && skip !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>skip, 'skip');
}
if (collectiontypeid !== undefined && collectiontypeid !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>collectiontypeid, 'collectiontypeid');
}
if (collectionid !== undefined && collectionid !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>collectionid, 'collectionid');
}
if (mode !== undefined && mode !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>mode, 'mode');
}
if (expose !== undefined && expose !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>expose, 'expose');
}
if (filter !== undefined && filter !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>filter, 'filter');
}
if (broadness !== undefined && broadness !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>broadness, 'broadness');
}
if (relId !== undefined && relId !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>relId, 'rel_id');
}
if (scopefilter !== undefined && scopefilter !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>scopefilter, 'scopefilter');
}
if (orderby !== undefined && orderby !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>orderby, 'orderby');
}
if (ids !== undefined && ids !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>ids, 'ids');
}
if (portalId !== undefined && portalId !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>portalId, 'portal_id');
}
if (translations !== undefined && translations !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>translations, 'translations');
}
let localVarHeaders = this.defaultHeaders;
if (acceptLanguage !== undefined && acceptLanguage !== null) {
localVarHeaders = localVarHeaders.set('Accept-Language', String(acceptLanguage));
}
let localVarCredential: string | undefined;
// authentication (msal_auth) required
localVarCredential = this.configuration.lookupCredential('msal_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json'];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarPath = `/search`;
return this.httpClient.request<SearchResult>('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
/**
* This endpoint removes all assets which are not longer available in the database from the search index.
* @param requestParameters
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public httpPatchCleanSearchFromDeletedAssets(
requestParameters?: HttpPatchCleanSearchFromDeletedAssetsRequestParams,
observe?: 'body',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<AgravityInfoResponse>;
public httpPatchCleanSearchFromDeletedAssets(
requestParameters?: HttpPatchCleanSearchFromDeletedAssetsRequestParams,
observe?: 'response',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpResponse<AgravityInfoResponse>>;
public httpPatchCleanSearchFromDeletedAssets(
requestParameters?: HttpPatchCleanSearchFromDeletedAssetsRequestParams,
observe?: 'events',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpEvent<AgravityInfoResponse>>;
public httpPatchCleanSearchFromDeletedAssets(
requestParameters?: HttpPatchCleanSearchFromDeletedAssetsRequestParams,
observe: any = 'body',
reportProgress: boolean = false,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<any> {
const portalId = requestParameters?.portalId;
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (portalId !== undefined && portalId !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>portalId, 'portal_id');
}
let localVarHeaders = this.defaultHeaders;
let localVarCredential: string | undefined;
// authentication (msal_auth) required
localVarCredential = this.configuration.lookupCredential('msal_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json'];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarPath = `/searchadmin/clean`;
return this.httpClient.request<AgravityInfoResponse>('patch', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
/**
* This endpoint takes the ID and check if it is a collection type, collection or asset and re-index it in search.
* @param requestParameters
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public httpPatchReIndexAssets(
requestParameters?: HttpPatchReIndexAssetsRequestParams,
observe?: 'body',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<AgravityInfoResponse>;
public httpPatchReIndexAssets(
requestParameters?: HttpPatchReIndexAssetsRequestParams,
observe?: 'response',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpResponse<AgravityInfoResponse>>;
public httpPatchReIndexAssets(
requestParameters?: HttpPatchReIndexAssetsRequestParams,
observe?: 'events',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpEvent<AgravityInfoResponse>>;
public httpPatchReIndexAssets(
requestParameters?: HttpPatchReIndexAssetsRequestParams,
observe: any = 'body',
reportProgress: boolean = false,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<any> {
const id = requestParameters?.id;
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling httpPatchReIndexAssets.');
}
let localVarHeaders = this.defaultHeaders;
let localVarCredential: string | undefined;
// authentication (msal_auth) required
localVarCredential = this.configuration.lookupCredential('msal_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json'];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarPath = `/searchadmin/reindex/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
return this.httpClient.request<AgravityInfoResponse>('patch', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
/**
* This endpoint gives the status about the index and indexer. Skill and data source connection only when \'full\' is set to true.
* @param requestParameters
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public httpSearchAdminGetStatus(
requestParameters?: HttpSearchAdminGetStatusRequestParams,
observe?: 'body',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<SearchAdminStatus>;
public httpSearchAdminGetStatus(
requestParameters?: HttpSearchAdminGetStatusRequestParams,
observe?: 'response',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpResponse<SearchAdminStatus>>;
public httpSearchAdminGetStatus(
requestParameters?: HttpSearchAdminGetStatusRequestParams,
observe?: 'events',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpEvent<SearchAdminStatus>>;
public httpSearchAdminGetStatus(
requestParameters?: HttpSearchAdminGetStatusRequestParams,
observe: any = 'body',
reportProgress: boolean = false,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<any> {
const portalId = requestParameters?.portalId;
const full = requestParameters?.full;
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (portalId !== undefined && portalId !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>portalId, 'portal_id');
}
if (full !== undefined && full !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>full, 'full');
}
let localVarHeaders = this.defaultHeaders;
let localVarCredential: string | undefined;
// authentication (msal_auth) required
localVarCredential = this.configuration.lookupCredential('msal_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json'];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarPath = `/searchadmin/status`;
return this.httpClient.request<SearchAdminStatus>('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
/**
* This endpoint runs the search indexer
* @param requestParameters
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public httpSearchAdminRun(
requestParameters?: HttpSearchAdminRunRequestParams,
observe?: 'body',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<AgravityInfoResponse>;
public httpSearchAdminRun(
requestParameters?: HttpSearchAdminRunRequestParams,
observe?: 'response',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpResponse<AgravityInfoResponse>>;
public httpSearchAdminRun(
requestParameters?: HttpSearchAdminRunRequestParams,
observe?: 'events',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpEvent<AgravityInfoResponse>>;
public httpSearchAdminRun(
requestParameters?: HttpSearchAdminRunRequestParams,
observe: any = 'body',
reportProgress: boolean = false,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<any> {
const portalId = requestParameters?.portalId;
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (portalId !== undefined && portalId !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>portalId, 'portal_id');
}
let localVarHeaders = this.defaultHeaders;
let localVarCredential: string | undefined;
// authentication (msal_auth) required
localVarCredential = this.configuration.lookupCredential('msal_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json'];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarPath = `/searchadmin/run`;
return this.httpClient.request<AgravityInfoResponse>('patch', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
}