@daytonaio/api-client 0.7.0 → 0.9.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/toolbox-api.ts +1149 -104
- package/api/users-api.ts +68 -0
- package/api/workspace-api.ts +78 -0
- package/api.ts +0 -1
- package/dist/api/toolbox-api.d.ts +473 -0
- package/dist/api/toolbox-api.js +967 -1
- package/dist/api/users-api.d.ts +30 -0
- package/dist/api/users-api.js +62 -0
- package/dist/api/workspace-api.d.ts +33 -0
- package/dist/api/workspace-api.js +73 -0
- package/dist/api.d.ts +0 -1
- package/dist/api.js +0 -1
- package/dist/esm/api/toolbox-api.d.ts +473 -0
- package/dist/esm/api/toolbox-api.js +967 -1
- package/dist/esm/api/users-api.d.ts +30 -0
- package/dist/esm/api/users-api.js +62 -0
- package/dist/esm/api/workspace-api.d.ts +33 -0
- package/dist/esm/api/workspace-api.js +73 -0
- package/dist/esm/api.d.ts +0 -1
- package/dist/esm/api.js +0 -1
- package/dist/esm/models/command.d.ts +42 -0
- package/dist/esm/models/command.js +14 -0
- package/dist/esm/models/completion-context.d.ts +30 -0
- package/dist/esm/models/completion-context.js +14 -0
- package/dist/esm/models/completion-item.d.ts +60 -0
- package/dist/esm/models/completion-item.js +14 -0
- package/dist/esm/models/completion-list.d.ts +31 -0
- package/dist/esm/models/completion-list.js +14 -0
- package/dist/esm/models/create-session-request.d.ts +24 -0
- package/dist/esm/models/create-session-request.js +14 -0
- package/dist/esm/models/index.d.ts +16 -0
- package/dist/esm/models/index.js +16 -0
- package/dist/esm/models/lsp-completion-params.d.ts +50 -0
- package/dist/esm/models/lsp-completion-params.js +14 -0
- package/dist/esm/models/lsp-document-request.d.ts +36 -0
- package/dist/esm/models/lsp-document-request.js +14 -0
- package/dist/esm/models/lsp-location.d.ts +31 -0
- package/dist/esm/models/lsp-location.js +14 -0
- package/dist/esm/models/lsp-server-request.d.ts +30 -0
- package/dist/esm/models/lsp-server-request.js +14 -0
- package/dist/esm/models/lsp-symbol.d.ts +37 -0
- package/dist/esm/models/lsp-symbol.js +14 -0
- package/dist/esm/models/position.d.ts +30 -0
- package/dist/esm/models/position.js +14 -0
- package/dist/esm/models/range.d.ts +31 -0
- package/dist/esm/models/range.js +14 -0
- package/dist/esm/models/session-execute-request.d.ts +30 -0
- package/dist/esm/models/session-execute-request.js +14 -0
- package/dist/esm/models/session-execute-response.d.ts +36 -0
- package/dist/esm/models/session-execute-response.js +14 -0
- package/dist/esm/models/session.d.ts +31 -0
- package/dist/esm/models/session.js +14 -0
- package/dist/esm/models/usage-overview.d.ts +84 -0
- package/dist/esm/models/usage-overview.js +14 -0
- package/dist/models/command.d.ts +42 -0
- package/dist/models/command.js +15 -0
- package/dist/models/completion-context.d.ts +30 -0
- package/dist/models/completion-context.js +15 -0
- package/dist/models/completion-item.d.ts +60 -0
- package/dist/models/completion-item.js +15 -0
- package/dist/models/completion-list.d.ts +31 -0
- package/dist/models/completion-list.js +15 -0
- package/dist/models/create-session-request.d.ts +24 -0
- package/dist/models/create-session-request.js +15 -0
- package/dist/models/index.d.ts +16 -0
- package/dist/models/index.js +16 -0
- package/dist/models/lsp-completion-params.d.ts +50 -0
- package/dist/models/lsp-completion-params.js +15 -0
- package/dist/models/lsp-document-request.d.ts +36 -0
- package/dist/models/lsp-document-request.js +15 -0
- package/dist/models/lsp-location.d.ts +31 -0
- package/dist/models/lsp-location.js +15 -0
- package/dist/models/lsp-server-request.d.ts +30 -0
- package/dist/models/lsp-server-request.js +15 -0
- package/dist/models/lsp-symbol.d.ts +37 -0
- package/dist/models/lsp-symbol.js +15 -0
- package/dist/models/position.d.ts +30 -0
- package/dist/models/position.js +15 -0
- package/dist/models/range.d.ts +31 -0
- package/dist/models/range.js +15 -0
- package/dist/models/session-execute-request.d.ts +30 -0
- package/dist/models/session-execute-request.js +15 -0
- package/dist/models/session-execute-response.d.ts +36 -0
- package/dist/models/session-execute-response.js +15 -0
- package/dist/models/session.d.ts +31 -0
- package/dist/models/session.js +15 -0
- package/dist/models/usage-overview.d.ts +84 -0
- package/dist/models/usage-overview.js +15 -0
- package/models/command.ts +48 -0
- package/models/completion-context.ts +36 -0
- package/models/completion-item.ts +66 -0
- package/models/completion-list.ts +39 -0
- package/models/create-session-request.ts +30 -0
- package/models/index.ts +16 -0
- package/models/lsp-completion-params.ts +60 -0
- package/models/lsp-document-request.ts +42 -0
- package/models/lsp-location.ts +39 -0
- package/models/lsp-server-request.ts +36 -0
- package/models/lsp-symbol.ts +45 -0
- package/models/position.ts +36 -0
- package/models/range.ts +39 -0
- package/models/session-execute-request.ts +36 -0
- package/models/session-execute-response.ts +42 -0
- package/models/session.ts +39 -0
- package/models/usage-overview.ts +90 -0
- package/package.json +1 -1
- package/api/app-api.ts +0 -118
- package/dist/api/app-api.d.ts +0 -65
- package/dist/api/app-api.js +0 -124
- package/dist/esm/api/app-api.d.ts +0 -65
- package/dist/esm/api/app-api.js +0 -117
package/api/users-api.ts
CHANGED
|
@@ -23,6 +23,8 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
|
|
|
23
23
|
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
|
24
24
|
// @ts-ignore
|
|
25
25
|
import type { CreateUser } from '../models';
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
import type { UsageOverview } from '../models';
|
|
26
28
|
/**
|
|
27
29
|
* UsersApi - axios parameter creator
|
|
28
30
|
* @export
|
|
@@ -69,6 +71,40 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
69
71
|
options: localVarRequestOptions,
|
|
70
72
|
};
|
|
71
73
|
},
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @summary Get user current usage overview
|
|
77
|
+
* @param {*} [options] Override http request option.
|
|
78
|
+
* @throws {RequiredError}
|
|
79
|
+
*/
|
|
80
|
+
getUserUsageOverview: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
81
|
+
const localVarPath = `/users/overview`;
|
|
82
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
83
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
84
|
+
let baseOptions;
|
|
85
|
+
if (configuration) {
|
|
86
|
+
baseOptions = configuration.baseOptions;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
90
|
+
const localVarHeaderParameter = {} as any;
|
|
91
|
+
const localVarQueryParameter = {} as any;
|
|
92
|
+
|
|
93
|
+
// authentication oauth2 required
|
|
94
|
+
// oauth required
|
|
95
|
+
await setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
100
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
101
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
102
|
+
|
|
103
|
+
return {
|
|
104
|
+
url: toPathString(localVarUrlObj),
|
|
105
|
+
options: localVarRequestOptions,
|
|
106
|
+
};
|
|
107
|
+
},
|
|
72
108
|
/**
|
|
73
109
|
*
|
|
74
110
|
* @summary List all users
|
|
@@ -164,6 +200,18 @@ export const UsersApiFp = function(configuration?: Configuration) {
|
|
|
164
200
|
const localVarOperationServerBasePath = operationServerMap['UsersApi.createUser']?.[localVarOperationServerIndex]?.url;
|
|
165
201
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
166
202
|
},
|
|
203
|
+
/**
|
|
204
|
+
*
|
|
205
|
+
* @summary Get user current usage overview
|
|
206
|
+
* @param {*} [options] Override http request option.
|
|
207
|
+
* @throws {RequiredError}
|
|
208
|
+
*/
|
|
209
|
+
async getUserUsageOverview(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UsageOverview>> {
|
|
210
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getUserUsageOverview(options);
|
|
211
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
212
|
+
const localVarOperationServerBasePath = operationServerMap['UsersApi.getUserUsageOverview']?.[localVarOperationServerIndex]?.url;
|
|
213
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
214
|
+
},
|
|
167
215
|
/**
|
|
168
216
|
*
|
|
169
217
|
* @summary List all users
|
|
@@ -209,6 +257,15 @@ export const UsersApiFactory = function (configuration?: Configuration, basePath
|
|
|
209
257
|
createUser(createUser: CreateUser, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
210
258
|
return localVarFp.createUser(createUser, options).then((request) => request(axios, basePath));
|
|
211
259
|
},
|
|
260
|
+
/**
|
|
261
|
+
*
|
|
262
|
+
* @summary Get user current usage overview
|
|
263
|
+
* @param {*} [options] Override http request option.
|
|
264
|
+
* @throws {RequiredError}
|
|
265
|
+
*/
|
|
266
|
+
getUserUsageOverview(options?: RawAxiosRequestConfig): AxiosPromise<UsageOverview> {
|
|
267
|
+
return localVarFp.getUserUsageOverview(options).then((request) => request(axios, basePath));
|
|
268
|
+
},
|
|
212
269
|
/**
|
|
213
270
|
*
|
|
214
271
|
* @summary List all users
|
|
@@ -250,6 +307,17 @@ export class UsersApi extends BaseAPI {
|
|
|
250
307
|
return UsersApiFp(this.configuration).createUser(createUser, options).then((request) => request(this.axios, this.basePath));
|
|
251
308
|
}
|
|
252
309
|
|
|
310
|
+
/**
|
|
311
|
+
*
|
|
312
|
+
* @summary Get user current usage overview
|
|
313
|
+
* @param {*} [options] Override http request option.
|
|
314
|
+
* @throws {RequiredError}
|
|
315
|
+
* @memberof UsersApi
|
|
316
|
+
*/
|
|
317
|
+
public getUserUsageOverview(options?: RawAxiosRequestConfig) {
|
|
318
|
+
return UsersApiFp(this.configuration).getUserUsageOverview(options).then((request) => request(this.axios, this.basePath));
|
|
319
|
+
}
|
|
320
|
+
|
|
253
321
|
/**
|
|
254
322
|
*
|
|
255
323
|
* @summary List all users
|
package/api/workspace-api.ts
CHANGED
|
@@ -395,6 +395,49 @@ export const WorkspaceApiAxiosParamCreator = function (configuration?: Configura
|
|
|
395
395
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
396
396
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
397
397
|
|
|
398
|
+
return {
|
|
399
|
+
url: toPathString(localVarUrlObj),
|
|
400
|
+
options: localVarRequestOptions,
|
|
401
|
+
};
|
|
402
|
+
},
|
|
403
|
+
/**
|
|
404
|
+
*
|
|
405
|
+
* @param {string} workspaceId
|
|
406
|
+
* @param {object} body
|
|
407
|
+
* @param {*} [options] Override http request option.
|
|
408
|
+
* @throws {RequiredError}
|
|
409
|
+
*/
|
|
410
|
+
workspaceControllerResizeWorkspace: async (workspaceId: string, body: object, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
411
|
+
// verify required parameter 'workspaceId' is not null or undefined
|
|
412
|
+
assertParamExists('workspaceControllerResizeWorkspace', 'workspaceId', workspaceId)
|
|
413
|
+
// verify required parameter 'body' is not null or undefined
|
|
414
|
+
assertParamExists('workspaceControllerResizeWorkspace', 'body', body)
|
|
415
|
+
const localVarPath = `/workspace/{workspaceId}/resize`
|
|
416
|
+
.replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)));
|
|
417
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
418
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
419
|
+
let baseOptions;
|
|
420
|
+
if (configuration) {
|
|
421
|
+
baseOptions = configuration.baseOptions;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
425
|
+
const localVarHeaderParameter = {} as any;
|
|
426
|
+
const localVarQueryParameter = {} as any;
|
|
427
|
+
|
|
428
|
+
// authentication oauth2 required
|
|
429
|
+
// oauth required
|
|
430
|
+
await setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration)
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
435
|
+
|
|
436
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
437
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
438
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
439
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
|
|
440
|
+
|
|
398
441
|
return {
|
|
399
442
|
url: toPathString(localVarUrlObj),
|
|
400
443
|
options: localVarRequestOptions,
|
|
@@ -531,6 +574,19 @@ export const WorkspaceApiFp = function(configuration?: Configuration) {
|
|
|
531
574
|
const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.updatePublicStatus']?.[localVarOperationServerIndex]?.url;
|
|
532
575
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
533
576
|
},
|
|
577
|
+
/**
|
|
578
|
+
*
|
|
579
|
+
* @param {string} workspaceId
|
|
580
|
+
* @param {object} body
|
|
581
|
+
* @param {*} [options] Override http request option.
|
|
582
|
+
* @throws {RequiredError}
|
|
583
|
+
*/
|
|
584
|
+
async workspaceControllerResizeWorkspace(workspaceId: string, body: object, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
585
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.workspaceControllerResizeWorkspace(workspaceId, body, options);
|
|
586
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
587
|
+
const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.workspaceControllerResizeWorkspace']?.[localVarOperationServerIndex]?.url;
|
|
588
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
589
|
+
},
|
|
534
590
|
}
|
|
535
591
|
};
|
|
536
592
|
|
|
@@ -635,6 +691,16 @@ export const WorkspaceApiFactory = function (configuration?: Configuration, base
|
|
|
635
691
|
updatePublicStatus(workspaceId: string, isPublic: boolean, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
636
692
|
return localVarFp.updatePublicStatus(workspaceId, isPublic, options).then((request) => request(axios, basePath));
|
|
637
693
|
},
|
|
694
|
+
/**
|
|
695
|
+
*
|
|
696
|
+
* @param {string} workspaceId
|
|
697
|
+
* @param {object} body
|
|
698
|
+
* @param {*} [options] Override http request option.
|
|
699
|
+
* @throws {RequiredError}
|
|
700
|
+
*/
|
|
701
|
+
workspaceControllerResizeWorkspace(workspaceId: string, body: object, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
702
|
+
return localVarFp.workspaceControllerResizeWorkspace(workspaceId, body, options).then((request) => request(axios, basePath));
|
|
703
|
+
},
|
|
638
704
|
};
|
|
639
705
|
};
|
|
640
706
|
|
|
@@ -756,5 +822,17 @@ export class WorkspaceApi extends BaseAPI {
|
|
|
756
822
|
public updatePublicStatus(workspaceId: string, isPublic: boolean, options?: RawAxiosRequestConfig) {
|
|
757
823
|
return WorkspaceApiFp(this.configuration).updatePublicStatus(workspaceId, isPublic, options).then((request) => request(this.axios, this.basePath));
|
|
758
824
|
}
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
*
|
|
828
|
+
* @param {string} workspaceId
|
|
829
|
+
* @param {object} body
|
|
830
|
+
* @param {*} [options] Override http request option.
|
|
831
|
+
* @throws {RequiredError}
|
|
832
|
+
* @memberof WorkspaceApi
|
|
833
|
+
*/
|
|
834
|
+
public workspaceControllerResizeWorkspace(workspaceId: string, body: object, options?: RawAxiosRequestConfig) {
|
|
835
|
+
return WorkspaceApiFp(this.configuration).workspaceControllerResizeWorkspace(workspaceId, body, options).then((request) => request(this.axios, this.basePath));
|
|
836
|
+
}
|
|
759
837
|
}
|
|
760
838
|
|