Select Git revision
CITATION.cff
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
api.ts 79.86 KiB
/* tslint:disable */
/* eslint-disable */
/**
* Coscine.Api.Resources
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 3.5.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';
/**
*
* @export
* @interface Access
*/
export interface Access {
/**
*
* @type {number}
* @memberof Access
*/
access_level?: number;
/**
*
* @type {number}
* @memberof Access
*/
notification_level?: number;
}
/**
*
* @export
* @interface Branch
*/
export interface Branch {
/**
*
* @type {string}
* @memberof Branch
*/
name?: string | null;
/**
*
* @type {boolean}
* @memberof Branch
*/
merged?: boolean;
/**
*
* @type {boolean}
* @memberof Branch
*/
_protected?: boolean;
/**
*
* @type {boolean}
* @memberof Branch
*/
_default?: boolean;
/**
*
* @type {boolean}
* @memberof Branch
*/
developers_can_push?: boolean;
/**
*
* @type {boolean}
* @memberof Branch
*/
developers_can_merge?: boolean;
/**
*
* @type {boolean}
* @memberof Branch
*/
can_push?: boolean;
/**
*
* @type {Commit}
* @memberof Branch
*/
commit?: Commit | null;
}
/**
*
* @export
* @interface ColumnsObject
*/
export interface ColumnsObject {
/**
*
* @type {Array<string>}
* @memberof ColumnsObject
*/
always?: Array<string>;
}
/**
*
* @export
* @interface Commit
*/
export interface Commit {
/**
*
* @type {string}
* @memberof Commit
*/
id?: string | null;
/**
*
* @type {string}
* @memberof Commit
*/
short_id?: string | null;
/**
*
* @type {string}
* @memberof Commit
*/
title?: string | null;
/**
*
* @type {string}
* @memberof Commit
*/
created_at?: string | null;
/**
*
* @type {Array<string>}
* @memberof Commit
*/
parent_ids?: Array<string> | null;
/**
*
* @type {string}
* @memberof Commit
*/
message?: string | null;
/**
*
* @type {string}
* @memberof Commit
*/
author_name?: string | null;
/**
*
* @type {string}
* @memberof Commit
*/
author_email?: string | null;
/**
*
* @type {string}
* @memberof Commit
*/
authored_date?: string | null;
/**
*
* @type {string}
* @memberof Commit
*/
committer_name?: string | null;
/**
*
* @type {string}
* @memberof Commit
*/
committer_email?: string | null;
/**
*
* @type {string}
* @memberof Commit
*/
committed_date?: string | null;
}
/**
*
* @export
* @interface DisciplineObject
*/
export interface DisciplineObject {
/**
*
* @type {string}
* @memberof DisciplineObject
*/
id?: string;
/**
*
* @type {string}
* @memberof DisciplineObject
*/
url?: string | null;
/**
*
* @type {string}
* @memberof DisciplineObject
*/
displayNameDe?: string | null;
/**
*
* @type {string}
* @memberof DisciplineObject
*/
displayNameEn?: string | null;
}
/**
*
* @export
* @interface EntriesView
*/
export interface EntriesView {
/**
*
* @type {ColumnsObject}
* @memberof EntriesView
*/
columns?: ColumnsObject;
}
/**
*
* @export
* @interface LicenseObject
*/
export interface LicenseObject {
/**
*
* @type {string}
* @memberof LicenseObject
*/
id?: string;
/**
*
* @type {string}
* @memberof LicenseObject
*/
displayName?: string | null;
}
/**
*
* @export
* @interface Links
*/
export interface Links {
/**
*
* @type {string}
* @memberof Links
*/
members?: string | null;
/**
*
* @type {string}
* @memberof Links
*/
issues?: string | null;
/**
*
* @type {string}
* @memberof Links
*/
events?: string | null;
/**
*
* @type {string}
* @memberof Links
*/
labels?: string | null;
/**
*
* @type {string}
* @memberof Links
*/
repo_branches?: string | null;
/**
*
* @type {string}
* @memberof Links
*/
merge_requests?: string | null;
/**
*
* @type {string}
* @memberof Links
*/
self?: string | null;
}
/**
*
* @export
* @interface MetadataView
*/
export interface MetadataView {
/**
*
* @type {boolean}
* @memberof MetadataView
*/
editableDataUrl?: boolean;
/**
*
* @type {boolean}
* @memberof MetadataView
*/
editableKey?: boolean;
}
/**
*
* @export
* @interface Namespace
*/
export interface Namespace {
/**
*
* @type {number}
* @memberof Namespace
*/
id?: number;
/**
*
* @type {string}
* @memberof Namespace
*/
name?: string | null;
/**
*
* @type {string}
* @memberof Namespace
*/
full_path?: string | null;
/**
*
* @type {string}
* @memberof Namespace
*/
kind?: string | null;
/**
*
* @type {string}
* @memberof Namespace
*/
path?: string | null;
}
/**
*
* @export
* @interface Owner
*/
export interface Owner {
/**
*
* @type {number}
* @memberof Owner
*/
id?: number;
/**
*
* @type {string}
* @memberof Owner
*/
created_at?: string;
/**
*
* @type {string}
* @memberof Owner
*/
name?: string | null;
}
/**
*
* @export
* @interface Permissions
*/
export interface Permissions {
/**
*
* @type {Access}
* @memberof Permissions
*/
group_access?: Access | null;
/**
*
* @type {Access}
* @memberof Permissions
*/
project_access?: Access | null;
}
/**
*
* @export
* @interface Project
*/
export interface Project {
/**
*
* @type {string}
* @memberof Project
*/
last_activity_at?: string | null;
/**
*
* @type {string}
* @memberof Project
*/
description?: string | null;
/**
*
* @type {boolean}
* @memberof Project
*/
container_registry_enabled?: boolean;
/**
*
* @type {boolean}
* @memberof Project
*/
archived?: boolean;
/**
*
* @type {Links}
* @memberof Project
*/
_links?: Links | null;
/**
*
* @type {string}
* @memberof Project
*/
avatar_url?: string | null;
/**
*
* @type {number}
* @memberof Project
*/
creator_id?: number;
/**
*
* @type {string}
* @memberof Project
*/
created_at?: string | null;
/**
*
* @type {string}
* @memberof Project
*/
default_branch?: string | null;
/**
*
* @type {string}
* @memberof Project
*/
import_error?: string | null;
/**
*
* @type {string}
* @memberof Project
*/
http_url_to_repo?: string | null;
/**
*
* @type {number}
* @memberof Project
*/
forks_count?: number;
/**
*
* @type {number}
* @memberof Project
*/
id?: number;
/**
*
* @type {boolean}
* @memberof Project
*/
issues_enabled?: boolean;
/**
*
* @type {string}
* @memberof Project
*/
import_status?: string | null;
/**
*
* @type {boolean}
* @memberof Project
*/
jobs_enabled?: boolean;
/**
*
* @type {Owner}
* @memberof Project
*/
owner?: Owner | null;
/**
*
* @type {Namespace}
* @memberof Project
*/
namespace?: Namespace | null;
/**
*
* @type {string}
* @memberof Project
*/
name?: string | null;
/**
*
* @type {boolean}
* @memberof Project
*/
merge_requests_enabled?: boolean;
/**
*
* @type {string}
* @memberof Project
*/
name_with_namespace?: string | null;
/**
*
* @type {boolean}
* @memberof Project
*/
only_allow_merge_if_pipeline_succeeds?: boolean | null;
/**
*
* @type {boolean}
* @memberof Project
*/
only_allow_merge_if_all_discussions_are_resolved?: boolean | null;
/**
*
* @type {number}
* @memberof Project
*/
open_issues_count?: number;
/**
*
* @type {boolean}
* @memberof Project
*/
public_jobs?: boolean;
/**
*
* @type {string}
* @memberof Project
*/
path_with_namespace?: string | null;
/**
*
* @type {string}
* @memberof Project
*/
path?: string | null;
/**
*
* @type {Permissions}
* @memberof Project
*/
permissions?: Permissions | null;
/**
*
* @type {string}
* @memberof Project
*/
runners_token?: string | null;
/**
*
* @type {boolean}
* @memberof Project
*/
request_access_enabled?: boolean;
/**
*
* @type {boolean}
* @memberof Project
*/
shared_runners_enabled?: boolean;
/**
*
* @type {Statistics}
* @memberof Project
*/
statistics?: Statistics | null;
/**
*
* @type {string}
* @memberof Project
*/
ssh_url_to_repo?: string | null;
/**
*
* @type {boolean}
* @memberof Project
*/
snippets_enabled?: boolean;
/**
*
* @type {number}
* @memberof Project
*/
star_count?: number;
/**
*
* @type {ProjectVisibilityLevel}
* @memberof Project
*/
visibility?: ProjectVisibilityLevel;
/**
*
* @type {Array<string>}
* @memberof Project
*/
tag_list?: Array<string> | null;
/**
*
* @type {string}
* @memberof Project
*/
web_url?: string | null;
/**
*
* @type {boolean}
* @memberof Project
*/
wiki_enabled?: boolean;
}
/**
*
* @export
* @enum {string}
*/
export enum ProjectVisibilityLevel {
NUMBER_0 = 0,
NUMBER_1 = 1,
NUMBER_2 = 2
}
/**
*
* @export
* @interface QuotaDimObject
*/
export interface QuotaDimObject {
/**
*
* @type {number}
* @memberof QuotaDimObject
*/
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'
}
/**
*
* @export
* @interface ResourceContentObject
*/
export interface ResourceContentObject {
/**
*
* @type {boolean}
* @memberof ResourceContentObject
*/
readOnly?: boolean;
/**
*
* @type {MetadataView}
* @memberof ResourceContentObject
*/
metadataView?: MetadataView;
/**
*
* @type {EntriesView}
* @memberof ResourceContentObject
*/
entriesView?: EntriesView;
}
/**
*
* @export
* @interface ResourceCreateObject
*/
export interface ResourceCreateObject {
/**
*
* @type {Array<Array<string>>}
* @memberof ResourceCreateObject
*/
components?: Array<Array<string>>;
}
/**
*
* @export
* @interface ResourceObject
*/
export interface ResourceObject {
/**
*
* @type {string}
* @memberof ResourceObject
*/
id?: string;
/**
*
* @type {string}
* @memberof ResourceObject
*/
pid?: string | null;
/**
*
* @type {string}
* @memberof ResourceObject
*/
displayName?: string | null;
/**
*
* @type {string}
* @memberof ResourceObject
*/
resourceName?: string | null;
/**
*
* @type {string}
* @memberof ResourceObject
*/
description?: string | null;
/**
*
* @type {string}
* @memberof ResourceObject
*/
keywords?: string | null;
/**
*
* @type {string}
* @memberof ResourceObject
*/
usageRights?: string | null;
/**
*
* @type {ResourceTypeObject}
* @memberof ResourceObject
*/
type?: ResourceTypeObject | null;
/**
*
* @type {Array<DisciplineObject>}
* @memberof ResourceObject
*/
disciplines?: Array<DisciplineObject> | null;
/**
*
* @type {VisibilityObject}
* @memberof ResourceObject
*/
visibility?: VisibilityObject | null;
/**
*
* @type {LicenseObject}
* @memberof ResourceObject
*/
license?: LicenseObject | null;
/**
*
* @type {any}
* @memberof ResourceObject
*/
resourceTypeOption?: any | null;
/**
*
* @type {string}
* @memberof ResourceObject
*/
applicationProfile?: string | null;
/**
*
* @type {any}
* @memberof ResourceObject
*/
fixedValues?: any | null;
/**
*
* @type {string}
* @memberof ResourceObject
*/
dateCreated?: string | null;
/**
*
* @type {string}
* @memberof ResourceObject
*/
creator?: string | null;
/**
*
* @type {boolean}
* @memberof ResourceObject
*/
archived?: boolean;
/**
*
* @type {boolean}
* @memberof ResourceObject
*/
deleted?: boolean;
}
/**
*
* @export
* @interface ResourceQuotaReturnObject
*/
export interface ResourceQuotaReturnObject {
/**
*
* @type {string}
* @memberof ResourceQuotaReturnObject
*/
id?: string;
/**
*
* @type {string}
* @memberof ResourceQuotaReturnObject
*/
name?: string | null;
/**
*
* @type {QuotaDimObject}
* @memberof ResourceQuotaReturnObject
*/
used?: QuotaDimObject | null;
/**
*
* @type {number}
* @memberof ResourceQuotaReturnObject
*/
usedPercentage?: number;
/**
*
* @type {QuotaDimObject}
* @memberof ResourceQuotaReturnObject
*/
reserved?: QuotaDimObject | null;
}
/**
*
* @export
* @interface ResourceTypeInformation
*/
export interface ResourceTypeInformation {
/**
*
* @type {boolean}
* @memberof ResourceTypeInformation
*/
isEnabled?: boolean;
/**
*
* @type {ResourceTypeStatus}
* @memberof ResourceTypeInformation
*/
status?: ResourceTypeStatus;
/**
*
* @type {boolean}
* @memberof ResourceTypeInformation
*/
canCreate?: boolean;
/**
*
* @type {boolean}
* @memberof ResourceTypeInformation
*/
canRead?: boolean;
/**
*
* @type {boolean}
* @memberof ResourceTypeInformation
*/
canSetResourceReadonly?: boolean;
/**
*
* @type {boolean}
* @memberof ResourceTypeInformation
*/
canUpdate?: boolean;
/**
*
* @type {boolean}
* @memberof ResourceTypeInformation
*/
canUpdateResource?: boolean;
/**
*
* @type {boolean}
* @memberof ResourceTypeInformation
*/
canDelete?: boolean;
/**
*
* @type {boolean}
* @memberof ResourceTypeInformation
*/
canDeleteResource?: boolean;
/**
*
* @type {boolean}
* @memberof ResourceTypeInformation
*/
canList?: boolean;
/**
*
* @type {boolean}
* @memberof ResourceTypeInformation
*/
canCreateLinks?: boolean;
/**
*
* @type {boolean}
* @memberof ResourceTypeInformation
*/
isArchived?: boolean;
/**
*
* @type {boolean}
* @memberof ResourceTypeInformation
*/
isQuotaAvailable?: boolean;
/**
*
* @type {boolean}
* @memberof ResourceTypeInformation
*/
isQuotaAdjustable?: boolean;
/**
*
* @type {string}
* @memberof ResourceTypeInformation
*/
displayName?: string | null;
/**
*
* @type {string}
* @memberof ResourceTypeInformation
*/
id?: string;
/**
*
* @type {ResourceCreateObject}
* @memberof ResourceTypeInformation
*/
resourceCreate?: ResourceCreateObject;
/**
*
* @type {ResourceContentObject}
* @memberof ResourceTypeInformation
*/
resourceContent?: ResourceContentObject;
}
/**
*
* @export
* @interface ResourceTypeObject
*/
export interface ResourceTypeObject {
/**
*
* @type {string}
* @memberof ResourceTypeObject
*/
id?: string;
/**
*
* @type {string}
* @memberof ResourceTypeObject
*/
displayName?: string | null;
}
/**
*
* @export
* @enum {string}
*/
export enum ResourceTypeStatus {
Hidden = 'hidden',
Active = 'active'
}
/**
*
* @export
* @interface Statistics
*/
export interface Statistics {
/**
*
* @type {number}
* @memberof Statistics
*/
job_artifacts_size?: number;
/**
*
* @type {number}
* @memberof Statistics
*/
repository_size?: number;
/**
*
* @type {number}
* @memberof Statistics
*/
commit_count?: number;
/**
*
* @type {number}
* @memberof Statistics
*/
lfs_objects_size?: number;
/**
*
* @type {number}
* @memberof Statistics
*/
storage_size?: number;
}
/**
* Parameter object containing the update information.
* @export
* @interface UpdateResourceObject
*/
export interface UpdateResourceObject {
/**
* New reserved quota value to set for the selected resource in GiB.
* @type {number}
* @memberof UpdateResourceObject
*/
reservedGiB?: number;
}
/**
*
* @export
* @interface VisibilityObject
*/
export interface VisibilityObject {
/**
*
* @type {string}
* @memberof VisibilityObject
*/
id?: string;
/**
*
* @type {string}
* @memberof VisibilityObject
*/
displayName?: string | null;
}
/**
* GitLabApi - axios parameter creator
* @export
*/
export const GitLabApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @summary Returns all GitLab projects, that the user is a member of, based on the provided credentials.
* @param {string} [domain] Domain/Host of the GitLab Provider
* @param {string} [accessToken] GitLab Project or Group Access Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
gitLabGetAllProjects: async (domain?: string, accessToken?: string, options: any = {}): Promise<RequestArgs> => {
const localVarPath = `/GitLab/projects`;
// 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 (domain !== undefined) {
localVarQueryParameter['Domain'] = domain;
}
if (accessToken !== undefined) {
localVarQueryParameter['AccessToken'] = accessToken;
}
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 Returns all GitLab branches of a project, that the user is a member of, based on the provided credentials.
* @param {number} projectId GitLab Project Identifier
* @param {string} [domain] Domain/Host of the GitLab Provider
* @param {string} [accessToken] GitLab Project or Group Access Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
gitLabGetBranchesForProject: async (projectId: number, domain?: string, accessToken?: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'projectId' is not null or undefined
assertParamExists('gitLabGetBranchesForProject', 'projectId', projectId)
const localVarPath = `/GitLab/branches/{projectId}`
.replace(`{${"projectId"}}`, encodeURIComponent(String(projectId)));
// 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 (domain !== undefined) {
localVarQueryParameter['Domain'] = domain;
}
if (accessToken !== undefined) {
localVarQueryParameter['AccessToken'] = accessToken;
}
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 Returns a single GitLab project, that the user is a member of, based on the provided credentials.
* @param {number} projectId GitLab Project Identifier
* @param {string} [domain] Domain/Host of the GitLab Provider
* @param {string} [accessToken] GitLab Project or Group Access Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
gitLabGetProject: async (projectId: number, domain?: string, accessToken?: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'projectId' is not null or undefined
assertParamExists('gitLabGetProject', 'projectId', projectId)
const localVarPath = `/GitLab/projects/{projectId}`
.replace(`{${"projectId"}}`, encodeURIComponent(String(projectId)));
// 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 (domain !== undefined) {
localVarQueryParameter['Domain'] = domain;
}
if (accessToken !== undefined) {
localVarQueryParameter['AccessToken'] = accessToken;
}
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* GitLabApi - functional programming interface
* @export
*/
export const GitLabApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = GitLabApiAxiosParamCreator(configuration)
return {
/**
*
* @summary Returns all GitLab projects, that the user is a member of, based on the provided credentials.
* @param {string} [domain] Domain/Host of the GitLab Provider
* @param {string} [accessToken] GitLab Project or Group Access Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async gitLabGetAllProjects(domain?: string, accessToken?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Project>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.gitLabGetAllProjects(domain, accessToken, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary Returns all GitLab branches of a project, that the user is a member of, based on the provided credentials.
* @param {number} projectId GitLab Project Identifier
* @param {string} [domain] Domain/Host of the GitLab Provider
* @param {string} [accessToken] GitLab Project or Group Access Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async gitLabGetBranchesForProject(projectId: number, domain?: string, accessToken?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Branch>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.gitLabGetBranchesForProject(projectId, domain, accessToken, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary Returns a single GitLab project, that the user is a member of, based on the provided credentials.
* @param {number} projectId GitLab Project Identifier
* @param {string} [domain] Domain/Host of the GitLab Provider
* @param {string} [accessToken] GitLab Project or Group Access Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async gitLabGetProject(projectId: number, domain?: string, accessToken?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Project>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.gitLabGetProject(projectId, domain, accessToken, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
}
};
/**
* GitLabApi - factory interface
* @export
*/
export const GitLabApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = GitLabApiFp(configuration)
return {
/**
*
* @summary Returns all GitLab projects, that the user is a member of, based on the provided credentials.
* @param {string} [domain] Domain/Host of the GitLab Provider
* @param {string} [accessToken] GitLab Project or Group Access Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
gitLabGetAllProjects(domain?: string, accessToken?: string, options?: any): AxiosPromise<Array<Project>> {
return localVarFp.gitLabGetAllProjects(domain, accessToken, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Returns all GitLab branches of a project, that the user is a member of, based on the provided credentials.
* @param {number} projectId GitLab Project Identifier
* @param {string} [domain] Domain/Host of the GitLab Provider
* @param {string} [accessToken] GitLab Project or Group Access Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
gitLabGetBranchesForProject(projectId: number, domain?: string, accessToken?: string, options?: any): AxiosPromise<Array<Branch>> {
return localVarFp.gitLabGetBranchesForProject(projectId, domain, accessToken, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Returns a single GitLab project, that the user is a member of, based on the provided credentials.
* @param {number} projectId GitLab Project Identifier
* @param {string} [domain] Domain/Host of the GitLab Provider
* @param {string} [accessToken] GitLab Project or Group Access Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
gitLabGetProject(projectId: number, domain?: string, accessToken?: string, options?: any): AxiosPromise<Project> {
return localVarFp.gitLabGetProject(projectId, domain, accessToken, options).then((request) => request(axios, basePath));
},
};
};
/**
* GitLabApi - object-oriented interface
* @export
* @class GitLabApi
* @extends {BaseAPI}
*/
export class GitLabApi extends BaseAPI {
/**
*
* @summary Returns all GitLab projects, that the user is a member of, based on the provided credentials.
* @param {string} [domain] Domain/Host of the GitLab Provider
* @param {string} [accessToken] GitLab Project or Group Access Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof GitLabApi
*/
public gitLabGetAllProjects(domain?: string, accessToken?: string, options?: any) {
return GitLabApiFp(this.configuration).gitLabGetAllProjects(domain, accessToken, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Returns all GitLab branches of a project, that the user is a member of, based on the provided credentials.
* @param {number} projectId GitLab Project Identifier
* @param {string} [domain] Domain/Host of the GitLab Provider
* @param {string} [accessToken] GitLab Project or Group Access Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof GitLabApi
*/
public gitLabGetBranchesForProject(projectId: number, domain?: string, accessToken?: string, options?: any) {
return GitLabApiFp(this.configuration).gitLabGetBranchesForProject(projectId, domain, accessToken, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Returns a single GitLab project, that the user is a member of, based on the provided credentials.
* @param {number} projectId GitLab Project Identifier
* @param {string} [domain] Domain/Host of the GitLab Provider
* @param {string} [accessToken] GitLab Project or Group Access Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof GitLabApi
*/
public gitLabGetProject(projectId: number, domain?: string, accessToken?: string, options?: any) {
return GitLabApiFp(this.configuration).gitLabGetProject(projectId, domain, accessToken, options).then((request) => request(this.axios, this.basePath));
}
}
/**
* ResourceApi - axios parameter creator
* @export
*/
export const ResourceApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @summary Deletes a resource.
* @param {string} id A GUID as a string that identifies the resource.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceDelete: async (id: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('resourceDelete', 'id', id)
const localVarPath = `/Resource/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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)
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 Returns the resource with a specified id.
* @param {string} id The resource id.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceGet: async (id: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('resourceGet', 'id', id)
const localVarPath = `/Resource/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Returns a list of all resources the current user has access to.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceIndex: async (options: any = {}): Promise<RequestArgs> => {
const localVarPath = `/Resource`;
// 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};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Returns whether or not the current user is creator of a specified resource.
* @param {string} id The resource id.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceIsUserResourceCreator: async (id: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('resourceIsUserResourceCreator', 'id', id)
const localVarPath = `/Resource/{id}/isCreator`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Sets a read only status of a given resource.
* @param {string} id A GUID as a string that identifies the resource.
* @param {boolean} [status] A boolean value that specifies if the resource is archived.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceSetResourceReadonly: async (id: string, status?: boolean, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('resourceSetResourceReadonly', 'id', id)
const localVarPath = `/Resource/{id}/setReadonly`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication JWT token required
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
if (status !== undefined) {
localVarQueryParameter['status'] = status;
}
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 Stores the provided resource object in a specified project.
* @param {string} projectId A GUID as a string that identifies the resource.
* @param {ResourceObject} resourceObject Entry representing the user
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceStoreToProject: async (projectId: string, resourceObject: ResourceObject, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'projectId' is not null or undefined
assertParamExists('resourceStoreToProject', 'projectId', projectId)
// verify required parameter 'resourceObject' is not null or undefined
assertParamExists('resourceStoreToProject', 'resourceObject', resourceObject)
const localVarPath = `/Resource/project/{projectId}`
.replace(`{${"projectId"}}`, encodeURIComponent(String(projectId)));
// 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: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication JWT token required
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(resourceObject, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Updates a resource.
* @param {string} id The resource id.
* @param {ResourceObject} resourceObject Entry representing the user
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceUpdate: async (id: string, resourceObject: ResourceObject, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('resourceUpdate', 'id', id)
// verify required parameter 'resourceObject' is not null or undefined
assertParamExists('resourceUpdate', 'resourceObject', resourceObject)
const localVarPath = `/Resource/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication JWT token required
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(resourceObject, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* ResourceApi - functional programming interface
* @export
*/
export const ResourceApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = ResourceApiAxiosParamCreator(configuration)
return {
/**
*
* @summary Deletes a resource.
* @param {string} id A GUID as a string that identifies the resource.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async resourceDelete(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.resourceDelete(id, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary Returns the resource with a specified id.
* @param {string} id The resource id.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async resourceGet(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.resourceGet(id, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary Returns a list of all resources the current user has access to.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async resourceIndex(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.resourceIndex(options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary Returns whether or not the current user is creator of a specified resource.
* @param {string} id The resource id.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async resourceIsUserResourceCreator(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.resourceIsUserResourceCreator(id, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary Sets a read only status of a given resource.
* @param {string} id A GUID as a string that identifies the resource.
* @param {boolean} [status] A boolean value that specifies if the resource is archived.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async resourceSetResourceReadonly(id: string, status?: boolean, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.resourceSetResourceReadonly(id, status, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary Stores the provided resource object in a specified project.
* @param {string} projectId A GUID as a string that identifies the resource.
* @param {ResourceObject} resourceObject Entry representing the user
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async resourceStoreToProject(projectId: string, resourceObject: ResourceObject, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.resourceStoreToProject(projectId, resourceObject, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary Updates a resource.
* @param {string} id The resource id.
* @param {ResourceObject} resourceObject Entry representing the user
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async resourceUpdate(id: string, resourceObject: ResourceObject, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.resourceUpdate(id, resourceObject, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
}
};
/**
* ResourceApi - factory interface
* @export
*/
export const ResourceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = ResourceApiFp(configuration)
return {
/**
*
* @summary Deletes a resource.
* @param {string} id A GUID as a string that identifies the resource.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceDelete(id: string, options?: any): AxiosPromise<any> {
return localVarFp.resourceDelete(id, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Returns the resource with a specified id.
* @param {string} id The resource id.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceGet(id: string, options?: any): AxiosPromise<any> {
return localVarFp.resourceGet(id, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Returns a list of all resources the current user has access to.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceIndex(options?: any): AxiosPromise<any> {
return localVarFp.resourceIndex(options).then((request) => request(axios, basePath));
},
/**
*
* @summary Returns whether or not the current user is creator of a specified resource.
* @param {string} id The resource id.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceIsUserResourceCreator(id: string, options?: any): AxiosPromise<any> {
return localVarFp.resourceIsUserResourceCreator(id, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Sets a read only status of a given resource.
* @param {string} id A GUID as a string that identifies the resource.
* @param {boolean} [status] A boolean value that specifies if the resource is archived.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceSetResourceReadonly(id: string, status?: boolean, options?: any): AxiosPromise<any> {
return localVarFp.resourceSetResourceReadonly(id, status, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Stores the provided resource object in a specified project.
* @param {string} projectId A GUID as a string that identifies the resource.
* @param {ResourceObject} resourceObject Entry representing the user
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceStoreToProject(projectId: string, resourceObject: ResourceObject, options?: any): AxiosPromise<any> {
return localVarFp.resourceStoreToProject(projectId, resourceObject, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Updates a resource.
* @param {string} id The resource id.
* @param {ResourceObject} resourceObject Entry representing the user
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceUpdate(id: string, resourceObject: ResourceObject, options?: any): AxiosPromise<any> {
return localVarFp.resourceUpdate(id, resourceObject, options).then((request) => request(axios, basePath));
},
};
};
/**
* ResourceApi - object-oriented interface
* @export
* @class ResourceApi
* @extends {BaseAPI}
*/
export class ResourceApi extends BaseAPI {
/**
*
* @summary Deletes a resource.
* @param {string} id A GUID as a string that identifies the resource.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ResourceApi
*/
public resourceDelete(id: string, options?: any) {
return ResourceApiFp(this.configuration).resourceDelete(id, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Returns the resource with a specified id.
* @param {string} id The resource id.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ResourceApi
*/
public resourceGet(id: string, options?: any) {
return ResourceApiFp(this.configuration).resourceGet(id, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Returns a list of all resources the current user has access to.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ResourceApi
*/
public resourceIndex(options?: any) {
return ResourceApiFp(this.configuration).resourceIndex(options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Returns whether or not the current user is creator of a specified resource.
* @param {string} id The resource id.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ResourceApi
*/
public resourceIsUserResourceCreator(id: string, options?: any) {
return ResourceApiFp(this.configuration).resourceIsUserResourceCreator(id, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Sets a read only status of a given resource.
* @param {string} id A GUID as a string that identifies the resource.
* @param {boolean} [status] A boolean value that specifies if the resource is archived.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ResourceApi
*/
public resourceSetResourceReadonly(id: string, status?: boolean, options?: any) {
return ResourceApiFp(this.configuration).resourceSetResourceReadonly(id, status, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Stores the provided resource object in a specified project.
* @param {string} projectId A GUID as a string that identifies the resource.
* @param {ResourceObject} resourceObject Entry representing the user
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ResourceApi
*/
public resourceStoreToProject(projectId: string, resourceObject: ResourceObject, options?: any) {
return ResourceApiFp(this.configuration).resourceStoreToProject(projectId, resourceObject, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Updates a resource.
* @param {string} id The resource id.
* @param {ResourceObject} resourceObject Entry representing the user
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ResourceApi
*/
public resourceUpdate(id: string, resourceObject: ResourceObject, options?: any) {
return ResourceApiFp(this.configuration).resourceUpdate(id, resourceObject, options).then((request) => request(this.axios, this.basePath));
}
}
/**
* ResourceQuotaApi - axios parameter creator
* @export
*/
export const ResourceQuotaApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @summary Retrieves the resource used and reserved quota for an individual resource.
* @param {string} id Id of the resource.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceQuotaGetResourceQuota: async (id: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('resourceQuotaGetResourceQuota', 'id', id)
const localVarPath = `/ResourceQuota/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Updates the resource quota for an individual resource.
* @param {string} id Id of the resource.
* @param {UpdateResourceObject} updateResourceObject Contains the resource id and the new quota.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceQuotaUpdateResourceQuota: async (id: string, updateResourceObject: UpdateResourceObject, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('resourceQuotaUpdateResourceQuota', 'id', id)
// verify required parameter 'updateResourceObject' is not null or undefined
assertParamExists('resourceQuotaUpdateResourceQuota', 'updateResourceObject', updateResourceObject)
const localVarPath = `/ResourceQuota/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication JWT token required
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(updateResourceObject, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* ResourceQuotaApi - functional programming interface
* @export
*/
export const ResourceQuotaApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = ResourceQuotaApiAxiosParamCreator(configuration)
return {
/**
*
* @summary Retrieves the resource used and reserved quota for an individual resource.
* @param {string} id Id of the resource.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async resourceQuotaGetResourceQuota(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ResourceQuotaReturnObject>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.resourceQuotaGetResourceQuota(id, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary Updates the resource quota for an individual resource.
* @param {string} id Id of the resource.
* @param {UpdateResourceObject} updateResourceObject Contains the resource id and the new quota.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async resourceQuotaUpdateResourceQuota(id: string, updateResourceObject: UpdateResourceObject, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.resourceQuotaUpdateResourceQuota(id, updateResourceObject, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
}
};
/**
* ResourceQuotaApi - factory interface
* @export
*/
export const ResourceQuotaApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = ResourceQuotaApiFp(configuration)
return {
/**
*
* @summary Retrieves the resource used and reserved quota for an individual resource.
* @param {string} id Id of the resource.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceQuotaGetResourceQuota(id: string, options?: any): AxiosPromise<ResourceQuotaReturnObject> {
return localVarFp.resourceQuotaGetResourceQuota(id, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Updates the resource quota for an individual resource.
* @param {string} id Id of the resource.
* @param {UpdateResourceObject} updateResourceObject Contains the resource id and the new quota.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceQuotaUpdateResourceQuota(id: string, updateResourceObject: UpdateResourceObject, options?: any): AxiosPromise<any> {
return localVarFp.resourceQuotaUpdateResourceQuota(id, updateResourceObject, options).then((request) => request(axios, basePath));
},
};
};
/**
* ResourceQuotaApi - object-oriented interface
* @export
* @class ResourceQuotaApi
* @extends {BaseAPI}
*/
export class ResourceQuotaApi extends BaseAPI {
/**
*
* @summary Retrieves the resource used and reserved quota for an individual resource.
* @param {string} id Id of the resource.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ResourceQuotaApi
*/
public resourceQuotaGetResourceQuota(id: string, options?: any) {
return ResourceQuotaApiFp(this.configuration).resourceQuotaGetResourceQuota(id, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Updates the resource quota for an individual resource.
* @param {string} id Id of the resource.
* @param {UpdateResourceObject} updateResourceObject Contains the resource id and the new quota.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ResourceQuotaApi
*/
public resourceQuotaUpdateResourceQuota(id: string, updateResourceObject: UpdateResourceObject, options?: any) {
return ResourceQuotaApiFp(this.configuration).resourceQuotaUpdateResourceQuota(id, updateResourceObject, options).then((request) => request(this.axios, this.basePath));
}
}
/**
* ResourceTypeApi - axios parameter creator
* @export
*/
export const ResourceTypeApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @summary Returns all enabled resource types.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceTypeGetEnabledResourceTypes: async (options: any = {}): Promise<RequestArgs> => {
const localVarPath = `/ResourceType/types/-/enabled`;
// 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};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Returns all enabled resource types according to user\'s affiliation and allocated quota in the project.
* @param {string} id Id of the project
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceTypeGetEnabledResourceTypesAll: async (id: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('resourceTypeGetEnabledResourceTypesAll', 'id', id)
const localVarPath = `/ResourceType/types/{id}/-/enabled`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Returns all fields of the specified resource type.
* @param {string} id A GUID as a string that identifies the resource.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceTypeGetResourceType: async (id: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('resourceTypeGetResourceType', 'id', id)
const localVarPath = `/ResourceType/types/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// 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};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Returns all resource types. Both hidden and active, regardless of user affiliation or quota.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceTypeGetResourceTypes: async (options: any = {}): Promise<RequestArgs> => {
const localVarPath = `/ResourceType/types`;
// 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};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* ResourceTypeApi - functional programming interface
* @export
*/
export const ResourceTypeApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = ResourceTypeApiAxiosParamCreator(configuration)
return {
/**
*
* @summary Returns all enabled resource types.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async resourceTypeGetEnabledResourceTypes(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ResourceTypeInformation>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.resourceTypeGetEnabledResourceTypes(options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary Returns all enabled resource types according to user\'s affiliation and allocated quota in the project.
* @param {string} id Id of the project
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async resourceTypeGetEnabledResourceTypesAll(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ResourceTypeInformation>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.resourceTypeGetEnabledResourceTypesAll(id, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary Returns all fields of the specified resource type.
* @param {string} id A GUID as a string that identifies the resource.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async resourceTypeGetResourceType(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ResourceTypeInformation>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.resourceTypeGetResourceType(id, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary Returns all resource types. Both hidden and active, regardless of user affiliation or quota.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async resourceTypeGetResourceTypes(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ResourceTypeInformation>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.resourceTypeGetResourceTypes(options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
}
};
/**
* ResourceTypeApi - factory interface
* @export
*/
export const ResourceTypeApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = ResourceTypeApiFp(configuration)
return {
/**
*
* @summary Returns all enabled resource types.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceTypeGetEnabledResourceTypes(options?: any): AxiosPromise<Array<ResourceTypeInformation>> {
return localVarFp.resourceTypeGetEnabledResourceTypes(options).then((request) => request(axios, basePath));
},
/**
*
* @summary Returns all enabled resource types according to user\'s affiliation and allocated quota in the project.
* @param {string} id Id of the project
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceTypeGetEnabledResourceTypesAll(id: string, options?: any): AxiosPromise<Array<ResourceTypeInformation>> {
return localVarFp.resourceTypeGetEnabledResourceTypesAll(id, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Returns all fields of the specified resource type.
* @param {string} id A GUID as a string that identifies the resource.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceTypeGetResourceType(id: string, options?: any): AxiosPromise<ResourceTypeInformation> {
return localVarFp.resourceTypeGetResourceType(id, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Returns all resource types. Both hidden and active, regardless of user affiliation or quota.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
resourceTypeGetResourceTypes(options?: any): AxiosPromise<Array<ResourceTypeInformation>> {
return localVarFp.resourceTypeGetResourceTypes(options).then((request) => request(axios, basePath));
},
};
};
/**
* ResourceTypeApi - object-oriented interface
* @export
* @class ResourceTypeApi
* @extends {BaseAPI}
*/
export class ResourceTypeApi extends BaseAPI {
/**
*
* @summary Returns all enabled resource types.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ResourceTypeApi
*/
public resourceTypeGetEnabledResourceTypes(options?: any) {
return ResourceTypeApiFp(this.configuration).resourceTypeGetEnabledResourceTypes(options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Returns all enabled resource types according to user\'s affiliation and allocated quota in the project.
* @param {string} id Id of the project
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ResourceTypeApi
*/
public resourceTypeGetEnabledResourceTypesAll(id: string, options?: any) {
return ResourceTypeApiFp(this.configuration).resourceTypeGetEnabledResourceTypesAll(id, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Returns all fields of the specified resource type.
* @param {string} id A GUID as a string that identifies the resource.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ResourceTypeApi
*/
public resourceTypeGetResourceType(id: string, options?: any) {
return ResourceTypeApiFp(this.configuration).resourceTypeGetResourceType(id, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Returns all resource types. Both hidden and active, regardless of user affiliation or quota.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ResourceTypeApi
*/
public resourceTypeGetResourceTypes(options?: any) {
return ResourceTypeApiFp(this.configuration).resourceTypeGetResourceTypes(options).then((request) => request(this.axios, this.basePath));
}
}