@onkernel/sdk 0.7.1 → 0.8.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.
Files changed (100) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +14 -27
  3. package/client.d.mts +5 -5
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +5 -5
  6. package/client.d.ts.map +1 -1
  7. package/client.js +14 -11
  8. package/client.js.map +1 -1
  9. package/client.mjs +14 -11
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/apps.d.mts +61 -1
  13. package/resources/apps.d.mts.map +1 -1
  14. package/resources/apps.d.ts +61 -1
  15. package/resources/apps.d.ts.map +1 -1
  16. package/resources/apps.js +11 -2
  17. package/resources/apps.js.map +1 -1
  18. package/resources/apps.mjs +9 -1
  19. package/resources/apps.mjs.map +1 -1
  20. package/resources/browsers/browsers.d.mts +160 -0
  21. package/resources/browsers/browsers.d.mts.map +1 -0
  22. package/resources/browsers/browsers.d.ts +160 -0
  23. package/resources/browsers/browsers.d.ts.map +1 -0
  24. package/resources/browsers/browsers.js +88 -0
  25. package/resources/browsers/browsers.js.map +1 -0
  26. package/resources/browsers/browsers.mjs +83 -0
  27. package/resources/browsers/browsers.mjs.map +1 -0
  28. package/resources/browsers/index.d.mts +3 -0
  29. package/resources/browsers/index.d.mts.map +1 -0
  30. package/resources/browsers/index.d.ts +3 -0
  31. package/resources/browsers/index.d.ts.map +1 -0
  32. package/resources/browsers/index.js +9 -0
  33. package/resources/browsers/index.js.map +1 -0
  34. package/resources/browsers/index.mjs +4 -0
  35. package/resources/browsers/index.mjs.map +1 -0
  36. package/resources/browsers/replays.d.mts +120 -0
  37. package/resources/browsers/replays.d.mts.map +1 -0
  38. package/resources/browsers/replays.d.ts +120 -0
  39. package/resources/browsers/replays.d.ts.map +1 -0
  40. package/resources/browsers/replays.js +72 -0
  41. package/resources/browsers/replays.js.map +1 -0
  42. package/resources/browsers/replays.mjs +68 -0
  43. package/resources/browsers/replays.mjs.map +1 -0
  44. package/resources/browsers.d.mts +1 -185
  45. package/resources/browsers.d.mts.map +1 -1
  46. package/resources/browsers.d.ts +1 -185
  47. package/resources/browsers.d.ts.map +1 -1
  48. package/resources/browsers.js +2 -96
  49. package/resources/browsers.js.map +1 -1
  50. package/resources/browsers.mjs +1 -94
  51. package/resources/browsers.mjs.map +1 -1
  52. package/resources/index.d.mts +2 -2
  53. package/resources/index.d.ts +2 -2
  54. package/resources/index.js +2 -2
  55. package/resources/index.js.map +1 -1
  56. package/resources/index.mjs +2 -2
  57. package/resources/invocations.d.mts +4 -0
  58. package/resources/invocations.d.mts.map +1 -1
  59. package/resources/invocations.d.ts +4 -0
  60. package/resources/invocations.d.ts.map +1 -1
  61. package/src/client.ts +24 -21
  62. package/src/resources/apps.ts +73 -1
  63. package/src/resources/browsers/browsers.ts +234 -0
  64. package/src/resources/browsers/index.ts +19 -0
  65. package/src/resources/browsers/replays.ts +168 -0
  66. package/src/resources/browsers.ts +1 -251
  67. package/src/resources/index.ts +2 -2
  68. package/src/resources/invocations.ts +5 -0
  69. package/src/version.ts +1 -1
  70. package/version.d.mts +1 -1
  71. package/version.d.ts +1 -1
  72. package/version.js +1 -1
  73. package/version.mjs +1 -1
  74. package/resources/apps/apps.d.mts +0 -71
  75. package/resources/apps/apps.d.mts.map +0 -1
  76. package/resources/apps/apps.d.ts +0 -71
  77. package/resources/apps/apps.d.ts.map +0 -1
  78. package/resources/apps/apps.js +0 -28
  79. package/resources/apps/apps.js.map +0 -1
  80. package/resources/apps/apps.mjs +0 -23
  81. package/resources/apps/apps.mjs.map +0 -1
  82. package/resources/apps/deployments.d.mts +0 -135
  83. package/resources/apps/deployments.d.mts.map +0 -1
  84. package/resources/apps/deployments.d.ts +0 -135
  85. package/resources/apps/deployments.d.ts.map +0 -1
  86. package/resources/apps/deployments.js +0 -43
  87. package/resources/apps/deployments.js.map +0 -1
  88. package/resources/apps/deployments.mjs +0 -39
  89. package/resources/apps/deployments.mjs.map +0 -1
  90. package/resources/apps/index.d.mts +0 -3
  91. package/resources/apps/index.d.mts.map +0 -1
  92. package/resources/apps/index.d.ts +0 -3
  93. package/resources/apps/index.d.ts.map +0 -1
  94. package/resources/apps/index.js +0 -9
  95. package/resources/apps/index.js.map +0 -1
  96. package/resources/apps/index.mjs +0 -4
  97. package/resources/apps/index.mjs.map +0 -1
  98. package/src/resources/apps/apps.ts +0 -98
  99. package/src/resources/apps/deployments.ts +0 -175
  100. package/src/resources/apps/index.ts +0 -9
@@ -1,253 +1,3 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../core/resource';
4
- import * as BrowsersAPI from './browsers';
5
- import { APIPromise } from '../core/api-promise';
6
- import { buildHeaders } from '../internal/headers';
7
- import { RequestOptions } from '../internal/request-options';
8
- import { path } from '../internal/utils/path';
9
-
10
- export class Browsers extends APIResource {
11
- /**
12
- * Create a new browser session from within an action.
13
- *
14
- * @example
15
- * ```ts
16
- * const browser = await client.browsers.create();
17
- * ```
18
- */
19
- create(
20
- body: BrowserCreateParams | null | undefined = {},
21
- options?: RequestOptions,
22
- ): APIPromise<BrowserCreateResponse> {
23
- return this._client.post('/browsers', { body, ...options });
24
- }
25
-
26
- /**
27
- * Get information about a browser session.
28
- *
29
- * @example
30
- * ```ts
31
- * const browser = await client.browsers.retrieve(
32
- * 'htzv5orfit78e1m2biiifpbv',
33
- * );
34
- * ```
35
- */
36
- retrieve(id: string, options?: RequestOptions): APIPromise<BrowserRetrieveResponse> {
37
- return this._client.get(path`/browsers/${id}`, options);
38
- }
39
-
40
- /**
41
- * List active browser sessions
42
- *
43
- * @example
44
- * ```ts
45
- * const browsers = await client.browsers.list();
46
- * ```
47
- */
48
- list(options?: RequestOptions): APIPromise<BrowserListResponse> {
49
- return this._client.get('/browsers', options);
50
- }
51
-
52
- /**
53
- * Delete a persistent browser session by its persistent_id.
54
- *
55
- * @example
56
- * ```ts
57
- * await client.browsers.delete({
58
- * persistent_id: 'persistent_id',
59
- * });
60
- * ```
61
- */
62
- delete(params: BrowserDeleteParams, options?: RequestOptions): APIPromise<void> {
63
- const { persistent_id } = params;
64
- return this._client.delete('/browsers', {
65
- query: { persistent_id },
66
- ...options,
67
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
68
- });
69
- }
70
-
71
- /**
72
- * Delete a browser session by ID
73
- *
74
- * @example
75
- * ```ts
76
- * await client.browsers.deleteByID(
77
- * 'htzv5orfit78e1m2biiifpbv',
78
- * );
79
- * ```
80
- */
81
- deleteByID(id: string, options?: RequestOptions): APIPromise<void> {
82
- return this._client.delete(path`/browsers/${id}`, {
83
- ...options,
84
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
85
- });
86
- }
87
-
88
- /**
89
- * Get browser session replay.
90
- *
91
- * @example
92
- * ```ts
93
- * const response = await client.browsers.retrieveReplay(
94
- * 'htzv5orfit78e1m2biiifpbv',
95
- * );
96
- *
97
- * const content = await response.blob();
98
- * console.log(content);
99
- * ```
100
- */
101
- retrieveReplay(id: string, options?: RequestOptions): APIPromise<Response> {
102
- return this._client.get(path`/browsers/${id}/replay`, {
103
- ...options,
104
- headers: buildHeaders([{ Accept: 'video/mp4' }, options?.headers]),
105
- __binaryResponse: true,
106
- });
107
- }
108
- }
109
-
110
- /**
111
- * Optional persistence configuration for the browser session.
112
- */
113
- export interface BrowserPersistence {
114
- /**
115
- * Unique identifier for the persistent browser session.
116
- */
117
- id: string;
118
- }
119
-
120
- export interface BrowserCreateResponse {
121
- /**
122
- * Websocket URL for Chrome DevTools Protocol connections to the browser session
123
- */
124
- cdp_ws_url: string;
125
-
126
- /**
127
- * Unique identifier for the browser session
128
- */
129
- session_id: string;
130
-
131
- /**
132
- * Remote URL for live viewing the browser session. Only available for non-headless
133
- * browsers.
134
- */
135
- browser_live_view_url?: string;
136
-
137
- /**
138
- * Optional persistence configuration for the browser session.
139
- */
140
- persistence?: BrowserPersistence;
141
-
142
- /**
143
- * Remote URL for viewing the browser session replay if enabled
144
- */
145
- replay_view_url?: string;
146
- }
147
-
148
- export interface BrowserRetrieveResponse {
149
- /**
150
- * Websocket URL for Chrome DevTools Protocol connections to the browser session
151
- */
152
- cdp_ws_url: string;
153
-
154
- /**
155
- * Unique identifier for the browser session
156
- */
157
- session_id: string;
158
-
159
- /**
160
- * Remote URL for live viewing the browser session. Only available for non-headless
161
- * browsers.
162
- */
163
- browser_live_view_url?: string;
164
-
165
- /**
166
- * Optional persistence configuration for the browser session.
167
- */
168
- persistence?: BrowserPersistence;
169
-
170
- /**
171
- * Remote URL for viewing the browser session replay if enabled
172
- */
173
- replay_view_url?: string;
174
- }
175
-
176
- export type BrowserListResponse = Array<BrowserListResponse.BrowserListResponseItem>;
177
-
178
- export namespace BrowserListResponse {
179
- export interface BrowserListResponseItem {
180
- /**
181
- * Websocket URL for Chrome DevTools Protocol connections to the browser session
182
- */
183
- cdp_ws_url: string;
184
-
185
- /**
186
- * Unique identifier for the browser session
187
- */
188
- session_id: string;
189
-
190
- /**
191
- * Remote URL for live viewing the browser session. Only available for non-headless
192
- * browsers.
193
- */
194
- browser_live_view_url?: string;
195
-
196
- /**
197
- * Optional persistence configuration for the browser session.
198
- */
199
- persistence?: BrowsersAPI.BrowserPersistence;
200
-
201
- /**
202
- * Remote URL for viewing the browser session replay if enabled
203
- */
204
- replay_view_url?: string;
205
- }
206
- }
207
-
208
- export interface BrowserCreateParams {
209
- /**
210
- * If true, launches the browser using a headless image (no VNC/GUI). Defaults to
211
- * false.
212
- */
213
- headless?: boolean;
214
-
215
- /**
216
- * action invocation ID
217
- */
218
- invocation_id?: string;
219
-
220
- /**
221
- * Optional persistence configuration for the browser session.
222
- */
223
- persistence?: BrowserPersistence;
224
-
225
- /**
226
- * If true, enables replay recording of the browser session. Defaults to false.
227
- */
228
- replay?: boolean;
229
-
230
- /**
231
- * If true, launches the browser in stealth mode to reduce detection by anti-bot
232
- * mechanisms.
233
- */
234
- stealth?: boolean;
235
- }
236
-
237
- export interface BrowserDeleteParams {
238
- /**
239
- * Persistent browser identifier
240
- */
241
- persistent_id: string;
242
- }
243
-
244
- export declare namespace Browsers {
245
- export {
246
- type BrowserPersistence as BrowserPersistence,
247
- type BrowserCreateResponse as BrowserCreateResponse,
248
- type BrowserRetrieveResponse as BrowserRetrieveResponse,
249
- type BrowserListResponse as BrowserListResponse,
250
- type BrowserCreateParams as BrowserCreateParams,
251
- type BrowserDeleteParams as BrowserDeleteParams,
252
- };
253
- }
3
+ export * from './browsers/index';
@@ -1,7 +1,7 @@
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/apps';
4
+ export { Apps, type AppListResponse, type AppListParams } from './apps';
5
5
  export {
6
6
  Browsers,
7
7
  type BrowserPersistence,
@@ -10,7 +10,7 @@ export {
10
10
  type BrowserListResponse,
11
11
  type BrowserCreateParams,
12
12
  type BrowserDeleteParams,
13
- } from './browsers';
13
+ } from './browsers/browsers';
14
14
  export {
15
15
  Deployments,
16
16
  type DeploymentStateEvent,
@@ -165,6 +165,11 @@ export interface InvocationCreateResponse {
165
165
  */
166
166
  id: string;
167
167
 
168
+ /**
169
+ * Name of the action invoked
170
+ */
171
+ action_name: string;
172
+
168
173
  /**
169
174
  * Status of the invocation
170
175
  */
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.7.1'; // x-release-please-version
1
+ export const VERSION = '0.8.2'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.7.1";
1
+ export declare const VERSION = "0.8.2";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.7.1";
1
+ export declare const VERSION = "0.8.2";
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.7.1'; // x-release-please-version
4
+ exports.VERSION = '0.8.2'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.7.1'; // x-release-please-version
1
+ export const VERSION = '0.8.2'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
@@ -1,71 +0,0 @@
1
- import { APIResource } from "../../core/resource.mjs";
2
- import * as Shared from "../shared.mjs";
3
- import * as DeploymentsAPI from "./deployments.mjs";
4
- import { DeploymentCreateParams, DeploymentCreateResponse, DeploymentFollowResponse, Deployments } from "./deployments.mjs";
5
- import { APIPromise } from "../../core/api-promise.mjs";
6
- import { RequestOptions } from "../../internal/request-options.mjs";
7
- export declare class Apps extends APIResource {
8
- deployments: DeploymentsAPI.Deployments;
9
- /**
10
- * List applications. Optionally filter by app name and/or version label.
11
- *
12
- * @example
13
- * ```ts
14
- * const apps = await client.apps.list();
15
- * ```
16
- */
17
- list(query?: AppListParams | null | undefined, options?: RequestOptions): APIPromise<AppListResponse>;
18
- }
19
- export type AppListResponse = Array<AppListResponse.AppListResponseItem>;
20
- export declare namespace AppListResponse {
21
- /**
22
- * Summary of an application version.
23
- */
24
- interface AppListResponseItem {
25
- /**
26
- * Unique identifier for the app version
27
- */
28
- id: string;
29
- /**
30
- * List of actions available on the app
31
- */
32
- actions: Array<Shared.AppAction>;
33
- /**
34
- * Name of the application
35
- */
36
- app_name: string;
37
- /**
38
- * Deployment ID
39
- */
40
- deployment: string;
41
- /**
42
- * Environment variables configured for this app version
43
- */
44
- env_vars: {
45
- [key: string]: string;
46
- };
47
- /**
48
- * Deployment region code
49
- */
50
- region: 'aws.us-east-1a';
51
- /**
52
- * Version label for the application
53
- */
54
- version: string;
55
- }
56
- }
57
- export interface AppListParams {
58
- /**
59
- * Filter results by application name.
60
- */
61
- app_name?: string;
62
- /**
63
- * Filter results by version label.
64
- */
65
- version?: string;
66
- }
67
- export declare namespace Apps {
68
- export { type AppListResponse as AppListResponse, type AppListParams as AppListParams };
69
- export { Deployments as Deployments, type DeploymentCreateResponse as DeploymentCreateResponse, type DeploymentFollowResponse as DeploymentFollowResponse, type DeploymentCreateParams as DeploymentCreateParams, };
70
- }
71
- //# sourceMappingURL=apps.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"apps.d.mts","sourceRoot":"","sources":["../../src/resources/apps/apps.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,cAAc;OACnB,EACL,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,WAAW,EACZ;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,IAAK,SAAQ,WAAW;IACnC,WAAW,EAAE,cAAc,CAAC,WAAW,CAAgD;IAEvF;;;;;;;OAOG;IACH,IAAI,CAAC,KAAK,GAAE,aAAa,GAAG,IAAI,GAAG,SAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,eAAe,CAAC;CAG1G;AAED,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC;AAEzE,yBAAiB,eAAe,CAAC;IAC/B;;OAEG;IACH,UAAiB,mBAAmB;QAClC;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAEjC;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,QAAQ,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;SAAE,CAAC;QAEpC;;WAEG;QACH,MAAM,EAAE,gBAAgB,CAAC;QAEzB;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;KACjB;CACF;AAED,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAID,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,KAAK,aAAa,IAAI,aAAa,EAAE,CAAC;IAExF,OAAO,EACL,WAAW,IAAI,WAAW,EAC1B,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
@@ -1,71 +0,0 @@
1
- import { APIResource } from "../../core/resource.js";
2
- import * as Shared from "../shared.js";
3
- import * as DeploymentsAPI from "./deployments.js";
4
- import { DeploymentCreateParams, DeploymentCreateResponse, DeploymentFollowResponse, Deployments } from "./deployments.js";
5
- import { APIPromise } from "../../core/api-promise.js";
6
- import { RequestOptions } from "../../internal/request-options.js";
7
- export declare class Apps extends APIResource {
8
- deployments: DeploymentsAPI.Deployments;
9
- /**
10
- * List applications. Optionally filter by app name and/or version label.
11
- *
12
- * @example
13
- * ```ts
14
- * const apps = await client.apps.list();
15
- * ```
16
- */
17
- list(query?: AppListParams | null | undefined, options?: RequestOptions): APIPromise<AppListResponse>;
18
- }
19
- export type AppListResponse = Array<AppListResponse.AppListResponseItem>;
20
- export declare namespace AppListResponse {
21
- /**
22
- * Summary of an application version.
23
- */
24
- interface AppListResponseItem {
25
- /**
26
- * Unique identifier for the app version
27
- */
28
- id: string;
29
- /**
30
- * List of actions available on the app
31
- */
32
- actions: Array<Shared.AppAction>;
33
- /**
34
- * Name of the application
35
- */
36
- app_name: string;
37
- /**
38
- * Deployment ID
39
- */
40
- deployment: string;
41
- /**
42
- * Environment variables configured for this app version
43
- */
44
- env_vars: {
45
- [key: string]: string;
46
- };
47
- /**
48
- * Deployment region code
49
- */
50
- region: 'aws.us-east-1a';
51
- /**
52
- * Version label for the application
53
- */
54
- version: string;
55
- }
56
- }
57
- export interface AppListParams {
58
- /**
59
- * Filter results by application name.
60
- */
61
- app_name?: string;
62
- /**
63
- * Filter results by version label.
64
- */
65
- version?: string;
66
- }
67
- export declare namespace Apps {
68
- export { type AppListResponse as AppListResponse, type AppListParams as AppListParams };
69
- export { Deployments as Deployments, type DeploymentCreateResponse as DeploymentCreateResponse, type DeploymentFollowResponse as DeploymentFollowResponse, type DeploymentCreateParams as DeploymentCreateParams, };
70
- }
71
- //# sourceMappingURL=apps.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/resources/apps/apps.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,cAAc;OACnB,EACL,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,WAAW,EACZ;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,IAAK,SAAQ,WAAW;IACnC,WAAW,EAAE,cAAc,CAAC,WAAW,CAAgD;IAEvF;;;;;;;OAOG;IACH,IAAI,CAAC,KAAK,GAAE,aAAa,GAAG,IAAI,GAAG,SAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,eAAe,CAAC;CAG1G;AAED,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC;AAEzE,yBAAiB,eAAe,CAAC;IAC/B;;OAEG;IACH,UAAiB,mBAAmB;QAClC;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAEjC;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,QAAQ,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;SAAE,CAAC;QAEpC;;WAEG;QACH,MAAM,EAAE,gBAAgB,CAAC;QAEzB;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;KACjB;CACF;AAED,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAID,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,KAAK,aAAa,IAAI,aAAa,EAAE,CAAC;IAExF,OAAO,EACL,WAAW,IAAI,WAAW,EAC1B,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
@@ -1,28 +0,0 @@
1
- "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Apps = void 0;
5
- const tslib_1 = require("../../internal/tslib.js");
6
- const resource_1 = require("../../core/resource.js");
7
- const DeploymentsAPI = tslib_1.__importStar(require("./deployments.js"));
8
- const deployments_1 = require("./deployments.js");
9
- class Apps extends resource_1.APIResource {
10
- constructor() {
11
- super(...arguments);
12
- this.deployments = new DeploymentsAPI.Deployments(this._client);
13
- }
14
- /**
15
- * List applications. Optionally filter by app name and/or version label.
16
- *
17
- * @example
18
- * ```ts
19
- * const apps = await client.apps.list();
20
- * ```
21
- */
22
- list(query = {}, options) {
23
- return this._client.get('/apps', { query, ...options });
24
- }
25
- }
26
- exports.Apps = Apps;
27
- Apps.Deployments = deployments_1.Deployments;
28
- //# sourceMappingURL=apps.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"apps.js","sourceRoot":"","sources":["../../src/resources/apps/apps.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,yEAAgD;AAChD,kDAKuB;AAIvB,MAAa,IAAK,SAAQ,sBAAW;IAArC;;QACE,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAazF,CAAC;IAXC;;;;;;;OAOG;IACH,IAAI,CAAC,QAA0C,EAAE,EAAE,OAAwB;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1D,CAAC;CACF;AAdD,oBAcC;AA0DD,IAAI,CAAC,WAAW,GAAG,yBAAW,CAAC"}
@@ -1,23 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../../core/resource.mjs";
3
- import * as DeploymentsAPI from "./deployments.mjs";
4
- import { Deployments, } from "./deployments.mjs";
5
- export class Apps extends APIResource {
6
- constructor() {
7
- super(...arguments);
8
- this.deployments = new DeploymentsAPI.Deployments(this._client);
9
- }
10
- /**
11
- * List applications. Optionally filter by app name and/or version label.
12
- *
13
- * @example
14
- * ```ts
15
- * const apps = await client.apps.list();
16
- * ```
17
- */
18
- list(query = {}, options) {
19
- return this._client.get('/apps', { query, ...options });
20
- }
21
- }
22
- Apps.Deployments = Deployments;
23
- //# sourceMappingURL=apps.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"apps.mjs","sourceRoot":"","sources":["../../src/resources/apps/apps.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,cAAc;OACnB,EAIL,WAAW,GACZ;AAID,MAAM,OAAO,IAAK,SAAQ,WAAW;IAArC;;QACE,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAazF,CAAC;IAXC;;;;;;;OAOG;IACH,IAAI,CAAC,QAA0C,EAAE,EAAE,OAAwB;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1D,CAAC;CACF;AA0DD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC"}
@@ -1,135 +0,0 @@
1
- import { APIResource } from "../../core/resource.mjs";
2
- import * as Shared from "../shared.mjs";
3
- import { APIPromise } from "../../core/api-promise.mjs";
4
- import { Stream } from "../../core/streaming.mjs";
5
- import { type Uploadable } from "../../core/uploads.mjs";
6
- import { RequestOptions } from "../../internal/request-options.mjs";
7
- export declare class Deployments extends APIResource {
8
- /**
9
- * Deploy a new application and associated actions to Kernel.
10
- *
11
- * @example
12
- * ```ts
13
- * const deployment = await client.apps.deployments.create({
14
- * entrypoint_rel_path: 'src/app.py',
15
- * file: fs.createReadStream('path/to/file'),
16
- * });
17
- * ```
18
- */
19
- create(body: DeploymentCreateParams, options?: RequestOptions): APIPromise<DeploymentCreateResponse>;
20
- /**
21
- * Establishes a Server-Sent Events (SSE) stream that delivers real-time logs and
22
- * status updates for a deployed application. The stream terminates automatically
23
- * once the application reaches a terminal state.
24
- *
25
- * @example
26
- * ```ts
27
- * const response = await client.apps.deployments.follow('id');
28
- * ```
29
- */
30
- follow(id: string, options?: RequestOptions): APIPromise<Stream<DeploymentFollowResponse>>;
31
- }
32
- export interface DeploymentCreateResponse {
33
- /**
34
- * List of apps deployed
35
- */
36
- apps: Array<DeploymentCreateResponse.App>;
37
- /**
38
- * Current status of the deployment
39
- */
40
- status: 'queued' | 'deploying' | 'succeeded' | 'failed';
41
- /**
42
- * Status reason
43
- */
44
- status_reason?: string;
45
- }
46
- export declare namespace DeploymentCreateResponse {
47
- interface App {
48
- /**
49
- * ID for the app version deployed
50
- */
51
- id: string;
52
- /**
53
- * List of actions available on the app
54
- */
55
- actions: Array<Shared.AppAction>;
56
- /**
57
- * Name of the app
58
- */
59
- name: string;
60
- }
61
- }
62
- /**
63
- * Union type representing any application event. Actual schema is determined by
64
- * the 'event' field.
65
- */
66
- export type DeploymentFollowResponse = DeploymentFollowResponse.StateEvent | DeploymentFollowResponse.StateUpdateEvent | Shared.LogEvent | Shared.HeartbeatEvent;
67
- export declare namespace DeploymentFollowResponse {
68
- /**
69
- * Initial state of the application, emitted once when subscribing.
70
- */
71
- interface StateEvent {
72
- /**
73
- * Event type identifier (always "state").
74
- */
75
- event: 'state';
76
- /**
77
- * Current application state (e.g., "deploying", "running", "succeeded", "failed").
78
- */
79
- state: string;
80
- /**
81
- * Time the state was reported.
82
- */
83
- timestamp?: string;
84
- }
85
- /**
86
- * An update emitted when the application's state changes.
87
- */
88
- interface StateUpdateEvent {
89
- /**
90
- * Event type identifier (always "state_update").
91
- */
92
- event: 'state_update';
93
- /**
94
- * New application state (e.g., "running", "succeeded", "failed").
95
- */
96
- state: string;
97
- /**
98
- * Time the state change occurred.
99
- */
100
- timestamp?: string;
101
- }
102
- }
103
- export interface DeploymentCreateParams {
104
- /**
105
- * Relative path to the entrypoint of the application
106
- */
107
- entrypoint_rel_path: string;
108
- /**
109
- * ZIP file containing the application source directory
110
- */
111
- file: Uploadable;
112
- /**
113
- * Map of environment variables to set for the deployed application. Each key-value
114
- * pair represents an environment variable.
115
- */
116
- env_vars?: {
117
- [key: string]: string;
118
- };
119
- /**
120
- * Allow overwriting an existing app version
121
- */
122
- force?: boolean;
123
- /**
124
- * Region for deployment. Currently we only support "aws.us-east-1a"
125
- */
126
- region?: 'aws.us-east-1a';
127
- /**
128
- * Version of the application. Can be any string.
129
- */
130
- version?: string;
131
- }
132
- export declare namespace Deployments {
133
- export { type DeploymentCreateResponse as DeploymentCreateResponse, type DeploymentFollowResponse as DeploymentFollowResponse, type DeploymentCreateParams as DeploymentCreateParams, };
134
- }
135
- //# sourceMappingURL=deployments.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deployments.d.mts","sourceRoot":"","sources":["../../src/resources/apps/deployments.ts"],"names":[],"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