UNPKG

@agravity/private

Version:

The Agravity GlobalDAM API which allowes authenticated user to access the Agravity GlobalDAM Backend

551 lines (488 loc) 23.9 kB
/** * 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 { AgravityVersion } from '../model/agravityVersion.agravity'; // @ts-ignore import { DeletedEntities } from '../model/deletedEntities.agravity'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { AgravityConfiguration } from '../configuration'; import { BaseService } from '../api.base.service'; export interface HttpCleanupRequestParams { /** (Default 90 days) - How many days in the entity. */ olderThanDays?: number; } export interface HttpGetDeletedEntitiesRequestParams { /** The type of the entity (e.g. \&#39;asset\&#39;, \&#39;collection_type\&#39;, \&#39;collection_type\&#39;. Admins are allowed to list the other types as well. */ entityType?: string; /** The date in the past since the entities are marked as deleted in the database. */ since?: string; /** The date in the past until the entities are marked as deleted in the database. */ until?: string; /** If the request comes from portal this is the indicator. */ portalId?: string; } export interface HttpSetupRequestParams { /** (Default true) - Set to false if base collections (Folder) should not be created. */ createfolder: boolean; /** Comma separated queue-names (have to start with \&#39;setup-\&#39;). */ addconfigqueues?: string; } @Injectable({ providedIn: 'root' }) export class GeneralManagementService extends BaseService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string | string[], @Optional() configuration?: AgravityConfiguration ) { super(basePath, configuration); } /** * This endpoint returns the current version of the backend. * @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 httpAgravityVersionInfo( observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<AgravityVersion>; public httpAgravityVersionInfo( observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpResponse<AgravityVersion>>; public httpAgravityVersionInfo( observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpEvent<AgravityVersion>>; public httpAgravityVersionInfo( observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<any> { 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 = `/version`; const { basePath, withCredentials } = this.configuration; return this.httpClient.request<AgravityVersion>('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: <any>responseType_, ...(withCredentials ? { withCredentials } : {}), headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } /** * This endpoint deletes the database completely in a \&quot;fast\&quot; way without querying all entities with this \&quot;hidden\&quot; stored procedure. * @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 httpAssetsDeleteAllFast( observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<AgravityInfoResponse>; public httpAssetsDeleteAllFast( observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpResponse<AgravityInfoResponse>>; public httpAssetsDeleteAllFast( observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpEvent<AgravityInfoResponse>>; public httpAssetsDeleteAllFast( observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<any> { 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 = `/cosmosdb!!`; const { basePath, withCredentials } = this.configuration; return this.httpClient.request<AgravityInfoResponse>('delete', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: <any>responseType_, ...(withCredentials ? { withCredentials } : {}), headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } /** * This endpoint queries all entities from which are marked as status \&quot;D\&quot; and cleans internal archive container from that assets * @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 httpCleanup( requestParameters?: HttpCleanupRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<AgravityInfoResponse>; public httpCleanup( requestParameters?: HttpCleanupRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpResponse<AgravityInfoResponse>>; public httpCleanup( requestParameters?: HttpCleanupRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpEvent<AgravityInfoResponse>>; public httpCleanup( requestParameters?: HttpCleanupRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<any> { const olderThanDays = requestParameters?.olderThanDays; let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>olderThanDays, 'olderThanDays'); 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 = `/cleanup`; 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 checks if all assets in original container exist in db otherwise they are deleted * @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 httpCleanupOrigAssets( observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<AgravityInfoResponse>; public httpCleanupOrigAssets( observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpResponse<AgravityInfoResponse>>; public httpCleanupOrigAssets( observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpEvent<AgravityInfoResponse>>; public httpCleanupOrigAssets( observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<any> { 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 = `/cleanup`; const { basePath, withCredentials } = this.configuration; return this.httpClient.request<AgravityInfoResponse>('post', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: <any>responseType_, ...(withCredentials ? { withCredentials } : {}), headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } /** * This endpoint checks all deleted entities in the database until a specific date and returns the elements which are deleted. * @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 httpGetDeletedEntities( requestParameters?: HttpGetDeletedEntitiesRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<Array<DeletedEntities>>; public httpGetDeletedEntities( requestParameters?: HttpGetDeletedEntitiesRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpResponse<Array<DeletedEntities>>>; public httpGetDeletedEntities( requestParameters?: HttpGetDeletedEntitiesRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpEvent<Array<DeletedEntities>>>; public httpGetDeletedEntities( requestParameters?: HttpGetDeletedEntitiesRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<any> { const entityType = requestParameters?.entityType; const since = requestParameters?.since; const until = requestParameters?.until; const portalId = requestParameters?.portalId; let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>entityType, 'entity_type'); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>since, 'since'); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>until, 'until'); 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 = `/deleted`; const { basePath, withCredentials } = this.configuration; return this.httpClient.request<Array<DeletedEntities>>('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, responseType: <any>responseType_, ...(withCredentials ? { withCredentials } : {}), headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } /** * This endpoint runs the initial setup of an environment. * @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 httpSetup( requestParameters: HttpSetupRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<AgravityInfoResponse>; public httpSetup( requestParameters: HttpSetupRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpResponse<AgravityInfoResponse>>; public httpSetup( requestParameters: HttpSetupRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpEvent<AgravityInfoResponse>>; public httpSetup( requestParameters: HttpSetupRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<any> { const createfolder = requestParameters?.createfolder; if (createfolder === null || createfolder === undefined) { throw new Error('Required parameter createfolder was null or undefined when calling httpSetup.'); } const addconfigqueues = requestParameters?.addconfigqueues; let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>createfolder, 'createfolder'); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>addconfigqueues, 'addconfigqueues'); 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 = `/setup`; const { basePath, withCredentials } = this.configuration; return this.httpClient.request<AgravityInfoResponse>('post', `${basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, responseType: <any>responseType_, ...(withCredentials ? { withCredentials } : {}), headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } /** * This endpoint triggers a backup via a docker container. * @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 httpTriggerBackup( observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<AgravityInfoResponse>; public httpTriggerBackup( observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpResponse<AgravityInfoResponse>>; public httpTriggerBackup( observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpEvent<AgravityInfoResponse>>; public httpTriggerBackup( observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<any> { 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 = `/backup`; const { basePath, withCredentials } = this.configuration; return this.httpClient.request<AgravityInfoResponse>('post', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: <any>responseType_, ...(withCredentials ? { withCredentials } : {}), headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } }