@daytonaio/api-client 0.17.0 → 0.17.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/.openapi-generator/FILES +0 -1
- package/api/workspace-api.ts +9 -13
- package/dist/api/api-keys-api.js +57 -40
- package/dist/api/docker-registry-api.js +93 -70
- package/dist/api/images-api.js +69 -50
- package/dist/api/nodes-api.js +45 -30
- package/dist/api/organizations-api.js +309 -250
- package/dist/api/preview-api.js +41 -26
- package/dist/api/toolbox-api.js +441 -360
- package/dist/api/users-api.js +53 -36
- package/dist/api/workspace-api.d.ts +8 -9
- package/dist/api/workspace-api.js +170 -137
- package/dist/common.js +34 -19
- package/dist/esm/api/api-keys-api.js +57 -40
- package/dist/esm/api/docker-registry-api.js +93 -70
- package/dist/esm/api/images-api.js +69 -50
- package/dist/esm/api/nodes-api.js +45 -30
- package/dist/esm/api/organizations-api.js +309 -250
- package/dist/esm/api/preview-api.js +41 -26
- package/dist/esm/api/toolbox-api.js +441 -360
- package/dist/esm/api/users-api.js +53 -36
- package/dist/esm/api/workspace-api.d.ts +8 -9
- package/dist/esm/api/workspace-api.js +170 -137
- package/dist/esm/common.js +34 -19
- package/dist/esm/models/index.d.ts +0 -1
- package/dist/esm/models/index.js +0 -1
- package/dist/models/index.d.ts +0 -1
- package/dist/models/index.js +0 -1
- package/models/index.ts +0 -1
- package/package.json +1 -1
- package/tsconfig.json +1 -1
- package/dist/esm/models/list-workspaces-labels-parameter.d.ts +0 -26
- package/dist/esm/models/list-workspaces-labels-parameter.js +0 -14
- package/dist/models/list-workspaces-labels-parameter.d.ts +0 -26
- package/dist/models/list-workspaces-labels-parameter.js +0 -15
- package/models/list-workspaces-labels-parameter.ts +0 -27
|
@@ -11,6 +11,15 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
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
|
+
};
|
|
14
23
|
import globalAxios from 'axios';
|
|
15
24
|
// Some imports not used depending on template conditions
|
|
16
25
|
// @ts-ignore
|
|
@@ -30,7 +39,7 @@ export const UsersApiAxiosParamCreator = function (configuration) {
|
|
|
30
39
|
* @param {*} [options] Override http request option.
|
|
31
40
|
* @throws {RequiredError}
|
|
32
41
|
*/
|
|
33
|
-
createUser:
|
|
42
|
+
createUser: (createUser_1, ...args_1) => __awaiter(this, [createUser_1, ...args_1], void 0, function* (createUser, options = {}) {
|
|
34
43
|
// verify required parameter 'createUser' is not null or undefined
|
|
35
44
|
assertParamExists('createUser', 'createUser', createUser);
|
|
36
45
|
const localVarPath = `/users`;
|
|
@@ -45,7 +54,7 @@ export const UsersApiAxiosParamCreator = function (configuration) {
|
|
|
45
54
|
const localVarQueryParameter = {};
|
|
46
55
|
// authentication oauth2 required
|
|
47
56
|
// oauth required
|
|
48
|
-
|
|
57
|
+
yield setOAuthToObject(localVarHeaderParameter, 'oauth2', ['openid', 'profile', 'email'], configuration);
|
|
49
58
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
50
59
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
51
60
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -55,14 +64,14 @@ export const UsersApiAxiosParamCreator = function (configuration) {
|
|
|
55
64
|
url: toPathString(localVarUrlObj),
|
|
56
65
|
options: localVarRequestOptions,
|
|
57
66
|
};
|
|
58
|
-
},
|
|
67
|
+
}),
|
|
59
68
|
/**
|
|
60
69
|
*
|
|
61
70
|
* @summary Get authenticated user
|
|
62
71
|
* @param {*} [options] Override http request option.
|
|
63
72
|
* @throws {RequiredError}
|
|
64
73
|
*/
|
|
65
|
-
getAuthenticatedUser:
|
|
74
|
+
getAuthenticatedUser: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
66
75
|
const localVarPath = `/users/me`;
|
|
67
76
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
68
77
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -75,7 +84,7 @@ export const UsersApiAxiosParamCreator = function (configuration) {
|
|
|
75
84
|
const localVarQueryParameter = {};
|
|
76
85
|
// authentication oauth2 required
|
|
77
86
|
// oauth required
|
|
78
|
-
|
|
87
|
+
yield setOAuthToObject(localVarHeaderParameter, 'oauth2', ['openid', 'profile', 'email'], configuration);
|
|
79
88
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
80
89
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
81
90
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -83,14 +92,14 @@ export const UsersApiAxiosParamCreator = function (configuration) {
|
|
|
83
92
|
url: toPathString(localVarUrlObj),
|
|
84
93
|
options: localVarRequestOptions,
|
|
85
94
|
};
|
|
86
|
-
},
|
|
95
|
+
}),
|
|
87
96
|
/**
|
|
88
97
|
*
|
|
89
98
|
* @summary List all users
|
|
90
99
|
* @param {*} [options] Override http request option.
|
|
91
100
|
* @throws {RequiredError}
|
|
92
101
|
*/
|
|
93
|
-
listUsers:
|
|
102
|
+
listUsers: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
94
103
|
const localVarPath = `/users`;
|
|
95
104
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
96
105
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -103,7 +112,7 @@ export const UsersApiAxiosParamCreator = function (configuration) {
|
|
|
103
112
|
const localVarQueryParameter = {};
|
|
104
113
|
// authentication oauth2 required
|
|
105
114
|
// oauth required
|
|
106
|
-
|
|
115
|
+
yield setOAuthToObject(localVarHeaderParameter, 'oauth2', ['openid', 'profile', 'email'], configuration);
|
|
107
116
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
108
117
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
109
118
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -111,7 +120,7 @@ export const UsersApiAxiosParamCreator = function (configuration) {
|
|
|
111
120
|
url: toPathString(localVarUrlObj),
|
|
112
121
|
options: localVarRequestOptions,
|
|
113
122
|
};
|
|
114
|
-
},
|
|
123
|
+
}),
|
|
115
124
|
/**
|
|
116
125
|
*
|
|
117
126
|
* @summary Regenerate user key pair
|
|
@@ -119,7 +128,7 @@ export const UsersApiAxiosParamCreator = function (configuration) {
|
|
|
119
128
|
* @param {*} [options] Override http request option.
|
|
120
129
|
* @throws {RequiredError}
|
|
121
130
|
*/
|
|
122
|
-
regenerateKeyPair:
|
|
131
|
+
regenerateKeyPair: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
|
|
123
132
|
// verify required parameter 'id' is not null or undefined
|
|
124
133
|
assertParamExists('regenerateKeyPair', 'id', id);
|
|
125
134
|
const localVarPath = `/users/{id}/regenerate-key-pair`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
|
|
@@ -134,7 +143,7 @@ export const UsersApiAxiosParamCreator = function (configuration) {
|
|
|
134
143
|
const localVarQueryParameter = {};
|
|
135
144
|
// authentication oauth2 required
|
|
136
145
|
// oauth required
|
|
137
|
-
|
|
146
|
+
yield setOAuthToObject(localVarHeaderParameter, 'oauth2', ['openid', 'profile', 'email'], configuration);
|
|
138
147
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
139
148
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
140
149
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -142,7 +151,7 @@ export const UsersApiAxiosParamCreator = function (configuration) {
|
|
|
142
151
|
url: toPathString(localVarUrlObj),
|
|
143
152
|
options: localVarRequestOptions,
|
|
144
153
|
};
|
|
145
|
-
},
|
|
154
|
+
}),
|
|
146
155
|
};
|
|
147
156
|
};
|
|
148
157
|
/**
|
|
@@ -159,12 +168,14 @@ export const UsersApiFp = function (configuration) {
|
|
|
159
168
|
* @param {*} [options] Override http request option.
|
|
160
169
|
* @throws {RequiredError}
|
|
161
170
|
*/
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
171
|
+
createUser(createUser, options) {
|
|
172
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
173
|
+
var _a, _b, _c;
|
|
174
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createUser(createUser, options);
|
|
175
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
176
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.createUser']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
177
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
178
|
+
});
|
|
168
179
|
},
|
|
169
180
|
/**
|
|
170
181
|
*
|
|
@@ -172,12 +183,14 @@ export const UsersApiFp = function (configuration) {
|
|
|
172
183
|
* @param {*} [options] Override http request option.
|
|
173
184
|
* @throws {RequiredError}
|
|
174
185
|
*/
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
186
|
+
getAuthenticatedUser(options) {
|
|
187
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
188
|
+
var _a, _b, _c;
|
|
189
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAuthenticatedUser(options);
|
|
190
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
191
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.getAuthenticatedUser']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
192
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
193
|
+
});
|
|
181
194
|
},
|
|
182
195
|
/**
|
|
183
196
|
*
|
|
@@ -185,12 +198,14 @@ export const UsersApiFp = function (configuration) {
|
|
|
185
198
|
* @param {*} [options] Override http request option.
|
|
186
199
|
* @throws {RequiredError}
|
|
187
200
|
*/
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
201
|
+
listUsers(options) {
|
|
202
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
203
|
+
var _a, _b, _c;
|
|
204
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listUsers(options);
|
|
205
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
206
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.listUsers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
207
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
208
|
+
});
|
|
194
209
|
},
|
|
195
210
|
/**
|
|
196
211
|
*
|
|
@@ -199,12 +214,14 @@ export const UsersApiFp = function (configuration) {
|
|
|
199
214
|
* @param {*} [options] Override http request option.
|
|
200
215
|
* @throws {RequiredError}
|
|
201
216
|
*/
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
217
|
+
regenerateKeyPair(id, options) {
|
|
218
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
219
|
+
var _a, _b, _c;
|
|
220
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.regenerateKeyPair(id, options);
|
|
221
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
222
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.regenerateKeyPair']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
223
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
224
|
+
});
|
|
208
225
|
},
|
|
209
226
|
};
|
|
210
227
|
};
|
|
@@ -13,7 +13,6 @@ import type { Configuration } from '../configuration';
|
|
|
13
13
|
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
14
14
|
import { type RequestArgs, BaseAPI } from '../base';
|
|
15
15
|
import type { CreateWorkspace } from '../models';
|
|
16
|
-
import type { ListWorkspacesLabelsParameter } from '../models';
|
|
17
16
|
import type { PortPreviewUrl } from '../models';
|
|
18
17
|
import type { Workspace } from '../models';
|
|
19
18
|
import type { WorkspaceLabels } from '../models';
|
|
@@ -84,11 +83,11 @@ export declare const WorkspaceApiAxiosParamCreator: (configuration?: Configurati
|
|
|
84
83
|
* @summary List all workspaces
|
|
85
84
|
* @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
|
|
86
85
|
* @param {boolean} [verbose] Include verbose output
|
|
87
|
-
* @param {
|
|
86
|
+
* @param {string} [labels] JSON encoded labels to filter by
|
|
88
87
|
* @param {*} [options] Override http request option.
|
|
89
88
|
* @throws {RequiredError}
|
|
90
89
|
*/
|
|
91
|
-
listWorkspaces: (xDaytonaOrganizationID?: string, verbose?: boolean, labels?:
|
|
90
|
+
listWorkspaces: (xDaytonaOrganizationID?: string, verbose?: boolean, labels?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
92
91
|
/**
|
|
93
92
|
*
|
|
94
93
|
* @summary Replace workspace labels
|
|
@@ -215,11 +214,11 @@ export declare const WorkspaceApiFp: (configuration?: Configuration) => {
|
|
|
215
214
|
* @summary List all workspaces
|
|
216
215
|
* @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
|
|
217
216
|
* @param {boolean} [verbose] Include verbose output
|
|
218
|
-
* @param {
|
|
217
|
+
* @param {string} [labels] JSON encoded labels to filter by
|
|
219
218
|
* @param {*} [options] Override http request option.
|
|
220
219
|
* @throws {RequiredError}
|
|
221
220
|
*/
|
|
222
|
-
listWorkspaces(xDaytonaOrganizationID?: string, verbose?: boolean, labels?:
|
|
221
|
+
listWorkspaces(xDaytonaOrganizationID?: string, verbose?: boolean, labels?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Workspace>>>;
|
|
223
222
|
/**
|
|
224
223
|
*
|
|
225
224
|
* @summary Replace workspace labels
|
|
@@ -346,11 +345,11 @@ export declare const WorkspaceApiFactory: (configuration?: Configuration, basePa
|
|
|
346
345
|
* @summary List all workspaces
|
|
347
346
|
* @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
|
|
348
347
|
* @param {boolean} [verbose] Include verbose output
|
|
349
|
-
* @param {
|
|
348
|
+
* @param {string} [labels] JSON encoded labels to filter by
|
|
350
349
|
* @param {*} [options] Override http request option.
|
|
351
350
|
* @throws {RequiredError}
|
|
352
351
|
*/
|
|
353
|
-
listWorkspaces(xDaytonaOrganizationID?: string, verbose?: boolean, labels?:
|
|
352
|
+
listWorkspaces(xDaytonaOrganizationID?: string, verbose?: boolean, labels?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Workspace>>;
|
|
354
353
|
/**
|
|
355
354
|
*
|
|
356
355
|
* @summary Replace workspace labels
|
|
@@ -485,12 +484,12 @@ export declare class WorkspaceApi extends BaseAPI {
|
|
|
485
484
|
* @summary List all workspaces
|
|
486
485
|
* @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
|
|
487
486
|
* @param {boolean} [verbose] Include verbose output
|
|
488
|
-
* @param {
|
|
487
|
+
* @param {string} [labels] JSON encoded labels to filter by
|
|
489
488
|
* @param {*} [options] Override http request option.
|
|
490
489
|
* @throws {RequiredError}
|
|
491
490
|
* @memberof WorkspaceApi
|
|
492
491
|
*/
|
|
493
|
-
listWorkspaces(xDaytonaOrganizationID?: string, verbose?: boolean, labels?:
|
|
492
|
+
listWorkspaces(xDaytonaOrganizationID?: string, verbose?: boolean, labels?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Workspace[], any>>;
|
|
494
493
|
/**
|
|
495
494
|
*
|
|
496
495
|
* @summary Replace workspace labels
|