@daytonaio/api-client 0.16.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 +1 -0
- package/api/api-keys-api.ts +16 -0
- package/api/docker-registry-api.ts +28 -0
- package/api/images-api.ts +20 -0
- package/api/nodes-api.ts +12 -0
- package/api/organizations-api.ts +301 -0
- package/api/preview-api.ts +4 -0
- package/api/toolbox-api.ts +144 -0
- package/api/workspace-api.ts +61 -11
- package/dist/api/api-keys-api.js +65 -36
- package/dist/api/docker-registry-api.js +107 -63
- package/dist/api/images-api.js +79 -45
- package/dist/api/nodes-api.js +51 -27
- package/dist/api/organizations-api.d.ts +71 -0
- package/dist/api/organizations-api.js +485 -207
- package/dist/api/preview-api.js +43 -25
- package/dist/api/toolbox-api.js +513 -324
- package/dist/api/users-api.js +53 -36
- package/dist/api/workspace-api.d.ts +8 -8
- package/dist/api/workspace-api.js +196 -124
- package/dist/common.js +34 -19
- package/dist/esm/api/api-keys-api.js +66 -37
- package/dist/esm/api/docker-registry-api.js +108 -64
- package/dist/esm/api/images-api.js +80 -46
- package/dist/esm/api/nodes-api.js +52 -28
- package/dist/esm/api/organizations-api.d.ts +71 -0
- package/dist/esm/api/organizations-api.js +486 -208
- package/dist/esm/api/preview-api.js +44 -26
- package/dist/esm/api/toolbox-api.js +514 -325
- package/dist/esm/api/users-api.js +53 -36
- package/dist/esm/api/workspace-api.d.ts +8 -8
- package/dist/esm/api/workspace-api.js +197 -125
- package/dist/esm/common.js +34 -19
- package/dist/esm/models/create-image.d.ts +2 -2
- package/dist/esm/models/create-organization.d.ts +0 -66
- package/dist/esm/models/create-workspace.d.ts +0 -12
- package/dist/esm/models/image-dto.d.ts +2 -2
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/esm/models/organization-suspension.d.ts +30 -0
- package/dist/esm/models/organization-suspension.js +14 -0
- package/dist/esm/models/organization.d.ts +24 -0
- package/dist/esm/models/workspace-info.d.ts +2 -1
- package/dist/esm/models/workspace-state.d.ts +1 -1
- package/dist/esm/models/workspace-state.js +1 -1
- package/dist/esm/models/workspace.d.ts +7 -0
- package/dist/models/create-image.d.ts +2 -2
- package/dist/models/create-organization.d.ts +0 -66
- package/dist/models/create-workspace.d.ts +0 -12
- package/dist/models/image-dto.d.ts +2 -2
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/models/organization-suspension.d.ts +30 -0
- package/dist/models/organization-suspension.js +15 -0
- package/dist/models/organization.d.ts +24 -0
- package/dist/models/workspace-info.d.ts +2 -1
- package/dist/models/workspace-state.d.ts +1 -1
- package/dist/models/workspace-state.js +1 -1
- package/dist/models/workspace.d.ts +7 -0
- package/models/create-image.ts +2 -2
- package/models/create-organization.ts +0 -66
- package/models/create-workspace.ts +0 -12
- package/models/image-dto.ts +2 -2
- package/models/index.ts +1 -0
- package/models/organization-suspension.ts +33 -0
- package/models/organization.ts +24 -0
- package/models/workspace-info.ts +2 -1
- package/models/workspace-state.ts +1 -1
- package/models/workspace.ts +7 -0
- package/package.json +1 -1
- package/tsconfig.json +1 -1
|
@@ -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
|
};
|
|
@@ -83,11 +83,11 @@ export declare const WorkspaceApiAxiosParamCreator: (configuration?: Configurati
|
|
|
83
83
|
* @summary List all workspaces
|
|
84
84
|
* @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
|
|
85
85
|
* @param {boolean} [verbose] Include verbose output
|
|
86
|
-
* @param {
|
|
86
|
+
* @param {string} [labels] JSON encoded labels to filter by
|
|
87
87
|
* @param {*} [options] Override http request option.
|
|
88
88
|
* @throws {RequiredError}
|
|
89
89
|
*/
|
|
90
|
-
listWorkspaces: (xDaytonaOrganizationID?: string, verbose?: boolean, labels?:
|
|
90
|
+
listWorkspaces: (xDaytonaOrganizationID?: string, verbose?: boolean, labels?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
91
91
|
/**
|
|
92
92
|
*
|
|
93
93
|
* @summary Replace workspace labels
|
|
@@ -214,11 +214,11 @@ export declare const WorkspaceApiFp: (configuration?: Configuration) => {
|
|
|
214
214
|
* @summary List all workspaces
|
|
215
215
|
* @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
|
|
216
216
|
* @param {boolean} [verbose] Include verbose output
|
|
217
|
-
* @param {
|
|
217
|
+
* @param {string} [labels] JSON encoded labels to filter by
|
|
218
218
|
* @param {*} [options] Override http request option.
|
|
219
219
|
* @throws {RequiredError}
|
|
220
220
|
*/
|
|
221
|
-
listWorkspaces(xDaytonaOrganizationID?: string, verbose?: boolean, labels?:
|
|
221
|
+
listWorkspaces(xDaytonaOrganizationID?: string, verbose?: boolean, labels?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Workspace>>>;
|
|
222
222
|
/**
|
|
223
223
|
*
|
|
224
224
|
* @summary Replace workspace labels
|
|
@@ -345,11 +345,11 @@ export declare const WorkspaceApiFactory: (configuration?: Configuration, basePa
|
|
|
345
345
|
* @summary List all workspaces
|
|
346
346
|
* @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
|
|
347
347
|
* @param {boolean} [verbose] Include verbose output
|
|
348
|
-
* @param {
|
|
348
|
+
* @param {string} [labels] JSON encoded labels to filter by
|
|
349
349
|
* @param {*} [options] Override http request option.
|
|
350
350
|
* @throws {RequiredError}
|
|
351
351
|
*/
|
|
352
|
-
listWorkspaces(xDaytonaOrganizationID?: string, verbose?: boolean, labels?:
|
|
352
|
+
listWorkspaces(xDaytonaOrganizationID?: string, verbose?: boolean, labels?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Workspace>>;
|
|
353
353
|
/**
|
|
354
354
|
*
|
|
355
355
|
* @summary Replace workspace labels
|
|
@@ -484,12 +484,12 @@ export declare class WorkspaceApi extends BaseAPI {
|
|
|
484
484
|
* @summary List all workspaces
|
|
485
485
|
* @param {string} [xDaytonaOrganizationID] Use with JWT to specify the organization ID
|
|
486
486
|
* @param {boolean} [verbose] Include verbose output
|
|
487
|
-
* @param {
|
|
487
|
+
* @param {string} [labels] JSON encoded labels to filter by
|
|
488
488
|
* @param {*} [options] Override http request option.
|
|
489
489
|
* @throws {RequiredError}
|
|
490
490
|
* @memberof WorkspaceApi
|
|
491
491
|
*/
|
|
492
|
-
listWorkspaces(xDaytonaOrganizationID?: string, verbose?: boolean, labels?:
|
|
492
|
+
listWorkspaces(xDaytonaOrganizationID?: string, verbose?: boolean, labels?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Workspace[], any>>;
|
|
493
493
|
/**
|
|
494
494
|
*
|
|
495
495
|
* @summary Replace workspace labels
|