Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • coscine/frontend/libraries/api-client
1 result
Select Git revision
Show changes
Commits on Source (6)
Showing
with 582 additions and 588 deletions
{
"name": "@coscine/api-client",
"version": "2.2.0",
"version": "2.3.0",
"description": "This project contains the generated api connection classes.",
"keywords": [
"coscine",
......@@ -129,5 +129,5 @@
"dependencies": {
"axios": "^0.21.1"
},
"packageManager": "yarn@3.2.1"
"packageManager": "yarn@3.2.2"
}
......@@ -4,7 +4,7 @@
* Coscine.Api.Admin
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.5.4
* The version of the OpenAPI document: 2.6.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
......@@ -24,77 +24,111 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr
/**
* Retuned when searching for a project. Contains basic informations and quotas.
* @export
* @interface ProjectObject
* @interface AdminProjectObject
*/
export interface ProjectObject {
export interface AdminProjectObject {
/**
* Projectname (full project name)
* Project Id
* @type {string}
* @memberof ProjectObject
* @memberof AdminProjectObject
*/
name?: string | null;
id?: string;
/**
* Shortname (display name)
* Project Name (full project name)
* @type {string}
* @memberof ProjectObject
* @memberof AdminProjectObject
*/
shortName?: string | null;
projectName?: string | null;
/**
* GUID (project id)
* Project Display Name
* @type {string}
* @memberof ProjectObject
* @memberof AdminProjectObject
*/
guid?: string;
displayName?: string | null;
/**
* List of the project quotas (ProjectQuotaObject)
* @type {Array<ProjectQuotaObject>}
* @memberof ProjectObject
* List of the admin quotas (AdminQuotaReturnObject)
* @type {Array<AdminQuotaReturnObject>}
* @memberof AdminProjectObject
*/
quotas?: Array<ProjectQuotaObject> | null;
quotas?: Array<AdminQuotaReturnObject> | null;
}
/**
* Returned when searching for a project, as part of the ProjectQbect. Contains quota informations.
* Returned when searching for a project, as part of the AdminProjectObject. Contains quota informations.
* @export
* @interface ProjectQuotaObject
* @interface AdminQuotaReturnObject
*/
export interface ProjectQuotaObject {
export interface AdminQuotaReturnObject {
/**
* Id of the quota.
* Quota relation id (See Database, Table \'ProjectQuotas\', Column \'RelationId\').
* @type {string}
* @memberof ProjectQuotaObject
* @memberof AdminQuotaReturnObject
*/
quotaId?: string;
relationId?: string;
/**
* Which resourceType the quota is referencing.
* Which resource type the quota is referring to.
* @type {string}
* @memberof ProjectQuotaObject
* @memberof AdminQuotaReturnObject
*/
resourceType?: string | null;
/**
* The quota value.
* @type {number}
* @memberof ProjectQuotaObject
* How much space is used by all files in all resources in total [Bytes].
* @type {QuotaDimObject}
* @memberof AdminQuotaReturnObject
*/
quota?: number;
totalUsed?: QuotaDimObject | null;
/**
* The MaxQuota value.
* @type {number}
* @memberof ProjectQuotaObject
* How much space is reserved by resources in total [GiB]. Is equal to the sum of all resource quota reserved values.
* @type {QuotaDimObject}
* @memberof AdminQuotaReturnObject
*/
maxQuota?: number;
totalReserved?: QuotaDimObject | null;
/**
* How much space is used by the resource (rounded up and in gb).
* @type {number}
* @memberof ProjectQuotaObject
* How much space is currently allocated and is available to be taken by resources [GiB] (See Database, Table \'ProjectQuotas\', Column \'Quota\').
* @type {QuotaDimObject}
* @memberof AdminQuotaReturnObject
*/
used?: number | null;
allocated?: QuotaDimObject | null;
/**
* How much space is availabe to be taken by resource (in gb).
* How much maximum space is possible to be taken by resources [GiB] (See Database, Table \'ProjectQuotas\', Column \'MaxQuota\').
* @type {QuotaDimObject}
* @memberof AdminQuotaReturnObject
*/
maximum?: QuotaDimObject | null;
}
/**
*
* @export
* @interface QuotaDimObject
*/
export interface QuotaDimObject {
/**
*
* @type {number}
* @memberof ProjectQuotaObject
* @memberof QuotaDimObject
*/
allocated?: number | null;
value?: number;
/**
*
* @type {QuotaUnit}
* @memberof QuotaDimObject
*/
unit?: QuotaUnit;
}
/**
*
* @export
* @enum {string}
*/
export enum QuotaUnit {
Byte = 'https://qudt.org/vocab/unit/BYTE',
KibiByte = 'https://qudt.org/vocab/unit/KibiBYTE',
MebiByte = 'https://qudt.org/vocab/unit/MebiBYTE',
GibiByte = 'https://qudt.org/vocab/unit/GibiBYTE',
TebiByte = 'https://qudt.org/vocab/unit/TebiBYTE',
PebiByte = 'https://qudt.org/vocab/unit/PebiBYTE'
}
/**
* Data send to update the project quota.
* @export
......@@ -102,17 +136,11 @@ export interface ProjectQuotaObject {
*/
export interface UpdateQuotaParameterObject {
/**
* The id (Guid) of the quota.
* @type {string}
* @memberof UpdateQuotaParameterObject
*/
quotaId?: string;
/**
* The new quota value.
* The new maximum project quota value.
* @type {number}
* @memberof UpdateQuotaParameterObject
*/
quota?: number;
maximumGiB?: number;
}
/**
......@@ -124,7 +152,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration
/**
*
* @summary Find the project related to the projectString(GUID or slug)
* @param {string} projectString Either the id (GUID) of the project or the slug.
* @param {string} projectString The project id (GUID) or slug (from URL).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
......@@ -160,15 +188,23 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration
},
/**
*
* @summary Update the project quota
* @param {UpdateQuotaParameterObject} updateQuotaParameterObject JSON object for updating quota.
* @summary Update a project maximum and allocated quota
* @param {string} projectId Id of the project
* @param {string} resourceTypeId Id of the resource type
* @param {UpdateQuotaParameterObject} updateQuotaParameterObject JSON object for updating the project maximum and allocated quota.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
adminUpdateQuota: async (updateQuotaParameterObject: UpdateQuotaParameterObject, options: any = {}): Promise<RequestArgs> => {
adminUpdateQuota: async (projectId: string, resourceTypeId: string, updateQuotaParameterObject: UpdateQuotaParameterObject, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'projectId' is not null or undefined
assertParamExists('adminUpdateQuota', 'projectId', projectId)
// verify required parameter 'resourceTypeId' is not null or undefined
assertParamExists('adminUpdateQuota', 'resourceTypeId', resourceTypeId)
// verify required parameter 'updateQuotaParameterObject' is not null or undefined
assertParamExists('adminUpdateQuota', 'updateQuotaParameterObject', updateQuotaParameterObject)
const localVarPath = `/Admin`;
const localVarPath = `/Admin/{projectId}/{resourceTypeId}`
.replace(`{${"projectId"}}`, encodeURIComponent(String(projectId)))
.replace(`{${"resourceTypeId"}}`, encodeURIComponent(String(resourceTypeId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
......@@ -176,7 +212,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
......@@ -210,23 +246,25 @@ export const AdminApiFp = function(configuration?: Configuration) {
/**
*
* @summary Find the project related to the projectString(GUID or slug)
* @param {string} projectString Either the id (GUID) of the project or the slug.
* @param {string} projectString The project id (GUID) or slug (from URL).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async adminGetProject(projectString: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProjectObject>> {
async adminGetProject(projectString: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminProjectObject>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.adminGetProject(projectString, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary Update the project quota
* @param {UpdateQuotaParameterObject} updateQuotaParameterObject JSON object for updating quota.
* @summary Update a project maximum and allocated quota
* @param {string} projectId Id of the project
* @param {string} resourceTypeId Id of the resource type
* @param {UpdateQuotaParameterObject} updateQuotaParameterObject JSON object for updating the project maximum and allocated quota.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async adminUpdateQuota(updateQuotaParameterObject: UpdateQuotaParameterObject, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.adminUpdateQuota(updateQuotaParameterObject, options);
async adminUpdateQuota(projectId: string, resourceTypeId: string, updateQuotaParameterObject: UpdateQuotaParameterObject, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.adminUpdateQuota(projectId, resourceTypeId, updateQuotaParameterObject, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
}
......@@ -242,22 +280,24 @@ export const AdminApiFactory = function (configuration?: Configuration, basePath
/**
*
* @summary Find the project related to the projectString(GUID or slug)
* @param {string} projectString Either the id (GUID) of the project or the slug.
* @param {string} projectString The project id (GUID) or slug (from URL).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
adminGetProject(projectString: string, options?: any): AxiosPromise<ProjectObject> {
adminGetProject(projectString: string, options?: any): AxiosPromise<AdminProjectObject> {
return localVarFp.adminGetProject(projectString, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Update the project quota
* @param {UpdateQuotaParameterObject} updateQuotaParameterObject JSON object for updating quota.
* @summary Update a project maximum and allocated quota
* @param {string} projectId Id of the project
* @param {string} resourceTypeId Id of the resource type
* @param {UpdateQuotaParameterObject} updateQuotaParameterObject JSON object for updating the project maximum and allocated quota.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
adminUpdateQuota(updateQuotaParameterObject: UpdateQuotaParameterObject, options?: any): AxiosPromise<any> {
return localVarFp.adminUpdateQuota(updateQuotaParameterObject, options).then((request) => request(axios, basePath));
adminUpdateQuota(projectId: string, resourceTypeId: string, updateQuotaParameterObject: UpdateQuotaParameterObject, options?: any): AxiosPromise<any> {
return localVarFp.adminUpdateQuota(projectId, resourceTypeId, updateQuotaParameterObject, options).then((request) => request(axios, basePath));
},
};
};
......@@ -272,7 +312,7 @@ export class AdminApi extends BaseAPI {
/**
*
* @summary Find the project related to the projectString(GUID or slug)
* @param {string} projectString Either the id (GUID) of the project or the slug.
* @param {string} projectString The project id (GUID) or slug (from URL).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AdminApi
......@@ -283,14 +323,16 @@ export class AdminApi extends BaseAPI {
/**
*
* @summary Update the project quota
* @param {UpdateQuotaParameterObject} updateQuotaParameterObject JSON object for updating quota.
* @summary Update a project maximum and allocated quota
* @param {string} projectId Id of the project
* @param {string} resourceTypeId Id of the resource type
* @param {UpdateQuotaParameterObject} updateQuotaParameterObject JSON object for updating the project maximum and allocated quota.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AdminApi
*/
public adminUpdateQuota(updateQuotaParameterObject: UpdateQuotaParameterObject, options?: any) {
return AdminApiFp(this.configuration).adminUpdateQuota(updateQuotaParameterObject, options).then((request) => request(this.axios, this.basePath));
public adminUpdateQuota(projectId: string, resourceTypeId: string, updateQuotaParameterObject: UpdateQuotaParameterObject, options?: any) {
return AdminApiFp(this.configuration).adminUpdateQuota(projectId, resourceTypeId, updateQuotaParameterObject, options).then((request) => request(this.axios, this.basePath));
}
}
......
......@@ -4,7 +4,7 @@
* Coscine.Api.Admin
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.5.4
* The version of the OpenAPI document: 2.6.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
......
......@@ -4,7 +4,7 @@
* Coscine.Api.Admin
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.5.4
* The version of the OpenAPI document: 2.6.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
......
......@@ -4,7 +4,7 @@
* Coscine.Api.Admin
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.5.4
* The version of the OpenAPI document: 2.6.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
......
......@@ -4,7 +4,7 @@
* Coscine.Api.Admin
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.5.4
* The version of the OpenAPI document: 2.6.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
......
......@@ -4,7 +4,7 @@
* Coscine.Api.Blob
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.7.0
* The version of the OpenAPI document: 2.8.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
......@@ -103,43 +103,6 @@ export const BlobApiAxiosParamCreator = function (configuration?: Configuration)
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 returns the amount of allocated space for the given resource
* @param {string} resourceId Id of a resource
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
blobGetQuota: async (resourceId: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'resourceId' is not null or undefined
assertParamExists('blobGetQuota', 'resourceId', resourceId)
const localVarPath = `/Blob/{resourceId}/quota`
.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)
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
......@@ -236,17 +199,6 @@ export const BlobApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.blobGetFileWithParameter(resourceId, path, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary This method returns the amount of allocated space for the given resource
* @param {string} resourceId Id of a resource
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async blobGetQuota(resourceId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.blobGetQuota(resourceId, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary This method uploads a given File
......@@ -292,16 +244,6 @@ export const BlobApiFactory = function (configuration?: Configuration, basePath?
blobGetFileWithParameter(resourceId: string, path?: string, options?: any): AxiosPromise<any> {
return localVarFp.blobGetFileWithParameter(resourceId, path, options).then((request) => request(axios, basePath));
},
/**
*
* @summary This method returns the amount of allocated space for the given resource
* @param {string} resourceId Id of a resource
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
blobGetQuota(resourceId: string, options?: any): AxiosPromise<any> {
return localVarFp.blobGetQuota(resourceId, options).then((request) => request(axios, basePath));
},
/**
*
* @summary This method uploads a given File
......@@ -350,18 +292,6 @@ export class BlobApi extends BaseAPI {
return BlobApiFp(this.configuration).blobGetFileWithParameter(resourceId, path, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary This method returns the amount of allocated space for the given resource
* @param {string} resourceId Id of a resource
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof BlobApi
*/
public blobGetQuota(resourceId: string, options?: any) {
return BlobApiFp(this.configuration).blobGetQuota(resourceId, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary This method uploads a given File
......
......@@ -4,7 +4,7 @@
* Coscine.Api.Blob
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.7.0
* The version of the OpenAPI document: 2.8.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
......
......@@ -4,7 +4,7 @@
* Coscine.Api.Blob
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.7.0
* The version of the OpenAPI document: 2.8.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
......
......@@ -4,7 +4,7 @@
* Coscine.Api.Blob
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.7.0
* The version of the OpenAPI document: 2.8.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
......
......@@ -4,7 +4,7 @@
* Coscine.Api.Blob
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.7.0
* The version of the OpenAPI document: 2.8.2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
......
This diff is collapsed.
......@@ -4,7 +4,7 @@
* Coscine.Api.Project
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.8.4
* The version of the OpenAPI document: 3.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
......
......@@ -4,7 +4,7 @@
* Coscine.Api.Project
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.8.4
* The version of the OpenAPI document: 3.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
......
......@@ -4,7 +4,7 @@
* Coscine.Api.Project
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.8.4
* The version of the OpenAPI document: 3.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
......
......@@ -4,7 +4,7 @@
* Coscine.Api.Project
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.8.4
* The version of the OpenAPI document: 3.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
......
wwwroot/*.js
node_modules
typings
dist
# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm
\ No newline at end of file
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
.gitignore
.npmignore
.openapi-generator-ignore
api.ts
base.ts
common.ts
configuration.ts
git_push.sh
index.ts