@onkernel/sdk 0.17.0 → 0.19.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/apps.d.mts +39 -41
  10. package/resources/apps.d.mts.map +1 -1
  11. package/resources/apps.d.ts +39 -41
  12. package/resources/apps.d.ts.map +1 -1
  13. package/resources/apps.js +2 -1
  14. package/resources/apps.js.map +1 -1
  15. package/resources/apps.mjs +2 -1
  16. package/resources/apps.mjs.map +1 -1
  17. package/resources/browsers/browsers.d.mts +2 -2
  18. package/resources/browsers/browsers.d.mts.map +1 -1
  19. package/resources/browsers/browsers.d.ts +2 -2
  20. package/resources/browsers/browsers.d.ts.map +1 -1
  21. package/resources/browsers/browsers.js.map +1 -1
  22. package/resources/browsers/browsers.mjs.map +1 -1
  23. package/resources/browsers/computer.d.mts +28 -1
  24. package/resources/browsers/computer.d.mts.map +1 -1
  25. package/resources/browsers/computer.d.ts +28 -1
  26. package/resources/browsers/computer.d.ts.map +1 -1
  27. package/resources/browsers/computer.js +14 -0
  28. package/resources/browsers/computer.js.map +1 -1
  29. package/resources/browsers/computer.mjs +14 -0
  30. package/resources/browsers/computer.mjs.map +1 -1
  31. package/resources/browsers/index.d.mts +1 -1
  32. package/resources/browsers/index.d.mts.map +1 -1
  33. package/resources/browsers/index.d.ts +1 -1
  34. package/resources/browsers/index.d.ts.map +1 -1
  35. package/resources/browsers/index.js.map +1 -1
  36. package/resources/browsers/index.mjs.map +1 -1
  37. package/resources/index.d.mts +1 -1
  38. package/resources/index.d.mts.map +1 -1
  39. package/resources/index.d.ts +1 -1
  40. package/resources/index.d.ts.map +1 -1
  41. package/resources/index.js.map +1 -1
  42. package/resources/index.mjs +1 -1
  43. package/resources/index.mjs.map +1 -1
  44. package/src/client.ts +7 -2
  45. package/src/resources/apps.ts +43 -38
  46. package/src/resources/browsers/browsers.ts +4 -0
  47. package/src/resources/browsers/computer.ts +38 -0
  48. package/src/resources/browsers/index.ts +2 -0
  49. package/src/resources/index.ts +6 -1
  50. package/src/version.ts +1 -1
  51. package/version.d.mts +1 -1
  52. package/version.d.ts +1 -1
  53. package/version.js +1 -1
  54. package/version.mjs +1 -1
@@ -2,63 +2,64 @@
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
4
  import * as Shared from './shared';
5
- import { APIPromise } from '../core/api-promise';
5
+ import { OffsetPagination, type OffsetPaginationParams, PagePromise } from '../core/pagination';
6
6
  import { RequestOptions } from '../internal/request-options';
7
7
 
8
8
  export class Apps extends APIResource {
9
9
  /**
10
10
  * List applications. Optionally filter by app name and/or version label.
11
11
  */
12
- list(query: AppListParams | null | undefined = {}, options?: RequestOptions): APIPromise<AppListResponse> {
13
- return this._client.get('/apps', { query, ...options });
12
+ list(
13
+ query: AppListParams | null | undefined = {},
14
+ options?: RequestOptions,
15
+ ): PagePromise<AppListResponsesOffsetPagination, AppListResponse> {
16
+ return this._client.getAPIList('/apps', OffsetPagination<AppListResponse>, { query, ...options });
14
17
  }
15
18
  }
16
19
 
17
- export type AppListResponse = Array<AppListResponse.AppListResponseItem>;
20
+ export type AppListResponsesOffsetPagination = OffsetPagination<AppListResponse>;
18
21
 
19
- export namespace AppListResponse {
22
+ /**
23
+ * Summary of an application version.
24
+ */
25
+ export interface AppListResponse {
20
26
  /**
21
- * Summary of an application version.
27
+ * Unique identifier for the app version
22
28
  */
23
- export interface AppListResponseItem {
24
- /**
25
- * Unique identifier for the app version
26
- */
27
- id: string;
29
+ id: string;
28
30
 
29
- /**
30
- * List of actions available on the app
31
- */
32
- actions: Array<Shared.AppAction>;
31
+ /**
32
+ * List of actions available on the app
33
+ */
34
+ actions: Array<Shared.AppAction>;
33
35
 
34
- /**
35
- * Name of the application
36
- */
37
- app_name: string;
36
+ /**
37
+ * Name of the application
38
+ */
39
+ app_name: string;
38
40
 
39
- /**
40
- * Deployment ID
41
- */
42
- deployment: string;
41
+ /**
42
+ * Deployment ID
43
+ */
44
+ deployment: string;
43
45
 
44
- /**
45
- * Environment variables configured for this app version
46
- */
47
- env_vars: { [key: string]: string };
46
+ /**
47
+ * Environment variables configured for this app version
48
+ */
49
+ env_vars: { [key: string]: string };
48
50
 
49
- /**
50
- * Deployment region code
51
- */
52
- region: 'aws.us-east-1a';
51
+ /**
52
+ * Deployment region code
53
+ */
54
+ region: 'aws.us-east-1a';
53
55
 
54
- /**
55
- * Version label for the application
56
- */
57
- version: string;
58
- }
56
+ /**
57
+ * Version label for the application
58
+ */
59
+ version: string;
59
60
  }
60
61
 
61
- export interface AppListParams {
62
+ export interface AppListParams extends OffsetPaginationParams {
62
63
  /**
63
64
  * Filter results by application name.
64
65
  */
@@ -71,5 +72,9 @@ export interface AppListParams {
71
72
  }
72
73
 
73
74
  export declare namespace Apps {
74
- export { type AppListResponse as AppListResponse, type AppListParams as AppListParams };
75
+ export {
76
+ type AppListResponse as AppListResponse,
77
+ type AppListResponsesOffsetPagination as AppListResponsesOffsetPagination,
78
+ type AppListParams as AppListParams,
79
+ };
75
80
  }
@@ -11,6 +11,8 @@ import {
11
11
  ComputerMoveMouseParams,
12
12
  ComputerPressKeyParams,
13
13
  ComputerScrollParams,
14
+ ComputerSetCursorVisibilityParams,
15
+ ComputerSetCursorVisibilityResponse,
14
16
  ComputerTypeTextParams,
15
17
  } from './computer';
16
18
  import * as LogsAPI from './logs';
@@ -759,12 +761,14 @@ export declare namespace Browsers {
759
761
 
760
762
  export {
761
763
  Computer as Computer,
764
+ type ComputerSetCursorVisibilityResponse as ComputerSetCursorVisibilityResponse,
762
765
  type ComputerCaptureScreenshotParams as ComputerCaptureScreenshotParams,
763
766
  type ComputerClickMouseParams as ComputerClickMouseParams,
764
767
  type ComputerDragMouseParams as ComputerDragMouseParams,
765
768
  type ComputerMoveMouseParams as ComputerMoveMouseParams,
766
769
  type ComputerPressKeyParams as ComputerPressKeyParams,
767
770
  type ComputerScrollParams as ComputerScrollParams,
771
+ type ComputerSetCursorVisibilityParams as ComputerSetCursorVisibilityParams,
768
772
  type ComputerTypeTextParams as ComputerTypeTextParams,
769
773
  };
770
774
 
@@ -125,6 +125,25 @@ export class Computer extends APIResource {
125
125
  });
126
126
  }
127
127
 
128
+ /**
129
+ * Set cursor visibility
130
+ *
131
+ * @example
132
+ * ```ts
133
+ * const response =
134
+ * await client.browsers.computer.setCursorVisibility('id', {
135
+ * hidden: true,
136
+ * });
137
+ * ```
138
+ */
139
+ setCursorVisibility(
140
+ id: string,
141
+ body: ComputerSetCursorVisibilityParams,
142
+ options?: RequestOptions,
143
+ ): APIPromise<ComputerSetCursorVisibilityResponse> {
144
+ return this._client.post(path`/browsers/${id}/computer/cursor`, { body, ...options });
145
+ }
146
+
128
147
  /**
129
148
  * Type text on the browser instance
130
149
  *
@@ -144,6 +163,16 @@ export class Computer extends APIResource {
144
163
  }
145
164
  }
146
165
 
166
+ /**
167
+ * Generic OK response.
168
+ */
169
+ export interface ComputerSetCursorVisibilityResponse {
170
+ /**
171
+ * Indicates success.
172
+ */
173
+ ok: boolean;
174
+ }
175
+
147
176
  export interface ComputerCaptureScreenshotParams {
148
177
  region?: ComputerCaptureScreenshotParams.Region;
149
178
  }
@@ -303,6 +332,13 @@ export interface ComputerScrollParams {
303
332
  hold_keys?: Array<string>;
304
333
  }
305
334
 
335
+ export interface ComputerSetCursorVisibilityParams {
336
+ /**
337
+ * Whether the cursor should be hidden or visible
338
+ */
339
+ hidden: boolean;
340
+ }
341
+
306
342
  export interface ComputerTypeTextParams {
307
343
  /**
308
344
  * Text to type on the browser instance
@@ -317,12 +353,14 @@ export interface ComputerTypeTextParams {
317
353
 
318
354
  export declare namespace Computer {
319
355
  export {
356
+ type ComputerSetCursorVisibilityResponse as ComputerSetCursorVisibilityResponse,
320
357
  type ComputerCaptureScreenshotParams as ComputerCaptureScreenshotParams,
321
358
  type ComputerClickMouseParams as ComputerClickMouseParams,
322
359
  type ComputerDragMouseParams as ComputerDragMouseParams,
323
360
  type ComputerMoveMouseParams as ComputerMoveMouseParams,
324
361
  type ComputerPressKeyParams as ComputerPressKeyParams,
325
362
  type ComputerScrollParams as ComputerScrollParams,
363
+ type ComputerSetCursorVisibilityParams as ComputerSetCursorVisibilityParams,
326
364
  type ComputerTypeTextParams as ComputerTypeTextParams,
327
365
  };
328
366
  }
@@ -13,12 +13,14 @@ export {
13
13
  } from './browsers';
14
14
  export {
15
15
  Computer,
16
+ type ComputerSetCursorVisibilityResponse,
16
17
  type ComputerCaptureScreenshotParams,
17
18
  type ComputerClickMouseParams,
18
19
  type ComputerDragMouseParams,
19
20
  type ComputerMoveMouseParams,
20
21
  type ComputerPressKeyParams,
21
22
  type ComputerScrollParams,
23
+ type ComputerSetCursorVisibilityParams,
22
24
  type ComputerTypeTextParams,
23
25
  } from './computer';
24
26
  export {
@@ -1,7 +1,12 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  export * from './shared';
4
- export { Apps, type AppListResponse, type AppListParams } from './apps';
4
+ export {
5
+ Apps,
6
+ type AppListResponse,
7
+ type AppListParams,
8
+ type AppListResponsesOffsetPagination,
9
+ } from './apps';
5
10
  export {
6
11
  Browsers,
7
12
  type BrowserPersistence,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.17.0'; // x-release-please-version
1
+ export const VERSION = '0.19.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.17.0";
1
+ export declare const VERSION = "0.19.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.17.0";
1
+ export declare const VERSION = "0.19.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.17.0'; // x-release-please-version
4
+ exports.VERSION = '0.19.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.17.0'; // x-release-please-version
1
+ export const VERSION = '0.19.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map