@daytonaio/api-client 0.11.0 → 0.12.2

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 CHANGED
@@ -1,4 +1,4 @@
1
- ## @daytonaio/api-client@0.11.0
1
+ ## @daytonaio/api-client@0.12.2
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.11.0 --save
39
+ npm install @daytonaio/api-client@0.12.2 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -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
@@ -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
@@ -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
@@ -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
@@ -417,6 +417,82 @@ export const ToolboxApiAxiosParamCreator = function (configuration) {
417
417
  options: localVarRequestOptions,
418
418
  };
419
419
  }),
420
+ /**
421
+ * Get session by ID
422
+ * @summary Get session
423
+ * @param {string} workspaceId
424
+ * @param {string} sessionId
425
+ * @param {*} [options] Override http request option.
426
+ * @throws {RequiredError}
427
+ */
428
+ getSession: (workspaceId_1, sessionId_1, ...args_1) => __awaiter(this, [workspaceId_1, sessionId_1, ...args_1], void 0, function* (workspaceId, sessionId, options = {}) {
429
+ // verify required parameter 'workspaceId' is not null or undefined
430
+ assertParamExists('getSession', 'workspaceId', workspaceId);
431
+ // verify required parameter 'sessionId' is not null or undefined
432
+ assertParamExists('getSession', 'sessionId', sessionId);
433
+ const localVarPath = `/toolbox/{workspaceId}/toolbox/process/session/{sessionId}`
434
+ .replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)))
435
+ .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
436
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
437
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
438
+ let baseOptions;
439
+ if (configuration) {
440
+ baseOptions = configuration.baseOptions;
441
+ }
442
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
443
+ const localVarHeaderParameter = {};
444
+ const localVarQueryParameter = {};
445
+ // authentication oauth2 required
446
+ // oauth required
447
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
448
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
449
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
450
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
451
+ return {
452
+ url: toPathString(localVarUrlObj),
453
+ options: localVarRequestOptions,
454
+ };
455
+ }),
456
+ /**
457
+ * Get session command by ID
458
+ * @summary Get session command
459
+ * @param {string} workspaceId
460
+ * @param {string} sessionId
461
+ * @param {string} commandId
462
+ * @param {*} [options] Override http request option.
463
+ * @throws {RequiredError}
464
+ */
465
+ 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 = {}) {
466
+ // verify required parameter 'workspaceId' is not null or undefined
467
+ assertParamExists('getSessionCommand', 'workspaceId', workspaceId);
468
+ // verify required parameter 'sessionId' is not null or undefined
469
+ assertParamExists('getSessionCommand', 'sessionId', sessionId);
470
+ // verify required parameter 'commandId' is not null or undefined
471
+ assertParamExists('getSessionCommand', 'commandId', commandId);
472
+ const localVarPath = `/toolbox/{workspaceId}/toolbox/process/session/{sessionId}/command/{commandId}`
473
+ .replace(`{${"workspaceId"}}`, encodeURIComponent(String(workspaceId)))
474
+ .replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)))
475
+ .replace(`{${"commandId"}}`, encodeURIComponent(String(commandId)));
476
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
477
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
478
+ let baseOptions;
479
+ if (configuration) {
480
+ baseOptions = configuration.baseOptions;
481
+ }
482
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
483
+ const localVarHeaderParameter = {};
484
+ const localVarQueryParameter = {};
485
+ // authentication oauth2 required
486
+ // oauth required
487
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration);
488
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
489
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
490
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
491
+ return {
492
+ url: toPathString(localVarUrlObj),
493
+ options: localVarRequestOptions,
494
+ };
495
+ }),
420
496
  /**
421
497
  * Get logs for a specific command in a session
422
498
  * @summary Get command logs
@@ -1547,6 +1623,41 @@ export const ToolboxApiFp = function (configuration) {
1547
1623
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1548
1624
  });
1549
1625
  },
1626
+ /**
1627
+ * Get session by ID
1628
+ * @summary Get session
1629
+ * @param {string} workspaceId
1630
+ * @param {string} sessionId
1631
+ * @param {*} [options] Override http request option.
1632
+ * @throws {RequiredError}
1633
+ */
1634
+ getSession(workspaceId, sessionId, options) {
1635
+ return __awaiter(this, void 0, void 0, function* () {
1636
+ var _a, _b, _c;
1637
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getSession(workspaceId, sessionId, options);
1638
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1639
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ToolboxApi.getSession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1640
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1641
+ });
1642
+ },
1643
+ /**
1644
+ * Get session command by ID
1645
+ * @summary Get session command
1646
+ * @param {string} workspaceId
1647
+ * @param {string} sessionId
1648
+ * @param {string} commandId
1649
+ * @param {*} [options] Override http request option.
1650
+ * @throws {RequiredError}
1651
+ */
1652
+ getSessionCommand(workspaceId, sessionId, commandId, options) {
1653
+ return __awaiter(this, void 0, void 0, function* () {
1654
+ var _a, _b, _c;
1655
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getSessionCommand(workspaceId, sessionId, commandId, options);
1656
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1657
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ToolboxApi.getSessionCommand']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1658
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1659
+ });
1660
+ },
1550
1661
  /**
1551
1662
  * Get logs for a specific command in a session
1552
1663
  * @summary Get command logs
@@ -2086,6 +2197,29 @@ export const ToolboxApiFactory = function (configuration, basePath, axios) {
2086
2197
  getProjectDir(workspaceId, options) {
2087
2198
  return localVarFp.getProjectDir(workspaceId, options).then((request) => request(axios, basePath));
2088
2199
  },
2200
+ /**
2201
+ * Get session by ID
2202
+ * @summary Get session
2203
+ * @param {string} workspaceId
2204
+ * @param {string} sessionId
2205
+ * @param {*} [options] Override http request option.
2206
+ * @throws {RequiredError}
2207
+ */
2208
+ getSession(workspaceId, sessionId, options) {
2209
+ return localVarFp.getSession(workspaceId, sessionId, options).then((request) => request(axios, basePath));
2210
+ },
2211
+ /**
2212
+ * Get session command by ID
2213
+ * @summary Get session command
2214
+ * @param {string} workspaceId
2215
+ * @param {string} sessionId
2216
+ * @param {string} commandId
2217
+ * @param {*} [options] Override http request option.
2218
+ * @throws {RequiredError}
2219
+ */
2220
+ getSessionCommand(workspaceId, sessionId, commandId, options) {
2221
+ return localVarFp.getSessionCommand(workspaceId, sessionId, commandId, options).then((request) => request(axios, basePath));
2222
+ },
2089
2223
  /**
2090
2224
  * Get logs for a specific command in a session
2091
2225
  * @summary Get command logs
@@ -2491,6 +2625,31 @@ export class ToolboxApi extends BaseAPI {
2491
2625
  getProjectDir(workspaceId, options) {
2492
2626
  return ToolboxApiFp(this.configuration).getProjectDir(workspaceId, options).then((request) => request(this.axios, this.basePath));
2493
2627
  }
2628
+ /**
2629
+ * Get session by ID
2630
+ * @summary Get session
2631
+ * @param {string} workspaceId
2632
+ * @param {string} sessionId
2633
+ * @param {*} [options] Override http request option.
2634
+ * @throws {RequiredError}
2635
+ * @memberof ToolboxApi
2636
+ */
2637
+ getSession(workspaceId, sessionId, options) {
2638
+ return ToolboxApiFp(this.configuration).getSession(workspaceId, sessionId, options).then((request) => request(this.axios, this.basePath));
2639
+ }
2640
+ /**
2641
+ * Get session command by ID
2642
+ * @summary Get session command
2643
+ * @param {string} workspaceId
2644
+ * @param {string} sessionId
2645
+ * @param {string} commandId
2646
+ * @param {*} [options] Override http request option.
2647
+ * @throws {RequiredError}
2648
+ * @memberof ToolboxApi
2649
+ */
2650
+ getSessionCommand(workspaceId, sessionId, commandId, options) {
2651
+ return ToolboxApiFp(this.configuration).getSessionCommand(workspaceId, sessionId, commandId, options).then((request) => request(this.axios, this.basePath));
2652
+ }
2494
2653
  /**
2495
2654
  * Get logs for a specific command in a session
2496
2655
  * @summary Get command logs
@@ -20,23 +20,17 @@ export interface Command {
20
20
  * @type {string}
21
21
  * @memberof Command
22
22
  */
23
- 'cmdId': string;
23
+ 'id': string;
24
24
  /**
25
25
  * The command that was executed
26
26
  * @type {string}
27
27
  * @memberof Command
28
28
  */
29
29
  'command': string;
30
- /**
31
- * The output of the command
32
- * @type {string}
33
- * @memberof Command
34
- */
35
- 'output': string;
36
30
  /**
37
31
  * The exit code of the command
38
32
  * @type {number}
39
33
  * @memberof Command
40
34
  */
41
- 'exitCode': number;
35
+ 'exitCode'?: number;
42
36
  }
@@ -20,23 +20,17 @@ export interface Command {
20
20
  * @type {string}
21
21
  * @memberof Command
22
22
  */
23
- 'cmdId': string;
23
+ 'id': string;
24
24
  /**
25
25
  * The command that was executed
26
26
  * @type {string}
27
27
  * @memberof Command
28
28
  */
29
29
  'command': string;
30
- /**
31
- * The output of the command
32
- * @type {string}
33
- * @memberof Command
34
- */
35
- 'output': string;
36
30
  /**
37
31
  * The exit code of the command
38
32
  * @type {number}
39
33
  * @memberof Command
40
34
  */
41
- 'exitCode': number;
35
+ 'exitCode'?: number;
42
36
  }
package/models/command.ts CHANGED
@@ -25,24 +25,18 @@ export interface Command {
25
25
  * @type {string}
26
26
  * @memberof Command
27
27
  */
28
- 'cmdId': string;
28
+ 'id': string;
29
29
  /**
30
30
  * The command that was executed
31
31
  * @type {string}
32
32
  * @memberof Command
33
33
  */
34
34
  'command': string;
35
- /**
36
- * The output of the command
37
- * @type {string}
38
- * @memberof Command
39
- */
40
- 'output': string;
41
35
  /**
42
36
  * The exit code of the command
43
37
  * @type {number}
44
38
  * @memberof Command
45
39
  */
46
- 'exitCode': number;
40
+ 'exitCode'?: number;
47
41
  }
48
42
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daytonaio/api-client",
3
- "version": "0.11.0",
3
+ "version": "0.12.2",
4
4
  "description": "OpenAPI client for @daytonaio/api-client",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {