@daytonaio/api-client 0.11.0 → 0.13.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/README.md +2 -2
- package/api/toolbox-api.ts +169 -0
- package/api/workspace-api.ts +80 -0
- package/dist/api/toolbox-api.d.ts +79 -0
- package/dist/api/toolbox-api.js +159 -0
- package/dist/api/workspace-api.d.ts +37 -0
- package/dist/api/workspace-api.js +76 -0
- package/dist/esm/api/toolbox-api.d.ts +79 -0
- package/dist/esm/api/toolbox-api.js +159 -0
- package/dist/esm/api/workspace-api.d.ts +37 -0
- package/dist/esm/api/workspace-api.js +76 -0
- package/dist/esm/models/command.d.ts +2 -8
- package/dist/esm/models/create-workspace.d.ts +6 -0
- package/dist/esm/models/workspace.d.ts +6 -0
- package/dist/models/command.d.ts +2 -8
- package/dist/models/create-workspace.d.ts +6 -0
- package/dist/models/workspace.d.ts +6 -0
- package/models/command.ts +2 -8
- package/models/create-workspace.ts +6 -0
- package/models/workspace.ts +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @daytonaio/api-client@0.
|
|
1
|
+
## @daytonaio/api-client@0.13.0
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @daytonaio/api-client@0.
|
|
39
|
+
npm install @daytonaio/api-client@0.13.0 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
package/api/toolbox-api.ts
CHANGED
|
@@ -22,6 +22,8 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
|
|
|
22
22
|
// @ts-ignore
|
|
23
23
|
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
|
24
24
|
// @ts-ignore
|
|
25
|
+
import type { Command } from '../models';
|
|
26
|
+
// @ts-ignore
|
|
25
27
|
import type { CompletionList } from '../models';
|
|
26
28
|
// @ts-ignore
|
|
27
29
|
import type { CreateSessionRequest } from '../models';
|
|
@@ -525,6 +527,94 @@ export const ToolboxApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
525
527
|
|
|
526
528
|
|
|
527
529
|
|
|
530
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
531
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
532
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
533
|
+
|
|
534
|
+
return {
|
|
535
|
+
url: toPathString(localVarUrlObj),
|
|
536
|
+
options: localVarRequestOptions,
|
|
537
|
+
};
|
|
538
|
+
},
|
|
539
|
+
/**
|
|
540
|
+
* Get session by ID
|
|
541
|
+
* @summary Get session
|
|
542
|
+
* @param {string} workspaceId
|
|
543
|
+
* @param {string} sessionId
|
|
544
|
+
* @param {*} [options] Override http request option.
|
|
545
|
+
* @throws {RequiredError}
|
|
546
|
+
*/
|
|
547
|
+
getSession: async (workspaceId: string, sessionId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
548
|
+
// verify required parameter 'workspaceId' is not null or undefined
|
|
549
|
+
assertParamExists('getSession', 'workspaceId', workspaceId)
|
|
550
|
+
// verify required parameter 'sessionId' is not null or undefined
|
|
551
|
+
assertParamExists('getSession', 'sessionId', sessionId)
|
|
552
|
+
const localVarPath = `/toolbox/{workspaceId}/toolbox/process/session/{sessionId}`
|
|
553
|
+
.replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)))
|
|
554
|
+
.replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
|
|
555
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
556
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
557
|
+
let baseOptions;
|
|
558
|
+
if (configuration) {
|
|
559
|
+
baseOptions = configuration.baseOptions;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
563
|
+
const localVarHeaderParameter = {} as any;
|
|
564
|
+
const localVarQueryParameter = {} as any;
|
|
565
|
+
|
|
566
|
+
// authentication oauth2 required
|
|
567
|
+
// oauth required
|
|
568
|
+
await setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration)
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
573
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
574
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
575
|
+
|
|
576
|
+
return {
|
|
577
|
+
url: toPathString(localVarUrlObj),
|
|
578
|
+
options: localVarRequestOptions,
|
|
579
|
+
};
|
|
580
|
+
},
|
|
581
|
+
/**
|
|
582
|
+
* Get session command by ID
|
|
583
|
+
* @summary Get session command
|
|
584
|
+
* @param {string} workspaceId
|
|
585
|
+
* @param {string} sessionId
|
|
586
|
+
* @param {string} commandId
|
|
587
|
+
* @param {*} [options] Override http request option.
|
|
588
|
+
* @throws {RequiredError}
|
|
589
|
+
*/
|
|
590
|
+
getSessionCommand: async (workspaceId: string, sessionId: string, commandId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
591
|
+
// verify required parameter 'workspaceId' is not null or undefined
|
|
592
|
+
assertParamExists('getSessionCommand', 'workspaceId', workspaceId)
|
|
593
|
+
// verify required parameter 'sessionId' is not null or undefined
|
|
594
|
+
assertParamExists('getSessionCommand', 'sessionId', sessionId)
|
|
595
|
+
// verify required parameter 'commandId' is not null or undefined
|
|
596
|
+
assertParamExists('getSessionCommand', 'commandId', commandId)
|
|
597
|
+
const localVarPath = `/toolbox/{workspaceId}/toolbox/process/session/{sessionId}/command/{commandId}`
|
|
598
|
+
.replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)))
|
|
599
|
+
.replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)))
|
|
600
|
+
.replace(`{${"commandId"}}`, encodeURIComponent(String(commandId)));
|
|
601
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
602
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
603
|
+
let baseOptions;
|
|
604
|
+
if (configuration) {
|
|
605
|
+
baseOptions = configuration.baseOptions;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
609
|
+
const localVarHeaderParameter = {} as any;
|
|
610
|
+
const localVarQueryParameter = {} as any;
|
|
611
|
+
|
|
612
|
+
// authentication oauth2 required
|
|
613
|
+
// oauth required
|
|
614
|
+
await setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration)
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
|
|
528
618
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
529
619
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
530
620
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -1812,6 +1902,35 @@ export const ToolboxApiFp = function(configuration?: Configuration) {
|
|
|
1812
1902
|
const localVarOperationServerBasePath = operationServerMap['ToolboxApi.getProjectDir']?.[localVarOperationServerIndex]?.url;
|
|
1813
1903
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1814
1904
|
},
|
|
1905
|
+
/**
|
|
1906
|
+
* Get session by ID
|
|
1907
|
+
* @summary Get session
|
|
1908
|
+
* @param {string} workspaceId
|
|
1909
|
+
* @param {string} sessionId
|
|
1910
|
+
* @param {*} [options] Override http request option.
|
|
1911
|
+
* @throws {RequiredError}
|
|
1912
|
+
*/
|
|
1913
|
+
async getSession(workspaceId: string, sessionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Session>> {
|
|
1914
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getSession(workspaceId, sessionId, options);
|
|
1915
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1916
|
+
const localVarOperationServerBasePath = operationServerMap['ToolboxApi.getSession']?.[localVarOperationServerIndex]?.url;
|
|
1917
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1918
|
+
},
|
|
1919
|
+
/**
|
|
1920
|
+
* Get session command by ID
|
|
1921
|
+
* @summary Get session command
|
|
1922
|
+
* @param {string} workspaceId
|
|
1923
|
+
* @param {string} sessionId
|
|
1924
|
+
* @param {string} commandId
|
|
1925
|
+
* @param {*} [options] Override http request option.
|
|
1926
|
+
* @throws {RequiredError}
|
|
1927
|
+
*/
|
|
1928
|
+
async getSessionCommand(workspaceId: string, sessionId: string, commandId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Command>> {
|
|
1929
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getSessionCommand(workspaceId, sessionId, commandId, options);
|
|
1930
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1931
|
+
const localVarOperationServerBasePath = operationServerMap['ToolboxApi.getSessionCommand']?.[localVarOperationServerIndex]?.url;
|
|
1932
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1933
|
+
},
|
|
1815
1934
|
/**
|
|
1816
1935
|
* Get logs for a specific command in a session
|
|
1817
1936
|
* @summary Get command logs
|
|
@@ -2280,6 +2399,29 @@ export const ToolboxApiFactory = function (configuration?: Configuration, basePa
|
|
|
2280
2399
|
getProjectDir(workspaceId: string, options?: RawAxiosRequestConfig): AxiosPromise<ProjectDirResponse> {
|
|
2281
2400
|
return localVarFp.getProjectDir(workspaceId, options).then((request) => request(axios, basePath));
|
|
2282
2401
|
},
|
|
2402
|
+
/**
|
|
2403
|
+
* Get session by ID
|
|
2404
|
+
* @summary Get session
|
|
2405
|
+
* @param {string} workspaceId
|
|
2406
|
+
* @param {string} sessionId
|
|
2407
|
+
* @param {*} [options] Override http request option.
|
|
2408
|
+
* @throws {RequiredError}
|
|
2409
|
+
*/
|
|
2410
|
+
getSession(workspaceId: string, sessionId: string, options?: RawAxiosRequestConfig): AxiosPromise<Session> {
|
|
2411
|
+
return localVarFp.getSession(workspaceId, sessionId, options).then((request) => request(axios, basePath));
|
|
2412
|
+
},
|
|
2413
|
+
/**
|
|
2414
|
+
* Get session command by ID
|
|
2415
|
+
* @summary Get session command
|
|
2416
|
+
* @param {string} workspaceId
|
|
2417
|
+
* @param {string} sessionId
|
|
2418
|
+
* @param {string} commandId
|
|
2419
|
+
* @param {*} [options] Override http request option.
|
|
2420
|
+
* @throws {RequiredError}
|
|
2421
|
+
*/
|
|
2422
|
+
getSessionCommand(workspaceId: string, sessionId: string, commandId: string, options?: RawAxiosRequestConfig): AxiosPromise<Command> {
|
|
2423
|
+
return localVarFp.getSessionCommand(workspaceId, sessionId, commandId, options).then((request) => request(axios, basePath));
|
|
2424
|
+
},
|
|
2283
2425
|
/**
|
|
2284
2426
|
* Get logs for a specific command in a session
|
|
2285
2427
|
* @summary Get command logs
|
|
@@ -2696,6 +2838,33 @@ export class ToolboxApi extends BaseAPI {
|
|
|
2696
2838
|
return ToolboxApiFp(this.configuration).getProjectDir(workspaceId, options).then((request) => request(this.axios, this.basePath));
|
|
2697
2839
|
}
|
|
2698
2840
|
|
|
2841
|
+
/**
|
|
2842
|
+
* Get session by ID
|
|
2843
|
+
* @summary Get session
|
|
2844
|
+
* @param {string} workspaceId
|
|
2845
|
+
* @param {string} sessionId
|
|
2846
|
+
* @param {*} [options] Override http request option.
|
|
2847
|
+
* @throws {RequiredError}
|
|
2848
|
+
* @memberof ToolboxApi
|
|
2849
|
+
*/
|
|
2850
|
+
public getSession(workspaceId: string, sessionId: string, options?: RawAxiosRequestConfig) {
|
|
2851
|
+
return ToolboxApiFp(this.configuration).getSession(workspaceId, sessionId, options).then((request) => request(this.axios, this.basePath));
|
|
2852
|
+
}
|
|
2853
|
+
|
|
2854
|
+
/**
|
|
2855
|
+
* Get session command by ID
|
|
2856
|
+
* @summary Get session command
|
|
2857
|
+
* @param {string} workspaceId
|
|
2858
|
+
* @param {string} sessionId
|
|
2859
|
+
* @param {string} commandId
|
|
2860
|
+
* @param {*} [options] Override http request option.
|
|
2861
|
+
* @throws {RequiredError}
|
|
2862
|
+
* @memberof ToolboxApi
|
|
2863
|
+
*/
|
|
2864
|
+
public getSessionCommand(workspaceId: string, sessionId: string, commandId: string, options?: RawAxiosRequestConfig) {
|
|
2865
|
+
return ToolboxApiFp(this.configuration).getSessionCommand(workspaceId, sessionId, commandId, options).then((request) => request(this.axios, this.basePath));
|
|
2866
|
+
}
|
|
2867
|
+
|
|
2699
2868
|
/**
|
|
2700
2869
|
* Get logs for a specific command in a session
|
|
2701
2870
|
* @summary Get command logs
|
package/api/workspace-api.ts
CHANGED
|
@@ -282,6 +282,48 @@ export const WorkspaceApiAxiosParamCreator = function (configuration?: Configura
|
|
|
282
282
|
options: localVarRequestOptions,
|
|
283
283
|
};
|
|
284
284
|
},
|
|
285
|
+
/**
|
|
286
|
+
*
|
|
287
|
+
* @summary Set workspace auto-stop interval
|
|
288
|
+
* @param {string} workspaceId ID of the workspace
|
|
289
|
+
* @param {number} interval Auto-stop interval in minutes (0 to disable)
|
|
290
|
+
* @param {*} [options] Override http request option.
|
|
291
|
+
* @throws {RequiredError}
|
|
292
|
+
*/
|
|
293
|
+
setAutostopInterval: async (workspaceId: string, interval: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
294
|
+
// verify required parameter 'workspaceId' is not null or undefined
|
|
295
|
+
assertParamExists('setAutostopInterval', 'workspaceId', workspaceId)
|
|
296
|
+
// verify required parameter 'interval' is not null or undefined
|
|
297
|
+
assertParamExists('setAutostopInterval', 'interval', interval)
|
|
298
|
+
const localVarPath = `/workspace/{workspaceId}/autostop/{interval}`
|
|
299
|
+
.replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)))
|
|
300
|
+
.replace(`{${"interval"}}`, encodeURIComponent(String(interval)));
|
|
301
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
302
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
303
|
+
let baseOptions;
|
|
304
|
+
if (configuration) {
|
|
305
|
+
baseOptions = configuration.baseOptions;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
309
|
+
const localVarHeaderParameter = {} as any;
|
|
310
|
+
const localVarQueryParameter = {} as any;
|
|
311
|
+
|
|
312
|
+
// authentication oauth2 required
|
|
313
|
+
// oauth required
|
|
314
|
+
await setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration)
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
319
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
320
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
321
|
+
|
|
322
|
+
return {
|
|
323
|
+
url: toPathString(localVarUrlObj),
|
|
324
|
+
options: localVarRequestOptions,
|
|
325
|
+
};
|
|
326
|
+
},
|
|
285
327
|
/**
|
|
286
328
|
*
|
|
287
329
|
* @summary Start workspace
|
|
@@ -534,6 +576,20 @@ export const WorkspaceApiFp = function(configuration?: Configuration) {
|
|
|
534
576
|
const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.replaceLabels']?.[localVarOperationServerIndex]?.url;
|
|
535
577
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
536
578
|
},
|
|
579
|
+
/**
|
|
580
|
+
*
|
|
581
|
+
* @summary Set workspace auto-stop interval
|
|
582
|
+
* @param {string} workspaceId ID of the workspace
|
|
583
|
+
* @param {number} interval Auto-stop interval in minutes (0 to disable)
|
|
584
|
+
* @param {*} [options] Override http request option.
|
|
585
|
+
* @throws {RequiredError}
|
|
586
|
+
*/
|
|
587
|
+
async setAutostopInterval(workspaceId: string, interval: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
588
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.setAutostopInterval(workspaceId, interval, options);
|
|
589
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
590
|
+
const localVarOperationServerBasePath = operationServerMap['WorkspaceApi.setAutostopInterval']?.[localVarOperationServerIndex]?.url;
|
|
591
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
592
|
+
},
|
|
537
593
|
/**
|
|
538
594
|
*
|
|
539
595
|
* @summary Start workspace
|
|
@@ -660,6 +716,17 @@ export const WorkspaceApiFactory = function (configuration?: Configuration, base
|
|
|
660
716
|
replaceLabels(workspaceId: string, workspaceLabels: WorkspaceLabels, options?: RawAxiosRequestConfig): AxiosPromise<WorkspaceLabels> {
|
|
661
717
|
return localVarFp.replaceLabels(workspaceId, workspaceLabels, options).then((request) => request(axios, basePath));
|
|
662
718
|
},
|
|
719
|
+
/**
|
|
720
|
+
*
|
|
721
|
+
* @summary Set workspace auto-stop interval
|
|
722
|
+
* @param {string} workspaceId ID of the workspace
|
|
723
|
+
* @param {number} interval Auto-stop interval in minutes (0 to disable)
|
|
724
|
+
* @param {*} [options] Override http request option.
|
|
725
|
+
* @throws {RequiredError}
|
|
726
|
+
*/
|
|
727
|
+
setAutostopInterval(workspaceId: string, interval: number, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
728
|
+
return localVarFp.setAutostopInterval(workspaceId, interval, options).then((request) => request(axios, basePath));
|
|
729
|
+
},
|
|
663
730
|
/**
|
|
664
731
|
*
|
|
665
732
|
* @summary Start workspace
|
|
@@ -786,6 +853,19 @@ export class WorkspaceApi extends BaseAPI {
|
|
|
786
853
|
return WorkspaceApiFp(this.configuration).replaceLabels(workspaceId, workspaceLabels, options).then((request) => request(this.axios, this.basePath));
|
|
787
854
|
}
|
|
788
855
|
|
|
856
|
+
/**
|
|
857
|
+
*
|
|
858
|
+
* @summary Set workspace auto-stop interval
|
|
859
|
+
* @param {string} workspaceId ID of the workspace
|
|
860
|
+
* @param {number} interval Auto-stop interval in minutes (0 to disable)
|
|
861
|
+
* @param {*} [options] Override http request option.
|
|
862
|
+
* @throws {RequiredError}
|
|
863
|
+
* @memberof WorkspaceApi
|
|
864
|
+
*/
|
|
865
|
+
public setAutostopInterval(workspaceId: string, interval: number, options?: RawAxiosRequestConfig) {
|
|
866
|
+
return WorkspaceApiFp(this.configuration).setAutostopInterval(workspaceId, interval, options).then((request) => request(this.axios, this.basePath));
|
|
867
|
+
}
|
|
868
|
+
|
|
789
869
|
/**
|
|
790
870
|
*
|
|
791
871
|
* @summary Start workspace
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import type { Configuration } from '../configuration';
|
|
13
13
|
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
14
14
|
import { type RequestArgs, BaseAPI } from '../base';
|
|
15
|
+
import type { Command } from '../models';
|
|
15
16
|
import type { CompletionList } from '../models';
|
|
16
17
|
import type { CreateSessionRequest } from '../models';
|
|
17
18
|
import type { ExecuteRequest } from '../models';
|
|
@@ -135,6 +136,25 @@ export declare const ToolboxApiAxiosParamCreator: (configuration?: Configuration
|
|
|
135
136
|
* @throws {RequiredError}
|
|
136
137
|
*/
|
|
137
138
|
getProjectDir: (workspaceId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
139
|
+
/**
|
|
140
|
+
* Get session by ID
|
|
141
|
+
* @summary Get session
|
|
142
|
+
* @param {string} workspaceId
|
|
143
|
+
* @param {string} sessionId
|
|
144
|
+
* @param {*} [options] Override http request option.
|
|
145
|
+
* @throws {RequiredError}
|
|
146
|
+
*/
|
|
147
|
+
getSession: (workspaceId: string, sessionId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
148
|
+
/**
|
|
149
|
+
* Get session command by ID
|
|
150
|
+
* @summary Get session command
|
|
151
|
+
* @param {string} workspaceId
|
|
152
|
+
* @param {string} sessionId
|
|
153
|
+
* @param {string} commandId
|
|
154
|
+
* @param {*} [options] Override http request option.
|
|
155
|
+
* @throws {RequiredError}
|
|
156
|
+
*/
|
|
157
|
+
getSessionCommand: (workspaceId: string, sessionId: string, commandId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
138
158
|
/**
|
|
139
159
|
* Get logs for a specific command in a session
|
|
140
160
|
* @summary Get command logs
|
|
@@ -459,6 +479,25 @@ export declare const ToolboxApiFp: (configuration?: Configuration) => {
|
|
|
459
479
|
* @throws {RequiredError}
|
|
460
480
|
*/
|
|
461
481
|
getProjectDir(workspaceId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProjectDirResponse>>;
|
|
482
|
+
/**
|
|
483
|
+
* Get session by ID
|
|
484
|
+
* @summary Get session
|
|
485
|
+
* @param {string} workspaceId
|
|
486
|
+
* @param {string} sessionId
|
|
487
|
+
* @param {*} [options] Override http request option.
|
|
488
|
+
* @throws {RequiredError}
|
|
489
|
+
*/
|
|
490
|
+
getSession(workspaceId: string, sessionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Session>>;
|
|
491
|
+
/**
|
|
492
|
+
* Get session command by ID
|
|
493
|
+
* @summary Get session command
|
|
494
|
+
* @param {string} workspaceId
|
|
495
|
+
* @param {string} sessionId
|
|
496
|
+
* @param {string} commandId
|
|
497
|
+
* @param {*} [options] Override http request option.
|
|
498
|
+
* @throws {RequiredError}
|
|
499
|
+
*/
|
|
500
|
+
getSessionCommand(workspaceId: string, sessionId: string, commandId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Command>>;
|
|
462
501
|
/**
|
|
463
502
|
* Get logs for a specific command in a session
|
|
464
503
|
* @summary Get command logs
|
|
@@ -783,6 +822,25 @@ export declare const ToolboxApiFactory: (configuration?: Configuration, basePath
|
|
|
783
822
|
* @throws {RequiredError}
|
|
784
823
|
*/
|
|
785
824
|
getProjectDir(workspaceId: string, options?: RawAxiosRequestConfig): AxiosPromise<ProjectDirResponse>;
|
|
825
|
+
/**
|
|
826
|
+
* Get session by ID
|
|
827
|
+
* @summary Get session
|
|
828
|
+
* @param {string} workspaceId
|
|
829
|
+
* @param {string} sessionId
|
|
830
|
+
* @param {*} [options] Override http request option.
|
|
831
|
+
* @throws {RequiredError}
|
|
832
|
+
*/
|
|
833
|
+
getSession(workspaceId: string, sessionId: string, options?: RawAxiosRequestConfig): AxiosPromise<Session>;
|
|
834
|
+
/**
|
|
835
|
+
* Get session command by ID
|
|
836
|
+
* @summary Get session command
|
|
837
|
+
* @param {string} workspaceId
|
|
838
|
+
* @param {string} sessionId
|
|
839
|
+
* @param {string} commandId
|
|
840
|
+
* @param {*} [options] Override http request option.
|
|
841
|
+
* @throws {RequiredError}
|
|
842
|
+
*/
|
|
843
|
+
getSessionCommand(workspaceId: string, sessionId: string, commandId: string, options?: RawAxiosRequestConfig): AxiosPromise<Command>;
|
|
786
844
|
/**
|
|
787
845
|
* Get logs for a specific command in a session
|
|
788
846
|
* @summary Get command logs
|
|
@@ -1119,6 +1177,27 @@ export declare class ToolboxApi extends BaseAPI {
|
|
|
1119
1177
|
* @memberof ToolboxApi
|
|
1120
1178
|
*/
|
|
1121
1179
|
getProjectDir(workspaceId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ProjectDirResponse, any>>;
|
|
1180
|
+
/**
|
|
1181
|
+
* Get session by ID
|
|
1182
|
+
* @summary Get session
|
|
1183
|
+
* @param {string} workspaceId
|
|
1184
|
+
* @param {string} sessionId
|
|
1185
|
+
* @param {*} [options] Override http request option.
|
|
1186
|
+
* @throws {RequiredError}
|
|
1187
|
+
* @memberof ToolboxApi
|
|
1188
|
+
*/
|
|
1189
|
+
getSession(workspaceId: string, sessionId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Session, any>>;
|
|
1190
|
+
/**
|
|
1191
|
+
* Get session command by ID
|
|
1192
|
+
* @summary Get session command
|
|
1193
|
+
* @param {string} workspaceId
|
|
1194
|
+
* @param {string} sessionId
|
|
1195
|
+
* @param {string} commandId
|
|
1196
|
+
* @param {*} [options] Override http request option.
|
|
1197
|
+
* @throws {RequiredError}
|
|
1198
|
+
* @memberof ToolboxApi
|
|
1199
|
+
*/
|
|
1200
|
+
getSessionCommand(workspaceId: string, sessionId: string, commandId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Command, any>>;
|
|
1122
1201
|
/**
|
|
1123
1202
|
* Get logs for a specific command in a session
|
|
1124
1203
|
* @summary Get command logs
|
package/dist/api/toolbox-api.js
CHANGED
|
@@ -420,6 +420,82 @@ const ToolboxApiAxiosParamCreator = function (configuration) {
|
|
|
420
420
|
options: localVarRequestOptions,
|
|
421
421
|
};
|
|
422
422
|
}),
|
|
423
|
+
/**
|
|
424
|
+
* Get session by ID
|
|
425
|
+
* @summary Get session
|
|
426
|
+
* @param {string} workspaceId
|
|
427
|
+
* @param {string} sessionId
|
|
428
|
+
* @param {*} [options] Override http request option.
|
|
429
|
+
* @throws {RequiredError}
|
|
430
|
+
*/
|
|
431
|
+
getSession: (workspaceId_1, sessionId_1, ...args_1) => __awaiter(this, [workspaceId_1, sessionId_1, ...args_1], void 0, function* (workspaceId, sessionId, options = {}) {
|
|
432
|
+
// verify required parameter 'workspaceId' is not null or undefined
|
|
433
|
+
(0, common_1.assertParamExists)('getSession', 'workspaceId', workspaceId);
|
|
434
|
+
// verify required parameter 'sessionId' is not null or undefined
|
|
435
|
+
(0, common_1.assertParamExists)('getSession', 'sessionId', sessionId);
|
|
436
|
+
const localVarPath = `/toolbox/{workspaceId}/toolbox/process/session/{sessionId}`
|
|
437
|
+
.replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)))
|
|
438
|
+
.replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
|
|
439
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
440
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
441
|
+
let baseOptions;
|
|
442
|
+
if (configuration) {
|
|
443
|
+
baseOptions = configuration.baseOptions;
|
|
444
|
+
}
|
|
445
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
446
|
+
const localVarHeaderParameter = {};
|
|
447
|
+
const localVarQueryParameter = {};
|
|
448
|
+
// authentication oauth2 required
|
|
449
|
+
// oauth required
|
|
450
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
|
|
451
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
452
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
453
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
454
|
+
return {
|
|
455
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
456
|
+
options: localVarRequestOptions,
|
|
457
|
+
};
|
|
458
|
+
}),
|
|
459
|
+
/**
|
|
460
|
+
* Get session command by ID
|
|
461
|
+
* @summary Get session command
|
|
462
|
+
* @param {string} workspaceId
|
|
463
|
+
* @param {string} sessionId
|
|
464
|
+
* @param {string} commandId
|
|
465
|
+
* @param {*} [options] Override http request option.
|
|
466
|
+
* @throws {RequiredError}
|
|
467
|
+
*/
|
|
468
|
+
getSessionCommand: (workspaceId_1, sessionId_1, commandId_1, ...args_1) => __awaiter(this, [workspaceId_1, sessionId_1, commandId_1, ...args_1], void 0, function* (workspaceId, sessionId, commandId, options = {}) {
|
|
469
|
+
// verify required parameter 'workspaceId' is not null or undefined
|
|
470
|
+
(0, common_1.assertParamExists)('getSessionCommand', 'workspaceId', workspaceId);
|
|
471
|
+
// verify required parameter 'sessionId' is not null or undefined
|
|
472
|
+
(0, common_1.assertParamExists)('getSessionCommand', 'sessionId', sessionId);
|
|
473
|
+
// verify required parameter 'commandId' is not null or undefined
|
|
474
|
+
(0, common_1.assertParamExists)('getSessionCommand', 'commandId', commandId);
|
|
475
|
+
const localVarPath = `/toolbox/{workspaceId}/toolbox/process/session/{sessionId}/command/{commandId}`
|
|
476
|
+
.replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)))
|
|
477
|
+
.replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)))
|
|
478
|
+
.replace(`{${"commandId"}}`, encodeURIComponent(String(commandId)));
|
|
479
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
480
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
481
|
+
let baseOptions;
|
|
482
|
+
if (configuration) {
|
|
483
|
+
baseOptions = configuration.baseOptions;
|
|
484
|
+
}
|
|
485
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
486
|
+
const localVarHeaderParameter = {};
|
|
487
|
+
const localVarQueryParameter = {};
|
|
488
|
+
// authentication oauth2 required
|
|
489
|
+
// oauth required
|
|
490
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
|
|
491
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
492
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
493
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
494
|
+
return {
|
|
495
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
496
|
+
options: localVarRequestOptions,
|
|
497
|
+
};
|
|
498
|
+
}),
|
|
423
499
|
/**
|
|
424
500
|
* Get logs for a specific command in a session
|
|
425
501
|
* @summary Get command logs
|
|
@@ -1551,6 +1627,41 @@ const ToolboxApiFp = function (configuration) {
|
|
|
1551
1627
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1552
1628
|
});
|
|
1553
1629
|
},
|
|
1630
|
+
/**
|
|
1631
|
+
* Get session by ID
|
|
1632
|
+
* @summary Get session
|
|
1633
|
+
* @param {string} workspaceId
|
|
1634
|
+
* @param {string} sessionId
|
|
1635
|
+
* @param {*} [options] Override http request option.
|
|
1636
|
+
* @throws {RequiredError}
|
|
1637
|
+
*/
|
|
1638
|
+
getSession(workspaceId, sessionId, options) {
|
|
1639
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1640
|
+
var _a, _b, _c;
|
|
1641
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getSession(workspaceId, sessionId, options);
|
|
1642
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1643
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ToolboxApi.getSession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1644
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1645
|
+
});
|
|
1646
|
+
},
|
|
1647
|
+
/**
|
|
1648
|
+
* Get session command by ID
|
|
1649
|
+
* @summary Get session command
|
|
1650
|
+
* @param {string} workspaceId
|
|
1651
|
+
* @param {string} sessionId
|
|
1652
|
+
* @param {string} commandId
|
|
1653
|
+
* @param {*} [options] Override http request option.
|
|
1654
|
+
* @throws {RequiredError}
|
|
1655
|
+
*/
|
|
1656
|
+
getSessionCommand(workspaceId, sessionId, commandId, options) {
|
|
1657
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1658
|
+
var _a, _b, _c;
|
|
1659
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getSessionCommand(workspaceId, sessionId, commandId, options);
|
|
1660
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1661
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ToolboxApi.getSessionCommand']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1662
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1663
|
+
});
|
|
1664
|
+
},
|
|
1554
1665
|
/**
|
|
1555
1666
|
* Get logs for a specific command in a session
|
|
1556
1667
|
* @summary Get command logs
|
|
@@ -2091,6 +2202,29 @@ const ToolboxApiFactory = function (configuration, basePath, axios) {
|
|
|
2091
2202
|
getProjectDir(workspaceId, options) {
|
|
2092
2203
|
return localVarFp.getProjectDir(workspaceId, options).then((request) => request(axios, basePath));
|
|
2093
2204
|
},
|
|
2205
|
+
/**
|
|
2206
|
+
* Get session by ID
|
|
2207
|
+
* @summary Get session
|
|
2208
|
+
* @param {string} workspaceId
|
|
2209
|
+
* @param {string} sessionId
|
|
2210
|
+
* @param {*} [options] Override http request option.
|
|
2211
|
+
* @throws {RequiredError}
|
|
2212
|
+
*/
|
|
2213
|
+
getSession(workspaceId, sessionId, options) {
|
|
2214
|
+
return localVarFp.getSession(workspaceId, sessionId, options).then((request) => request(axios, basePath));
|
|
2215
|
+
},
|
|
2216
|
+
/**
|
|
2217
|
+
* Get session command by ID
|
|
2218
|
+
* @summary Get session command
|
|
2219
|
+
* @param {string} workspaceId
|
|
2220
|
+
* @param {string} sessionId
|
|
2221
|
+
* @param {string} commandId
|
|
2222
|
+
* @param {*} [options] Override http request option.
|
|
2223
|
+
* @throws {RequiredError}
|
|
2224
|
+
*/
|
|
2225
|
+
getSessionCommand(workspaceId, sessionId, commandId, options) {
|
|
2226
|
+
return localVarFp.getSessionCommand(workspaceId, sessionId, commandId, options).then((request) => request(axios, basePath));
|
|
2227
|
+
},
|
|
2094
2228
|
/**
|
|
2095
2229
|
* Get logs for a specific command in a session
|
|
2096
2230
|
* @summary Get command logs
|
|
@@ -2497,6 +2631,31 @@ class ToolboxApi extends base_1.BaseAPI {
|
|
|
2497
2631
|
getProjectDir(workspaceId, options) {
|
|
2498
2632
|
return (0, exports.ToolboxApiFp)(this.configuration).getProjectDir(workspaceId, options).then((request) => request(this.axios, this.basePath));
|
|
2499
2633
|
}
|
|
2634
|
+
/**
|
|
2635
|
+
* Get session by ID
|
|
2636
|
+
* @summary Get session
|
|
2637
|
+
* @param {string} workspaceId
|
|
2638
|
+
* @param {string} sessionId
|
|
2639
|
+
* @param {*} [options] Override http request option.
|
|
2640
|
+
* @throws {RequiredError}
|
|
2641
|
+
* @memberof ToolboxApi
|
|
2642
|
+
*/
|
|
2643
|
+
getSession(workspaceId, sessionId, options) {
|
|
2644
|
+
return (0, exports.ToolboxApiFp)(this.configuration).getSession(workspaceId, sessionId, options).then((request) => request(this.axios, this.basePath));
|
|
2645
|
+
}
|
|
2646
|
+
/**
|
|
2647
|
+
* Get session command by ID
|
|
2648
|
+
* @summary Get session command
|
|
2649
|
+
* @param {string} workspaceId
|
|
2650
|
+
* @param {string} sessionId
|
|
2651
|
+
* @param {string} commandId
|
|
2652
|
+
* @param {*} [options] Override http request option.
|
|
2653
|
+
* @throws {RequiredError}
|
|
2654
|
+
* @memberof ToolboxApi
|
|
2655
|
+
*/
|
|
2656
|
+
getSessionCommand(workspaceId, sessionId, commandId, options) {
|
|
2657
|
+
return (0, exports.ToolboxApiFp)(this.configuration).getSessionCommand(workspaceId, sessionId, commandId, options).then((request) => request(this.axios, this.basePath));
|
|
2658
|
+
}
|
|
2500
2659
|
/**
|
|
2501
2660
|
* Get logs for a specific command in a session
|
|
2502
2661
|
* @summary Get command logs
|