@daytonaio/api-client 0.4.0 → 0.5.0
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/.openapi-generator/FILES +4 -8
- package/README.md +2 -2
- package/api/api-keys-api.ts +353 -0
- package/api/default-api.ts +36 -3313
- package/api/docker-registry-api.ts +108 -108
- package/api/nodes-api.ts +274 -0
- package/api/users-api.ts +274 -0
- package/api/workspace-api.ts +760 -0
- package/api.ts +4 -0
- package/dist/api/api-keys-api.d.ts +171 -0
- package/dist/api/api-keys-api.js +339 -0
- package/dist/api/default-api.d.ts +15 -1454
- package/dist/api/default-api.js +43 -3090
- package/dist/api/docker-registry-api.d.ts +64 -64
- package/dist/api/docker-registry-api.js +108 -108
- package/dist/api/nodes-api.d.ts +135 -0
- package/dist/api/nodes-api.js +270 -0
- package/dist/api/users-api.d.ts +135 -0
- package/dist/api/users-api.js +270 -0
- package/dist/api/workspace-api.d.ts +356 -0
- package/dist/api/workspace-api.js +722 -0
- package/dist/api.d.ts +4 -0
- package/dist/api.js +4 -0
- package/dist/esm/api/api-keys-api.d.ts +171 -0
- package/dist/esm/api/api-keys-api.js +332 -0
- package/dist/esm/api/default-api.d.ts +15 -1454
- package/dist/esm/api/default-api.js +41 -3088
- package/dist/esm/api/docker-registry-api.d.ts +64 -64
- package/dist/esm/api/docker-registry-api.js +108 -108
- package/dist/esm/api/nodes-api.d.ts +135 -0
- package/dist/esm/api/nodes-api.js +263 -0
- package/dist/esm/api/users-api.d.ts +135 -0
- package/dist/esm/api/users-api.js +263 -0
- package/dist/esm/api/workspace-api.d.ts +356 -0
- package/dist/esm/api/workspace-api.js +715 -0
- package/dist/esm/api.d.ts +4 -0
- package/dist/esm/api.js +4 -0
- package/dist/esm/models/create-workspace-dto.d.ts +1 -1
- package/dist/esm/models/index.d.ts +0 -8
- package/dist/esm/models/index.js +0 -8
- package/dist/esm/models/workspace-dto.d.ts +14 -0
- package/dist/models/create-workspace-dto.d.ts +1 -1
- package/dist/models/index.d.ts +0 -8
- package/dist/models/index.js +0 -8
- package/dist/models/workspace-dto.d.ts +14 -0
- package/models/create-workspace-dto.ts +1 -1
- package/models/index.ts +0 -8
- package/models/workspace-dto.ts +12 -0
- package/package.json +1 -1
- package/dist/esm/models/execute-request-dto.d.ts +0 -30
- package/dist/esm/models/execute-request-dto.js +0 -14
- package/dist/esm/models/execute-response-dto.d.ts +0 -30
- package/dist/esm/models/execute-response-dto.js +0 -14
- package/dist/esm/models/git-add-request-dto.d.ts +0 -30
- package/dist/esm/models/git-add-request-dto.js +0 -14
- package/dist/esm/models/git-branch-request-dto.d.ts +0 -30
- package/dist/esm/models/git-branch-request-dto.js +0 -14
- package/dist/esm/models/git-clone-request-dto.d.ts +0 -54
- package/dist/esm/models/git-clone-request-dto.js +0 -14
- package/dist/esm/models/git-commit-request-dto.d.ts +0 -42
- package/dist/esm/models/git-commit-request-dto.js +0 -14
- package/dist/esm/models/git-repo-request-dto.d.ts +0 -36
- package/dist/esm/models/git-repo-request-dto.js +0 -14
- package/dist/esm/models/replace-request-dto.d.ts +0 -36
- package/dist/esm/models/replace-request-dto.js +0 -14
- package/dist/models/execute-request-dto.d.ts +0 -30
- package/dist/models/execute-request-dto.js +0 -15
- package/dist/models/execute-response-dto.d.ts +0 -30
- package/dist/models/execute-response-dto.js +0 -15
- package/dist/models/git-add-request-dto.d.ts +0 -30
- package/dist/models/git-add-request-dto.js +0 -15
- package/dist/models/git-branch-request-dto.d.ts +0 -30
- package/dist/models/git-branch-request-dto.js +0 -15
- package/dist/models/git-clone-request-dto.d.ts +0 -54
- package/dist/models/git-clone-request-dto.js +0 -15
- package/dist/models/git-commit-request-dto.d.ts +0 -42
- package/dist/models/git-commit-request-dto.js +0 -15
- package/dist/models/git-repo-request-dto.d.ts +0 -36
- package/dist/models/git-repo-request-dto.js +0 -15
- package/dist/models/replace-request-dto.d.ts +0 -36
- package/dist/models/replace-request-dto.js +0 -15
- package/models/execute-request-dto.ts +0 -36
- package/models/execute-response-dto.ts +0 -36
- package/models/git-add-request-dto.ts +0 -36
- package/models/git-branch-request-dto.ts +0 -36
- package/models/git-clone-request-dto.ts +0 -60
- package/models/git-commit-request-dto.ts +0 -48
- package/models/git-repo-request-dto.ts +0 -42
- package/models/replace-request-dto.ts +0 -42
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Daytona Workspaces
|
|
5
|
+
* Daytona Workspaces API Docs
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import globalAxios from 'axios';
|
|
24
|
+
// Some imports not used depending on template conditions
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { DUMMY_BASE_URL, assertParamExists, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
|
|
29
|
+
/**
|
|
30
|
+
* NodesApi - axios parameter creator
|
|
31
|
+
* @export
|
|
32
|
+
*/
|
|
33
|
+
export const NodesApiAxiosParamCreator = function (configuration) {
|
|
34
|
+
return {
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @summary Create node
|
|
38
|
+
* @param {object} body
|
|
39
|
+
* @param {*} [options] Override http request option.
|
|
40
|
+
* @throws {RequiredError}
|
|
41
|
+
*/
|
|
42
|
+
createNode: (body_1, ...args_1) => __awaiter(this, [body_1, ...args_1], void 0, function* (body, options = {}) {
|
|
43
|
+
// verify required parameter 'body' is not null or undefined
|
|
44
|
+
assertParamExists('createNode', 'body', body);
|
|
45
|
+
const localVarPath = `/nodes`;
|
|
46
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
47
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
48
|
+
let baseOptions;
|
|
49
|
+
if (configuration) {
|
|
50
|
+
baseOptions = configuration.baseOptions;
|
|
51
|
+
}
|
|
52
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
53
|
+
const localVarHeaderParameter = {};
|
|
54
|
+
const localVarQueryParameter = {};
|
|
55
|
+
// authentication oauth2 required
|
|
56
|
+
// oauth required
|
|
57
|
+
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
|
|
58
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
59
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
60
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
61
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
62
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
63
|
+
return {
|
|
64
|
+
url: toPathString(localVarUrlObj),
|
|
65
|
+
options: localVarRequestOptions,
|
|
66
|
+
};
|
|
67
|
+
}),
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @summary List all nodes
|
|
71
|
+
* @param {*} [options] Override http request option.
|
|
72
|
+
* @throws {RequiredError}
|
|
73
|
+
*/
|
|
74
|
+
listNodes: (...args_2) => __awaiter(this, [...args_2], void 0, function* (options = {}) {
|
|
75
|
+
const localVarPath = `/nodes`;
|
|
76
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
77
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
78
|
+
let baseOptions;
|
|
79
|
+
if (configuration) {
|
|
80
|
+
baseOptions = configuration.baseOptions;
|
|
81
|
+
}
|
|
82
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
83
|
+
const localVarHeaderParameter = {};
|
|
84
|
+
const localVarQueryParameter = {};
|
|
85
|
+
// authentication oauth2 required
|
|
86
|
+
// oauth required
|
|
87
|
+
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
|
|
88
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
89
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
90
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
91
|
+
return {
|
|
92
|
+
url: toPathString(localVarUrlObj),
|
|
93
|
+
options: localVarRequestOptions,
|
|
94
|
+
};
|
|
95
|
+
}),
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @summary Update node scheduling status
|
|
99
|
+
* @param {string} id
|
|
100
|
+
* @param {*} [options] Override http request option.
|
|
101
|
+
* @throws {RequiredError}
|
|
102
|
+
*/
|
|
103
|
+
updateNodeScheduling: (id_1, ...args_3) => __awaiter(this, [id_1, ...args_3], void 0, function* (id, options = {}) {
|
|
104
|
+
// verify required parameter 'id' is not null or undefined
|
|
105
|
+
assertParamExists('updateNodeScheduling', 'id', id);
|
|
106
|
+
const localVarPath = `/nodes/{id}/scheduling`
|
|
107
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
108
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
109
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
110
|
+
let baseOptions;
|
|
111
|
+
if (configuration) {
|
|
112
|
+
baseOptions = configuration.baseOptions;
|
|
113
|
+
}
|
|
114
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
115
|
+
const localVarHeaderParameter = {};
|
|
116
|
+
const localVarQueryParameter = {};
|
|
117
|
+
// authentication oauth2 required
|
|
118
|
+
// oauth required
|
|
119
|
+
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
|
|
120
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
121
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
122
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
123
|
+
return {
|
|
124
|
+
url: toPathString(localVarUrlObj),
|
|
125
|
+
options: localVarRequestOptions,
|
|
126
|
+
};
|
|
127
|
+
}),
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* NodesApi - functional programming interface
|
|
132
|
+
* @export
|
|
133
|
+
*/
|
|
134
|
+
export const NodesApiFp = function (configuration) {
|
|
135
|
+
const localVarAxiosParamCreator = NodesApiAxiosParamCreator(configuration);
|
|
136
|
+
return {
|
|
137
|
+
/**
|
|
138
|
+
*
|
|
139
|
+
* @summary Create node
|
|
140
|
+
* @param {object} body
|
|
141
|
+
* @param {*} [options] Override http request option.
|
|
142
|
+
* @throws {RequiredError}
|
|
143
|
+
*/
|
|
144
|
+
createNode(body, options) {
|
|
145
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
146
|
+
var _a, _b, _c;
|
|
147
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createNode(body, options);
|
|
148
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
149
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['NodesApi.createNode']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
150
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
151
|
+
});
|
|
152
|
+
},
|
|
153
|
+
/**
|
|
154
|
+
*
|
|
155
|
+
* @summary List all nodes
|
|
156
|
+
* @param {*} [options] Override http request option.
|
|
157
|
+
* @throws {RequiredError}
|
|
158
|
+
*/
|
|
159
|
+
listNodes(options) {
|
|
160
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
161
|
+
var _a, _b, _c;
|
|
162
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listNodes(options);
|
|
163
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
164
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['NodesApi.listNodes']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
165
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
166
|
+
});
|
|
167
|
+
},
|
|
168
|
+
/**
|
|
169
|
+
*
|
|
170
|
+
* @summary Update node scheduling status
|
|
171
|
+
* @param {string} id
|
|
172
|
+
* @param {*} [options] Override http request option.
|
|
173
|
+
* @throws {RequiredError}
|
|
174
|
+
*/
|
|
175
|
+
updateNodeScheduling(id, options) {
|
|
176
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
177
|
+
var _a, _b, _c;
|
|
178
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateNodeScheduling(id, options);
|
|
179
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
180
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['NodesApi.updateNodeScheduling']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
181
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
182
|
+
});
|
|
183
|
+
},
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* NodesApi - factory interface
|
|
188
|
+
* @export
|
|
189
|
+
*/
|
|
190
|
+
export const NodesApiFactory = function (configuration, basePath, axios) {
|
|
191
|
+
const localVarFp = NodesApiFp(configuration);
|
|
192
|
+
return {
|
|
193
|
+
/**
|
|
194
|
+
*
|
|
195
|
+
* @summary Create node
|
|
196
|
+
* @param {object} body
|
|
197
|
+
* @param {*} [options] Override http request option.
|
|
198
|
+
* @throws {RequiredError}
|
|
199
|
+
*/
|
|
200
|
+
createNode(body, options) {
|
|
201
|
+
return localVarFp.createNode(body, options).then((request) => request(axios, basePath));
|
|
202
|
+
},
|
|
203
|
+
/**
|
|
204
|
+
*
|
|
205
|
+
* @summary List all nodes
|
|
206
|
+
* @param {*} [options] Override http request option.
|
|
207
|
+
* @throws {RequiredError}
|
|
208
|
+
*/
|
|
209
|
+
listNodes(options) {
|
|
210
|
+
return localVarFp.listNodes(options).then((request) => request(axios, basePath));
|
|
211
|
+
},
|
|
212
|
+
/**
|
|
213
|
+
*
|
|
214
|
+
* @summary Update node scheduling status
|
|
215
|
+
* @param {string} id
|
|
216
|
+
* @param {*} [options] Override http request option.
|
|
217
|
+
* @throws {RequiredError}
|
|
218
|
+
*/
|
|
219
|
+
updateNodeScheduling(id, options) {
|
|
220
|
+
return localVarFp.updateNodeScheduling(id, options).then((request) => request(axios, basePath));
|
|
221
|
+
},
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
/**
|
|
225
|
+
* NodesApi - object-oriented interface
|
|
226
|
+
* @export
|
|
227
|
+
* @class NodesApi
|
|
228
|
+
* @extends {BaseAPI}
|
|
229
|
+
*/
|
|
230
|
+
export class NodesApi extends BaseAPI {
|
|
231
|
+
/**
|
|
232
|
+
*
|
|
233
|
+
* @summary Create node
|
|
234
|
+
* @param {object} body
|
|
235
|
+
* @param {*} [options] Override http request option.
|
|
236
|
+
* @throws {RequiredError}
|
|
237
|
+
* @memberof NodesApi
|
|
238
|
+
*/
|
|
239
|
+
createNode(body, options) {
|
|
240
|
+
return NodesApiFp(this.configuration).createNode(body, options).then((request) => request(this.axios, this.basePath));
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
*
|
|
244
|
+
* @summary List all nodes
|
|
245
|
+
* @param {*} [options] Override http request option.
|
|
246
|
+
* @throws {RequiredError}
|
|
247
|
+
* @memberof NodesApi
|
|
248
|
+
*/
|
|
249
|
+
listNodes(options) {
|
|
250
|
+
return NodesApiFp(this.configuration).listNodes(options).then((request) => request(this.axios, this.basePath));
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
*
|
|
254
|
+
* @summary Update node scheduling status
|
|
255
|
+
* @param {string} id
|
|
256
|
+
* @param {*} [options] Override http request option.
|
|
257
|
+
* @throws {RequiredError}
|
|
258
|
+
* @memberof NodesApi
|
|
259
|
+
*/
|
|
260
|
+
updateNodeScheduling(id, options) {
|
|
261
|
+
return NodesApiFp(this.configuration).updateNodeScheduling(id, options).then((request) => request(this.axios, this.basePath));
|
|
262
|
+
}
|
|
263
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Daytona Workspaces
|
|
3
|
+
* Daytona Workspaces API Docs
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Configuration } from '../configuration';
|
|
13
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
14
|
+
import { type RequestArgs, BaseAPI } from '../base';
|
|
15
|
+
/**
|
|
16
|
+
* UsersApi - axios parameter creator
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export declare const UsersApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @summary Create user
|
|
23
|
+
* @param {object} body
|
|
24
|
+
* @param {*} [options] Override http request option.
|
|
25
|
+
* @throws {RequiredError}
|
|
26
|
+
*/
|
|
27
|
+
createUser: (body: object, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @summary List all users
|
|
31
|
+
* @param {*} [options] Override http request option.
|
|
32
|
+
* @throws {RequiredError}
|
|
33
|
+
*/
|
|
34
|
+
listUsers: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @summary Regenerate user key pair
|
|
38
|
+
* @param {string} id
|
|
39
|
+
* @param {*} [options] Override http request option.
|
|
40
|
+
* @throws {RequiredError}
|
|
41
|
+
*/
|
|
42
|
+
regenerateKeyPair: (id: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* UsersApi - functional programming interface
|
|
46
|
+
* @export
|
|
47
|
+
*/
|
|
48
|
+
export declare const UsersApiFp: (configuration?: Configuration) => {
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @summary Create user
|
|
52
|
+
* @param {object} body
|
|
53
|
+
* @param {*} [options] Override http request option.
|
|
54
|
+
* @throws {RequiredError}
|
|
55
|
+
*/
|
|
56
|
+
createUser(body: object, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @summary List all users
|
|
60
|
+
* @param {*} [options] Override http request option.
|
|
61
|
+
* @throws {RequiredError}
|
|
62
|
+
*/
|
|
63
|
+
listUsers(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @summary Regenerate user key pair
|
|
67
|
+
* @param {string} id
|
|
68
|
+
* @param {*} [options] Override http request option.
|
|
69
|
+
* @throws {RequiredError}
|
|
70
|
+
*/
|
|
71
|
+
regenerateKeyPair(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* UsersApi - factory interface
|
|
75
|
+
* @export
|
|
76
|
+
*/
|
|
77
|
+
export declare const UsersApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @summary Create user
|
|
81
|
+
* @param {object} body
|
|
82
|
+
* @param {*} [options] Override http request option.
|
|
83
|
+
* @throws {RequiredError}
|
|
84
|
+
*/
|
|
85
|
+
createUser(body: object, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
86
|
+
/**
|
|
87
|
+
*
|
|
88
|
+
* @summary List all users
|
|
89
|
+
* @param {*} [options] Override http request option.
|
|
90
|
+
* @throws {RequiredError}
|
|
91
|
+
*/
|
|
92
|
+
listUsers(options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
93
|
+
/**
|
|
94
|
+
*
|
|
95
|
+
* @summary Regenerate user key pair
|
|
96
|
+
* @param {string} id
|
|
97
|
+
* @param {*} [options] Override http request option.
|
|
98
|
+
* @throws {RequiredError}
|
|
99
|
+
*/
|
|
100
|
+
regenerateKeyPair(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* UsersApi - object-oriented interface
|
|
104
|
+
* @export
|
|
105
|
+
* @class UsersApi
|
|
106
|
+
* @extends {BaseAPI}
|
|
107
|
+
*/
|
|
108
|
+
export declare class UsersApi extends BaseAPI {
|
|
109
|
+
/**
|
|
110
|
+
*
|
|
111
|
+
* @summary Create user
|
|
112
|
+
* @param {object} body
|
|
113
|
+
* @param {*} [options] Override http request option.
|
|
114
|
+
* @throws {RequiredError}
|
|
115
|
+
* @memberof UsersApi
|
|
116
|
+
*/
|
|
117
|
+
createUser(body: object, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
|
|
118
|
+
/**
|
|
119
|
+
*
|
|
120
|
+
* @summary List all users
|
|
121
|
+
* @param {*} [options] Override http request option.
|
|
122
|
+
* @throws {RequiredError}
|
|
123
|
+
* @memberof UsersApi
|
|
124
|
+
*/
|
|
125
|
+
listUsers(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
|
|
126
|
+
/**
|
|
127
|
+
*
|
|
128
|
+
* @summary Regenerate user key pair
|
|
129
|
+
* @param {string} id
|
|
130
|
+
* @param {*} [options] Override http request option.
|
|
131
|
+
* @throws {RequiredError}
|
|
132
|
+
* @memberof UsersApi
|
|
133
|
+
*/
|
|
134
|
+
regenerateKeyPair(id: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
|
|
135
|
+
}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Daytona Workspaces
|
|
5
|
+
* Daytona Workspaces API Docs
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import globalAxios from 'axios';
|
|
24
|
+
// Some imports not used depending on template conditions
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { DUMMY_BASE_URL, assertParamExists, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
|
|
29
|
+
/**
|
|
30
|
+
* UsersApi - axios parameter creator
|
|
31
|
+
* @export
|
|
32
|
+
*/
|
|
33
|
+
export const UsersApiAxiosParamCreator = function (configuration) {
|
|
34
|
+
return {
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @summary Create user
|
|
38
|
+
* @param {object} body
|
|
39
|
+
* @param {*} [options] Override http request option.
|
|
40
|
+
* @throws {RequiredError}
|
|
41
|
+
*/
|
|
42
|
+
createUser: (body_1, ...args_1) => __awaiter(this, [body_1, ...args_1], void 0, function* (body, options = {}) {
|
|
43
|
+
// verify required parameter 'body' is not null or undefined
|
|
44
|
+
assertParamExists('createUser', 'body', body);
|
|
45
|
+
const localVarPath = `/users`;
|
|
46
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
47
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
48
|
+
let baseOptions;
|
|
49
|
+
if (configuration) {
|
|
50
|
+
baseOptions = configuration.baseOptions;
|
|
51
|
+
}
|
|
52
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
53
|
+
const localVarHeaderParameter = {};
|
|
54
|
+
const localVarQueryParameter = {};
|
|
55
|
+
// authentication oauth2 required
|
|
56
|
+
// oauth required
|
|
57
|
+
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
|
|
58
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
59
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
60
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
61
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
62
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
63
|
+
return {
|
|
64
|
+
url: toPathString(localVarUrlObj),
|
|
65
|
+
options: localVarRequestOptions,
|
|
66
|
+
};
|
|
67
|
+
}),
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @summary List all users
|
|
71
|
+
* @param {*} [options] Override http request option.
|
|
72
|
+
* @throws {RequiredError}
|
|
73
|
+
*/
|
|
74
|
+
listUsers: (...args_2) => __awaiter(this, [...args_2], void 0, function* (options = {}) {
|
|
75
|
+
const localVarPath = `/users`;
|
|
76
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
77
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
78
|
+
let baseOptions;
|
|
79
|
+
if (configuration) {
|
|
80
|
+
baseOptions = configuration.baseOptions;
|
|
81
|
+
}
|
|
82
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
83
|
+
const localVarHeaderParameter = {};
|
|
84
|
+
const localVarQueryParameter = {};
|
|
85
|
+
// authentication oauth2 required
|
|
86
|
+
// oauth required
|
|
87
|
+
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
|
|
88
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
89
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
90
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
91
|
+
return {
|
|
92
|
+
url: toPathString(localVarUrlObj),
|
|
93
|
+
options: localVarRequestOptions,
|
|
94
|
+
};
|
|
95
|
+
}),
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @summary Regenerate user key pair
|
|
99
|
+
* @param {string} id
|
|
100
|
+
* @param {*} [options] Override http request option.
|
|
101
|
+
* @throws {RequiredError}
|
|
102
|
+
*/
|
|
103
|
+
regenerateKeyPair: (id_1, ...args_3) => __awaiter(this, [id_1, ...args_3], void 0, function* (id, options = {}) {
|
|
104
|
+
// verify required parameter 'id' is not null or undefined
|
|
105
|
+
assertParamExists('regenerateKeyPair', 'id', id);
|
|
106
|
+
const localVarPath = `/users/{id}/regenerate-key-pair`
|
|
107
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
108
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
109
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
110
|
+
let baseOptions;
|
|
111
|
+
if (configuration) {
|
|
112
|
+
baseOptions = configuration.baseOptions;
|
|
113
|
+
}
|
|
114
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
115
|
+
const localVarHeaderParameter = {};
|
|
116
|
+
const localVarQueryParameter = {};
|
|
117
|
+
// authentication oauth2 required
|
|
118
|
+
// oauth required
|
|
119
|
+
yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
|
|
120
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
121
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
122
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
123
|
+
return {
|
|
124
|
+
url: toPathString(localVarUrlObj),
|
|
125
|
+
options: localVarRequestOptions,
|
|
126
|
+
};
|
|
127
|
+
}),
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* UsersApi - functional programming interface
|
|
132
|
+
* @export
|
|
133
|
+
*/
|
|
134
|
+
export const UsersApiFp = function (configuration) {
|
|
135
|
+
const localVarAxiosParamCreator = UsersApiAxiosParamCreator(configuration);
|
|
136
|
+
return {
|
|
137
|
+
/**
|
|
138
|
+
*
|
|
139
|
+
* @summary Create user
|
|
140
|
+
* @param {object} body
|
|
141
|
+
* @param {*} [options] Override http request option.
|
|
142
|
+
* @throws {RequiredError}
|
|
143
|
+
*/
|
|
144
|
+
createUser(body, options) {
|
|
145
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
146
|
+
var _a, _b, _c;
|
|
147
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createUser(body, options);
|
|
148
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
149
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.createUser']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
150
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
151
|
+
});
|
|
152
|
+
},
|
|
153
|
+
/**
|
|
154
|
+
*
|
|
155
|
+
* @summary List all users
|
|
156
|
+
* @param {*} [options] Override http request option.
|
|
157
|
+
* @throws {RequiredError}
|
|
158
|
+
*/
|
|
159
|
+
listUsers(options) {
|
|
160
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
161
|
+
var _a, _b, _c;
|
|
162
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listUsers(options);
|
|
163
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
164
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.listUsers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
165
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
166
|
+
});
|
|
167
|
+
},
|
|
168
|
+
/**
|
|
169
|
+
*
|
|
170
|
+
* @summary Regenerate user key pair
|
|
171
|
+
* @param {string} id
|
|
172
|
+
* @param {*} [options] Override http request option.
|
|
173
|
+
* @throws {RequiredError}
|
|
174
|
+
*/
|
|
175
|
+
regenerateKeyPair(id, options) {
|
|
176
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
177
|
+
var _a, _b, _c;
|
|
178
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.regenerateKeyPair(id, options);
|
|
179
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
180
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.regenerateKeyPair']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
181
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
182
|
+
});
|
|
183
|
+
},
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* UsersApi - factory interface
|
|
188
|
+
* @export
|
|
189
|
+
*/
|
|
190
|
+
export const UsersApiFactory = function (configuration, basePath, axios) {
|
|
191
|
+
const localVarFp = UsersApiFp(configuration);
|
|
192
|
+
return {
|
|
193
|
+
/**
|
|
194
|
+
*
|
|
195
|
+
* @summary Create user
|
|
196
|
+
* @param {object} body
|
|
197
|
+
* @param {*} [options] Override http request option.
|
|
198
|
+
* @throws {RequiredError}
|
|
199
|
+
*/
|
|
200
|
+
createUser(body, options) {
|
|
201
|
+
return localVarFp.createUser(body, options).then((request) => request(axios, basePath));
|
|
202
|
+
},
|
|
203
|
+
/**
|
|
204
|
+
*
|
|
205
|
+
* @summary List all users
|
|
206
|
+
* @param {*} [options] Override http request option.
|
|
207
|
+
* @throws {RequiredError}
|
|
208
|
+
*/
|
|
209
|
+
listUsers(options) {
|
|
210
|
+
return localVarFp.listUsers(options).then((request) => request(axios, basePath));
|
|
211
|
+
},
|
|
212
|
+
/**
|
|
213
|
+
*
|
|
214
|
+
* @summary Regenerate user key pair
|
|
215
|
+
* @param {string} id
|
|
216
|
+
* @param {*} [options] Override http request option.
|
|
217
|
+
* @throws {RequiredError}
|
|
218
|
+
*/
|
|
219
|
+
regenerateKeyPair(id, options) {
|
|
220
|
+
return localVarFp.regenerateKeyPair(id, options).then((request) => request(axios, basePath));
|
|
221
|
+
},
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
/**
|
|
225
|
+
* UsersApi - object-oriented interface
|
|
226
|
+
* @export
|
|
227
|
+
* @class UsersApi
|
|
228
|
+
* @extends {BaseAPI}
|
|
229
|
+
*/
|
|
230
|
+
export class UsersApi extends BaseAPI {
|
|
231
|
+
/**
|
|
232
|
+
*
|
|
233
|
+
* @summary Create user
|
|
234
|
+
* @param {object} body
|
|
235
|
+
* @param {*} [options] Override http request option.
|
|
236
|
+
* @throws {RequiredError}
|
|
237
|
+
* @memberof UsersApi
|
|
238
|
+
*/
|
|
239
|
+
createUser(body, options) {
|
|
240
|
+
return UsersApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath));
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
*
|
|
244
|
+
* @summary List all users
|
|
245
|
+
* @param {*} [options] Override http request option.
|
|
246
|
+
* @throws {RequiredError}
|
|
247
|
+
* @memberof UsersApi
|
|
248
|
+
*/
|
|
249
|
+
listUsers(options) {
|
|
250
|
+
return UsersApiFp(this.configuration).listUsers(options).then((request) => request(this.axios, this.basePath));
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
*
|
|
254
|
+
* @summary Regenerate user key pair
|
|
255
|
+
* @param {string} id
|
|
256
|
+
* @param {*} [options] Override http request option.
|
|
257
|
+
* @throws {RequiredError}
|
|
258
|
+
* @memberof UsersApi
|
|
259
|
+
*/
|
|
260
|
+
regenerateKeyPair(id, options) {
|
|
261
|
+
return UsersApiFp(this.configuration).regenerateKeyPair(id, options).then((request) => request(this.axios, this.basePath));
|
|
262
|
+
}
|
|
263
|
+
}
|