Skip to content
Snippets Groups Projects
Select Git revision
  • 785726dd5f35dfd45561515ef119ff3b4ea9f040
  • main default protected
  • dev protected
  • Issue/3133-subProjectsChanges
  • Issue/2489-addNotificationManagement
  • Issue/3085-useNewApiClient
  • Issue/3043-DataStorageNrwResource
  • Issue/3011-maintenanceMode
  • Issue/2446-addingResponsibleOrganization
  • Issue/2900-removeInsituteField
  • Issue/2981-dataPubInDb
  • Issue/2881-messageController
  • Issue/2921-changesToDataPublicationFeature
  • Issue/2926-regAppLogin
  • Issue/2672-fixSfbPidPointing
  • Issue/2875-devcontainer
  • Issue/2401-advisoryServiceUI2
  • Issue/2445-extractedMetadata
  • Issue/2829-useHrefProperty
  • Issue/xxxx-configurableApiHostname
  • Issue/2627-addPidRecord
  • v3.18.0
  • v3.17.0
  • v3.16.0
  • v3.15.0
  • v3.14.0
  • v3.13.0
  • v3.12.0
  • v3.11.0
  • v3.10.0
  • v3.9.0
  • v3.8.0
  • v3.7.0
  • v3.6.0
  • v3.5.0
  • v3.4.3
  • v3.4.2
  • v3.4.1
  • v3.4.0
  • v3.3.2-package.0
  • v3.3.1
41 results

api.ts

Blame
  • Petar Hristov's avatar
    Petar Hristov authored and Sirieam Marie Hunke committed
    3b19852a
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    api.ts 13.38 KiB
    /* tslint:disable */
    /* eslint-disable */
    /**
     * Coscine.Api.Blob
     * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
     *
     * The version of the OpenAPI document: 3.0.0
     * 
     *
     * 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';
    
    
    /**
     * BlobApi - axios parameter creator
     * @export
     */
    export const BlobApiAxiosParamCreator = function (configuration?: Configuration) {
        return {
            /**
             * 
             * @summary This method deletes a given file
             * @param {string} resourceId Id of the resource 
             * @param {string} [path] Path to the file
             * @param {*} [options] Override http request option.
             * @throws {RequiredError}
             */
            blobDeleteFileWithParameter: async (resourceId: string, path?: string, options: any = {}): Promise<RequestArgs> => {
                // verify required parameter 'resourceId' is not null or undefined
                assertParamExists('blobDeleteFileWithParameter', 'resourceId', resourceId)
                const localVarPath = `/Blob/{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: 'DELETE', ...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;
                }
    
    
        
                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 checks if the given file exists and returns it             
             * @param {string} resourceId Id of the resource
             * @param {string} [path] Path to the file 
             * @param {*} [options] Override http request option.
             * @throws {RequiredError}
             */
            blobGetFileWithParameter: async (resourceId: string, path?: string, options: any = {}): Promise<RequestArgs> => {
                // verify required parameter 'resourceId' is not null or undefined
                assertParamExists('blobGetFileWithParameter', 'resourceId', resourceId)
                const localVarPath = `/Blob/{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;
                }
    
    
        
                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 uploads a given File
             * @param {string} resourceId Id of the resource 
             * @param {string} [path] Path to the file
             * @param {Array<any>} [files] 
             * @param {*} [options] Override http request option.
             * @throws {RequiredError}
             */
            blobUploadFileWithParameter: async (resourceId: string, path?: string, files?: Array<any>, options: any = {}): Promise<RequestArgs> => {
                // verify required parameter 'resourceId' is not null or undefined
                assertParamExists('blobUploadFileWithParameter', 'resourceId', resourceId)
                const localVarPath = `/Blob/{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;
                const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
    
                // authentication JWT token required
                await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
    
                if (path !== undefined) {
                    localVarQueryParameter['path'] = path;
                }
    
                if (files) {
                    files.forEach((element) => {
                        localVarFormParams.append('files', element as any);
                    })
                }
    
        
        
                localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
        
                setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
                let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
                localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
                localVarRequestOptions.data = localVarFormParams;
    
                return {
                    url: toPathString(localVarUrlObj),
                    options: localVarRequestOptions,
                };
            },
        }
    };
    
    /**
     * BlobApi - functional programming interface
     * @export
     */
    export const BlobApiFp = function(configuration?: Configuration) {
        const localVarAxiosParamCreator = BlobApiAxiosParamCreator(configuration)
        return {
            /**
             * 
             * @summary This method deletes a given file
             * @param {string} resourceId Id of the resource 
             * @param {string} [path] Path to the file
             * @param {*} [options] Override http request option.
             * @throws {RequiredError}
             */
            async blobDeleteFileWithParameter(resourceId: string, path?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
                const localVarAxiosArgs = await localVarAxiosParamCreator.blobDeleteFileWithParameter(resourceId, path, options);
                return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
            },
            /**
             * 
             * @summary This method checks if the given file exists and returns it             
             * @param {string} resourceId Id of the resource
             * @param {string} [path] Path to the file 
             * @param {*} [options] Override http request option.
             * @throws {RequiredError}
             */
            async blobGetFileWithParameter(resourceId: string, path?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
                const localVarAxiosArgs = await localVarAxiosParamCreator.blobGetFileWithParameter(resourceId, path, options);
                return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
            },
            /**
             * 
             * @summary This method uploads a given File
             * @param {string} resourceId Id of the resource 
             * @param {string} [path] Path to the file
             * @param {Array<any>} [files] 
             * @param {*} [options] Override http request option.
             * @throws {RequiredError}
             */
            async blobUploadFileWithParameter(resourceId: string, path?: string, files?: Array<any>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
                const localVarAxiosArgs = await localVarAxiosParamCreator.blobUploadFileWithParameter(resourceId, path, files, options);
                return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
            },
        }
    };
    
    /**
     * BlobApi - factory interface
     * @export
     */
    export const BlobApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
        const localVarFp = BlobApiFp(configuration)
        return {
            /**
             * 
             * @summary This method deletes a given file
             * @param {string} resourceId Id of the resource 
             * @param {string} [path] Path to the file
             * @param {*} [options] Override http request option.
             * @throws {RequiredError}
             */
            blobDeleteFileWithParameter(resourceId: string, path?: string, options?: any): AxiosPromise<any> {
                return localVarFp.blobDeleteFileWithParameter(resourceId, path, options).then((request) => request(axios, basePath));
            },
            /**
             * 
             * @summary This method checks if the given file exists and returns it             
             * @param {string} resourceId Id of the resource
             * @param {string} [path] Path to the file 
             * @param {*} [options] Override http request option.
             * @throws {RequiredError}
             */
            blobGetFileWithParameter(resourceId: string, path?: string, options?: any): AxiosPromise<any> {
                return localVarFp.blobGetFileWithParameter(resourceId, path, options).then((request) => request(axios, basePath));
            },
            /**
             * 
             * @summary This method uploads a given File
             * @param {string} resourceId Id of the resource 
             * @param {string} [path] Path to the file
             * @param {Array<any>} [files] 
             * @param {*} [options] Override http request option.
             * @throws {RequiredError}
             */
            blobUploadFileWithParameter(resourceId: string, path?: string, files?: Array<any>, options?: any): AxiosPromise<any> {
                return localVarFp.blobUploadFileWithParameter(resourceId, path, files, options).then((request) => request(axios, basePath));
            },
        };
    };
    
    /**
     * BlobApi - object-oriented interface
     * @export
     * @class BlobApi
     * @extends {BaseAPI}
     */
    export class BlobApi extends BaseAPI {
        /**
         * 
         * @summary This method deletes a given file
         * @param {string} resourceId Id of the resource 
         * @param {string} [path] Path to the file
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         * @memberof BlobApi
         */
        public blobDeleteFileWithParameter(resourceId: string, path?: string, options?: any) {
            return BlobApiFp(this.configuration).blobDeleteFileWithParameter(resourceId, path, options).then((request) => request(this.axios, this.basePath));
        }
    
        /**
         * 
         * @summary This method checks if the given file exists and returns it             
         * @param {string} resourceId Id of the resource
         * @param {string} [path] Path to the file 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         * @memberof BlobApi
         */
        public blobGetFileWithParameter(resourceId: string, path?: string, options?: any) {
            return BlobApiFp(this.configuration).blobGetFileWithParameter(resourceId, path, options).then((request) => request(this.axios, this.basePath));
        }
    
        /**
         * 
         * @summary This method uploads a given File
         * @param {string} resourceId Id of the resource 
         * @param {string} [path] Path to the file
         * @param {Array<any>} [files] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         * @memberof BlobApi
         */
        public blobUploadFileWithParameter(resourceId: string, path?: string, files?: Array<any>, options?: any) {
            return BlobApiFp(this.configuration).blobUploadFileWithParameter(resourceId, path, files, options).then((request) => request(this.axios, this.basePath));
        }
    }