@agravity/private
Version:
The Agravity GlobalDAM API which allowes authenticated user to access the Agravity GlobalDAM Backend
1,131 lines (1,029 loc) • 57 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 { Collection } from '../model/collection.agravity';
// @ts-ignore
import { EntityListResult } from '../model/entityListResult.agravity';
// @ts-ignore
import { EntityNamesRequest } from '../model/entityNamesRequest.agravity';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { AgravityConfiguration } from '../configuration';
export interface HttpCollectionsCreateRequestParams {
/** The ID of the collection type where this collections should be assigned. */
collectiontypeid: string;
/** This endpoint creates a unique collection ID and adds the information to the database. */
collection: Collection;
/** 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 HttpCollectionsDeleteByIdRequestParams {
/** The ID of the collection. */
id: string;
/** If this is true the assigned assets are set to delete as well. */
deleteassets?: boolean;
}
export interface HttpCollectionsGetRequestParams {
/** The ID of the collection type, where these collections should come from. */
collectiontypeid?: string;
/** The hierarchy level of collections which should be returned. */
level?: number;
/** The ID of the parent collection which should be queried. (No collectiontypeid is required) */
parentid?: string;
/** This limits the fields which are returned, separated by comma (\',\'). */
fields?: string;
/** The items can be extended to fully filled items. */
items?: boolean;
/** 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 HttpCollectionsGetByIdRequestParams {
/** The ID of the collection. */
id: string;
/** This limits the fields which are returned, separated by comma (\',\'). */
fields?: string;
/** The items can be extended to fully filled items. */
items?: boolean;
/** 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 HttpCollectionsGetDescendantsTreeOfIdRequestParams {
/** The ID of the collection. */
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 HttpCollectionsGetTreeAncestorsOfIdRequestParams {
/** The ID of the collection. */
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 HttpCollectionsUpdateByIdRequestParams {
/** The ID of the collection. */
id: string;
/** The body has to be a valid collection json.Not fitting properties are ignored. */
collection: Collection;
/** 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 HttpGetCollectionPreviewsByIdRequestParams {
/** The ID of the collection. */
id: string;
}
export interface HttpPatchCollectionRepairRequestParams {
/** The ID of the collection. */
id: string;
}
export interface HttpPostCollectionsGetByNamesRequestParams {
/** An object with the array of strings with names of the collections to fetch. */
entityNamesRequest: EntityNamesRequest;
}
export interface HttpRestoreCollectionRequestParams {
/** The ID of the collection. */
id: string;
/** The point in time to which to restore the collection to. */
pointintime: string;
}
@Injectable({
providedIn: 'root'
})
export class CollectionManagementService {
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 creates a unique collection ID and adds the information to the database.
* @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 httpCollectionsCreate(
requestParameters?: HttpCollectionsCreateRequestParams,
observe?: 'body',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<Collection>;
public httpCollectionsCreate(
requestParameters?: HttpCollectionsCreateRequestParams,
observe?: 'response',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpResponse<Collection>>;
public httpCollectionsCreate(
requestParameters?: HttpCollectionsCreateRequestParams,
observe?: 'events',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpEvent<Collection>>;
public httpCollectionsCreate(
requestParameters?: HttpCollectionsCreateRequestParams,
observe: any = 'body',
reportProgress: boolean = false,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<any> {
const collectiontypeid = requestParameters?.collectiontypeid;
if (collectiontypeid === null || collectiontypeid === undefined) {
throw new Error('Required parameter collectiontypeid was null or undefined when calling httpCollectionsCreate.');
}
const collection = requestParameters?.collection;
if (collection === null || collection === undefined) {
throw new Error('Required parameter collection was null or undefined when calling httpCollectionsCreate.');
}
const translations = requestParameters?.translations;
const acceptLanguage = requestParameters?.acceptLanguage;
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (collectiontypeid !== undefined && collectiontypeid !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>collectiontypeid, 'collectiontypeid');
}
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;
}
// 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 = `/collections`;
return this.httpClient.request<Collection>('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: collection,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
/**
* This endpoint deletes the collection with the given ID (and their siblings).
* @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 httpCollectionsDeleteById(
requestParameters?: HttpCollectionsDeleteByIdRequestParams,
observe?: 'body',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<any>;
public httpCollectionsDeleteById(
requestParameters?: HttpCollectionsDeleteByIdRequestParams,
observe?: 'response',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpResponse<any>>;
public httpCollectionsDeleteById(
requestParameters?: HttpCollectionsDeleteByIdRequestParams,
observe?: 'events',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpEvent<any>>;
public httpCollectionsDeleteById(
requestParameters?: HttpCollectionsDeleteByIdRequestParams,
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 httpCollectionsDeleteById.');
}
const deleteassets = requestParameters?.deleteassets;
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (deleteassets !== undefined && deleteassets !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>deleteassets, 'deleteassets');
}
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 = `/collections/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
return this.httpClient.request<any>('delete', `${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 lists all the collections, which are stored in the database and not deleted (status \"A\")
* @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 httpCollectionsGet(
requestParameters?: HttpCollectionsGetRequestParams,
observe?: 'body',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<Array<Collection>>;
public httpCollectionsGet(
requestParameters?: HttpCollectionsGetRequestParams,
observe?: 'response',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpResponse<Array<Collection>>>;
public httpCollectionsGet(
requestParameters?: HttpCollectionsGetRequestParams,
observe?: 'events',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpEvent<Array<Collection>>>;
public httpCollectionsGet(
requestParameters?: HttpCollectionsGetRequestParams,
observe: any = 'body',
reportProgress: boolean = false,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<any> {
const collectiontypeid = requestParameters?.collectiontypeid;
const level = requestParameters?.level;
const parentid = requestParameters?.parentid;
const fields = requestParameters?.fields;
const items = requestParameters?.items;
const translations = requestParameters?.translations;
const acceptLanguage = requestParameters?.acceptLanguage;
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (collectiontypeid !== undefined && collectiontypeid !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>collectiontypeid, 'collectiontypeid');
}
if (level !== undefined && level !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>level, 'level');
}
if (parentid !== undefined && parentid !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>parentid, 'parentid');
}
if (fields !== undefined && fields !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>fields, 'fields');
}
if (items !== undefined && items !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>items, 'items');
}
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 = `/collections`;
return this.httpClient.request<Array<Collection>>('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
/**
* This endpoint returns one single collection (from ID). This will include all specific properties from collection type.
* @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 httpCollectionsGetById(
requestParameters?: HttpCollectionsGetByIdRequestParams,
observe?: 'body',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<Collection>;
public httpCollectionsGetById(
requestParameters?: HttpCollectionsGetByIdRequestParams,
observe?: 'response',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpResponse<Collection>>;
public httpCollectionsGetById(
requestParameters?: HttpCollectionsGetByIdRequestParams,
observe?: 'events',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpEvent<Collection>>;
public httpCollectionsGetById(
requestParameters?: HttpCollectionsGetByIdRequestParams,
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 httpCollectionsGetById.');
}
const fields = requestParameters?.fields;
const items = requestParameters?.items;
const translations = requestParameters?.translations;
const acceptLanguage = requestParameters?.acceptLanguage;
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (fields !== undefined && fields !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>fields, 'fields');
}
if (items !== undefined && items !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>items, 'items');
}
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 = `/collections/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
return this.httpClient.request<Collection>('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
/**
* This endpoint returns the complete tree of descendants from a single collection.
* @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 httpCollectionsGetDescendantsTreeOfId(
requestParameters?: HttpCollectionsGetDescendantsTreeOfIdRequestParams,
observe?: 'body',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<Array<Collection>>;
public httpCollectionsGetDescendantsTreeOfId(
requestParameters?: HttpCollectionsGetDescendantsTreeOfIdRequestParams,
observe?: 'response',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpResponse<Array<Collection>>>;
public httpCollectionsGetDescendantsTreeOfId(
requestParameters?: HttpCollectionsGetDescendantsTreeOfIdRequestParams,
observe?: 'events',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpEvent<Array<Collection>>>;
public httpCollectionsGetDescendantsTreeOfId(
requestParameters?: HttpCollectionsGetDescendantsTreeOfIdRequestParams,
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 httpCollectionsGetDescendantsTreeOfId.');
}
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 = `/collections/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/descendants`;
return this.httpClient.request<Array<Collection>>('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
/**
* This endpoint returns the complete tree of ancestors from a single collection.
* @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 httpCollectionsGetTreeAncestorsOfId(
requestParameters?: HttpCollectionsGetTreeAncestorsOfIdRequestParams,
observe?: 'body',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<Array<Collection>>;
public httpCollectionsGetTreeAncestorsOfId(
requestParameters?: HttpCollectionsGetTreeAncestorsOfIdRequestParams,
observe?: 'response',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpResponse<Array<Collection>>>;
public httpCollectionsGetTreeAncestorsOfId(
requestParameters?: HttpCollectionsGetTreeAncestorsOfIdRequestParams,
observe?: 'events',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpEvent<Array<Collection>>>;
public httpCollectionsGetTreeAncestorsOfId(
requestParameters?: HttpCollectionsGetTreeAncestorsOfIdRequestParams,
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 httpCollectionsGetTreeAncestorsOfId.');
}
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 = `/collections/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/ancestors`;
return this.httpClient.request<Array<Collection>>('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 updates the collection. Specific properties could be updated.
* @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 httpCollectionsUpdateById(
requestParameters?: HttpCollectionsUpdateByIdRequestParams,
observe?: 'body',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<Collection>;
public httpCollectionsUpdateById(
requestParameters?: HttpCollectionsUpdateByIdRequestParams,
observe?: 'response',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpResponse<Collection>>;
public httpCollectionsUpdateById(
requestParameters?: HttpCollectionsUpdateByIdRequestParams,
observe?: 'events',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpEvent<Collection>>;
public httpCollectionsUpdateById(
requestParameters?: HttpCollectionsUpdateByIdRequestParams,
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 httpCollectionsUpdateById.');
}
const collection = requestParameters?.collection;
if (collection === null || collection === undefined) {
throw new Error('Required parameter collection was null or undefined when calling httpCollectionsUpdateById.');
}
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;
}
// 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 = `/collections/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
return this.httpClient.request<Collection>('post', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
body: collection,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
/**
* This endpoint returns a generated thumbnail as a preview of the containing assets.
* @param requestParameters
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public httpGetCollectionPreviewsById(
requestParameters?: HttpGetCollectionPreviewsByIdRequestParams,
observe?: 'body',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'image/png'; context?: HttpContext; transferCache?: boolean }
): Observable<string>;
public httpGetCollectionPreviewsById(
requestParameters?: HttpGetCollectionPreviewsByIdRequestParams,
observe?: 'response',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'image/png'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpResponse<string>>;
public httpGetCollectionPreviewsById(
requestParameters?: HttpGetCollectionPreviewsByIdRequestParams,
observe?: 'events',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'image/png'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpEvent<string>>;
public httpGetCollectionPreviewsById(
requestParameters?: HttpGetCollectionPreviewsByIdRequestParams,
observe: any = 'body',
reportProgress: boolean = false,
options?: { httpHeaderAccept?: 'image/png'; 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 httpGetCollectionPreviewsById.');
}
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/png'];
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 = `/collections/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/previews`;
return this.httpClient.request<string>('get', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
/**
* This endpoint repairs the items of an collection. Checks all collection type items and assign it to collection.
* @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 httpPatchCollectionRepair(
requestParameters?: HttpPatchCollectionRepairRequestParams,
observe?: 'body',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<AgravityInfoResponse>;
public httpPatchCollectionRepair(
requestParameters?: HttpPatchCollectionRepairRequestParams,
observe?: 'response',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpResponse<AgravityInfoResponse>>;
public httpPatchCollectionRepair(
requestParameters?: HttpPatchCollectionRepairRequestParams,
observe?: 'events',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpEvent<AgravityInfoResponse>>;
public httpPatchCollectionRepair(
requestParameters?: HttpPatchCollectionRepairRequestParams,
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 httpPatchCollectionRepair.');
}
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 = `/collections/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/repair`;
return this.httpClient.request<AgravityInfoResponse>('patch', `${this.configuration.basePath}${localVarPath}`, {
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
});
}
/**
* This endpoint fetches all collections based on names which comes from an array inside the POST request body and return another list of EntityIdName objects and an array of strings with the names which could not be found.
* @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 httpPostCollectionsGetByNames(
requestParameters?: HttpPostCollectionsGetByNamesRequestParams,
observe?: 'body',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<EntityListResult>;
public httpPostCollectionsGetByNames(
requestParameters?: HttpPostCollectionsGetByNamesRequestParams,
observe?: 'response',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpResponse<EntityListResult>>;
public httpPostCollectionsGetByNames(
requestParameters?: HttpPostCollectionsGetByNamesRequestParams,
observe?: 'events',
reportProgress?: boolean,
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
): Observable<HttpEvent<EntityListResult>>;
public httpPostCollectionsGetByNames(
requestParameters?: HttpPostCollectionsGetByNamesRequestParams,
observe: any = 'body',
reportProgress: boolean