@onkernel/sdk 0.6.2 → 0.6.4
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/CHANGELOG.md +24 -0
- package/client.d.mts +3 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/internal/types.d.mts +8 -6
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +8 -6
- package/internal/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/apps/apps.d.mts +11 -6
- package/resources/apps/apps.d.mts.map +1 -1
- package/resources/apps/apps.d.ts +11 -6
- package/resources/apps/apps.d.ts.map +1 -1
- package/resources/apps/apps.js.map +1 -1
- package/resources/apps/apps.mjs.map +1 -1
- package/resources/apps/deployments.d.mts +1 -9
- package/resources/apps/deployments.d.mts.map +1 -1
- package/resources/apps/deployments.d.ts +1 -9
- package/resources/apps/deployments.d.ts.map +1 -1
- package/resources/browsers.d.mts +3 -5
- package/resources/browsers.d.mts.map +1 -1
- package/resources/browsers.d.ts +3 -5
- package/resources/browsers.d.ts.map +1 -1
- package/resources/browsers.js +2 -4
- package/resources/browsers.js.map +1 -1
- package/resources/browsers.mjs +2 -4
- package/resources/browsers.mjs.map +1 -1
- package/resources/deployments.d.mts +59 -13
- package/resources/deployments.d.mts.map +1 -1
- package/resources/deployments.d.ts +59 -13
- package/resources/deployments.d.ts.map +1 -1
- package/resources/deployments.js +11 -0
- package/resources/deployments.js.map +1 -1
- package/resources/deployments.mjs +11 -0
- package/resources/deployments.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/shared.d.mts +9 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +9 -0
- package/resources/shared.d.ts.map +1 -1
- package/src/client.ts +5 -0
- package/src/internal/types.ts +9 -6
- package/src/resources/apps/apps.ts +11 -5
- package/src/resources/apps/deployments.ts +1 -10
- package/src/resources/browsers.ts +6 -5
- package/src/resources/deployments.ts +74 -13
- package/src/resources/index.ts +2 -0
- package/src/resources/shared.ts +10 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/internal/types.ts
CHANGED
|
@@ -7,7 +7,7 @@ export type KeysEnum<T> = { [P in keyof Required<T>]: true };
|
|
|
7
7
|
|
|
8
8
|
export type FinalizedRequestInit = RequestInit & { headers: Headers };
|
|
9
9
|
|
|
10
|
-
type NotAny<T> = [
|
|
10
|
+
type NotAny<T> = [0] extends [1 & T] ? never : T;
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Some environments overload the global fetch function, and Parameters<T> only gets the last signature.
|
|
@@ -64,13 +64,15 @@ type OverloadedParameters<T> =
|
|
|
64
64
|
* [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition
|
|
65
65
|
*/
|
|
66
66
|
/** @ts-ignore For users with \@types/node */
|
|
67
|
-
type UndiciTypesRequestInit = NotAny<import('../node_modules/undici-types').RequestInit> | NotAny<import('../../node_modules/undici-types').RequestInit> | NotAny<import('../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici-types').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici-types').RequestInit>;
|
|
67
|
+
type UndiciTypesRequestInit = NotAny<import('../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit>;
|
|
68
68
|
/** @ts-ignore For users with undici */
|
|
69
|
-
type UndiciRequestInit = NotAny<import('../node_modules/undici').RequestInit> | NotAny<import('../../node_modules/undici').RequestInit> | NotAny<import('../../../node_modules/undici').RequestInit> | NotAny<import('../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici').RequestInit>;
|
|
69
|
+
type UndiciRequestInit = NotAny<import('../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici/index.d.ts').RequestInit>;
|
|
70
70
|
/** @ts-ignore For users with \@types/bun */
|
|
71
71
|
type BunRequestInit = globalThis.FetchRequestInit;
|
|
72
|
-
/** @ts-ignore For users with node-fetch */
|
|
73
|
-
type
|
|
72
|
+
/** @ts-ignore For users with node-fetch@2 */
|
|
73
|
+
type NodeFetch2RequestInit = NotAny<import('../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit>;
|
|
74
|
+
/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */
|
|
75
|
+
type NodeFetch3RequestInit = NotAny<import('../node_modules/node-fetch').RequestInit> | NotAny<import('../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/node-fetch').RequestInit>;
|
|
74
76
|
/** @ts-ignore For users who use Deno */
|
|
75
77
|
type FetchRequestInit = NonNullable<OverloadedParameters<typeof fetch>[1]>;
|
|
76
78
|
/* eslint-enable */
|
|
@@ -79,7 +81,8 @@ type RequestInits =
|
|
|
79
81
|
| NotAny<UndiciTypesRequestInit>
|
|
80
82
|
| NotAny<UndiciRequestInit>
|
|
81
83
|
| NotAny<BunRequestInit>
|
|
82
|
-
| NotAny<
|
|
84
|
+
| NotAny<NodeFetch2RequestInit>
|
|
85
|
+
| NotAny<NodeFetch3RequestInit>
|
|
83
86
|
| NotAny<RequestInit>
|
|
84
87
|
| NotAny<FetchRequestInit>;
|
|
85
88
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as Shared from '../shared';
|
|
4
5
|
import * as DeploymentsAPI from './deployments';
|
|
5
6
|
import {
|
|
6
7
|
DeploymentCreateParams,
|
|
@@ -39,6 +40,11 @@ export namespace AppListResponse {
|
|
|
39
40
|
*/
|
|
40
41
|
id: string;
|
|
41
42
|
|
|
43
|
+
/**
|
|
44
|
+
* List of actions available on the app
|
|
45
|
+
*/
|
|
46
|
+
actions: Array<Shared.AppAction>;
|
|
47
|
+
|
|
42
48
|
/**
|
|
43
49
|
* Name of the application
|
|
44
50
|
*/
|
|
@@ -49,6 +55,11 @@ export namespace AppListResponse {
|
|
|
49
55
|
*/
|
|
50
56
|
deployment: string;
|
|
51
57
|
|
|
58
|
+
/**
|
|
59
|
+
* Environment variables configured for this app version
|
|
60
|
+
*/
|
|
61
|
+
env_vars: { [key: string]: string };
|
|
62
|
+
|
|
52
63
|
/**
|
|
53
64
|
* Deployment region code
|
|
54
65
|
*/
|
|
@@ -58,11 +69,6 @@ export namespace AppListResponse {
|
|
|
58
69
|
* Version label for the application
|
|
59
70
|
*/
|
|
60
71
|
version: string;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Environment variables configured for this app version
|
|
64
|
-
*/
|
|
65
|
-
env_vars?: { [key: string]: string };
|
|
66
72
|
}
|
|
67
73
|
}
|
|
68
74
|
|
|
@@ -72,22 +72,13 @@ export namespace DeploymentCreateResponse {
|
|
|
72
72
|
/**
|
|
73
73
|
* List of actions available on the app
|
|
74
74
|
*/
|
|
75
|
-
actions: Array<
|
|
75
|
+
actions: Array<Shared.AppAction>;
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
78
|
* Name of the app
|
|
79
79
|
*/
|
|
80
80
|
name: string;
|
|
81
81
|
}
|
|
82
|
-
|
|
83
|
-
export namespace App {
|
|
84
|
-
export interface Action {
|
|
85
|
-
/**
|
|
86
|
-
* Name of the action
|
|
87
|
-
*/
|
|
88
|
-
name: string;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
82
|
}
|
|
92
83
|
|
|
93
84
|
/**
|
|
@@ -13,12 +13,13 @@ export class Browsers extends APIResource {
|
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
15
|
* ```ts
|
|
16
|
-
* const browser = await client.browsers.create(
|
|
17
|
-
* invocation_id: 'rr33xuugxj9h0bkf1rdt2bet',
|
|
18
|
-
* });
|
|
16
|
+
* const browser = await client.browsers.create();
|
|
19
17
|
* ```
|
|
20
18
|
*/
|
|
21
|
-
create(
|
|
19
|
+
create(
|
|
20
|
+
body: BrowserCreateParams | null | undefined = {},
|
|
21
|
+
options?: RequestOptions,
|
|
22
|
+
): APIPromise<BrowserCreateResponse> {
|
|
22
23
|
return this._client.post('/browsers', { body, ...options });
|
|
23
24
|
}
|
|
24
25
|
|
|
@@ -169,7 +170,7 @@ export interface BrowserCreateParams {
|
|
|
169
170
|
/**
|
|
170
171
|
* action invocation ID
|
|
171
172
|
*/
|
|
172
|
-
invocation_id
|
|
173
|
+
invocation_id?: string;
|
|
173
174
|
|
|
174
175
|
/**
|
|
175
176
|
* Optional persistence configuration for the browser session.
|
|
@@ -38,6 +38,21 @@ export class Deployments extends APIResource {
|
|
|
38
38
|
return this._client.get(path`/deployments/${id}`, options);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* List deployments. Optionally filter by application name.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const deployments = await client.deployments.list();
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
list(
|
|
50
|
+
query: DeploymentListParams | null | undefined = {},
|
|
51
|
+
options?: RequestOptions,
|
|
52
|
+
): APIPromise<DeploymentListResponse> {
|
|
53
|
+
return this._client.get('/deployments', { query, ...options });
|
|
54
|
+
}
|
|
55
|
+
|
|
41
56
|
/**
|
|
42
57
|
* Establishes a Server-Sent Events (SSE) stream that delivers real-time logs and
|
|
43
58
|
* status updates for a deployment. The stream terminates automatically once the
|
|
@@ -219,6 +234,55 @@ export interface DeploymentRetrieveResponse {
|
|
|
219
234
|
updated_at?: string | null;
|
|
220
235
|
}
|
|
221
236
|
|
|
237
|
+
export type DeploymentListResponse = Array<DeploymentListResponse.DeploymentListResponseItem>;
|
|
238
|
+
|
|
239
|
+
export namespace DeploymentListResponse {
|
|
240
|
+
/**
|
|
241
|
+
* Deployment record information.
|
|
242
|
+
*/
|
|
243
|
+
export interface DeploymentListResponseItem {
|
|
244
|
+
/**
|
|
245
|
+
* Unique identifier for the deployment
|
|
246
|
+
*/
|
|
247
|
+
id: string;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Timestamp when the deployment was created
|
|
251
|
+
*/
|
|
252
|
+
created_at: string;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Deployment region code
|
|
256
|
+
*/
|
|
257
|
+
region: 'aws.us-east-1a';
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Current status of the deployment
|
|
261
|
+
*/
|
|
262
|
+
status: 'queued' | 'in_progress' | 'running' | 'failed' | 'stopped';
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Relative path to the application entrypoint
|
|
266
|
+
*/
|
|
267
|
+
entrypoint_rel_path?: string;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Environment variables configured for this deployment
|
|
271
|
+
*/
|
|
272
|
+
env_vars?: { [key: string]: string };
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Status reason
|
|
276
|
+
*/
|
|
277
|
+
status_reason?: string;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Timestamp when the deployment was last updated
|
|
281
|
+
*/
|
|
282
|
+
updated_at?: string | null;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
222
286
|
/**
|
|
223
287
|
* Union type representing any deployment event.
|
|
224
288
|
*/
|
|
@@ -242,7 +306,7 @@ export namespace DeploymentFollowResponse {
|
|
|
242
306
|
/**
|
|
243
307
|
* List of actions available on the app
|
|
244
308
|
*/
|
|
245
|
-
actions: Array<
|
|
309
|
+
actions: Array<Shared.AppAction>;
|
|
246
310
|
|
|
247
311
|
/**
|
|
248
312
|
* Name of the application
|
|
@@ -274,18 +338,6 @@ export namespace DeploymentFollowResponse {
|
|
|
274
338
|
*/
|
|
275
339
|
env_vars?: { [key: string]: string };
|
|
276
340
|
}
|
|
277
|
-
|
|
278
|
-
export namespace AppVersionSummaryEvent {
|
|
279
|
-
/**
|
|
280
|
-
* An action available on the app
|
|
281
|
-
*/
|
|
282
|
-
export interface Action {
|
|
283
|
-
/**
|
|
284
|
-
* Name of the action
|
|
285
|
-
*/
|
|
286
|
-
name: string;
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
341
|
}
|
|
290
342
|
|
|
291
343
|
export interface DeploymentCreateParams {
|
|
@@ -321,6 +373,13 @@ export interface DeploymentCreateParams {
|
|
|
321
373
|
version?: string;
|
|
322
374
|
}
|
|
323
375
|
|
|
376
|
+
export interface DeploymentListParams {
|
|
377
|
+
/**
|
|
378
|
+
* Filter results by application name.
|
|
379
|
+
*/
|
|
380
|
+
app_name?: string;
|
|
381
|
+
}
|
|
382
|
+
|
|
324
383
|
export interface DeploymentFollowParams {
|
|
325
384
|
/**
|
|
326
385
|
* Show logs since the given time (RFC timestamps or durations like 5m).
|
|
@@ -333,8 +392,10 @@ export declare namespace Deployments {
|
|
|
333
392
|
type DeploymentStateEvent as DeploymentStateEvent,
|
|
334
393
|
type DeploymentCreateResponse as DeploymentCreateResponse,
|
|
335
394
|
type DeploymentRetrieveResponse as DeploymentRetrieveResponse,
|
|
395
|
+
type DeploymentListResponse as DeploymentListResponse,
|
|
336
396
|
type DeploymentFollowResponse as DeploymentFollowResponse,
|
|
337
397
|
type DeploymentCreateParams as DeploymentCreateParams,
|
|
398
|
+
type DeploymentListParams as DeploymentListParams,
|
|
338
399
|
type DeploymentFollowParams as DeploymentFollowParams,
|
|
339
400
|
};
|
|
340
401
|
}
|
package/src/resources/index.ts
CHANGED
|
@@ -16,8 +16,10 @@ export {
|
|
|
16
16
|
type DeploymentStateEvent,
|
|
17
17
|
type DeploymentCreateResponse,
|
|
18
18
|
type DeploymentRetrieveResponse,
|
|
19
|
+
type DeploymentListResponse,
|
|
19
20
|
type DeploymentFollowResponse,
|
|
20
21
|
type DeploymentCreateParams,
|
|
22
|
+
type DeploymentListParams,
|
|
21
23
|
type DeploymentFollowParams,
|
|
22
24
|
} from './deployments';
|
|
23
25
|
export {
|
package/src/resources/shared.ts
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* An action available on the app
|
|
5
|
+
*/
|
|
6
|
+
export interface AppAction {
|
|
7
|
+
/**
|
|
8
|
+
* Name of the action
|
|
9
|
+
*/
|
|
10
|
+
name: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
3
13
|
export interface ErrorDetail {
|
|
4
14
|
/**
|
|
5
15
|
* Lower-level error code providing more specific detail
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.6.
|
|
1
|
+
export const VERSION = '0.6.4'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.6.
|
|
1
|
+
export declare const VERSION = "0.6.4";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.6.
|
|
1
|
+
export declare const VERSION = "0.6.4";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.6.
|
|
1
|
+
export const VERSION = '0.6.4'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|