@agravity/private
Version:
The Agravity GlobalDAM API which allowes authenticated user to access the Agravity GlobalDAM Backend
783 lines (699 loc) • 36.7 kB
text/typescript
/**
* Agravity OpenAPI Documentation - Private Functions
*
* Contact: support@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';
import { BaseService } from '../api.base.service';
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 extends BaseService {
constructor(
protected httpClient: HttpClient,
basePath: string | string[],
configuration?: AgravityConfiguration
) {
super(basePath, configuration);
}
/**
* 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 });
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>portalId, 'portal_id');
let localVarHeaders = this.defaultHeaders;
// authentication (msal_auth) required
localVarHeaders = this.configuration.addCredentialToHeaders('msal_auth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
const localVarTransferCache: boolean = options?.transferCache ?? 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`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<AgravityInfoResponse>('patch', `${basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { 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 });
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>portalId, 'portal_id');
let localVarHeaders = this.defaultHeaders;
// authentication (msal_auth) required
localVarHeaders = this.configuration.addCredentialToHeaders('msal_auth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
const localVarTransferCache: boolean = options?.transferCache ?? 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`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<AgravityInfoResponse>('patch', `${basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { 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 });
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>name, 'name');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>s, 's');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>collectiontypeid, 'collectiontypeid');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>collectionid, 'collectionid');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>mode, 'mode');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>filter, 'filter');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>scopefilter, 'scopefilter');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>ids, 'ids');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>portalId, 'portal_id');
let localVarHeaders = this.defaultHeaders;
// authentication (msal_auth) required
localVarHeaders = this.configuration.addCredentialToHeaders('msal_auth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
const localVarTransferCache: boolean = options?.transferCache ?? 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`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<SearchFacet>('get', `${basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { 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 });
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>s, 's');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>limit, 'limit');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>skip, 'skip');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>collectiontypeid, 'collectiontypeid');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>collectionid, 'collectionid');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>mode, 'mode');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>expose, 'expose');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>filter, 'filter');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>broadness, 'broadness');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>relId, 'rel_id');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>scopefilter, 'scopefilter');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>orderby, 'orderby');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>ids, 'ids');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>portalId, 'portal_id');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>translations, 'translations');
let localVarHeaders = this.defaultHeaders;
if (acceptLanguage !== undefined && acceptLanguage !== null) {
localVarHeaders = localVarHeaders.set('Accept-Language', String(acceptLanguage));
}
// authentication (msal_auth) required
localVarHeaders = this.configuration.addCredentialToHeaders('msal_auth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
const localVarTransferCache: boolean = options?.transferCache ?? 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`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<SearchResult>('get', `${basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { 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 });
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>portalId, 'portal_id');
let localVarHeaders = this.defaultHeaders;
// authentication (msal_auth) required
localVarHeaders = this.configuration.addCredentialToHeaders('msal_auth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
const localVarTransferCache: boolean = options?.transferCache ?? 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`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<AgravityInfoResponse>('patch', `${basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { 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;
// authentication (msal_auth) required
localVarHeaders = this.configuration.addCredentialToHeaders('msal_auth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
const localVarTransferCache: boolean = options?.transferCache ?? 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 })}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<AgravityInfoResponse>('patch', `${basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { 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 });
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>portalId, 'portal_id');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>full, 'full');
let localVarHeaders = this.defaultHeaders;
// authentication (msal_auth) required
localVarHeaders = this.configuration.addCredentialToHeaders('msal_auth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
const localVarTransferCache: boolean = options?.transferCache ?? 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`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<SearchAdminStatus>('get', `${basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { 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 });
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>portalId, 'portal_id');
let localVarHeaders = this.defaultHeaders;
// authentication (msal_auth) required
localVarHeaders = this.configuration.addCredentialToHeaders('msal_auth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
const localVarTransferCache: boolean = options?.transferCache ?? 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`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<AgravityInfoResponse>('patch', `${basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
}