@agravity/private
Version:
The Agravity GlobalDAM API which allowes authenticated user to access the Agravity GlobalDAM Backend
1,184 lines (1,074 loc) • 118 kB
text/typescript
/**
* Agravity OpenAPI Documentation - Private Functions
*
* Contact: office@agravity.io
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';
// @ts-ignore
import { AgravityErrorResponse } from '../model/agravityErrorResponse.agravity';
// @ts-ignore
import { AgravityInfoResponse } from '../model/agravityInfoResponse.agravity';
// @ts-ignore
import { AiGroupEntity } from '../model/aiGroupEntity.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';
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=crop: The width of the cropping rectangle (from original pixel) */
cropWidth?: number;
/** If mode=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 \"Accept-Language\" 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 HttpGetAiGroupEntityByIdRequestParams {
/** The ID of the asset. */
id: 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;
/** \"t\" for thumbnail (default); \"op\" for optimized; \"os\" for original size; \"o\" for original. */
c?: string;
}
export interface HttpGetAssetCaptionByIdRequestParams {
/** The ID of the asset. */
id: string;
}
export interface HttpGetAssetCollectionsByIdRequestParams {
/** The ID of the asset. */
id: string;
/** This limits the fields which are returned, separated by comma (\',\'). */
fields?: 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 HttpGetAssetDownloadRequestParams {
/** The ID of the asset. */
id: string;
/** \"t\" for thumbnail (default); \"op\" for optimized; \"os\" for original size; \"o\" 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>;
}
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 {
protected basePath = 'http://localhost:7071/api';
public defaultHeaders = new HttpHeaders();
public configuration = new AgravityConfiguration();
public encoder: HttpParameterCodec;
constructor(
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string | string[],
@Optional() configuration: AgravityConfiguration
) {
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
if (typeof value === 'object' && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
} else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
if (value == null) {
return httpParams;
}
if (typeof value === 'object') {
if (Array.isArray(value)) {
(value as any[]).forEach((elem) => (httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)));
} else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
} else {
throw Error('key may not be null if value is Date');
}
} else {
Object.keys(value).forEach((k) => (httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k)));
}
} else if (key != null) {
httpParams = httpParams.append(key, value);
} else {
throw Error('key may not be null if value is not object or array');
}
return httpParams;
}
/**
* This endpoint 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 });
if (width !== undefined && width !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>width, 'width');
}
if (height !== undefined && height !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>height, 'height');
}
if (mode !== undefined && mode !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>mode, 'mode');
}
if (target !== undefined && target !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>target, 'target');
}
if (bgcolor !== undefined && bgcolor !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>bgcolor, 'bgcolor');
}
if (dpi !== undefined && dpi !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>dpi, 'dpi');
}
if (depth !== undefined && depth !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>depth, 'depth');
}
if (quality !== undefined && quality !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>quality, 'quality');
}
if (colorspace !== undefined && colorspace !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>colorspace, 'colorspace');
}
if (cropX !== undefined && cropX !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>cropX, 'crop_x');
}
if (cropY !== undefined && cropY !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>cropY, 'crop_y');
}
if (cropWidth !== undefined && cropWidth !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>cropWidth, 'crop_width');
}
if (cropHeight !== undefined && cropHeight !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>cropHeight, 'crop_height');
}
if (filter !== undefined && filter !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>filter, 'filter');
}
if (original !== undefined && original !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>original, 'original');
}
if (origin !== undefined && origin !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>origin, 'origin');
}
let localVarHeaders = this.defaultHeaders;
let localVarCredential: string | undefined;
// authentication (msal_auth) required
localVarCredential = this.configuration.lookupCredential('msal_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = ['image/xyz', 'application/json'];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/imageedit`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: 'blob',
withCredentials: this.configuration.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 });
if (translations !== undefined && translations !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>translations, 'translations');
}
let localVarHeaders = this.defaultHeaders;
if (acceptLanguage !== undefined && acceptLanguage !== null) {
localVarHeaders = localVarHeaders.set('Accept-Language', String(acceptLanguage));
}
let localVarCredential: string | undefined;
// authentication (msal_auth) required
localVarCredential = this.configuration.lookupCredential('msal_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json'];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/rotate`;
return this.httpClient.request<Asset>('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
/**
* This endpoint 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;
let localVarCredential: string | undefined;
// authentication (msal_auth) required
localVarCredential = this.configuration.lookupCredential('msal_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = ['image/xyz', 'application/json'];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/resize`;
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: 'blob',
withCredentials: this.configuration.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;
let localVarCredential: string | undefined;
// authentication (msal_auth) required
localVarCredential = this.configuration.lookupCredential('msal_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json'];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// 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`;
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: moveCollectionBody,
responseType: <any>responseType_,
withCredentials: this.configuration.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;
let localVarCredential: string | undefined;
// authentication (msal_auth) required
localVarCredential = this.configuration.lookupCredential('msal_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json'];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// 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`;
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: assetsOperationBody,
responseType: <any>responseType_,
withCredentials: this.configuration.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;
let localVarCredential: string | undefined;
// authentication (msal_auth) required
localVarCredential = this.configuration.lookupCredential('msal_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json'];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/alternative`;
return this.httpClient.request<AgravityInfoResponse>('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.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;
let localVarCredential: string | undefined;
// authentication (msal_auth) required
localVarCredential = this.configuration.lookupCredential('msal_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json'];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarPath = `/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 })}`;
return this.httpClient.request<AgravityInfoResponse>('delete', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
/**
* This endpoint returns the asset ai group entity
* @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 httpGetAiGroupEntityById(
requestParameters?: HttpGetAiGroupEntityByIdRequestParams,
observe?: 'body',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<AiGroupEntity>;
public httpGetAiGroupEntityById(
requestParameters?: HttpGetAiGroupEntityByIdRequestParams,
observe?: 'response',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpResponse<AiGroupEntity>>;
public httpGetAiGroupEntityById(
requestParameters?: HttpGetAiGroupEntityByIdRequestParams,
observe?: 'events',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpEvent<AiGroupEntity>>;
public httpGetAiGroupEntityById(
requestParameters?: HttpGetAiGroupEntityByIdRequestParams,
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 httpGetAiGroupEntityById.');
}
let localVarHeaders = this.defaultHeaders;
let localVarCredential: string | undefined;
// authentication (msal_auth) required
localVarCredential = this.configuration.lookupCredential('msal_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json'];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/aigroup`;
return this.httpClient.request<AiGroupEntity>('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.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 });
if (md5 !== undefined && md5 !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>md5, 'md5');
}
let localVarHeaders = this.defaultHeaders;
let localVarCredential: string | undefined;
// authentication (msal_auth) required
localVarCredential = this.configuration.lookupCredential('msal_auth');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json'];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarPath = `/assetscheck`;
return this.httpClient.request<Array<Asset>>('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
/**
* This endpoint 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?: { httpH