Select Git revision
api.ts

Benedikt Heinrichs authored and
Petar Hristov
committed
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
api.ts 10.06 KiB
/* tslint:disable */
/* eslint-disable */
/**
* Coscine.Api.Tree
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.6.4
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Configuration } from './configuration';
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';
/**
* TreeApi - axios parameter creator
* @export
*/
export const TreeApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @summary This method retrieves the metadata
* @param {string} resourceId Id of a resource
* @param {string} [path] Path to the file
* @param {string} [mimeType] Requested MimeType of the metadata
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
treeGetMetadataWithParameter: async (resourceId: string, path?: string, mimeType?: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'resourceId' is not null or undefined
assertParamExists('treeGetMetadataWithParameter', 'resourceId', resourceId)
const localVarPath = `/Tree/{resourceId}`
.replace(`{${"resourceId"}}`, encodeURIComponent(String(resourceId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication JWT token required
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
if (path !== undefined) {
localVarQueryParameter['path'] = path;
}
if (mimeType !== undefined) {
localVarQueryParameter['mimeType'] = mimeType;
}
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary This method stores the metadata of the file
* @param {string} resourceId Id of the resource
* @param {string} [path] Path to the file
* @param {string} [mimeType] Requested MimeType of the metadata
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
treeStoreMetadataForFileWithParameter: async (resourceId: string, path?: string, mimeType?: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'resourceId' is not null or undefined
assertParamExists('treeStoreMetadataForFileWithParameter', 'resourceId', resourceId)
const localVarPath = `/Tree/{resourceId}`
.replace(`{${"resourceId"}}`, encodeURIComponent(String(resourceId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication JWT token required
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
if (path !== undefined) {
localVarQueryParameter['path'] = path;
}
if (mimeType !== undefined) {
localVarQueryParameter['mimeType'] = mimeType;
}
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* TreeApi - functional programming interface
* @export
*/
export const TreeApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = TreeApiAxiosParamCreator(configuration)
return {
/**
*
* @summary This method retrieves the metadata
* @param {string} resourceId Id of a resource
* @param {string} [path] Path to the file
* @param {string} [mimeType] Requested MimeType of the metadata
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async treeGetMetadataWithParameter(resourceId: string, path?: string, mimeType?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.treeGetMetadataWithParameter(resourceId, path, mimeType, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary This method stores the metadata of the file
* @param {string} resourceId Id of the resource
* @param {string} [path] Path to the file
* @param {string} [mimeType] Requested MimeType of the metadata
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async treeStoreMetadataForFileWithParameter(resourceId: string, path?: string, mimeType?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.treeStoreMetadataForFileWithParameter(resourceId, path, mimeType, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
}
};
/**
* TreeApi - factory interface
* @export
*/
export const TreeApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = TreeApiFp(configuration)
return {
/**
*
* @summary This method retrieves the metadata
* @param {string} resourceId Id of a resource
* @param {string} [path] Path to the file
* @param {string} [mimeType] Requested MimeType of the metadata
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
treeGetMetadataWithParameter(resourceId: string, path?: string, mimeType?: string, options?: any): AxiosPromise<any> {
return localVarFp.treeGetMetadataWithParameter(resourceId, path, mimeType, options).then((request) => request(axios, basePath));
},
/**
*
* @summary This method stores the metadata of the file
* @param {string} resourceId Id of the resource
* @param {string} [path] Path to the file
* @param {string} [mimeType] Requested MimeType of the metadata
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
treeStoreMetadataForFileWithParameter(resourceId: string, path?: string, mimeType?: string, options?: any): AxiosPromise<any> {
return localVarFp.treeStoreMetadataForFileWithParameter(resourceId, path, mimeType, options).then((request) => request(axios, basePath));
},
};
};
/**
* TreeApi - object-oriented interface
* @export
* @class TreeApi
* @extends {BaseAPI}
*/
export class TreeApi extends BaseAPI {
/**
*
* @summary This method retrieves the metadata
* @param {string} resourceId Id of a resource
* @param {string} [path] Path to the file
* @param {string} [mimeType] Requested MimeType of the metadata
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof TreeApi
*/
public treeGetMetadataWithParameter(resourceId: string, path?: string, mimeType?: string, options?: any) {
return TreeApiFp(this.configuration).treeGetMetadataWithParameter(resourceId, path, mimeType, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary This method stores the metadata of the file
* @param {string} resourceId Id of the resource
* @param {string} [path] Path to the file
* @param {string} [mimeType] Requested MimeType of the metadata
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof TreeApi
*/
public treeStoreMetadataForFileWithParameter(resourceId: string, path?: string, mimeType?: string, options?: any) {
return TreeApiFp(this.configuration).treeStoreMetadataForFileWithParameter(resourceId, path, mimeType, options).then((request) => request(this.axios, this.basePath));
}
}