@onkernel/sdk 0.14.2 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +5 -17
  3. package/internal/uploads.js +20 -1
  4. package/internal/uploads.js.map +1 -1
  5. package/internal/uploads.mjs +20 -1
  6. package/internal/uploads.mjs.map +1 -1
  7. package/package.json +1 -1
  8. package/resources/browsers/browsers.d.mts +4 -0
  9. package/resources/browsers/browsers.d.mts.map +1 -1
  10. package/resources/browsers/browsers.d.ts +4 -0
  11. package/resources/browsers/browsers.d.ts.map +1 -1
  12. package/resources/browsers/browsers.js +4 -0
  13. package/resources/browsers/browsers.js.map +1 -1
  14. package/resources/browsers/browsers.mjs +4 -0
  15. package/resources/browsers/browsers.mjs.map +1 -1
  16. package/resources/browsers/computer.d.mts +232 -0
  17. package/resources/browsers/computer.d.mts.map +1 -0
  18. package/resources/browsers/computer.d.ts +232 -0
  19. package/resources/browsers/computer.d.ts.map +1 -0
  20. package/resources/browsers/computer.js +136 -0
  21. package/resources/browsers/computer.js.map +1 -0
  22. package/resources/browsers/computer.mjs +132 -0
  23. package/resources/browsers/computer.mjs.map +1 -0
  24. package/resources/browsers/index.d.mts +1 -0
  25. package/resources/browsers/index.d.mts.map +1 -1
  26. package/resources/browsers/index.d.ts +1 -0
  27. package/resources/browsers/index.d.ts.map +1 -1
  28. package/resources/browsers/index.js +3 -1
  29. package/resources/browsers/index.js.map +1 -1
  30. package/resources/browsers/index.mjs +1 -0
  31. package/resources/browsers/index.mjs.map +1 -1
  32. package/resources/deployments.d.mts +58 -5
  33. package/resources/deployments.d.mts.map +1 -1
  34. package/resources/deployments.d.ts +58 -5
  35. package/resources/deployments.d.ts.map +1 -1
  36. package/resources/deployments.js +3 -0
  37. package/resources/deployments.js.map +1 -1
  38. package/resources/deployments.mjs +3 -0
  39. package/resources/deployments.mjs.map +1 -1
  40. package/src/internal/uploads.ts +21 -3
  41. package/src/resources/browsers/browsers.ts +24 -0
  42. package/src/resources/browsers/computer.ts +328 -0
  43. package/src/resources/browsers/index.ts +10 -0
  44. package/src/resources/deployments.ts +68 -6
  45. package/src/version.ts +1 -1
  46. package/version.d.mts +1 -1
  47. package/version.d.ts +1 -1
  48. package/version.js +1 -1
  49. package/version.mjs +1 -1
@@ -11,6 +11,16 @@ export {
11
11
  type BrowserDeleteParams,
12
12
  type BrowserLoadExtensionsParams,
13
13
  } from './browsers';
14
+ export {
15
+ Computer,
16
+ type ComputerCaptureScreenshotParams,
17
+ type ComputerClickMouseParams,
18
+ type ComputerDragMouseParams,
19
+ type ComputerMoveMouseParams,
20
+ type ComputerPressKeyParams,
21
+ type ComputerScrollParams,
22
+ type ComputerTypeTextParams,
23
+ } from './computer';
14
24
  export {
15
25
  Fs,
16
26
  type FFileInfoResponse,
@@ -19,7 +19,10 @@ export class Deployments extends APIResource {
19
19
  * ```ts
20
20
  * const deployment = await client.deployments.create({
21
21
  * entrypoint_rel_path: 'src/app.py',
22
+ * env_vars: { FOO: 'bar' },
22
23
  * file: fs.createReadStream('path/to/file'),
24
+ * region: 'aws.us-east-1a',
25
+ * version: '1.0.0',
23
26
  * });
24
27
  * ```
25
28
  */
@@ -349,12 +352,7 @@ export interface DeploymentCreateParams {
349
352
  /**
350
353
  * Relative path to the entrypoint of the application
351
354
  */
352
- entrypoint_rel_path: string;
353
-
354
- /**
355
- * ZIP file containing the application source directory
356
- */
357
- file: Uploadable;
355
+ entrypoint_rel_path?: string;
358
356
 
359
357
  /**
360
358
  * Map of environment variables to set for the deployed application. Each key-value
@@ -362,6 +360,11 @@ export interface DeploymentCreateParams {
362
360
  */
363
361
  env_vars?: { [key: string]: string };
364
362
 
363
+ /**
364
+ * ZIP file containing the application source directory
365
+ */
366
+ file?: Uploadable;
367
+
365
368
  /**
366
369
  * Allow overwriting an existing app version
367
370
  */
@@ -372,12 +375,71 @@ export interface DeploymentCreateParams {
372
375
  */
373
376
  region?: 'aws.us-east-1a';
374
377
 
378
+ /**
379
+ * Source from which to fetch application code.
380
+ */
381
+ source?: DeploymentCreateParams.Source;
382
+
375
383
  /**
376
384
  * Version of the application. Can be any string.
377
385
  */
378
386
  version?: string;
379
387
  }
380
388
 
389
+ export namespace DeploymentCreateParams {
390
+ /**
391
+ * Source from which to fetch application code.
392
+ */
393
+ export interface Source {
394
+ /**
395
+ * Relative path to the application entrypoint within the selected path.
396
+ */
397
+ entrypoint: string;
398
+
399
+ /**
400
+ * Git ref (branch, tag, or commit SHA) to fetch.
401
+ */
402
+ ref: string;
403
+
404
+ /**
405
+ * Source type identifier.
406
+ */
407
+ type: 'github';
408
+
409
+ /**
410
+ * Base repository URL (without blob/tree suffixes).
411
+ */
412
+ url: string;
413
+
414
+ /**
415
+ * Authentication for private repositories.
416
+ */
417
+ auth?: Source.Auth;
418
+
419
+ /**
420
+ * Path within the repo to deploy (omit to use repo root).
421
+ */
422
+ path?: string;
423
+ }
424
+
425
+ export namespace Source {
426
+ /**
427
+ * Authentication for private repositories.
428
+ */
429
+ export interface Auth {
430
+ /**
431
+ * GitHub PAT or installation access token
432
+ */
433
+ token: string;
434
+
435
+ /**
436
+ * Auth method
437
+ */
438
+ method: 'github_token';
439
+ }
440
+ }
441
+ }
442
+
381
443
  export interface DeploymentListParams extends OffsetPaginationParams {
382
444
  /**
383
445
  * Filter results by application name.
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.14.2'; // x-release-please-version
1
+ export const VERSION = '0.15.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.14.2";
1
+ export declare const VERSION = "0.15.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.14.2";
1
+ export declare const VERSION = "0.15.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.14.2'; // x-release-please-version
4
+ exports.VERSION = '0.15.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.14.2'; // x-release-please-version
1
+ export const VERSION = '0.15.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map