@daytonaio/sdk 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENCE +43 -0
- package/README.md +181 -0
- package/dist/Daytona.d.ts +106 -0
- package/dist/Daytona.js +141 -0
- package/dist/FileSystem.d.ts +97 -0
- package/dist/FileSystem.js +126 -0
- package/dist/Git.d.ts +67 -0
- package/dist/Git.js +109 -0
- package/dist/LspServer.d.ts +68 -0
- package/dist/LspServer.js +93 -0
- package/dist/Process.d.ts +54 -0
- package/dist/Process.js +84 -0
- package/dist/Workspace.d.ts +53 -0
- package/dist/Workspace.js +51 -0
- package/dist/client/apis/ApiKeyApi.d.ts +54 -0
- package/dist/client/apis/ApiKeyApi.js +135 -0
- package/dist/client/apis/BuildApi.d.ts +95 -0
- package/dist/client/apis/BuildApi.js +228 -0
- package/dist/client/apis/ContainerRegistryApi.d.ts +68 -0
- package/dist/client/apis/ContainerRegistryApi.js +163 -0
- package/dist/client/apis/DefaultApi.d.ts +31 -0
- package/dist/client/apis/DefaultApi.js +72 -0
- package/dist/client/apis/GitProviderApi.d.ts +197 -0
- package/dist/client/apis/GitProviderApi.js +477 -0
- package/dist/client/apis/PrebuildApi.d.ts +97 -0
- package/dist/client/apis/PrebuildApi.js +241 -0
- package/dist/client/apis/ProfileApi.d.ts +51 -0
- package/dist/client/apis/ProfileApi.js +128 -0
- package/dist/client/apis/ProjectConfigApi.d.ts +94 -0
- package/dist/client/apis/ProjectConfigApi.js +220 -0
- package/dist/client/apis/ProviderApi.d.ts +71 -0
- package/dist/client/apis/ProviderApi.js +160 -0
- package/dist/client/apis/SampleApi.d.ts +28 -0
- package/dist/client/apis/SampleApi.js +73 -0
- package/dist/client/apis/ServerApi.d.ts +61 -0
- package/dist/client/apis/ServerApi.js +156 -0
- package/dist/client/apis/TargetApi.d.ts +67 -0
- package/dist/client/apis/TargetApi.js +159 -0
- package/dist/client/apis/WorkspaceApi.d.ts +141 -0
- package/dist/client/apis/WorkspaceApi.js +330 -0
- package/dist/client/apis/WorkspaceToolboxApi.d.ts +464 -0
- package/dist/client/apis/WorkspaceToolboxApi.js +1248 -0
- package/dist/client/apis/index.d.ts +14 -0
- package/dist/client/apis/index.js +32 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.js +21 -0
- package/dist/client/models/ApiKey.d.ts +45 -0
- package/dist/client/models/ApiKey.js +60 -0
- package/dist/client/models/ApikeyApiKeyType.d.ts +26 -0
- package/dist/client/models/ApikeyApiKeyType.js +52 -0
- package/dist/client/models/Build.d.ts +98 -0
- package/dist/client/models/Build.js +91 -0
- package/dist/client/models/BuildBuildState.d.ts +31 -0
- package/dist/client/models/BuildBuildState.js +57 -0
- package/dist/client/models/BuildConfig.d.ts +40 -0
- package/dist/client/models/BuildConfig.js +57 -0
- package/dist/client/models/CachedBuild.d.ts +38 -0
- package/dist/client/models/CachedBuild.js +55 -0
- package/dist/client/models/CloneTarget.d.ts +25 -0
- package/dist/client/models/CloneTarget.js +51 -0
- package/dist/client/models/CompletionContext.d.ts +38 -0
- package/dist/client/models/CompletionContext.js +53 -0
- package/dist/client/models/CompletionItem.d.ts +68 -0
- package/dist/client/models/CompletionItem.js +63 -0
- package/dist/client/models/CompletionList.d.ts +39 -0
- package/dist/client/models/CompletionList.js +56 -0
- package/dist/client/models/ContainerConfig.d.ts +38 -0
- package/dist/client/models/ContainerConfig.js +55 -0
- package/dist/client/models/ContainerRegistry.d.ts +44 -0
- package/dist/client/models/ContainerRegistry.js +59 -0
- package/dist/client/models/CreateBuildDTO.d.ts +52 -0
- package/dist/client/models/CreateBuildDTO.js +62 -0
- package/dist/client/models/CreatePrebuildDTO.d.ts +56 -0
- package/dist/client/models/CreatePrebuildDTO.js +59 -0
- package/dist/client/models/CreateProjectConfigDTO.d.ts +71 -0
- package/dist/client/models/CreateProjectConfigDTO.js +72 -0
- package/dist/client/models/CreateProjectDTO.d.ts +72 -0
- package/dist/client/models/CreateProjectDTO.js +73 -0
- package/dist/client/models/CreateProjectSourceDTO.d.ts +33 -0
- package/dist/client/models/CreateProjectSourceDTO.js +52 -0
- package/dist/client/models/CreateProviderTargetDTO.d.ts +45 -0
- package/dist/client/models/CreateProviderTargetDTO.js +60 -0
- package/dist/client/models/CreateWorkspaceDTO.d.ts +51 -0
- package/dist/client/models/CreateWorkspaceDTO.js +64 -0
- package/dist/client/models/DevcontainerConfig.d.ts +32 -0
- package/dist/client/models/DevcontainerConfig.js +51 -0
- package/dist/client/models/ExecuteRequest.d.ts +38 -0
- package/dist/client/models/ExecuteRequest.js +53 -0
- package/dist/client/models/ExecuteResponse.d.ts +38 -0
- package/dist/client/models/ExecuteResponse.js +55 -0
- package/dist/client/models/FRPSConfig.d.ts +44 -0
- package/dist/client/models/FRPSConfig.js +59 -0
- package/dist/client/models/FileInfo.d.ts +74 -0
- package/dist/client/models/FileInfo.js +79 -0
- package/dist/client/models/FileStatus.d.ts +51 -0
- package/dist/client/models/FileStatus.js +64 -0
- package/dist/client/models/GetRepositoryContext.d.ts +80 -0
- package/dist/client/models/GetRepositoryContext.js +67 -0
- package/dist/client/models/GitAddRequest.d.ts +38 -0
- package/dist/client/models/GitAddRequest.js +55 -0
- package/dist/client/models/GitBranch.d.ts +38 -0
- package/dist/client/models/GitBranch.js +55 -0
- package/dist/client/models/GitBranchRequest.d.ts +38 -0
- package/dist/client/models/GitBranchRequest.js +55 -0
- package/dist/client/models/GitCloneRequest.d.ts +62 -0
- package/dist/client/models/GitCloneRequest.js +63 -0
- package/dist/client/models/GitCommitInfo.d.ts +56 -0
- package/dist/client/models/GitCommitInfo.js +67 -0
- package/dist/client/models/GitCommitRequest.d.ts +50 -0
- package/dist/client/models/GitCommitRequest.js +63 -0
- package/dist/client/models/GitCommitResponse.d.ts +32 -0
- package/dist/client/models/GitCommitResponse.js +51 -0
- package/dist/client/models/GitNamespace.d.ts +38 -0
- package/dist/client/models/GitNamespace.js +55 -0
- package/dist/client/models/GitProvider.d.ts +75 -0
- package/dist/client/models/GitProvider.js +76 -0
- package/dist/client/models/GitPullRequest.d.ts +68 -0
- package/dist/client/models/GitPullRequest.js +75 -0
- package/dist/client/models/GitRepoRequest.d.ts +44 -0
- package/dist/client/models/GitRepoRequest.js +55 -0
- package/dist/client/models/GitRepository.d.ts +87 -0
- package/dist/client/models/GitRepository.js +84 -0
- package/dist/client/models/GitStatus.d.ts +57 -0
- package/dist/client/models/GitStatus.js +62 -0
- package/dist/client/models/GitUser.d.ts +50 -0
- package/dist/client/models/GitUser.js +63 -0
- package/dist/client/models/InstallProviderRequest.d.ts +40 -0
- package/dist/client/models/InstallProviderRequest.js +55 -0
- package/dist/client/models/ListBranchResponse.d.ts +32 -0
- package/dist/client/models/ListBranchResponse.js +51 -0
- package/dist/client/models/LogFileConfig.d.ts +62 -0
- package/dist/client/models/LogFileConfig.js +67 -0
- package/dist/client/models/LspCompletionParams.d.ts +58 -0
- package/dist/client/models/LspCompletionParams.js +69 -0
- package/dist/client/models/LspDocumentRequest.d.ts +44 -0
- package/dist/client/models/LspDocumentRequest.js +59 -0
- package/dist/client/models/LspLocation.d.ts +39 -0
- package/dist/client/models/LspLocation.js +56 -0
- package/dist/client/models/LspPosition.d.ts +38 -0
- package/dist/client/models/LspPosition.js +55 -0
- package/dist/client/models/LspRange.d.ts +39 -0
- package/dist/client/models/LspRange.js +56 -0
- package/dist/client/models/LspServerRequest.d.ts +38 -0
- package/dist/client/models/LspServerRequest.js +55 -0
- package/dist/client/models/LspSymbol.d.ts +45 -0
- package/dist/client/models/LspSymbol.js +60 -0
- package/dist/client/models/Match.d.ts +44 -0
- package/dist/client/models/Match.js +59 -0
- package/dist/client/models/NetworkKey.d.ts +32 -0
- package/dist/client/models/NetworkKey.js +51 -0
- package/dist/client/models/Position.d.ts +38 -0
- package/dist/client/models/Position.js +55 -0
- package/dist/client/models/PrebuildConfig.d.ts +56 -0
- package/dist/client/models/PrebuildConfig.js +67 -0
- package/dist/client/models/PrebuildDTO.d.ts +62 -0
- package/dist/client/models/PrebuildDTO.js +68 -0
- package/dist/client/models/ProfileData.d.ts +34 -0
- package/dist/client/models/ProfileData.js +51 -0
- package/dist/client/models/Project.d.ts +91 -0
- package/dist/client/models/Project.js +88 -0
- package/dist/client/models/ProjectConfig.d.ts +84 -0
- package/dist/client/models/ProjectConfig.js +87 -0
- package/dist/client/models/ProjectDirResponse.d.ts +32 -0
- package/dist/client/models/ProjectDirResponse.js +49 -0
- package/dist/client/models/ProjectInfo.d.ts +56 -0
- package/dist/client/models/ProjectInfo.js +65 -0
- package/dist/client/models/ProjectState.d.ts +45 -0
- package/dist/client/models/ProjectState.js +60 -0
- package/dist/client/models/Provider.d.ts +44 -0
- package/dist/client/models/Provider.js +57 -0
- package/dist/client/models/ProviderProviderInfo.d.ts +44 -0
- package/dist/client/models/ProviderProviderInfo.js +57 -0
- package/dist/client/models/ProviderProviderTargetProperty.d.ts +72 -0
- package/dist/client/models/ProviderProviderTargetProperty.js +64 -0
- package/dist/client/models/ProviderProviderTargetPropertyType.d.ts +29 -0
- package/dist/client/models/ProviderProviderTargetPropertyType.js +55 -0
- package/dist/client/models/ProviderTarget.d.ts +51 -0
- package/dist/client/models/ProviderTarget.js +64 -0
- package/dist/client/models/ReplaceRequest.d.ts +44 -0
- package/dist/client/models/ReplaceRequest.js +59 -0
- package/dist/client/models/ReplaceResult.d.ts +44 -0
- package/dist/client/models/ReplaceResult.js +53 -0
- package/dist/client/models/RepositoryUrl.d.ts +32 -0
- package/dist/client/models/RepositoryUrl.js +51 -0
- package/dist/client/models/Sample.d.ts +44 -0
- package/dist/client/models/Sample.js +59 -0
- package/dist/client/models/SearchFilesResponse.d.ts +32 -0
- package/dist/client/models/SearchFilesResponse.js +51 -0
- package/dist/client/models/ServerConfig.d.ts +130 -0
- package/dist/client/models/ServerConfig.js +119 -0
- package/dist/client/models/SetGitProviderConfig.d.ts +75 -0
- package/dist/client/models/SetGitProviderConfig.js +70 -0
- package/dist/client/models/SetProjectState.d.ts +39 -0
- package/dist/client/models/SetProjectState.js +56 -0
- package/dist/client/models/SigningMethod.d.ts +25 -0
- package/dist/client/models/SigningMethod.js +51 -0
- package/dist/client/models/Status.d.ts +31 -0
- package/dist/client/models/Status.js +57 -0
- package/dist/client/models/Workspace.d.ts +51 -0
- package/dist/client/models/Workspace.js +64 -0
- package/dist/client/models/WorkspaceDTO.d.ts +58 -0
- package/dist/client/models/WorkspaceDTO.js +67 -0
- package/dist/client/models/WorkspaceInfo.d.ts +45 -0
- package/dist/client/models/WorkspaceInfo.js +58 -0
- package/dist/client/models/index.d.ts +79 -0
- package/dist/client/models/index.js +97 -0
- package/dist/client/runtime.d.ts +182 -0
- package/dist/client/runtime.js +340 -0
- package/dist/code-toolbox/WorkspacePythonCodeToolbox.d.ts +5 -0
- package/dist/code-toolbox/WorkspacePythonCodeToolbox.js +13 -0
- package/dist/code-toolbox/WorkspaceTsCodeToolbox.d.ts +5 -0
- package/dist/code-toolbox/WorkspaceTsCodeToolbox.js +13 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +13 -0
- package/package.json +42 -0
|
@@ -0,0 +1,1248 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Daytona Server API
|
|
6
|
+
* Daytona Server API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: v0.0.0-dev
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
32
|
+
if (mod && mod.__esModule) return mod;
|
|
33
|
+
var result = {};
|
|
34
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
35
|
+
__setModuleDefault(result, mod);
|
|
36
|
+
return result;
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.WorkspaceToolboxApi = void 0;
|
|
40
|
+
const runtime = __importStar(require("../runtime"));
|
|
41
|
+
const index_1 = require("../models/index");
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
class WorkspaceToolboxApi extends runtime.BaseAPI {
|
|
46
|
+
/**
|
|
47
|
+
* Create folder inside workspace project
|
|
48
|
+
* Create folder
|
|
49
|
+
*/
|
|
50
|
+
async fsCreateFolderRaw(requestParameters, initOverrides) {
|
|
51
|
+
if (requestParameters['workspaceId'] == null) {
|
|
52
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling fsCreateFolder().');
|
|
53
|
+
}
|
|
54
|
+
if (requestParameters['projectId'] == null) {
|
|
55
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling fsCreateFolder().');
|
|
56
|
+
}
|
|
57
|
+
if (requestParameters['path'] == null) {
|
|
58
|
+
throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling fsCreateFolder().');
|
|
59
|
+
}
|
|
60
|
+
if (requestParameters['mode'] == null) {
|
|
61
|
+
throw new runtime.RequiredError('mode', 'Required parameter "mode" was null or undefined when calling fsCreateFolder().');
|
|
62
|
+
}
|
|
63
|
+
const queryParameters = {};
|
|
64
|
+
if (requestParameters['path'] != null) {
|
|
65
|
+
queryParameters['path'] = requestParameters['path'];
|
|
66
|
+
}
|
|
67
|
+
if (requestParameters['mode'] != null) {
|
|
68
|
+
queryParameters['mode'] = requestParameters['mode'];
|
|
69
|
+
}
|
|
70
|
+
const headerParameters = {};
|
|
71
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
72
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
73
|
+
}
|
|
74
|
+
const response = await this.request({
|
|
75
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/files/folder`
|
|
76
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
77
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
78
|
+
method: 'POST',
|
|
79
|
+
headers: headerParameters,
|
|
80
|
+
query: queryParameters,
|
|
81
|
+
}, initOverrides);
|
|
82
|
+
return new runtime.VoidApiResponse(response);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Create folder inside workspace project
|
|
86
|
+
* Create folder
|
|
87
|
+
*/
|
|
88
|
+
async fsCreateFolder(requestParameters, initOverrides) {
|
|
89
|
+
await this.fsCreateFolderRaw(requestParameters, initOverrides);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Delete file inside workspace project
|
|
93
|
+
* Delete file
|
|
94
|
+
*/
|
|
95
|
+
async fsDeleteFileRaw(requestParameters, initOverrides) {
|
|
96
|
+
if (requestParameters['workspaceId'] == null) {
|
|
97
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling fsDeleteFile().');
|
|
98
|
+
}
|
|
99
|
+
if (requestParameters['projectId'] == null) {
|
|
100
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling fsDeleteFile().');
|
|
101
|
+
}
|
|
102
|
+
if (requestParameters['path'] == null) {
|
|
103
|
+
throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling fsDeleteFile().');
|
|
104
|
+
}
|
|
105
|
+
const queryParameters = {};
|
|
106
|
+
if (requestParameters['path'] != null) {
|
|
107
|
+
queryParameters['path'] = requestParameters['path'];
|
|
108
|
+
}
|
|
109
|
+
const headerParameters = {};
|
|
110
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
111
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
112
|
+
}
|
|
113
|
+
const response = await this.request({
|
|
114
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/files`
|
|
115
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
116
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
117
|
+
method: 'DELETE',
|
|
118
|
+
headers: headerParameters,
|
|
119
|
+
query: queryParameters,
|
|
120
|
+
}, initOverrides);
|
|
121
|
+
return new runtime.VoidApiResponse(response);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Delete file inside workspace project
|
|
125
|
+
* Delete file
|
|
126
|
+
*/
|
|
127
|
+
async fsDeleteFile(requestParameters, initOverrides) {
|
|
128
|
+
await this.fsDeleteFileRaw(requestParameters, initOverrides);
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Download file from workspace project
|
|
132
|
+
* Download file
|
|
133
|
+
*/
|
|
134
|
+
async fsDownloadFileRaw(requestParameters, initOverrides) {
|
|
135
|
+
if (requestParameters['workspaceId'] == null) {
|
|
136
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling fsDownloadFile().');
|
|
137
|
+
}
|
|
138
|
+
if (requestParameters['projectId'] == null) {
|
|
139
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling fsDownloadFile().');
|
|
140
|
+
}
|
|
141
|
+
if (requestParameters['path'] == null) {
|
|
142
|
+
throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling fsDownloadFile().');
|
|
143
|
+
}
|
|
144
|
+
const queryParameters = {};
|
|
145
|
+
if (requestParameters['path'] != null) {
|
|
146
|
+
queryParameters['path'] = requestParameters['path'];
|
|
147
|
+
}
|
|
148
|
+
const headerParameters = {};
|
|
149
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
150
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
151
|
+
}
|
|
152
|
+
const response = await this.request({
|
|
153
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/files/download`
|
|
154
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
155
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
156
|
+
method: 'GET',
|
|
157
|
+
headers: headerParameters,
|
|
158
|
+
query: queryParameters,
|
|
159
|
+
}, initOverrides);
|
|
160
|
+
return new runtime.BlobApiResponse(response);
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Download file from workspace project
|
|
164
|
+
* Download file
|
|
165
|
+
*/
|
|
166
|
+
async fsDownloadFile(requestParameters, initOverrides) {
|
|
167
|
+
const response = await this.fsDownloadFileRaw(requestParameters, initOverrides);
|
|
168
|
+
return await response.value();
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Search for text/pattern inside workspace project files
|
|
172
|
+
* Search for text/pattern in files
|
|
173
|
+
*/
|
|
174
|
+
async fsFindInFilesRaw(requestParameters, initOverrides) {
|
|
175
|
+
if (requestParameters['workspaceId'] == null) {
|
|
176
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling fsFindInFiles().');
|
|
177
|
+
}
|
|
178
|
+
if (requestParameters['projectId'] == null) {
|
|
179
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling fsFindInFiles().');
|
|
180
|
+
}
|
|
181
|
+
if (requestParameters['path'] == null) {
|
|
182
|
+
throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling fsFindInFiles().');
|
|
183
|
+
}
|
|
184
|
+
if (requestParameters['pattern'] == null) {
|
|
185
|
+
throw new runtime.RequiredError('pattern', 'Required parameter "pattern" was null or undefined when calling fsFindInFiles().');
|
|
186
|
+
}
|
|
187
|
+
const queryParameters = {};
|
|
188
|
+
if (requestParameters['path'] != null) {
|
|
189
|
+
queryParameters['path'] = requestParameters['path'];
|
|
190
|
+
}
|
|
191
|
+
if (requestParameters['pattern'] != null) {
|
|
192
|
+
queryParameters['pattern'] = requestParameters['pattern'];
|
|
193
|
+
}
|
|
194
|
+
const headerParameters = {};
|
|
195
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
196
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
197
|
+
}
|
|
198
|
+
const response = await this.request({
|
|
199
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/files/find`
|
|
200
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
201
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
202
|
+
method: 'GET',
|
|
203
|
+
headers: headerParameters,
|
|
204
|
+
query: queryParameters,
|
|
205
|
+
}, initOverrides);
|
|
206
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.MatchFromJSON));
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Search for text/pattern inside workspace project files
|
|
210
|
+
* Search for text/pattern in files
|
|
211
|
+
*/
|
|
212
|
+
async fsFindInFiles(requestParameters, initOverrides) {
|
|
213
|
+
const response = await this.fsFindInFilesRaw(requestParameters, initOverrides);
|
|
214
|
+
return await response.value();
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Get file info inside workspace project
|
|
218
|
+
* Get file info
|
|
219
|
+
*/
|
|
220
|
+
async fsGetFileDetailsRaw(requestParameters, initOverrides) {
|
|
221
|
+
if (requestParameters['workspaceId'] == null) {
|
|
222
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling fsGetFileDetails().');
|
|
223
|
+
}
|
|
224
|
+
if (requestParameters['projectId'] == null) {
|
|
225
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling fsGetFileDetails().');
|
|
226
|
+
}
|
|
227
|
+
if (requestParameters['path'] == null) {
|
|
228
|
+
throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling fsGetFileDetails().');
|
|
229
|
+
}
|
|
230
|
+
const queryParameters = {};
|
|
231
|
+
if (requestParameters['path'] != null) {
|
|
232
|
+
queryParameters['path'] = requestParameters['path'];
|
|
233
|
+
}
|
|
234
|
+
const headerParameters = {};
|
|
235
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
236
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
237
|
+
}
|
|
238
|
+
const response = await this.request({
|
|
239
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/files/info`
|
|
240
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
241
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
242
|
+
method: 'GET',
|
|
243
|
+
headers: headerParameters,
|
|
244
|
+
query: queryParameters,
|
|
245
|
+
}, initOverrides);
|
|
246
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.FileInfoFromJSON)(jsonValue));
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Get file info inside workspace project
|
|
250
|
+
* Get file info
|
|
251
|
+
*/
|
|
252
|
+
async fsGetFileDetails(requestParameters, initOverrides) {
|
|
253
|
+
const response = await this.fsGetFileDetailsRaw(requestParameters, initOverrides);
|
|
254
|
+
return await response.value();
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* List files inside workspace project
|
|
258
|
+
* List files
|
|
259
|
+
*/
|
|
260
|
+
async fsListFilesRaw(requestParameters, initOverrides) {
|
|
261
|
+
if (requestParameters['workspaceId'] == null) {
|
|
262
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling fsListFiles().');
|
|
263
|
+
}
|
|
264
|
+
if (requestParameters['projectId'] == null) {
|
|
265
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling fsListFiles().');
|
|
266
|
+
}
|
|
267
|
+
const queryParameters = {};
|
|
268
|
+
if (requestParameters['path'] != null) {
|
|
269
|
+
queryParameters['path'] = requestParameters['path'];
|
|
270
|
+
}
|
|
271
|
+
const headerParameters = {};
|
|
272
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
273
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
274
|
+
}
|
|
275
|
+
const response = await this.request({
|
|
276
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/files`
|
|
277
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
278
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
279
|
+
method: 'GET',
|
|
280
|
+
headers: headerParameters,
|
|
281
|
+
query: queryParameters,
|
|
282
|
+
}, initOverrides);
|
|
283
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.FileInfoFromJSON));
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* List files inside workspace project
|
|
287
|
+
* List files
|
|
288
|
+
*/
|
|
289
|
+
async fsListFiles(requestParameters, initOverrides) {
|
|
290
|
+
const response = await this.fsListFilesRaw(requestParameters, initOverrides);
|
|
291
|
+
return await response.value();
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Create folder inside workspace project
|
|
295
|
+
* Create folder
|
|
296
|
+
*/
|
|
297
|
+
async fsMoveFileRaw(requestParameters, initOverrides) {
|
|
298
|
+
if (requestParameters['workspaceId'] == null) {
|
|
299
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling fsMoveFile().');
|
|
300
|
+
}
|
|
301
|
+
if (requestParameters['projectId'] == null) {
|
|
302
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling fsMoveFile().');
|
|
303
|
+
}
|
|
304
|
+
if (requestParameters['source'] == null) {
|
|
305
|
+
throw new runtime.RequiredError('source', 'Required parameter "source" was null or undefined when calling fsMoveFile().');
|
|
306
|
+
}
|
|
307
|
+
if (requestParameters['destination'] == null) {
|
|
308
|
+
throw new runtime.RequiredError('destination', 'Required parameter "destination" was null or undefined when calling fsMoveFile().');
|
|
309
|
+
}
|
|
310
|
+
const queryParameters = {};
|
|
311
|
+
if (requestParameters['source'] != null) {
|
|
312
|
+
queryParameters['source'] = requestParameters['source'];
|
|
313
|
+
}
|
|
314
|
+
if (requestParameters['destination'] != null) {
|
|
315
|
+
queryParameters['destination'] = requestParameters['destination'];
|
|
316
|
+
}
|
|
317
|
+
const headerParameters = {};
|
|
318
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
319
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
320
|
+
}
|
|
321
|
+
const response = await this.request({
|
|
322
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/files/move`
|
|
323
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
324
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
325
|
+
method: 'POST',
|
|
326
|
+
headers: headerParameters,
|
|
327
|
+
query: queryParameters,
|
|
328
|
+
}, initOverrides);
|
|
329
|
+
return new runtime.VoidApiResponse(response);
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Create folder inside workspace project
|
|
333
|
+
* Create folder
|
|
334
|
+
*/
|
|
335
|
+
async fsMoveFile(requestParameters, initOverrides) {
|
|
336
|
+
await this.fsMoveFileRaw(requestParameters, initOverrides);
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Repleace text/pattern in mutilple files inside workspace project
|
|
340
|
+
* Repleace text/pattern in files
|
|
341
|
+
*/
|
|
342
|
+
async fsReplaceInFilesRaw(requestParameters, initOverrides) {
|
|
343
|
+
if (requestParameters['workspaceId'] == null) {
|
|
344
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling fsReplaceInFiles().');
|
|
345
|
+
}
|
|
346
|
+
if (requestParameters['projectId'] == null) {
|
|
347
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling fsReplaceInFiles().');
|
|
348
|
+
}
|
|
349
|
+
if (requestParameters['replace'] == null) {
|
|
350
|
+
throw new runtime.RequiredError('replace', 'Required parameter "replace" was null or undefined when calling fsReplaceInFiles().');
|
|
351
|
+
}
|
|
352
|
+
const queryParameters = {};
|
|
353
|
+
const headerParameters = {};
|
|
354
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
355
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
356
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
357
|
+
}
|
|
358
|
+
const response = await this.request({
|
|
359
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/files/replace`
|
|
360
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
361
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
362
|
+
method: 'POST',
|
|
363
|
+
headers: headerParameters,
|
|
364
|
+
query: queryParameters,
|
|
365
|
+
body: (0, index_1.ReplaceRequestToJSON)(requestParameters['replace']),
|
|
366
|
+
}, initOverrides);
|
|
367
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.ReplaceResultFromJSON));
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Repleace text/pattern in mutilple files inside workspace project
|
|
371
|
+
* Repleace text/pattern in files
|
|
372
|
+
*/
|
|
373
|
+
async fsReplaceInFiles(requestParameters, initOverrides) {
|
|
374
|
+
const response = await this.fsReplaceInFilesRaw(requestParameters, initOverrides);
|
|
375
|
+
return await response.value();
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Search for files inside workspace project
|
|
379
|
+
* Search for files
|
|
380
|
+
*/
|
|
381
|
+
async fsSearchFilesRaw(requestParameters, initOverrides) {
|
|
382
|
+
if (requestParameters['workspaceId'] == null) {
|
|
383
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling fsSearchFiles().');
|
|
384
|
+
}
|
|
385
|
+
if (requestParameters['projectId'] == null) {
|
|
386
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling fsSearchFiles().');
|
|
387
|
+
}
|
|
388
|
+
if (requestParameters['path'] == null) {
|
|
389
|
+
throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling fsSearchFiles().');
|
|
390
|
+
}
|
|
391
|
+
if (requestParameters['pattern'] == null) {
|
|
392
|
+
throw new runtime.RequiredError('pattern', 'Required parameter "pattern" was null or undefined when calling fsSearchFiles().');
|
|
393
|
+
}
|
|
394
|
+
const queryParameters = {};
|
|
395
|
+
if (requestParameters['path'] != null) {
|
|
396
|
+
queryParameters['path'] = requestParameters['path'];
|
|
397
|
+
}
|
|
398
|
+
if (requestParameters['pattern'] != null) {
|
|
399
|
+
queryParameters['pattern'] = requestParameters['pattern'];
|
|
400
|
+
}
|
|
401
|
+
const headerParameters = {};
|
|
402
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
403
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
404
|
+
}
|
|
405
|
+
const response = await this.request({
|
|
406
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/files/search`
|
|
407
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
408
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
409
|
+
method: 'GET',
|
|
410
|
+
headers: headerParameters,
|
|
411
|
+
query: queryParameters,
|
|
412
|
+
}, initOverrides);
|
|
413
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SearchFilesResponseFromJSON)(jsonValue));
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Search for files inside workspace project
|
|
417
|
+
* Search for files
|
|
418
|
+
*/
|
|
419
|
+
async fsSearchFiles(requestParameters, initOverrides) {
|
|
420
|
+
const response = await this.fsSearchFilesRaw(requestParameters, initOverrides);
|
|
421
|
+
return await response.value();
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Set file owner/group/permissions inside workspace project
|
|
425
|
+
* Set file owner/group/permissions
|
|
426
|
+
*/
|
|
427
|
+
async fsSetFilePermissionsRaw(requestParameters, initOverrides) {
|
|
428
|
+
if (requestParameters['workspaceId'] == null) {
|
|
429
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling fsSetFilePermissions().');
|
|
430
|
+
}
|
|
431
|
+
if (requestParameters['projectId'] == null) {
|
|
432
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling fsSetFilePermissions().');
|
|
433
|
+
}
|
|
434
|
+
if (requestParameters['path'] == null) {
|
|
435
|
+
throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling fsSetFilePermissions().');
|
|
436
|
+
}
|
|
437
|
+
const queryParameters = {};
|
|
438
|
+
if (requestParameters['path'] != null) {
|
|
439
|
+
queryParameters['path'] = requestParameters['path'];
|
|
440
|
+
}
|
|
441
|
+
if (requestParameters['owner'] != null) {
|
|
442
|
+
queryParameters['owner'] = requestParameters['owner'];
|
|
443
|
+
}
|
|
444
|
+
if (requestParameters['group'] != null) {
|
|
445
|
+
queryParameters['group'] = requestParameters['group'];
|
|
446
|
+
}
|
|
447
|
+
if (requestParameters['mode'] != null) {
|
|
448
|
+
queryParameters['mode'] = requestParameters['mode'];
|
|
449
|
+
}
|
|
450
|
+
const headerParameters = {};
|
|
451
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
452
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
453
|
+
}
|
|
454
|
+
const response = await this.request({
|
|
455
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/files/permissions`
|
|
456
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
457
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
458
|
+
method: 'POST',
|
|
459
|
+
headers: headerParameters,
|
|
460
|
+
query: queryParameters,
|
|
461
|
+
}, initOverrides);
|
|
462
|
+
return new runtime.VoidApiResponse(response);
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Set file owner/group/permissions inside workspace project
|
|
466
|
+
* Set file owner/group/permissions
|
|
467
|
+
*/
|
|
468
|
+
async fsSetFilePermissions(requestParameters, initOverrides) {
|
|
469
|
+
await this.fsSetFilePermissionsRaw(requestParameters, initOverrides);
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* Upload file inside workspace project
|
|
473
|
+
* Upload file
|
|
474
|
+
*/
|
|
475
|
+
async fsUploadFileRaw(requestParameters, initOverrides) {
|
|
476
|
+
if (requestParameters['workspaceId'] == null) {
|
|
477
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling fsUploadFile().');
|
|
478
|
+
}
|
|
479
|
+
if (requestParameters['projectId'] == null) {
|
|
480
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling fsUploadFile().');
|
|
481
|
+
}
|
|
482
|
+
if (requestParameters['path'] == null) {
|
|
483
|
+
throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling fsUploadFile().');
|
|
484
|
+
}
|
|
485
|
+
if (requestParameters['file'] == null) {
|
|
486
|
+
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling fsUploadFile().');
|
|
487
|
+
}
|
|
488
|
+
const queryParameters = {};
|
|
489
|
+
if (requestParameters['path'] != null) {
|
|
490
|
+
queryParameters['path'] = requestParameters['path'];
|
|
491
|
+
}
|
|
492
|
+
const headerParameters = {};
|
|
493
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
494
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
495
|
+
}
|
|
496
|
+
const consumes = [{ contentType: 'multipart/form-data' }];
|
|
497
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
498
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
499
|
+
let formParams;
|
|
500
|
+
let useForm = false;
|
|
501
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
502
|
+
useForm = canConsumeForm;
|
|
503
|
+
if (useForm) {
|
|
504
|
+
formParams = new FormData();
|
|
505
|
+
}
|
|
506
|
+
else {
|
|
507
|
+
formParams = new URLSearchParams();
|
|
508
|
+
}
|
|
509
|
+
if (requestParameters['file'] != null) {
|
|
510
|
+
formParams.append('file', requestParameters['file']);
|
|
511
|
+
}
|
|
512
|
+
const response = await this.request({
|
|
513
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/files/upload`
|
|
514
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
515
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
516
|
+
method: 'POST',
|
|
517
|
+
headers: headerParameters,
|
|
518
|
+
query: queryParameters,
|
|
519
|
+
body: formParams,
|
|
520
|
+
}, initOverrides);
|
|
521
|
+
return new runtime.VoidApiResponse(response);
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* Upload file inside workspace project
|
|
525
|
+
* Upload file
|
|
526
|
+
*/
|
|
527
|
+
async fsUploadFile(requestParameters, initOverrides) {
|
|
528
|
+
await this.fsUploadFileRaw(requestParameters, initOverrides);
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Get project directory
|
|
532
|
+
* Get project dir
|
|
533
|
+
*/
|
|
534
|
+
async getProjectDirRaw(requestParameters, initOverrides) {
|
|
535
|
+
if (requestParameters['workspaceId'] == null) {
|
|
536
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling getProjectDir().');
|
|
537
|
+
}
|
|
538
|
+
if (requestParameters['projectId'] == null) {
|
|
539
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling getProjectDir().');
|
|
540
|
+
}
|
|
541
|
+
const queryParameters = {};
|
|
542
|
+
const headerParameters = {};
|
|
543
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
544
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
545
|
+
}
|
|
546
|
+
const response = await this.request({
|
|
547
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/project-dir`
|
|
548
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
549
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
550
|
+
method: 'GET',
|
|
551
|
+
headers: headerParameters,
|
|
552
|
+
query: queryParameters,
|
|
553
|
+
}, initOverrides);
|
|
554
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ProjectDirResponseFromJSON)(jsonValue));
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* Get project directory
|
|
558
|
+
* Get project dir
|
|
559
|
+
*/
|
|
560
|
+
async getProjectDir(requestParameters, initOverrides) {
|
|
561
|
+
const response = await this.getProjectDirRaw(requestParameters, initOverrides);
|
|
562
|
+
return await response.value();
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* Add files to git commit
|
|
566
|
+
* Add files
|
|
567
|
+
*/
|
|
568
|
+
async gitAddFilesRaw(requestParameters, initOverrides) {
|
|
569
|
+
if (requestParameters['workspaceId'] == null) {
|
|
570
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling gitAddFiles().');
|
|
571
|
+
}
|
|
572
|
+
if (requestParameters['projectId'] == null) {
|
|
573
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling gitAddFiles().');
|
|
574
|
+
}
|
|
575
|
+
if (requestParameters['params'] == null) {
|
|
576
|
+
throw new runtime.RequiredError('params', 'Required parameter "params" was null or undefined when calling gitAddFiles().');
|
|
577
|
+
}
|
|
578
|
+
const queryParameters = {};
|
|
579
|
+
const headerParameters = {};
|
|
580
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
581
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
582
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
583
|
+
}
|
|
584
|
+
const response = await this.request({
|
|
585
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/git/add`
|
|
586
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
587
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
588
|
+
method: 'POST',
|
|
589
|
+
headers: headerParameters,
|
|
590
|
+
query: queryParameters,
|
|
591
|
+
body: (0, index_1.GitAddRequestToJSON)(requestParameters['params']),
|
|
592
|
+
}, initOverrides);
|
|
593
|
+
return new runtime.VoidApiResponse(response);
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* Add files to git commit
|
|
597
|
+
* Add files
|
|
598
|
+
*/
|
|
599
|
+
async gitAddFiles(requestParameters, initOverrides) {
|
|
600
|
+
await this.gitAddFilesRaw(requestParameters, initOverrides);
|
|
601
|
+
}
|
|
602
|
+
/**
|
|
603
|
+
* Get branch list from git repository inside workspace project
|
|
604
|
+
* Get branch list
|
|
605
|
+
*/
|
|
606
|
+
async gitBranchListRaw(requestParameters, initOverrides) {
|
|
607
|
+
if (requestParameters['workspaceId'] == null) {
|
|
608
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling gitBranchList().');
|
|
609
|
+
}
|
|
610
|
+
if (requestParameters['projectId'] == null) {
|
|
611
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling gitBranchList().');
|
|
612
|
+
}
|
|
613
|
+
if (requestParameters['path'] == null) {
|
|
614
|
+
throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling gitBranchList().');
|
|
615
|
+
}
|
|
616
|
+
const queryParameters = {};
|
|
617
|
+
if (requestParameters['path'] != null) {
|
|
618
|
+
queryParameters['path'] = requestParameters['path'];
|
|
619
|
+
}
|
|
620
|
+
const headerParameters = {};
|
|
621
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
622
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
623
|
+
}
|
|
624
|
+
const response = await this.request({
|
|
625
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/git/branches`
|
|
626
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
627
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
628
|
+
method: 'GET',
|
|
629
|
+
headers: headerParameters,
|
|
630
|
+
query: queryParameters,
|
|
631
|
+
}, initOverrides);
|
|
632
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListBranchResponseFromJSON)(jsonValue));
|
|
633
|
+
}
|
|
634
|
+
/**
|
|
635
|
+
* Get branch list from git repository inside workspace project
|
|
636
|
+
* Get branch list
|
|
637
|
+
*/
|
|
638
|
+
async gitBranchList(requestParameters, initOverrides) {
|
|
639
|
+
const response = await this.gitBranchListRaw(requestParameters, initOverrides);
|
|
640
|
+
return await response.value();
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* Clone git repository inside workspace project
|
|
644
|
+
* Clone git repository
|
|
645
|
+
*/
|
|
646
|
+
async gitCloneRepositoryRaw(requestParameters, initOverrides) {
|
|
647
|
+
if (requestParameters['workspaceId'] == null) {
|
|
648
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling gitCloneRepository().');
|
|
649
|
+
}
|
|
650
|
+
if (requestParameters['projectId'] == null) {
|
|
651
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling gitCloneRepository().');
|
|
652
|
+
}
|
|
653
|
+
if (requestParameters['params'] == null) {
|
|
654
|
+
throw new runtime.RequiredError('params', 'Required parameter "params" was null or undefined when calling gitCloneRepository().');
|
|
655
|
+
}
|
|
656
|
+
const queryParameters = {};
|
|
657
|
+
const headerParameters = {};
|
|
658
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
659
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
660
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
661
|
+
}
|
|
662
|
+
const response = await this.request({
|
|
663
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/git/clone`
|
|
664
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
665
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
666
|
+
method: 'POST',
|
|
667
|
+
headers: headerParameters,
|
|
668
|
+
query: queryParameters,
|
|
669
|
+
body: (0, index_1.GitCloneRequestToJSON)(requestParameters['params']),
|
|
670
|
+
}, initOverrides);
|
|
671
|
+
return new runtime.VoidApiResponse(response);
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* Clone git repository inside workspace project
|
|
675
|
+
* Clone git repository
|
|
676
|
+
*/
|
|
677
|
+
async gitCloneRepository(requestParameters, initOverrides) {
|
|
678
|
+
await this.gitCloneRepositoryRaw(requestParameters, initOverrides);
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* Commit changes to git repository inside workspace project
|
|
682
|
+
* Commit changes
|
|
683
|
+
*/
|
|
684
|
+
async gitCommitChangesRaw(requestParameters, initOverrides) {
|
|
685
|
+
if (requestParameters['workspaceId'] == null) {
|
|
686
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling gitCommitChanges().');
|
|
687
|
+
}
|
|
688
|
+
if (requestParameters['projectId'] == null) {
|
|
689
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling gitCommitChanges().');
|
|
690
|
+
}
|
|
691
|
+
if (requestParameters['params'] == null) {
|
|
692
|
+
throw new runtime.RequiredError('params', 'Required parameter "params" was null or undefined when calling gitCommitChanges().');
|
|
693
|
+
}
|
|
694
|
+
const queryParameters = {};
|
|
695
|
+
const headerParameters = {};
|
|
696
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
697
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
698
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
699
|
+
}
|
|
700
|
+
const response = await this.request({
|
|
701
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/git/commit`
|
|
702
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
703
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
704
|
+
method: 'POST',
|
|
705
|
+
headers: headerParameters,
|
|
706
|
+
query: queryParameters,
|
|
707
|
+
body: (0, index_1.GitCommitRequestToJSON)(requestParameters['params']),
|
|
708
|
+
}, initOverrides);
|
|
709
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GitCommitResponseFromJSON)(jsonValue));
|
|
710
|
+
}
|
|
711
|
+
/**
|
|
712
|
+
* Commit changes to git repository inside workspace project
|
|
713
|
+
* Commit changes
|
|
714
|
+
*/
|
|
715
|
+
async gitCommitChanges(requestParameters, initOverrides) {
|
|
716
|
+
const response = await this.gitCommitChangesRaw(requestParameters, initOverrides);
|
|
717
|
+
return await response.value();
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* Get commit history from git repository inside workspace project
|
|
721
|
+
* Get commit history
|
|
722
|
+
*/
|
|
723
|
+
async gitCommitHistoryRaw(requestParameters, initOverrides) {
|
|
724
|
+
if (requestParameters['workspaceId'] == null) {
|
|
725
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling gitCommitHistory().');
|
|
726
|
+
}
|
|
727
|
+
if (requestParameters['projectId'] == null) {
|
|
728
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling gitCommitHistory().');
|
|
729
|
+
}
|
|
730
|
+
if (requestParameters['path'] == null) {
|
|
731
|
+
throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling gitCommitHistory().');
|
|
732
|
+
}
|
|
733
|
+
const queryParameters = {};
|
|
734
|
+
if (requestParameters['path'] != null) {
|
|
735
|
+
queryParameters['path'] = requestParameters['path'];
|
|
736
|
+
}
|
|
737
|
+
const headerParameters = {};
|
|
738
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
739
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
740
|
+
}
|
|
741
|
+
const response = await this.request({
|
|
742
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/git/history`
|
|
743
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
744
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
745
|
+
method: 'GET',
|
|
746
|
+
headers: headerParameters,
|
|
747
|
+
query: queryParameters,
|
|
748
|
+
}, initOverrides);
|
|
749
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.GitCommitInfoFromJSON));
|
|
750
|
+
}
|
|
751
|
+
/**
|
|
752
|
+
* Get commit history from git repository inside workspace project
|
|
753
|
+
* Get commit history
|
|
754
|
+
*/
|
|
755
|
+
async gitCommitHistory(requestParameters, initOverrides) {
|
|
756
|
+
const response = await this.gitCommitHistoryRaw(requestParameters, initOverrides);
|
|
757
|
+
return await response.value();
|
|
758
|
+
}
|
|
759
|
+
/**
|
|
760
|
+
* Create branch on git repository inside workspace project
|
|
761
|
+
* Create branch
|
|
762
|
+
*/
|
|
763
|
+
async gitCreateBranchRaw(requestParameters, initOverrides) {
|
|
764
|
+
if (requestParameters['workspaceId'] == null) {
|
|
765
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling gitCreateBranch().');
|
|
766
|
+
}
|
|
767
|
+
if (requestParameters['projectId'] == null) {
|
|
768
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling gitCreateBranch().');
|
|
769
|
+
}
|
|
770
|
+
if (requestParameters['params'] == null) {
|
|
771
|
+
throw new runtime.RequiredError('params', 'Required parameter "params" was null or undefined when calling gitCreateBranch().');
|
|
772
|
+
}
|
|
773
|
+
const queryParameters = {};
|
|
774
|
+
const headerParameters = {};
|
|
775
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
776
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
777
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
778
|
+
}
|
|
779
|
+
const response = await this.request({
|
|
780
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/git/branches`
|
|
781
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
782
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
783
|
+
method: 'POST',
|
|
784
|
+
headers: headerParameters,
|
|
785
|
+
query: queryParameters,
|
|
786
|
+
body: (0, index_1.GitBranchRequestToJSON)(requestParameters['params']),
|
|
787
|
+
}, initOverrides);
|
|
788
|
+
return new runtime.VoidApiResponse(response);
|
|
789
|
+
}
|
|
790
|
+
/**
|
|
791
|
+
* Create branch on git repository inside workspace project
|
|
792
|
+
* Create branch
|
|
793
|
+
*/
|
|
794
|
+
async gitCreateBranch(requestParameters, initOverrides) {
|
|
795
|
+
await this.gitCreateBranchRaw(requestParameters, initOverrides);
|
|
796
|
+
}
|
|
797
|
+
/**
|
|
798
|
+
* Get status from git repository inside workspace project
|
|
799
|
+
* Get git status
|
|
800
|
+
*/
|
|
801
|
+
async gitGitStatusRaw(requestParameters, initOverrides) {
|
|
802
|
+
if (requestParameters['workspaceId'] == null) {
|
|
803
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling gitGitStatus().');
|
|
804
|
+
}
|
|
805
|
+
if (requestParameters['projectId'] == null) {
|
|
806
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling gitGitStatus().');
|
|
807
|
+
}
|
|
808
|
+
if (requestParameters['path'] == null) {
|
|
809
|
+
throw new runtime.RequiredError('path', 'Required parameter "path" was null or undefined when calling gitGitStatus().');
|
|
810
|
+
}
|
|
811
|
+
const queryParameters = {};
|
|
812
|
+
if (requestParameters['path'] != null) {
|
|
813
|
+
queryParameters['path'] = requestParameters['path'];
|
|
814
|
+
}
|
|
815
|
+
const headerParameters = {};
|
|
816
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
817
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
818
|
+
}
|
|
819
|
+
const response = await this.request({
|
|
820
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/git/status`
|
|
821
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
822
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
823
|
+
method: 'GET',
|
|
824
|
+
headers: headerParameters,
|
|
825
|
+
query: queryParameters,
|
|
826
|
+
}, initOverrides);
|
|
827
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GitStatusFromJSON)(jsonValue));
|
|
828
|
+
}
|
|
829
|
+
/**
|
|
830
|
+
* Get status from git repository inside workspace project
|
|
831
|
+
* Get git status
|
|
832
|
+
*/
|
|
833
|
+
async gitGitStatus(requestParameters, initOverrides) {
|
|
834
|
+
const response = await this.gitGitStatusRaw(requestParameters, initOverrides);
|
|
835
|
+
return await response.value();
|
|
836
|
+
}
|
|
837
|
+
/**
|
|
838
|
+
* Pull changes from remote to git repository inside workspace project
|
|
839
|
+
* Pull changes
|
|
840
|
+
*/
|
|
841
|
+
async gitPullChangesRaw(requestParameters, initOverrides) {
|
|
842
|
+
if (requestParameters['workspaceId'] == null) {
|
|
843
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling gitPullChanges().');
|
|
844
|
+
}
|
|
845
|
+
if (requestParameters['projectId'] == null) {
|
|
846
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling gitPullChanges().');
|
|
847
|
+
}
|
|
848
|
+
if (requestParameters['params'] == null) {
|
|
849
|
+
throw new runtime.RequiredError('params', 'Required parameter "params" was null or undefined when calling gitPullChanges().');
|
|
850
|
+
}
|
|
851
|
+
const queryParameters = {};
|
|
852
|
+
const headerParameters = {};
|
|
853
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
854
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
855
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
856
|
+
}
|
|
857
|
+
const response = await this.request({
|
|
858
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/git/pull`
|
|
859
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
860
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
861
|
+
method: 'POST',
|
|
862
|
+
headers: headerParameters,
|
|
863
|
+
query: queryParameters,
|
|
864
|
+
body: (0, index_1.GitRepoRequestToJSON)(requestParameters['params']),
|
|
865
|
+
}, initOverrides);
|
|
866
|
+
return new runtime.VoidApiResponse(response);
|
|
867
|
+
}
|
|
868
|
+
/**
|
|
869
|
+
* Pull changes from remote to git repository inside workspace project
|
|
870
|
+
* Pull changes
|
|
871
|
+
*/
|
|
872
|
+
async gitPullChanges(requestParameters, initOverrides) {
|
|
873
|
+
await this.gitPullChangesRaw(requestParameters, initOverrides);
|
|
874
|
+
}
|
|
875
|
+
/**
|
|
876
|
+
* Push changes to remote from git repository inside workspace project
|
|
877
|
+
* Push changes
|
|
878
|
+
*/
|
|
879
|
+
async gitPushChangesRaw(requestParameters, initOverrides) {
|
|
880
|
+
if (requestParameters['workspaceId'] == null) {
|
|
881
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling gitPushChanges().');
|
|
882
|
+
}
|
|
883
|
+
if (requestParameters['projectId'] == null) {
|
|
884
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling gitPushChanges().');
|
|
885
|
+
}
|
|
886
|
+
if (requestParameters['params'] == null) {
|
|
887
|
+
throw new runtime.RequiredError('params', 'Required parameter "params" was null or undefined when calling gitPushChanges().');
|
|
888
|
+
}
|
|
889
|
+
const queryParameters = {};
|
|
890
|
+
const headerParameters = {};
|
|
891
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
892
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
893
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
894
|
+
}
|
|
895
|
+
const response = await this.request({
|
|
896
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/git/push`
|
|
897
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
898
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
899
|
+
method: 'POST',
|
|
900
|
+
headers: headerParameters,
|
|
901
|
+
query: queryParameters,
|
|
902
|
+
body: (0, index_1.GitRepoRequestToJSON)(requestParameters['params']),
|
|
903
|
+
}, initOverrides);
|
|
904
|
+
return new runtime.VoidApiResponse(response);
|
|
905
|
+
}
|
|
906
|
+
/**
|
|
907
|
+
* Push changes to remote from git repository inside workspace project
|
|
908
|
+
* Push changes
|
|
909
|
+
*/
|
|
910
|
+
async gitPushChanges(requestParameters, initOverrides) {
|
|
911
|
+
await this.gitPushChangesRaw(requestParameters, initOverrides);
|
|
912
|
+
}
|
|
913
|
+
/**
|
|
914
|
+
* The Completion request is sent from the client to the server to compute completion items at a given cursor position.
|
|
915
|
+
* Get Lsp Completions
|
|
916
|
+
*/
|
|
917
|
+
async lspCompletionsRaw(requestParameters, initOverrides) {
|
|
918
|
+
if (requestParameters['workspaceId'] == null) {
|
|
919
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling lspCompletions().');
|
|
920
|
+
}
|
|
921
|
+
if (requestParameters['projectId'] == null) {
|
|
922
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling lspCompletions().');
|
|
923
|
+
}
|
|
924
|
+
if (requestParameters['params'] == null) {
|
|
925
|
+
throw new runtime.RequiredError('params', 'Required parameter "params" was null or undefined when calling lspCompletions().');
|
|
926
|
+
}
|
|
927
|
+
const queryParameters = {};
|
|
928
|
+
const headerParameters = {};
|
|
929
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
930
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
931
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
932
|
+
}
|
|
933
|
+
const response = await this.request({
|
|
934
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/lsp/completions`
|
|
935
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
936
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
937
|
+
method: 'POST',
|
|
938
|
+
headers: headerParameters,
|
|
939
|
+
query: queryParameters,
|
|
940
|
+
body: (0, index_1.LspCompletionParamsToJSON)(requestParameters['params']),
|
|
941
|
+
}, initOverrides);
|
|
942
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CompletionListFromJSON)(jsonValue));
|
|
943
|
+
}
|
|
944
|
+
/**
|
|
945
|
+
* The Completion request is sent from the client to the server to compute completion items at a given cursor position.
|
|
946
|
+
* Get Lsp Completions
|
|
947
|
+
*/
|
|
948
|
+
async lspCompletions(requestParameters, initOverrides) {
|
|
949
|
+
const response = await this.lspCompletionsRaw(requestParameters, initOverrides);
|
|
950
|
+
return await response.value();
|
|
951
|
+
}
|
|
952
|
+
/**
|
|
953
|
+
* The document close notification is sent from the client to the server when the document got closed in the client.
|
|
954
|
+
* Call Lsp DidClose
|
|
955
|
+
*/
|
|
956
|
+
async lspDidCloseRaw(requestParameters, initOverrides) {
|
|
957
|
+
if (requestParameters['workspaceId'] == null) {
|
|
958
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling lspDidClose().');
|
|
959
|
+
}
|
|
960
|
+
if (requestParameters['projectId'] == null) {
|
|
961
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling lspDidClose().');
|
|
962
|
+
}
|
|
963
|
+
if (requestParameters['params'] == null) {
|
|
964
|
+
throw new runtime.RequiredError('params', 'Required parameter "params" was null or undefined when calling lspDidClose().');
|
|
965
|
+
}
|
|
966
|
+
const queryParameters = {};
|
|
967
|
+
const headerParameters = {};
|
|
968
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
969
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
970
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
971
|
+
}
|
|
972
|
+
const response = await this.request({
|
|
973
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/lsp/did-close`
|
|
974
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
975
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
976
|
+
method: 'POST',
|
|
977
|
+
headers: headerParameters,
|
|
978
|
+
query: queryParameters,
|
|
979
|
+
body: (0, index_1.LspDocumentRequestToJSON)(requestParameters['params']),
|
|
980
|
+
}, initOverrides);
|
|
981
|
+
return new runtime.VoidApiResponse(response);
|
|
982
|
+
}
|
|
983
|
+
/**
|
|
984
|
+
* The document close notification is sent from the client to the server when the document got closed in the client.
|
|
985
|
+
* Call Lsp DidClose
|
|
986
|
+
*/
|
|
987
|
+
async lspDidClose(requestParameters, initOverrides) {
|
|
988
|
+
await this.lspDidCloseRaw(requestParameters, initOverrides);
|
|
989
|
+
}
|
|
990
|
+
/**
|
|
991
|
+
* The document open notification is sent from the client to the server to signal newly opened text documents.
|
|
992
|
+
* Call Lsp DidOpen
|
|
993
|
+
*/
|
|
994
|
+
async lspDidOpenRaw(requestParameters, initOverrides) {
|
|
995
|
+
if (requestParameters['workspaceId'] == null) {
|
|
996
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling lspDidOpen().');
|
|
997
|
+
}
|
|
998
|
+
if (requestParameters['projectId'] == null) {
|
|
999
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling lspDidOpen().');
|
|
1000
|
+
}
|
|
1001
|
+
if (requestParameters['params'] == null) {
|
|
1002
|
+
throw new runtime.RequiredError('params', 'Required parameter "params" was null or undefined when calling lspDidOpen().');
|
|
1003
|
+
}
|
|
1004
|
+
const queryParameters = {};
|
|
1005
|
+
const headerParameters = {};
|
|
1006
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1007
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1008
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
1009
|
+
}
|
|
1010
|
+
const response = await this.request({
|
|
1011
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/lsp/did-open`
|
|
1012
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
1013
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
1014
|
+
method: 'POST',
|
|
1015
|
+
headers: headerParameters,
|
|
1016
|
+
query: queryParameters,
|
|
1017
|
+
body: (0, index_1.LspDocumentRequestToJSON)(requestParameters['params']),
|
|
1018
|
+
}, initOverrides);
|
|
1019
|
+
return new runtime.VoidApiResponse(response);
|
|
1020
|
+
}
|
|
1021
|
+
/**
|
|
1022
|
+
* The document open notification is sent from the client to the server to signal newly opened text documents.
|
|
1023
|
+
* Call Lsp DidOpen
|
|
1024
|
+
*/
|
|
1025
|
+
async lspDidOpen(requestParameters, initOverrides) {
|
|
1026
|
+
await this.lspDidOpenRaw(requestParameters, initOverrides);
|
|
1027
|
+
}
|
|
1028
|
+
/**
|
|
1029
|
+
* The document symbol request is sent from the client to the server.
|
|
1030
|
+
* Call Lsp DocumentSymbols
|
|
1031
|
+
*/
|
|
1032
|
+
async lspDocumentSymbolsRaw(requestParameters, initOverrides) {
|
|
1033
|
+
if (requestParameters['workspaceId'] == null) {
|
|
1034
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling lspDocumentSymbols().');
|
|
1035
|
+
}
|
|
1036
|
+
if (requestParameters['projectId'] == null) {
|
|
1037
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling lspDocumentSymbols().');
|
|
1038
|
+
}
|
|
1039
|
+
if (requestParameters['languageId'] == null) {
|
|
1040
|
+
throw new runtime.RequiredError('languageId', 'Required parameter "languageId" was null or undefined when calling lspDocumentSymbols().');
|
|
1041
|
+
}
|
|
1042
|
+
if (requestParameters['pathToProject'] == null) {
|
|
1043
|
+
throw new runtime.RequiredError('pathToProject', 'Required parameter "pathToProject" was null or undefined when calling lspDocumentSymbols().');
|
|
1044
|
+
}
|
|
1045
|
+
if (requestParameters['uri'] == null) {
|
|
1046
|
+
throw new runtime.RequiredError('uri', 'Required parameter "uri" was null or undefined when calling lspDocumentSymbols().');
|
|
1047
|
+
}
|
|
1048
|
+
const queryParameters = {};
|
|
1049
|
+
if (requestParameters['languageId'] != null) {
|
|
1050
|
+
queryParameters['languageId'] = requestParameters['languageId'];
|
|
1051
|
+
}
|
|
1052
|
+
if (requestParameters['pathToProject'] != null) {
|
|
1053
|
+
queryParameters['pathToProject'] = requestParameters['pathToProject'];
|
|
1054
|
+
}
|
|
1055
|
+
if (requestParameters['uri'] != null) {
|
|
1056
|
+
queryParameters['uri'] = requestParameters['uri'];
|
|
1057
|
+
}
|
|
1058
|
+
const headerParameters = {};
|
|
1059
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1060
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
1061
|
+
}
|
|
1062
|
+
const response = await this.request({
|
|
1063
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/lsp/document-symbols`
|
|
1064
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
1065
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
1066
|
+
method: 'GET',
|
|
1067
|
+
headers: headerParameters,
|
|
1068
|
+
query: queryParameters,
|
|
1069
|
+
}, initOverrides);
|
|
1070
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.LspSymbolFromJSON));
|
|
1071
|
+
}
|
|
1072
|
+
/**
|
|
1073
|
+
* The document symbol request is sent from the client to the server.
|
|
1074
|
+
* Call Lsp DocumentSymbols
|
|
1075
|
+
*/
|
|
1076
|
+
async lspDocumentSymbols(requestParameters, initOverrides) {
|
|
1077
|
+
const response = await this.lspDocumentSymbolsRaw(requestParameters, initOverrides);
|
|
1078
|
+
return await response.value();
|
|
1079
|
+
}
|
|
1080
|
+
/**
|
|
1081
|
+
* Start Lsp server process inside workspace project
|
|
1082
|
+
* Start Lsp server
|
|
1083
|
+
*/
|
|
1084
|
+
async lspStartRaw(requestParameters, initOverrides) {
|
|
1085
|
+
if (requestParameters['workspaceId'] == null) {
|
|
1086
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling lspStart().');
|
|
1087
|
+
}
|
|
1088
|
+
if (requestParameters['projectId'] == null) {
|
|
1089
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling lspStart().');
|
|
1090
|
+
}
|
|
1091
|
+
if (requestParameters['params'] == null) {
|
|
1092
|
+
throw new runtime.RequiredError('params', 'Required parameter "params" was null or undefined when calling lspStart().');
|
|
1093
|
+
}
|
|
1094
|
+
const queryParameters = {};
|
|
1095
|
+
const headerParameters = {};
|
|
1096
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1097
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1098
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
1099
|
+
}
|
|
1100
|
+
const response = await this.request({
|
|
1101
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/lsp/start`
|
|
1102
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
1103
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
1104
|
+
method: 'POST',
|
|
1105
|
+
headers: headerParameters,
|
|
1106
|
+
query: queryParameters,
|
|
1107
|
+
body: (0, index_1.LspServerRequestToJSON)(requestParameters['params']),
|
|
1108
|
+
}, initOverrides);
|
|
1109
|
+
return new runtime.VoidApiResponse(response);
|
|
1110
|
+
}
|
|
1111
|
+
/**
|
|
1112
|
+
* Start Lsp server process inside workspace project
|
|
1113
|
+
* Start Lsp server
|
|
1114
|
+
*/
|
|
1115
|
+
async lspStart(requestParameters, initOverrides) {
|
|
1116
|
+
await this.lspStartRaw(requestParameters, initOverrides);
|
|
1117
|
+
}
|
|
1118
|
+
/**
|
|
1119
|
+
* Stop Lsp server process inside workspace project
|
|
1120
|
+
* Stop Lsp server
|
|
1121
|
+
*/
|
|
1122
|
+
async lspStopRaw(requestParameters, initOverrides) {
|
|
1123
|
+
if (requestParameters['workspaceId'] == null) {
|
|
1124
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling lspStop().');
|
|
1125
|
+
}
|
|
1126
|
+
if (requestParameters['projectId'] == null) {
|
|
1127
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling lspStop().');
|
|
1128
|
+
}
|
|
1129
|
+
if (requestParameters['params'] == null) {
|
|
1130
|
+
throw new runtime.RequiredError('params', 'Required parameter "params" was null or undefined when calling lspStop().');
|
|
1131
|
+
}
|
|
1132
|
+
const queryParameters = {};
|
|
1133
|
+
const headerParameters = {};
|
|
1134
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1135
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1136
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
1137
|
+
}
|
|
1138
|
+
const response = await this.request({
|
|
1139
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/lsp/stop`
|
|
1140
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
1141
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
1142
|
+
method: 'POST',
|
|
1143
|
+
headers: headerParameters,
|
|
1144
|
+
query: queryParameters,
|
|
1145
|
+
body: (0, index_1.LspServerRequestToJSON)(requestParameters['params']),
|
|
1146
|
+
}, initOverrides);
|
|
1147
|
+
return new runtime.VoidApiResponse(response);
|
|
1148
|
+
}
|
|
1149
|
+
/**
|
|
1150
|
+
* Stop Lsp server process inside workspace project
|
|
1151
|
+
* Stop Lsp server
|
|
1152
|
+
*/
|
|
1153
|
+
async lspStop(requestParameters, initOverrides) {
|
|
1154
|
+
await this.lspStopRaw(requestParameters, initOverrides);
|
|
1155
|
+
}
|
|
1156
|
+
/**
|
|
1157
|
+
* The workspace symbol request is sent from the client to the server to list project-wide symbols matching the query string.
|
|
1158
|
+
* Call Lsp WorkspaceSymbols
|
|
1159
|
+
*/
|
|
1160
|
+
async lspWorkspaceSymbolsRaw(requestParameters, initOverrides) {
|
|
1161
|
+
if (requestParameters['workspaceId'] == null) {
|
|
1162
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling lspWorkspaceSymbols().');
|
|
1163
|
+
}
|
|
1164
|
+
if (requestParameters['projectId'] == null) {
|
|
1165
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling lspWorkspaceSymbols().');
|
|
1166
|
+
}
|
|
1167
|
+
if (requestParameters['languageId'] == null) {
|
|
1168
|
+
throw new runtime.RequiredError('languageId', 'Required parameter "languageId" was null or undefined when calling lspWorkspaceSymbols().');
|
|
1169
|
+
}
|
|
1170
|
+
if (requestParameters['pathToProject'] == null) {
|
|
1171
|
+
throw new runtime.RequiredError('pathToProject', 'Required parameter "pathToProject" was null or undefined when calling lspWorkspaceSymbols().');
|
|
1172
|
+
}
|
|
1173
|
+
if (requestParameters['query'] == null) {
|
|
1174
|
+
throw new runtime.RequiredError('query', 'Required parameter "query" was null or undefined when calling lspWorkspaceSymbols().');
|
|
1175
|
+
}
|
|
1176
|
+
const queryParameters = {};
|
|
1177
|
+
if (requestParameters['languageId'] != null) {
|
|
1178
|
+
queryParameters['languageId'] = requestParameters['languageId'];
|
|
1179
|
+
}
|
|
1180
|
+
if (requestParameters['pathToProject'] != null) {
|
|
1181
|
+
queryParameters['pathToProject'] = requestParameters['pathToProject'];
|
|
1182
|
+
}
|
|
1183
|
+
if (requestParameters['query'] != null) {
|
|
1184
|
+
queryParameters['query'] = requestParameters['query'];
|
|
1185
|
+
}
|
|
1186
|
+
const headerParameters = {};
|
|
1187
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1188
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
1189
|
+
}
|
|
1190
|
+
const response = await this.request({
|
|
1191
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/lsp/workspace-symbols`
|
|
1192
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
1193
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
1194
|
+
method: 'GET',
|
|
1195
|
+
headers: headerParameters,
|
|
1196
|
+
query: queryParameters,
|
|
1197
|
+
}, initOverrides);
|
|
1198
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.LspSymbolFromJSON));
|
|
1199
|
+
}
|
|
1200
|
+
/**
|
|
1201
|
+
* The workspace symbol request is sent from the client to the server to list project-wide symbols matching the query string.
|
|
1202
|
+
* Call Lsp WorkspaceSymbols
|
|
1203
|
+
*/
|
|
1204
|
+
async lspWorkspaceSymbols(requestParameters, initOverrides) {
|
|
1205
|
+
const response = await this.lspWorkspaceSymbolsRaw(requestParameters, initOverrides);
|
|
1206
|
+
return await response.value();
|
|
1207
|
+
}
|
|
1208
|
+
/**
|
|
1209
|
+
* Execute command synchronously inside workspace project
|
|
1210
|
+
* Execute command
|
|
1211
|
+
*/
|
|
1212
|
+
async processExecuteCommandRaw(requestParameters, initOverrides) {
|
|
1213
|
+
if (requestParameters['workspaceId'] == null) {
|
|
1214
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter "workspaceId" was null or undefined when calling processExecuteCommand().');
|
|
1215
|
+
}
|
|
1216
|
+
if (requestParameters['projectId'] == null) {
|
|
1217
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling processExecuteCommand().');
|
|
1218
|
+
}
|
|
1219
|
+
if (requestParameters['params'] == null) {
|
|
1220
|
+
throw new runtime.RequiredError('params', 'Required parameter "params" was null or undefined when calling processExecuteCommand().');
|
|
1221
|
+
}
|
|
1222
|
+
const queryParameters = {};
|
|
1223
|
+
const headerParameters = {};
|
|
1224
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1225
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1226
|
+
headerParameters['Authorization'] = await this.configuration.apiKey('Authorization'); // Bearer authentication
|
|
1227
|
+
}
|
|
1228
|
+
const response = await this.request({
|
|
1229
|
+
path: `/workspace/{workspaceId}/{projectId}/toolbox/process/execute`
|
|
1230
|
+
.replace(`{${'workspaceId'}}`, encodeURIComponent(String(requestParameters['workspaceId'])))
|
|
1231
|
+
.replace(`{${'projectId'}}`, encodeURIComponent(String(requestParameters['projectId']))),
|
|
1232
|
+
method: 'POST',
|
|
1233
|
+
headers: headerParameters,
|
|
1234
|
+
query: queryParameters,
|
|
1235
|
+
body: (0, index_1.ExecuteRequestToJSON)(requestParameters['params']),
|
|
1236
|
+
}, initOverrides);
|
|
1237
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ExecuteResponseFromJSON)(jsonValue));
|
|
1238
|
+
}
|
|
1239
|
+
/**
|
|
1240
|
+
* Execute command synchronously inside workspace project
|
|
1241
|
+
* Execute command
|
|
1242
|
+
*/
|
|
1243
|
+
async processExecuteCommand(requestParameters, initOverrides) {
|
|
1244
|
+
const response = await this.processExecuteCommandRaw(requestParameters, initOverrides);
|
|
1245
|
+
return await response.value();
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
exports.WorkspaceToolboxApi = WorkspaceToolboxApi;
|