UNPKG

@agravity/private

Version:

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

1,115 lines (994 loc) 95.7 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 { Asset } from '../model/asset.agravity'; // @ts-ignore import { AssetAvailability } from '../model/assetAvailability.agravity'; // @ts-ignore import { AssetBlob } from '../model/assetBlob.agravity'; // @ts-ignore import { AssetRelation } from '../model/assetRelation.agravity'; // @ts-ignore import { AssetTextContent } from '../model/assetTextContent.agravity'; // @ts-ignore import { AssetsOperationBody } from '../model/assetsOperationBody.agravity'; // @ts-ignore import { Collection } from '../model/collection.agravity'; // @ts-ignore import { DynamicImageOperation } from '../model/dynamicImageOperation.agravity'; // @ts-ignore import { Metadata } from '../model/metadata.agravity'; // @ts-ignore import { MoveCollectionBody } from '../model/moveCollectionBody.agravity'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { AgravityConfiguration } from '../configuration'; import { BaseService } from '../api.base.service'; export interface HttpAssetImageEditRequestParams { /** The ID of the asset. */ id: string; /** The width of the final image. */ width?: number; /** The height of the final image. */ height?: number; /** The supported modes: contain (default), cover, fill, crop, none */ mode?: string; /** The file type which the image should be (i.e. webp, png, jpg, gif) */ target?: string; /** The color of the background color if background is visible (crop outside, png). RGB(A) in hex code (i.e. 00FFAA or with alpha channel: 44AABB77) and color names (i.e. lightgray) supported - default: transparent */ bgcolor?: string; /** The density (counts for X and Y) of the target image. */ dpi?: number; /** The bit depth of the target image. */ depth?: number; /** The quality of the target image (1-100). */ quality?: number; /** The color space of the image (Default: sRGB). */ colorspace?: string; /** If mode is crop: The x coordinate of the point (if image is extended (outside) it is negative) */ cropX?: number; /** If mode is crop: The y coordinate of the point (if image is extended (outside) it is negative) */ cropY?: number; /** If mode&#x3D;crop: The width of the cropping rectangle (from original pixel) */ cropWidth?: number; /** If mode&#x3D;crop: The height of the cropping rectangle (from original pixel) */ cropHeight?: number; /** Which filter should be applied. To get all filters available use: /api/helper/imageeditfilters */ filter?: string; /** If set to true the internal image is used instead of the default original */ original?: boolean; /** The origin image which should be used for the conversion. */ origin?: string; } export interface HttpAssetImageRotateClockwiseRequestParams { /** The ID of the asset. */ id: string; /** When default language should be returned and the translation dictionary is delivered. (Ignores the \&quot;Accept-Language\&quot; header) */ translations?: boolean; /** The requested language of the response. If not matching it falls back to default language. */ acceptLanguage?: string; } export interface HttpAssetResizeRequestParams { /** The ID of the asset. */ id: string; } export interface HttpAssetToCollectionRequestParams { /** The ID of the asset. */ id: string; /** Contains information about this operation. */ moveCollectionBody: MoveCollectionBody; } export interface HttpAssetsToCollectionRequestParams { /** Contains information which assets should be assigned to collection. */ assetsOperationBody: AssetsOperationBody; } export interface HttpDeleteAlternativeThumbRequestParams { /** The ID of the asset. */ id: string; } export interface HttpDeleteSpecificBlobRequestParams { /** The ID of the asset. */ id: string; /** The name of the container where this blob is. */ name: string; } export interface HttpGetAllAssetsCheckOnCriteriaRequestParams { /** Give the plain md5 string as parameter to be checked on all assets. */ md5: string; } export interface HttpGetAssetBlobRequestParams { /** The ID of the asset. */ id: string; /** \&quot;t\&quot; for thumbnail (default); \&quot;op\&quot; for optimized; \&quot;os\&quot; for original size; \&quot;o\&quot; for original. */ c?: string; } export interface HttpGetAssetCollectionsByIdRequestParams { /** The ID of the asset. */ id: string; /** This limits the fields which are returned, separated by comma (\&#39;,\&#39;). */ fields?: string; /** When default language should be returned and the translation dictionary is delivered. (Ignores the \&quot;Accept-Language\&quot; header) */ translations?: boolean; /** The requested language of the response. If not matching it falls back to default language. */ acceptLanguage?: string; } export interface HttpGetAssetDownloadRequestParams { /** The ID of the asset. */ id: string; /** \&quot;t\&quot; for thumbnail (default); \&quot;op\&quot; for optimized; \&quot;os\&quot; for original size; \&quot;o\&quot; for original. */ c?: string; /** (optional) provide the id of any valid download format. */ f?: string; /** If the request comes from portal this is the indicator. It will be checked if the requested blob is valid for the portal. */ portalId?: string; } export interface HttpGetAssetRelationsByIdRequestParams { /** The ID of the asset. */ id: string; } export interface HttpGetAssetTechDataByIdRequestParams { /** The ID of the asset. */ id: string; } export interface HttpGetAssetTextContentByIdRequestParams { /** The ID of the asset. */ id: string; } export interface HttpImageDynamicEditRequestParams { /** The ID of the asset. */ id: string; /** Operations to be performed on the image directly mapped to c# imagemagick sdk */ dynamicImageOperation: Array<DynamicImageOperation>; /** If the file should have a specific naming. */ targetFilename?: string; } export interface HttpImageDynamicGetFromDownloadIdRequestParams { /** The ID of the asset. */ id: string; /** The ID of the download format. */ downloadFormatId: string; } export interface HttpPatchAssetPurgeCdnRequestParams { /** The ID of the asset. */ id: string; } export interface HttpPatchAssetReindexRequestParams { /** The ID of the asset. */ id: string; } export interface HttpPatchAssetRenewRequestParams { /** The ID of the asset. */ id: string; } export interface HttpPatchAssetRepairRequestParams { /** The ID of the asset. */ id: string; } export interface HttpPatchAssetRunQueueRequestParams { /** The ID of the asset. */ id: string; /** The name of the queue(s) which should be executed. (Comma separated) */ queueInput: string; } export interface HttpPutAssetAvailabilityRequestParams { /** The ID of the asset. */ id: string; /** The values are validated and put directly on the asset. */ assetAvailability: AssetAvailability; } export interface HttpRestoreAssetRequestParams { /** The ID of the asset. */ id: string; /** The point in time to which to restore the asset to. */ pointintime: string; /** An alternative/extra collection to restore the asset to. */ altcollection?: string; } @Injectable({ providedIn: 'root' }) export class AssetOperationsService extends BaseService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string | string[], @Optional() configuration?: AgravityConfiguration ) { super(basePath, configuration); } /** * This endpoint lets you resize/modify the image asset according to the given GET parameter(s) - Only exception is for target: If this is a download format no other parameter is used. * @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 httpAssetImageEdit( requestParameters: HttpAssetImageEditRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'image/xyz' | 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<Blob>; public httpAssetImageEdit( requestParameters: HttpAssetImageEditRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'image/xyz' | 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpResponse<Blob>>; public httpAssetImageEdit( requestParameters: HttpAssetImageEditRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'image/xyz' | 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpEvent<Blob>>; public httpAssetImageEdit( requestParameters: HttpAssetImageEditRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'image/xyz' | '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 httpAssetImageEdit.'); } const width = requestParameters?.width; const height = requestParameters?.height; const mode = requestParameters?.mode; const target = requestParameters?.target; const bgcolor = requestParameters?.bgcolor; const dpi = requestParameters?.dpi; const depth = requestParameters?.depth; const quality = requestParameters?.quality; const colorspace = requestParameters?.colorspace; const cropX = requestParameters?.cropX; const cropY = requestParameters?.cropY; const cropWidth = requestParameters?.cropWidth; const cropHeight = requestParameters?.cropHeight; const filter = requestParameters?.filter; const original = requestParameters?.original; const origin = requestParameters?.origin; let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>width, 'width'); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>height, 'height'); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>mode, 'mode'); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>target, 'target'); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>bgcolor, 'bgcolor'); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>dpi, 'dpi'); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>depth, 'depth'); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>quality, 'quality'); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>colorspace, 'colorspace'); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>cropX, 'crop_x'); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>cropY, 'crop_y'); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>cropWidth, 'crop_width'); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>cropHeight, 'crop_height'); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>filter, 'filter'); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>original, 'original'); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>origin, 'origin'); 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(['image/xyz', 'application/json']); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); const localVarTransferCache: boolean = options?.transferCache ?? true; let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/imageedit`; const { basePath, withCredentials } = this.configuration; return this.httpClient.request('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, responseType: 'blob', ...(withCredentials ? { withCredentials } : {}), headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } /** * This endpoint lets you rotate an image clockwise in 90 degree steps. * @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 httpAssetImageRotateClockwise( requestParameters: HttpAssetImageRotateClockwiseRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<Asset>; public httpAssetImageRotateClockwise( requestParameters: HttpAssetImageRotateClockwiseRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpResponse<Asset>>; public httpAssetImageRotateClockwise( requestParameters: HttpAssetImageRotateClockwiseRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpEvent<Asset>>; public httpAssetImageRotateClockwise( requestParameters: HttpAssetImageRotateClockwiseRequestParams, 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 httpAssetImageRotateClockwise.'); } const translations = requestParameters?.translations; const acceptLanguage = requestParameters?.acceptLanguage; let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); 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 = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/rotate`; const { basePath, withCredentials } = this.configuration; return this.httpClient.request<Asset>('post', `${basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, responseType: <any>responseType_, ...(withCredentials ? { withCredentials } : {}), headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } /** * This endpoint lets you resize/modify the image asset according to the given parameter(s). * @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 httpAssetResize( requestParameters: HttpAssetResizeRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'image/xyz' | 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<Blob>; public httpAssetResize( requestParameters: HttpAssetResizeRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'image/xyz' | 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpResponse<Blob>>; public httpAssetResize( requestParameters: HttpAssetResizeRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'image/xyz' | 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpEvent<Blob>>; public httpAssetResize( requestParameters: HttpAssetResizeRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'image/xyz' | '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 httpAssetResize.'); } 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(['image/xyz', 'application/json']); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); const localVarTransferCache: boolean = options?.transferCache ?? true; let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/resize`; const { basePath, withCredentials } = this.configuration; return this.httpClient.request('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: 'blob', ...(withCredentials ? { withCredentials } : {}), headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } /** * This endpoint allows to move/assign from/to another collection with the given operation parameter. * @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 httpAssetToCollection( requestParameters: HttpAssetToCollectionRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<any>; public httpAssetToCollection( requestParameters: HttpAssetToCollectionRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpResponse<any>>; public httpAssetToCollection( requestParameters: HttpAssetToCollectionRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpEvent<any>>; public httpAssetToCollection( requestParameters: HttpAssetToCollectionRequestParams, 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 httpAssetToCollection.'); } const moveCollectionBody = requestParameters?.moveCollectionBody; if (moveCollectionBody === null || moveCollectionBody === undefined) { throw new Error('Required parameter moveCollectionBody was null or undefined when calling httpAssetToCollection.'); } 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; // to determine the Content-Type header const consumes: string[] = ['application/json']; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); } 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 = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/tocollection`; const { basePath, withCredentials } = this.configuration; return this.httpClient.request<any>('post', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: moveCollectionBody, responseType: <any>responseType_, ...(withCredentials ? { withCredentials } : {}), headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } /** * This endpoint allows to move/assign multiple assets from/to another collection with the given operation parameter. * @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 httpAssetsToCollection( requestParameters: HttpAssetsToCollectionRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<any>; public httpAssetsToCollection( requestParameters: HttpAssetsToCollectionRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpResponse<any>>; public httpAssetsToCollection( requestParameters: HttpAssetsToCollectionRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpEvent<any>>; public httpAssetsToCollection( requestParameters: HttpAssetsToCollectionRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<any> { const assetsOperationBody = requestParameters?.assetsOperationBody; if (assetsOperationBody === null || assetsOperationBody === undefined) { throw new Error('Required parameter assetsOperationBody was null or undefined when calling httpAssetsToCollection.'); } 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; // to determine the Content-Type header const consumes: string[] = ['application/json']; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); } 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 = `/assetsoperations/tocollection`; const { basePath, withCredentials } = this.configuration; return this.httpClient.request<any>('post', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: assetsOperationBody, responseType: <any>responseType_, ...(withCredentials ? { withCredentials } : {}), headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } /** * This endpoint deletes the alternative thumbnail blob of an asset and renews it * @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 httpDeleteAlternativeThumb( requestParameters: HttpDeleteAlternativeThumbRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<AgravityInfoResponse>; public httpDeleteAlternativeThumb( requestParameters: HttpDeleteAlternativeThumbRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpResponse<AgravityInfoResponse>>; public httpDeleteAlternativeThumb( requestParameters: HttpDeleteAlternativeThumbRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpEvent<AgravityInfoResponse>>; public httpDeleteAlternativeThumb( requestParameters: HttpDeleteAlternativeThumbRequestParams, 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 httpDeleteAlternativeThumb.'); } 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 = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/alternative`; 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 deletes a specific blob from the asset (if exists) * @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 httpDeleteSpecificBlob( requestParameters: HttpDeleteSpecificBlobRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<AgravityInfoResponse>; public httpDeleteSpecificBlob( requestParameters: HttpDeleteSpecificBlobRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpResponse<AgravityInfoResponse>>; public httpDeleteSpecificBlob( requestParameters: HttpDeleteSpecificBlobRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpEvent<AgravityInfoResponse>>; public httpDeleteSpecificBlob( requestParameters: HttpDeleteSpecificBlobRequestParams, 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 httpDeleteSpecificBlob.'); } const name = requestParameters?.name; if (name === null || name === undefined) { throw new Error('Required parameter name was null or undefined when calling httpDeleteSpecificBlob.'); } 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 = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/blobs/${this.configuration.encodeParam({ name: 'name', value: name, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; 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 allows to check all assets in system elements with the given criteria are already in the system. Currently supported field: md5 * @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 httpGetAllAssetsCheckOnCriteria( requestParameters: HttpGetAllAssetsCheckOnCriteriaRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<Array<Asset>>; public httpGetAllAssetsCheckOnCriteria( requestParameters: HttpGetAllAssetsCheckOnCriteriaRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpResponse<Array<Asset>>>; public httpGetAllAssetsCheckOnCriteria( requestParameters: HttpGetAllAssetsCheckOnCriteriaRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpEvent<Array<Asset>>>; public httpGetAllAssetsCheckOnCriteria( requestParameters: HttpGetAllAssetsCheckOnCriteriaRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<any> { const md5 = requestParameters?.md5; if (md5 === null || md5 === undefined) { throw new Error('Required parameter md5 was null or undefined when calling httpGetAllAssetsCheckOnCriteria.'); } let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>md5, 'md5'); 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 = `/assetscheck`; const { basePath, withCredentials } = this.configuration; return this.httpClient.request<Array<Asset>>('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, responseType: <any>responseType_, ...(withCredentials ? { withCredentials } : {}), headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } /** * This endpoint checks, if an asset exists and returns the url for the requested blob. * @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 httpGetAssetBlob( requestParameters: HttpGetAssetBlobRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<AssetBlob>; public httpGetAssetBlob( requestParameters: HttpGetAssetBlobRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpResponse<AssetBlob>>; public httpGetAssetBlob( requestParameters: HttpGetAssetBlobRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpEvent<AssetBlob>>; public httpGetAssetBlob( requestParameters: HttpGetAssetBlobRequestParams, 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 httpGetAssetBlob.'); } const c = requestParameters?.c; let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>c, 'c'); 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 = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/blobs`; const { basePath, withCredentials } = this.configuration; return this.httpClient.request<AssetBlob>('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, responseType: <any>responseType_, ...(withCredentials ? { withCredentials } : {}), headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } /** * This endpoint returns all collections of a specific asset. * @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 httpGetAssetCollectionsById( requestParameters: HttpGetAssetCollectionsByIdRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<Array<Collection>>; public httpGetAssetCollectionsById( requestParameters: HttpGetAssetCollectionsByIdRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpResponse<Array<Collection>>>; public httpGetAssetCollectionsById( requestParameters: HttpGetAssetCollectionsByIdRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpEvent<Array<Collection>>>; public httpGetAssetCollectionsById( requestParameters: HttpGetAssetCollectionsByIdRequestParams, 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 httpGetAssetCollectionsById.'); } const fields = requestParameters?.fields; const translations = requestParameters?.translations; const acceptLanguage = requestParameters?.acceptLanguage; let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>fields, 'fields'); 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 = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/collections`; const { basePath, withCredentials } = this.configuration; return this.httpClient.request<Array<Collection>>('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, responseType: <any>responseType_, ...(withCredentials ? { withCredentials } : {}), headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } /** * This endpoint is similar to GetAssetBlob but with ContentDistribution and filename to let browser download the content. * @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 httpGetAssetDownload( requestParameters: HttpGetAssetDownloadRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<AssetBlob>; public httpGetAssetDownload( requestParameters: HttpGetAssetDownloadRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpResponse<AssetBlob>>; public httpGetAssetDownload( requestParameters: HttpGetAssetDownloadRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean } ): Observable<HttpEvent<AssetBlob>>; public httpGetAssetDownload( requestParameters: HttpGetAssetDownloadRequestParams, 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 httpGetAssetDownload.'); } const c = requestParameters?.c; const f = requestParameters?.f; const portalId = requestParameters?.portalId; let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>c, 'c'); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>f, 'f'); 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 = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/download`; const { basePath, withCredentials } = this.configuration; return this.httpClient.request<AssetBlob>('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, responseType: <any>responseType_, ...(withCredentials ? { withCredentials } : {}), headers: localVarHeaders, observe: observe, transferCache