@daytonaio/api-client 0.14.0 → 0.15.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 +16 -1
- package/README.md +2 -2
- package/api/api-keys-api.ts +60 -28
- package/api/docker-registry-api.ts +121 -65
- package/api/images-api.ts +60 -28
- package/api/organizations-api.ts +1858 -0
- package/api/toolbox-api.ts +548 -252
- package/api/users-api.ts +14 -98
- package/api/workspace-api.ts +268 -168
- package/api.ts +1 -0
- package/dist/api/api-keys-api.d.ts +32 -16
- package/dist/api/api-keys-api.js +56 -28
- package/dist/api/docker-registry-api.d.ts +72 -44
- package/dist/api/docker-registry-api.js +114 -65
- package/dist/api/images-api.d.ts +32 -16
- package/dist/api/images-api.js +56 -28
- package/dist/api/organizations-api.d.ts +856 -0
- package/dist/api/organizations-api.js +1741 -0
- package/dist/api/toolbox-api.d.ts +292 -144
- package/dist/api/toolbox-api.js +511 -252
- package/dist/api/users-api.d.ts +9 -47
- package/dist/api/users-api.js +13 -90
- package/dist/api/workspace-api.d.ts +153 -101
- package/dist/api/workspace-api.js +257 -169
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/esm/api/api-keys-api.d.ts +32 -16
- package/dist/esm/api/api-keys-api.js +56 -28
- package/dist/esm/api/docker-registry-api.d.ts +72 -44
- package/dist/esm/api/docker-registry-api.js +114 -65
- package/dist/esm/api/images-api.d.ts +32 -16
- package/dist/esm/api/images-api.js +56 -28
- package/dist/esm/api/organizations-api.d.ts +856 -0
- package/dist/esm/api/organizations-api.js +1734 -0
- package/dist/esm/api/toolbox-api.d.ts +292 -144
- package/dist/esm/api/toolbox-api.js +511 -252
- package/dist/esm/api/users-api.d.ts +9 -47
- package/dist/esm/api/users-api.js +13 -90
- package/dist/esm/api/workspace-api.d.ts +153 -101
- package/dist/esm/api/workspace-api.js +257 -169
- package/dist/esm/api.d.ts +1 -0
- package/dist/esm/api.js +1 -0
- package/dist/esm/models/api-key-list.d.ts +15 -0
- package/dist/esm/models/api-key-list.js +8 -1
- package/dist/esm/models/api-key-response.d.ts +15 -0
- package/dist/esm/models/api-key-response.js +8 -1
- package/dist/esm/models/create-api-key.d.ts +15 -0
- package/dist/esm/models/create-api-key.js +8 -1
- package/dist/esm/models/create-docker-registry.d.ts +1 -1
- package/dist/esm/models/create-docker-registry.js +1 -1
- package/dist/esm/models/create-organization-invitation.d.ts +47 -0
- package/dist/esm/models/create-organization-invitation.js +17 -0
- package/dist/esm/models/create-organization-quota.d.ts +84 -0
- package/dist/esm/models/create-organization-role.d.ts +45 -0
- package/dist/esm/models/create-organization-role.js +21 -0
- package/dist/esm/models/create-organization.d.ts +90 -0
- package/dist/esm/models/create-organization.js +14 -0
- package/dist/esm/models/create-user.d.ts +5 -58
- package/dist/esm/models/docker-registry.d.ts +1 -1
- package/dist/esm/models/docker-registry.js +1 -1
- package/dist/esm/models/image-dto.d.ts +1 -1
- package/dist/esm/models/index.d.ts +15 -1
- package/dist/esm/models/index.js +15 -1
- package/dist/esm/models/organization-invitation.d.ts +91 -0
- package/dist/esm/models/organization-invitation.js +23 -0
- package/dist/esm/models/organization-role.d.ts +69 -0
- package/dist/esm/models/organization-role.js +21 -0
- package/dist/esm/models/organization-user.d.ts +72 -0
- package/dist/esm/models/organization-user.js +17 -0
- package/dist/esm/models/organization.d.ts +54 -0
- package/dist/esm/models/organization.js +14 -0
- package/dist/esm/models/update-assigned-organization-roles.d.ts +24 -0
- package/dist/esm/models/update-assigned-organization-roles.js +14 -0
- package/dist/esm/models/update-organization-invitation.d.ts +41 -0
- package/dist/esm/models/update-organization-invitation.js +17 -0
- package/dist/esm/models/update-organization-member-role.d.ts +29 -0
- package/dist/esm/models/update-organization-member-role.js +17 -0
- package/dist/esm/models/{update-user-quota-dto.d.ts → update-organization-quota.d.ts} +13 -13
- package/dist/esm/models/update-organization-quota.js +14 -0
- package/dist/esm/models/update-organization-role.d.ts +45 -0
- package/dist/esm/models/update-organization-role.js +21 -0
- package/dist/esm/models/user-public-key.d.ts +30 -0
- package/dist/esm/models/user-public-key.js +14 -0
- package/dist/esm/models/user.d.ts +43 -0
- package/dist/esm/models/user.js +14 -0
- package/dist/models/api-key-list.d.ts +15 -0
- package/dist/models/api-key-list.js +9 -0
- package/dist/models/api-key-response.d.ts +15 -0
- package/dist/models/api-key-response.js +9 -0
- package/dist/models/create-api-key.d.ts +15 -0
- package/dist/models/create-api-key.js +9 -0
- package/dist/models/create-docker-registry.d.ts +1 -1
- package/dist/models/create-docker-registry.js +1 -1
- package/dist/models/create-organization-invitation.d.ts +47 -0
- package/dist/models/create-organization-invitation.js +20 -0
- package/dist/models/create-organization-quota.d.ts +84 -0
- package/dist/models/create-organization-role.d.ts +45 -0
- package/dist/models/create-organization-role.js +24 -0
- package/dist/models/create-organization.d.ts +90 -0
- package/dist/models/create-organization.js +15 -0
- package/dist/models/create-user.d.ts +5 -58
- package/dist/models/docker-registry.d.ts +1 -1
- package/dist/models/docker-registry.js +1 -1
- package/dist/models/image-dto.d.ts +1 -1
- package/dist/models/index.d.ts +15 -1
- package/dist/models/index.js +15 -1
- package/dist/models/organization-invitation.d.ts +91 -0
- package/dist/models/organization-invitation.js +26 -0
- package/dist/models/organization-role.d.ts +69 -0
- package/dist/models/organization-role.js +24 -0
- package/dist/models/organization-user.d.ts +72 -0
- package/dist/models/organization-user.js +20 -0
- package/dist/models/organization.d.ts +54 -0
- package/dist/models/organization.js +15 -0
- package/dist/models/update-assigned-organization-roles.d.ts +24 -0
- package/dist/models/update-assigned-organization-roles.js +15 -0
- package/dist/models/update-organization-invitation.d.ts +41 -0
- package/dist/models/update-organization-invitation.js +20 -0
- package/dist/models/update-organization-member-role.d.ts +29 -0
- package/dist/models/update-organization-member-role.js +20 -0
- package/dist/models/{update-user-quota-dto.d.ts → update-organization-quota.d.ts} +13 -13
- package/dist/models/update-organization-quota.js +15 -0
- package/dist/models/update-organization-role.d.ts +45 -0
- package/dist/models/update-organization-role.js +24 -0
- package/dist/models/user-public-key.d.ts +30 -0
- package/dist/models/user-public-key.js +15 -0
- package/dist/models/user.d.ts +43 -0
- package/dist/models/user.js +15 -0
- package/models/api-key-list.ts +18 -0
- package/models/api-key-response.ts +18 -0
- package/models/create-api-key.ts +18 -0
- package/models/create-docker-registry.ts +1 -1
- package/models/create-organization-invitation.ts +56 -0
- package/models/create-organization-quota.ts +90 -0
- package/models/create-organization-role.ts +54 -0
- package/models/create-organization.ts +96 -0
- package/models/create-user.ts +7 -58
- package/models/docker-registry.ts +1 -1
- package/models/image-dto.ts +1 -1
- package/models/index.ts +15 -1
- package/models/organization-invitation.ts +103 -0
- package/models/organization-role.ts +78 -0
- package/models/organization-user.ts +83 -0
- package/models/organization.ts +60 -0
- package/models/update-assigned-organization-roles.ts +30 -0
- package/models/update-organization-invitation.ts +50 -0
- package/models/update-organization-member-role.ts +38 -0
- package/models/{update-user-quota-dto.ts → update-organization-quota.ts} +13 -13
- package/models/update-organization-role.ts +54 -0
- package/models/user-public-key.ts +36 -0
- package/models/user.ts +51 -0
- package/package.json +1 -1
- /package/dist/esm/models/{update-user-quota-dto.js → create-organization-quota.js} +0 -0
- /package/dist/models/{update-user-quota-dto.js → create-organization-quota.js} +0 -0
package/api/users-api.ts
CHANGED
|
@@ -24,9 +24,7 @@ import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError
|
|
|
24
24
|
// @ts-ignore
|
|
25
25
|
import type { CreateUser } from '../models';
|
|
26
26
|
// @ts-ignore
|
|
27
|
-
import type {
|
|
28
|
-
// @ts-ignore
|
|
29
|
-
import type { UsageOverview } from '../models';
|
|
27
|
+
import type { User } from '../models';
|
|
30
28
|
/**
|
|
31
29
|
* UsersApi - axios parameter creator
|
|
32
30
|
* @export
|
|
@@ -75,12 +73,12 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
75
73
|
},
|
|
76
74
|
/**
|
|
77
75
|
*
|
|
78
|
-
* @summary Get user
|
|
76
|
+
* @summary Get authenticated user
|
|
79
77
|
* @param {*} [options] Override http request option.
|
|
80
78
|
* @throws {RequiredError}
|
|
81
79
|
*/
|
|
82
|
-
|
|
83
|
-
const localVarPath = `/users/
|
|
80
|
+
getAuthenticatedUser: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
81
|
+
const localVarPath = `/users/me`;
|
|
84
82
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
85
83
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
86
84
|
let baseOptions;
|
|
@@ -174,50 +172,6 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
174
172
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
175
173
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
176
174
|
|
|
177
|
-
return {
|
|
178
|
-
url: toPathString(localVarUrlObj),
|
|
179
|
-
options: localVarRequestOptions,
|
|
180
|
-
};
|
|
181
|
-
},
|
|
182
|
-
/**
|
|
183
|
-
*
|
|
184
|
-
* @summary Update user quota
|
|
185
|
-
* @param {string} id
|
|
186
|
-
* @param {UpdateUserQuotaDto} updateUserQuotaDto
|
|
187
|
-
* @param {*} [options] Override http request option.
|
|
188
|
-
* @throws {RequiredError}
|
|
189
|
-
*/
|
|
190
|
-
updateUserQuota: async (id: string, updateUserQuotaDto: UpdateUserQuotaDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
191
|
-
// verify required parameter 'id' is not null or undefined
|
|
192
|
-
assertParamExists('updateUserQuota', 'id', id)
|
|
193
|
-
// verify required parameter 'updateUserQuotaDto' is not null or undefined
|
|
194
|
-
assertParamExists('updateUserQuota', 'updateUserQuotaDto', updateUserQuotaDto)
|
|
195
|
-
const localVarPath = `/users/{id}/quota`
|
|
196
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
197
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
198
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
199
|
-
let baseOptions;
|
|
200
|
-
if (configuration) {
|
|
201
|
-
baseOptions = configuration.baseOptions;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
205
|
-
const localVarHeaderParameter = {} as any;
|
|
206
|
-
const localVarQueryParameter = {} as any;
|
|
207
|
-
|
|
208
|
-
// authentication oauth2 required
|
|
209
|
-
// oauth required
|
|
210
|
-
await setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration)
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
215
|
-
|
|
216
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
217
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
218
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
219
|
-
localVarRequestOptions.data = serializeDataIfNeeded(updateUserQuotaDto, localVarRequestOptions, configuration)
|
|
220
|
-
|
|
221
175
|
return {
|
|
222
176
|
url: toPathString(localVarUrlObj),
|
|
223
177
|
options: localVarRequestOptions,
|
|
@@ -248,14 +202,14 @@ export const UsersApiFp = function(configuration?: Configuration) {
|
|
|
248
202
|
},
|
|
249
203
|
/**
|
|
250
204
|
*
|
|
251
|
-
* @summary Get user
|
|
205
|
+
* @summary Get authenticated user
|
|
252
206
|
* @param {*} [options] Override http request option.
|
|
253
207
|
* @throws {RequiredError}
|
|
254
208
|
*/
|
|
255
|
-
async
|
|
256
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
209
|
+
async getAuthenticatedUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
|
210
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getAuthenticatedUser(options);
|
|
257
211
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
258
|
-
const localVarOperationServerBasePath = operationServerMap['UsersApi.
|
|
212
|
+
const localVarOperationServerBasePath = operationServerMap['UsersApi.getAuthenticatedUser']?.[localVarOperationServerIndex]?.url;
|
|
259
213
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
260
214
|
},
|
|
261
215
|
/**
|
|
@@ -283,20 +237,6 @@ export const UsersApiFp = function(configuration?: Configuration) {
|
|
|
283
237
|
const localVarOperationServerBasePath = operationServerMap['UsersApi.regenerateKeyPair']?.[localVarOperationServerIndex]?.url;
|
|
284
238
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
285
239
|
},
|
|
286
|
-
/**
|
|
287
|
-
*
|
|
288
|
-
* @summary Update user quota
|
|
289
|
-
* @param {string} id
|
|
290
|
-
* @param {UpdateUserQuotaDto} updateUserQuotaDto
|
|
291
|
-
* @param {*} [options] Override http request option.
|
|
292
|
-
* @throws {RequiredError}
|
|
293
|
-
*/
|
|
294
|
-
async updateUserQuota(id: string, updateUserQuotaDto: UpdateUserQuotaDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
295
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.updateUserQuota(id, updateUserQuotaDto, options);
|
|
296
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
297
|
-
const localVarOperationServerBasePath = operationServerMap['UsersApi.updateUserQuota']?.[localVarOperationServerIndex]?.url;
|
|
298
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
299
|
-
},
|
|
300
240
|
}
|
|
301
241
|
};
|
|
302
242
|
|
|
@@ -319,12 +259,12 @@ export const UsersApiFactory = function (configuration?: Configuration, basePath
|
|
|
319
259
|
},
|
|
320
260
|
/**
|
|
321
261
|
*
|
|
322
|
-
* @summary Get user
|
|
262
|
+
* @summary Get authenticated user
|
|
323
263
|
* @param {*} [options] Override http request option.
|
|
324
264
|
* @throws {RequiredError}
|
|
325
265
|
*/
|
|
326
|
-
|
|
327
|
-
return localVarFp.
|
|
266
|
+
getAuthenticatedUser(options?: RawAxiosRequestConfig): AxiosPromise<User> {
|
|
267
|
+
return localVarFp.getAuthenticatedUser(options).then((request) => request(axios, basePath));
|
|
328
268
|
},
|
|
329
269
|
/**
|
|
330
270
|
*
|
|
@@ -345,17 +285,6 @@ export const UsersApiFactory = function (configuration?: Configuration, basePath
|
|
|
345
285
|
regenerateKeyPair(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
346
286
|
return localVarFp.regenerateKeyPair(id, options).then((request) => request(axios, basePath));
|
|
347
287
|
},
|
|
348
|
-
/**
|
|
349
|
-
*
|
|
350
|
-
* @summary Update user quota
|
|
351
|
-
* @param {string} id
|
|
352
|
-
* @param {UpdateUserQuotaDto} updateUserQuotaDto
|
|
353
|
-
* @param {*} [options] Override http request option.
|
|
354
|
-
* @throws {RequiredError}
|
|
355
|
-
*/
|
|
356
|
-
updateUserQuota(id: string, updateUserQuotaDto: UpdateUserQuotaDto, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
357
|
-
return localVarFp.updateUserQuota(id, updateUserQuotaDto, options).then((request) => request(axios, basePath));
|
|
358
|
-
},
|
|
359
288
|
};
|
|
360
289
|
};
|
|
361
290
|
|
|
@@ -380,13 +309,13 @@ export class UsersApi extends BaseAPI {
|
|
|
380
309
|
|
|
381
310
|
/**
|
|
382
311
|
*
|
|
383
|
-
* @summary Get user
|
|
312
|
+
* @summary Get authenticated user
|
|
384
313
|
* @param {*} [options] Override http request option.
|
|
385
314
|
* @throws {RequiredError}
|
|
386
315
|
* @memberof UsersApi
|
|
387
316
|
*/
|
|
388
|
-
public
|
|
389
|
-
return UsersApiFp(this.configuration).
|
|
317
|
+
public getAuthenticatedUser(options?: RawAxiosRequestConfig) {
|
|
318
|
+
return UsersApiFp(this.configuration).getAuthenticatedUser(options).then((request) => request(this.axios, this.basePath));
|
|
390
319
|
}
|
|
391
320
|
|
|
392
321
|
/**
|
|
@@ -411,18 +340,5 @@ export class UsersApi extends BaseAPI {
|
|
|
411
340
|
public regenerateKeyPair(id: string, options?: RawAxiosRequestConfig) {
|
|
412
341
|
return UsersApiFp(this.configuration).regenerateKeyPair(id, options).then((request) => request(this.axios, this.basePath));
|
|
413
342
|
}
|
|
414
|
-
|
|
415
|
-
/**
|
|
416
|
-
*
|
|
417
|
-
* @summary Update user quota
|
|
418
|
-
* @param {string} id
|
|
419
|
-
* @param {UpdateUserQuotaDto} updateUserQuotaDto
|
|
420
|
-
* @param {*} [options] Override http request option.
|
|
421
|
-
* @throws {RequiredError}
|
|
422
|
-
* @memberof UsersApi
|
|
423
|
-
*/
|
|
424
|
-
public updateUserQuota(id: string, updateUserQuotaDto: UpdateUserQuotaDto, options?: RawAxiosRequestConfig) {
|
|
425
|
-
return UsersApiFp(this.configuration).updateUserQuota(id, updateUserQuotaDto, options).then((request) => request(this.axios, this.basePath));
|
|
426
|
-
}
|
|
427
343
|
}
|
|
428
344
|
|