diff --git a/client/package.json b/client/package.json index 4105f4b..b7ac4ca 100644 --- a/client/package.json +++ b/client/package.json @@ -7,7 +7,7 @@ "start": "react-scripts start", "build": "react-scripts build", "format:write": "prettier --write src/**/*.{ts,tsx}", - "generate-api-client": "openapi-generator-cli generate -i https://raw.githubusercontent.com/daytonaio/daytona/v0.40.0/pkg/api/docs/swagger.json -g typescript-axios --additional-properties=enumNameSuffix= --type-mappings=DateTime=Date -o src/api-client && npm run format:write" + "generate-api-client": "openapi-generator-cli generate -i https://raw.githubusercontent.com/daytonaio/daytona/v0.52.0/pkg/api/docs/swagger.json -g typescript-axios --additional-properties=enumNameSuffix= --type-mappings=DateTime=Date -o src/api-client && npm run format:write" }, "dependencies": { "@docker/docker-mui-theme": "^0.0.9", diff --git a/client/src/api-client/api.ts b/client/src/api-client/api.ts index f2000d4..380267e 100644 --- a/client/src/api-client/api.ts +++ b/client/src/api-client/api.ts @@ -42,189 +42,277 @@ import { /** * * @export - * @interface ApiKey + * @interface ApiKeyViewDTO */ -export interface ApiKey { +export interface ApiKeyViewDTO { /** * - * @type {string} - * @memberof ApiKey + * @type {boolean} + * @memberof ApiKeyViewDTO */ - keyHash: string + current: boolean /** - * Project or client name + * * @type {string} - * @memberof ApiKey + * @memberof ApiKeyViewDTO */ name: string /** * - * @type {ApikeyApiKeyType} - * @memberof ApiKey + * @type {ModelsApiKeyType} + * @memberof ApiKeyViewDTO */ - type: ApikeyApiKeyType + type: ModelsApiKeyType } /** * * @export - * @enum {string} + * @interface BuildConfig */ - -export const ApikeyApiKeyType = { - ApiKeyTypeClient: 'client', - ApiKeyTypeProject: 'project', - ApiKeyTypeWorkspace: 'workspace', -} as const - -export type ApikeyApiKeyType = - (typeof ApikeyApiKeyType)[keyof typeof ApikeyApiKeyType] - +export interface BuildConfig { + /** + * + * @type {CachedBuild} + * @memberof BuildConfig + */ + cachedBuild?: CachedBuild + /** + * + * @type {DevcontainerConfig} + * @memberof BuildConfig + */ + devcontainer?: DevcontainerConfig +} /** * * @export - * @interface Build + * @interface BuildDTO */ -export interface Build { +export interface BuildDTO { /** * * @type {BuildConfig} - * @memberof Build + * @memberof BuildDTO */ buildConfig?: BuildConfig /** * * @type {ContainerConfig} - * @memberof Build + * @memberof BuildDTO */ containerConfig: ContainerConfig /** * * @type {string} - * @memberof Build + * @memberof BuildDTO */ createdAt: string /** * * @type {{ [key: string]: string; }} - * @memberof Build + * @memberof BuildDTO */ envVars: { [key: string]: string } /** * * @type {string} - * @memberof Build + * @memberof BuildDTO */ id: string /** * * @type {string} - * @memberof Build + * @memberof BuildDTO */ image?: string + /** + * + * @type {Job} + * @memberof BuildDTO + */ + lastJob?: Job + /** + * + * @type {string} + * @memberof BuildDTO + */ + lastJobId?: string /** * * @type {string} - * @memberof Build + * @memberof BuildDTO */ - prebuildId: string + prebuildId?: string /** * * @type {GitRepository} - * @memberof Build + * @memberof BuildDTO */ repository: GitRepository /** * - * @type {BuildBuildState} - * @memberof Build + * @type {ResourceState} + * @memberof BuildDTO */ - state: BuildBuildState + state: ResourceState /** * * @type {string} - * @memberof Build + * @memberof BuildDTO */ updatedAt: string /** * * @type {string} - * @memberof Build + * @memberof BuildDTO */ user?: string } - +/** + * + * @export + * @interface CachedBuild + */ +export interface CachedBuild { + /** + * + * @type {string} + * @memberof CachedBuild + */ + image: string + /** + * + * @type {string} + * @memberof CachedBuild + */ + user: string +} /** * * @export * @enum {string} */ -export const BuildBuildState = { - BuildStatePendingRun: 'pending-run', - BuildStateRunning: 'running', - BuildStateError: 'error', - BuildStateSuccess: 'success', - BuildStatePublished: 'published', - BuildStatePendingDelete: 'pending-delete', - BuildStatePendingForcedDelete: 'pending-forced-delete', - BuildStateDeleting: 'deleting', +export const CloneTarget = { + CloneTargetBranch: 'branch', + CloneTargetCommit: 'commit', } as const -export type BuildBuildState = - (typeof BuildBuildState)[keyof typeof BuildBuildState] +export type CloneTarget = (typeof CloneTarget)[keyof typeof CloneTarget] /** * * @export - * @interface BuildConfig + * @interface Command */ -export interface BuildConfig { +export interface Command { /** * - * @type {CachedBuild} - * @memberof BuildConfig + * @type {string} + * @memberof Command */ - cachedBuild?: CachedBuild + command: string /** * - * @type {DevcontainerConfig} - * @memberof BuildConfig + * @type {number} + * @memberof Command */ - devcontainer?: DevcontainerConfig + exitCode?: number + /** + * + * @type {string} + * @memberof Command + */ + id: string } /** * * @export - * @interface CachedBuild + * @interface CompletionContext */ -export interface CachedBuild { +export interface CompletionContext { /** * * @type {string} - * @memberof CachedBuild + * @memberof CompletionContext */ - image: string + triggerCharacter?: string + /** + * + * @type {number} + * @memberof CompletionContext + */ + triggerKind: number +} +/** + * + * @export + * @interface CompletionItem + */ +export interface CompletionItem { /** * * @type {string} - * @memberof CachedBuild + * @memberof CompletionItem */ - user: string + detail?: string + /** + * + * @type {object} + * @memberof CompletionItem + */ + documentation?: object + /** + * + * @type {string} + * @memberof CompletionItem + */ + filterText?: string + /** + * + * @type {string} + * @memberof CompletionItem + */ + insertText?: string + /** + * + * @type {number} + * @memberof CompletionItem + */ + kind?: number + /** + * + * @type {string} + * @memberof CompletionItem + */ + label: string + /** + * + * @type {string} + * @memberof CompletionItem + */ + sortText?: string } /** * * @export - * @enum {string} + * @interface CompletionList */ - -export const CloneTarget = { - CloneTargetBranch: 'branch', - CloneTargetCommit: 'commit', -} as const - -export type CloneTarget = (typeof CloneTarget)[keyof typeof CloneTarget] - +export interface CompletionList { + /** + * + * @type {boolean} + * @memberof CompletionList + */ + isIncomplete: boolean + /** + * + * @type {Array} + * @memberof CompletionList + */ + items: Array +} /** * * @export @@ -298,7 +386,7 @@ export interface CreateBuildDTO { * @type {string} * @memberof CreateBuildDTO */ - projectConfigName: string + workspaceTemplateName: string } /** * @@ -340,169 +428,244 @@ export interface CreatePrebuildDTO { /** * * @export - * @interface CreateProjectConfigDTO + * @interface CreateRunnerDTO */ -export interface CreateProjectConfigDTO { +export interface CreateRunnerDTO { /** * - * @type {BuildConfig} - * @memberof CreateProjectConfigDTO + * @type {string} + * @memberof CreateRunnerDTO */ - buildConfig?: BuildConfig + id: string /** * - * @type {{ [key: string]: string; }} - * @memberof CreateProjectConfigDTO + * @type {string} + * @memberof CreateRunnerDTO */ - envVars: { [key: string]: string } + name: string +} +/** + * + * @export + * @interface CreateRunnerResultDTO + */ +export interface CreateRunnerResultDTO { /** * * @type {string} - * @memberof CreateProjectConfigDTO + * @memberof CreateRunnerResultDTO */ - gitProviderConfigId?: string + apiKey: string /** * * @type {string} - * @memberof CreateProjectConfigDTO + * @memberof CreateRunnerResultDTO */ - image?: string + id: string + /** + * + * @type {RunnerMetadata} + * @memberof CreateRunnerResultDTO + */ + metadata?: RunnerMetadata /** * * @type {string} - * @memberof CreateProjectConfigDTO + * @memberof CreateRunnerResultDTO */ name: string +} +/** + * + * @export + * @interface CreateSessionRequest + */ +export interface CreateSessionRequest { /** * * @type {string} - * @memberof CreateProjectConfigDTO + * @memberof CreateSessionRequest */ - repositoryUrl: string + sessionId: string +} +/** + * + * @export + * @interface CreateTargetConfigDTO + */ +export interface CreateTargetConfigDTO { /** * * @type {string} - * @memberof CreateProjectConfigDTO + * @memberof CreateTargetConfigDTO */ - user?: string + name: string + /** + * + * @type {string} + * @memberof CreateTargetConfigDTO + */ + options: string + /** + * + * @type {ProviderInfo} + * @memberof CreateTargetConfigDTO + */ + providerInfo: ProviderInfo +} +/** + * + * @export + * @interface CreateTargetDTO + */ +export interface CreateTargetDTO { + /** + * + * @type {string} + * @memberof CreateTargetDTO + */ + id: string + /** + * + * @type {string} + * @memberof CreateTargetDTO + */ + name: string + /** + * + * @type {string} + * @memberof CreateTargetDTO + */ + targetConfigId: string } /** * * @export - * @interface CreateProjectDTO + * @interface CreateWorkspaceDTO */ -export interface CreateProjectDTO { +export interface CreateWorkspaceDTO { /** * * @type {BuildConfig} - * @memberof CreateProjectDTO + * @memberof CreateWorkspaceDTO */ buildConfig?: BuildConfig /** * * @type {{ [key: string]: string; }} - * @memberof CreateProjectDTO + * @memberof CreateWorkspaceDTO */ envVars: { [key: string]: string } /** * * @type {string} - * @memberof CreateProjectDTO + * @memberof CreateWorkspaceDTO */ gitProviderConfigId?: string /** * * @type {string} - * @memberof CreateProjectDTO + * @memberof CreateWorkspaceDTO + */ + id: string + /** + * + * @type {string} + * @memberof CreateWorkspaceDTO */ image?: string + /** + * + * @type {{ [key: string]: string; }} + * @memberof CreateWorkspaceDTO + */ + labels: { [key: string]: string } /** * * @type {string} - * @memberof CreateProjectDTO + * @memberof CreateWorkspaceDTO */ name: string /** * - * @type {CreateProjectSourceDTO} - * @memberof CreateProjectDTO + * @type {CreateWorkspaceSourceDTO} + * @memberof CreateWorkspaceDTO + */ + source: CreateWorkspaceSourceDTO + /** + * + * @type {string} + * @memberof CreateWorkspaceDTO */ - source: CreateProjectSourceDTO + targetId: string /** * * @type {string} - * @memberof CreateProjectDTO + * @memberof CreateWorkspaceDTO */ user?: string } /** * * @export - * @interface CreateProjectSourceDTO + * @interface CreateWorkspaceSourceDTO */ -export interface CreateProjectSourceDTO { +export interface CreateWorkspaceSourceDTO { /** * * @type {GitRepository} - * @memberof CreateProjectSourceDTO + * @memberof CreateWorkspaceSourceDTO */ repository: GitRepository } /** * * @export - * @interface CreateProviderTargetDTO + * @interface CreateWorkspaceTemplateDTO */ -export interface CreateProviderTargetDTO { +export interface CreateWorkspaceTemplateDTO { /** * - * @type {string} - * @memberof CreateProviderTargetDTO + * @type {BuildConfig} + * @memberof CreateWorkspaceTemplateDTO */ - name: string + buildConfig?: BuildConfig /** * - * @type {string} - * @memberof CreateProviderTargetDTO + * @type {{ [key: string]: string; }} + * @memberof CreateWorkspaceTemplateDTO */ - options: string + envVars: { [key: string]: string } /** * - * @type {ProviderProviderInfo} - * @memberof CreateProviderTargetDTO + * @type {string} + * @memberof CreateWorkspaceTemplateDTO */ - providerInfo: ProviderProviderInfo -} -/** - * - * @export - * @interface CreateWorkspaceDTO - */ -export interface CreateWorkspaceDTO { + gitProviderConfigId?: string /** * * @type {string} - * @memberof CreateWorkspaceDTO + * @memberof CreateWorkspaceTemplateDTO */ - id: string + image?: string /** * * @type {string} - * @memberof CreateWorkspaceDTO + * @memberof CreateWorkspaceTemplateDTO */ name: string /** * - * @type {Array} - * @memberof CreateWorkspaceDTO + * @type {string} + * @memberof CreateWorkspaceTemplateDTO */ - projects: Array + repositoryUrl: string /** * * @type {string} - * @memberof CreateWorkspaceDTO + * @memberof CreateWorkspaceTemplateDTO */ - target: string + user?: string } /** * @@ -520,43 +683,155 @@ export interface DevcontainerConfig { /** * * @export - * @interface FRPSConfig + * @interface EnvironmentVariable */ -export interface FRPSConfig { +export interface EnvironmentVariable { /** * * @type {string} - * @memberof FRPSConfig + * @memberof EnvironmentVariable */ - domain: string - /** - * - * @type {number} - * @memberof FRPSConfig - */ - port: number + key: string /** * * @type {string} - * @memberof FRPSConfig + * @memberof EnvironmentVariable */ - protocol: string + value: string } /** * * @export - * @interface FileStatus + * @interface ExecuteRequest */ -export interface FileStatus { +export interface ExecuteRequest { /** * * @type {string} - * @memberof FileStatus + * @memberof ExecuteRequest */ - extra: string + command: string /** - * - * @type {string} + * Timeout in seconds, defaults to 10 seconds + * @type {number} + * @memberof ExecuteRequest + */ + timeout?: number +} +/** + * + * @export + * @interface ExecuteResponse + */ +export interface ExecuteResponse { + /** + * + * @type {number} + * @memberof ExecuteResponse + */ + code: number + /** + * + * @type {string} + * @memberof ExecuteResponse + */ + result: string +} +/** + * + * @export + * @interface FRPSConfig + */ +export interface FRPSConfig { + /** + * + * @type {string} + * @memberof FRPSConfig + */ + domain: string + /** + * + * @type {number} + * @memberof FRPSConfig + */ + port: number + /** + * + * @type {string} + * @memberof FRPSConfig + */ + protocol: string +} +/** + * + * @export + * @interface FileInfo + */ +export interface FileInfo { + /** + * + * @type {string} + * @memberof FileInfo + */ + group: string + /** + * + * @type {boolean} + * @memberof FileInfo + */ + isDir: boolean + /** + * + * @type {string} + * @memberof FileInfo + */ + modTime: string + /** + * + * @type {string} + * @memberof FileInfo + */ + mode: string + /** + * + * @type {string} + * @memberof FileInfo + */ + name: string + /** + * + * @type {string} + * @memberof FileInfo + */ + owner: string + /** + * + * @type {string} + * @memberof FileInfo + */ + permissions: string + /** + * + * @type {number} + * @memberof FileInfo + */ + size: number +} +/** + * + * @export + * @interface FileStatus + */ +export interface FileStatus { + /** + * + * @type {string} + * @memberof FileStatus + */ + extra: string + /** + * + * @type {string} * @memberof FileStatus */ name: string @@ -635,6 +910,25 @@ export interface GetRepositoryContext { */ url: string } +/** + * + * @export + * @interface GitAddRequest + */ +export interface GitAddRequest { + /** + * files to add (use . for all files) + * @type {Array} + * @memberof GitAddRequest + */ + files: Array + /** + * + * @type {string} + * @memberof GitAddRequest + */ + path: string +} /** * * @export @@ -654,6 +948,149 @@ export interface GitBranch { */ sha: string } +/** + * + * @export + * @interface GitBranchRequest + */ +export interface GitBranchRequest { + /** + * + * @type {string} + * @memberof GitBranchRequest + */ + name: string + /** + * + * @type {string} + * @memberof GitBranchRequest + */ + path: string +} +/** + * + * @export + * @interface GitCloneRequest + */ +export interface GitCloneRequest { + /** + * + * @type {string} + * @memberof GitCloneRequest + */ + branch?: string + /** + * + * @type {string} + * @memberof GitCloneRequest + */ + commit_id?: string + /** + * + * @type {string} + * @memberof GitCloneRequest + */ + password?: string + /** + * + * @type {string} + * @memberof GitCloneRequest + */ + path: string + /** + * + * @type {string} + * @memberof GitCloneRequest + */ + url: string + /** + * + * @type {string} + * @memberof GitCloneRequest + */ + username?: string +} +/** + * + * @export + * @interface GitCommitInfo + */ +export interface GitCommitInfo { + /** + * + * @type {string} + * @memberof GitCommitInfo + */ + author: string + /** + * + * @type {string} + * @memberof GitCommitInfo + */ + email: string + /** + * + * @type {string} + * @memberof GitCommitInfo + */ + hash: string + /** + * + * @type {string} + * @memberof GitCommitInfo + */ + message: string + /** + * + * @type {string} + * @memberof GitCommitInfo + */ + timestamp: string +} +/** + * + * @export + * @interface GitCommitRequest + */ +export interface GitCommitRequest { + /** + * + * @type {string} + * @memberof GitCommitRequest + */ + author: string + /** + * + * @type {string} + * @memberof GitCommitRequest + */ + email: string + /** + * + * @type {string} + * @memberof GitCommitRequest + */ + message: string + /** + * + * @type {string} + * @memberof GitCommitRequest + */ + path: string +} +/** + * + * @export + * @interface GitCommitResponse + */ +export interface GitCommitResponse { + /** + * + * @type {string} + * @memberof GitCommitResponse + */ + hash: string +} /** * * @export @@ -778,6 +1215,31 @@ export interface GitPullRequest { */ sourceRepoUrl: string } +/** + * + * @export + * @interface GitRepoRequest + */ +export interface GitRepoRequest { + /** + * + * @type {string} + * @memberof GitRepoRequest + */ + password?: string + /** + * + * @type {string} + * @memberof GitRepoRequest + */ + path: string + /** + * + * @type {string} + * @memberof GitRepoRequest + */ + username?: string +} /** * * @export @@ -917,416 +1379,696 @@ export interface GitUser { /** * * @export - * @interface InstallProviderRequest + * @interface Job */ -export interface InstallProviderRequest { +export interface Job { /** * - * @type {{ [key: string]: string; }} - * @memberof InstallProviderRequest + * @type {ModelsJobAction} + * @memberof Job */ - downloadUrls: { [key: string]: string } + action: ModelsJobAction /** * * @type {string} - * @memberof InstallProviderRequest + * @memberof Job */ - name: string -} -/** - * - * @export - * @interface NetworkKey - */ -export interface NetworkKey { + createdAt: string /** * * @type {string} - * @memberof NetworkKey + * @memberof Job */ - key: string -} -/** - * - * @export - * @interface PrebuildConfig - */ -export interface PrebuildConfig { + error?: string /** * * @type {string} - * @memberof PrebuildConfig + * @memberof Job */ - branch: string + id: string /** - * - * @type {number} - * @memberof PrebuildConfig + * JSON encoded metadata + * @type {string} + * @memberof Job */ - commitInterval: number + metadata?: string /** * * @type {string} - * @memberof PrebuildConfig + * @memberof Job */ - id: string + resourceId: string /** * - * @type {number} - * @memberof PrebuildConfig + * @type {ResourceType} + * @memberof Job */ - retention: number + resourceType: ResourceType /** * - * @type {Array} - * @memberof PrebuildConfig + * @type {string} + * @memberof Job */ - triggerFiles: Array + runnerId?: string + /** + * + * @type {JobState} + * @memberof Job + */ + state: JobState + /** + * + * @type {string} + * @memberof Job + */ + updatedAt: string } + /** * * @export - * @interface PrebuildDTO + * @enum {string} */ -export interface PrebuildDTO { + +export const JobState = { + JobStatePending: 'pending', + JobStateRunning: 'running', + JobStateError: 'error', + JobStateSuccess: 'success', +} as const + +export type JobState = (typeof JobState)[keyof typeof JobState] + +/** + * + * @export + * @interface ListBranchResponse + */ +export interface ListBranchResponse { /** * - * @type {string} - * @memberof PrebuildDTO + * @type {Array} + * @memberof ListBranchResponse */ - branch: string + branches: Array +} +/** + * + * @export + * @interface LogFileConfig + */ +export interface LogFileConfig { /** * - * @type {number} - * @memberof PrebuildDTO + * @type {boolean} + * @memberof LogFileConfig */ - commitInterval?: number + compress?: boolean /** * - * @type {string} - * @memberof PrebuildDTO + * @type {boolean} + * @memberof LogFileConfig */ - id: string + localTime?: boolean /** * - * @type {string} - * @memberof PrebuildDTO + * @type {number} + * @memberof LogFileConfig */ - projectConfigName: string + maxAge: number /** * * @type {number} - * @memberof PrebuildDTO + * @memberof LogFileConfig */ - retention: number + maxBackups: number /** * - * @type {Array} - * @memberof PrebuildDTO + * @type {number} + * @memberof LogFileConfig */ - triggerFiles?: Array -} -/** - * - * @export - * @interface ProfileData - */ -export interface ProfileData { + maxSize: number /** * - * @type {{ [key: string]: string; }} - * @memberof ProfileData + * @type {string} + * @memberof LogFileConfig */ - envVars: { [key: string]: string } + path: string } /** * * @export - * @interface Project + * @interface LspCompletionParams */ -export interface Project { +export interface LspCompletionParams { /** * - * @type {BuildConfig} - * @memberof Project + * @type {CompletionContext} + * @memberof LspCompletionParams */ - buildConfig?: BuildConfig + context?: CompletionContext /** * - * @type {{ [key: string]: string; }} - * @memberof Project + * @type {string} + * @memberof LspCompletionParams */ - envVars: { [key: string]: string } + languageId: string /** * * @type {string} - * @memberof Project + * @memberof LspCompletionParams */ - gitProviderConfigId?: string + pathToProject: string /** * - * @type {string} - * @memberof Project + * @type {Position} + * @memberof LspCompletionParams */ - image: string + position: Position /** * * @type {string} - * @memberof Project + * @memberof LspCompletionParams */ - name: string + uri: string +} +/** + * + * @export + * @interface LspDocumentRequest + */ +export interface LspDocumentRequest { /** * - * @type {GitRepository} - * @memberof Project + * @type {string} + * @memberof LspDocumentRequest */ - repository: GitRepository + languageId: string /** * - * @type {ProjectState} - * @memberof Project + * @type {string} + * @memberof LspDocumentRequest */ - state?: ProjectState + pathToProject: string /** * * @type {string} - * @memberof Project + * @memberof LspDocumentRequest */ - target: string + uri: string +} +/** + * + * @export + * @interface LspLocation + */ +export interface LspLocation { /** * - * @type {string} - * @memberof Project + * @type {LspRange} + * @memberof LspLocation */ - user: string + range: LspRange /** * * @type {string} - * @memberof Project + * @memberof LspLocation */ - workspaceId: string + uri: string } /** * * @export - * @interface ProjectConfig + * @interface LspPosition */ -export interface ProjectConfig { +export interface LspPosition { /** * - * @type {BuildConfig} - * @memberof ProjectConfig + * @type {number} + * @memberof LspPosition */ - buildConfig?: BuildConfig + character: number /** * - * @type {boolean} - * @memberof ProjectConfig + * @type {number} + * @memberof LspPosition */ - default: boolean + line: number +} +/** + * + * @export + * @interface LspRange + */ +export interface LspRange { /** * - * @type {{ [key: string]: string; }} - * @memberof ProjectConfig + * @type {LspPosition} + * @memberof LspRange */ - envVars: { [key: string]: string } + end: LspPosition /** * - * @type {string} - * @memberof ProjectConfig + * @type {LspPosition} + * @memberof LspRange */ - gitProviderConfigId?: string + start: LspPosition +} +/** + * + * @export + * @interface LspServerRequest + */ +export interface LspServerRequest { /** * * @type {string} - * @memberof ProjectConfig + * @memberof LspServerRequest */ - image: string + languageId: string /** * * @type {string} - * @memberof ProjectConfig + * @memberof LspServerRequest */ - name: string + pathToProject: string +} +/** + * + * @export + * @interface LspSymbol + */ +export interface LspSymbol { /** * - * @type {Array} - * @memberof ProjectConfig + * @type {number} + * @memberof LspSymbol */ - prebuilds?: Array + kind: number /** * - * @type {string} - * @memberof ProjectConfig + * @type {LspLocation} + * @memberof LspSymbol */ - repositoryUrl: string + location: LspLocation /** * * @type {string} - * @memberof ProjectConfig + * @memberof LspSymbol */ - user: string + name: string } /** * * @export - * @interface ProjectInfo + * @interface Match */ -export interface ProjectInfo { +export interface Match { /** * * @type {string} - * @memberof ProjectInfo + * @memberof Match */ - created: string + content: string /** * - * @type {boolean} - * @memberof ProjectInfo + * @type {string} + * @memberof Match */ - isRunning: boolean + file: string /** * - * @type {string} - * @memberof ProjectInfo + * @type {number} + * @memberof Match */ - name: string + line: number +} +/** + * + * @export + * @enum {string} + */ + +export const ModelsApiKeyType = { + ApiKeyTypeClient: 'client', + ApiKeyTypeWorkspace: 'workspace', + ApiKeyTypeTarget: 'target', + ApiKeyTypeRunner: 'runner', +} as const + +export type ModelsApiKeyType = + (typeof ModelsApiKeyType)[keyof typeof ModelsApiKeyType] + +/** + * + * @export + * @enum {string} + */ + +export const ModelsJobAction = { + JobActionCreate: 'create', + JobActionStart: 'start', + JobActionStop: 'stop', + JobActionRestart: 'restart', + JobActionDelete: 'delete', + JobActionForceDelete: 'force-delete', + JobActionRun: 'run', + JobActionInstallProvider: 'install-provider', + JobActionUninstallProvider: 'uninstall-provider', + JobActionUpdateProvider: 'update-provider', +} as const + +export type ModelsJobAction = + (typeof ModelsJobAction)[keyof typeof ModelsJobAction] + +/** + * + * @export + * @enum {string} + */ + +export const ModelsResourceStateName = { + ResourceStateNameUndefined: 'undefined', + ResourceStateNamePendingRun: 'pending-run', + ResourceStateNameRunning: 'running', + ResourceStateNameRunSuccessful: 'run-successful', + ResourceStateNamePendingCreate: 'pending-create', + ResourceStateNameCreating: 'creating', + ResourceStateNamePendingStart: 'pending-start', + ResourceStateNameStarting: 'starting', + ResourceStateNameStarted: 'started', + ResourceStateNamePendingStop: 'pending-stop', + ResourceStateNameStopping: 'stopping', + ResourceStateNameStopped: 'stopped', + ResourceStateNamePendingRestart: 'pending-restart', + ResourceStateNameError: 'error', + ResourceStateNameUnresponsive: 'unresponsive', + ResourceStateNamePendingDelete: 'pending-delete', + ResourceStateNamePendingForcedDelete: 'pending-forced-delete', + ResourceStateNameDeleting: 'deleting', + ResourceStateNameDeleted: 'deleted', +} as const + +export type ModelsResourceStateName = + (typeof ModelsResourceStateName)[keyof typeof ModelsResourceStateName] + +/** + * + * @export + * @enum {string} + */ + +export const ModelsTargetConfigPropertyType = { + TargetConfigPropertyTypeString: 'string', + TargetConfigPropertyTypeOption: 'option', + TargetConfigPropertyTypeBoolean: 'boolean', + TargetConfigPropertyTypeInt: 'int', + TargetConfigPropertyTypeFloat: 'float', + TargetConfigPropertyTypeFilePath: 'file-path', +} as const + +export type ModelsTargetConfigPropertyType = + (typeof ModelsTargetConfigPropertyType)[keyof typeof ModelsTargetConfigPropertyType] + +/** + * + * @export + * @interface NetworkKey + */ +export interface NetworkKey { /** * * @type {string} - * @memberof ProjectInfo + * @memberof NetworkKey */ - providerMetadata?: string + key: string +} +/** + * + * @export + * @interface Position + */ +export interface Position { /** * - * @type {string} - * @memberof ProjectInfo + * @type {number} + * @memberof Position */ - workspaceId: string + character: number + /** + * + * @type {number} + * @memberof Position + */ + line: number } /** * * @export - * @interface ProjectState + * @interface PrebuildConfig */ -export interface ProjectState { +export interface PrebuildConfig { /** * - * @type {GitStatus} - * @memberof ProjectState + * @type {string} + * @memberof PrebuildConfig + */ + branch: string + /** + * + * @type {number} + * @memberof PrebuildConfig */ - gitStatus: GitStatus + commitInterval?: number /** * * @type {string} - * @memberof ProjectState + * @memberof PrebuildConfig */ - updatedAt: string + id: string /** * * @type {number} - * @memberof ProjectState + * @memberof PrebuildConfig */ - uptime: number + retention: number + /** + * + * @type {Array} + * @memberof PrebuildConfig + */ + triggerFiles: Array } /** * * @export - * @interface Provider + * @interface PrebuildDTO */ -export interface Provider { +export interface PrebuildDTO { /** * * @type {string} - * @memberof Provider + * @memberof PrebuildDTO */ - label?: string + branch: string + /** + * + * @type {number} + * @memberof PrebuildDTO + */ + commitInterval?: number /** * * @type {string} - * @memberof Provider + * @memberof PrebuildDTO */ - name: string + id: string + /** + * + * @type {number} + * @memberof PrebuildDTO + */ + retention: number + /** + * + * @type {Array} + * @memberof PrebuildDTO + */ + triggerFiles?: Array /** * * @type {string} - * @memberof Provider + * @memberof PrebuildDTO */ - version: string + workspaceTemplateName: string } /** * * @export - * @interface ProviderProviderInfo + * @interface ProviderDTO */ -export interface ProviderProviderInfo { +export interface ProviderDTO { /** * * @type {string} - * @memberof ProviderProviderInfo + * @memberof ProviderDTO */ label?: string + /** + * + * @type {boolean} + * @memberof ProviderDTO + */ + latest: boolean /** * * @type {string} - * @memberof ProviderProviderInfo + * @memberof ProviderDTO */ name: string /** * * @type {string} - * @memberof ProviderProviderInfo + * @memberof ProviderDTO */ version: string } /** * * @export - * @interface ProviderProviderTargetProperty + * @interface ProviderInfo */ -export interface ProviderProviderTargetProperty { +export interface ProviderInfo { /** - * DefaultValue is converted into the appropriate type based on the Type If the property is a FilePath, the DefaultValue is a path to a directory - * @type {string} - * @memberof ProviderProviderTargetProperty + * + * @type {boolean} + * @memberof ProviderInfo */ - defaultValue?: string + agentlessTarget?: boolean /** - * Brief description of the property + * * @type {string} - * @memberof ProviderProviderTargetProperty + * @memberof ProviderInfo */ - description?: string + label?: string /** - * A regex string matched with the name of the target to determine if the property should be disabled If the regex matches the target name, the property will be disabled E.g. \"^local$\" will disable the property for the local target + * * @type {string} - * @memberof ProviderProviderTargetProperty + * @memberof ProviderInfo */ - disabledPredicate?: string + name: string /** * - * @type {boolean} - * @memberof ProviderProviderTargetProperty + * @type {string} + * @memberof ProviderInfo */ - inputMasked?: boolean + runnerId: string /** - * Options is only used if the Type is ProviderTargetPropertyTypeOption - * @type {Array} - * @memberof ProviderProviderTargetProperty + * + * @type {string} + * @memberof ProviderInfo */ - options?: Array + runnerName: string /** - * Suggestions is an optional list of auto-complete values to assist the user while filling the field + * + * @type {{ [key: string]: TargetConfigProperty; }} + * @memberof ProviderInfo + */ + targetConfigManifest: { [key: string]: TargetConfigProperty } + /** + * + * @type {string} + * @memberof ProviderInfo + */ + version: string +} +/** + * + * @export + * @interface ReplaceRequest + */ +export interface ReplaceRequest { + /** + * * @type {Array} - * @memberof ProviderProviderTargetProperty + * @memberof ReplaceRequest */ - suggestions?: Array + files: Array + /** + * + * @type {string} + * @memberof ReplaceRequest + */ + newValue: string + /** + * + * @type {string} + * @memberof ReplaceRequest + */ + pattern: string +} +/** + * + * @export + * @interface ReplaceResult + */ +export interface ReplaceResult { + /** + * + * @type {string} + * @memberof ReplaceResult + */ + error?: string + /** + * + * @type {string} + * @memberof ReplaceResult + */ + file?: string + /** + * + * @type {boolean} + * @memberof ReplaceResult + */ + success?: boolean +} +/** + * + * @export + * @interface RepositoryUrl + */ +export interface RepositoryUrl { + /** + * + * @type {string} + * @memberof RepositoryUrl + */ + url: string +} +/** + * + * @export + * @interface ResourceState + */ +export interface ResourceState { /** * - * @type {ProviderProviderTargetPropertyType} - * @memberof ProviderProviderTargetProperty + * @type {string} + * @memberof ResourceState + */ + error?: string + /** + * + * @type {ModelsResourceStateName} + * @memberof ResourceState + */ + name: ModelsResourceStateName + /** + * + * @type {string} + * @memberof ResourceState */ - type?: ProviderProviderTargetPropertyType + updatedAt: string } /** @@ -1335,61 +2077,82 @@ export interface ProviderProviderTargetProperty { * @enum {string} */ -export const ProviderProviderTargetPropertyType = { - ProviderTargetPropertyTypeString: 'string', - ProviderTargetPropertyTypeOption: 'option', - ProviderTargetPropertyTypeBoolean: 'boolean', - ProviderTargetPropertyTypeInt: 'int', - ProviderTargetPropertyTypeFloat: 'float', - ProviderTargetPropertyTypeFilePath: 'file-path', +export const ResourceType = { + ResourceTypeWorkspace: 'workspace', + ResourceTypeTarget: 'target', + ResourceTypeBuild: 'build', + ResourceTypeRunner: 'runner', } as const -export type ProviderProviderTargetPropertyType = - (typeof ProviderProviderTargetPropertyType)[keyof typeof ProviderProviderTargetPropertyType] +export type ResourceType = (typeof ResourceType)[keyof typeof ResourceType] /** * * @export - * @interface ProviderTarget + * @interface RunnerDTO */ -export interface ProviderTarget { +export interface RunnerDTO { /** * - * @type {boolean} - * @memberof ProviderTarget + * @type {string} + * @memberof RunnerDTO */ - isDefault: boolean + id: string /** * - * @type {string} - * @memberof ProviderTarget + * @type {RunnerMetadata} + * @memberof RunnerDTO */ - name: string + metadata?: RunnerMetadata /** - * JSON encoded map of options + * * @type {string} - * @memberof ProviderTarget + * @memberof RunnerDTO */ - options: string + name: string /** * - * @type {ProviderProviderInfo} - * @memberof ProviderTarget + * @type {ResourceState} + * @memberof RunnerDTO */ - providerInfo: ProviderProviderInfo + state: ResourceState } /** * * @export - * @interface RepositoryUrl + * @interface RunnerMetadata */ -export interface RepositoryUrl { +export interface RunnerMetadata { + /** + * + * @type {Array} + * @memberof RunnerMetadata + */ + providers: Array /** * * @type {string} - * @memberof RepositoryUrl + * @memberof RunnerMetadata */ - url: string + runnerId: string + /** + * + * @type {number} + * @memberof RunnerMetadata + */ + runningJobs?: number + /** + * + * @type {string} + * @memberof RunnerMetadata + */ + updatedAt: string + /** + * + * @type {number} + * @memberof RunnerMetadata + */ + uptime: number } /** * @@ -1416,6 +2179,19 @@ export interface Sample { */ name: string } +/** + * + * @export + * @interface SearchFilesResponse + */ +export interface SearchFilesResponse { + /** + * + * @type {Array} + * @memberof SearchFilesResponse + */ + files: Array +} /** * * @export @@ -1457,13 +2233,13 @@ export interface ServerConfig { * @type {string} * @memberof ServerConfig */ - defaultProjectImage: string + defaultWorkspaceImage: string /** * * @type {string} * @memberof ServerConfig */ - defaultProjectUser: string + defaultWorkspaceUser: string /** * * @type {FRPSConfig} @@ -1496,16 +2272,16 @@ export interface ServerConfig { localBuilderRegistryPort: number /** * - * @type {string} + * @type {boolean} * @memberof ServerConfig */ - logFilePath: string + localRunnerDisabled?: boolean /** * - * @type {string} + * @type {LogFileConfig} * @memberof ServerConfig */ - providersDir: string + logFile: LogFileConfig /** * * @type {string} @@ -1525,6 +2301,69 @@ export interface ServerConfig { */ serverDownloadUrl: string } +/** + * + * @export + * @interface Session + */ +export interface Session { + /** + * + * @type {Array} + * @memberof Session + */ + commands: Array + /** + * + * @type {string} + * @memberof Session + */ + sessionId: string +} +/** + * + * @export + * @interface SessionExecuteRequest + */ +export interface SessionExecuteRequest { + /** + * + * @type {boolean} + * @memberof SessionExecuteRequest + */ + async?: boolean + /** + * + * @type {string} + * @memberof SessionExecuteRequest + */ + command: string +} +/** + * + * @export + * @interface SessionExecuteResponse + */ +export interface SessionExecuteResponse { + /** + * + * @type {string} + * @memberof SessionExecuteResponse + */ + cmdId?: string + /** + * + * @type {number} + * @memberof SessionExecuteResponse + */ + exitCode?: number + /** + * + * @type {string} + * @memberof SessionExecuteResponse + */ + output?: string +} /** * * @export @@ -1581,25 +2420,6 @@ export interface SetGitProviderConfig { username?: string } -/** - * - * @export - * @interface SetProjectState - */ -export interface SetProjectState { - /** - * - * @type {GitStatus} - * @memberof SetProjectState - */ - gitStatus?: GitStatus - /** - * - * @type {number} - * @memberof SetProjectState - */ - uptime: number -} /** * * @export @@ -1635,598 +2455,9126 @@ export type Status = (typeof Status)[keyof typeof Status] /** * * @export - * @interface Workspace + * @interface Target */ -export interface Workspace { +export interface Target { + /** + * + * @type {boolean} + * @memberof Target + */ + default: boolean + /** + * + * @type {{ [key: string]: string; }} + * @memberof Target + */ + envVars: { [key: string]: string } /** * * @type {string} - * @memberof Workspace + * @memberof Target */ id: string + /** + * + * @type {Job} + * @memberof Target + */ + lastJob?: Job /** * * @type {string} - * @memberof Workspace + * @memberof Target + */ + lastJobId?: string + /** + * + * @type {TargetMetadata} + * @memberof Target + */ + metadata?: TargetMetadata + /** + * + * @type {string} + * @memberof Target */ name: string /** * - * @type {Array} - * @memberof Workspace + * @type {string} + * @memberof Target + */ + providerMetadata?: string + /** + * + * @type {TargetConfig} + * @memberof Target */ - projects: Array + targetConfig: TargetConfig /** * * @type {string} - * @memberof Workspace + * @memberof Target + */ + targetConfigId: string + /** + * + * @type {Array} + * @memberof Target */ - target: string + workspaces: Array } /** * * @export - * @interface WorkspaceDTO + * @interface TargetConfig */ -export interface WorkspaceDTO { +export interface TargetConfig { /** * - * @type {string} - * @memberof WorkspaceDTO + * @type {boolean} + * @memberof TargetConfig */ - id: string + deleted: boolean /** * - * @type {WorkspaceInfo} - * @memberof WorkspaceDTO + * @type {string} + * @memberof TargetConfig */ - info?: WorkspaceInfo + id: string /** * * @type {string} - * @memberof WorkspaceDTO + * @memberof TargetConfig */ name: string /** - * - * @type {Array} - * @memberof WorkspaceDTO + * JSON encoded map of options + * @type {string} + * @memberof TargetConfig */ - projects: Array + options: string /** * - * @type {string} - * @memberof WorkspaceDTO + * @type {ProviderInfo} + * @memberof TargetConfig */ - target: string + providerInfo: ProviderInfo } /** * * @export - * @interface WorkspaceInfo + * @interface TargetConfigProperty */ -export interface WorkspaceInfo { +export interface TargetConfigProperty { /** - * + * DefaultValue is converted into the appropriate type based on the Type If the property is a FilePath, the DefaultValue is a path to a directory * @type {string} - * @memberof WorkspaceInfo + * @memberof TargetConfigProperty */ - name: string + defaultValue?: string + /** + * Brief description of the property + * @type {string} + * @memberof TargetConfigProperty + */ + description?: string + /** + * A regex string matched with the name of the target config to determine if the property should be disabled If the regex matches the target config name, the property will be disabled E.g. \"^local$\" will disable the property for the local target + * @type {string} + * @memberof TargetConfigProperty + */ + disabledPredicate?: string /** * - * @type {Array} - * @memberof WorkspaceInfo + * @type {boolean} + * @memberof TargetConfigProperty + */ + inputMasked?: boolean + /** + * Options is only used if the Type is TargetConfigPropertyTypeOption + * @type {Array} + * @memberof TargetConfigProperty + */ + options?: Array + /** + * Suggestions is an optional list of auto-complete values to assist the user while filling the field + * @type {Array} + * @memberof TargetConfigProperty */ - projects: Array + suggestions?: Array /** * - * @type {string} - * @memberof WorkspaceInfo + * @type {ModelsTargetConfigPropertyType} + * @memberof TargetConfigProperty */ - providerMetadata?: string + type?: ModelsTargetConfigPropertyType } /** - * ApiKeyApi - axios parameter creator + * * @export + * @interface TargetDTO */ -export const ApiKeyApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * Generate an API key - * @summary Generate an API key +export interface TargetDTO { + /** + * + * @type {boolean} + * @memberof TargetDTO + */ + default: boolean + /** + * + * @type {{ [key: string]: string; }} + * @memberof TargetDTO + */ + envVars: { [key: string]: string } + /** + * + * @type {string} + * @memberof TargetDTO + */ + id: string + /** + * + * @type {Job} + * @memberof TargetDTO + */ + lastJob?: Job + /** + * + * @type {string} + * @memberof TargetDTO + */ + lastJobId?: string + /** + * + * @type {TargetMetadata} + * @memberof TargetDTO + */ + metadata?: TargetMetadata + /** + * + * @type {string} + * @memberof TargetDTO + */ + name: string + /** + * + * @type {string} + * @memberof TargetDTO + */ + providerMetadata?: string + /** + * + * @type {ResourceState} + * @memberof TargetDTO + */ + state: ResourceState + /** + * + * @type {TargetConfig} + * @memberof TargetDTO + */ + targetConfig: TargetConfig + /** + * + * @type {string} + * @memberof TargetDTO + */ + targetConfigId: string + /** + * + * @type {Array} + * @memberof TargetDTO + */ + workspaces: Array +} +/** + * + * @export + * @interface TargetMetadata + */ +export interface TargetMetadata { + /** + * + * @type {string} + * @memberof TargetMetadata + */ + targetId: string + /** + * + * @type {string} + * @memberof TargetMetadata + */ + updatedAt: string + /** + * + * @type {number} + * @memberof TargetMetadata + */ + uptime: number +} +/** + * + * @export + * @interface UpdateJobState + */ +export interface UpdateJobState { + /** + * + * @type {string} + * @memberof UpdateJobState + */ + errorMessage?: string + /** + * + * @type {JobState} + * @memberof UpdateJobState + */ + state: JobState +} + +/** + * + * @export + * @interface UpdateRunnerMetadataDTO + */ +export interface UpdateRunnerMetadataDTO { + /** + * + * @type {Array} + * @memberof UpdateRunnerMetadataDTO + */ + providers: Array + /** + * + * @type {number} + * @memberof UpdateRunnerMetadataDTO + */ + runningJobs?: number + /** + * + * @type {number} + * @memberof UpdateRunnerMetadataDTO + */ + uptime: number +} +/** + * + * @export + * @interface UpdateTargetMetadataDTO + */ +export interface UpdateTargetMetadataDTO { + /** + * + * @type {number} + * @memberof UpdateTargetMetadataDTO + */ + uptime: number +} +/** + * + * @export + * @interface UpdateTargetProviderMetadataDTO + */ +export interface UpdateTargetProviderMetadataDTO { + /** + * + * @type {string} + * @memberof UpdateTargetProviderMetadataDTO + */ + metadata: string +} +/** + * + * @export + * @interface UpdateWorkspaceMetadataDTO + */ +export interface UpdateWorkspaceMetadataDTO { + /** + * + * @type {GitStatus} + * @memberof UpdateWorkspaceMetadataDTO + */ + gitStatus?: GitStatus + /** + * + * @type {number} + * @memberof UpdateWorkspaceMetadataDTO + */ + uptime: number +} +/** + * + * @export + * @interface UpdateWorkspaceProviderMetadataDTO + */ +export interface UpdateWorkspaceProviderMetadataDTO { + /** + * + * @type {string} + * @memberof UpdateWorkspaceProviderMetadataDTO + */ + metadata: string +} +/** + * + * @export + * @interface Workspace + */ +export interface Workspace { + /** + * + * @type {string} + * @memberof Workspace + */ + apiKey: string + /** + * + * @type {BuildConfig} + * @memberof Workspace + */ + buildConfig?: BuildConfig + /** + * + * @type {{ [key: string]: string; }} + * @memberof Workspace + */ + envVars: { [key: string]: string } + /** + * + * @type {string} + * @memberof Workspace + */ + gitProviderConfigId?: string + /** + * + * @type {string} + * @memberof Workspace + */ + id: string + /** + * + * @type {string} + * @memberof Workspace + */ + image: string + /** + * + * @type {{ [key: string]: string; }} + * @memberof Workspace + */ + labels: { [key: string]: string } + /** + * + * @type {Job} + * @memberof Workspace + */ + lastJob?: Job + /** + * + * @type {string} + * @memberof Workspace + */ + lastJobId?: string + /** + * + * @type {WorkspaceMetadata} + * @memberof Workspace + */ + metadata?: WorkspaceMetadata + /** + * + * @type {string} + * @memberof Workspace + */ + name: string + /** + * + * @type {string} + * @memberof Workspace + */ + providerMetadata?: string + /** + * + * @type {GitRepository} + * @memberof Workspace + */ + repository: GitRepository + /** + * + * @type {Target} + * @memberof Workspace + */ + target: Target + /** + * + * @type {string} + * @memberof Workspace + */ + targetId: string + /** + * + * @type {string} + * @memberof Workspace + */ + user: string +} +/** + * + * @export + * @interface WorkspaceDTO + */ +export interface WorkspaceDTO { + /** + * + * @type {string} + * @memberof WorkspaceDTO + */ + apiKey: string + /** + * + * @type {BuildConfig} + * @memberof WorkspaceDTO + */ + buildConfig?: BuildConfig + /** + * + * @type {{ [key: string]: string; }} + * @memberof WorkspaceDTO + */ + envVars: { [key: string]: string } + /** + * + * @type {string} + * @memberof WorkspaceDTO + */ + gitProviderConfigId?: string + /** + * + * @type {string} + * @memberof WorkspaceDTO + */ + id: string + /** + * + * @type {string} + * @memberof WorkspaceDTO + */ + image: string + /** + * + * @type {{ [key: string]: string; }} + * @memberof WorkspaceDTO + */ + labels: { [key: string]: string } + /** + * + * @type {Job} + * @memberof WorkspaceDTO + */ + lastJob?: Job + /** + * + * @type {string} + * @memberof WorkspaceDTO + */ + lastJobId?: string + /** + * + * @type {WorkspaceMetadata} + * @memberof WorkspaceDTO + */ + metadata?: WorkspaceMetadata + /** + * + * @type {string} + * @memberof WorkspaceDTO + */ + name: string + /** + * + * @type {string} + * @memberof WorkspaceDTO + */ + providerMetadata?: string + /** + * + * @type {GitRepository} + * @memberof WorkspaceDTO + */ + repository: GitRepository + /** + * + * @type {ResourceState} + * @memberof WorkspaceDTO + */ + state: ResourceState + /** + * + * @type {Target} + * @memberof WorkspaceDTO + */ + target: Target + /** + * + * @type {string} + * @memberof WorkspaceDTO + */ + targetId: string + /** + * + * @type {string} + * @memberof WorkspaceDTO + */ + user: string +} +/** + * + * @export + * @interface WorkspaceDirResponse + */ +export interface WorkspaceDirResponse { + /** + * + * @type {string} + * @memberof WorkspaceDirResponse + */ + dir?: string +} +/** + * + * @export + * @interface WorkspaceMetadata + */ +export interface WorkspaceMetadata { + /** + * + * @type {GitStatus} + * @memberof WorkspaceMetadata + */ + gitStatus?: GitStatus + /** + * + * @type {string} + * @memberof WorkspaceMetadata + */ + updatedAt: string + /** + * + * @type {number} + * @memberof WorkspaceMetadata + */ + uptime: number + /** + * + * @type {string} + * @memberof WorkspaceMetadata + */ + workspaceId: string +} +/** + * + * @export + * @interface WorkspaceTemplate + */ +export interface WorkspaceTemplate { + /** + * + * @type {BuildConfig} + * @memberof WorkspaceTemplate + */ + buildConfig?: BuildConfig + /** + * + * @type {boolean} + * @memberof WorkspaceTemplate + */ + default: boolean + /** + * + * @type {{ [key: string]: string; }} + * @memberof WorkspaceTemplate + */ + envVars: { [key: string]: string } + /** + * + * @type {string} + * @memberof WorkspaceTemplate + */ + gitProviderConfigId?: string + /** + * + * @type {string} + * @memberof WorkspaceTemplate + */ + image: string + /** + * + * @type {{ [key: string]: string; }} + * @memberof WorkspaceTemplate + */ + labels: { [key: string]: string } + /** + * + * @type {string} + * @memberof WorkspaceTemplate + */ + name: string + /** + * + * @type {Array} + * @memberof WorkspaceTemplate + */ + prebuilds?: Array + /** + * + * @type {string} + * @memberof WorkspaceTemplate + */ + repositoryUrl: string + /** + * + * @type {string} + * @memberof WorkspaceTemplate + */ + user: string +} + +/** + * ApiKeyApi - axios parameter creator + * @export + */ +export const ApiKeyApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * Create an API key + * @summary Create an API key + * @param {string} apiKeyName API key name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createApiKey: async ( + apiKeyName: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'apiKeyName' is not null or undefined + assertParamExists('createApiKey', 'apiKeyName', apiKeyName) + const localVarPath = `/apikey/{apiKeyName}`.replace( + `{${'apiKeyName'}}`, + encodeURIComponent(String(apiKeyName)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete API key + * @summary Delete API key + * @param {string} apiKeyName API key name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteApiKey: async ( + apiKeyName: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'apiKeyName' is not null or undefined + assertParamExists('deleteApiKey', 'apiKeyName', apiKeyName) + const localVarPath = `/apikey/{apiKeyName}`.replace( + `{${'apiKeyName'}}`, + encodeURIComponent(String(apiKeyName)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List API keys + * @summary List API keys + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listClientApiKeys: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/apikey` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ApiKeyApi - functional programming interface + * @export + */ +export const ApiKeyApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ApiKeyApiAxiosParamCreator(configuration) + return { + /** + * Create an API key + * @summary Create an API key + * @param {string} apiKeyName API key name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createApiKey( + apiKeyName: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.createApiKey( + apiKeyName, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['ApiKeyApi.createApiKey']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Delete API key + * @summary Delete API key + * @param {string} apiKeyName API key name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteApiKey( + apiKeyName: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteApiKey( + apiKeyName, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['ApiKeyApi.deleteApiKey']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * List API keys + * @summary List API keys + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listClientApiKeys( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.listClientApiKeys(options) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['ApiKeyApi.listClientApiKeys']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + } +} + +/** + * ApiKeyApi - factory interface + * @export + */ +export const ApiKeyApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ApiKeyApiFp(configuration) + return { + /** + * Create an API key + * @summary Create an API key + * @param {string} apiKeyName API key name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createApiKey( + apiKeyName: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createApiKey(apiKeyName, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete API key + * @summary Delete API key * @param {string} apiKeyName API key name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - generateApiKey: async ( - apiKeyName: string, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'apiKeyName' is not null or undefined - assertParamExists('generateApiKey', 'apiKeyName', apiKeyName) - const localVarPath = `/apikey/{apiKeyName}`.replace( - `{${'apiKeyName'}}`, - encodeURIComponent(String(apiKeyName)), - ) - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, + deleteApiKey( + apiKeyName: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deleteApiKey(apiKeyName, options) + .then((request) => request(axios, basePath)) + }, + /** + * List API keys + * @summary List API keys + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listClientApiKeys( + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .listClientApiKeys(options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * ApiKeyApi - object-oriented interface + * @export + * @class ApiKeyApi + * @extends {BaseAPI} + */ +export class ApiKeyApi extends BaseAPI { + /** + * Create an API key + * @summary Create an API key + * @param {string} apiKeyName API key name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiKeyApi + */ + public createApiKey(apiKeyName: string, options?: RawAxiosRequestConfig) { + return ApiKeyApiFp(this.configuration) + .createApiKey(apiKeyName, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete API key + * @summary Delete API key + * @param {string} apiKeyName API key name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiKeyApi + */ + public deleteApiKey(apiKeyName: string, options?: RawAxiosRequestConfig) { + return ApiKeyApiFp(this.configuration) + .deleteApiKey(apiKeyName, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List API keys + * @summary List API keys + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiKeyApi + */ + public listClientApiKeys(options?: RawAxiosRequestConfig) { + return ApiKeyApiFp(this.configuration) + .listClientApiKeys(options) + .then((request) => request(this.axios, this.basePath)) + } +} + +/** + * BuildApi - axios parameter creator + * @export + */ +export const BuildApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * Create a build + * @summary Create a build + * @param {CreateBuildDTO} createBuildDto Create Build DTO + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createBuild: async ( + createBuildDto: CreateBuildDTO, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'createBuildDto' is not null or undefined + assertParamExists('createBuild', 'createBuildDto', createBuildDto) + const localVarPath = `/build` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + createBuildDto, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete ALL builds + * @summary Delete ALL builds + * @param {boolean} [force] Force + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteAllBuilds: async ( + force?: boolean, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/build` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (force !== undefined) { + localVarQueryParameter['force'] = force + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete build + * @summary Delete build + * @param {string} buildId Build ID + * @param {boolean} [force] Force + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteBuild: async ( + buildId: string, + force?: boolean, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'buildId' is not null or undefined + assertParamExists('deleteBuild', 'buildId', buildId) + const localVarPath = `/build/{buildId}`.replace( + `{${'buildId'}}`, + encodeURIComponent(String(buildId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (force !== undefined) { + localVarQueryParameter['force'] = force + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete builds + * @summary Delete builds + * @param {string} prebuildId Prebuild ID + * @param {boolean} [force] Force + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteBuildsFromPrebuild: async ( + prebuildId: string, + force?: boolean, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'prebuildId' is not null or undefined + assertParamExists('deleteBuildsFromPrebuild', 'prebuildId', prebuildId) + const localVarPath = `/build/prebuild/{prebuildId}`.replace( + `{${'prebuildId'}}`, + encodeURIComponent(String(prebuildId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (force !== undefined) { + localVarQueryParameter['force'] = force + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Find build + * @summary Find build + * @param {string} buildId Build ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findBuild: async ( + buildId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'buildId' is not null or undefined + assertParamExists('findBuild', 'buildId', buildId) + const localVarPath = `/build/{buildId}`.replace( + `{${'buildId'}}`, + encodeURIComponent(String(buildId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List builds + * @summary List builds + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listBuilds: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/build` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List successful builds for Git repository + * @summary List successful builds for Git repository + * @param {string} repoUrl Repository URL + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listSuccessfulBuilds: async ( + repoUrl: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'repoUrl' is not null or undefined + assertParamExists('listSuccessfulBuilds', 'repoUrl', repoUrl) + const localVarPath = `/build/successful/{repoUrl}`.replace( + `{${'repoUrl'}}`, + encodeURIComponent(String(repoUrl)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * BuildApi - functional programming interface + * @export + */ +export const BuildApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = BuildApiAxiosParamCreator(configuration) + return { + /** + * Create a build + * @summary Create a build + * @param {CreateBuildDTO} createBuildDto Create Build DTO + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createBuild( + createBuildDto: CreateBuildDTO, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.createBuild( + createBuildDto, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['BuildApi.createBuild']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Delete ALL builds + * @summary Delete ALL builds + * @param {boolean} [force] Force + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteAllBuilds( + force?: boolean, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAllBuilds( + force, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['BuildApi.deleteAllBuilds']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Delete build + * @summary Delete build + * @param {string} buildId Build ID + * @param {boolean} [force] Force + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteBuild( + buildId: string, + force?: boolean, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBuild( + buildId, + force, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['BuildApi.deleteBuild']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Delete builds + * @summary Delete builds + * @param {string} prebuildId Prebuild ID + * @param {boolean} [force] Force + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteBuildsFromPrebuild( + prebuildId: string, + force?: boolean, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.deleteBuildsFromPrebuild( + prebuildId, + force, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['BuildApi.deleteBuildsFromPrebuild']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Find build + * @summary Find build + * @param {string} buildId Build ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async findBuild( + buildId: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.findBuild( + buildId, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['BuildApi.findBuild']?.[localVarOperationServerIndex] + ?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * List builds + * @summary List builds + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listBuilds( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listBuilds( + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['BuildApi.listBuilds']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * List successful builds for Git repository + * @summary List successful builds for Git repository + * @param {string} repoUrl Repository URL + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listSuccessfulBuilds( + repoUrl: string, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.listSuccessfulBuilds(repoUrl, options) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['BuildApi.listSuccessfulBuilds']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + } +} + +/** + * BuildApi - factory interface + * @export + */ +export const BuildApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = BuildApiFp(configuration) + return { + /** + * Create a build + * @summary Create a build + * @param {CreateBuildDTO} createBuildDto Create Build DTO + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createBuild( + createBuildDto: CreateBuildDTO, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createBuild(createBuildDto, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete ALL builds + * @summary Delete ALL builds + * @param {boolean} [force] Force + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteAllBuilds( + force?: boolean, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deleteAllBuilds(force, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete build + * @summary Delete build + * @param {string} buildId Build ID + * @param {boolean} [force] Force + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteBuild( + buildId: string, + force?: boolean, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deleteBuild(buildId, force, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete builds + * @summary Delete builds + * @param {string} prebuildId Prebuild ID + * @param {boolean} [force] Force + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteBuildsFromPrebuild( + prebuildId: string, + force?: boolean, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deleteBuildsFromPrebuild(prebuildId, force, options) + .then((request) => request(axios, basePath)) + }, + /** + * Find build + * @summary Find build + * @param {string} buildId Build ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findBuild( + buildId: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .findBuild(buildId, options) + .then((request) => request(axios, basePath)) + }, + /** + * List builds + * @summary List builds + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listBuilds(options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp + .listBuilds(options) + .then((request) => request(axios, basePath)) + }, + /** + * List successful builds for Git repository + * @summary List successful builds for Git repository + * @param {string} repoUrl Repository URL + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listSuccessfulBuilds( + repoUrl: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .listSuccessfulBuilds(repoUrl, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * BuildApi - object-oriented interface + * @export + * @class BuildApi + * @extends {BaseAPI} + */ +export class BuildApi extends BaseAPI { + /** + * Create a build + * @summary Create a build + * @param {CreateBuildDTO} createBuildDto Create Build DTO + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BuildApi + */ + public createBuild( + createBuildDto: CreateBuildDTO, + options?: RawAxiosRequestConfig, + ) { + return BuildApiFp(this.configuration) + .createBuild(createBuildDto, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete ALL builds + * @summary Delete ALL builds + * @param {boolean} [force] Force + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BuildApi + */ + public deleteAllBuilds(force?: boolean, options?: RawAxiosRequestConfig) { + return BuildApiFp(this.configuration) + .deleteAllBuilds(force, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete build + * @summary Delete build + * @param {string} buildId Build ID + * @param {boolean} [force] Force + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BuildApi + */ + public deleteBuild( + buildId: string, + force?: boolean, + options?: RawAxiosRequestConfig, + ) { + return BuildApiFp(this.configuration) + .deleteBuild(buildId, force, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete builds + * @summary Delete builds + * @param {string} prebuildId Prebuild ID + * @param {boolean} [force] Force + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BuildApi + */ + public deleteBuildsFromPrebuild( + prebuildId: string, + force?: boolean, + options?: RawAxiosRequestConfig, + ) { + return BuildApiFp(this.configuration) + .deleteBuildsFromPrebuild(prebuildId, force, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Find build + * @summary Find build + * @param {string} buildId Build ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BuildApi + */ + public findBuild(buildId: string, options?: RawAxiosRequestConfig) { + return BuildApiFp(this.configuration) + .findBuild(buildId, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List builds + * @summary List builds + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BuildApi + */ + public listBuilds(options?: RawAxiosRequestConfig) { + return BuildApiFp(this.configuration) + .listBuilds(options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List successful builds for Git repository + * @summary List successful builds for Git repository + * @param {string} repoUrl Repository URL + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BuildApi + */ + public listSuccessfulBuilds( + repoUrl: string, + options?: RawAxiosRequestConfig, + ) { + return BuildApiFp(this.configuration) + .listSuccessfulBuilds(repoUrl, options) + .then((request) => request(this.axios, this.basePath)) + } +} + +/** + * ContainerRegistryApi - axios parameter creator + * @export + */ +export const ContainerRegistryApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * Find container registry + * @summary Find container registry + * @param {string} server Container registry server + * @param {string} [workspaceId] Workspace ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findContainerRegistry: async ( + server: string, + workspaceId?: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'server' is not null or undefined + assertParamExists('findContainerRegistry', 'server', server) + const localVarPath = `/container-registry/{server}`.replace( + `{${'server'}}`, + encodeURIComponent(String(server)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (workspaceId !== undefined) { + localVarQueryParameter['workspaceId'] = workspaceId + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ContainerRegistryApi - functional programming interface + * @export + */ +export const ContainerRegistryApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = + ContainerRegistryApiAxiosParamCreator(configuration) + return { + /** + * Find container registry + * @summary Find container registry + * @param {string} server Container registry server + * @param {string} [workspaceId] Workspace ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async findContainerRegistry( + server: string, + workspaceId?: string, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.findContainerRegistry( + server, + workspaceId, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['ContainerRegistryApi.findContainerRegistry']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + } +} + +/** + * ContainerRegistryApi - factory interface + * @export + */ +export const ContainerRegistryApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ContainerRegistryApiFp(configuration) + return { + /** + * Find container registry + * @summary Find container registry + * @param {string} server Container registry server + * @param {string} [workspaceId] Workspace ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findContainerRegistry( + server: string, + workspaceId?: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .findContainerRegistry(server, workspaceId, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * ContainerRegistryApi - object-oriented interface + * @export + * @class ContainerRegistryApi + * @extends {BaseAPI} + */ +export class ContainerRegistryApi extends BaseAPI { + /** + * Find container registry + * @summary Find container registry + * @param {string} server Container registry server + * @param {string} [workspaceId] Workspace ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContainerRegistryApi + */ + public findContainerRegistry( + server: string, + workspaceId?: string, + options?: RawAxiosRequestConfig, + ) { + return ContainerRegistryApiFp(this.configuration) + .findContainerRegistry(server, workspaceId, options) + .then((request) => request(this.axios, this.basePath)) + } +} + +/** + * DefaultApi - axios parameter creator + * @export + */ +export const DefaultApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * Health check + * @summary Health check + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + healthCheck: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/health` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * DefaultApi - functional programming interface + * @export + */ +export const DefaultApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) + return { + /** + * Health check + * @summary Health check + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async healthCheck( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise<{ [key: string]: string }> + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.healthCheck( + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['DefaultApi.healthCheck']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + } +} + +/** + * DefaultApi - factory interface + * @export + */ +export const DefaultApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = DefaultApiFp(configuration) + return { + /** + * Health check + * @summary Health check + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + healthCheck( + options?: RawAxiosRequestConfig, + ): AxiosPromise<{ [key: string]: string }> { + return localVarFp + .healthCheck(options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * DefaultApi - object-oriented interface + * @export + * @class DefaultApi + * @extends {BaseAPI} + */ +export class DefaultApi extends BaseAPI { + /** + * Health check + * @summary Health check + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public healthCheck(options?: RawAxiosRequestConfig) { + return DefaultApiFp(this.configuration) + .healthCheck(options) + .then((request) => request(this.axios, this.basePath)) + } +} + +/** + * EnvVarApi - axios parameter creator + * @export + */ +export const EnvVarApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * Delete environment variable + * @summary Delete environment variable + * @param {string} key Environment Variable Key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteEnvironmentVariable: async ( + key: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'key' is not null or undefined + assertParamExists('deleteEnvironmentVariable', 'key', key) + const localVarPath = `/env/{key}`.replace( + `{${'key'}}`, + encodeURIComponent(String(key)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List environment variables + * @summary List environment variables + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listEnvironmentVariables: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/env` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Save environment variable + * @summary Save environment variable + * @param {EnvironmentVariable} environmentVariable Environment Variable + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + saveEnvironmentVariable: async ( + environmentVariable: EnvironmentVariable, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'environmentVariable' is not null or undefined + assertParamExists( + 'saveEnvironmentVariable', + 'environmentVariable', + environmentVariable, + ) + const localVarPath = `/env` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { + method: 'PUT', + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + environmentVariable, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * EnvVarApi - functional programming interface + * @export + */ +export const EnvVarApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = EnvVarApiAxiosParamCreator(configuration) + return { + /** + * Delete environment variable + * @summary Delete environment variable + * @param {string} key Environment Variable Key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteEnvironmentVariable( + key: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.deleteEnvironmentVariable(key, options) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['EnvVarApi.deleteEnvironmentVariable']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * List environment variables + * @summary List environment variables + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listEnvironmentVariables( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.listEnvironmentVariables(options) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['EnvVarApi.listEnvironmentVariables']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Save environment variable + * @summary Save environment variable + * @param {EnvironmentVariable} environmentVariable Environment Variable + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async saveEnvironmentVariable( + environmentVariable: EnvironmentVariable, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.saveEnvironmentVariable( + environmentVariable, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['EnvVarApi.saveEnvironmentVariable']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + } +} + +/** + * EnvVarApi - factory interface + * @export + */ +export const EnvVarApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = EnvVarApiFp(configuration) + return { + /** + * Delete environment variable + * @summary Delete environment variable + * @param {string} key Environment Variable Key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteEnvironmentVariable( + key: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deleteEnvironmentVariable(key, options) + .then((request) => request(axios, basePath)) + }, + /** + * List environment variables + * @summary List environment variables + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listEnvironmentVariables( + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .listEnvironmentVariables(options) + .then((request) => request(axios, basePath)) + }, + /** + * Save environment variable + * @summary Save environment variable + * @param {EnvironmentVariable} environmentVariable Environment Variable + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + saveEnvironmentVariable( + environmentVariable: EnvironmentVariable, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .saveEnvironmentVariable(environmentVariable, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * EnvVarApi - object-oriented interface + * @export + * @class EnvVarApi + * @extends {BaseAPI} + */ +export class EnvVarApi extends BaseAPI { + /** + * Delete environment variable + * @summary Delete environment variable + * @param {string} key Environment Variable Key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof EnvVarApi + */ + public deleteEnvironmentVariable( + key: string, + options?: RawAxiosRequestConfig, + ) { + return EnvVarApiFp(this.configuration) + .deleteEnvironmentVariable(key, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List environment variables + * @summary List environment variables + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof EnvVarApi + */ + public listEnvironmentVariables(options?: RawAxiosRequestConfig) { + return EnvVarApiFp(this.configuration) + .listEnvironmentVariables(options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Save environment variable + * @summary Save environment variable + * @param {EnvironmentVariable} environmentVariable Environment Variable + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof EnvVarApi + */ + public saveEnvironmentVariable( + environmentVariable: EnvironmentVariable, + options?: RawAxiosRequestConfig, + ) { + return EnvVarApiFp(this.configuration) + .saveEnvironmentVariable(environmentVariable, options) + .then((request) => request(this.axios, this.basePath)) + } +} + +/** + * GitProviderApi - axios parameter creator + * @export + */ +export const GitProviderApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * Delete Git provider + * @summary Delete Git provider + * @param {string} gitProviderId Git provider + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteGitProvider: async ( + gitProviderId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'gitProviderId' is not null or undefined + assertParamExists('deleteGitProvider', 'gitProviderId', gitProviderId) + const localVarPath = `/gitprovider/{gitProviderId}`.replace( + `{${'gitProviderId'}}`, + encodeURIComponent(String(gitProviderId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Find Git provider + * @summary Find Git provider + * @param {string} gitProviderId ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findGitProvider: async ( + gitProviderId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'gitProviderId' is not null or undefined + assertParamExists('findGitProvider', 'gitProviderId', gitProviderId) + const localVarPath = `/gitprovider/{gitProviderId}`.replace( + `{${'gitProviderId'}}`, + encodeURIComponent(String(gitProviderId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Find Git provider ID + * @summary Find Git provider ID + * @param {string} url Url + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findGitProviderIdForUrl: async ( + url: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'url' is not null or undefined + assertParamExists('findGitProviderIdForUrl', 'url', url) + const localVarPath = `/gitprovider/id-for-url/{url}`.replace( + `{${'url'}}`, + encodeURIComponent(String(url)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get Git context + * @summary Get Git context + * @param {GetRepositoryContext} repository Get repository context + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getGitContext: async ( + repository: GetRepositoryContext, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'repository' is not null or undefined + assertParamExists('getGitContext', 'repository', repository) + const localVarPath = `/gitprovider/context` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + repository, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get Git context + * @summary Get Git context + * @param {string} gitProviderId Git Provider Id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getGitUser: async ( + gitProviderId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'gitProviderId' is not null or undefined + assertParamExists('getGitUser', 'gitProviderId', gitProviderId) + const localVarPath = `/gitprovider/{gitProviderId}/user`.replace( + `{${'gitProviderId'}}`, + encodeURIComponent(String(gitProviderId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get Git namespaces + * @summary Get Git namespaces + * @param {string} gitProviderId Git provider + * @param {number} [page] Page number + * @param {number} [perPage] Number of items per page + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getNamespaces: async ( + gitProviderId: string, + page?: number, + perPage?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'gitProviderId' is not null or undefined + assertParamExists('getNamespaces', 'gitProviderId', gitProviderId) + const localVarPath = `/gitprovider/{gitProviderId}/namespaces`.replace( + `{${'gitProviderId'}}`, + encodeURIComponent(String(gitProviderId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get Git repository branches + * @summary Get Git repository branches + * @param {string} gitProviderId Git provider + * @param {string} namespaceId Namespace + * @param {string} repositoryId Repository + * @param {number} [page] Page number + * @param {number} [perPage] Number of items per page + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getRepoBranches: async ( + gitProviderId: string, + namespaceId: string, + repositoryId: string, + page?: number, + perPage?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'gitProviderId' is not null or undefined + assertParamExists('getRepoBranches', 'gitProviderId', gitProviderId) + // verify required parameter 'namespaceId' is not null or undefined + assertParamExists('getRepoBranches', 'namespaceId', namespaceId) + // verify required parameter 'repositoryId' is not null or undefined + assertParamExists('getRepoBranches', 'repositoryId', repositoryId) + const localVarPath = + `/gitprovider/{gitProviderId}/{namespaceId}/{repositoryId}/branches` + .replace( + `{${'gitProviderId'}}`, + encodeURIComponent(String(gitProviderId)), + ) + .replace( + `{${'namespaceId'}}`, + encodeURIComponent(String(namespaceId)), + ) + .replace( + `{${'repositoryId'}}`, + encodeURIComponent(String(repositoryId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get Git repository PRs + * @summary Get Git repository PRs + * @param {string} gitProviderId Git provider + * @param {string} namespaceId Namespace + * @param {string} repositoryId Repository + * @param {number} [page] Page number + * @param {number} [perPage] Number of items per page + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getRepoPRs: async ( + gitProviderId: string, + namespaceId: string, + repositoryId: string, + page?: number, + perPage?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'gitProviderId' is not null or undefined + assertParamExists('getRepoPRs', 'gitProviderId', gitProviderId) + // verify required parameter 'namespaceId' is not null or undefined + assertParamExists('getRepoPRs', 'namespaceId', namespaceId) + // verify required parameter 'repositoryId' is not null or undefined + assertParamExists('getRepoPRs', 'repositoryId', repositoryId) + const localVarPath = + `/gitprovider/{gitProviderId}/{namespaceId}/{repositoryId}/pull-requests` + .replace( + `{${'gitProviderId'}}`, + encodeURIComponent(String(gitProviderId)), + ) + .replace( + `{${'namespaceId'}}`, + encodeURIComponent(String(namespaceId)), + ) + .replace( + `{${'repositoryId'}}`, + encodeURIComponent(String(repositoryId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get Git repositories + * @summary Get Git repositories + * @param {string} gitProviderId Git provider + * @param {string} namespaceId Namespace + * @param {number} [page] Page number + * @param {number} [perPage] Number of items per page + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getRepositories: async ( + gitProviderId: string, + namespaceId: string, + page?: number, + perPage?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'gitProviderId' is not null or undefined + assertParamExists('getRepositories', 'gitProviderId', gitProviderId) + // verify required parameter 'namespaceId' is not null or undefined + assertParamExists('getRepositories', 'namespaceId', namespaceId) + const localVarPath = + `/gitprovider/{gitProviderId}/{namespaceId}/repositories` + .replace( + `{${'gitProviderId'}}`, + encodeURIComponent(String(gitProviderId)), + ) + .replace( + `{${'namespaceId'}}`, + encodeURIComponent(String(namespaceId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (page !== undefined) { + localVarQueryParameter['page'] = page + } + + if (perPage !== undefined) { + localVarQueryParameter['per_page'] = perPage + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get URL from Git repository + * @summary Get URL from Git repository + * @param {GitRepository} repository Git repository + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUrlFromRepository: async ( + repository: GitRepository, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'repository' is not null or undefined + assertParamExists('getUrlFromRepository', 'repository', repository) + const localVarPath = `/gitprovider/context/url` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + repository, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List Git providers + * @summary List Git providers + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listGitProviders: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/gitprovider` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List Git providers for url + * @summary List Git providers for url + * @param {string} url Url + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listGitProvidersForUrl: async ( + url: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'url' is not null or undefined + assertParamExists('listGitProvidersForUrl', 'url', url) + const localVarPath = `/gitprovider/for-url/{url}`.replace( + `{${'url'}}`, + encodeURIComponent(String(url)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Save Git provider + * @summary Save Git provider + * @param {SetGitProviderConfig} gitProviderConfig Git provider + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + saveGitProvider: async ( + gitProviderConfig: SetGitProviderConfig, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'gitProviderConfig' is not null or undefined + assertParamExists( + 'saveGitProvider', + 'gitProviderConfig', + gitProviderConfig, + ) + const localVarPath = `/gitprovider` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { + method: 'PUT', + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + gitProviderConfig, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * GitProviderApi - functional programming interface + * @export + */ +export const GitProviderApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = + GitProviderApiAxiosParamCreator(configuration) + return { + /** + * Delete Git provider + * @summary Delete Git provider + * @param {string} gitProviderId Git provider + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteGitProvider( + gitProviderId: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.deleteGitProvider( + gitProviderId, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['GitProviderApi.deleteGitProvider']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Find Git provider + * @summary Find Git provider + * @param {string} gitProviderId ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async findGitProvider( + gitProviderId: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.findGitProvider( + gitProviderId, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['GitProviderApi.findGitProvider']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Find Git provider ID + * @summary Find Git provider ID + * @param {string} url Url + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async findGitProviderIdForUrl( + url: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.findGitProviderIdForUrl(url, options) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['GitProviderApi.findGitProviderIdForUrl']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Get Git context + * @summary Get Git context + * @param {GetRepositoryContext} repository Get repository context + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getGitContext( + repository: GetRepositoryContext, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getGitContext( + repository, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['GitProviderApi.getGitContext']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Get Git context + * @summary Get Git context + * @param {string} gitProviderId Git Provider Id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getGitUser( + gitProviderId: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getGitUser( + gitProviderId, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['GitProviderApi.getGitUser']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Get Git namespaces + * @summary Get Git namespaces + * @param {string} gitProviderId Git provider + * @param {number} [page] Page number + * @param {number} [perPage] Number of items per page + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getNamespaces( + gitProviderId: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getNamespaces( + gitProviderId, + page, + perPage, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['GitProviderApi.getNamespaces']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Get Git repository branches + * @summary Get Git repository branches + * @param {string} gitProviderId Git provider + * @param {string} namespaceId Namespace + * @param {string} repositoryId Repository + * @param {number} [page] Page number + * @param {number} [perPage] Number of items per page + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getRepoBranches( + gitProviderId: string, + namespaceId: string, + repositoryId: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getRepoBranches( + gitProviderId, + namespaceId, + repositoryId, + page, + perPage, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['GitProviderApi.getRepoBranches']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Get Git repository PRs + * @summary Get Git repository PRs + * @param {string} gitProviderId Git provider + * @param {string} namespaceId Namespace + * @param {string} repositoryId Repository + * @param {number} [page] Page number + * @param {number} [perPage] Number of items per page + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getRepoPRs( + gitProviderId: string, + namespaceId: string, + repositoryId: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getRepoPRs( + gitProviderId, + namespaceId, + repositoryId, + page, + perPage, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['GitProviderApi.getRepoPRs']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Get Git repositories + * @summary Get Git repositories + * @param {string} gitProviderId Git provider + * @param {string} namespaceId Namespace + * @param {number} [page] Page number + * @param {number} [perPage] Number of items per page + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getRepositories( + gitProviderId: string, + namespaceId: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getRepositories( + gitProviderId, + namespaceId, + page, + perPage, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['GitProviderApi.getRepositories']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Get URL from Git repository + * @summary Get URL from Git repository + * @param {GitRepository} repository Git repository + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getUrlFromRepository( + repository: GitRepository, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getUrlFromRepository( + repository, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['GitProviderApi.getUrlFromRepository']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * List Git providers + * @summary List Git providers + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listGitProviders( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.listGitProviders(options) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['GitProviderApi.listGitProviders']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * List Git providers for url + * @summary List Git providers for url + * @param {string} url Url + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listGitProvidersForUrl( + url: string, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.listGitProvidersForUrl(url, options) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['GitProviderApi.listGitProvidersForUrl']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Save Git provider + * @summary Save Git provider + * @param {SetGitProviderConfig} gitProviderConfig Git provider + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async saveGitProvider( + gitProviderConfig: SetGitProviderConfig, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.saveGitProvider( + gitProviderConfig, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['GitProviderApi.saveGitProvider']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + } +} + +/** + * GitProviderApi - factory interface + * @export + */ +export const GitProviderApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = GitProviderApiFp(configuration) + return { + /** + * Delete Git provider + * @summary Delete Git provider + * @param {string} gitProviderId Git provider + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteGitProvider( + gitProviderId: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deleteGitProvider(gitProviderId, options) + .then((request) => request(axios, basePath)) + }, + /** + * Find Git provider + * @summary Find Git provider + * @param {string} gitProviderId ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findGitProvider( + gitProviderId: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .findGitProvider(gitProviderId, options) + .then((request) => request(axios, basePath)) + }, + /** + * Find Git provider ID + * @summary Find Git provider ID + * @param {string} url Url + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findGitProviderIdForUrl( + url: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .findGitProviderIdForUrl(url, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get Git context + * @summary Get Git context + * @param {GetRepositoryContext} repository Get repository context + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getGitContext( + repository: GetRepositoryContext, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getGitContext(repository, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get Git context + * @summary Get Git context + * @param {string} gitProviderId Git Provider Id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getGitUser( + gitProviderId: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getGitUser(gitProviderId, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get Git namespaces + * @summary Get Git namespaces + * @param {string} gitProviderId Git provider + * @param {number} [page] Page number + * @param {number} [perPage] Number of items per page + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getNamespaces( + gitProviderId: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .getNamespaces(gitProviderId, page, perPage, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get Git repository branches + * @summary Get Git repository branches + * @param {string} gitProviderId Git provider + * @param {string} namespaceId Namespace + * @param {string} repositoryId Repository + * @param {number} [page] Page number + * @param {number} [perPage] Number of items per page + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getRepoBranches( + gitProviderId: string, + namespaceId: string, + repositoryId: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .getRepoBranches( + gitProviderId, + namespaceId, + repositoryId, + page, + perPage, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Get Git repository PRs + * @summary Get Git repository PRs + * @param {string} gitProviderId Git provider + * @param {string} namespaceId Namespace + * @param {string} repositoryId Repository + * @param {number} [page] Page number + * @param {number} [perPage] Number of items per page + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getRepoPRs( + gitProviderId: string, + namespaceId: string, + repositoryId: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .getRepoPRs( + gitProviderId, + namespaceId, + repositoryId, + page, + perPage, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Get Git repositories + * @summary Get Git repositories + * @param {string} gitProviderId Git provider + * @param {string} namespaceId Namespace + * @param {number} [page] Page number + * @param {number} [perPage] Number of items per page + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getRepositories( + gitProviderId: string, + namespaceId: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .getRepositories(gitProviderId, namespaceId, page, perPage, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get URL from Git repository + * @summary Get URL from Git repository + * @param {GitRepository} repository Git repository + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUrlFromRepository( + repository: GitRepository, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getUrlFromRepository(repository, options) + .then((request) => request(axios, basePath)) + }, + /** + * List Git providers + * @summary List Git providers + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listGitProviders( + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .listGitProviders(options) + .then((request) => request(axios, basePath)) + }, + /** + * List Git providers for url + * @summary List Git providers for url + * @param {string} url Url + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listGitProvidersForUrl( + url: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .listGitProvidersForUrl(url, options) + .then((request) => request(axios, basePath)) + }, + /** + * Save Git provider + * @summary Save Git provider + * @param {SetGitProviderConfig} gitProviderConfig Git provider + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + saveGitProvider( + gitProviderConfig: SetGitProviderConfig, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .saveGitProvider(gitProviderConfig, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * GitProviderApi - object-oriented interface + * @export + * @class GitProviderApi + * @extends {BaseAPI} + */ +export class GitProviderApi extends BaseAPI { + /** + * Delete Git provider + * @summary Delete Git provider + * @param {string} gitProviderId Git provider + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GitProviderApi + */ + public deleteGitProvider( + gitProviderId: string, + options?: RawAxiosRequestConfig, + ) { + return GitProviderApiFp(this.configuration) + .deleteGitProvider(gitProviderId, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Find Git provider + * @summary Find Git provider + * @param {string} gitProviderId ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GitProviderApi + */ + public findGitProvider( + gitProviderId: string, + options?: RawAxiosRequestConfig, + ) { + return GitProviderApiFp(this.configuration) + .findGitProvider(gitProviderId, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Find Git provider ID + * @summary Find Git provider ID + * @param {string} url Url + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GitProviderApi + */ + public findGitProviderIdForUrl(url: string, options?: RawAxiosRequestConfig) { + return GitProviderApiFp(this.configuration) + .findGitProviderIdForUrl(url, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get Git context + * @summary Get Git context + * @param {GetRepositoryContext} repository Get repository context + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GitProviderApi + */ + public getGitContext( + repository: GetRepositoryContext, + options?: RawAxiosRequestConfig, + ) { + return GitProviderApiFp(this.configuration) + .getGitContext(repository, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get Git context + * @summary Get Git context + * @param {string} gitProviderId Git Provider Id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GitProviderApi + */ + public getGitUser(gitProviderId: string, options?: RawAxiosRequestConfig) { + return GitProviderApiFp(this.configuration) + .getGitUser(gitProviderId, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get Git namespaces + * @summary Get Git namespaces + * @param {string} gitProviderId Git provider + * @param {number} [page] Page number + * @param {number} [perPage] Number of items per page + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GitProviderApi + */ + public getNamespaces( + gitProviderId: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ) { + return GitProviderApiFp(this.configuration) + .getNamespaces(gitProviderId, page, perPage, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get Git repository branches + * @summary Get Git repository branches + * @param {string} gitProviderId Git provider + * @param {string} namespaceId Namespace + * @param {string} repositoryId Repository + * @param {number} [page] Page number + * @param {number} [perPage] Number of items per page + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GitProviderApi + */ + public getRepoBranches( + gitProviderId: string, + namespaceId: string, + repositoryId: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ) { + return GitProviderApiFp(this.configuration) + .getRepoBranches( + gitProviderId, + namespaceId, + repositoryId, + page, + perPage, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get Git repository PRs + * @summary Get Git repository PRs + * @param {string} gitProviderId Git provider + * @param {string} namespaceId Namespace + * @param {string} repositoryId Repository + * @param {number} [page] Page number + * @param {number} [perPage] Number of items per page + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GitProviderApi + */ + public getRepoPRs( + gitProviderId: string, + namespaceId: string, + repositoryId: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ) { + return GitProviderApiFp(this.configuration) + .getRepoPRs( + gitProviderId, + namespaceId, + repositoryId, + page, + perPage, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get Git repositories + * @summary Get Git repositories + * @param {string} gitProviderId Git provider + * @param {string} namespaceId Namespace + * @param {number} [page] Page number + * @param {number} [perPage] Number of items per page + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GitProviderApi + */ + public getRepositories( + gitProviderId: string, + namespaceId: string, + page?: number, + perPage?: number, + options?: RawAxiosRequestConfig, + ) { + return GitProviderApiFp(this.configuration) + .getRepositories(gitProviderId, namespaceId, page, perPage, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get URL from Git repository + * @summary Get URL from Git repository + * @param {GitRepository} repository Git repository + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GitProviderApi + */ + public getUrlFromRepository( + repository: GitRepository, + options?: RawAxiosRequestConfig, + ) { + return GitProviderApiFp(this.configuration) + .getUrlFromRepository(repository, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List Git providers + * @summary List Git providers + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GitProviderApi + */ + public listGitProviders(options?: RawAxiosRequestConfig) { + return GitProviderApiFp(this.configuration) + .listGitProviders(options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List Git providers for url + * @summary List Git providers for url + * @param {string} url Url + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GitProviderApi + */ + public listGitProvidersForUrl(url: string, options?: RawAxiosRequestConfig) { + return GitProviderApiFp(this.configuration) + .listGitProvidersForUrl(url, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Save Git provider + * @summary Save Git provider + * @param {SetGitProviderConfig} gitProviderConfig Git provider + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GitProviderApi + */ + public saveGitProvider( + gitProviderConfig: SetGitProviderConfig, + options?: RawAxiosRequestConfig, + ) { + return GitProviderApiFp(this.configuration) + .saveGitProvider(gitProviderConfig, options) + .then((request) => request(this.axios, this.basePath)) + } +} + +/** + * JobApi - axios parameter creator + * @export + */ +export const JobApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * List jobs + * @summary List jobs + * @param {Array} [states] Job States + * @param {Array} [actions] Job Actions + * @param {string} [resourceId] Resource ID + * @param {string} [resourceType] Resource Type + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listJobs: async ( + states?: Array, + actions?: Array, + resourceId?: string, + resourceType?: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/job` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (states) { + localVarQueryParameter['states'] = states + } + + if (actions) { + localVarQueryParameter['actions'] = actions + } + + if (resourceId !== undefined) { + localVarQueryParameter['resourceId'] = resourceId + } + + if (resourceType !== undefined) { + localVarQueryParameter['resourceType'] = resourceType + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * JobApi - functional programming interface + * @export + */ +export const JobApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = JobApiAxiosParamCreator(configuration) + return { + /** + * List jobs + * @summary List jobs + * @param {Array} [states] Job States + * @param {Array} [actions] Job Actions + * @param {string} [resourceId] Resource ID + * @param {string} [resourceType] Resource Type + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listJobs( + states?: Array, + actions?: Array, + resourceId?: string, + resourceType?: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise> + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listJobs( + states, + actions, + resourceId, + resourceType, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['JobApi.listJobs']?.[localVarOperationServerIndex] + ?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + } +} + +/** + * JobApi - factory interface + * @export + */ +export const JobApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = JobApiFp(configuration) + return { + /** + * List jobs + * @summary List jobs + * @param {Array} [states] Job States + * @param {Array} [actions] Job Actions + * @param {string} [resourceId] Resource ID + * @param {string} [resourceType] Resource Type + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listJobs( + states?: Array, + actions?: Array, + resourceId?: string, + resourceType?: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .listJobs(states, actions, resourceId, resourceType, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * JobApi - object-oriented interface + * @export + * @class JobApi + * @extends {BaseAPI} + */ +export class JobApi extends BaseAPI { + /** + * List jobs + * @summary List jobs + * @param {Array} [states] Job States + * @param {Array} [actions] Job Actions + * @param {string} [resourceId] Resource ID + * @param {string} [resourceType] Resource Type + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof JobApi + */ + public listJobs( + states?: Array, + actions?: Array, + resourceId?: string, + resourceType?: string, + options?: RawAxiosRequestConfig, + ) { + return JobApiFp(this.configuration) + .listJobs(states, actions, resourceId, resourceType, options) + .then((request) => request(this.axios, this.basePath)) + } +} + +/** + * PrebuildApi - axios parameter creator + * @export + */ +export const PrebuildApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * Delete prebuild + * @summary Delete prebuild + * @param {string} templateName Workspace template name + * @param {string} prebuildId Prebuild ID + * @param {boolean} [force] Force + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletePrebuild: async ( + templateName: string, + prebuildId: string, + force?: boolean, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'templateName' is not null or undefined + assertParamExists('deletePrebuild', 'templateName', templateName) + // verify required parameter 'prebuildId' is not null or undefined + assertParamExists('deletePrebuild', 'prebuildId', prebuildId) + const localVarPath = + `/workspace-template/{templateName}/prebuild/{prebuildId}` + .replace( + `{${'templateName'}}`, + encodeURIComponent(String(templateName)), + ) + .replace(`{${'prebuildId'}}`, encodeURIComponent(String(prebuildId))) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (force !== undefined) { + localVarQueryParameter['force'] = force + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Find prebuild + * @summary Find prebuild + * @param {string} templateName Workspace template name + * @param {string} prebuildId Prebuild ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findPrebuild: async ( + templateName: string, + prebuildId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'templateName' is not null or undefined + assertParamExists('findPrebuild', 'templateName', templateName) + // verify required parameter 'prebuildId' is not null or undefined + assertParamExists('findPrebuild', 'prebuildId', prebuildId) + const localVarPath = + `/workspace-template/{templateName}/prebuild/{prebuildId}` + .replace( + `{${'templateName'}}`, + encodeURIComponent(String(templateName)), + ) + .replace(`{${'prebuildId'}}`, encodeURIComponent(String(prebuildId))) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List prebuilds + * @summary List prebuilds + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listPrebuilds: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/workspace-template/prebuild` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List prebuilds for workspace template + * @summary List prebuilds for workspace template + * @param {string} templateName Template name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listPrebuildsForWorkspaceTemplate: async ( + templateName: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'templateName' is not null or undefined + assertParamExists( + 'listPrebuildsForWorkspaceTemplate', + 'templateName', + templateName, + ) + const localVarPath = + `/workspace-template/{templateName}/prebuild`.replace( + `{${'templateName'}}`, + encodeURIComponent(String(templateName)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * ProcessGitEvent + * @summary ProcessGitEvent + * @param {object} body Webhook event + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + processGitEvent: async ( + body: object, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'body' is not null or undefined + assertParamExists('processGitEvent', 'body', body) + const localVarPath = `/workspace-template/prebuild/process-git-event` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + body, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Save prebuild + * @summary Save prebuild + * @param {string} templateName Template name + * @param {CreatePrebuildDTO} prebuild Prebuild + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + savePrebuild: async ( + templateName: string, + prebuild: CreatePrebuildDTO, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'templateName' is not null or undefined + assertParamExists('savePrebuild', 'templateName', templateName) + // verify required parameter 'prebuild' is not null or undefined + assertParamExists('savePrebuild', 'prebuild', prebuild) + const localVarPath = + `/workspace-template/{templateName}/prebuild`.replace( + `{${'templateName'}}`, + encodeURIComponent(String(templateName)), + ) + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { + method: 'PUT', + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + prebuild, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * PrebuildApi - functional programming interface + * @export + */ +export const PrebuildApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = PrebuildApiAxiosParamCreator(configuration) + return { + /** + * Delete prebuild + * @summary Delete prebuild + * @param {string} templateName Workspace template name + * @param {string} prebuildId Prebuild ID + * @param {boolean} [force] Force + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deletePrebuild( + templateName: string, + prebuildId: string, + force?: boolean, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.deletePrebuild( + templateName, + prebuildId, + force, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['PrebuildApi.deletePrebuild']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Find prebuild + * @summary Find prebuild + * @param {string} templateName Workspace template name + * @param {string} prebuildId Prebuild ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async findPrebuild( + templateName: string, + prebuildId: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.findPrebuild( + templateName, + prebuildId, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['PrebuildApi.findPrebuild']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * List prebuilds + * @summary List prebuilds + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listPrebuilds( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listPrebuilds( + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['PrebuildApi.listPrebuilds']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * List prebuilds for workspace template + * @summary List prebuilds for workspace template + * @param {string} templateName Template name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listPrebuildsForWorkspaceTemplate( + templateName: string, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.listPrebuildsForWorkspaceTemplate( + templateName, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['PrebuildApi.listPrebuildsForWorkspaceTemplate']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * ProcessGitEvent + * @summary ProcessGitEvent + * @param {object} body Webhook event + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async processGitEvent( + body: object, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.processGitEvent( + body, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['PrebuildApi.processGitEvent']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Save prebuild + * @summary Save prebuild + * @param {string} templateName Template name + * @param {CreatePrebuildDTO} prebuild Prebuild + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async savePrebuild( + templateName: string, + prebuild: CreatePrebuildDTO, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.savePrebuild( + templateName, + prebuild, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['PrebuildApi.savePrebuild']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + } +} + +/** + * PrebuildApi - factory interface + * @export + */ +export const PrebuildApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = PrebuildApiFp(configuration) + return { + /** + * Delete prebuild + * @summary Delete prebuild + * @param {string} templateName Workspace template name + * @param {string} prebuildId Prebuild ID + * @param {boolean} [force] Force + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deletePrebuild( + templateName: string, + prebuildId: string, + force?: boolean, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deletePrebuild(templateName, prebuildId, force, options) + .then((request) => request(axios, basePath)) + }, + /** + * Find prebuild + * @summary Find prebuild + * @param {string} templateName Workspace template name + * @param {string} prebuildId Prebuild ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findPrebuild( + templateName: string, + prebuildId: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .findPrebuild(templateName, prebuildId, options) + .then((request) => request(axios, basePath)) + }, + /** + * List prebuilds + * @summary List prebuilds + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listPrebuilds( + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .listPrebuilds(options) + .then((request) => request(axios, basePath)) + }, + /** + * List prebuilds for workspace template + * @summary List prebuilds for workspace template + * @param {string} templateName Template name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listPrebuildsForWorkspaceTemplate( + templateName: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .listPrebuildsForWorkspaceTemplate(templateName, options) + .then((request) => request(axios, basePath)) + }, + /** + * ProcessGitEvent + * @summary ProcessGitEvent + * @param {object} body Webhook event + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + processGitEvent( + body: object, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .processGitEvent(body, options) + .then((request) => request(axios, basePath)) + }, + /** + * Save prebuild + * @summary Save prebuild + * @param {string} templateName Template name + * @param {CreatePrebuildDTO} prebuild Prebuild + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + savePrebuild( + templateName: string, + prebuild: CreatePrebuildDTO, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .savePrebuild(templateName, prebuild, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * PrebuildApi - object-oriented interface + * @export + * @class PrebuildApi + * @extends {BaseAPI} + */ +export class PrebuildApi extends BaseAPI { + /** + * Delete prebuild + * @summary Delete prebuild + * @param {string} templateName Workspace template name + * @param {string} prebuildId Prebuild ID + * @param {boolean} [force] Force + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PrebuildApi + */ + public deletePrebuild( + templateName: string, + prebuildId: string, + force?: boolean, + options?: RawAxiosRequestConfig, + ) { + return PrebuildApiFp(this.configuration) + .deletePrebuild(templateName, prebuildId, force, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Find prebuild + * @summary Find prebuild + * @param {string} templateName Workspace template name + * @param {string} prebuildId Prebuild ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PrebuildApi + */ + public findPrebuild( + templateName: string, + prebuildId: string, + options?: RawAxiosRequestConfig, + ) { + return PrebuildApiFp(this.configuration) + .findPrebuild(templateName, prebuildId, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List prebuilds + * @summary List prebuilds + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PrebuildApi + */ + public listPrebuilds(options?: RawAxiosRequestConfig) { + return PrebuildApiFp(this.configuration) + .listPrebuilds(options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List prebuilds for workspace template + * @summary List prebuilds for workspace template + * @param {string} templateName Template name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PrebuildApi + */ + public listPrebuildsForWorkspaceTemplate( + templateName: string, + options?: RawAxiosRequestConfig, + ) { + return PrebuildApiFp(this.configuration) + .listPrebuildsForWorkspaceTemplate(templateName, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * ProcessGitEvent + * @summary ProcessGitEvent + * @param {object} body Webhook event + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PrebuildApi + */ + public processGitEvent(body: object, options?: RawAxiosRequestConfig) { + return PrebuildApiFp(this.configuration) + .processGitEvent(body, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Save prebuild + * @summary Save prebuild + * @param {string} templateName Template name + * @param {CreatePrebuildDTO} prebuild Prebuild + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PrebuildApi + */ + public savePrebuild( + templateName: string, + prebuild: CreatePrebuildDTO, + options?: RawAxiosRequestConfig, + ) { + return PrebuildApiFp(this.configuration) + .savePrebuild(templateName, prebuild, options) + .then((request) => request(this.axios, this.basePath)) + } +} + +/** + * ProviderApi - axios parameter creator + * @export + */ +export const ProviderApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * Get runner providers + * @summary Get runner providers + * @param {string} runnerId Runner ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getRunnerProviders: async ( + runnerId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'runnerId' is not null or undefined + assertParamExists('getRunnerProviders', 'runnerId', runnerId) + const localVarPath = `/runner/{runnerId}/provider`.replace( + `{${'runnerId'}}`, + encodeURIComponent(String(runnerId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Install provider + * @summary Install provider + * @param {string} runnerId Runner ID + * @param {string} providerName Provider name + * @param {string} [providerVersion] Provider version - defaults to \'latest\' + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + installProvider: async ( + runnerId: string, + providerName: string, + providerVersion?: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'runnerId' is not null or undefined + assertParamExists('installProvider', 'runnerId', runnerId) + // verify required parameter 'providerName' is not null or undefined + assertParamExists('installProvider', 'providerName', providerName) + const localVarPath = `/runner/{runnerId}/provider/{providerName}/install` + .replace(`{${'runnerId'}}`, encodeURIComponent(String(runnerId))) + .replace( + `{${'providerName'}}`, + encodeURIComponent(String(providerName)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (providerVersion !== undefined) { + localVarQueryParameter['providerVersion'] = providerVersion + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List providers + * @summary List providers + * @param {string} [runnerId] Runner ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listProviders: async ( + runnerId?: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/runner/provider` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (runnerId !== undefined) { + localVarQueryParameter['runnerId'] = runnerId + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List providers available for installation + * @summary List providers available for installation + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listProvidersForInstall: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/runner/provider/for-install` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Uninstall provider + * @summary Uninstall provider + * @param {string} runnerId Runner ID + * @param {string} providerName Provider name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + uninstallProvider: async ( + runnerId: string, + providerName: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'runnerId' is not null or undefined + assertParamExists('uninstallProvider', 'runnerId', runnerId) + // verify required parameter 'providerName' is not null or undefined + assertParamExists('uninstallProvider', 'providerName', providerName) + const localVarPath = + `/runner/{runnerId}/provider/{providerName}/uninstall` + .replace(`{${'runnerId'}}`, encodeURIComponent(String(runnerId))) + .replace( + `{${'providerName'}}`, + encodeURIComponent(String(providerName)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update provider + * @summary Update provider + * @param {string} runnerId Runner ID + * @param {string} providerName Provider name + * @param {string} [providerVersion] Provider version - defaults to \'latest\' + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateProvider: async ( + runnerId: string, + providerName: string, + providerVersion?: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'runnerId' is not null or undefined + assertParamExists('updateProvider', 'runnerId', runnerId) + // verify required parameter 'providerName' is not null or undefined + assertParamExists('updateProvider', 'providerName', providerName) + const localVarPath = `/runner/{runnerId}/provider/{providerName}/update` + .replace(`{${'runnerId'}}`, encodeURIComponent(String(runnerId))) + .replace( + `{${'providerName'}}`, + encodeURIComponent(String(providerName)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (providerVersion !== undefined) { + localVarQueryParameter['providerVersion'] = providerVersion + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ProviderApi - functional programming interface + * @export + */ +export const ProviderApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ProviderApiAxiosParamCreator(configuration) + return { + /** + * Get runner providers + * @summary Get runner providers + * @param {string} runnerId Runner ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getRunnerProviders( + runnerId: string, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getRunnerProviders(runnerId, options) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['ProviderApi.getRunnerProviders']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Install provider + * @summary Install provider + * @param {string} runnerId Runner ID + * @param {string} providerName Provider name + * @param {string} [providerVersion] Provider version - defaults to \'latest\' + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async installProvider( + runnerId: string, + providerName: string, + providerVersion?: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.installProvider( + runnerId, + providerName, + providerVersion, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['ProviderApi.installProvider']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * List providers + * @summary List providers + * @param {string} [runnerId] Runner ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listProviders( + runnerId?: string, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listProviders( + runnerId, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['ProviderApi.listProviders']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * List providers available for installation + * @summary List providers available for installation + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listProvidersForInstall( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.listProvidersForInstall(options) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['ProviderApi.listProvidersForInstall']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Uninstall provider + * @summary Uninstall provider + * @param {string} runnerId Runner ID + * @param {string} providerName Provider name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async uninstallProvider( + runnerId: string, + providerName: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.uninstallProvider( + runnerId, + providerName, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['ProviderApi.uninstallProvider']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Update provider + * @summary Update provider + * @param {string} runnerId Runner ID + * @param {string} providerName Provider name + * @param {string} [providerVersion] Provider version - defaults to \'latest\' + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateProvider( + runnerId: string, + providerName: string, + providerVersion?: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateProvider( + runnerId, + providerName, + providerVersion, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['ProviderApi.updateProvider']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + } +} + +/** + * ProviderApi - factory interface + * @export + */ +export const ProviderApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ProviderApiFp(configuration) + return { + /** + * Get runner providers + * @summary Get runner providers + * @param {string} runnerId Runner ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getRunnerProviders( + runnerId: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .getRunnerProviders(runnerId, options) + .then((request) => request(axios, basePath)) + }, + /** + * Install provider + * @summary Install provider + * @param {string} runnerId Runner ID + * @param {string} providerName Provider name + * @param {string} [providerVersion] Provider version - defaults to \'latest\' + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + installProvider( + runnerId: string, + providerName: string, + providerVersion?: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .installProvider(runnerId, providerName, providerVersion, options) + .then((request) => request(axios, basePath)) + }, + /** + * List providers + * @summary List providers + * @param {string} [runnerId] Runner ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listProviders( + runnerId?: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .listProviders(runnerId, options) + .then((request) => request(axios, basePath)) + }, + /** + * List providers available for installation + * @summary List providers available for installation + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listProvidersForInstall( + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .listProvidersForInstall(options) + .then((request) => request(axios, basePath)) + }, + /** + * Uninstall provider + * @summary Uninstall provider + * @param {string} runnerId Runner ID + * @param {string} providerName Provider name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + uninstallProvider( + runnerId: string, + providerName: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .uninstallProvider(runnerId, providerName, options) + .then((request) => request(axios, basePath)) + }, + /** + * Update provider + * @summary Update provider + * @param {string} runnerId Runner ID + * @param {string} providerName Provider name + * @param {string} [providerVersion] Provider version - defaults to \'latest\' + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateProvider( + runnerId: string, + providerName: string, + providerVersion?: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updateProvider(runnerId, providerName, providerVersion, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * ProviderApi - object-oriented interface + * @export + * @class ProviderApi + * @extends {BaseAPI} + */ +export class ProviderApi extends BaseAPI { + /** + * Get runner providers + * @summary Get runner providers + * @param {string} runnerId Runner ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProviderApi + */ + public getRunnerProviders(runnerId: string, options?: RawAxiosRequestConfig) { + return ProviderApiFp(this.configuration) + .getRunnerProviders(runnerId, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Install provider + * @summary Install provider + * @param {string} runnerId Runner ID + * @param {string} providerName Provider name + * @param {string} [providerVersion] Provider version - defaults to \'latest\' + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProviderApi + */ + public installProvider( + runnerId: string, + providerName: string, + providerVersion?: string, + options?: RawAxiosRequestConfig, + ) { + return ProviderApiFp(this.configuration) + .installProvider(runnerId, providerName, providerVersion, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List providers + * @summary List providers + * @param {string} [runnerId] Runner ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProviderApi + */ + public listProviders(runnerId?: string, options?: RawAxiosRequestConfig) { + return ProviderApiFp(this.configuration) + .listProviders(runnerId, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List providers available for installation + * @summary List providers available for installation + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProviderApi + */ + public listProvidersForInstall(options?: RawAxiosRequestConfig) { + return ProviderApiFp(this.configuration) + .listProvidersForInstall(options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Uninstall provider + * @summary Uninstall provider + * @param {string} runnerId Runner ID + * @param {string} providerName Provider name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProviderApi + */ + public uninstallProvider( + runnerId: string, + providerName: string, + options?: RawAxiosRequestConfig, + ) { + return ProviderApiFp(this.configuration) + .uninstallProvider(runnerId, providerName, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update provider + * @summary Update provider + * @param {string} runnerId Runner ID + * @param {string} providerName Provider name + * @param {string} [providerVersion] Provider version - defaults to \'latest\' + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProviderApi + */ + public updateProvider( + runnerId: string, + providerName: string, + providerVersion?: string, + options?: RawAxiosRequestConfig, + ) { + return ProviderApiFp(this.configuration) + .updateProvider(runnerId, providerName, providerVersion, options) + .then((request) => request(this.axios, this.basePath)) + } +} + +/** + * RunnerApi - axios parameter creator + * @export + */ +export const RunnerApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * Create a runner + * @summary Create a runner + * @param {CreateRunnerDTO} runner Runner + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createRunner: async ( + runner: CreateRunnerDTO, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'runner' is not null or undefined + assertParamExists('createRunner', 'runner', runner) + const localVarPath = `/runner` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + runner, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete runner + * @summary Delete runner + * @param {string} runnerId Runner ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteRunner: async ( + runnerId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'runnerId' is not null or undefined + assertParamExists('deleteRunner', 'runnerId', runnerId) + const localVarPath = `/runner/{runnerId}`.replace( + `{${'runnerId'}}`, + encodeURIComponent(String(runnerId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Find a runner + * @summary Find a runner + * @param {string} runnerId Runner ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findRunner: async ( + runnerId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'runnerId' is not null or undefined + assertParamExists('findRunner', 'runnerId', runnerId) + const localVarPath = `/runner/{runnerId}`.replace( + `{${'runnerId'}}`, + encodeURIComponent(String(runnerId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List runner jobs + * @summary List runner jobs + * @param {string} runnerId Runner ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listRunnerJobs: async ( + runnerId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'runnerId' is not null or undefined + assertParamExists('listRunnerJobs', 'runnerId', runnerId) + const localVarPath = `/runner/{runnerId}/jobs`.replace( + `{${'runnerId'}}`, + encodeURIComponent(String(runnerId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List runners + * @summary List runners + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listRunners: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/runner` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update job state + * @summary Update job state + * @param {string} runnerId Runner ID + * @param {string} jobId Job ID + * @param {UpdateJobState} updateJobState Update job state + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateJobState: async ( + runnerId: string, + jobId: string, + updateJobState: UpdateJobState, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'runnerId' is not null or undefined + assertParamExists('updateJobState', 'runnerId', runnerId) + // verify required parameter 'jobId' is not null or undefined + assertParamExists('updateJobState', 'jobId', jobId) + // verify required parameter 'updateJobState' is not null or undefined + assertParamExists('updateJobState', 'updateJobState', updateJobState) + const localVarPath = `/runner/{runnerId}/jobs/{jobId}/state` + .replace(`{${'runnerId'}}`, encodeURIComponent(String(runnerId))) + .replace(`{${'jobId'}}`, encodeURIComponent(String(jobId))) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + updateJobState, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update runner metadata + * @summary Update runner metadata + * @param {string} runnerId Runner ID + * @param {UpdateRunnerMetadataDTO} runnerMetadata Runner Metadata + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateRunnerMetadata: async ( + runnerId: string, + runnerMetadata: UpdateRunnerMetadataDTO, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'runnerId' is not null or undefined + assertParamExists('updateRunnerMetadata', 'runnerId', runnerId) + // verify required parameter 'runnerMetadata' is not null or undefined + assertParamExists( + 'updateRunnerMetadata', + 'runnerMetadata', + runnerMetadata, + ) + const localVarPath = `/runner/{runnerId}/metadata`.replace( + `{${'runnerId'}}`, + encodeURIComponent(String(runnerId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + runnerMetadata, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * RunnerApi - functional programming interface + * @export + */ +export const RunnerApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = RunnerApiAxiosParamCreator(configuration) + return { + /** + * Create a runner + * @summary Create a runner + * @param {CreateRunnerDTO} runner Runner + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createRunner( + runner: CreateRunnerDTO, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.createRunner( + runner, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['RunnerApi.createRunner']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Delete runner + * @summary Delete runner + * @param {string} runnerId Runner ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteRunner( + runnerId: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRunner( + runnerId, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['RunnerApi.deleteRunner']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Find a runner + * @summary Find a runner + * @param {string} runnerId Runner ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async findRunner( + runnerId: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.findRunner( + runnerId, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['RunnerApi.findRunner']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * List runner jobs + * @summary List runner jobs + * @param {string} runnerId Runner ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listRunnerJobs( + runnerId: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise> + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listRunnerJobs( + runnerId, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['RunnerApi.listRunnerJobs']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * List runners + * @summary List runners + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listRunners( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listRunners( + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['RunnerApi.listRunners']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Update job state + * @summary Update job state + * @param {string} runnerId Runner ID + * @param {string} jobId Job ID + * @param {UpdateJobState} updateJobState Update job state + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateJobState( + runnerId: string, + jobId: string, + updateJobState: UpdateJobState, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateJobState( + runnerId, + jobId, + updateJobState, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['RunnerApi.updateJobState']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Update runner metadata + * @summary Update runner metadata + * @param {string} runnerId Runner ID + * @param {UpdateRunnerMetadataDTO} runnerMetadata Runner Metadata + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateRunnerMetadata( + runnerId: string, + runnerMetadata: UpdateRunnerMetadataDTO, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.updateRunnerMetadata( + runnerId, + runnerMetadata, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['RunnerApi.updateRunnerMetadata']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + } +} + +/** + * RunnerApi - factory interface + * @export + */ +export const RunnerApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = RunnerApiFp(configuration) + return { + /** + * Create a runner + * @summary Create a runner + * @param {CreateRunnerDTO} runner Runner + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createRunner( + runner: CreateRunnerDTO, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createRunner(runner, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete runner + * @summary Delete runner + * @param {string} runnerId Runner ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteRunner( + runnerId: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deleteRunner(runnerId, options) + .then((request) => request(axios, basePath)) + }, + /** + * Find a runner + * @summary Find a runner + * @param {string} runnerId Runner ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findRunner( + runnerId: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .findRunner(runnerId, options) + .then((request) => request(axios, basePath)) + }, + /** + * List runner jobs + * @summary List runner jobs + * @param {string} runnerId Runner ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listRunnerJobs( + runnerId: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .listRunnerJobs(runnerId, options) + .then((request) => request(axios, basePath)) + }, + /** + * List runners + * @summary List runners + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listRunners( + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .listRunners(options) + .then((request) => request(axios, basePath)) + }, + /** + * Update job state + * @summary Update job state + * @param {string} runnerId Runner ID + * @param {string} jobId Job ID + * @param {UpdateJobState} updateJobState Update job state + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateJobState( + runnerId: string, + jobId: string, + updateJobState: UpdateJobState, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updateJobState(runnerId, jobId, updateJobState, options) + .then((request) => request(axios, basePath)) + }, + /** + * Update runner metadata + * @summary Update runner metadata + * @param {string} runnerId Runner ID + * @param {UpdateRunnerMetadataDTO} runnerMetadata Runner Metadata + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateRunnerMetadata( + runnerId: string, + runnerMetadata: UpdateRunnerMetadataDTO, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updateRunnerMetadata(runnerId, runnerMetadata, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * RunnerApi - object-oriented interface + * @export + * @class RunnerApi + * @extends {BaseAPI} + */ +export class RunnerApi extends BaseAPI { + /** + * Create a runner + * @summary Create a runner + * @param {CreateRunnerDTO} runner Runner + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RunnerApi + */ + public createRunner( + runner: CreateRunnerDTO, + options?: RawAxiosRequestConfig, + ) { + return RunnerApiFp(this.configuration) + .createRunner(runner, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete runner + * @summary Delete runner + * @param {string} runnerId Runner ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RunnerApi + */ + public deleteRunner(runnerId: string, options?: RawAxiosRequestConfig) { + return RunnerApiFp(this.configuration) + .deleteRunner(runnerId, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Find a runner + * @summary Find a runner + * @param {string} runnerId Runner ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RunnerApi + */ + public findRunner(runnerId: string, options?: RawAxiosRequestConfig) { + return RunnerApiFp(this.configuration) + .findRunner(runnerId, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List runner jobs + * @summary List runner jobs + * @param {string} runnerId Runner ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RunnerApi + */ + public listRunnerJobs(runnerId: string, options?: RawAxiosRequestConfig) { + return RunnerApiFp(this.configuration) + .listRunnerJobs(runnerId, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List runners + * @summary List runners + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RunnerApi + */ + public listRunners(options?: RawAxiosRequestConfig) { + return RunnerApiFp(this.configuration) + .listRunners(options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update job state + * @summary Update job state + * @param {string} runnerId Runner ID + * @param {string} jobId Job ID + * @param {UpdateJobState} updateJobState Update job state + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RunnerApi + */ + public updateJobState( + runnerId: string, + jobId: string, + updateJobState: UpdateJobState, + options?: RawAxiosRequestConfig, + ) { + return RunnerApiFp(this.configuration) + .updateJobState(runnerId, jobId, updateJobState, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update runner metadata + * @summary Update runner metadata + * @param {string} runnerId Runner ID + * @param {UpdateRunnerMetadataDTO} runnerMetadata Runner Metadata + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof RunnerApi + */ + public updateRunnerMetadata( + runnerId: string, + runnerMetadata: UpdateRunnerMetadataDTO, + options?: RawAxiosRequestConfig, + ) { + return RunnerApiFp(this.configuration) + .updateRunnerMetadata(runnerId, runnerMetadata, options) + .then((request) => request(this.axios, this.basePath)) + } +} + +/** + * SampleApi - axios parameter creator + * @export + */ +export const SampleApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * List samples + * @summary List samples + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listSamples: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/sample` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * SampleApi - functional programming interface + * @export + */ +export const SampleApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = SampleApiAxiosParamCreator(configuration) + return { + /** + * List samples + * @summary List samples + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listSamples( + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise> + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listSamples( + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['SampleApi.listSamples']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + } +} + +/** + * SampleApi - factory interface + * @export + */ +export const SampleApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = SampleApiFp(configuration) + return { + /** + * List samples + * @summary List samples + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listSamples(options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp + .listSamples(options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * SampleApi - object-oriented interface + * @export + * @class SampleApi + * @extends {BaseAPI} + */ +export class SampleApi extends BaseAPI { + /** + * List samples + * @summary List samples + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SampleApi + */ + public listSamples(options?: RawAxiosRequestConfig) { + return SampleApiFp(this.configuration) + .listSamples(options) + .then((request) => request(this.axios, this.basePath)) + } +} + +/** + * ServerApi - axios parameter creator + * @export + */ +export const ServerApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * Create a new authentication key + * @summary Create a new authentication key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createNetworkKey: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/server/network-key` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get the server configuration + * @summary Get the server configuration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getConfig: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/server/config` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get server log files + * @summary Get server log files + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getServerLogFiles: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/server/logs` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Save the server configuration + * @summary Save the server configuration + * @param {ServerConfig} config Server configuration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + saveConfig: async ( + config: ServerConfig, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'config' is not null or undefined + assertParamExists('saveConfig', 'config', config) + const localVarPath = `/server/config` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { + method: 'PUT', + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + config, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * ServerApi - functional programming interface + * @export + */ +export const ServerApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ServerApiAxiosParamCreator(configuration) + return { + /** + * Create a new authentication key + * @summary Create a new authentication key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createNetworkKey( + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.createNetworkKey(options) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['ServerApi.createNetworkKey']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Get the server configuration + * @summary Get the server configuration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getConfig( + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getConfig( + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['ServerApi.getConfig']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Get server log files + * @summary Get server log files + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getServerLogFiles( + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getServerLogFiles(options) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['ServerApi.getServerLogFiles']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Save the server configuration + * @summary Save the server configuration + * @param {ServerConfig} config Server configuration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async saveConfig( + config: ServerConfig, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.saveConfig( + config, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['ServerApi.saveConfig']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + } +} + +/** + * ServerApi - factory interface + * @export + */ +export const ServerApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ServerApiFp(configuration) + return { + /** + * Create a new authentication key + * @summary Create a new authentication key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createNetworkKey( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createNetworkKey(options) + .then((request) => request(axios, basePath)) + }, + /** + * Get the server configuration + * @summary Get the server configuration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getConfig(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp + .getConfig(options) + .then((request) => request(axios, basePath)) + }, + /** + * Get server log files + * @summary Get server log files + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getServerLogFiles( + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .getServerLogFiles(options) + .then((request) => request(axios, basePath)) + }, + /** + * Save the server configuration + * @summary Save the server configuration + * @param {ServerConfig} config Server configuration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + saveConfig( + config: ServerConfig, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .saveConfig(config, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * ServerApi - object-oriented interface + * @export + * @class ServerApi + * @extends {BaseAPI} + */ +export class ServerApi extends BaseAPI { + /** + * Create a new authentication key + * @summary Create a new authentication key + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ServerApi + */ + public createNetworkKey(options?: RawAxiosRequestConfig) { + return ServerApiFp(this.configuration) + .createNetworkKey(options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get the server configuration + * @summary Get the server configuration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ServerApi + */ + public getConfig(options?: RawAxiosRequestConfig) { + return ServerApiFp(this.configuration) + .getConfig(options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get server log files + * @summary Get server log files + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ServerApi + */ + public getServerLogFiles(options?: RawAxiosRequestConfig) { + return ServerApiFp(this.configuration) + .getServerLogFiles(options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Save the server configuration + * @summary Save the server configuration + * @param {ServerConfig} config Server configuration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ServerApi + */ + public saveConfig(config: ServerConfig, options?: RawAxiosRequestConfig) { + return ServerApiFp(this.configuration) + .saveConfig(config, options) + .then((request) => request(this.axios, this.basePath)) + } +} + +/** + * TargetApi - axios parameter creator + * @export + */ +export const TargetApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * Create a target + * @summary Create a target + * @param {CreateTargetDTO} target Create target + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createTarget: async ( + target: CreateTargetDTO, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'target' is not null or undefined + assertParamExists('createTarget', 'target', target) + const localVarPath = `/target` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + target, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete target + * @summary Delete target + * @param {string} targetId Target ID + * @param {boolean} [force] Force + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteTarget: async ( + targetId: string, + force?: boolean, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'targetId' is not null or undefined + assertParamExists('deleteTarget', 'targetId', targetId) + const localVarPath = `/target/{targetId}`.replace( + `{${'targetId'}}`, + encodeURIComponent(String(targetId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (force !== undefined) { + localVarQueryParameter['force'] = force + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Find target + * @summary Find target + * @param {string} targetId Target ID or Name + * @param {boolean} [showOptions] Show target config options + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findTarget: async ( + targetId: string, + showOptions?: boolean, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'targetId' is not null or undefined + assertParamExists('findTarget', 'targetId', targetId) + const localVarPath = `/target/{targetId}`.replace( + `{${'targetId'}}`, + encodeURIComponent(String(targetId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (showOptions !== undefined) { + localVarQueryParameter['showOptions'] = showOptions + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get target state + * @summary Get target state + * @param {string} targetId Target ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTargetState: async ( + targetId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'targetId' is not null or undefined + assertParamExists('getTargetState', 'targetId', targetId) + const localVarPath = `/target/{targetId}/state`.replace( + `{${'targetId'}}`, + encodeURIComponent(String(targetId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Handles successful creation of the target + * @summary Handles successful creation of the target + * @param {string} targetId Target ID or name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + handleSuccessfulCreation: async ( + targetId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'targetId' is not null or undefined + assertParamExists('handleSuccessfulCreation', 'targetId', targetId) + const localVarPath = + `/target/{targetId}/handle-successful-creation`.replace( + `{${'targetId'}}`, + encodeURIComponent(String(targetId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * List targets + * @summary List targets + * @param {boolean} [showOptions] Show target config options + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listTargets: async ( + showOptions?: boolean, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/target` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (showOptions !== undefined) { + localVarQueryParameter['showOptions'] = showOptions + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Restart target + * @summary Restart target + * @param {string} targetId Target ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + restartTarget: async ( + targetId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'targetId' is not null or undefined + assertParamExists('restartTarget', 'targetId', targetId) + const localVarPath = `/target/{targetId}/restart`.replace( + `{${'targetId'}}`, + encodeURIComponent(String(targetId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Set target to be used by default + * @summary Set target to be used by default + * @param {string} targetId Target ID or name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + setDefaultTarget: async ( + targetId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'targetId' is not null or undefined + assertParamExists('setDefaultTarget', 'targetId', targetId) + const localVarPath = `/target/{targetId}/set-default`.replace( + `{${'targetId'}}`, + encodeURIComponent(String(targetId)), + ) + // 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: 'PATCH', + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Start target + * @summary Start target + * @param {string} targetId Target ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + startTarget: async ( + targetId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'targetId' is not null or undefined + assertParamExists('startTarget', 'targetId', targetId) + const localVarPath = `/target/{targetId}/start`.replace( + `{${'targetId'}}`, + encodeURIComponent(String(targetId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Stop target + * @summary Stop target + * @param {string} targetId Target ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + stopTarget: async ( + targetId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'targetId' is not null or undefined + assertParamExists('stopTarget', 'targetId', targetId) + const localVarPath = `/target/{targetId}/stop`.replace( + `{${'targetId'}}`, + encodeURIComponent(String(targetId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update target metadata + * @summary Update target metadata + * @param {string} targetId Target ID + * @param {UpdateTargetMetadataDTO} targetMetadata Target Metadata + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateTargetMetadata: async ( + targetId: string, + targetMetadata: UpdateTargetMetadataDTO, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'targetId' is not null or undefined + assertParamExists('updateTargetMetadata', 'targetId', targetId) + // verify required parameter 'targetMetadata' is not null or undefined + assertParamExists( + 'updateTargetMetadata', + 'targetMetadata', + targetMetadata, + ) + const localVarPath = `/target/{targetId}/metadata`.replace( + `{${'targetId'}}`, + encodeURIComponent(String(targetId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + targetMetadata, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Update target provider metadata + * @summary Update target provider metadata + * @param {string} targetId Target ID + * @param {UpdateTargetProviderMetadataDTO} metadata Provider metadata + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateTargetProviderMetadata: async ( + targetId: string, + metadata: UpdateTargetProviderMetadataDTO, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'targetId' is not null or undefined + assertParamExists('updateTargetProviderMetadata', 'targetId', targetId) + // verify required parameter 'metadata' is not null or undefined + assertParamExists('updateTargetProviderMetadata', 'metadata', metadata) + const localVarPath = `/target/{targetId}/provider-metadata`.replace( + `{${'targetId'}}`, + encodeURIComponent(String(targetId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + metadata, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} + +/** + * TargetApi - functional programming interface + * @export + */ +export const TargetApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = TargetApiAxiosParamCreator(configuration) + return { + /** + * Create a target + * @summary Create a target + * @param {CreateTargetDTO} target Create target + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createTarget( + target: CreateTargetDTO, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.createTarget( + target, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['TargetApi.createTarget']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Delete target + * @summary Delete target + * @param {string} targetId Target ID + * @param {boolean} [force] Force + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteTarget( + targetId: string, + force?: boolean, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTarget( + targetId, + force, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['TargetApi.deleteTarget']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Find target + * @summary Find target + * @param {string} targetId Target ID or Name + * @param {boolean} [showOptions] Show target config options + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async findTarget( + targetId: string, + showOptions?: boolean, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.findTarget( + targetId, + showOptions, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['TargetApi.findTarget']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Get target state + * @summary Get target state + * @param {string} targetId Target ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTargetState( + targetId: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTargetState( + targetId, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['TargetApi.getTargetState']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Handles successful creation of the target + * @summary Handles successful creation of the target + * @param {string} targetId Target ID or name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async handleSuccessfulCreation( + targetId: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.handleSuccessfulCreation( + targetId, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['TargetApi.handleSuccessfulCreation']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * List targets + * @summary List targets + * @param {boolean} [showOptions] Show target config options + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listTargets( + showOptions?: boolean, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTargets( + showOptions, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['TargetApi.listTargets']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Restart target + * @summary Restart target + * @param {string} targetId Target ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async restartTarget( + targetId: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.restartTarget( + targetId, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['TargetApi.restartTarget']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Set target to be used by default + * @summary Set target to be used by default + * @param {string} targetId Target ID or name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async setDefaultTarget( + targetId: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.setDefaultTarget(targetId, options) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['TargetApi.setDefaultTarget']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Start target + * @summary Start target + * @param {string} targetId Target ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async startTarget( + targetId: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.startTarget( + targetId, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['TargetApi.startTarget']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Stop target + * @summary Stop target + * @param {string} targetId Target ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async stopTarget( + targetId: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.stopTarget( + targetId, + options, ) - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['TargetApi.stopTarget']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) }, /** - * List API keys - * @summary List API keys + * Update target metadata + * @summary Update target metadata + * @param {string} targetId Target ID + * @param {UpdateTargetMetadataDTO} targetMetadata Target Metadata * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listClientApiKeys: async ( - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/apikey` - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + async updateTargetMetadata( + targetId: string, + targetMetadata: UpdateTargetMetadataDTO, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.updateTargetMetadata( + targetId, + targetMetadata, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['TargetApi.updateTargetMetadata']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) }, /** - * Revoke API key - * @summary Revoke API key - * @param {string} apiKeyName API key name + * Update target provider metadata + * @summary Update target provider metadata + * @param {string} targetId Target ID + * @param {UpdateTargetProviderMetadataDTO} metadata Provider metadata * @param {*} [options] Override http request option. * @throws {RequiredError} */ - revokeApiKey: async ( - apiKeyName: string, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'apiKeyName' is not null or undefined - assertParamExists('revokeApiKey', 'apiKeyName', apiKeyName) - const localVarPath = `/apikey/{apiKeyName}`.replace( - `{${'apiKeyName'}}`, - encodeURIComponent(String(apiKeyName)), - ) - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + async updateTargetProviderMetadata( + targetId: string, + metadata: UpdateTargetProviderMetadataDTO, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.updateTargetProviderMetadata( + targetId, + metadata, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['TargetApi.updateTargetProviderMetadata']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) }, } } /** - * ApiKeyApi - functional programming interface + * TargetApi - factory interface * @export */ -export const ApiKeyApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = ApiKeyApiAxiosParamCreator(configuration) +export const TargetApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = TargetApiFp(configuration) return { /** - * Generate an API key - * @summary Generate an API key - * @param {string} apiKeyName API key name + * Create a target + * @summary Create a target + * @param {CreateTargetDTO} target Create target + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createTarget( + target: CreateTargetDTO, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createTarget(target, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete target + * @summary Delete target + * @param {string} targetId Target ID + * @param {boolean} [force] Force + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteTarget( + targetId: string, + force?: boolean, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deleteTarget(targetId, force, options) + .then((request) => request(axios, basePath)) + }, + /** + * Find target + * @summary Find target + * @param {string} targetId Target ID or Name + * @param {boolean} [showOptions] Show target config options + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findTarget( + targetId: string, + showOptions?: boolean, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .findTarget(targetId, showOptions, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get target state + * @summary Get target state + * @param {string} targetId Target ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTargetState( + targetId: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getTargetState(targetId, options) + .then((request) => request(axios, basePath)) + }, + /** + * Handles successful creation of the target + * @summary Handles successful creation of the target + * @param {string} targetId Target ID or name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + handleSuccessfulCreation( + targetId: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .handleSuccessfulCreation(targetId, options) + .then((request) => request(axios, basePath)) + }, + /** + * List targets + * @summary List targets + * @param {boolean} [showOptions] Show target config options + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listTargets( + showOptions?: boolean, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .listTargets(showOptions, options) + .then((request) => request(axios, basePath)) + }, + /** + * Restart target + * @summary Restart target + * @param {string} targetId Target ID or Name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async generateApiKey( - apiKeyName: string, + restartTarget( + targetId: string, options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.generateApiKey( - apiKeyName, - options, - ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['ApiKeyApi.generateApiKey']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) + ): AxiosPromise { + return localVarFp + .restartTarget(targetId, options) + .then((request) => request(axios, basePath)) }, /** - * List API keys - * @summary List API keys + * Set target to be used by default + * @summary Set target to be used by default + * @param {string} targetId Target ID or name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listClientApiKeys( + setDefaultTarget( + targetId: string, options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise> - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.listClientApiKeys(options) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['ApiKeyApi.listClientApiKeys']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) + ): AxiosPromise { + return localVarFp + .setDefaultTarget(targetId, options) + .then((request) => request(axios, basePath)) }, /** - * Revoke API key - * @summary Revoke API key - * @param {string} apiKeyName API key name + * Start target + * @summary Start target + * @param {string} targetId Target ID or Name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async revokeApiKey( - apiKeyName: string, + startTarget( + targetId: string, options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.revokeApiKey( - apiKeyName, - options, - ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['ApiKeyApi.revokeApiKey']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) + ): AxiosPromise { + return localVarFp + .startTarget(targetId, options) + .then((request) => request(axios, basePath)) }, - } -} - -/** - * ApiKeyApi - factory interface - * @export - */ -export const ApiKeyApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = ApiKeyApiFp(configuration) - return { /** - * Generate an API key - * @summary Generate an API key - * @param {string} apiKeyName API key name + * Stop target + * @summary Stop target + * @param {string} targetId Target ID or Name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - generateApiKey( - apiKeyName: string, + stopTarget( + targetId: string, options?: RawAxiosRequestConfig, - ): AxiosPromise { + ): AxiosPromise { return localVarFp - .generateApiKey(apiKeyName, options) + .stopTarget(targetId, options) .then((request) => request(axios, basePath)) }, /** - * List API keys - * @summary List API keys + * Update target metadata + * @summary Update target metadata + * @param {string} targetId Target ID + * @param {UpdateTargetMetadataDTO} targetMetadata Target Metadata * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listClientApiKeys( + updateTargetMetadata( + targetId: string, + targetMetadata: UpdateTargetMetadataDTO, options?: RawAxiosRequestConfig, - ): AxiosPromise> { + ): AxiosPromise { return localVarFp - .listClientApiKeys(options) + .updateTargetMetadata(targetId, targetMetadata, options) .then((request) => request(axios, basePath)) }, /** - * Revoke API key - * @summary Revoke API key - * @param {string} apiKeyName API key name + * Update target provider metadata + * @summary Update target provider metadata + * @param {string} targetId Target ID + * @param {UpdateTargetProviderMetadataDTO} metadata Provider metadata * @param {*} [options] Override http request option. * @throws {RequiredError} */ - revokeApiKey( - apiKeyName: string, + updateTargetProviderMetadata( + targetId: string, + metadata: UpdateTargetProviderMetadataDTO, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .revokeApiKey(apiKeyName, options) + .updateTargetProviderMetadata(targetId, metadata, options) .then((request) => request(axios, basePath)) }, } } /** - * ApiKeyApi - object-oriented interface + * TargetApi - object-oriented interface * @export - * @class ApiKeyApi + * @class TargetApi * @extends {BaseAPI} */ -export class ApiKeyApi extends BaseAPI { +export class TargetApi extends BaseAPI { /** - * Generate an API key - * @summary Generate an API key - * @param {string} apiKeyName API key name + * Create a target + * @summary Create a target + * @param {CreateTargetDTO} target Create target * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ApiKeyApi + * @memberof TargetApi */ - public generateApiKey(apiKeyName: string, options?: RawAxiosRequestConfig) { - return ApiKeyApiFp(this.configuration) - .generateApiKey(apiKeyName, options) + public createTarget( + target: CreateTargetDTO, + options?: RawAxiosRequestConfig, + ) { + return TargetApiFp(this.configuration) + .createTarget(target, options) .then((request) => request(this.axios, this.basePath)) } /** - * List API keys - * @summary List API keys + * Delete target + * @summary Delete target + * @param {string} targetId Target ID + * @param {boolean} [force] Force * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ApiKeyApi + * @memberof TargetApi */ - public listClientApiKeys(options?: RawAxiosRequestConfig) { - return ApiKeyApiFp(this.configuration) - .listClientApiKeys(options) + public deleteTarget( + targetId: string, + force?: boolean, + options?: RawAxiosRequestConfig, + ) { + return TargetApiFp(this.configuration) + .deleteTarget(targetId, force, options) .then((request) => request(this.axios, this.basePath)) } /** - * Revoke API key - * @summary Revoke API key - * @param {string} apiKeyName API key name + * Find target + * @summary Find target + * @param {string} targetId Target ID or Name + * @param {boolean} [showOptions] Show target config options * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ApiKeyApi + * @memberof TargetApi */ - public revokeApiKey(apiKeyName: string, options?: RawAxiosRequestConfig) { - return ApiKeyApiFp(this.configuration) - .revokeApiKey(apiKeyName, options) + public findTarget( + targetId: string, + showOptions?: boolean, + options?: RawAxiosRequestConfig, + ) { + return TargetApiFp(this.configuration) + .findTarget(targetId, showOptions, options) .then((request) => request(this.axios, this.basePath)) } -} -/** - * BuildApi - axios parameter creator - * @export - */ -export const BuildApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * Create a build - * @summary Create a build - * @param {CreateBuildDTO} createBuildDto Create Build DTO - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createBuild: async ( - createBuildDto: CreateBuildDTO, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'createBuildDto' is not null or undefined - assertParamExists('createBuild', 'createBuildDto', createBuildDto) - const localVarPath = `/build` - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) + /** + * Get target state + * @summary Get target state + * @param {string} targetId Target ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TargetApi + */ + public getTargetState(targetId: string, options?: RawAxiosRequestConfig) { + return TargetApiFp(this.configuration) + .getTargetState(targetId, options) + .then((request) => request(this.axios, this.basePath)) + } - localVarHeaderParameter['Content-Type'] = 'application/json' + /** + * Handles successful creation of the target + * @summary Handles successful creation of the target + * @param {string} targetId Target ID or name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TargetApi + */ + public handleSuccessfulCreation( + targetId: string, + options?: RawAxiosRequestConfig, + ) { + return TargetApiFp(this.configuration) + .handleSuccessfulCreation(targetId, options) + .then((request) => request(this.axios, this.basePath)) + } - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - localVarRequestOptions.data = serializeDataIfNeeded( - createBuildDto, - localVarRequestOptions, - configuration, - ) + /** + * List targets + * @summary List targets + * @param {boolean} [showOptions] Show target config options + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TargetApi + */ + public listTargets(showOptions?: boolean, options?: RawAxiosRequestConfig) { + return TargetApiFp(this.configuration) + .listTargets(showOptions, options) + .then((request) => request(this.axios, this.basePath)) + } - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - /** - * Delete ALL builds - * @summary Delete ALL builds - * @param {boolean} [force] Force - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteAllBuilds: async ( - force?: boolean, - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/build` - // 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 - } + /** + * Restart target + * @summary Restart target + * @param {string} targetId Target ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TargetApi + */ + public restartTarget(targetId: string, options?: RawAxiosRequestConfig) { + return TargetApiFp(this.configuration) + .restartTarget(targetId, options) + .then((request) => request(this.axios, this.basePath)) + } - const localVarRequestOptions = { - method: 'DELETE', - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any + /** + * Set target to be used by default + * @summary Set target to be used by default + * @param {string} targetId Target ID or name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TargetApi + */ + public setDefaultTarget(targetId: string, options?: RawAxiosRequestConfig) { + return TargetApiFp(this.configuration) + .setDefaultTarget(targetId, options) + .then((request) => request(this.axios, this.basePath)) + } - // authentication Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) + /** + * Start target + * @summary Start target + * @param {string} targetId Target ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TargetApi + */ + public startTarget(targetId: string, options?: RawAxiosRequestConfig) { + return TargetApiFp(this.configuration) + .startTarget(targetId, options) + .then((request) => request(this.axios, this.basePath)) + } - if (force !== undefined) { - localVarQueryParameter['force'] = force - } + /** + * Stop target + * @summary Stop target + * @param {string} targetId Target ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TargetApi + */ + public stopTarget(targetId: string, options?: RawAxiosRequestConfig) { + return TargetApiFp(this.configuration) + .stopTarget(targetId, options) + .then((request) => request(this.axios, this.basePath)) + } - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } + /** + * Update target metadata + * @summary Update target metadata + * @param {string} targetId Target ID + * @param {UpdateTargetMetadataDTO} targetMetadata Target Metadata + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TargetApi + */ + public updateTargetMetadata( + targetId: string, + targetMetadata: UpdateTargetMetadataDTO, + options?: RawAxiosRequestConfig, + ) { + return TargetApiFp(this.configuration) + .updateTargetMetadata(targetId, targetMetadata, options) + .then((request) => request(this.axios, this.basePath)) + } - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, + /** + * Update target provider metadata + * @summary Update target provider metadata + * @param {string} targetId Target ID + * @param {UpdateTargetProviderMetadataDTO} metadata Provider metadata + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TargetApi + */ + public updateTargetProviderMetadata( + targetId: string, + metadata: UpdateTargetProviderMetadataDTO, + options?: RawAxiosRequestConfig, + ) { + return TargetApiFp(this.configuration) + .updateTargetProviderMetadata(targetId, metadata, options) + .then((request) => request(this.axios, this.basePath)) + } +} + +/** + * TargetConfigApi - axios parameter creator + * @export + */ +export const TargetConfigApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * Delete build - * @summary Delete build - * @param {string} buildId Build ID - * @param {boolean} [force] Force + * Create a target config + * @summary Create a target config + * @param {CreateTargetConfigDTO} targetConfig Target config to create + * @param {boolean} [showOptions] Show target config options * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteBuild: async ( - buildId: string, - force?: boolean, + createTargetConfig: async ( + targetConfig: CreateTargetConfigDTO, + showOptions?: boolean, options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'buildId' is not null or undefined - assertParamExists('deleteBuild', 'buildId', buildId) - const localVarPath = `/build/{buildId}`.replace( - `{${'buildId'}}`, - encodeURIComponent(String(buildId)), - ) + // verify required parameter 'targetConfig' is not null or undefined + assertParamExists('createTargetConfig', 'targetConfig', targetConfig) + const localVarPath = `/target-config` // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -2235,7 +11583,7 @@ export const BuildApiAxiosParamCreator = function ( } const localVarRequestOptions = { - method: 'DELETE', + method: 'POST', ...baseOptions, ...options, } @@ -2249,10 +11597,12 @@ export const BuildApiAxiosParamCreator = function ( configuration, ) - if (force !== undefined) { - localVarQueryParameter['force'] = force + if (showOptions !== undefined) { + localVarQueryParameter['showOptions'] = showOptions } + localVarHeaderParameter['Content-Type'] = 'application/json' + setSearchParams(localVarUrlObj, localVarQueryParameter) let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} @@ -2261,6 +11611,11 @@ export const BuildApiAxiosParamCreator = function ( ...headersFromBaseOptions, ...options.headers, } + localVarRequestOptions.data = serializeDataIfNeeded( + targetConfig, + localVarRequestOptions, + configuration, + ) return { url: toPathString(localVarUrlObj), @@ -2268,23 +11623,21 @@ export const BuildApiAxiosParamCreator = function ( } }, /** - * Delete builds - * @summary Delete builds - * @param {string} prebuildId Prebuild ID - * @param {boolean} [force] Force + * Delete a target config + * @summary Delete a target config + * @param {string} configId Target Config Id * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteBuildsFromPrebuild: async ( - prebuildId: string, - force?: boolean, + deleteTargetConfig: async ( + configId: string, options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'prebuildId' is not null or undefined - assertParamExists('deleteBuildsFromPrebuild', 'prebuildId', prebuildId) - const localVarPath = `/build/prebuild/{prebuildId}`.replace( - `{${'prebuildId'}}`, - encodeURIComponent(String(prebuildId)), + // verify required parameter 'configId' is not null or undefined + assertParamExists('deleteTargetConfig', 'configId', configId) + const localVarPath = `/target-config/{configId}`.replace( + `{${'configId'}}`, + encodeURIComponent(String(configId)), ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) @@ -2308,10 +11661,6 @@ export const BuildApiAxiosParamCreator = function ( configuration, ) - if (force !== undefined) { - localVarQueryParameter['force'] = force - } - setSearchParams(localVarUrlObj, localVarQueryParameter) let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} @@ -2327,22 +11676,17 @@ export const BuildApiAxiosParamCreator = function ( } }, /** - * Get build data - * @summary Get build data - * @param {string} buildId Build ID + * List target configs + * @summary List target configs + * @param {boolean} [showOptions] Show target config options * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getBuild: async ( - buildId: string, + listTargetConfigs: async ( + showOptions?: boolean, options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'buildId' is not null or undefined - assertParamExists('getBuild', 'buildId', buildId) - const localVarPath = `/build/{buildId}`.replace( - `{${'buildId'}}`, - encodeURIComponent(String(buildId)), - ) + const localVarPath = `/target-config` // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -2365,51 +11709,9 @@ export const BuildApiAxiosParamCreator = function ( configuration, ) - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - /** - * List builds - * @summary List builds - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listBuilds: async ( - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/build` - // 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, + if (showOptions !== undefined) { + localVarQueryParameter['showOptions'] = showOptions } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - - // authentication Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) setSearchParams(localVarUrlObj, localVarQueryParameter) let headersFromBaseOptions = @@ -2429,129 +11731,37 @@ export const BuildApiAxiosParamCreator = function ( } /** - * BuildApi - functional programming interface + * TargetConfigApi - functional programming interface * @export */ -export const BuildApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = BuildApiAxiosParamCreator(configuration) +export const TargetConfigApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = + TargetConfigApiAxiosParamCreator(configuration) return { /** - * Create a build - * @summary Create a build - * @param {CreateBuildDTO} createBuildDto Create Build DTO - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createBuild( - createBuildDto: CreateBuildDTO, - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.createBuild( - createBuildDto, - options, - ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['BuildApi.createBuild']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) - }, - /** - * Delete ALL builds - * @summary Delete ALL builds - * @param {boolean} [force] Force - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteAllBuilds( - force?: boolean, - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAllBuilds( - force, - options, - ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['BuildApi.deleteAllBuilds']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) - }, - /** - * Delete build - * @summary Delete build - * @param {string} buildId Build ID - * @param {boolean} [force] Force - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteBuild( - buildId: string, - force?: boolean, - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBuild( - buildId, - force, - options, - ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['BuildApi.deleteBuild']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) - }, - /** - * Delete builds - * @summary Delete builds - * @param {string} prebuildId Prebuild ID - * @param {boolean} [force] Force + * Create a target config + * @summary Create a target config + * @param {CreateTargetConfigDTO} targetConfig Target config to create + * @param {boolean} [showOptions] Show target config options * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteBuildsFromPrebuild( - prebuildId: string, - force?: boolean, + async createTargetConfig( + targetConfig: CreateTargetConfigDTO, + showOptions?: boolean, options?: RawAxiosRequestConfig, ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise + (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = - await localVarAxiosParamCreator.deleteBuildsFromPrebuild( - prebuildId, - force, + await localVarAxiosParamCreator.createTargetConfig( + targetConfig, + showOptions, options, ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['BuildApi.deleteBuildsFromPrebuild']?.[ + operationServerMap['TargetConfigApi.createTargetConfig']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -2563,26 +11773,25 @@ export const BuildApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath) }, /** - * Get build data - * @summary Get build data - * @param {string} buildId Build ID + * Delete a target config + * @summary Delete a target config + * @param {string} configId Target Config Id * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getBuild( - buildId: string, + async deleteTargetConfig( + configId: string, options?: RawAxiosRequestConfig, ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise + (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { - const localVarAxiosArgs = await localVarAxiosParamCreator.getBuild( - buildId, - options, - ) + const localVarAxiosArgs = + await localVarAxiosParamCreator.deleteTargetConfig(configId, options) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['BuildApi.getBuild']?.[localVarOperationServerIndex] - ?.url + operationServerMap['TargetConfigApi.deleteTargetConfig']?.[ + localVarOperationServerIndex + ]?.url return (axios, basePath) => createRequestFunction( localVarAxiosArgs, @@ -2592,22 +11801,26 @@ export const BuildApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath) }, /** - * List builds - * @summary List builds + * List target configs + * @summary List target configs + * @param {boolean} [showOptions] Show target config options * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listBuilds( + async listTargetConfigs( + showOptions?: boolean, options?: RawAxiosRequestConfig, ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise> + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> > { - const localVarAxiosArgs = await localVarAxiosParamCreator.listBuilds( - options, - ) + const localVarAxiosArgs = + await localVarAxiosParamCreator.listTargetConfigs(showOptions, options) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['BuildApi.listBuilds']?.[ + operationServerMap['TargetConfigApi.listTargetConfigs']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -2622,237 +11835,528 @@ export const BuildApiFp = function (configuration?: Configuration) { } /** - * BuildApi - factory interface + * TargetConfigApi - factory interface * @export */ -export const BuildApiFactory = function ( +export const TargetConfigApiFactory = function ( configuration?: Configuration, basePath?: string, axios?: AxiosInstance, ) { - const localVarFp = BuildApiFp(configuration) + const localVarFp = TargetConfigApiFp(configuration) return { /** - * Create a build - * @summary Create a build - * @param {CreateBuildDTO} createBuildDto Create Build DTO + * Create a target config + * @summary Create a target config + * @param {CreateTargetConfigDTO} targetConfig Target config to create + * @param {boolean} [showOptions] Show target config options * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createBuild( - createBuildDto: CreateBuildDTO, + createTargetConfig( + targetConfig: CreateTargetConfigDTO, + showOptions?: boolean, options?: RawAxiosRequestConfig, - ): AxiosPromise { + ): AxiosPromise { return localVarFp - .createBuild(createBuildDto, options) + .createTargetConfig(targetConfig, showOptions, options) .then((request) => request(axios, basePath)) }, /** - * Delete ALL builds - * @summary Delete ALL builds - * @param {boolean} [force] Force + * Delete a target config + * @summary Delete a target config + * @param {string} configId Target Config Id * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteAllBuilds( - force?: boolean, + deleteTargetConfig( + configId: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .deleteAllBuilds(force, options) + .deleteTargetConfig(configId, options) .then((request) => request(axios, basePath)) }, /** - * Delete build - * @summary Delete build - * @param {string} buildId Build ID - * @param {boolean} [force] Force + * List target configs + * @summary List target configs + * @param {boolean} [showOptions] Show target config options * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteBuild( - buildId: string, - force?: boolean, + listTargetConfigs( + showOptions?: boolean, options?: RawAxiosRequestConfig, - ): AxiosPromise { + ): AxiosPromise> { return localVarFp - .deleteBuild(buildId, force, options) + .listTargetConfigs(showOptions, options) .then((request) => request(axios, basePath)) }, + } +} + +/** + * TargetConfigApi - object-oriented interface + * @export + * @class TargetConfigApi + * @extends {BaseAPI} + */ +export class TargetConfigApi extends BaseAPI { + /** + * Create a target config + * @summary Create a target config + * @param {CreateTargetConfigDTO} targetConfig Target config to create + * @param {boolean} [showOptions] Show target config options + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TargetConfigApi + */ + public createTargetConfig( + targetConfig: CreateTargetConfigDTO, + showOptions?: boolean, + options?: RawAxiosRequestConfig, + ) { + return TargetConfigApiFp(this.configuration) + .createTargetConfig(targetConfig, showOptions, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete a target config + * @summary Delete a target config + * @param {string} configId Target Config Id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TargetConfigApi + */ + public deleteTargetConfig(configId: string, options?: RawAxiosRequestConfig) { + return TargetConfigApiFp(this.configuration) + .deleteTargetConfig(configId, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List target configs + * @summary List target configs + * @param {boolean} [showOptions] Show target config options + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TargetConfigApi + */ + public listTargetConfigs( + showOptions?: boolean, + options?: RawAxiosRequestConfig, + ) { + return TargetConfigApiFp(this.configuration) + .listTargetConfigs(showOptions, options) + .then((request) => request(this.axios, this.basePath)) + } +} + +/** + * WorkspaceApi - axios parameter creator + * @export + */ +export const WorkspaceApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * Create a workspace + * @summary Create a workspace + * @param {CreateWorkspaceDTO} workspace Create workspace + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createWorkspace: async ( + workspace: CreateWorkspaceDTO, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspace' is not null or undefined + assertParamExists('createWorkspace', 'workspace', workspace) + const localVarPath = `/workspace` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + workspace, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete workspace + * @summary Delete workspace + * @param {string} workspaceId Workspace ID + * @param {boolean} [force] Force + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteWorkspace: async ( + workspaceId: string, + force?: boolean, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('deleteWorkspace', 'workspaceId', workspaceId) + const localVarPath = `/workspace/{workspaceId}`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (force !== undefined) { + localVarQueryParameter['force'] = force + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Find workspace + * @summary Find workspace + * @param {string} workspaceId Workspace ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + findWorkspace: async ( + workspaceId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('findWorkspace', 'workspaceId', workspaceId) + const localVarPath = `/workspace/{workspaceId}`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * Delete builds - * @summary Delete builds - * @param {string} prebuildId Prebuild ID - * @param {boolean} [force] Force + * Get workspace state + * @summary Get workspace state + * @param {string} workspaceId Workspace ID or Name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteBuildsFromPrebuild( - prebuildId: string, - force?: boolean, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .deleteBuildsFromPrebuild(prebuildId, force, options) - .then((request) => request(axios, basePath)) + getWorkspaceState: async ( + workspaceId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('getWorkspaceState', 'workspaceId', workspaceId) + const localVarPath = `/workspace/{workspaceId}/state`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } }, /** - * Get build data - * @summary Get build data - * @param {string} buildId Build ID + * List workspaces + * @summary List workspaces + * @param {string} [labels] JSON encoded labels * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getBuild( - buildId: string, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .getBuild(buildId, options) - .then((request) => request(axios, basePath)) + listWorkspaces: async ( + labels?: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/workspace` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (labels !== undefined) { + localVarQueryParameter['labels'] = labels + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } }, /** - * List builds - * @summary List builds + * Restart workspace + * @summary Restart workspace + * @param {string} workspaceId Workspace ID or Name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listBuilds(options?: RawAxiosRequestConfig): AxiosPromise> { - return localVarFp - .listBuilds(options) - .then((request) => request(axios, basePath)) - }, - } -} + restartWorkspace: async ( + workspaceId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('restartWorkspace', 'workspaceId', workspaceId) + const localVarPath = `/workspace/{workspaceId}/restart`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) + // 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 + } -/** - * BuildApi - object-oriented interface - * @export - * @class BuildApi - * @extends {BaseAPI} - */ -export class BuildApi extends BaseAPI { - /** - * Create a build - * @summary Create a build - * @param {CreateBuildDTO} createBuildDto Create Build DTO - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BuildApi - */ - public createBuild( - createBuildDto: CreateBuildDTO, - options?: RawAxiosRequestConfig, - ) { - return BuildApiFp(this.configuration) - .createBuild(createBuildDto, options) - .then((request) => request(this.axios, this.basePath)) - } + const localVarRequestOptions = { + method: 'POST', + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any - /** - * Delete ALL builds - * @summary Delete ALL builds - * @param {boolean} [force] Force - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BuildApi - */ - public deleteAllBuilds(force?: boolean, options?: RawAxiosRequestConfig) { - return BuildApiFp(this.configuration) - .deleteAllBuilds(force, options) - .then((request) => request(this.axios, this.basePath)) - } + // authentication Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) - /** - * Delete build - * @summary Delete build - * @param {string} buildId Build ID - * @param {boolean} [force] Force - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BuildApi - */ - public deleteBuild( - buildId: string, - force?: boolean, - options?: RawAxiosRequestConfig, - ) { - return BuildApiFp(this.configuration) - .deleteBuild(buildId, force, options) - .then((request) => request(this.axios, this.basePath)) - } + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } - /** - * Delete builds - * @summary Delete builds - * @param {string} prebuildId Prebuild ID - * @param {boolean} [force] Force - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BuildApi - */ - public deleteBuildsFromPrebuild( - prebuildId: string, - force?: boolean, - options?: RawAxiosRequestConfig, - ) { - return BuildApiFp(this.configuration) - .deleteBuildsFromPrebuild(prebuildId, force, options) - .then((request) => request(this.axios, this.basePath)) - } + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Start workspace + * @summary Start workspace + * @param {string} workspaceId Workspace ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + startWorkspace: async ( + workspaceId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('startWorkspace', 'workspaceId', workspaceId) + const localVarPath = `/workspace/{workspaceId}/start`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) + // 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 - /** - * Get build data - * @summary Get build data - * @param {string} buildId Build ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BuildApi - */ - public getBuild(buildId: string, options?: RawAxiosRequestConfig) { - return BuildApiFp(this.configuration) - .getBuild(buildId, options) - .then((request) => request(this.axios, this.basePath)) - } + // authentication Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) - /** - * List builds - * @summary List builds - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BuildApi - */ - public listBuilds(options?: RawAxiosRequestConfig) { - return BuildApiFp(this.configuration) - .listBuilds(options) - .then((request) => request(this.axios, this.basePath)) - } -} + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } -/** - * ContainerRegistryApi - axios parameter creator - * @export - */ -export const ContainerRegistryApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * Get container registry credentials - * @summary Get container registry credentials - * @param {string} server Container Registry server name + * Stop workspace + * @summary Stop workspace + * @param {string} workspaceId Workspace ID or Name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getContainerRegistry: async ( - server: string, + stopWorkspace: async ( + workspaceId: string, options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'server' is not null or undefined - assertParamExists('getContainerRegistry', 'server', server) - const localVarPath = `/container-registry/{server}`.replace( - `{${'server'}}`, - encodeURIComponent(String(server)), + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('stopWorkspace', 'workspaceId', workspaceId) + const localVarPath = `/workspace/{workspaceId}/stop`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) @@ -2862,7 +12366,7 @@ export const ContainerRegistryApiAxiosParamCreator = function ( } const localVarRequestOptions = { - method: 'GET', + method: 'POST', ...baseOptions, ...options, } @@ -2891,15 +12395,26 @@ export const ContainerRegistryApiAxiosParamCreator = function ( } }, /** - * List container registries - * @summary List container registries + * Update workspace labels + * @summary Update workspace labels + * @param {string} workspaceId Workspace ID or Name + * @param {{ [key: string]: string; }} labels Labels * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listContainerRegistries: async ( + updateWorkspaceLabels: async ( + workspaceId: string, + labels: { [key: string]: string }, options: RawAxiosRequestConfig = {}, ): Promise => { - const localVarPath = `/container-registry` + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('updateWorkspaceLabels', 'workspaceId', workspaceId) + // verify required parameter 'labels' is not null or undefined + assertParamExists('updateWorkspaceLabels', 'labels', labels) + const localVarPath = `/workspace/{workspaceId}/labels`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -2908,7 +12423,7 @@ export const ContainerRegistryApiAxiosParamCreator = function ( } const localVarRequestOptions = { - method: 'GET', + method: 'POST', ...baseOptions, ...options, } @@ -2922,6 +12437,8 @@ export const ContainerRegistryApiAxiosParamCreator = function ( configuration, ) + localVarHeaderParameter['Content-Type'] = 'application/json' + setSearchParams(localVarUrlObj, localVarQueryParameter) let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} @@ -2930,6 +12447,11 @@ export const ContainerRegistryApiAxiosParamCreator = function ( ...headersFromBaseOptions, ...options.headers, } + localVarRequestOptions.data = serializeDataIfNeeded( + labels, + localVarRequestOptions, + configuration, + ) return { url: toPathString(localVarUrlObj), @@ -2937,21 +12459,29 @@ export const ContainerRegistryApiAxiosParamCreator = function ( } }, /** - * Remove a container registry credentials - * @summary Remove a container registry credentials - * @param {string} server Container Registry server name + * Update workspace metadata + * @summary Update workspace metadata + * @param {string} workspaceId Workspace ID + * @param {UpdateWorkspaceMetadataDTO} workspaceMetadata Workspace Metadata * @param {*} [options] Override http request option. * @throws {RequiredError} */ - removeContainerRegistry: async ( - server: string, + updateWorkspaceMetadata: async ( + workspaceId: string, + workspaceMetadata: UpdateWorkspaceMetadataDTO, options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'server' is not null or undefined - assertParamExists('removeContainerRegistry', 'server', server) - const localVarPath = `/container-registry/{server}`.replace( - `{${'server'}}`, - encodeURIComponent(String(server)), + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('updateWorkspaceMetadata', 'workspaceId', workspaceId) + // verify required parameter 'workspaceMetadata' is not null or undefined + assertParamExists( + 'updateWorkspaceMetadata', + 'workspaceMetadata', + workspaceMetadata, + ) + const localVarPath = `/workspace/{workspaceId}/metadata`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) @@ -2961,7 +12491,7 @@ export const ContainerRegistryApiAxiosParamCreator = function ( } const localVarRequestOptions = { - method: 'DELETE', + method: 'POST', ...baseOptions, ...options, } @@ -2975,6 +12505,8 @@ export const ContainerRegistryApiAxiosParamCreator = function ( configuration, ) + localVarHeaderParameter['Content-Type'] = 'application/json' + setSearchParams(localVarUrlObj, localVarQueryParameter) let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} @@ -2983,6 +12515,11 @@ export const ContainerRegistryApiAxiosParamCreator = function ( ...headersFromBaseOptions, ...options.headers, } + localVarRequestOptions.data = serializeDataIfNeeded( + workspaceMetadata, + localVarRequestOptions, + configuration, + ) return { url: toPathString(localVarUrlObj), @@ -2990,29 +12527,29 @@ export const ContainerRegistryApiAxiosParamCreator = function ( } }, /** - * Set container registry credentials - * @summary Set container registry credentials - * @param {string} server Container Registry server name - * @param {ContainerRegistry} containerRegistry Container Registry credentials to set + * Update workspace provider metadata + * @summary Update workspace provider metadata + * @param {string} workspaceId Workspace ID + * @param {UpdateWorkspaceProviderMetadataDTO} metadata Provider metadata * @param {*} [options] Override http request option. * @throws {RequiredError} */ - setContainerRegistry: async ( - server: string, - containerRegistry: ContainerRegistry, + updateWorkspaceProviderMetadata: async ( + workspaceId: string, + metadata: UpdateWorkspaceProviderMetadataDTO, options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'server' is not null or undefined - assertParamExists('setContainerRegistry', 'server', server) - // verify required parameter 'containerRegistry' is not null or undefined + // verify required parameter 'workspaceId' is not null or undefined assertParamExists( - 'setContainerRegistry', - 'containerRegistry', - containerRegistry, + 'updateWorkspaceProviderMetadata', + 'workspaceId', + workspaceId, ) - const localVarPath = `/container-registry/{server}`.replace( - `{${'server'}}`, - encodeURIComponent(String(server)), + // verify required parameter 'metadata' is not null or undefined + assertParamExists('updateWorkspaceProviderMetadata', 'metadata', metadata) + const localVarPath = `/workspace/{workspaceId}/provider-metadata`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) @@ -3022,7 +12559,7 @@ export const ContainerRegistryApiAxiosParamCreator = function ( } const localVarRequestOptions = { - method: 'PUT', + method: 'POST', ...baseOptions, ...options, } @@ -3047,7 +12584,7 @@ export const ContainerRegistryApiAxiosParamCreator = function ( ...options.headers, } localVarRequestOptions.data = serializeDataIfNeeded( - containerRegistry, + metadata, localVarRequestOptions, configuration, ) @@ -3061,34 +12598,184 @@ export const ContainerRegistryApiAxiosParamCreator = function ( } /** - * ContainerRegistryApi - functional programming interface + * WorkspaceApi - functional programming interface * @export */ -export const ContainerRegistryApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = - ContainerRegistryApiAxiosParamCreator(configuration) +export const WorkspaceApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = WorkspaceApiAxiosParamCreator(configuration) return { /** - * Get container registry credentials - * @summary Get container registry credentials - * @param {string} server Container Registry server name + * Create a workspace + * @summary Create a workspace + * @param {CreateWorkspaceDTO} workspace Create workspace + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createWorkspace( + workspace: CreateWorkspaceDTO, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.createWorkspace( + workspace, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['WorkspaceApi.createWorkspace']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Delete workspace + * @summary Delete workspace + * @param {string} workspaceId Workspace ID + * @param {boolean} [force] Force + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteWorkspace( + workspaceId: string, + force?: boolean, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteWorkspace( + workspaceId, + force, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['WorkspaceApi.deleteWorkspace']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Find workspace + * @summary Find workspace + * @param {string} workspaceId Workspace ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async findWorkspace( + workspaceId: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.findWorkspace( + workspaceId, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['WorkspaceApi.findWorkspace']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Get workspace state + * @summary Get workspace state + * @param {string} workspaceId Workspace ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getWorkspaceState( + workspaceId: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getWorkspaceState(workspaceId, options) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['WorkspaceApi.getWorkspaceState']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * List workspaces + * @summary List workspaces + * @param {string} [labels] JSON encoded labels + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listWorkspaces( + labels?: string, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.listWorkspaces( + labels, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['WorkspaceApi.listWorkspaces']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Restart workspace + * @summary Restart workspace + * @param {string} workspaceId Workspace ID or Name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getContainerRegistry( - server: string, + async restartWorkspace( + workspaceId: string, options?: RawAxiosRequestConfig, ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise + (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = - await localVarAxiosParamCreator.getContainerRegistry(server, options) + await localVarAxiosParamCreator.restartWorkspace(workspaceId, options) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['ContainerRegistryApi.getContainerRegistry']?.[ + operationServerMap['WorkspaceApi.restartWorkspace']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -3100,24 +12787,25 @@ export const ContainerRegistryApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath) }, /** - * List container registries - * @summary List container registries + * Start workspace + * @summary Start workspace + * @param {string} workspaceId Workspace ID or Name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listContainerRegistries( + async startWorkspace( + workspaceId: string, options?: RawAxiosRequestConfig, ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise> + (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.listContainerRegistries(options) + const localVarAxiosArgs = await localVarAxiosParamCreator.startWorkspace( + workspaceId, + options, + ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['ContainerRegistryApi.listContainerRegistries']?.[ + operationServerMap['WorkspaceApi.startWorkspace']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -3129,23 +12817,25 @@ export const ContainerRegistryApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath) }, /** - * Remove a container registry credentials - * @summary Remove a container registry credentials - * @param {string} server Container Registry server name + * Stop workspace + * @summary Stop workspace + * @param {string} workspaceId Workspace ID or Name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async removeContainerRegistry( - server: string, + async stopWorkspace( + workspaceId: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.removeContainerRegistry(server, options) + const localVarAxiosArgs = await localVarAxiosParamCreator.stopWorkspace( + workspaceId, + options, + ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['ContainerRegistryApi.removeContainerRegistry']?.[ + operationServerMap['WorkspaceApi.stopWorkspace']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -3157,29 +12847,29 @@ export const ContainerRegistryApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath) }, /** - * Set container registry credentials - * @summary Set container registry credentials - * @param {string} server Container Registry server name - * @param {ContainerRegistry} containerRegistry Container Registry credentials to set + * Update workspace labels + * @summary Update workspace labels + * @param {string} workspaceId Workspace ID or Name + * @param {{ [key: string]: string; }} labels Labels * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async setContainerRegistry( - server: string, - containerRegistry: ContainerRegistry, + async updateWorkspaceLabels( + workspaceId: string, + labels: { [key: string]: string }, options?: RawAxiosRequestConfig, ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise + (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = - await localVarAxiosParamCreator.setContainerRegistry( - server, - containerRegistry, + await localVarAxiosParamCreator.updateWorkspaceLabels( + workspaceId, + labels, options, ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['ContainerRegistryApi.setContainerRegistry']?.[ + operationServerMap['WorkspaceApi.updateWorkspaceLabels']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -3190,238 +12880,30 @@ export const ContainerRegistryApiFp = function (configuration?: Configuration) { configuration, )(axios, localVarOperationServerBasePath || basePath) }, - } -} - -/** - * ContainerRegistryApi - factory interface - * @export - */ -export const ContainerRegistryApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = ContainerRegistryApiFp(configuration) - return { - /** - * Get container registry credentials - * @summary Get container registry credentials - * @param {string} server Container Registry server name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getContainerRegistry( - server: string, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .getContainerRegistry(server, options) - .then((request) => request(axios, basePath)) - }, - /** - * List container registries - * @summary List container registries - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listContainerRegistries( - options?: RawAxiosRequestConfig, - ): AxiosPromise> { - return localVarFp - .listContainerRegistries(options) - .then((request) => request(axios, basePath)) - }, - /** - * Remove a container registry credentials - * @summary Remove a container registry credentials - * @param {string} server Container Registry server name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - removeContainerRegistry( - server: string, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .removeContainerRegistry(server, options) - .then((request) => request(axios, basePath)) - }, - /** - * Set container registry credentials - * @summary Set container registry credentials - * @param {string} server Container Registry server name - * @param {ContainerRegistry} containerRegistry Container Registry credentials to set - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - setContainerRegistry( - server: string, - containerRegistry: ContainerRegistry, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .setContainerRegistry(server, containerRegistry, options) - .then((request) => request(axios, basePath)) - }, - } -} - -/** - * ContainerRegistryApi - object-oriented interface - * @export - * @class ContainerRegistryApi - * @extends {BaseAPI} - */ -export class ContainerRegistryApi extends BaseAPI { - /** - * Get container registry credentials - * @summary Get container registry credentials - * @param {string} server Container Registry server name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ContainerRegistryApi - */ - public getContainerRegistry(server: string, options?: RawAxiosRequestConfig) { - return ContainerRegistryApiFp(this.configuration) - .getContainerRegistry(server, options) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * List container registries - * @summary List container registries - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ContainerRegistryApi - */ - public listContainerRegistries(options?: RawAxiosRequestConfig) { - return ContainerRegistryApiFp(this.configuration) - .listContainerRegistries(options) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Remove a container registry credentials - * @summary Remove a container registry credentials - * @param {string} server Container Registry server name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ContainerRegistryApi - */ - public removeContainerRegistry( - server: string, - options?: RawAxiosRequestConfig, - ) { - return ContainerRegistryApiFp(this.configuration) - .removeContainerRegistry(server, options) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Set container registry credentials - * @summary Set container registry credentials - * @param {string} server Container Registry server name - * @param {ContainerRegistry} containerRegistry Container Registry credentials to set - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ContainerRegistryApi - */ - public setContainerRegistry( - server: string, - containerRegistry: ContainerRegistry, - options?: RawAxiosRequestConfig, - ) { - return ContainerRegistryApiFp(this.configuration) - .setContainerRegistry(server, containerRegistry, options) - .then((request) => request(this.axios, this.basePath)) - } -} - -/** - * DefaultApi - axios parameter creator - * @export - */ -export const DefaultApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * Health check - * @summary Health check - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - healthCheck: async ( - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/health` - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - } -} - -/** - * DefaultApi - functional programming interface - * @export - */ -export const DefaultApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) - return { /** - * Health check - * @summary Health check + * Update workspace metadata + * @summary Update workspace metadata + * @param {string} workspaceId Workspace ID + * @param {UpdateWorkspaceMetadataDTO} workspaceMetadata Workspace Metadata * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async healthCheck( + async updateWorkspaceMetadata( + workspaceId: string, + workspaceMetadata: UpdateWorkspaceMetadataDTO, options?: RawAxiosRequestConfig, ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise<{ [key: string]: string }> + (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { - const localVarAxiosArgs = await localVarAxiosParamCreator.healthCheck( - options, - ) + const localVarAxiosArgs = + await localVarAxiosParamCreator.updateWorkspaceMetadata( + workspaceId, + workspaceMetadata, + options, + ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['DefaultApi.healthCheck']?.[ + operationServerMap['WorkspaceApi.updateWorkspaceMetadata']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -3432,706 +12914,447 @@ export const DefaultApiFp = function (configuration?: Configuration) { configuration, )(axios, localVarOperationServerBasePath || basePath) }, - } -} - -/** - * DefaultApi - factory interface - * @export - */ -export const DefaultApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = DefaultApiFp(configuration) - return { /** - * Health check - * @summary Health check + * Update workspace provider metadata + * @summary Update workspace provider metadata + * @param {string} workspaceId Workspace ID + * @param {UpdateWorkspaceProviderMetadataDTO} metadata Provider metadata * @param {*} [options] Override http request option. * @throws {RequiredError} */ - healthCheck( + async updateWorkspaceProviderMetadata( + workspaceId: string, + metadata: UpdateWorkspaceProviderMetadataDTO, options?: RawAxiosRequestConfig, - ): AxiosPromise<{ [key: string]: string }> { - return localVarFp - .healthCheck(options) - .then((request) => request(axios, basePath)) + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.updateWorkspaceProviderMetadata( + workspaceId, + metadata, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['WorkspaceApi.updateWorkspaceProviderMetadata']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) }, } } /** - * DefaultApi - object-oriented interface - * @export - * @class DefaultApi - * @extends {BaseAPI} - */ -export class DefaultApi extends BaseAPI { - /** - * Health check - * @summary Health check - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public healthCheck(options?: RawAxiosRequestConfig) { - return DefaultApiFp(this.configuration) - .healthCheck(options) - .then((request) => request(this.axios, this.basePath)) - } -} - -/** - * GitProviderApi - axios parameter creator + * WorkspaceApi - factory interface * @export */ -export const GitProviderApiAxiosParamCreator = function ( +export const WorkspaceApiFactory = function ( configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, ) { + const localVarFp = WorkspaceApiFp(configuration) return { /** - * Get Git context - * @summary Get Git context - * @param {GetRepositoryContext} repository Get repository context + * Create a workspace + * @summary Create a workspace + * @param {CreateWorkspaceDTO} workspace Create workspace * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getGitContext: async ( - repository: GetRepositoryContext, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'repository' is not null or undefined - assertParamExists('getGitContext', 'repository', repository) - const localVarPath = `/gitprovider/context` - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - localVarHeaderParameter['Content-Type'] = 'application/json' - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - localVarRequestOptions.data = serializeDataIfNeeded( - repository, - localVarRequestOptions, - configuration, - ) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + createWorkspace( + workspace: CreateWorkspaceDTO, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createWorkspace(workspace, options) + .then((request) => request(axios, basePath)) }, /** - * Get Git provider - * @summary Get Git provider - * @param {string} gitProviderId ID + * Delete workspace + * @summary Delete workspace + * @param {string} workspaceId Workspace ID + * @param {boolean} [force] Force * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getGitProvider: async ( - gitProviderId: string, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'gitProviderId' is not null or undefined - assertParamExists('getGitProvider', 'gitProviderId', gitProviderId) - const localVarPath = `/gitprovider/{gitProviderId}`.replace( - `{${'gitProviderId'}}`, - encodeURIComponent(String(gitProviderId)), - ) - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + deleteWorkspace( + workspaceId: string, + force?: boolean, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deleteWorkspace(workspaceId, force, options) + .then((request) => request(axios, basePath)) }, /** - * Get Git provider ID - * @summary Get Git provider ID - * @param {string} url Url + * Find workspace + * @summary Find workspace + * @param {string} workspaceId Workspace ID or Name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getGitProviderIdForUrl: async ( - url: string, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'url' is not null or undefined - assertParamExists('getGitProviderIdForUrl', 'url', url) - const localVarPath = `/gitprovider/id-for-url/{url}`.replace( - `{${'url'}}`, - encodeURIComponent(String(url)), - ) - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + findWorkspace( + workspaceId: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .findWorkspace(workspaceId, options) + .then((request) => request(axios, basePath)) }, /** - * Get Git context - * @summary Get Git context - * @param {string} gitProviderId Git Provider Id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getGitUser: async ( - gitProviderId: string, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'gitProviderId' is not null or undefined - assertParamExists('getGitUser', 'gitProviderId', gitProviderId) - const localVarPath = `/gitprovider/{gitProviderId}/user`.replace( - `{${'gitProviderId'}}`, - encodeURIComponent(String(gitProviderId)), - ) - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + * Get workspace state + * @summary Get workspace state + * @param {string} workspaceId Workspace ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getWorkspaceState( + workspaceId: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getWorkspaceState(workspaceId, options) + .then((request) => request(axios, basePath)) }, /** - * Get Git namespaces - * @summary Get Git namespaces - * @param {string} gitProviderId Git provider - * @param {number} [page] Page number - * @param {number} [perPage] Number of items per page + * List workspaces + * @summary List workspaces + * @param {string} [labels] JSON encoded labels * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getNamespaces: async ( - gitProviderId: string, - page?: number, - perPage?: number, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'gitProviderId' is not null or undefined - assertParamExists('getNamespaces', 'gitProviderId', gitProviderId) - const localVarPath = `/gitprovider/{gitProviderId}/namespaces`.replace( - `{${'gitProviderId'}}`, - encodeURIComponent(String(gitProviderId)), - ) - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - if (page !== undefined) { - localVarQueryParameter['page'] = page - } - - if (perPage !== undefined) { - localVarQueryParameter['per_page'] = perPage - } - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + listWorkspaces( + labels?: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .listWorkspaces(labels, options) + .then((request) => request(axios, basePath)) }, /** - * Get Git repository branches - * @summary Get Git repository branches - * @param {string} gitProviderId Git provider - * @param {string} namespaceId Namespace - * @param {string} repositoryId Repository - * @param {number} [page] Page number - * @param {number} [perPage] Number of items per page + * Restart workspace + * @summary Restart workspace + * @param {string} workspaceId Workspace ID or Name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getRepoBranches: async ( - gitProviderId: string, - namespaceId: string, - repositoryId: string, - page?: number, - perPage?: number, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'gitProviderId' is not null or undefined - assertParamExists('getRepoBranches', 'gitProviderId', gitProviderId) - // verify required parameter 'namespaceId' is not null or undefined - assertParamExists('getRepoBranches', 'namespaceId', namespaceId) - // verify required parameter 'repositoryId' is not null or undefined - assertParamExists('getRepoBranches', 'repositoryId', repositoryId) - const localVarPath = - `/gitprovider/{gitProviderId}/{namespaceId}/{repositoryId}/branches` - .replace( - `{${'gitProviderId'}}`, - encodeURIComponent(String(gitProviderId)), - ) - .replace( - `{${'namespaceId'}}`, - encodeURIComponent(String(namespaceId)), - ) - .replace( - `{${'repositoryId'}}`, - encodeURIComponent(String(repositoryId)), - ) - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - if (page !== undefined) { - localVarQueryParameter['page'] = page - } - - if (perPage !== undefined) { - localVarQueryParameter['per_page'] = perPage - } - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + restartWorkspace( + workspaceId: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .restartWorkspace(workspaceId, options) + .then((request) => request(axios, basePath)) }, /** - * Get Git repository PRs - * @summary Get Git repository PRs - * @param {string} gitProviderId Git provider - * @param {string} namespaceId Namespace - * @param {string} repositoryId Repository - * @param {number} [page] Page number - * @param {number} [perPage] Number of items per page + * Start workspace + * @summary Start workspace + * @param {string} workspaceId Workspace ID or Name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getRepoPRs: async ( - gitProviderId: string, - namespaceId: string, - repositoryId: string, - page?: number, - perPage?: number, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'gitProviderId' is not null or undefined - assertParamExists('getRepoPRs', 'gitProviderId', gitProviderId) - // verify required parameter 'namespaceId' is not null or undefined - assertParamExists('getRepoPRs', 'namespaceId', namespaceId) - // verify required parameter 'repositoryId' is not null or undefined - assertParamExists('getRepoPRs', 'repositoryId', repositoryId) - const localVarPath = - `/gitprovider/{gitProviderId}/{namespaceId}/{repositoryId}/pull-requests` - .replace( - `{${'gitProviderId'}}`, - encodeURIComponent(String(gitProviderId)), - ) - .replace( - `{${'namespaceId'}}`, - encodeURIComponent(String(namespaceId)), - ) - .replace( - `{${'repositoryId'}}`, - encodeURIComponent(String(repositoryId)), - ) - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - if (page !== undefined) { - localVarQueryParameter['page'] = page - } - - if (perPage !== undefined) { - localVarQueryParameter['per_page'] = perPage - } - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + startWorkspace( + workspaceId: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .startWorkspace(workspaceId, options) + .then((request) => request(axios, basePath)) + }, + /** + * Stop workspace + * @summary Stop workspace + * @param {string} workspaceId Workspace ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + stopWorkspace( + workspaceId: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .stopWorkspace(workspaceId, options) + .then((request) => request(axios, basePath)) }, /** - * Get Git repositories - * @summary Get Git repositories - * @param {string} gitProviderId Git provider - * @param {string} namespaceId Namespace - * @param {number} [page] Page number - * @param {number} [perPage] Number of items per page + * Update workspace labels + * @summary Update workspace labels + * @param {string} workspaceId Workspace ID or Name + * @param {{ [key: string]: string; }} labels Labels * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getRepositories: async ( - gitProviderId: string, - namespaceId: string, - page?: number, - perPage?: number, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'gitProviderId' is not null or undefined - assertParamExists('getRepositories', 'gitProviderId', gitProviderId) - // verify required parameter 'namespaceId' is not null or undefined - assertParamExists('getRepositories', 'namespaceId', namespaceId) - const localVarPath = - `/gitprovider/{gitProviderId}/{namespaceId}/repositories` - .replace( - `{${'gitProviderId'}}`, - encodeURIComponent(String(gitProviderId)), - ) - .replace( - `{${'namespaceId'}}`, - encodeURIComponent(String(namespaceId)), - ) - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - if (page !== undefined) { - localVarQueryParameter['page'] = page - } - - if (perPage !== undefined) { - localVarQueryParameter['per_page'] = perPage - } - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + updateWorkspaceLabels( + workspaceId: string, + labels: { [key: string]: string }, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updateWorkspaceLabels(workspaceId, labels, options) + .then((request) => request(axios, basePath)) }, /** - * Get URL from Git repository - * @summary Get URL from Git repository - * @param {GitRepository} repository Git repository + * Update workspace metadata + * @summary Update workspace metadata + * @param {string} workspaceId Workspace ID + * @param {UpdateWorkspaceMetadataDTO} workspaceMetadata Workspace Metadata * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUrlFromRepository: async ( - repository: GitRepository, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'repository' is not null or undefined - assertParamExists('getUrlFromRepository', 'repository', repository) - const localVarPath = `/gitprovider/context/url` - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - localVarHeaderParameter['Content-Type'] = 'application/json' - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - localVarRequestOptions.data = serializeDataIfNeeded( - repository, - localVarRequestOptions, - configuration, - ) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + updateWorkspaceMetadata( + workspaceId: string, + workspaceMetadata: UpdateWorkspaceMetadataDTO, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updateWorkspaceMetadata(workspaceId, workspaceMetadata, options) + .then((request) => request(axios, basePath)) }, /** - * List Git providers - * @summary List Git providers + * Update workspace provider metadata + * @summary Update workspace provider metadata + * @param {string} workspaceId Workspace ID + * @param {UpdateWorkspaceProviderMetadataDTO} metadata Provider metadata * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listGitProviders: async ( - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/gitprovider` - // 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 - } + updateWorkspaceProviderMetadata( + workspaceId: string, + metadata: UpdateWorkspaceProviderMetadataDTO, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .updateWorkspaceProviderMetadata(workspaceId, metadata, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * WorkspaceApi - object-oriented interface + * @export + * @class WorkspaceApi + * @extends {BaseAPI} + */ +export class WorkspaceApi extends BaseAPI { + /** + * Create a workspace + * @summary Create a workspace + * @param {CreateWorkspaceDTO} workspace Create workspace + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceApi + */ + public createWorkspace( + workspace: CreateWorkspaceDTO, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceApiFp(this.configuration) + .createWorkspace(workspace, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete workspace + * @summary Delete workspace + * @param {string} workspaceId Workspace ID + * @param {boolean} [force] Force + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceApi + */ + public deleteWorkspace( + workspaceId: string, + force?: boolean, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceApiFp(this.configuration) + .deleteWorkspace(workspaceId, force, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Find workspace + * @summary Find workspace + * @param {string} workspaceId Workspace ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceApi + */ + public findWorkspace(workspaceId: string, options?: RawAxiosRequestConfig) { + return WorkspaceApiFp(this.configuration) + .findWorkspace(workspaceId, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get workspace state + * @summary Get workspace state + * @param {string} workspaceId Workspace ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceApi + */ + public getWorkspaceState( + workspaceId: string, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceApiFp(this.configuration) + .getWorkspaceState(workspaceId, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List workspaces + * @summary List workspaces + * @param {string} [labels] JSON encoded labels + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceApi + */ + public listWorkspaces(labels?: string, options?: RawAxiosRequestConfig) { + return WorkspaceApiFp(this.configuration) + .listWorkspaces(labels, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Restart workspace + * @summary Restart workspace + * @param {string} workspaceId Workspace ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceApi + */ + public restartWorkspace( + workspaceId: string, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceApiFp(this.configuration) + .restartWorkspace(workspaceId, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Start workspace + * @summary Start workspace + * @param {string} workspaceId Workspace ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceApi + */ + public startWorkspace(workspaceId: string, options?: RawAxiosRequestConfig) { + return WorkspaceApiFp(this.configuration) + .startWorkspace(workspaceId, options) + .then((request) => request(this.axios, this.basePath)) + } - const localVarRequestOptions = { - method: 'GET', - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any + /** + * Stop workspace + * @summary Stop workspace + * @param {string} workspaceId Workspace ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceApi + */ + public stopWorkspace(workspaceId: string, options?: RawAxiosRequestConfig) { + return WorkspaceApiFp(this.configuration) + .stopWorkspace(workspaceId, options) + .then((request) => request(this.axios, this.basePath)) + } - // authentication Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) + /** + * Update workspace labels + * @summary Update workspace labels + * @param {string} workspaceId Workspace ID or Name + * @param {{ [key: string]: string; }} labels Labels + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceApi + */ + public updateWorkspaceLabels( + workspaceId: string, + labels: { [key: string]: string }, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceApiFp(this.configuration) + .updateWorkspaceLabels(workspaceId, labels, options) + .then((request) => request(this.axios, this.basePath)) + } - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } + /** + * Update workspace metadata + * @summary Update workspace metadata + * @param {string} workspaceId Workspace ID + * @param {UpdateWorkspaceMetadataDTO} workspaceMetadata Workspace Metadata + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceApi + */ + public updateWorkspaceMetadata( + workspaceId: string, + workspaceMetadata: UpdateWorkspaceMetadataDTO, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceApiFp(this.configuration) + .updateWorkspaceMetadata(workspaceId, workspaceMetadata, options) + .then((request) => request(this.axios, this.basePath)) + } - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, + /** + * Update workspace provider metadata + * @summary Update workspace provider metadata + * @param {string} workspaceId Workspace ID + * @param {UpdateWorkspaceProviderMetadataDTO} metadata Provider metadata + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceApi + */ + public updateWorkspaceProviderMetadata( + workspaceId: string, + metadata: UpdateWorkspaceProviderMetadataDTO, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceApiFp(this.configuration) + .updateWorkspaceProviderMetadata(workspaceId, metadata, options) + .then((request) => request(this.axios, this.basePath)) + } +} + +/** + * WorkspaceTemplateApi - axios parameter creator + * @export + */ +export const WorkspaceTemplateApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * List Git providers for url - * @summary List Git providers for url - * @param {string} url Url + * Delete workspace template data + * @summary Delete workspace template data + * @param {string} templateName Template name + * @param {boolean} [force] Force * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listGitProvidersForUrl: async ( - url: string, + deleteWorkspaceTemplate: async ( + templateName: string, + force?: boolean, options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'url' is not null or undefined - assertParamExists('listGitProvidersForUrl', 'url', url) - const localVarPath = `/gitprovider/for-url/{url}`.replace( - `{${'url'}}`, - encodeURIComponent(String(url)), + // verify required parameter 'templateName' is not null or undefined + assertParamExists('deleteWorkspaceTemplate', 'templateName', templateName) + const localVarPath = `/workspace-template/{templateName}`.replace( + `{${'templateName'}}`, + encodeURIComponent(String(templateName)), ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) @@ -4141,7 +13364,7 @@ export const GitProviderApiAxiosParamCreator = function ( } const localVarRequestOptions = { - method: 'GET', + method: 'DELETE', ...baseOptions, ...options, } @@ -4155,6 +13378,10 @@ export const GitProviderApiAxiosParamCreator = function ( configuration, ) + if (force !== undefined) { + localVarQueryParameter['force'] = force + } + setSearchParams(localVarUrlObj, localVarQueryParameter) let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} @@ -4170,21 +13397,21 @@ export const GitProviderApiAxiosParamCreator = function ( } }, /** - * Remove Git provider - * @summary Remove Git provider - * @param {string} gitProviderId Git provider + * Find a workspace template + * @summary Find a workspace template + * @param {string} templateName Template name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - removeGitProvider: async ( - gitProviderId: string, + findWorkspaceTemplate: async ( + templateName: string, options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'gitProviderId' is not null or undefined - assertParamExists('removeGitProvider', 'gitProviderId', gitProviderId) - const localVarPath = `/gitprovider/{gitProviderId}`.replace( - `{${'gitProviderId'}}`, - encodeURIComponent(String(gitProviderId)), + // verify required parameter 'templateName' is not null or undefined + assertParamExists('findWorkspaceTemplate', 'templateName', templateName) + const localVarPath = `/workspace-template/{templateName}`.replace( + `{${'templateName'}}`, + encodeURIComponent(String(templateName)), ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) @@ -4194,7 +13421,7 @@ export const GitProviderApiAxiosParamCreator = function ( } const localVarRequestOptions = { - method: 'DELETE', + method: 'GET', ...baseOptions, ...options, } @@ -4223,23 +13450,22 @@ export const GitProviderApiAxiosParamCreator = function ( } }, /** - * Set Git provider - * @summary Set Git provider - * @param {SetGitProviderConfig} gitProviderConfig Git provider + * Get default workspace templates by git url + * @summary Get default workspace templates by git url + * @param {string} gitUrl Git URL * @param {*} [options] Override http request option. * @throws {RequiredError} */ - setGitProvider: async ( - gitProviderConfig: SetGitProviderConfig, + getDefaultWorkspaceTemplate: async ( + gitUrl: string, options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'gitProviderConfig' is not null or undefined - assertParamExists( - 'setGitProvider', - 'gitProviderConfig', - gitProviderConfig, + // verify required parameter 'gitUrl' is not null or undefined + assertParamExists('getDefaultWorkspaceTemplate', 'gitUrl', gitUrl) + const localVarPath = `/workspace-template/default/{gitUrl}`.replace( + `{${'gitUrl'}}`, + encodeURIComponent(String(gitUrl)), ) - const localVarPath = `/gitprovider` // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -4248,7 +13474,7 @@ export const GitProviderApiAxiosParamCreator = function ( } const localVarRequestOptions = { - method: 'PUT', + method: 'GET', ...baseOptions, ...options, } @@ -4259,320 +13485,223 @@ export const GitProviderApiAxiosParamCreator = function ( await setApiKeyToObject( localVarHeaderParameter, 'Authorization', - configuration, - ) - - localVarHeaderParameter['Content-Type'] = 'application/json' - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - localVarRequestOptions.data = serializeDataIfNeeded( - gitProviderConfig, - localVarRequestOptions, - configuration, - ) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - } -} - -/** - * GitProviderApi - functional programming interface - * @export - */ -export const GitProviderApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = - GitProviderApiAxiosParamCreator(configuration) - return { - /** - * Get Git context - * @summary Get Git context - * @param {GetRepositoryContext} repository Get repository context - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getGitContext( - repository: GetRepositoryContext, - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.getGitContext( - repository, - options, - ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['GitProviderApi.getGitContext']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) - }, - /** - * Get Git provider - * @summary Get Git provider - * @param {string} gitProviderId ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getGitProvider( - gitProviderId: string, - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.getGitProvider( - gitProviderId, - options, - ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['GitProviderApi.getGitProvider']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) - }, - /** - * Get Git provider ID - * @summary Get Git provider ID - * @param {string} url Url - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getGitProviderIdForUrl( - url: string, - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.getGitProviderIdForUrl(url, options) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['GitProviderApi.getGitProviderIdForUrl']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) - }, - /** - * Get Git context - * @summary Get Git context - * @param {string} gitProviderId Git Provider Id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getGitUser( - gitProviderId: string, - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.getGitUser( - gitProviderId, - options, + configuration, ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['GitProviderApi.getGitUser']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } }, /** - * Get Git namespaces - * @summary Get Git namespaces - * @param {string} gitProviderId Git provider - * @param {number} [page] Page number - * @param {number} [perPage] Number of items per page + * List workspace templates + * @summary List workspace templates * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getNamespaces( - gitProviderId: string, - page?: number, - perPage?: number, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise> - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.getNamespaces( - gitProviderId, - page, - perPage, - options, + listWorkspaceTemplates: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/workspace-template` + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['GitProviderApi.getNamespaces']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } }, /** - * Get Git repository branches - * @summary Get Git repository branches - * @param {string} gitProviderId Git provider - * @param {string} namespaceId Namespace - * @param {string} repositoryId Repository - * @param {number} [page] Page number - * @param {number} [perPage] Number of items per page + * Set workspace template data + * @summary Set workspace template data + * @param {CreateWorkspaceTemplateDTO} workspaceTemplate Workspace template * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getRepoBranches( - gitProviderId: string, - namespaceId: string, - repositoryId: string, - page?: number, - perPage?: number, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise> - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.getRepoBranches( - gitProviderId, - namespaceId, - repositoryId, - page, - perPage, - options, + saveWorkspaceTemplate: async ( + workspaceTemplate: CreateWorkspaceTemplateDTO, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceTemplate' is not null or undefined + assertParamExists( + 'saveWorkspaceTemplate', + 'workspaceTemplate', + workspaceTemplate, ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['GitProviderApi.getRepoBranches']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) + const localVarPath = `/workspace-template` + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) + let baseOptions + if (configuration) { + baseOptions = configuration.baseOptions + } + + const localVarRequestOptions = { + method: 'PUT', + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + workspaceTemplate, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } }, /** - * Get Git repository PRs - * @summary Get Git repository PRs - * @param {string} gitProviderId Git provider - * @param {string} namespaceId Namespace - * @param {string} repositoryId Repository - * @param {number} [page] Page number - * @param {number} [perPage] Number of items per page + * Set workspace template to default + * @summary Set workspace template to default + * @param {string} templateName Template name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getRepoPRs( - gitProviderId: string, - namespaceId: string, - repositoryId: string, - page?: number, - perPage?: number, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise> - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.getRepoPRs( - gitProviderId, - namespaceId, - repositoryId, - page, - perPage, - options, + setDefaultWorkspaceTemplate: async ( + templateName: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'templateName' is not null or undefined + assertParamExists( + 'setDefaultWorkspaceTemplate', + 'templateName', + templateName, ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['GitProviderApi.getRepoPRs']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) + const localVarPath = + `/workspace-template/{templateName}/set-default`.replace( + `{${'templateName'}}`, + encodeURIComponent(String(templateName)), + ) + // 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: 'PATCH', + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } }, + } +} + +/** + * WorkspaceTemplateApi - functional programming interface + * @export + */ +export const WorkspaceTemplateApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = + WorkspaceTemplateApiAxiosParamCreator(configuration) + return { /** - * Get Git repositories - * @summary Get Git repositories - * @param {string} gitProviderId Git provider - * @param {string} namespaceId Namespace - * @param {number} [page] Page number - * @param {number} [perPage] Number of items per page + * Delete workspace template data + * @summary Delete workspace template data + * @param {string} templateName Template name + * @param {boolean} [force] Force * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getRepositories( - gitProviderId: string, - namespaceId: string, - page?: number, - perPage?: number, + async deleteWorkspaceTemplate( + templateName: string, + force?: boolean, options?: RawAxiosRequestConfig, ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise> + (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { - const localVarAxiosArgs = await localVarAxiosParamCreator.getRepositories( - gitProviderId, - namespaceId, - page, - perPage, - options, - ) + const localVarAxiosArgs = + await localVarAxiosParamCreator.deleteWorkspaceTemplate( + templateName, + force, + options, + ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['GitProviderApi.getRepositories']?.[ + operationServerMap['WorkspaceTemplateApi.deleteWorkspaceTemplate']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -4584,26 +13713,29 @@ export const GitProviderApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath) }, /** - * Get URL from Git repository - * @summary Get URL from Git repository - * @param {GitRepository} repository Git repository + * Find a workspace template + * @summary Find a workspace template + * @param {string} templateName Template name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getUrlFromRepository( - repository: GitRepository, + async findWorkspaceTemplate( + templateName: string, options?: RawAxiosRequestConfig, ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise > { const localVarAxiosArgs = - await localVarAxiosParamCreator.getUrlFromRepository( - repository, + await localVarAxiosParamCreator.findWorkspaceTemplate( + templateName, options, ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['GitProviderApi.getUrlFromRepository']?.[ + operationServerMap['WorkspaceTemplateApi.findWorkspaceTemplate']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -4615,26 +13747,31 @@ export const GitProviderApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath) }, /** - * List Git providers - * @summary List Git providers + * Get default workspace templates by git url + * @summary Get default workspace templates by git url + * @param {string} gitUrl Git URL * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listGitProviders( + async getDefaultWorkspaceTemplate( + gitUrl: string, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, - ) => AxiosPromise> + ) => AxiosPromise > { const localVarAxiosArgs = - await localVarAxiosParamCreator.listGitProviders(options) + await localVarAxiosParamCreator.getDefaultWorkspaceTemplate( + gitUrl, + options, + ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['GitProviderApi.listGitProviders']?.[ - localVarOperationServerIndex - ]?.url + operationServerMap[ + 'WorkspaceTemplateApi.getDefaultWorkspaceTemplate' + ]?.[localVarOperationServerIndex]?.url return (axios, basePath) => createRequestFunction( localVarAxiosArgs, @@ -4644,26 +13781,24 @@ export const GitProviderApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath) }, /** - * List Git providers for url - * @summary List Git providers for url - * @param {string} url Url + * List workspace templates + * @summary List workspace templates * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listGitProvidersForUrl( - url: string, + async listWorkspaceTemplates( options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, - ) => AxiosPromise> + ) => AxiosPromise> > { const localVarAxiosArgs = - await localVarAxiosParamCreator.listGitProvidersForUrl(url, options) + await localVarAxiosParamCreator.listWorkspaceTemplates(options) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['GitProviderApi.listGitProvidersForUrl']?.[ + operationServerMap['WorkspaceTemplateApi.listWorkspaceTemplates']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -4675,26 +13810,26 @@ export const GitProviderApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath) }, /** - * Remove Git provider - * @summary Remove Git provider - * @param {string} gitProviderId Git provider + * Set workspace template data + * @summary Set workspace template data + * @param {CreateWorkspaceTemplateDTO} workspaceTemplate Workspace template * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async removeGitProvider( - gitProviderId: string, + async saveWorkspaceTemplate( + workspaceTemplate: CreateWorkspaceTemplateDTO, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = - await localVarAxiosParamCreator.removeGitProvider( - gitProviderId, + await localVarAxiosParamCreator.saveWorkspaceTemplate( + workspaceTemplate, options, ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['GitProviderApi.removeGitProvider']?.[ + operationServerMap['WorkspaceTemplateApi.saveWorkspaceTemplate']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -4706,27 +13841,28 @@ export const GitProviderApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath) }, /** - * Set Git provider - * @summary Set Git provider - * @param {SetGitProviderConfig} gitProviderConfig Git provider + * Set workspace template to default + * @summary Set workspace template to default + * @param {string} templateName Template name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async setGitProvider( - gitProviderConfig: SetGitProviderConfig, + async setDefaultWorkspaceTemplate( + templateName: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { - const localVarAxiosArgs = await localVarAxiosParamCreator.setGitProvider( - gitProviderConfig, - options, - ) + const localVarAxiosArgs = + await localVarAxiosParamCreator.setDefaultWorkspaceTemplate( + templateName, + options, + ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['GitProviderApi.setGitProvider']?.[ - localVarOperationServerIndex - ]?.url + operationServerMap[ + 'WorkspaceTemplateApi.setDefaultWorkspaceTemplate' + ]?.[localVarOperationServerIndex]?.url return (axios, basePath) => createRequestFunction( localVarAxiosArgs, @@ -4739,538 +13875,1045 @@ export const GitProviderApiFp = function (configuration?: Configuration) { } /** - * GitProviderApi - factory interface + * WorkspaceTemplateApi - factory interface * @export */ -export const GitProviderApiFactory = function ( +export const WorkspaceTemplateApiFactory = function ( configuration?: Configuration, basePath?: string, axios?: AxiosInstance, ) { - const localVarFp = GitProviderApiFp(configuration) + const localVarFp = WorkspaceTemplateApiFp(configuration) return { /** - * Get Git context - * @summary Get Git context - * @param {GetRepositoryContext} repository Get repository context + * Delete workspace template data + * @summary Delete workspace template data + * @param {string} templateName Template name + * @param {boolean} [force] Force * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getGitContext( - repository: GetRepositoryContext, + deleteWorkspaceTemplate( + templateName: string, + force?: boolean, options?: RawAxiosRequestConfig, - ): AxiosPromise { + ): AxiosPromise { return localVarFp - .getGitContext(repository, options) + .deleteWorkspaceTemplate(templateName, force, options) .then((request) => request(axios, basePath)) }, /** - * Get Git provider - * @summary Get Git provider - * @param {string} gitProviderId ID + * Find a workspace template + * @summary Find a workspace template + * @param {string} templateName Template name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getGitProvider( - gitProviderId: string, + findWorkspaceTemplate( + templateName: string, options?: RawAxiosRequestConfig, - ): AxiosPromise { + ): AxiosPromise { return localVarFp - .getGitProvider(gitProviderId, options) + .findWorkspaceTemplate(templateName, options) .then((request) => request(axios, basePath)) }, /** - * Get Git provider ID - * @summary Get Git provider ID - * @param {string} url Url + * Get default workspace templates by git url + * @summary Get default workspace templates by git url + * @param {string} gitUrl Git URL * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getGitProviderIdForUrl( - url: string, + getDefaultWorkspaceTemplate( + gitUrl: string, options?: RawAxiosRequestConfig, - ): AxiosPromise { + ): AxiosPromise { return localVarFp - .getGitProviderIdForUrl(url, options) + .getDefaultWorkspaceTemplate(gitUrl, options) .then((request) => request(axios, basePath)) }, /** - * Get Git context - * @summary Get Git context - * @param {string} gitProviderId Git Provider Id + * List workspace templates + * @summary List workspace templates + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listWorkspaceTemplates( + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .listWorkspaceTemplates(options) + .then((request) => request(axios, basePath)) + }, + /** + * Set workspace template data + * @summary Set workspace template data + * @param {CreateWorkspaceTemplateDTO} workspaceTemplate Workspace template + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + saveWorkspaceTemplate( + workspaceTemplate: CreateWorkspaceTemplateDTO, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .saveWorkspaceTemplate(workspaceTemplate, options) + .then((request) => request(axios, basePath)) + }, + /** + * Set workspace template to default + * @summary Set workspace template to default + * @param {string} templateName Template name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + setDefaultWorkspaceTemplate( + templateName: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .setDefaultWorkspaceTemplate(templateName, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * WorkspaceTemplateApi - object-oriented interface + * @export + * @class WorkspaceTemplateApi + * @extends {BaseAPI} + */ +export class WorkspaceTemplateApi extends BaseAPI { + /** + * Delete workspace template data + * @summary Delete workspace template data + * @param {string} templateName Template name + * @param {boolean} [force] Force + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceTemplateApi + */ + public deleteWorkspaceTemplate( + templateName: string, + force?: boolean, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceTemplateApiFp(this.configuration) + .deleteWorkspaceTemplate(templateName, force, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Find a workspace template + * @summary Find a workspace template + * @param {string} templateName Template name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceTemplateApi + */ + public findWorkspaceTemplate( + templateName: string, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceTemplateApiFp(this.configuration) + .findWorkspaceTemplate(templateName, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get default workspace templates by git url + * @summary Get default workspace templates by git url + * @param {string} gitUrl Git URL + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceTemplateApi + */ + public getDefaultWorkspaceTemplate( + gitUrl: string, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceTemplateApiFp(this.configuration) + .getDefaultWorkspaceTemplate(gitUrl, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List workspace templates + * @summary List workspace templates + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceTemplateApi + */ + public listWorkspaceTemplates(options?: RawAxiosRequestConfig) { + return WorkspaceTemplateApiFp(this.configuration) + .listWorkspaceTemplates(options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Set workspace template data + * @summary Set workspace template data + * @param {CreateWorkspaceTemplateDTO} workspaceTemplate Workspace template + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceTemplateApi + */ + public saveWorkspaceTemplate( + workspaceTemplate: CreateWorkspaceTemplateDTO, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceTemplateApiFp(this.configuration) + .saveWorkspaceTemplate(workspaceTemplate, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Set workspace template to default + * @summary Set workspace template to default + * @param {string} templateName Template name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceTemplateApi + */ + public setDefaultWorkspaceTemplate( + templateName: string, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceTemplateApiFp(this.configuration) + .setDefaultWorkspaceTemplate(templateName, options) + .then((request) => request(this.axios, this.basePath)) + } +} + +/** + * WorkspaceToolboxApi - axios parameter creator + * @export + */ +export const WorkspaceToolboxApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * Create exec session inside workspace project + * @summary Create exec session + * @param {string} workspaceId Workspace ID or Name + * @param {CreateSessionRequest} params Create session request + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSession: async ( + workspaceId: string, + params: CreateSessionRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('createSession', 'workspaceId', workspaceId) + // verify required parameter 'params' is not null or undefined + assertParamExists('createSession', 'params', params) + const localVarPath = + `/workspace/{workspaceId}/toolbox/process/session`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + params, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Delete a session inside workspace project + * @summary Delete session + * @param {string} workspaceId Workspace ID or Name + * @param {string} sessionId Session ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getGitUser( - gitProviderId: string, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .getGitUser(gitProviderId, options) - .then((request) => request(axios, basePath)) + deleteSession: async ( + workspaceId: string, + sessionId: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('deleteSession', 'workspaceId', workspaceId) + // verify required parameter 'sessionId' is not null or undefined + assertParamExists('deleteSession', 'sessionId', sessionId) + const localVarPath = + `/workspace/{workspaceId}/toolbox/process/session/{sessionId}` + .replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) + .replace(`{${'sessionId'}}`, encodeURIComponent(String(sessionId))) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } }, /** - * Get Git namespaces - * @summary Get Git namespaces - * @param {string} gitProviderId Git provider - * @param {number} [page] Page number - * @param {number} [perPage] Number of items per page + * Create folder inside a workspace + * @summary Create folder + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path + * @param {string} mode Mode * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getNamespaces( - gitProviderId: string, - page?: number, - perPage?: number, - options?: RawAxiosRequestConfig, - ): AxiosPromise> { - return localVarFp - .getNamespaces(gitProviderId, page, perPage, options) - .then((request) => request(axios, basePath)) + fsCreateFolder: async ( + workspaceId: string, + path: string, + mode: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('fsCreateFolder', 'workspaceId', workspaceId) + // verify required parameter 'path' is not null or undefined + assertParamExists('fsCreateFolder', 'path', path) + // verify required parameter 'mode' is not null or undefined + assertParamExists('fsCreateFolder', 'mode', mode) + const localVarPath = + `/workspace/{workspaceId}/toolbox/files/folder`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (path !== undefined) { + localVarQueryParameter['path'] = path + } + + if (mode !== undefined) { + localVarQueryParameter['mode'] = mode + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } }, /** - * Get Git repository branches - * @summary Get Git repository branches - * @param {string} gitProviderId Git provider - * @param {string} namespaceId Namespace - * @param {string} repositoryId Repository - * @param {number} [page] Page number - * @param {number} [perPage] Number of items per page + * Delete file inside a workspace + * @summary Delete file + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getRepoBranches( - gitProviderId: string, - namespaceId: string, - repositoryId: string, - page?: number, - perPage?: number, - options?: RawAxiosRequestConfig, - ): AxiosPromise> { - return localVarFp - .getRepoBranches( - gitProviderId, - namespaceId, - repositoryId, - page, - perPage, - options, - ) - .then((request) => request(axios, basePath)) + fsDeleteFile: async ( + workspaceId: string, + path: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('fsDeleteFile', 'workspaceId', workspaceId) + // verify required parameter 'path' is not null or undefined + assertParamExists('fsDeleteFile', 'path', path) + const localVarPath = `/workspace/{workspaceId}/toolbox/files`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (path !== undefined) { + localVarQueryParameter['path'] = path + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } }, /** - * Get Git repository PRs - * @summary Get Git repository PRs - * @param {string} gitProviderId Git provider - * @param {string} namespaceId Namespace - * @param {string} repositoryId Repository - * @param {number} [page] Page number - * @param {number} [perPage] Number of items per page + * Download file from a workspace + * @summary Download file + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getRepoPRs( - gitProviderId: string, - namespaceId: string, - repositoryId: string, - page?: number, - perPage?: number, - options?: RawAxiosRequestConfig, - ): AxiosPromise> { - return localVarFp - .getRepoPRs( - gitProviderId, - namespaceId, - repositoryId, - page, - perPage, - options, + fsDownloadFile: async ( + workspaceId: string, + path: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('fsDownloadFile', 'workspaceId', workspaceId) + // verify required parameter 'path' is not null or undefined + assertParamExists('fsDownloadFile', 'path', path) + const localVarPath = + `/workspace/{workspaceId}/toolbox/files/download`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), ) - .then((request) => request(axios, basePath)) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (path !== undefined) { + localVarQueryParameter['path'] = path + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } }, - /** - * Get Git repositories - * @summary Get Git repositories - * @param {string} gitProviderId Git provider - * @param {string} namespaceId Namespace - * @param {number} [page] Page number - * @param {number} [perPage] Number of items per page + /** + * Search for text/pattern inside a workspace files + * @summary Search for text/pattern in files + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path + * @param {string} pattern Pattern * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getRepositories( - gitProviderId: string, - namespaceId: string, - page?: number, - perPage?: number, - options?: RawAxiosRequestConfig, - ): AxiosPromise> { - return localVarFp - .getRepositories(gitProviderId, namespaceId, page, perPage, options) - .then((request) => request(axios, basePath)) + fsFindInFiles: async ( + workspaceId: string, + path: string, + pattern: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('fsFindInFiles', 'workspaceId', workspaceId) + // verify required parameter 'path' is not null or undefined + assertParamExists('fsFindInFiles', 'path', path) + // verify required parameter 'pattern' is not null or undefined + assertParamExists('fsFindInFiles', 'pattern', pattern) + const localVarPath = + `/workspace/{workspaceId}/toolbox/files/find`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (path !== undefined) { + localVarQueryParameter['path'] = path + } + + if (pattern !== undefined) { + localVarQueryParameter['pattern'] = pattern + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } }, /** - * Get URL from Git repository - * @summary Get URL from Git repository - * @param {GitRepository} repository Git repository + * Get file info inside a workspace + * @summary Get file info + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getUrlFromRepository( - repository: GitRepository, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .getUrlFromRepository(repository, options) - .then((request) => request(axios, basePath)) + fsGetFileDetails: async ( + workspaceId: string, + path: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('fsGetFileDetails', 'workspaceId', workspaceId) + // verify required parameter 'path' is not null or undefined + assertParamExists('fsGetFileDetails', 'path', path) + const localVarPath = + `/workspace/{workspaceId}/toolbox/files/info`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (path !== undefined) { + localVarQueryParameter['path'] = path + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } }, /** - * List Git providers - * @summary List Git providers + * List files inside a workspace + * @summary List files + * @param {string} workspaceId Workspace ID or Name + * @param {string} [path] Path * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listGitProviders( - options?: RawAxiosRequestConfig, - ): AxiosPromise> { - return localVarFp - .listGitProviders(options) - .then((request) => request(axios, basePath)) + fsListFiles: async ( + workspaceId: string, + path?: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('fsListFiles', 'workspaceId', workspaceId) + const localVarPath = `/workspace/{workspaceId}/toolbox/files`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (path !== undefined) { + localVarQueryParameter['path'] = path + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } }, /** - * List Git providers for url - * @summary List Git providers for url - * @param {string} url Url + * Create folder inside a workspace + * @summary Create folder + * @param {string} workspaceId Workspace ID or Name + * @param {string} source Source path + * @param {string} destination Destination path * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listGitProvidersForUrl( - url: string, - options?: RawAxiosRequestConfig, - ): AxiosPromise> { - return localVarFp - .listGitProvidersForUrl(url, options) - .then((request) => request(axios, basePath)) + fsMoveFile: async ( + workspaceId: string, + source: string, + destination: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('fsMoveFile', 'workspaceId', workspaceId) + // verify required parameter 'source' is not null or undefined + assertParamExists('fsMoveFile', 'source', source) + // verify required parameter 'destination' is not null or undefined + assertParamExists('fsMoveFile', 'destination', destination) + const localVarPath = + `/workspace/{workspaceId}/toolbox/files/move`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (source !== undefined) { + localVarQueryParameter['source'] = source + } + + if (destination !== undefined) { + localVarQueryParameter['destination'] = destination + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } }, /** - * Remove Git provider - * @summary Remove Git provider - * @param {string} gitProviderId Git provider + * Repleace text/pattern in mutilple files inside a workspace + * @summary Repleace text/pattern in files + * @param {string} workspaceId Workspace ID or Name + * @param {ReplaceRequest} replace ReplaceParams * @param {*} [options] Override http request option. * @throws {RequiredError} */ - removeGitProvider( - gitProviderId: string, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .removeGitProvider(gitProviderId, options) - .then((request) => request(axios, basePath)) + fsReplaceInFiles: async ( + workspaceId: string, + replace: ReplaceRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('fsReplaceInFiles', 'workspaceId', workspaceId) + // verify required parameter 'replace' is not null or undefined + assertParamExists('fsReplaceInFiles', 'replace', replace) + const localVarPath = + `/workspace/{workspaceId}/toolbox/files/replace`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + replace, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } }, /** - * Set Git provider - * @summary Set Git provider - * @param {SetGitProviderConfig} gitProviderConfig Git provider + * Search for files inside a workspace + * @summary Search for files + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path + * @param {string} pattern Pattern * @param {*} [options] Override http request option. * @throws {RequiredError} */ - setGitProvider( - gitProviderConfig: SetGitProviderConfig, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .setGitProvider(gitProviderConfig, options) - .then((request) => request(axios, basePath)) - }, - } -} + fsSearchFiles: async ( + workspaceId: string, + path: string, + pattern: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('fsSearchFiles', 'workspaceId', workspaceId) + // verify required parameter 'path' is not null or undefined + assertParamExists('fsSearchFiles', 'path', path) + // verify required parameter 'pattern' is not null or undefined + assertParamExists('fsSearchFiles', 'pattern', pattern) + const localVarPath = + `/workspace/{workspaceId}/toolbox/files/search`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) + // 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 + } -/** - * GitProviderApi - object-oriented interface - * @export - * @class GitProviderApi - * @extends {BaseAPI} - */ -export class GitProviderApi extends BaseAPI { - /** - * Get Git context - * @summary Get Git context - * @param {GetRepositoryContext} repository Get repository context - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GitProviderApi - */ - public getGitContext( - repository: GetRepositoryContext, - options?: RawAxiosRequestConfig, - ) { - return GitProviderApiFp(this.configuration) - .getGitContext(repository, options) - .then((request) => request(this.axios, this.basePath)) - } + const localVarRequestOptions = { + method: 'GET', + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any - /** - * Get Git provider - * @summary Get Git provider - * @param {string} gitProviderId ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GitProviderApi - */ - public getGitProvider( - gitProviderId: string, - options?: RawAxiosRequestConfig, - ) { - return GitProviderApiFp(this.configuration) - .getGitProvider(gitProviderId, options) - .then((request) => request(this.axios, this.basePath)) - } + // authentication Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) - /** - * Get Git provider ID - * @summary Get Git provider ID - * @param {string} url Url - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GitProviderApi - */ - public getGitProviderIdForUrl(url: string, options?: RawAxiosRequestConfig) { - return GitProviderApiFp(this.configuration) - .getGitProviderIdForUrl(url, options) - .then((request) => request(this.axios, this.basePath)) - } + if (path !== undefined) { + localVarQueryParameter['path'] = path + } - /** - * Get Git context - * @summary Get Git context - * @param {string} gitProviderId Git Provider Id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GitProviderApi - */ - public getGitUser(gitProviderId: string, options?: RawAxiosRequestConfig) { - return GitProviderApiFp(this.configuration) - .getGitUser(gitProviderId, options) - .then((request) => request(this.axios, this.basePath)) - } + if (pattern !== undefined) { + localVarQueryParameter['pattern'] = pattern + } - /** - * Get Git namespaces - * @summary Get Git namespaces - * @param {string} gitProviderId Git provider - * @param {number} [page] Page number - * @param {number} [perPage] Number of items per page - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GitProviderApi - */ - public getNamespaces( - gitProviderId: string, - page?: number, - perPage?: number, - options?: RawAxiosRequestConfig, - ) { - return GitProviderApiFp(this.configuration) - .getNamespaces(gitProviderId, page, perPage, options) - .then((request) => request(this.axios, this.basePath)) - } + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } - /** - * Get Git repository branches - * @summary Get Git repository branches - * @param {string} gitProviderId Git provider - * @param {string} namespaceId Namespace - * @param {string} repositoryId Repository - * @param {number} [page] Page number - * @param {number} [perPage] Number of items per page - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GitProviderApi - */ - public getRepoBranches( - gitProviderId: string, - namespaceId: string, - repositoryId: string, - page?: number, - perPage?: number, - options?: RawAxiosRequestConfig, - ) { - return GitProviderApiFp(this.configuration) - .getRepoBranches( - gitProviderId, - namespaceId, - repositoryId, - page, - perPage, - options, - ) - .then((request) => request(this.axios, this.basePath)) - } + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Set file owner/group/permissions inside a workspace + * @summary Set file owner/group/permissions + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path + * @param {string} [owner] Owner + * @param {string} [group] Group + * @param {string} [mode] Mode + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fsSetFilePermissions: async ( + workspaceId: string, + path: string, + owner?: string, + group?: string, + mode?: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('fsSetFilePermissions', 'workspaceId', workspaceId) + // verify required parameter 'path' is not null or undefined + assertParamExists('fsSetFilePermissions', 'path', path) + const localVarPath = + `/workspace/{workspaceId}/toolbox/files/permissions`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) + // 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 + } - /** - * Get Git repository PRs - * @summary Get Git repository PRs - * @param {string} gitProviderId Git provider - * @param {string} namespaceId Namespace - * @param {string} repositoryId Repository - * @param {number} [page] Page number - * @param {number} [perPage] Number of items per page - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GitProviderApi - */ - public getRepoPRs( - gitProviderId: string, - namespaceId: string, - repositoryId: string, - page?: number, - perPage?: number, - options?: RawAxiosRequestConfig, - ) { - return GitProviderApiFp(this.configuration) - .getRepoPRs( - gitProviderId, - namespaceId, - repositoryId, - page, - perPage, - options, - ) - .then((request) => request(this.axios, this.basePath)) - } + const localVarRequestOptions = { + method: 'POST', + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any - /** - * Get Git repositories - * @summary Get Git repositories - * @param {string} gitProviderId Git provider - * @param {string} namespaceId Namespace - * @param {number} [page] Page number - * @param {number} [perPage] Number of items per page - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GitProviderApi - */ - public getRepositories( - gitProviderId: string, - namespaceId: string, - page?: number, - perPage?: number, - options?: RawAxiosRequestConfig, - ) { - return GitProviderApiFp(this.configuration) - .getRepositories(gitProviderId, namespaceId, page, perPage, options) - .then((request) => request(this.axios, this.basePath)) - } + // authentication Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) - /** - * Get URL from Git repository - * @summary Get URL from Git repository - * @param {GitRepository} repository Git repository - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GitProviderApi - */ - public getUrlFromRepository( - repository: GitRepository, - options?: RawAxiosRequestConfig, - ) { - return GitProviderApiFp(this.configuration) - .getUrlFromRepository(repository, options) - .then((request) => request(this.axios, this.basePath)) - } + if (path !== undefined) { + localVarQueryParameter['path'] = path + } - /** - * List Git providers - * @summary List Git providers - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GitProviderApi - */ - public listGitProviders(options?: RawAxiosRequestConfig) { - return GitProviderApiFp(this.configuration) - .listGitProviders(options) - .then((request) => request(this.axios, this.basePath)) - } + if (owner !== undefined) { + localVarQueryParameter['owner'] = owner + } - /** - * List Git providers for url - * @summary List Git providers for url - * @param {string} url Url - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GitProviderApi - */ - public listGitProvidersForUrl(url: string, options?: RawAxiosRequestConfig) { - return GitProviderApiFp(this.configuration) - .listGitProvidersForUrl(url, options) - .then((request) => request(this.axios, this.basePath)) - } + if (group !== undefined) { + localVarQueryParameter['group'] = group + } - /** - * Remove Git provider - * @summary Remove Git provider - * @param {string} gitProviderId Git provider - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GitProviderApi - */ - public removeGitProvider( - gitProviderId: string, - options?: RawAxiosRequestConfig, - ) { - return GitProviderApiFp(this.configuration) - .removeGitProvider(gitProviderId, options) - .then((request) => request(this.axios, this.basePath)) - } + if (mode !== undefined) { + localVarQueryParameter['mode'] = mode + } - /** - * Set Git provider - * @summary Set Git provider - * @param {SetGitProviderConfig} gitProviderConfig Git provider - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof GitProviderApi - */ - public setGitProvider( - gitProviderConfig: SetGitProviderConfig, - options?: RawAxiosRequestConfig, - ) { - return GitProviderApiFp(this.configuration) - .setGitProvider(gitProviderConfig, options) - .then((request) => request(this.axios, this.basePath)) - } -} + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } -/** - * PrebuildApi - axios parameter creator - * @export - */ -export const PrebuildApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * Delete prebuild - * @summary Delete prebuild - * @param {string} configName Project config name - * @param {string} prebuildId Prebuild ID - * @param {boolean} [force] Force + * Upload file inside a workspace + * @summary Upload file + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path + * @param {File} file File * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deletePrebuild: async ( - configName: string, - prebuildId: string, - force?: boolean, + fsUploadFile: async ( + workspaceId: string, + path: string, + file: File, options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'configName' is not null or undefined - assertParamExists('deletePrebuild', 'configName', configName) - // verify required parameter 'prebuildId' is not null or undefined - assertParamExists('deletePrebuild', 'prebuildId', prebuildId) - const localVarPath = `/project-config/{configName}/prebuild/{prebuildId}` - .replace(`{${'configName'}}`, encodeURIComponent(String(configName))) - .replace(`{${'prebuildId'}}`, encodeURIComponent(String(prebuildId))) + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('fsUploadFile', 'workspaceId', workspaceId) + // verify required parameter 'path' is not null or undefined + assertParamExists('fsUploadFile', 'path', path) + // verify required parameter 'file' is not null or undefined + assertParamExists('fsUploadFile', 'file', file) + const localVarPath = + `/workspace/{workspaceId}/toolbox/files/upload`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -5279,12 +14922,15 @@ export const PrebuildApiAxiosParamCreator = function ( } const localVarRequestOptions = { - method: 'DELETE', + method: 'POST', ...baseOptions, ...options, } const localVarHeaderParameter = {} as any const localVarQueryParameter = {} as any + const localVarFormParams = new ((configuration && + configuration.formDataCtor) || + FormData)() // authentication Bearer required await setApiKeyToObject( @@ -5293,10 +14939,16 @@ export const PrebuildApiAxiosParamCreator = function ( configuration, ) - if (force !== undefined) { - localVarQueryParameter['force'] = force + if (path !== undefined) { + localVarQueryParameter['path'] = path } + if (file !== undefined) { + localVarFormParams.append('file', file as any) + } + + localVarHeaderParameter['Content-Type'] = 'multipart/form-data' + setSearchParams(localVarUrlObj, localVarQueryParameter) let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} @@ -5305,6 +14957,7 @@ export const PrebuildApiAxiosParamCreator = function ( ...headersFromBaseOptions, ...options.headers, } + localVarRequestOptions.data = localVarFormParams return { url: toPathString(localVarUrlObj), @@ -5312,25 +14965,34 @@ export const PrebuildApiAxiosParamCreator = function ( } }, /** - * Get prebuild - * @summary Get prebuild - * @param {string} configName Project config name - * @param {string} prebuildId Prebuild ID + * Get logs of a command inside a session inside workspace project Connect with websocket to get a stream of the logs + * @summary Get session command logs + * @param {string} workspaceId Workspace ID or Name + * @param {string} sessionId Session ID + * @param {string} commandId Command ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getPrebuild: async ( - configName: string, - prebuildId: string, + getSessionCommandLogs: async ( + workspaceId: string, + sessionId: string, + commandId: string, options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'configName' is not null or undefined - assertParamExists('getPrebuild', 'configName', configName) - // verify required parameter 'prebuildId' is not null or undefined - assertParamExists('getPrebuild', 'prebuildId', prebuildId) - const localVarPath = `/project-config/{configName}/prebuild/{prebuildId}` - .replace(`{${'configName'}}`, encodeURIComponent(String(configName))) - .replace(`{${'prebuildId'}}`, encodeURIComponent(String(prebuildId))) + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('getSessionCommandLogs', 'workspaceId', workspaceId) + // verify required parameter 'sessionId' is not null or undefined + assertParamExists('getSessionCommandLogs', 'sessionId', sessionId) + // verify required parameter 'commandId' is not null or undefined + assertParamExists('getSessionCommandLogs', 'commandId', commandId) + const localVarPath = + `/workspace/{workspaceId}/toolbox/process/session/{sessionId}/command/{commandId}/logs` + .replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) + .replace(`{${'sessionId'}}`, encodeURIComponent(String(sessionId))) + .replace(`{${'commandId'}}`, encodeURIComponent(String(commandId))) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -5368,15 +15030,23 @@ export const PrebuildApiAxiosParamCreator = function ( } }, /** - * List prebuilds - * @summary List prebuilds + * Get workspace directory + * @summary Get workspace dir + * @param {string} workspaceId Workspace ID or Name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listPrebuilds: async ( + getWorkspaceDir: async ( + workspaceId: string, options: RawAxiosRequestConfig = {}, ): Promise => { - const localVarPath = `/project-config/prebuild` + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('getWorkspaceDir', 'workspaceId', workspaceId) + const localVarPath = + `/workspace/{workspaceId}/toolbox/workspace-dir`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -5414,26 +15084,91 @@ export const PrebuildApiAxiosParamCreator = function ( } }, /** - * List prebuilds for project config - * @summary List prebuilds for project config - * @param {string} configName Config name + * Add files to git commit + * @summary Add files + * @param {string} workspaceId Workspace ID or Name + * @param {GitAddRequest} params GitAddRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listPrebuildsForProjectConfig: async ( - configName: string, + gitAddFiles: async ( + workspaceId: string, + params: GitAddRequest, options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'configName' is not null or undefined - assertParamExists( - 'listPrebuildsForProjectConfig', - 'configName', - configName, + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('gitAddFiles', 'workspaceId', workspaceId) + // verify required parameter 'params' is not null or undefined + assertParamExists('gitAddFiles', 'params', params) + const localVarPath = `/workspace/{workspaceId}/toolbox/git/add`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, ) - const localVarPath = `/project-config/{configName}/prebuild`.replace( - `{${'configName'}}`, - encodeURIComponent(String(configName)), + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + params, + localVarRequestOptions, + configuration, ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Get branch list from git repository inside a workspace + * @summary Get branch list + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path to git repository + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + gitBranchList: async ( + workspaceId: string, + path: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('gitBranchList', 'workspaceId', workspaceId) + // verify required parameter 'path' is not null or undefined + assertParamExists('gitBranchList', 'path', path) + const localVarPath = + `/workspace/{workspaceId}/toolbox/git/branches`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -5456,6 +15191,69 @@ export const PrebuildApiAxiosParamCreator = function ( configuration, ) + if (path !== undefined) { + localVarQueryParameter['path'] = path + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Clone git repository inside a workspace + * @summary Clone git repository + * @param {string} workspaceId Workspace ID or Name + * @param {GitCloneRequest} params GitCloneRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + gitCloneRepository: async ( + workspaceId: string, + params: GitCloneRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('gitCloneRepository', 'workspaceId', workspaceId) + // verify required parameter 'params' is not null or undefined + assertParamExists('gitCloneRepository', 'params', params) + const localVarPath = `/workspace/{workspaceId}/toolbox/git/clone`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + localVarHeaderParameter['Content-Type'] = 'application/json' + setSearchParams(localVarUrlObj, localVarQueryParameter) let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} @@ -5464,6 +15262,11 @@ export const PrebuildApiAxiosParamCreator = function ( ...headersFromBaseOptions, ...options.headers, } + localVarRequestOptions.data = serializeDataIfNeeded( + params, + localVarRequestOptions, + configuration, + ) return { url: toPathString(localVarUrlObj), @@ -5471,19 +15274,27 @@ export const PrebuildApiAxiosParamCreator = function ( } }, /** - * ProcessGitEvent - * @summary ProcessGitEvent - * @param {object} workspace Webhook event + * Commit changes to git repository inside a workspace + * @summary Commit changes + * @param {string} workspaceId Workspace ID or Name + * @param {GitCommitRequest} params GitCommitRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - processGitEvent: async ( - workspace: object, + gitCommitChanges: async ( + workspaceId: string, + params: GitCommitRequest, options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'workspace' is not null or undefined - assertParamExists('processGitEvent', 'workspace', workspace) - const localVarPath = `/project-config/prebuild/process-git-event` + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('gitCommitChanges', 'workspaceId', workspaceId) + // verify required parameter 'params' is not null or undefined + assertParamExists('gitCommitChanges', 'params', params) + const localVarPath = + `/workspace/{workspaceId}/toolbox/git/commit`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -5517,7 +15328,7 @@ export const PrebuildApiAxiosParamCreator = function ( ...options.headers, } localVarRequestOptions.data = serializeDataIfNeeded( - workspace, + params, localVarRequestOptions, configuration, ) @@ -5528,26 +15339,27 @@ export const PrebuildApiAxiosParamCreator = function ( } }, /** - * Set prebuild - * @summary Set prebuild - * @param {string} configName Config name - * @param {CreatePrebuildDTO} prebuild Prebuild + * Get commit history from git repository inside a workspace + * @summary Get commit history + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path to git repository * @param {*} [options] Override http request option. * @throws {RequiredError} */ - setPrebuild: async ( - configName: string, - prebuild: CreatePrebuildDTO, + gitCommitHistory: async ( + workspaceId: string, + path: string, options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'configName' is not null or undefined - assertParamExists('setPrebuild', 'configName', configName) - // verify required parameter 'prebuild' is not null or undefined - assertParamExists('setPrebuild', 'prebuild', prebuild) - const localVarPath = `/project-config/{configName}/prebuild`.replace( - `{${'configName'}}`, - encodeURIComponent(String(configName)), - ) + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('gitCommitHistory', 'workspaceId', workspaceId) + // verify required parameter 'path' is not null or undefined + assertParamExists('gitCommitHistory', 'path', path) + const localVarPath = + `/workspace/{workspaceId}/toolbox/git/history`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -5556,7 +15368,7 @@ export const PrebuildApiAxiosParamCreator = function ( } const localVarRequestOptions = { - method: 'PUT', + method: 'GET', ...baseOptions, ...options, } @@ -5570,7 +15382,9 @@ export const PrebuildApiAxiosParamCreator = function ( configuration, ) - localVarHeaderParameter['Content-Type'] = 'application/json' + if (path !== undefined) { + localVarQueryParameter['path'] = path + } setSearchParams(localVarUrlObj, localVarQueryParameter) let headersFromBaseOptions = @@ -5580,465 +15394,285 @@ export const PrebuildApiAxiosParamCreator = function ( ...headersFromBaseOptions, ...options.headers, } - localVarRequestOptions.data = serializeDataIfNeeded( - prebuild, - localVarRequestOptions, - configuration, - ) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, } }, - } -} - -/** - * PrebuildApi - functional programming interface - * @export - */ -export const PrebuildApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = PrebuildApiAxiosParamCreator(configuration) - return { - /** - * Delete prebuild - * @summary Delete prebuild - * @param {string} configName Project config name - * @param {string} prebuildId Prebuild ID - * @param {boolean} [force] Force - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deletePrebuild( - configName: string, - prebuildId: string, - force?: boolean, - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.deletePrebuild( - configName, - prebuildId, - force, - options, - ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['PrebuildApi.deletePrebuild']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) - }, - /** - * Get prebuild - * @summary Get prebuild - * @param {string} configName Project config name - * @param {string} prebuildId Prebuild ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getPrebuild( - configName: string, - prebuildId: string, - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.getPrebuild( - configName, - prebuildId, - options, - ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['PrebuildApi.getPrebuild']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) - }, - /** - * List prebuilds - * @summary List prebuilds - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async listPrebuilds( - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise> - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.listPrebuilds( - options, - ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['PrebuildApi.listPrebuilds']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) - }, /** - * List prebuilds for project config - * @summary List prebuilds for project config - * @param {string} configName Config name + * Create branch on git repository inside a workspace + * @summary Create branch + * @param {string} workspaceId Workspace ID or Name + * @param {GitBranchRequest} params GitBranchRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listPrebuildsForProjectConfig( - configName: string, - options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise> - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.listPrebuildsForProjectConfig( - configName, - options, + gitCreateBranch: async ( + workspaceId: string, + params: GitBranchRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('gitCreateBranch', 'workspaceId', workspaceId) + // verify required parameter 'params' is not null or undefined + assertParamExists('gitCreateBranch', 'params', params) + const localVarPath = + `/workspace/{workspaceId}/toolbox/git/branches`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['PrebuildApi.listPrebuildsForProjectConfig']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) - }, - /** - * ProcessGitEvent - * @summary ProcessGitEvent - * @param {object} workspace Webhook event - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async processGitEvent( - workspace: object, - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.processGitEvent( - workspace, - options, - ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['PrebuildApi.processGitEvent']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) - }, - /** - * Set prebuild - * @summary Set prebuild - * @param {string} configName Config name - * @param {CreatePrebuildDTO} prebuild Prebuild - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async setPrebuild( - configName: string, - prebuild: CreatePrebuildDTO, - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.setPrebuild( - configName, - prebuild, - options, - ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['PrebuildApi.setPrebuild']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) - }, - } -} + // 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 + } -/** - * PrebuildApi - factory interface - * @export - */ -export const PrebuildApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = PrebuildApiFp(configuration) - return { - /** - * Delete prebuild - * @summary Delete prebuild - * @param {string} configName Project config name - * @param {string} prebuildId Prebuild ID - * @param {boolean} [force] Force - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deletePrebuild( - configName: string, - prebuildId: string, - force?: boolean, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .deletePrebuild(configName, prebuildId, force, options) - .then((request) => request(axios, basePath)) - }, - /** - * Get prebuild - * @summary Get prebuild - * @param {string} configName Project config name - * @param {string} prebuildId Prebuild ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getPrebuild( - configName: string, - prebuildId: string, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .getPrebuild(configName, prebuildId, options) - .then((request) => request(axios, basePath)) - }, - /** - * List prebuilds - * @summary List prebuilds - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listPrebuilds( - options?: RawAxiosRequestConfig, - ): AxiosPromise> { - return localVarFp - .listPrebuilds(options) - .then((request) => request(axios, basePath)) + const localVarRequestOptions = { + method: 'POST', + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + // authentication Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + params, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } }, /** - * List prebuilds for project config - * @summary List prebuilds for project config - * @param {string} configName Config name + * Get status from git repository inside a workspace + * @summary Get git status + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path to git repository * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listPrebuildsForProjectConfig( - configName: string, - options?: RawAxiosRequestConfig, - ): AxiosPromise> { - return localVarFp - .listPrebuildsForProjectConfig(configName, options) - .then((request) => request(axios, basePath)) + gitGitStatus: async ( + workspaceId: string, + path: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('gitGitStatus', 'workspaceId', workspaceId) + // verify required parameter 'path' is not null or undefined + assertParamExists('gitGitStatus', 'path', path) + const localVarPath = + `/workspace/{workspaceId}/toolbox/git/status`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + if (path !== undefined) { + localVarQueryParameter['path'] = path + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } }, /** - * ProcessGitEvent - * @summary ProcessGitEvent - * @param {object} workspace Webhook event + * Pull changes from remote to git repository inside a workspace + * @summary Pull changes + * @param {string} workspaceId Workspace ID or Name + * @param {GitRepoRequest} params Git pull request * @param {*} [options] Override http request option. * @throws {RequiredError} */ - processGitEvent( - workspace: object, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .processGitEvent(workspace, options) - .then((request) => request(axios, basePath)) + gitPullChanges: async ( + workspaceId: string, + params: GitRepoRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('gitPullChanges', 'workspaceId', workspaceId) + // verify required parameter 'params' is not null or undefined + assertParamExists('gitPullChanges', 'params', params) + const localVarPath = `/workspace/{workspaceId}/toolbox/git/pull`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) + // 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 Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) + + localVarHeaderParameter['Content-Type'] = 'application/json' + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + params, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } }, /** - * Set prebuild - * @summary Set prebuild - * @param {string} configName Config name - * @param {CreatePrebuildDTO} prebuild Prebuild + * Push changes to remote from git repository inside a workspace + * @summary Push changes + * @param {string} workspaceId Workspace ID or Name + * @param {GitRepoRequest} params Git push request * @param {*} [options] Override http request option. * @throws {RequiredError} */ - setPrebuild( - configName: string, - prebuild: CreatePrebuildDTO, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .setPrebuild(configName, prebuild, options) - .then((request) => request(axios, basePath)) - }, - } -} - -/** - * PrebuildApi - object-oriented interface - * @export - * @class PrebuildApi - * @extends {BaseAPI} - */ -export class PrebuildApi extends BaseAPI { - /** - * Delete prebuild - * @summary Delete prebuild - * @param {string} configName Project config name - * @param {string} prebuildId Prebuild ID - * @param {boolean} [force] Force - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PrebuildApi - */ - public deletePrebuild( - configName: string, - prebuildId: string, - force?: boolean, - options?: RawAxiosRequestConfig, - ) { - return PrebuildApiFp(this.configuration) - .deletePrebuild(configName, prebuildId, force, options) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Get prebuild - * @summary Get prebuild - * @param {string} configName Project config name - * @param {string} prebuildId Prebuild ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PrebuildApi - */ - public getPrebuild( - configName: string, - prebuildId: string, - options?: RawAxiosRequestConfig, - ) { - return PrebuildApiFp(this.configuration) - .getPrebuild(configName, prebuildId, options) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * List prebuilds - * @summary List prebuilds - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PrebuildApi - */ - public listPrebuilds(options?: RawAxiosRequestConfig) { - return PrebuildApiFp(this.configuration) - .listPrebuilds(options) - .then((request) => request(this.axios, this.basePath)) - } + gitPushChanges: async ( + workspaceId: string, + params: GitRepoRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('gitPushChanges', 'workspaceId', workspaceId) + // verify required parameter 'params' is not null or undefined + assertParamExists('gitPushChanges', 'params', params) + const localVarPath = `/workspace/{workspaceId}/toolbox/git/push`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) + // 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 + } - /** - * List prebuilds for project config - * @summary List prebuilds for project config - * @param {string} configName Config name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PrebuildApi - */ - public listPrebuildsForProjectConfig( - configName: string, - options?: RawAxiosRequestConfig, - ) { - return PrebuildApiFp(this.configuration) - .listPrebuildsForProjectConfig(configName, options) - .then((request) => request(this.axios, this.basePath)) - } + const localVarRequestOptions = { + method: 'POST', + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any - /** - * ProcessGitEvent - * @summary ProcessGitEvent - * @param {object} workspace Webhook event - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PrebuildApi - */ - public processGitEvent(workspace: object, options?: RawAxiosRequestConfig) { - return PrebuildApiFp(this.configuration) - .processGitEvent(workspace, options) - .then((request) => request(this.axios, this.basePath)) - } + // authentication Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) - /** - * Set prebuild - * @summary Set prebuild - * @param {string} configName Config name - * @param {CreatePrebuildDTO} prebuild Prebuild - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PrebuildApi - */ - public setPrebuild( - configName: string, - prebuild: CreatePrebuildDTO, - options?: RawAxiosRequestConfig, - ) { - return PrebuildApiFp(this.configuration) - .setPrebuild(configName, prebuild, options) - .then((request) => request(this.axios, this.basePath)) - } -} + localVarHeaderParameter['Content-Type'] = 'application/json' -/** - * ProfileApi - axios parameter creator - * @export - */ -export const ProfileApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + params, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * Delete profile data - * @summary Delete profile data + * List sessions inside workspace project + * @summary List sessions + * @param {string} workspaceId Workspace ID or Name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteProfileData: async ( + listSessions: async ( + workspaceId: string, options: RawAxiosRequestConfig = {}, ): Promise => { - const localVarPath = `/profile` + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('listSessions', 'workspaceId', workspaceId) + const localVarPath = + `/workspace/{workspaceId}/toolbox/process/session`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -6047,7 +15681,7 @@ export const ProfileApiAxiosParamCreator = function ( } const localVarRequestOptions = { - method: 'DELETE', + method: 'GET', ...baseOptions, ...options, } @@ -6076,15 +15710,27 @@ export const ProfileApiAxiosParamCreator = function ( } }, /** - * Get profile data - * @summary Get profile data + * The Completion request is sent from the client to the server to compute completion items at a given cursor position. + * @summary Get Lsp Completions + * @param {string} workspaceId Workspace ID or Name + * @param {LspCompletionParams} params LspCompletionParams * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getProfileData: async ( + lspCompletions: async ( + workspaceId: string, + params: LspCompletionParams, options: RawAxiosRequestConfig = {}, ): Promise => { - const localVarPath = `/profile` + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('lspCompletions', 'workspaceId', workspaceId) + // verify required parameter 'params' is not null or undefined + assertParamExists('lspCompletions', 'params', params) + const localVarPath = + `/workspace/{workspaceId}/toolbox/lsp/completions`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -6093,7 +15739,7 @@ export const ProfileApiAxiosParamCreator = function ( } const localVarRequestOptions = { - method: 'GET', + method: 'POST', ...baseOptions, ...options, } @@ -6107,6 +15753,8 @@ export const ProfileApiAxiosParamCreator = function ( configuration, ) + localVarHeaderParameter['Content-Type'] = 'application/json' + setSearchParams(localVarUrlObj, localVarQueryParameter) let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} @@ -6115,6 +15763,11 @@ export const ProfileApiAxiosParamCreator = function ( ...headersFromBaseOptions, ...options.headers, } + localVarRequestOptions.data = serializeDataIfNeeded( + params, + localVarRequestOptions, + configuration, + ) return { url: toPathString(localVarUrlObj), @@ -6122,19 +15775,27 @@ export const ProfileApiAxiosParamCreator = function ( } }, /** - * Set profile data - * @summary Set profile data - * @param {ProfileData} profileData Profile data + * The document close notification is sent from the client to the server when the document got closed in the client. + * @summary Call Lsp DidClose + * @param {string} workspaceId Workspace ID or Name + * @param {LspDocumentRequest} params LspDocumentRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - setProfileData: async ( - profileData: ProfileData, + lspDidClose: async ( + workspaceId: string, + params: LspDocumentRequest, options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'profileData' is not null or undefined - assertParamExists('setProfileData', 'profileData', profileData) - const localVarPath = `/profile` + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('lspDidClose', 'workspaceId', workspaceId) + // verify required parameter 'params' is not null or undefined + assertParamExists('lspDidClose', 'params', params) + const localVarPath = + `/workspace/{workspaceId}/toolbox/lsp/did-close`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -6143,7 +15804,7 @@ export const ProfileApiAxiosParamCreator = function ( } const localVarRequestOptions = { - method: 'PUT', + method: 'POST', ...baseOptions, ...options, } @@ -6168,7 +15829,7 @@ export const ProfileApiAxiosParamCreator = function ( ...options.headers, } localVarRequestOptions.data = serializeDataIfNeeded( - profileData, + params, localVarRequestOptions, configuration, ) @@ -6178,231 +15839,101 @@ export const ProfileApiAxiosParamCreator = function ( options: localVarRequestOptions, } }, - } -} - -/** - * ProfileApi - functional programming interface - * @export - */ -export const ProfileApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = ProfileApiAxiosParamCreator(configuration) - return { - /** - * Delete profile data - * @summary Delete profile data - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async deleteProfileData( - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.deleteProfileData(options) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['ProfileApi.deleteProfileData']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) - }, - /** - * Get profile data - * @summary Get profile data - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getProfileData( - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.getProfileData( - options, - ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['ProfileApi.getProfileData']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) - }, /** - * Set profile data - * @summary Set profile data - * @param {ProfileData} profileData Profile data + * The document open notification is sent from the client to the server to signal newly opened text documents. + * @summary Call Lsp DidOpen + * @param {string} workspaceId Workspace ID or Name + * @param {LspDocumentRequest} params LspDocumentRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async setProfileData( - profileData: ProfileData, - options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.setProfileData( - profileData, - options, - ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['ProfileApi.setProfileData']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) - }, - } -} + lspDidOpen: async ( + workspaceId: string, + params: LspDocumentRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('lspDidOpen', 'workspaceId', workspaceId) + // verify required parameter 'params' is not null or undefined + assertParamExists('lspDidOpen', 'params', params) + const localVarPath = + `/workspace/{workspaceId}/toolbox/lsp/did-open`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) + // 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 + } -/** - * ProfileApi - factory interface - * @export - */ -export const ProfileApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = ProfileApiFp(configuration) - return { - /** - * Delete profile data - * @summary Delete profile data - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteProfileData(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp - .deleteProfileData(options) - .then((request) => request(axios, basePath)) - }, - /** - * Get profile data - * @summary Get profile data - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getProfileData(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp - .getProfileData(options) - .then((request) => request(axios, basePath)) - }, - /** - * Set profile data - * @summary Set profile data - * @param {ProfileData} profileData Profile data - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - setProfileData( - profileData: ProfileData, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .setProfileData(profileData, options) - .then((request) => request(axios, basePath)) - }, - } -} + const localVarRequestOptions = { + method: 'POST', + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any -/** - * ProfileApi - object-oriented interface - * @export - * @class ProfileApi - * @extends {BaseAPI} - */ -export class ProfileApi extends BaseAPI { - /** - * Delete profile data - * @summary Delete profile data - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProfileApi - */ - public deleteProfileData(options?: RawAxiosRequestConfig) { - return ProfileApiFp(this.configuration) - .deleteProfileData(options) - .then((request) => request(this.axios, this.basePath)) - } + // authentication Bearer required + await setApiKeyToObject( + localVarHeaderParameter, + 'Authorization', + configuration, + ) - /** - * Get profile data - * @summary Get profile data - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProfileApi - */ - public getProfileData(options?: RawAxiosRequestConfig) { - return ProfileApiFp(this.configuration) - .getProfileData(options) - .then((request) => request(this.axios, this.basePath)) - } + localVarHeaderParameter['Content-Type'] = 'application/json' - /** - * Set profile data - * @summary Set profile data - * @param {ProfileData} profileData Profile data - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProfileApi - */ - public setProfileData( - profileData: ProfileData, - options?: RawAxiosRequestConfig, - ) { - return ProfileApiFp(this.configuration) - .setProfileData(profileData, options) - .then((request) => request(this.axios, this.basePath)) - } -} + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + params, + localVarRequestOptions, + configuration, + ) -/** - * ProjectConfigApi - axios parameter creator - * @export - */ -export const ProjectConfigApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * Delete project config data - * @summary Delete project config data - * @param {string} configName Config name - * @param {boolean} [force] Force + * The document symbol request is sent from the client to the server. + * @summary Call Lsp DocumentSymbols + * @param {string} workspaceId Workspace ID or Name + * @param {string} languageId Language ID + * @param {string} pathToProject Path to project + * @param {string} uri Document Uri * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteProjectConfig: async ( - configName: string, - force?: boolean, + lspDocumentSymbols: async ( + workspaceId: string, + languageId: string, + pathToProject: string, + uri: string, options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'configName' is not null or undefined - assertParamExists('deleteProjectConfig', 'configName', configName) - const localVarPath = `/project-config/{configName}`.replace( - `{${'configName'}}`, - encodeURIComponent(String(configName)), - ) + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('lspDocumentSymbols', 'workspaceId', workspaceId) + // verify required parameter 'languageId' is not null or undefined + assertParamExists('lspDocumentSymbols', 'languageId', languageId) + // verify required parameter 'pathToProject' is not null or undefined + assertParamExists('lspDocumentSymbols', 'pathToProject', pathToProject) + // verify required parameter 'uri' is not null or undefined + assertParamExists('lspDocumentSymbols', 'uri', uri) + const localVarPath = + `/workspace/{workspaceId}/toolbox/lsp/document-symbols`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -6411,7 +15942,7 @@ export const ProjectConfigApiAxiosParamCreator = function ( } const localVarRequestOptions = { - method: 'DELETE', + method: 'GET', ...baseOptions, ...options, } @@ -6425,8 +15956,16 @@ export const ProjectConfigApiAxiosParamCreator = function ( configuration, ) - if (force !== undefined) { - localVarQueryParameter['force'] = force + if (languageId !== undefined) { + localVarQueryParameter['languageId'] = languageId + } + + if (pathToProject !== undefined) { + localVarQueryParameter['pathToProject'] = pathToProject + } + + if (uri !== undefined) { + localVarQueryParameter['uri'] = uri } setSearchParams(localVarUrlObj, localVarQueryParameter) @@ -6444,21 +15983,25 @@ export const ProjectConfigApiAxiosParamCreator = function ( } }, /** - * Get project configs by git url - * @summary Get project configs by git url - * @param {string} gitUrl Git URL + * Start Lsp server process inside a workspace + * @summary Start Lsp server + * @param {string} workspaceId Workspace ID or Name + * @param {LspServerRequest} params LspServerRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getDefaultProjectConfig: async ( - gitUrl: string, + lspStart: async ( + workspaceId: string, + params: LspServerRequest, options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'gitUrl' is not null or undefined - assertParamExists('getDefaultProjectConfig', 'gitUrl', gitUrl) - const localVarPath = `/project-config/default/{gitUrl}`.replace( - `{${'gitUrl'}}`, - encodeURIComponent(String(gitUrl)), + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('lspStart', 'workspaceId', workspaceId) + // verify required parameter 'params' is not null or undefined + assertParamExists('lspStart', 'params', params) + const localVarPath = `/workspace/{workspaceId}/toolbox/lsp/start`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) @@ -6468,7 +16011,7 @@ export const ProjectConfigApiAxiosParamCreator = function ( } const localVarRequestOptions = { - method: 'GET', + method: 'POST', ...baseOptions, ...options, } @@ -6482,6 +16025,8 @@ export const ProjectConfigApiAxiosParamCreator = function ( configuration, ) + localVarHeaderParameter['Content-Type'] = 'application/json' + setSearchParams(localVarUrlObj, localVarQueryParameter) let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} @@ -6490,6 +16035,11 @@ export const ProjectConfigApiAxiosParamCreator = function ( ...headersFromBaseOptions, ...options.headers, } + localVarRequestOptions.data = serializeDataIfNeeded( + params, + localVarRequestOptions, + configuration, + ) return { url: toPathString(localVarUrlObj), @@ -6497,21 +16047,25 @@ export const ProjectConfigApiAxiosParamCreator = function ( } }, /** - * Get project config data - * @summary Get project config data - * @param {string} configName Config name + * Stop Lsp server process inside a workspace + * @summary Stop Lsp server + * @param {string} workspaceId Workspace ID or Name + * @param {LspServerRequest} params LspServerRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getProjectConfig: async ( - configName: string, + lspStop: async ( + workspaceId: string, + params: LspServerRequest, options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'configName' is not null or undefined - assertParamExists('getProjectConfig', 'configName', configName) - const localVarPath = `/project-config/{configName}`.replace( - `{${'configName'}}`, - encodeURIComponent(String(configName)), + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('lspStop', 'workspaceId', workspaceId) + // verify required parameter 'params' is not null or undefined + assertParamExists('lspStop', 'params', params) + const localVarPath = `/workspace/{workspaceId}/toolbox/lsp/stop`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) @@ -6521,7 +16075,7 @@ export const ProjectConfigApiAxiosParamCreator = function ( } const localVarRequestOptions = { - method: 'GET', + method: 'POST', ...baseOptions, ...options, } @@ -6535,6 +16089,8 @@ export const ProjectConfigApiAxiosParamCreator = function ( configuration, ) + localVarHeaderParameter['Content-Type'] = 'application/json' + setSearchParams(localVarUrlObj, localVarQueryParameter) let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} @@ -6543,6 +16099,11 @@ export const ProjectConfigApiAxiosParamCreator = function ( ...headersFromBaseOptions, ...options.headers, } + localVarRequestOptions.data = serializeDataIfNeeded( + params, + localVarRequestOptions, + configuration, + ) return { url: toPathString(localVarUrlObj), @@ -6550,15 +16111,35 @@ export const ProjectConfigApiAxiosParamCreator = function ( } }, /** - * List project configs - * @summary List project configs + * The workspace symbol request is sent from the client to the server to list project-wide symbols matching the query string. + * @summary Call Lsp WorkspaceSymbols + * @param {string} workspaceId Workspace ID or Name + * @param {string} languageId Language ID + * @param {string} pathToProject Path to project + * @param {string} query Symbol Query * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listProjectConfigs: async ( + lspWorkspaceSymbols: async ( + workspaceId: string, + languageId: string, + pathToProject: string, + query: string, options: RawAxiosRequestConfig = {}, ): Promise => { - const localVarPath = `/project-config` + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('lspWorkspaceSymbols', 'workspaceId', workspaceId) + // verify required parameter 'languageId' is not null or undefined + assertParamExists('lspWorkspaceSymbols', 'languageId', languageId) + // verify required parameter 'pathToProject' is not null or undefined + assertParamExists('lspWorkspaceSymbols', 'pathToProject', pathToProject) + // verify required parameter 'query' is not null or undefined + assertParamExists('lspWorkspaceSymbols', 'query', query) + const localVarPath = + `/workspace/{workspaceId}/toolbox/lsp/workspace-symbols`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -6581,6 +16162,18 @@ export const ProjectConfigApiAxiosParamCreator = function ( configuration, ) + if (languageId !== undefined) { + localVarQueryParameter['languageId'] = languageId + } + + if (pathToProject !== undefined) { + localVarQueryParameter['pathToProject'] = pathToProject + } + + if (query !== undefined) { + localVarQueryParameter['query'] = query + } + setSearchParams(localVarUrlObj, localVarQueryParameter) let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} @@ -6596,22 +16189,27 @@ export const ProjectConfigApiAxiosParamCreator = function ( } }, /** - * Set project config to default - * @summary Set project config to default - * @param {string} configName Config name + * Execute command synchronously inside a workspace + * @summary Execute command + * @param {string} workspaceId Workspace ID or Name + * @param {ExecuteRequest} params Execute command request * @param {*} [options] Override http request option. * @throws {RequiredError} */ - setDefaultProjectConfig: async ( - configName: string, + processExecuteCommand: async ( + workspaceId: string, + params: ExecuteRequest, options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'configName' is not null or undefined - assertParamExists('setDefaultProjectConfig', 'configName', configName) - const localVarPath = `/project-config/{configName}/set-default`.replace( - `{${'configName'}}`, - encodeURIComponent(String(configName)), - ) + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('processExecuteCommand', 'workspaceId', workspaceId) + // verify required parameter 'params' is not null or undefined + assertParamExists('processExecuteCommand', 'params', params) + const localVarPath = + `/workspace/{workspaceId}/toolbox/process/execute`.replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -6620,7 +16218,7 @@ export const ProjectConfigApiAxiosParamCreator = function ( } const localVarRequestOptions = { - method: 'PATCH', + method: 'POST', ...baseOptions, ...options, } @@ -6634,6 +16232,8 @@ export const ProjectConfigApiAxiosParamCreator = function ( configuration, ) + localVarHeaderParameter['Content-Type'] = 'application/json' + setSearchParams(localVarUrlObj, localVarQueryParameter) let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} @@ -6642,6 +16242,11 @@ export const ProjectConfigApiAxiosParamCreator = function ( ...headersFromBaseOptions, ...options.headers, } + localVarRequestOptions.data = serializeDataIfNeeded( + params, + localVarRequestOptions, + configuration, + ) return { url: toPathString(localVarUrlObj), @@ -6649,19 +16254,33 @@ export const ProjectConfigApiAxiosParamCreator = function ( } }, /** - * Set project config data - * @summary Set project config data - * @param {CreateProjectConfigDTO} projectConfig Project config + * Execute command inside a session inside workspace project + * @summary Execute command in session + * @param {string} workspaceId Workspace ID or Name + * @param {string} sessionId Session ID + * @param {SessionExecuteRequest} params Execute command request * @param {*} [options] Override http request option. * @throws {RequiredError} */ - setProjectConfig: async ( - projectConfig: CreateProjectConfigDTO, + sessionExecuteCommand: async ( + workspaceId: string, + sessionId: string, + params: SessionExecuteRequest, options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'projectConfig' is not null or undefined - assertParamExists('setProjectConfig', 'projectConfig', projectConfig) - const localVarPath = `/project-config` + // verify required parameter 'workspaceId' is not null or undefined + assertParamExists('sessionExecuteCommand', 'workspaceId', workspaceId) + // verify required parameter 'sessionId' is not null or undefined + assertParamExists('sessionExecuteCommand', 'sessionId', sessionId) + // verify required parameter 'params' is not null or undefined + assertParamExists('sessionExecuteCommand', 'params', params) + const localVarPath = + `/workspace/{workspaceId}/toolbox/process/session/{sessionId}/exec` + .replace( + `{${'workspaceId'}}`, + encodeURIComponent(String(workspaceId)), + ) + .replace(`{${'sessionId'}}`, encodeURIComponent(String(sessionId))) // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) let baseOptions @@ -6670,7 +16289,7 @@ export const ProjectConfigApiAxiosParamCreator = function ( } const localVarRequestOptions = { - method: 'PUT', + method: 'POST', ...baseOptions, ...options, } @@ -6695,7 +16314,7 @@ export const ProjectConfigApiAxiosParamCreator = function ( ...options.headers, } localVarRequestOptions.data = serializeDataIfNeeded( - projectConfig, + params, localVarRequestOptions, configuration, ) @@ -6709,37 +16328,36 @@ export const ProjectConfigApiAxiosParamCreator = function ( } /** - * ProjectConfigApi - functional programming interface + * WorkspaceToolboxApi - functional programming interface * @export */ -export const ProjectConfigApiFp = function (configuration?: Configuration) { +export const WorkspaceToolboxApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = - ProjectConfigApiAxiosParamCreator(configuration) + WorkspaceToolboxApiAxiosParamCreator(configuration) return { /** - * Delete project config data - * @summary Delete project config data - * @param {string} configName Config name - * @param {boolean} [force] Force + * Create exec session inside workspace project + * @summary Create exec session + * @param {string} workspaceId Workspace ID or Name + * @param {CreateSessionRequest} params Create session request * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteProjectConfig( - configName: string, - force?: boolean, + async createSession( + workspaceId: string, + params: CreateSessionRequest, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.deleteProjectConfig( - configName, - force, - options, - ) + const localVarAxiosArgs = await localVarAxiosParamCreator.createSession( + workspaceId, + params, + options, + ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['ProjectConfigApi.deleteProjectConfig']?.[ + operationServerMap['WorkspaceToolboxApi.createSession']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -6751,23 +16369,28 @@ export const ProjectConfigApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath) }, /** - * Get project configs by git url - * @summary Get project configs by git url - * @param {string} gitUrl Git URL + * Delete a session inside workspace project + * @summary Delete session + * @param {string} workspaceId Workspace ID or Name + * @param {string} sessionId Session ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getDefaultProjectConfig( - gitUrl: string, + async deleteSession( + workspaceId: string, + sessionId: string, options?: RawAxiosRequestConfig, ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise + (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.getDefaultProjectConfig(gitUrl, options) + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSession( + workspaceId, + sessionId, + options, + ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['ProjectConfigApi.getDefaultProjectConfig']?.[ + operationServerMap['WorkspaceToolboxApi.deleteSession']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -6779,23 +16402,31 @@ export const ProjectConfigApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath) }, /** - * Get project config data - * @summary Get project config data - * @param {string} configName Config name + * Create folder inside a workspace + * @summary Create folder + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path + * @param {string} mode Mode * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getProjectConfig( - configName: string, + async fsCreateFolder( + workspaceId: string, + path: string, + mode: string, options?: RawAxiosRequestConfig, ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise + (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.getProjectConfig(configName, options) + const localVarAxiosArgs = await localVarAxiosParamCreator.fsCreateFolder( + workspaceId, + path, + mode, + options, + ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['ProjectConfigApi.getProjectConfig']?.[ + operationServerMap['WorkspaceToolboxApi.fsCreateFolder']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -6807,24 +16438,28 @@ export const ProjectConfigApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath) }, /** - * List project configs - * @summary List project configs + * Delete file inside a workspace + * @summary Delete file + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listProjectConfigs( + async fsDeleteFile( + workspaceId: string, + path: string, options?: RawAxiosRequestConfig, ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise> + (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.listProjectConfigs(options) + const localVarAxiosArgs = await localVarAxiosParamCreator.fsDeleteFile( + workspaceId, + path, + options, + ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['ProjectConfigApi.listProjectConfigs']?.[ + operationServerMap['WorkspaceToolboxApi.fsDeleteFile']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -6836,26 +16471,28 @@ export const ProjectConfigApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath) }, /** - * Set project config to default - * @summary Set project config to default - * @param {string} configName Config name + * Download file from a workspace + * @summary Download file + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async setDefaultProjectConfig( - configName: string, + async fsDownloadFile( + workspaceId: string, + path: string, options?: RawAxiosRequestConfig, ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise + (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.setDefaultProjectConfig( - configName, - options, - ) + const localVarAxiosArgs = await localVarAxiosParamCreator.fsDownloadFile( + workspaceId, + path, + options, + ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['ProjectConfigApi.setDefaultProjectConfig']?.[ + operationServerMap['WorkspaceToolboxApi.fsDownloadFile']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -6867,23 +16504,31 @@ export const ProjectConfigApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath) }, /** - * Set project config data - * @summary Set project config data - * @param {CreateProjectConfigDTO} projectConfig Project config + * Search for text/pattern inside a workspace files + * @summary Search for text/pattern in files + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path + * @param {string} pattern Pattern * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async setProjectConfig( - projectConfig: CreateProjectConfigDTO, + async fsFindInFiles( + workspaceId: string, + path: string, + pattern: string, options?: RawAxiosRequestConfig, ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise + (axios?: AxiosInstance, basePath?: string) => AxiosPromise> > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.setProjectConfig(projectConfig, options) + const localVarAxiosArgs = await localVarAxiosParamCreator.fsFindInFiles( + workspaceId, + path, + pattern, + options, + ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['ProjectConfigApi.setProjectConfig']?.[ + operationServerMap['WorkspaceToolboxApi.fsFindInFiles']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -6894,466 +16539,257 @@ export const ProjectConfigApiFp = function (configuration?: Configuration) { configuration, )(axios, localVarOperationServerBasePath || basePath) }, - } -} - -/** - * ProjectConfigApi - factory interface - * @export - */ -export const ProjectConfigApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = ProjectConfigApiFp(configuration) - return { - /** - * Delete project config data - * @summary Delete project config data - * @param {string} configName Config name - * @param {boolean} [force] Force - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteProjectConfig( - configName: string, - force?: boolean, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .deleteProjectConfig(configName, force, options) - .then((request) => request(axios, basePath)) - }, /** - * Get project configs by git url - * @summary Get project configs by git url - * @param {string} gitUrl Git URL - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getDefaultProjectConfig( - gitUrl: string, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .getDefaultProjectConfig(gitUrl, options) - .then((request) => request(axios, basePath)) - }, - /** - * Get project config data - * @summary Get project config data - * @param {string} configName Config name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getProjectConfig( - configName: string, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .getProjectConfig(configName, options) - .then((request) => request(axios, basePath)) - }, - /** - * List project configs - * @summary List project configs - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listProjectConfigs( - options?: RawAxiosRequestConfig, - ): AxiosPromise> { - return localVarFp - .listProjectConfigs(options) - .then((request) => request(axios, basePath)) - }, - /** - * Set project config to default - * @summary Set project config to default - * @param {string} configName Config name + * Get file info inside a workspace + * @summary Get file info + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path * @param {*} [options] Override http request option. * @throws {RequiredError} */ - setDefaultProjectConfig( - configName: string, + async fsGetFileDetails( + workspaceId: string, + path: string, options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .setDefaultProjectConfig(configName, options) - .then((request) => request(axios, basePath)) + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.fsGetFileDetails( + workspaceId, + path, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['WorkspaceToolboxApi.fsGetFileDetails']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) }, /** - * Set project config data - * @summary Set project config data - * @param {CreateProjectConfigDTO} projectConfig Project config + * List files inside a workspace + * @summary List files + * @param {string} workspaceId Workspace ID or Name + * @param {string} [path] Path * @param {*} [options] Override http request option. * @throws {RequiredError} */ - setProjectConfig( - projectConfig: CreateProjectConfigDTO, + async fsListFiles( + workspaceId: string, + path?: string, options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .setProjectConfig(projectConfig, options) - .then((request) => request(axios, basePath)) - }, - } -} - -/** - * ProjectConfigApi - object-oriented interface - * @export - * @class ProjectConfigApi - * @extends {BaseAPI} - */ -export class ProjectConfigApi extends BaseAPI { - /** - * Delete project config data - * @summary Delete project config data - * @param {string} configName Config name - * @param {boolean} [force] Force - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProjectConfigApi - */ - public deleteProjectConfig( - configName: string, - force?: boolean, - options?: RawAxiosRequestConfig, - ) { - return ProjectConfigApiFp(this.configuration) - .deleteProjectConfig(configName, force, options) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Get project configs by git url - * @summary Get project configs by git url - * @param {string} gitUrl Git URL - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProjectConfigApi - */ - public getDefaultProjectConfig( - gitUrl: string, - options?: RawAxiosRequestConfig, - ) { - return ProjectConfigApiFp(this.configuration) - .getDefaultProjectConfig(gitUrl, options) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Get project config data - * @summary Get project config data - * @param {string} configName Config name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProjectConfigApi - */ - public getProjectConfig(configName: string, options?: RawAxiosRequestConfig) { - return ProjectConfigApiFp(this.configuration) - .getProjectConfig(configName, options) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * List project configs - * @summary List project configs - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProjectConfigApi - */ - public listProjectConfigs(options?: RawAxiosRequestConfig) { - return ProjectConfigApiFp(this.configuration) - .listProjectConfigs(options) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Set project config to default - * @summary Set project config to default - * @param {string} configName Config name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProjectConfigApi - */ - public setDefaultProjectConfig( - configName: string, - options?: RawAxiosRequestConfig, - ) { - return ProjectConfigApiFp(this.configuration) - .setDefaultProjectConfig(configName, options) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Set project config data - * @summary Set project config data - * @param {CreateProjectConfigDTO} projectConfig Project config - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProjectConfigApi - */ - public setProjectConfig( - projectConfig: CreateProjectConfigDTO, - options?: RawAxiosRequestConfig, - ) { - return ProjectConfigApiFp(this.configuration) - .setProjectConfig(projectConfig, options) - .then((request) => request(this.axios, this.basePath)) - } -} - -/** - * ProviderApi - axios parameter creator - * @export - */ -export const ProviderApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.fsListFiles( + workspaceId, + path, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['WorkspaceToolboxApi.fsListFiles']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, /** - * Get provider target manifest - * @summary Get provider target manifest - * @param {string} provider Provider name + * Create folder inside a workspace + * @summary Create folder + * @param {string} workspaceId Workspace ID or Name + * @param {string} source Source path + * @param {string} destination Destination path * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getTargetManifest: async ( - provider: string, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'provider' is not null or undefined - assertParamExists('getTargetManifest', 'provider', provider) - const localVarPath = `/provider/{provider}/target-manifest`.replace( - `{${'provider'}}`, - encodeURIComponent(String(provider)), - ) - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, + async fsMoveFile( + workspaceId: string, + source: string, + destination: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.fsMoveFile( + workspaceId, + source, + destination, + options, ) - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['WorkspaceToolboxApi.fsMoveFile']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) }, /** - * Install a provider - * @summary Install a provider - * @param {InstallProviderRequest} provider Provider to install + * Repleace text/pattern in mutilple files inside a workspace + * @summary Repleace text/pattern in files + * @param {string} workspaceId Workspace ID or Name + * @param {ReplaceRequest} replace ReplaceParams * @param {*} [options] Override http request option. * @throws {RequiredError} */ - installProvider: async ( - provider: InstallProviderRequest, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'provider' is not null or undefined - assertParamExists('installProvider', 'provider', provider) - const localVarPath = `/provider/install` - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - localVarHeaderParameter['Content-Type'] = 'application/json' - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - localVarRequestOptions.data = serializeDataIfNeeded( - provider, - localVarRequestOptions, - configuration, - ) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + async fsReplaceInFiles( + workspaceId: string, + replace: ReplaceRequest, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.fsReplaceInFiles( + workspaceId, + replace, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['WorkspaceToolboxApi.fsReplaceInFiles']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) }, /** - * List providers - * @summary List providers + * Search for files inside a workspace + * @summary Search for files + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path + * @param {string} pattern Pattern * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listProviders: async ( - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/provider` - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, + async fsSearchFiles( + workspaceId: string, + path: string, + pattern: string, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.fsSearchFiles( + workspaceId, + path, + pattern, + options, ) - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['WorkspaceToolboxApi.fsSearchFiles']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) }, /** - * Uninstall a provider - * @summary Uninstall a provider - * @param {string} provider Provider to uninstall + * Set file owner/group/permissions inside a workspace + * @summary Set file owner/group/permissions + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path + * @param {string} [owner] Owner + * @param {string} [group] Group + * @param {string} [mode] Mode * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uninstallProvider: async ( - provider: string, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'provider' is not null or undefined - assertParamExists('uninstallProvider', 'provider', provider) - const localVarPath = `/provider/{provider}/uninstall`.replace( - `{${'provider'}}`, - encodeURIComponent(String(provider)), - ) - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + async fsSetFilePermissions( + workspaceId: string, + path: string, + owner?: string, + group?: string, + mode?: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.fsSetFilePermissions( + workspaceId, + path, + owner, + group, + mode, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['WorkspaceToolboxApi.fsSetFilePermissions']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) }, - } -} - -/** - * ProviderApi - functional programming interface - * @export - */ -export const ProviderApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = ProviderApiAxiosParamCreator(configuration) - return { /** - * Get provider target manifest - * @summary Get provider target manifest - * @param {string} provider Provider name + * Upload file inside a workspace + * @summary Upload file + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path + * @param {File} file File * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getTargetManifest( - provider: string, + async fsUploadFile( + workspaceId: string, + path: string, + file: File, options?: RawAxiosRequestConfig, ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise<{ [key: string]: ProviderProviderTargetProperty }> + (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.getTargetManifest(provider, options) + const localVarAxiosArgs = await localVarAxiosParamCreator.fsUploadFile( + workspaceId, + path, + file, + options, + ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['ProviderApi.getTargetManifest']?.[ + operationServerMap['WorkspaceToolboxApi.fsUploadFile']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -7365,25 +16801,32 @@ export const ProviderApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath) }, /** - * Install a provider - * @summary Install a provider - * @param {InstallProviderRequest} provider Provider to install + * Get logs of a command inside a session inside workspace project Connect with websocket to get a stream of the logs + * @summary Get session command logs + * @param {string} workspaceId Workspace ID or Name + * @param {string} sessionId Session ID + * @param {string} commandId Command ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async installProvider( - provider: InstallProviderRequest, + async getSessionCommandLogs( + workspaceId: string, + sessionId: string, + commandId: string, options?: RawAxiosRequestConfig, ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise + (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { - const localVarAxiosArgs = await localVarAxiosParamCreator.installProvider( - provider, - options, - ) + const localVarAxiosArgs = + await localVarAxiosParamCreator.getSessionCommandLogs( + workspaceId, + sessionId, + commandId, + options, + ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['ProviderApi.installProvider']?.[ + operationServerMap['WorkspaceToolboxApi.getSessionCommandLogs']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -7395,25 +16838,28 @@ export const ProviderApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath) }, /** - * List providers - * @summary List providers + * Get workspace directory + * @summary Get workspace dir + * @param {string} workspaceId Workspace ID or Name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listProviders( + async getWorkspaceDir( + workspaceId: string, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, - ) => AxiosPromise> + ) => AxiosPromise > { - const localVarAxiosArgs = await localVarAxiosParamCreator.listProviders( + const localVarAxiosArgs = await localVarAxiosParamCreator.getWorkspaceDir( + workspaceId, options, ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['ProviderApi.listProviders']?.[ + operationServerMap['WorkspaceToolboxApi.getWorkspaceDir']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -7425,23 +16871,28 @@ export const ProviderApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath) }, /** - * Uninstall a provider - * @summary Uninstall a provider - * @param {string} provider Provider to uninstall + * Add files to git commit + * @summary Add files + * @param {string} workspaceId Workspace ID or Name + * @param {GitAddRequest} params GitAddRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uninstallProvider( - provider: string, + async gitAddFiles( + workspaceId: string, + params: GitAddRequest, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.uninstallProvider(provider, options) + const localVarAxiosArgs = await localVarAxiosParamCreator.gitAddFiles( + workspaceId, + params, + options, + ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['ProviderApi.uninstallProvider']?.[ + operationServerMap['WorkspaceToolboxApi.gitAddFiles']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -7452,228 +16903,140 @@ export const ProviderApiFp = function (configuration?: Configuration) { configuration, )(axios, localVarOperationServerBasePath || basePath) }, - } -} - -/** - * ProviderApi - factory interface - * @export - */ -export const ProviderApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = ProviderApiFp(configuration) - return { - /** - * Get provider target manifest - * @summary Get provider target manifest - * @param {string} provider Provider name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTargetManifest( - provider: string, - options?: RawAxiosRequestConfig, - ): AxiosPromise<{ [key: string]: ProviderProviderTargetProperty }> { - return localVarFp - .getTargetManifest(provider, options) - .then((request) => request(axios, basePath)) - }, /** - * Install a provider - * @summary Install a provider - * @param {InstallProviderRequest} provider Provider to install + * Get branch list from git repository inside a workspace + * @summary Get branch list + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path to git repository * @param {*} [options] Override http request option. * @throws {RequiredError} */ - installProvider( - provider: InstallProviderRequest, + async gitBranchList( + workspaceId: string, + path: string, options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .installProvider(provider, options) - .then((request) => request(axios, basePath)) + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.gitBranchList( + workspaceId, + path, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['WorkspaceToolboxApi.gitBranchList']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) }, /** - * List providers - * @summary List providers + * Clone git repository inside a workspace + * @summary Clone git repository + * @param {string} workspaceId Workspace ID or Name + * @param {GitCloneRequest} params GitCloneRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listProviders( + async gitCloneRepository( + workspaceId: string, + params: GitCloneRequest, options?: RawAxiosRequestConfig, - ): AxiosPromise> { - return localVarFp - .listProviders(options) - .then((request) => request(axios, basePath)) + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.gitCloneRepository( + workspaceId, + params, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['WorkspaceToolboxApi.gitCloneRepository']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) }, /** - * Uninstall a provider - * @summary Uninstall a provider - * @param {string} provider Provider to uninstall + * Commit changes to git repository inside a workspace + * @summary Commit changes + * @param {string} workspaceId Workspace ID or Name + * @param {GitCommitRequest} params GitCommitRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uninstallProvider( - provider: string, + async gitCommitChanges( + workspaceId: string, + params: GitCommitRequest, options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .uninstallProvider(provider, options) - .then((request) => request(axios, basePath)) - }, - } -} - -/** - * ProviderApi - object-oriented interface - * @export - * @class ProviderApi - * @extends {BaseAPI} - */ -export class ProviderApi extends BaseAPI { - /** - * Get provider target manifest - * @summary Get provider target manifest - * @param {string} provider Provider name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProviderApi - */ - public getTargetManifest(provider: string, options?: RawAxiosRequestConfig) { - return ProviderApiFp(this.configuration) - .getTargetManifest(provider, options) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Install a provider - * @summary Install a provider - * @param {InstallProviderRequest} provider Provider to install - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProviderApi - */ - public installProvider( - provider: InstallProviderRequest, - options?: RawAxiosRequestConfig, - ) { - return ProviderApiFp(this.configuration) - .installProvider(provider, options) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * List providers - * @summary List providers - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProviderApi - */ - public listProviders(options?: RawAxiosRequestConfig) { - return ProviderApiFp(this.configuration) - .listProviders(options) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Uninstall a provider - * @summary Uninstall a provider - * @param {string} provider Provider to uninstall - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProviderApi - */ - public uninstallProvider(provider: string, options?: RawAxiosRequestConfig) { - return ProviderApiFp(this.configuration) - .uninstallProvider(provider, options) - .then((request) => request(this.axios, this.basePath)) - } -} - -/** - * SampleApi - axios parameter creator - * @export - */ -export const SampleApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * List samples - * @summary List samples - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listSamples: async ( - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/sample` - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - } -} - -/** - * SampleApi - functional programming interface - * @export - */ -export const SampleApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = SampleApiAxiosParamCreator(configuration) - return { + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.gitCommitChanges( + workspaceId, + params, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['WorkspaceToolboxApi.gitCommitChanges']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, /** - * List samples - * @summary List samples + * Get commit history from git repository inside a workspace + * @summary Get commit history + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path to git repository * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listSamples( + async gitCommitHistory( + workspaceId: string, + path: string, options?: RawAxiosRequestConfig, ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise> + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> > { - const localVarAxiosArgs = await localVarAxiosParamCreator.listSamples( - options, - ) + const localVarAxiosArgs = + await localVarAxiosParamCreator.gitCommitHistory( + workspaceId, + path, + options, + ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['SampleApi.listSamples']?.[ + operationServerMap['WorkspaceToolboxApi.gitCommitHistory']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -7684,238 +17047,95 @@ export const SampleApiFp = function (configuration?: Configuration) { configuration, )(axios, localVarOperationServerBasePath || basePath) }, - } -} - -/** - * SampleApi - factory interface - * @export - */ -export const SampleApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = SampleApiFp(configuration) - return { - /** - * List samples - * @summary List samples - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listSamples(options?: RawAxiosRequestConfig): AxiosPromise> { - return localVarFp - .listSamples(options) - .then((request) => request(axios, basePath)) - }, - } -} - -/** - * SampleApi - object-oriented interface - * @export - * @class SampleApi - * @extends {BaseAPI} - */ -export class SampleApi extends BaseAPI { - /** - * List samples - * @summary List samples - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SampleApi - */ - public listSamples(options?: RawAxiosRequestConfig) { - return SampleApiFp(this.configuration) - .listSamples(options) - .then((request) => request(this.axios, this.basePath)) - } -} - -/** - * ServerApi - axios parameter creator - * @export - */ -export const ServerApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * Generate a new authentication key - * @summary Generate a new authentication key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - generateNetworkKey: async ( - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/server/network-key` - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, /** - * Get the server configuration - * @summary Get the server configuration + * Create branch on git repository inside a workspace + * @summary Create branch + * @param {string} workspaceId Workspace ID or Name + * @param {GitBranchRequest} params GitBranchRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getConfig: async ( - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/server/config` - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, + async gitCreateBranch( + workspaceId: string, + params: GitBranchRequest, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.gitCreateBranch( + workspaceId, + params, + options, ) - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['WorkspaceToolboxApi.gitCreateBranch']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) }, /** - * Set the server configuration - * @summary Set the server configuration - * @param {ServerConfig} config Server configuration + * Get status from git repository inside a workspace + * @summary Get git status + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path to git repository * @param {*} [options] Override http request option. * @throws {RequiredError} */ - setConfig: async ( - config: ServerConfig, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'config' is not null or undefined - assertParamExists('setConfig', 'config', config) - const localVarPath = `/server/config` - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - localVarHeaderParameter['Content-Type'] = 'application/json' - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - localVarRequestOptions.data = serializeDataIfNeeded( - config, - localVarRequestOptions, - configuration, + async gitGitStatus( + workspaceId: string, + path: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.gitGitStatus( + workspaceId, + path, + options, ) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['WorkspaceToolboxApi.gitGitStatus']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) }, - } -} - -/** - * ServerApi - functional programming interface - * @export - */ -export const ServerApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = ServerApiAxiosParamCreator(configuration) - return { /** - * Generate a new authentication key - * @summary Generate a new authentication key + * Pull changes from remote to git repository inside a workspace + * @summary Pull changes + * @param {string} workspaceId Workspace ID or Name + * @param {GitRepoRequest} params Git pull request * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async generateNetworkKey( + async gitPullChanges( + workspaceId: string, + params: GitRepoRequest, options?: RawAxiosRequestConfig, ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise + (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { - const localVarAxiosArgs = - await localVarAxiosParamCreator.generateNetworkKey(options) + const localVarAxiosArgs = await localVarAxiosParamCreator.gitPullChanges( + workspaceId, + params, + options, + ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['ServerApi.generateNetworkKey']?.[ + operationServerMap['WorkspaceToolboxApi.gitPullChanges']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -7927,22 +17147,28 @@ export const ServerApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath) }, /** - * Get the server configuration - * @summary Get the server configuration + * Push changes to remote from git repository inside a workspace + * @summary Push changes + * @param {string} workspaceId Workspace ID or Name + * @param {GitRepoRequest} params Git push request * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getConfig( + async gitPushChanges( + workspaceId: string, + params: GitRepoRequest, options?: RawAxiosRequestConfig, ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise + (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { - const localVarAxiosArgs = await localVarAxiosParamCreator.getConfig( + const localVarAxiosArgs = await localVarAxiosParamCreator.gitPushChanges( + workspaceId, + params, options, ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['ServerApi.getConfig']?.[ + operationServerMap['WorkspaceToolboxApi.gitPushChanges']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -7954,25 +17180,25 @@ export const ServerApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath) }, /** - * Set the server configuration - * @summary Set the server configuration - * @param {ServerConfig} config Server configuration + * List sessions inside workspace project + * @summary List sessions + * @param {string} workspaceId Workspace ID or Name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async setConfig( - config: ServerConfig, + async listSessions( + workspaceId: string, options?: RawAxiosRequestConfig, ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise + (axios?: AxiosInstance, basePath?: string) => AxiosPromise> > { - const localVarAxiosArgs = await localVarAxiosParamCreator.setConfig( - config, + const localVarAxiosArgs = await localVarAxiosParamCreator.listSessions( + workspaceId, options, ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['ServerApi.setConfig']?.[ + operationServerMap['WorkspaceToolboxApi.listSessions']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -7983,357 +17209,171 @@ export const ServerApiFp = function (configuration?: Configuration) { configuration, )(axios, localVarOperationServerBasePath || basePath) }, - } -} - -/** - * ServerApi - factory interface - * @export - */ -export const ServerApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = ServerApiFp(configuration) - return { - /** - * Generate a new authentication key - * @summary Generate a new authentication key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - generateNetworkKey( - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .generateNetworkKey(options) - .then((request) => request(axios, basePath)) - }, /** - * Get the server configuration - * @summary Get the server configuration - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getConfig(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp - .getConfig(options) - .then((request) => request(axios, basePath)) - }, - /** - * Set the server configuration - * @summary Set the server configuration - * @param {ServerConfig} config Server configuration + * The Completion request is sent from the client to the server to compute completion items at a given cursor position. + * @summary Get Lsp Completions + * @param {string} workspaceId Workspace ID or Name + * @param {LspCompletionParams} params LspCompletionParams * @param {*} [options] Override http request option. * @throws {RequiredError} */ - setConfig( - config: ServerConfig, + async lspCompletions( + workspaceId: string, + params: LspCompletionParams, options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .setConfig(config, options) - .then((request) => request(axios, basePath)) - }, - } -} - -/** - * ServerApi - object-oriented interface - * @export - * @class ServerApi - * @extends {BaseAPI} - */ -export class ServerApi extends BaseAPI { - /** - * Generate a new authentication key - * @summary Generate a new authentication key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ServerApi - */ - public generateNetworkKey(options?: RawAxiosRequestConfig) { - return ServerApiFp(this.configuration) - .generateNetworkKey(options) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Get the server configuration - * @summary Get the server configuration - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ServerApi - */ - public getConfig(options?: RawAxiosRequestConfig) { - return ServerApiFp(this.configuration) - .getConfig(options) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Set the server configuration - * @summary Set the server configuration - * @param {ServerConfig} config Server configuration - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ServerApi - */ - public setConfig(config: ServerConfig, options?: RawAxiosRequestConfig) { - return ServerApiFp(this.configuration) - .setConfig(config, options) - .then((request) => request(this.axios, this.basePath)) - } -} - -/** - * TargetApi - axios parameter creator - * @export - */ -export const TargetApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { - /** - * List targets - * @summary List targets - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listTargets: async ( - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/target` - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - /** - * Remove a target - * @summary Remove a target - * @param {string} target Target name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - removeTarget: async ( - target: string, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'target' is not null or undefined - assertParamExists('removeTarget', 'target', target) - const localVarPath = `/target/{target}`.replace( - `{${'target'}}`, - encodeURIComponent(String(target)), - ) - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } - }, - /** - * Set target to default - * @summary Set target to default - * @param {string} target Target name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - setDefaultTarget: async ( - target: string, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'target' is not null or undefined - assertParamExists('setDefaultTarget', 'target', target) - const localVarPath = `/target/{target}/set-default`.replace( - `{${'target'}}`, - encodeURIComponent(String(target)), - ) - // 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: 'PATCH', - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - - // authentication Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.lspCompletions( + workspaceId, + params, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['WorkspaceToolboxApi.lspCompletions']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) }, /** - * Set a target - * @summary Set a target - * @param {CreateProviderTargetDTO} target Target to set + * The document close notification is sent from the client to the server when the document got closed in the client. + * @summary Call Lsp DidClose + * @param {string} workspaceId Workspace ID or Name + * @param {LspDocumentRequest} params LspDocumentRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - setTarget: async ( - target: CreateProviderTargetDTO, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'target' is not null or undefined - assertParamExists('setTarget', 'target', target) - const localVarPath = `/target` - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) - let baseOptions - if (configuration) { - baseOptions = configuration.baseOptions - } - - const localVarRequestOptions = { - method: 'PUT', - ...baseOptions, - ...options, - } - const localVarHeaderParameter = {} as any - const localVarQueryParameter = {} as any - - // authentication Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, + async lspDidClose( + workspaceId: string, + params: LspDocumentRequest, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.lspDidClose( + workspaceId, + params, + options, ) - - localVarHeaderParameter['Content-Type'] = 'application/json' - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - localVarRequestOptions.data = serializeDataIfNeeded( - target, - localVarRequestOptions, - configuration, + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['WorkspaceToolboxApi.lspDidClose']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * The document open notification is sent from the client to the server to signal newly opened text documents. + * @summary Call Lsp DidOpen + * @param {string} workspaceId Workspace ID or Name + * @param {LspDocumentRequest} params LspDocumentRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async lspDidOpen( + workspaceId: string, + params: LspDocumentRequest, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.lspDidOpen( + workspaceId, + params, + options, ) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['WorkspaceToolboxApi.lspDidOpen']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) }, - } -} - -/** - * TargetApi - functional programming interface - * @export - */ -export const TargetApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = TargetApiAxiosParamCreator(configuration) - return { /** - * List targets - * @summary List targets + * The document symbol request is sent from the client to the server. + * @summary Call Lsp DocumentSymbols + * @param {string} workspaceId Workspace ID or Name + * @param {string} languageId Language ID + * @param {string} pathToProject Path to project + * @param {string} uri Document Uri * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listTargets( + async lspDocumentSymbols( + workspaceId: string, + languageId: string, + pathToProject: string, + uri: string, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, - ) => AxiosPromise> + ) => AxiosPromise> > { - const localVarAxiosArgs = await localVarAxiosParamCreator.listTargets( + const localVarAxiosArgs = + await localVarAxiosParamCreator.lspDocumentSymbols( + workspaceId, + languageId, + pathToProject, + uri, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['WorkspaceToolboxApi.lspDocumentSymbols']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Start Lsp server process inside a workspace + * @summary Start Lsp server + * @param {string} workspaceId Workspace ID or Name + * @param {LspServerRequest} params LspServerRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async lspStart( + workspaceId: string, + params: LspServerRequest, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.lspStart( + workspaceId, + params, options, ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['TargetApi.listTargets']?.[ + operationServerMap['WorkspaceToolboxApi.lspStart']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -8345,25 +17385,28 @@ export const TargetApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath) }, /** - * Remove a target - * @summary Remove a target - * @param {string} target Target name + * Stop Lsp server process inside a workspace + * @summary Stop Lsp server + * @param {string} workspaceId Workspace ID or Name + * @param {LspServerRequest} params LspServerRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async removeTarget( - target: string, + async lspStop( + workspaceId: string, + params: LspServerRequest, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { - const localVarAxiosArgs = await localVarAxiosParamCreator.removeTarget( - target, + const localVarAxiosArgs = await localVarAxiosParamCreator.lspStop( + workspaceId, + params, options, ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['TargetApi.removeTarget']?.[ + operationServerMap['WorkspaceToolboxApi.lspStop']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -8375,23 +17418,38 @@ export const TargetApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath) }, /** - * Set target to default - * @summary Set target to default - * @param {string} target Target name + * The workspace symbol request is sent from the client to the server to list project-wide symbols matching the query string. + * @summary Call Lsp WorkspaceSymbols + * @param {string} workspaceId Workspace ID or Name + * @param {string} languageId Language ID + * @param {string} pathToProject Path to project + * @param {string} query Symbol Query * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async setDefaultTarget( - target: string, + async lspWorkspaceSymbols( + workspaceId: string, + languageId: string, + pathToProject: string, + query: string, options?: RawAxiosRequestConfig, ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> > { const localVarAxiosArgs = - await localVarAxiosParamCreator.setDefaultTarget(target, options) + await localVarAxiosParamCreator.lspWorkspaceSymbols( + workspaceId, + languageId, + pathToProject, + query, + options, + ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['TargetApi.setDefaultTarget']?.[ + operationServerMap['WorkspaceToolboxApi.lspWorkspaceSymbols']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -8403,25 +17461,72 @@ export const TargetApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath) }, /** - * Set a target - * @summary Set a target - * @param {CreateProviderTargetDTO} target Target to set + * Execute command synchronously inside a workspace + * @summary Execute command + * @param {string} workspaceId Workspace ID or Name + * @param {ExecuteRequest} params Execute command request * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async setTarget( - target: CreateProviderTargetDTO, + async processExecuteCommand( + workspaceId: string, + params: ExecuteRequest, options?: RawAxiosRequestConfig, ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise > { - const localVarAxiosArgs = await localVarAxiosParamCreator.setTarget( - target, - options, - ) + const localVarAxiosArgs = + await localVarAxiosParamCreator.processExecuteCommand( + workspaceId, + params, + options, + ) + const localVarOperationServerIndex = configuration?.serverIndex ?? 0 + const localVarOperationServerBasePath = + operationServerMap['WorkspaceToolboxApi.processExecuteCommand']?.[ + localVarOperationServerIndex + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath) + }, + /** + * Execute command inside a session inside workspace project + * @summary Execute command in session + * @param {string} workspaceId Workspace ID or Name + * @param {string} sessionId Session ID + * @param {SessionExecuteRequest} params Execute command request + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async sessionExecuteCommand( + workspaceId: string, + sessionId: string, + params: SessionExecuteRequest, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.sessionExecuteCommand( + workspaceId, + sessionId, + params, + options, + ) const localVarOperationServerIndex = configuration?.serverIndex ?? 0 const localVarOperationServerBasePath = - operationServerMap['TargetApi.setTarget']?.[ + operationServerMap['WorkspaceToolboxApi.sessionExecuteCommand']?.[ localVarOperationServerIndex ]?.url return (axios, basePath) => @@ -8432,1292 +17537,1311 @@ export const TargetApiFp = function (configuration?: Configuration) { configuration, )(axios, localVarOperationServerBasePath || basePath) }, - } -} - -/** - * TargetApi - factory interface - * @export - */ -export const TargetApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = TargetApiFp(configuration) - return { + } +} + +/** + * WorkspaceToolboxApi - factory interface + * @export + */ +export const WorkspaceToolboxApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = WorkspaceToolboxApiFp(configuration) + return { + /** + * Create exec session inside workspace project + * @summary Create exec session + * @param {string} workspaceId Workspace ID or Name + * @param {CreateSessionRequest} params Create session request + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSession( + workspaceId: string, + params: CreateSessionRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .createSession(workspaceId, params, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete a session inside workspace project + * @summary Delete session + * @param {string} workspaceId Workspace ID or Name + * @param {string} sessionId Session ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteSession( + workspaceId: string, + sessionId: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .deleteSession(workspaceId, sessionId, options) + .then((request) => request(axios, basePath)) + }, + /** + * Create folder inside a workspace + * @summary Create folder + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path + * @param {string} mode Mode + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fsCreateFolder( + workspaceId: string, + path: string, + mode: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .fsCreateFolder(workspaceId, path, mode, options) + .then((request) => request(axios, basePath)) + }, + /** + * Delete file inside a workspace + * @summary Delete file + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fsDeleteFile( + workspaceId: string, + path: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .fsDeleteFile(workspaceId, path, options) + .then((request) => request(axios, basePath)) + }, + /** + * Download file from a workspace + * @summary Download file + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fsDownloadFile( + workspaceId: string, + path: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .fsDownloadFile(workspaceId, path, options) + .then((request) => request(axios, basePath)) + }, /** - * List targets - * @summary List targets + * Search for text/pattern inside a workspace files + * @summary Search for text/pattern in files + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path + * @param {string} pattern Pattern * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTargets( + fsFindInFiles( + workspaceId: string, + path: string, + pattern: string, options?: RawAxiosRequestConfig, - ): AxiosPromise> { + ): AxiosPromise> { return localVarFp - .listTargets(options) + .fsFindInFiles(workspaceId, path, pattern, options) .then((request) => request(axios, basePath)) }, /** - * Remove a target - * @summary Remove a target - * @param {string} target Target name + * Get file info inside a workspace + * @summary Get file info + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path * @param {*} [options] Override http request option. * @throws {RequiredError} */ - removeTarget( - target: string, + fsGetFileDetails( + workspaceId: string, + path: string, options?: RawAxiosRequestConfig, - ): AxiosPromise { + ): AxiosPromise { return localVarFp - .removeTarget(target, options) + .fsGetFileDetails(workspaceId, path, options) .then((request) => request(axios, basePath)) }, /** - * Set target to default - * @summary Set target to default - * @param {string} target Target name + * List files inside a workspace + * @summary List files + * @param {string} workspaceId Workspace ID or Name + * @param {string} [path] Path * @param {*} [options] Override http request option. * @throws {RequiredError} */ - setDefaultTarget( - target: string, + fsListFiles( + workspaceId: string, + path?: string, options?: RawAxiosRequestConfig, - ): AxiosPromise { + ): AxiosPromise> { return localVarFp - .setDefaultTarget(target, options) + .fsListFiles(workspaceId, path, options) .then((request) => request(axios, basePath)) }, /** - * Set a target - * @summary Set a target - * @param {CreateProviderTargetDTO} target Target to set + * Create folder inside a workspace + * @summary Create folder + * @param {string} workspaceId Workspace ID or Name + * @param {string} source Source path + * @param {string} destination Destination path * @param {*} [options] Override http request option. * @throws {RequiredError} */ - setTarget( - target: CreateProviderTargetDTO, + fsMoveFile( + workspaceId: string, + source: string, + destination: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp - .setTarget(target, options) + .fsMoveFile(workspaceId, source, destination, options) .then((request) => request(axios, basePath)) }, - } -} - -/** - * TargetApi - object-oriented interface - * @export - * @class TargetApi - * @extends {BaseAPI} - */ -export class TargetApi extends BaseAPI { - /** - * List targets - * @summary List targets - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TargetApi - */ - public listTargets(options?: RawAxiosRequestConfig) { - return TargetApiFp(this.configuration) - .listTargets(options) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Remove a target - * @summary Remove a target - * @param {string} target Target name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TargetApi - */ - public removeTarget(target: string, options?: RawAxiosRequestConfig) { - return TargetApiFp(this.configuration) - .removeTarget(target, options) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Set target to default - * @summary Set target to default - * @param {string} target Target name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TargetApi - */ - public setDefaultTarget(target: string, options?: RawAxiosRequestConfig) { - return TargetApiFp(this.configuration) - .setDefaultTarget(target, options) - .then((request) => request(this.axios, this.basePath)) - } - - /** - * Set a target - * @summary Set a target - * @param {CreateProviderTargetDTO} target Target to set - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof TargetApi - */ - public setTarget( - target: CreateProviderTargetDTO, - options?: RawAxiosRequestConfig, - ) { - return TargetApiFp(this.configuration) - .setTarget(target, options) - .then((request) => request(this.axios, this.basePath)) - } -} - -/** - * WorkspaceApi - axios parameter creator - * @export - */ -export const WorkspaceApiAxiosParamCreator = function ( - configuration?: Configuration, -) { - return { /** - * Create a workspace - * @summary Create a workspace - * @param {CreateWorkspaceDTO} workspace Create workspace + * Repleace text/pattern in mutilple files inside a workspace + * @summary Repleace text/pattern in files + * @param {string} workspaceId Workspace ID or Name + * @param {ReplaceRequest} replace ReplaceParams * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createWorkspace: async ( - workspace: CreateWorkspaceDTO, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'workspace' is not null or undefined - assertParamExists('createWorkspace', 'workspace', workspace) - const localVarPath = `/workspace` - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - localVarHeaderParameter['Content-Type'] = 'application/json' - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - localVarRequestOptions.data = serializeDataIfNeeded( - workspace, - localVarRequestOptions, - configuration, - ) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + fsReplaceInFiles( + workspaceId: string, + replace: ReplaceRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .fsReplaceInFiles(workspaceId, replace, options) + .then((request) => request(axios, basePath)) }, /** - * Get workspace info - * @summary Get workspace info + * Search for files inside a workspace + * @summary Search for files * @param {string} workspaceId Workspace ID or Name - * @param {boolean} [verbose] Verbose + * @param {string} path Path + * @param {string} pattern Pattern * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getWorkspace: async ( + fsSearchFiles( workspaceId: string, - verbose?: boolean, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'workspaceId' is not null or undefined - assertParamExists('getWorkspace', 'workspaceId', workspaceId) - const localVarPath = `/workspace/{workspaceId}`.replace( - `{${'workspaceId'}}`, - encodeURIComponent(String(workspaceId)), - ) - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - if (verbose !== undefined) { - localVarQueryParameter['verbose'] = verbose - } - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + path: string, + pattern: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .fsSearchFiles(workspaceId, path, pattern, options) + .then((request) => request(axios, basePath)) }, /** - * List workspaces - * @summary List workspaces - * @param {boolean} [verbose] Verbose + * Set file owner/group/permissions inside a workspace + * @summary Set file owner/group/permissions + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path + * @param {string} [owner] Owner + * @param {string} [group] Group + * @param {string} [mode] Mode * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listWorkspaces: async ( - verbose?: boolean, - options: RawAxiosRequestConfig = {}, - ): Promise => { - const localVarPath = `/workspace` - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - if (verbose !== undefined) { - localVarQueryParameter['verbose'] = verbose - } - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + fsSetFilePermissions( + workspaceId: string, + path: string, + owner?: string, + group?: string, + mode?: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .fsSetFilePermissions(workspaceId, path, owner, group, mode, options) + .then((request) => request(axios, basePath)) + }, + /** + * Upload file inside a workspace + * @summary Upload file + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path + * @param {File} file File + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + fsUploadFile( + workspaceId: string, + path: string, + file: File, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .fsUploadFile(workspaceId, path, file, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get logs of a command inside a session inside workspace project Connect with websocket to get a stream of the logs + * @summary Get session command logs + * @param {string} workspaceId Workspace ID or Name + * @param {string} sessionId Session ID + * @param {string} commandId Command ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSessionCommandLogs( + workspaceId: string, + sessionId: string, + commandId: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getSessionCommandLogs(workspaceId, sessionId, commandId, options) + .then((request) => request(axios, basePath)) }, /** - * Remove workspace - * @summary Remove workspace - * @param {string} workspaceId Workspace ID - * @param {boolean} [force] Force + * Get workspace directory + * @summary Get workspace dir + * @param {string} workspaceId Workspace ID or Name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - removeWorkspace: async ( + getWorkspaceDir( workspaceId: string, - force?: boolean, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'workspaceId' is not null or undefined - assertParamExists('removeWorkspace', 'workspaceId', workspaceId) - const localVarPath = `/workspace/{workspaceId}`.replace( - `{${'workspaceId'}}`, - encodeURIComponent(String(workspaceId)), - ) - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - if (force !== undefined) { - localVarQueryParameter['force'] = force - } - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getWorkspaceDir(workspaceId, options) + .then((request) => request(axios, basePath)) }, /** - * Set project state - * @summary Set project state + * Add files to git commit + * @summary Add files * @param {string} workspaceId Workspace ID or Name - * @param {string} projectId Project ID - * @param {SetProjectState} setState Set State + * @param {GitAddRequest} params GitAddRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - setProjectState: async ( + gitAddFiles( workspaceId: string, - projectId: string, - setState: SetProjectState, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'workspaceId' is not null or undefined - assertParamExists('setProjectState', 'workspaceId', workspaceId) - // verify required parameter 'projectId' is not null or undefined - assertParamExists('setProjectState', 'projectId', projectId) - // verify required parameter 'setState' is not null or undefined - assertParamExists('setProjectState', 'setState', setState) - const localVarPath = `/workspace/{workspaceId}/{projectId}/state` - .replace(`{${'workspaceId'}}`, encodeURIComponent(String(workspaceId))) - .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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - localVarHeaderParameter['Content-Type'] = 'application/json' - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - localVarRequestOptions.data = serializeDataIfNeeded( - setState, - localVarRequestOptions, - configuration, - ) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + params: GitAddRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .gitAddFiles(workspaceId, params, options) + .then((request) => request(axios, basePath)) }, /** - * Start project - * @summary Start project + * Get branch list from git repository inside a workspace + * @summary Get branch list * @param {string} workspaceId Workspace ID or Name - * @param {string} projectId Project ID + * @param {string} path Path to git repository * @param {*} [options] Override http request option. * @throws {RequiredError} */ - startProject: async ( + gitBranchList( workspaceId: string, - projectId: string, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'workspaceId' is not null or undefined - assertParamExists('startProject', 'workspaceId', workspaceId) - // verify required parameter 'projectId' is not null or undefined - assertParamExists('startProject', 'projectId', projectId) - const localVarPath = `/workspace/{workspaceId}/{projectId}/start` - .replace(`{${'workspaceId'}}`, encodeURIComponent(String(workspaceId))) - .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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + path: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .gitBranchList(workspaceId, path, options) + .then((request) => request(axios, basePath)) }, /** - * Start workspace - * @summary Start workspace + * Clone git repository inside a workspace + * @summary Clone git repository * @param {string} workspaceId Workspace ID or Name + * @param {GitCloneRequest} params GitCloneRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - startWorkspace: async ( + gitCloneRepository( workspaceId: string, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'workspaceId' is not null or undefined - assertParamExists('startWorkspace', 'workspaceId', workspaceId) - const localVarPath = `/workspace/{workspaceId}/start`.replace( - `{${'workspaceId'}}`, - encodeURIComponent(String(workspaceId)), - ) - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + params: GitCloneRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .gitCloneRepository(workspaceId, params, options) + .then((request) => request(axios, basePath)) }, /** - * Stop project - * @summary Stop project + * Commit changes to git repository inside a workspace + * @summary Commit changes * @param {string} workspaceId Workspace ID or Name - * @param {string} projectId Project ID + * @param {GitCommitRequest} params GitCommitRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - stopProject: async ( + gitCommitChanges( workspaceId: string, - projectId: string, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'workspaceId' is not null or undefined - assertParamExists('stopProject', 'workspaceId', workspaceId) - // verify required parameter 'projectId' is not null or undefined - assertParamExists('stopProject', 'projectId', projectId) - const localVarPath = `/workspace/{workspaceId}/{projectId}/stop` - .replace(`{${'workspaceId'}}`, encodeURIComponent(String(workspaceId))) - .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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + params: GitCommitRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .gitCommitChanges(workspaceId, params, options) + .then((request) => request(axios, basePath)) + }, + /** + * Get commit history from git repository inside a workspace + * @summary Get commit history + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path to git repository + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + gitCommitHistory( + workspaceId: string, + path: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .gitCommitHistory(workspaceId, path, options) + .then((request) => request(axios, basePath)) + }, + /** + * Create branch on git repository inside a workspace + * @summary Create branch + * @param {string} workspaceId Workspace ID or Name + * @param {GitBranchRequest} params GitBranchRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + gitCreateBranch( + workspaceId: string, + params: GitBranchRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .gitCreateBranch(workspaceId, params, options) + .then((request) => request(axios, basePath)) }, /** - * Stop workspace - * @summary Stop workspace + * Get status from git repository inside a workspace + * @summary Get git status * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path to git repository * @param {*} [options] Override http request option. * @throws {RequiredError} */ - stopWorkspace: async ( + gitGitStatus( workspaceId: string, - options: RawAxiosRequestConfig = {}, - ): Promise => { - // verify required parameter 'workspaceId' is not null or undefined - assertParamExists('stopWorkspace', 'workspaceId', workspaceId) - const localVarPath = `/workspace/{workspaceId}/stop`.replace( - `{${'workspaceId'}}`, - encodeURIComponent(String(workspaceId)), - ) - // 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 Bearer required - await setApiKeyToObject( - localVarHeaderParameter, - 'Authorization', - configuration, - ) - - setSearchParams(localVarUrlObj, localVarQueryParameter) - let headersFromBaseOptions = - baseOptions && baseOptions.headers ? baseOptions.headers : {} - localVarRequestOptions.headers = { - ...localVarHeaderParameter, - ...headersFromBaseOptions, - ...options.headers, - } - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - } + path: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .gitGitStatus(workspaceId, path, options) + .then((request) => request(axios, basePath)) }, - } -} - -/** - * WorkspaceApi - functional programming interface - * @export - */ -export const WorkspaceApiFp = function (configuration?: Configuration) { - const localVarAxiosParamCreator = WorkspaceApiAxiosParamCreator(configuration) - return { /** - * Create a workspace - * @summary Create a workspace - * @param {CreateWorkspaceDTO} workspace Create workspace + * Pull changes from remote to git repository inside a workspace + * @summary Pull changes + * @param {string} workspaceId Workspace ID or Name + * @param {GitRepoRequest} params Git pull request * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createWorkspace( - workspace: CreateWorkspaceDTO, + gitPullChanges( + workspaceId: string, + params: GitRepoRequest, options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.createWorkspace( - workspace, - options, - ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['WorkspaceApi.createWorkspace']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) + ): AxiosPromise { + return localVarFp + .gitPullChanges(workspaceId, params, options) + .then((request) => request(axios, basePath)) }, /** - * Get workspace info - * @summary Get workspace info + * Push changes to remote from git repository inside a workspace + * @summary Push changes * @param {string} workspaceId Workspace ID or Name - * @param {boolean} [verbose] Verbose + * @param {GitRepoRequest} params Git push request * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getWorkspace( + gitPushChanges( workspaceId: string, - verbose?: boolean, + params: GitRepoRequest, options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.getWorkspace( - workspaceId, - verbose, - options, - ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['WorkspaceApi.getWorkspace']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) + ): AxiosPromise { + return localVarFp + .gitPushChanges(workspaceId, params, options) + .then((request) => request(axios, basePath)) }, /** - * List workspaces - * @summary List workspaces - * @param {boolean} [verbose] Verbose + * List sessions inside workspace project + * @summary List sessions + * @param {string} workspaceId Workspace ID or Name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listWorkspaces( - verbose?: boolean, + listSessions( + workspaceId: string, options?: RawAxiosRequestConfig, - ): Promise< - ( - axios?: AxiosInstance, - basePath?: string, - ) => AxiosPromise> - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.listWorkspaces( - verbose, - options, - ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['WorkspaceApi.listWorkspaces']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) + ): AxiosPromise> { + return localVarFp + .listSessions(workspaceId, options) + .then((request) => request(axios, basePath)) }, /** - * Remove workspace - * @summary Remove workspace - * @param {string} workspaceId Workspace ID - * @param {boolean} [force] Force + * The Completion request is sent from the client to the server to compute completion items at a given cursor position. + * @summary Get Lsp Completions + * @param {string} workspaceId Workspace ID or Name + * @param {LspCompletionParams} params LspCompletionParams * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async removeWorkspace( + lspCompletions( workspaceId: string, - force?: boolean, + params: LspCompletionParams, options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.removeWorkspace( - workspaceId, - force, - options, - ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['WorkspaceApi.removeWorkspace']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) + ): AxiosPromise { + return localVarFp + .lspCompletions(workspaceId, params, options) + .then((request) => request(axios, basePath)) }, /** - * Set project state - * @summary Set project state + * The document close notification is sent from the client to the server when the document got closed in the client. + * @summary Call Lsp DidClose * @param {string} workspaceId Workspace ID or Name - * @param {string} projectId Project ID - * @param {SetProjectState} setState Set State + * @param {LspDocumentRequest} params LspDocumentRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async setProjectState( + lspDidClose( workspaceId: string, - projectId: string, - setState: SetProjectState, + params: LspDocumentRequest, options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.setProjectState( - workspaceId, - projectId, - setState, - options, - ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['WorkspaceApi.setProjectState']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) + ): AxiosPromise { + return localVarFp + .lspDidClose(workspaceId, params, options) + .then((request) => request(axios, basePath)) }, /** - * Start project - * @summary Start project + * The document open notification is sent from the client to the server to signal newly opened text documents. + * @summary Call Lsp DidOpen * @param {string} workspaceId Workspace ID or Name - * @param {string} projectId Project ID + * @param {LspDocumentRequest} params LspDocumentRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async startProject( + lspDidOpen( workspaceId: string, - projectId: string, + params: LspDocumentRequest, options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.startProject( - workspaceId, - projectId, - options, - ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['WorkspaceApi.startProject']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) + ): AxiosPromise { + return localVarFp + .lspDidOpen(workspaceId, params, options) + .then((request) => request(axios, basePath)) }, /** - * Start workspace - * @summary Start workspace + * The document symbol request is sent from the client to the server. + * @summary Call Lsp DocumentSymbols * @param {string} workspaceId Workspace ID or Name + * @param {string} languageId Language ID + * @param {string} pathToProject Path to project + * @param {string} uri Document Uri * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async startWorkspace( + lspDocumentSymbols( workspaceId: string, + languageId: string, + pathToProject: string, + uri: string, options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.startWorkspace( - workspaceId, - options, - ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['WorkspaceApi.startWorkspace']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) + ): AxiosPromise> { + return localVarFp + .lspDocumentSymbols( + workspaceId, + languageId, + pathToProject, + uri, + options, + ) + .then((request) => request(axios, basePath)) + }, + /** + * Start Lsp server process inside a workspace + * @summary Start Lsp server + * @param {string} workspaceId Workspace ID or Name + * @param {LspServerRequest} params LspServerRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + lspStart( + workspaceId: string, + params: LspServerRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .lspStart(workspaceId, params, options) + .then((request) => request(axios, basePath)) + }, + /** + * Stop Lsp server process inside a workspace + * @summary Stop Lsp server + * @param {string} workspaceId Workspace ID or Name + * @param {LspServerRequest} params LspServerRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + lspStop( + workspaceId: string, + params: LspServerRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .lspStop(workspaceId, params, options) + .then((request) => request(axios, basePath)) + }, + /** + * The workspace symbol request is sent from the client to the server to list project-wide symbols matching the query string. + * @summary Call Lsp WorkspaceSymbols + * @param {string} workspaceId Workspace ID or Name + * @param {string} languageId Language ID + * @param {string} pathToProject Path to project + * @param {string} query Symbol Query + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + lspWorkspaceSymbols( + workspaceId: string, + languageId: string, + pathToProject: string, + query: string, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .lspWorkspaceSymbols( + workspaceId, + languageId, + pathToProject, + query, + options, + ) + .then((request) => request(axios, basePath)) }, /** - * Stop project - * @summary Stop project + * Execute command synchronously inside a workspace + * @summary Execute command * @param {string} workspaceId Workspace ID or Name - * @param {string} projectId Project ID + * @param {ExecuteRequest} params Execute command request * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async stopProject( + processExecuteCommand( workspaceId: string, - projectId: string, + params: ExecuteRequest, options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.stopProject( - workspaceId, - projectId, - options, - ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['WorkspaceApi.stopProject']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) + ): AxiosPromise { + return localVarFp + .processExecuteCommand(workspaceId, params, options) + .then((request) => request(axios, basePath)) }, /** - * Stop workspace - * @summary Stop workspace + * Execute command inside a session inside workspace project + * @summary Execute command in session * @param {string} workspaceId Workspace ID or Name + * @param {string} sessionId Session ID + * @param {SessionExecuteRequest} params Execute command request * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async stopWorkspace( + sessionExecuteCommand( workspaceId: string, + sessionId: string, + params: SessionExecuteRequest, options?: RawAxiosRequestConfig, - ): Promise< - (axios?: AxiosInstance, basePath?: string) => AxiosPromise - > { - const localVarAxiosArgs = await localVarAxiosParamCreator.stopWorkspace( - workspaceId, - options, - ) - const localVarOperationServerIndex = configuration?.serverIndex ?? 0 - const localVarOperationServerBasePath = - operationServerMap['WorkspaceApi.stopWorkspace']?.[ - localVarOperationServerIndex - ]?.url - return (axios, basePath) => - createRequestFunction( - localVarAxiosArgs, - globalAxios, - BASE_PATH, - configuration, - )(axios, localVarOperationServerBasePath || basePath) + ): AxiosPromise { + return localVarFp + .sessionExecuteCommand(workspaceId, sessionId, params, options) + .then((request) => request(axios, basePath)) }, } -} +} + +/** + * WorkspaceToolboxApi - object-oriented interface + * @export + * @class WorkspaceToolboxApi + * @extends {BaseAPI} + */ +export class WorkspaceToolboxApi extends BaseAPI { + /** + * Create exec session inside workspace project + * @summary Create exec session + * @param {string} workspaceId Workspace ID or Name + * @param {CreateSessionRequest} params Create session request + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi + */ + public createSession( + workspaceId: string, + params: CreateSessionRequest, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .createSession(workspaceId, params, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete a session inside workspace project + * @summary Delete session + * @param {string} workspaceId Workspace ID or Name + * @param {string} sessionId Session ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi + */ + public deleteSession( + workspaceId: string, + sessionId: string, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .deleteSession(workspaceId, sessionId, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Create folder inside a workspace + * @summary Create folder + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path + * @param {string} mode Mode + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi + */ + public fsCreateFolder( + workspaceId: string, + path: string, + mode: string, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .fsCreateFolder(workspaceId, path, mode, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete file inside a workspace + * @summary Delete file + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi + */ + public fsDeleteFile( + workspaceId: string, + path: string, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .fsDeleteFile(workspaceId, path, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Download file from a workspace + * @summary Download file + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi + */ + public fsDownloadFile( + workspaceId: string, + path: string, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .fsDownloadFile(workspaceId, path, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Search for text/pattern inside a workspace files + * @summary Search for text/pattern in files + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path + * @param {string} pattern Pattern + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi + */ + public fsFindInFiles( + workspaceId: string, + path: string, + pattern: string, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .fsFindInFiles(workspaceId, path, pattern, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get file info inside a workspace + * @summary Get file info + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi + */ + public fsGetFileDetails( + workspaceId: string, + path: string, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .fsGetFileDetails(workspaceId, path, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * List files inside a workspace + * @summary List files + * @param {string} workspaceId Workspace ID or Name + * @param {string} [path] Path + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi + */ + public fsListFiles( + workspaceId: string, + path?: string, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .fsListFiles(workspaceId, path, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Create folder inside a workspace + * @summary Create folder + * @param {string} workspaceId Workspace ID or Name + * @param {string} source Source path + * @param {string} destination Destination path + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi + */ + public fsMoveFile( + workspaceId: string, + source: string, + destination: string, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .fsMoveFile(workspaceId, source, destination, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Repleace text/pattern in mutilple files inside a workspace + * @summary Repleace text/pattern in files + * @param {string} workspaceId Workspace ID or Name + * @param {ReplaceRequest} replace ReplaceParams + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi + */ + public fsReplaceInFiles( + workspaceId: string, + replace: ReplaceRequest, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .fsReplaceInFiles(workspaceId, replace, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Search for files inside a workspace + * @summary Search for files + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path + * @param {string} pattern Pattern + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi + */ + public fsSearchFiles( + workspaceId: string, + path: string, + pattern: string, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .fsSearchFiles(workspaceId, path, pattern, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Set file owner/group/permissions inside a workspace + * @summary Set file owner/group/permissions + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path + * @param {string} [owner] Owner + * @param {string} [group] Group + * @param {string} [mode] Mode + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi + */ + public fsSetFilePermissions( + workspaceId: string, + path: string, + owner?: string, + group?: string, + mode?: string, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .fsSetFilePermissions(workspaceId, path, owner, group, mode, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Upload file inside a workspace + * @summary Upload file + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path + * @param {File} file File + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi + */ + public fsUploadFile( + workspaceId: string, + path: string, + file: File, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .fsUploadFile(workspaceId, path, file, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get logs of a command inside a session inside workspace project Connect with websocket to get a stream of the logs + * @summary Get session command logs + * @param {string} workspaceId Workspace ID or Name + * @param {string} sessionId Session ID + * @param {string} commandId Command ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi + */ + public getSessionCommandLogs( + workspaceId: string, + sessionId: string, + commandId: string, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .getSessionCommandLogs(workspaceId, sessionId, commandId, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get workspace directory + * @summary Get workspace dir + * @param {string} workspaceId Workspace ID or Name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi + */ + public getWorkspaceDir(workspaceId: string, options?: RawAxiosRequestConfig) { + return WorkspaceToolboxApiFp(this.configuration) + .getWorkspaceDir(workspaceId, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Add files to git commit + * @summary Add files + * @param {string} workspaceId Workspace ID or Name + * @param {GitAddRequest} params GitAddRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi + */ + public gitAddFiles( + workspaceId: string, + params: GitAddRequest, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .gitAddFiles(workspaceId, params, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get branch list from git repository inside a workspace + * @summary Get branch list + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path to git repository + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi + */ + public gitBranchList( + workspaceId: string, + path: string, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .gitBranchList(workspaceId, path, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Clone git repository inside a workspace + * @summary Clone git repository + * @param {string} workspaceId Workspace ID or Name + * @param {GitCloneRequest} params GitCloneRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi + */ + public gitCloneRepository( + workspaceId: string, + params: GitCloneRequest, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .gitCloneRepository(workspaceId, params, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Commit changes to git repository inside a workspace + * @summary Commit changes + * @param {string} workspaceId Workspace ID or Name + * @param {GitCommitRequest} params GitCommitRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi + */ + public gitCommitChanges( + workspaceId: string, + params: GitCommitRequest, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .gitCommitChanges(workspaceId, params, options) + .then((request) => request(this.axios, this.basePath)) + } -/** - * WorkspaceApi - factory interface - * @export - */ -export const WorkspaceApiFactory = function ( - configuration?: Configuration, - basePath?: string, - axios?: AxiosInstance, -) { - const localVarFp = WorkspaceApiFp(configuration) - return { - /** - * Create a workspace - * @summary Create a workspace - * @param {CreateWorkspaceDTO} workspace Create workspace - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createWorkspace( - workspace: CreateWorkspaceDTO, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .createWorkspace(workspace, options) - .then((request) => request(axios, basePath)) - }, - /** - * Get workspace info - * @summary Get workspace info - * @param {string} workspaceId Workspace ID or Name - * @param {boolean} [verbose] Verbose - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getWorkspace( - workspaceId: string, - verbose?: boolean, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .getWorkspace(workspaceId, verbose, options) - .then((request) => request(axios, basePath)) - }, - /** - * List workspaces - * @summary List workspaces - * @param {boolean} [verbose] Verbose - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listWorkspaces( - verbose?: boolean, - options?: RawAxiosRequestConfig, - ): AxiosPromise> { - return localVarFp - .listWorkspaces(verbose, options) - .then((request) => request(axios, basePath)) - }, - /** - * Remove workspace - * @summary Remove workspace - * @param {string} workspaceId Workspace ID - * @param {boolean} [force] Force - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - removeWorkspace( - workspaceId: string, - force?: boolean, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .removeWorkspace(workspaceId, force, options) - .then((request) => request(axios, basePath)) - }, - /** - * Set project state - * @summary Set project state - * @param {string} workspaceId Workspace ID or Name - * @param {string} projectId Project ID - * @param {SetProjectState} setState Set State - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - setProjectState( - workspaceId: string, - projectId: string, - setState: SetProjectState, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .setProjectState(workspaceId, projectId, setState, options) - .then((request) => request(axios, basePath)) - }, - /** - * Start project - * @summary Start project - * @param {string} workspaceId Workspace ID or Name - * @param {string} projectId Project ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - startProject( - workspaceId: string, - projectId: string, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .startProject(workspaceId, projectId, options) - .then((request) => request(axios, basePath)) - }, - /** - * Start workspace - * @summary Start workspace - * @param {string} workspaceId Workspace ID or Name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - startWorkspace( - workspaceId: string, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .startWorkspace(workspaceId, options) - .then((request) => request(axios, basePath)) - }, - /** - * Stop project - * @summary Stop project - * @param {string} workspaceId Workspace ID or Name - * @param {string} projectId Project ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - stopProject( - workspaceId: string, - projectId: string, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .stopProject(workspaceId, projectId, options) - .then((request) => request(axios, basePath)) - }, - /** - * Stop workspace - * @summary Stop workspace - * @param {string} workspaceId Workspace ID or Name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - stopWorkspace( - workspaceId: string, - options?: RawAxiosRequestConfig, - ): AxiosPromise { - return localVarFp - .stopWorkspace(workspaceId, options) - .then((request) => request(axios, basePath)) - }, + /** + * Get commit history from git repository inside a workspace + * @summary Get commit history + * @param {string} workspaceId Workspace ID or Name + * @param {string} path Path to git repository + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi + */ + public gitCommitHistory( + workspaceId: string, + path: string, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .gitCommitHistory(workspaceId, path, options) + .then((request) => request(this.axios, this.basePath)) } -} -/** - * WorkspaceApi - object-oriented interface - * @export - * @class WorkspaceApi - * @extends {BaseAPI} - */ -export class WorkspaceApi extends BaseAPI { /** - * Create a workspace - * @summary Create a workspace - * @param {CreateWorkspaceDTO} workspace Create workspace + * Create branch on git repository inside a workspace + * @summary Create branch + * @param {string} workspaceId Workspace ID or Name + * @param {GitBranchRequest} params GitBranchRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WorkspaceApi + * @memberof WorkspaceToolboxApi */ - public createWorkspace( - workspace: CreateWorkspaceDTO, + public gitCreateBranch( + workspaceId: string, + params: GitBranchRequest, options?: RawAxiosRequestConfig, ) { - return WorkspaceApiFp(this.configuration) - .createWorkspace(workspace, options) + return WorkspaceToolboxApiFp(this.configuration) + .gitCreateBranch(workspaceId, params, options) .then((request) => request(this.axios, this.basePath)) } /** - * Get workspace info - * @summary Get workspace info + * Get status from git repository inside a workspace + * @summary Get git status * @param {string} workspaceId Workspace ID or Name - * @param {boolean} [verbose] Verbose + * @param {string} path Path to git repository * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WorkspaceApi + * @memberof WorkspaceToolboxApi */ - public getWorkspace( + public gitGitStatus( workspaceId: string, - verbose?: boolean, + path: string, options?: RawAxiosRequestConfig, ) { - return WorkspaceApiFp(this.configuration) - .getWorkspace(workspaceId, verbose, options) + return WorkspaceToolboxApiFp(this.configuration) + .gitGitStatus(workspaceId, path, options) .then((request) => request(this.axios, this.basePath)) } /** - * List workspaces - * @summary List workspaces - * @param {boolean} [verbose] Verbose + * Pull changes from remote to git repository inside a workspace + * @summary Pull changes + * @param {string} workspaceId Workspace ID or Name + * @param {GitRepoRequest} params Git pull request * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WorkspaceApi + * @memberof WorkspaceToolboxApi */ - public listWorkspaces(verbose?: boolean, options?: RawAxiosRequestConfig) { - return WorkspaceApiFp(this.configuration) - .listWorkspaces(verbose, options) + public gitPullChanges( + workspaceId: string, + params: GitRepoRequest, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .gitPullChanges(workspaceId, params, options) .then((request) => request(this.axios, this.basePath)) } /** - * Remove workspace - * @summary Remove workspace - * @param {string} workspaceId Workspace ID - * @param {boolean} [force] Force + * Push changes to remote from git repository inside a workspace + * @summary Push changes + * @param {string} workspaceId Workspace ID or Name + * @param {GitRepoRequest} params Git push request * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WorkspaceApi + * @memberof WorkspaceToolboxApi */ - public removeWorkspace( + public gitPushChanges( workspaceId: string, - force?: boolean, + params: GitRepoRequest, options?: RawAxiosRequestConfig, ) { - return WorkspaceApiFp(this.configuration) - .removeWorkspace(workspaceId, force, options) + return WorkspaceToolboxApiFp(this.configuration) + .gitPushChanges(workspaceId, params, options) .then((request) => request(this.axios, this.basePath)) } /** - * Set project state - * @summary Set project state + * List sessions inside workspace project + * @summary List sessions * @param {string} workspaceId Workspace ID or Name - * @param {string} projectId Project ID - * @param {SetProjectState} setState Set State * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WorkspaceApi + * @memberof WorkspaceToolboxApi + */ + public listSessions(workspaceId: string, options?: RawAxiosRequestConfig) { + return WorkspaceToolboxApiFp(this.configuration) + .listSessions(workspaceId, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * The Completion request is sent from the client to the server to compute completion items at a given cursor position. + * @summary Get Lsp Completions + * @param {string} workspaceId Workspace ID or Name + * @param {LspCompletionParams} params LspCompletionParams + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi */ - public setProjectState( + public lspCompletions( workspaceId: string, - projectId: string, - setState: SetProjectState, + params: LspCompletionParams, options?: RawAxiosRequestConfig, ) { - return WorkspaceApiFp(this.configuration) - .setProjectState(workspaceId, projectId, setState, options) + return WorkspaceToolboxApiFp(this.configuration) + .lspCompletions(workspaceId, params, options) .then((request) => request(this.axios, this.basePath)) } /** - * Start project - * @summary Start project + * The document close notification is sent from the client to the server when the document got closed in the client. + * @summary Call Lsp DidClose * @param {string} workspaceId Workspace ID or Name - * @param {string} projectId Project ID + * @param {LspDocumentRequest} params LspDocumentRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WorkspaceApi + * @memberof WorkspaceToolboxApi */ - public startProject( + public lspDidClose( workspaceId: string, - projectId: string, + params: LspDocumentRequest, options?: RawAxiosRequestConfig, ) { - return WorkspaceApiFp(this.configuration) - .startProject(workspaceId, projectId, options) + return WorkspaceToolboxApiFp(this.configuration) + .lspDidClose(workspaceId, params, options) .then((request) => request(this.axios, this.basePath)) } /** - * Start workspace - * @summary Start workspace + * The document open notification is sent from the client to the server to signal newly opened text documents. + * @summary Call Lsp DidOpen * @param {string} workspaceId Workspace ID or Name + * @param {LspDocumentRequest} params LspDocumentRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WorkspaceApi + * @memberof WorkspaceToolboxApi */ - public startWorkspace(workspaceId: string, options?: RawAxiosRequestConfig) { - return WorkspaceApiFp(this.configuration) - .startWorkspace(workspaceId, options) + public lspDidOpen( + workspaceId: string, + params: LspDocumentRequest, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .lspDidOpen(workspaceId, params, options) .then((request) => request(this.axios, this.basePath)) } /** - * Stop project - * @summary Stop project + * The document symbol request is sent from the client to the server. + * @summary Call Lsp DocumentSymbols * @param {string} workspaceId Workspace ID or Name - * @param {string} projectId Project ID + * @param {string} languageId Language ID + * @param {string} pathToProject Path to project + * @param {string} uri Document Uri * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WorkspaceApi + * @memberof WorkspaceToolboxApi */ - public stopProject( + public lspDocumentSymbols( workspaceId: string, - projectId: string, + languageId: string, + pathToProject: string, + uri: string, options?: RawAxiosRequestConfig, ) { - return WorkspaceApiFp(this.configuration) - .stopProject(workspaceId, projectId, options) + return WorkspaceToolboxApiFp(this.configuration) + .lspDocumentSymbols(workspaceId, languageId, pathToProject, uri, options) .then((request) => request(this.axios, this.basePath)) } /** - * Stop workspace - * @summary Stop workspace + * Start Lsp server process inside a workspace + * @summary Start Lsp server * @param {string} workspaceId Workspace ID or Name + * @param {LspServerRequest} params LspServerRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WorkspaceApi + * @memberof WorkspaceToolboxApi */ - public stopWorkspace(workspaceId: string, options?: RawAxiosRequestConfig) { - return WorkspaceApiFp(this.configuration) - .stopWorkspace(workspaceId, options) + public lspStart( + workspaceId: string, + params: LspServerRequest, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .lspStart(workspaceId, params, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Stop Lsp server process inside a workspace + * @summary Stop Lsp server + * @param {string} workspaceId Workspace ID or Name + * @param {LspServerRequest} params LspServerRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi + */ + public lspStop( + workspaceId: string, + params: LspServerRequest, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .lspStop(workspaceId, params, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * The workspace symbol request is sent from the client to the server to list project-wide symbols matching the query string. + * @summary Call Lsp WorkspaceSymbols + * @param {string} workspaceId Workspace ID or Name + * @param {string} languageId Language ID + * @param {string} pathToProject Path to project + * @param {string} query Symbol Query + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi + */ + public lspWorkspaceSymbols( + workspaceId: string, + languageId: string, + pathToProject: string, + query: string, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .lspWorkspaceSymbols( + workspaceId, + languageId, + pathToProject, + query, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Execute command synchronously inside a workspace + * @summary Execute command + * @param {string} workspaceId Workspace ID or Name + * @param {ExecuteRequest} params Execute command request + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi + */ + public processExecuteCommand( + workspaceId: string, + params: ExecuteRequest, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .processExecuteCommand(workspaceId, params, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Execute command inside a session inside workspace project + * @summary Execute command in session + * @param {string} workspaceId Workspace ID or Name + * @param {string} sessionId Session ID + * @param {SessionExecuteRequest} params Execute command request + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkspaceToolboxApi + */ + public sessionExecuteCommand( + workspaceId: string, + sessionId: string, + params: SessionExecuteRequest, + options?: RawAxiosRequestConfig, + ) { + return WorkspaceToolboxApiFp(this.configuration) + .sessionExecuteCommand(workspaceId, sessionId, params, options) .then((request) => request(this.axios, this.basePath)) } } diff --git a/client/src/components/CreateWorkspace.tsx b/client/src/components/CreateWorkspace.tsx index 208cba2..800897e 100644 --- a/client/src/components/CreateWorkspace.tsx +++ b/client/src/components/CreateWorkspace.tsx @@ -24,8 +24,8 @@ import Header from './shared/Header' import { GitProvider, GitRepository, - ProviderTarget, Sample, + TargetDTO, WorkspaceDTO, } from '../api-client' import { useApiClient } from '../providers/ApiClientProvider' @@ -48,7 +48,7 @@ const CreateWorkspace = () => { null, ) const [workspace, setWorkspace] = useState(null) - const [targets, setTargets] = useState([]) + const [targets, setTargets] = useState([]) const [samples, setSamples] = useState([]) const { workspaceApiClient, @@ -130,7 +130,7 @@ const CreateWorkspace = () => { if (targetApiClient) { targetApiClient .listTargets() - .then((response: AxiosResponse) => { + .then((response: AxiosResponse) => { if (response.data.length > 0) { setTargets(response.data) setValue('target', response.data[0].name) @@ -168,7 +168,7 @@ const CreateWorkspace = () => { if (createdWorkspaceId && activeStep === 2 && workspaceApiClient) { const fetchWorkspace = async () => { try { - const response = await workspaceApiClient.getWorkspace( + const response = await workspaceApiClient.findWorkspace( createdWorkspaceId, ) setWorkspace(response.data) @@ -280,7 +280,7 @@ const CreateWorkspace = () => { const handleDelete = () => { if (workspaceApiClient) { workspaceApiClient - .removeWorkspace(createdWorkspaceId as string, true) + .deleteWorkspace(createdWorkspaceId as string, true) .then(() => { navigate('/') }) diff --git a/client/src/components/Logs.tsx b/client/src/components/Logs.tsx index 0808e84..96f62fd 100644 --- a/client/src/components/Logs.tsx +++ b/client/src/components/Logs.tsx @@ -28,14 +28,7 @@ const Logs: FC = () => { let stderr = '' client?.extension.host?.cli.exec( 'daytona', - [ - 'code', - state.createdWorkspaceId, - state.createdWorkspaceName, - '--ide', - state.editor, - '-y', - ], + ['code', state.createdWorkspaceId, '--ide', state.editor, '-y'], { stream: { onOutput: (message: any) => { diff --git a/client/src/components/StartScreen.tsx b/client/src/components/StartScreen.tsx index b51722e..d7c2017 100644 --- a/client/src/components/StartScreen.tsx +++ b/client/src/components/StartScreen.tsx @@ -33,7 +33,7 @@ const StartScreen = () => { const handleDelete = (workspace: WorkspaceDTO) => { if (workspaceApiClient) { workspaceApiClient - .removeWorkspace(workspace.id, true) + .deleteWorkspace(workspace.id, true) .then(() => { fetchWorkspaces() }) diff --git a/client/src/components/shared/WorkspaceItem/WorkspaceItem.tsx b/client/src/components/shared/WorkspaceItem/WorkspaceItem.tsx index 6aa4f6c..8dc3603 100644 --- a/client/src/components/shared/WorkspaceItem/WorkspaceItem.tsx +++ b/client/src/components/shared/WorkspaceItem/WorkspaceItem.tsx @@ -1,4 +1,4 @@ -import { FC, useMemo, useState } from 'react' +import { FC } from 'react' import { Box, Typography, @@ -10,10 +10,11 @@ import { } from '@mui/material' import DeleteIcon from '@mui/icons-material/Delete' import LaunchIcon from '@mui/icons-material/Launch' -import { WorkspaceDTO } from '../../../api-client' +import { ModelsResourceStateName, WorkspaceDTO } from '../../../api-client' import { useDockerClient } from '../../../providers/DockerClientProvider' import OpenInEditorButton from './OpenInEditorButton' import { Editor } from '../../../constants/editors' +import { mapResourceStateToStatus } from '../../../helpers/workspaceHelper' const WorkspaceItem: FC<{ workspace: WorkspaceDTO @@ -27,13 +28,9 @@ const WorkspaceItem: FC<{ }> = ({ workspace, onDelete, preferedEditor, openInEditor }) => { const client = useDockerClient() - const isWorkspaceRunning = useMemo(() => { - return workspace.projects[0].state && workspace.projects[0].state.uptime > 0 - }, [workspace]) - const openRepo = () => { // @ts-ignore - client?.openExternal(workspace.projects[0].repository.url) + client?.openExternal(workspace.repository.url) } return ( @@ -47,7 +44,9 @@ const WorkspaceItem: FC<{ gap={1} alignItems="flex-start" > - {workspace.name} + + {workspace.repository.name} + - {workspace.projects[0].repository.url} + {workspace.repository.url} - {isWorkspaceRunning ? ( - - ) : ( - - )} + - {workspace.projects[0].target} + {workspace.target.name} - {isWorkspaceRunning && ( + {workspace.state.name === + ModelsResourceStateName.ResourceStateNameStarted && ( openInEditor(workspace.id, workspace.name, editor) diff --git a/client/src/helpers/workspaceHelper.ts b/client/src/helpers/workspaceHelper.ts new file mode 100644 index 0000000..fc1e5b8 --- /dev/null +++ b/client/src/helpers/workspaceHelper.ts @@ -0,0 +1,43 @@ +import { ModelsResourceStateName } from '../api-client' + +export const mapResourceStateToStatus = ( + state: ModelsResourceStateName, +): + | 'default' + | 'primary' + | 'secondary' + | 'error' + | 'info' + | 'success' + | 'warning' => { + switch (state) { + case ModelsResourceStateName.ResourceStateNameUndefined: + return 'default' + case ModelsResourceStateName.ResourceStateNamePendingRun: + case ModelsResourceStateName.ResourceStateNamePendingCreate: + case ModelsResourceStateName.ResourceStateNamePendingStart: + case ModelsResourceStateName.ResourceStateNamePendingStop: + case ModelsResourceStateName.ResourceStateNamePendingRestart: + case ModelsResourceStateName.ResourceStateNamePendingDelete: + case ModelsResourceStateName.ResourceStateNamePendingForcedDelete: + return 'primary' + case ModelsResourceStateName.ResourceStateNameRunning: + case ModelsResourceStateName.ResourceStateNameStarted: + return 'success' + case ModelsResourceStateName.ResourceStateNameRunSuccessful: + return 'info' + case ModelsResourceStateName.ResourceStateNameCreating: + case ModelsResourceStateName.ResourceStateNameStarting: + case ModelsResourceStateName.ResourceStateNameStopping: + case ModelsResourceStateName.ResourceStateNameDeleting: + return 'warning' + case ModelsResourceStateName.ResourceStateNameStopped: + case ModelsResourceStateName.ResourceStateNameDeleted: + return 'secondary' + case ModelsResourceStateName.ResourceStateNameError: + case ModelsResourceStateName.ResourceStateNameUnresponsive: + return 'error' + default: + return 'default' + } +}