@onkernel/sdk 0.3.0 → 0.5.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.
- package/CHANGELOG.md +38 -0
- package/README.md +23 -35
- package/internal/detect-platform.js +3 -3
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs +3 -3
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/shim-types.d.mts +11 -22
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +11 -22
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +2 -2
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +2 -2
- package/internal/shims.d.ts.map +1 -1
- package/package.json +1 -4
- package/resources/apps/apps.d.mts +3 -4
- package/resources/apps/apps.d.mts.map +1 -1
- package/resources/apps/apps.d.ts +3 -4
- package/resources/apps/apps.d.ts.map +1 -1
- package/resources/apps/apps.js +1 -2
- package/resources/apps/apps.js.map +1 -1
- package/resources/apps/apps.mjs +1 -2
- package/resources/apps/apps.mjs.map +1 -1
- package/resources/apps/deployments.d.mts +1 -1
- package/resources/apps/deployments.d.ts +1 -1
- package/resources/apps/deployments.js +1 -1
- package/resources/apps/deployments.mjs +1 -1
- package/resources/apps/index.d.mts +1 -1
- package/resources/apps/index.d.mts.map +1 -1
- package/resources/apps/index.d.ts +1 -1
- package/resources/apps/index.d.ts.map +1 -1
- package/resources/apps/index.js.map +1 -1
- package/resources/apps/index.mjs.map +1 -1
- package/resources/apps/invocations.d.mts +70 -3
- package/resources/apps/invocations.d.mts.map +1 -1
- package/resources/apps/invocations.d.ts +70 -3
- package/resources/apps/invocations.d.ts.map +1 -1
- package/resources/apps/invocations.js +16 -2
- package/resources/apps/invocations.js.map +1 -1
- package/resources/apps/invocations.mjs +16 -2
- package/resources/apps/invocations.mjs.map +1 -1
- package/resources/browsers.d.mts +10 -5
- package/resources/browsers.d.mts.map +1 -1
- package/resources/browsers.d.ts +10 -5
- package/resources/browsers.d.ts.map +1 -1
- package/resources/browsers.js +5 -5
- package/resources/browsers.mjs +5 -5
- package/src/internal/detect-platform.ts +3 -3
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +2 -2
- package/src/resources/apps/apps.ts +5 -2
- package/src/resources/apps/deployments.ts +1 -1
- package/src/resources/apps/index.ts +2 -0
- package/src/resources/apps/invocations.ts +90 -2
- package/src/resources/browsers.ts +11 -5
- 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/shim-types.d.ts +0 -28
|
@@ -3,7 +3,7 @@ import { APIPromise } from "../../core/api-promise.mjs";
|
|
|
3
3
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
4
4
|
export declare class Invocations extends APIResource {
|
|
5
5
|
/**
|
|
6
|
-
* Invoke an
|
|
6
|
+
* Invoke an action.
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
* ```ts
|
|
@@ -16,7 +16,7 @@ export declare class Invocations extends APIResource {
|
|
|
16
16
|
*/
|
|
17
17
|
create(body: InvocationCreateParams, options?: RequestOptions): APIPromise<InvocationCreateResponse>;
|
|
18
18
|
/**
|
|
19
|
-
* Get an
|
|
19
|
+
* Get details about an invocation's status and output.
|
|
20
20
|
*
|
|
21
21
|
* @example
|
|
22
22
|
* ```ts
|
|
@@ -26,6 +26,18 @@ export declare class Invocations extends APIResource {
|
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
28
|
retrieve(id: string, options?: RequestOptions): APIPromise<InvocationRetrieveResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* Update an invocation's status or output.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const invocation = await client.apps.invocations.update(
|
|
35
|
+
* 'id',
|
|
36
|
+
* { status: 'succeeded' },
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
update(id: string, body: InvocationUpdateParams, options?: RequestOptions): APIPromise<InvocationUpdateResponse>;
|
|
29
41
|
}
|
|
30
42
|
export interface InvocationCreateResponse {
|
|
31
43
|
/**
|
|
@@ -86,6 +98,46 @@ export interface InvocationRetrieveResponse {
|
|
|
86
98
|
*/
|
|
87
99
|
status_reason?: string;
|
|
88
100
|
}
|
|
101
|
+
export interface InvocationUpdateResponse {
|
|
102
|
+
/**
|
|
103
|
+
* ID of the invocation
|
|
104
|
+
*/
|
|
105
|
+
id: string;
|
|
106
|
+
/**
|
|
107
|
+
* Name of the action invoked
|
|
108
|
+
*/
|
|
109
|
+
action_name: string;
|
|
110
|
+
/**
|
|
111
|
+
* Name of the application
|
|
112
|
+
*/
|
|
113
|
+
app_name: string;
|
|
114
|
+
/**
|
|
115
|
+
* RFC 3339 Nanoseconds timestamp when the invocation started
|
|
116
|
+
*/
|
|
117
|
+
started_at: string;
|
|
118
|
+
/**
|
|
119
|
+
* Status of the invocation
|
|
120
|
+
*/
|
|
121
|
+
status: 'queued' | 'running' | 'succeeded' | 'failed';
|
|
122
|
+
/**
|
|
123
|
+
* RFC 3339 Nanoseconds timestamp when the invocation finished (null if still
|
|
124
|
+
* running)
|
|
125
|
+
*/
|
|
126
|
+
finished_at?: string | null;
|
|
127
|
+
/**
|
|
128
|
+
* Output produced by the action, rendered as a JSON string. This could be: string,
|
|
129
|
+
* number, boolean, array, object, or null.
|
|
130
|
+
*/
|
|
131
|
+
output?: string;
|
|
132
|
+
/**
|
|
133
|
+
* Payload provided to the invocation. This is a string that can be parsed as JSON.
|
|
134
|
+
*/
|
|
135
|
+
payload?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Status reason
|
|
138
|
+
*/
|
|
139
|
+
status_reason?: string;
|
|
140
|
+
}
|
|
89
141
|
export interface InvocationCreateParams {
|
|
90
142
|
/**
|
|
91
143
|
* Name of the action to invoke
|
|
@@ -99,12 +151,27 @@ export interface InvocationCreateParams {
|
|
|
99
151
|
* Version of the application
|
|
100
152
|
*/
|
|
101
153
|
version: string;
|
|
154
|
+
/**
|
|
155
|
+
* If true, invoke asynchronously. When set, the API responds 202 Accepted with
|
|
156
|
+
* status "queued".
|
|
157
|
+
*/
|
|
158
|
+
async?: boolean;
|
|
102
159
|
/**
|
|
103
160
|
* Input data for the action, sent as a JSON string.
|
|
104
161
|
*/
|
|
105
162
|
payload?: string;
|
|
106
163
|
}
|
|
164
|
+
export interface InvocationUpdateParams {
|
|
165
|
+
/**
|
|
166
|
+
* New status for the invocation.
|
|
167
|
+
*/
|
|
168
|
+
status: 'succeeded' | 'failed';
|
|
169
|
+
/**
|
|
170
|
+
* Updated output of the invocation rendered as JSON string.
|
|
171
|
+
*/
|
|
172
|
+
output?: string;
|
|
173
|
+
}
|
|
107
174
|
export declare namespace Invocations {
|
|
108
|
-
export { type InvocationCreateResponse as InvocationCreateResponse, type InvocationRetrieveResponse as InvocationRetrieveResponse, type InvocationCreateParams as InvocationCreateParams, };
|
|
175
|
+
export { type InvocationCreateResponse as InvocationCreateResponse, type InvocationRetrieveResponse as InvocationRetrieveResponse, type InvocationUpdateResponse as InvocationUpdateResponse, type InvocationCreateParams as InvocationCreateParams, type InvocationUpdateParams as InvocationUpdateParams, };
|
|
109
176
|
}
|
|
110
177
|
//# sourceMappingURL=invocations.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invocations.d.mts","sourceRoot":"","sources":["../../src/resources/apps/invocations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,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zD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -3,7 +3,7 @@ import { APIPromise } from "../../core/api-promise.js";
|
|
|
3
3
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
4
|
export declare class Invocations extends APIResource {
|
|
5
5
|
/**
|
|
6
|
-
* Invoke an
|
|
6
|
+
* Invoke an action.
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
* ```ts
|
|
@@ -16,7 +16,7 @@ export declare class Invocations extends APIResource {
|
|
|
16
16
|
*/
|
|
17
17
|
create(body: InvocationCreateParams, options?: RequestOptions): APIPromise<InvocationCreateResponse>;
|
|
18
18
|
/**
|
|
19
|
-
* Get an
|
|
19
|
+
* Get details about an invocation's status and output.
|
|
20
20
|
*
|
|
21
21
|
* @example
|
|
22
22
|
* ```ts
|
|
@@ -26,6 +26,18 @@ export declare class Invocations extends APIResource {
|
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
28
|
retrieve(id: string, options?: RequestOptions): APIPromise<InvocationRetrieveResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* Update an invocation's status or output.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const invocation = await client.apps.invocations.update(
|
|
35
|
+
* 'id',
|
|
36
|
+
* { status: 'succeeded' },
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
update(id: string, body: InvocationUpdateParams, options?: RequestOptions): APIPromise<InvocationUpdateResponse>;
|
|
29
41
|
}
|
|
30
42
|
export interface InvocationCreateResponse {
|
|
31
43
|
/**
|
|
@@ -86,6 +98,46 @@ export interface InvocationRetrieveResponse {
|
|
|
86
98
|
*/
|
|
87
99
|
status_reason?: string;
|
|
88
100
|
}
|
|
101
|
+
export interface InvocationUpdateResponse {
|
|
102
|
+
/**
|
|
103
|
+
* ID of the invocation
|
|
104
|
+
*/
|
|
105
|
+
id: string;
|
|
106
|
+
/**
|
|
107
|
+
* Name of the action invoked
|
|
108
|
+
*/
|
|
109
|
+
action_name: string;
|
|
110
|
+
/**
|
|
111
|
+
* Name of the application
|
|
112
|
+
*/
|
|
113
|
+
app_name: string;
|
|
114
|
+
/**
|
|
115
|
+
* RFC 3339 Nanoseconds timestamp when the invocation started
|
|
116
|
+
*/
|
|
117
|
+
started_at: string;
|
|
118
|
+
/**
|
|
119
|
+
* Status of the invocation
|
|
120
|
+
*/
|
|
121
|
+
status: 'queued' | 'running' | 'succeeded' | 'failed';
|
|
122
|
+
/**
|
|
123
|
+
* RFC 3339 Nanoseconds timestamp when the invocation finished (null if still
|
|
124
|
+
* running)
|
|
125
|
+
*/
|
|
126
|
+
finished_at?: string | null;
|
|
127
|
+
/**
|
|
128
|
+
* Output produced by the action, rendered as a JSON string. This could be: string,
|
|
129
|
+
* number, boolean, array, object, or null.
|
|
130
|
+
*/
|
|
131
|
+
output?: string;
|
|
132
|
+
/**
|
|
133
|
+
* Payload provided to the invocation. This is a string that can be parsed as JSON.
|
|
134
|
+
*/
|
|
135
|
+
payload?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Status reason
|
|
138
|
+
*/
|
|
139
|
+
status_reason?: string;
|
|
140
|
+
}
|
|
89
141
|
export interface InvocationCreateParams {
|
|
90
142
|
/**
|
|
91
143
|
* Name of the action to invoke
|
|
@@ -99,12 +151,27 @@ export interface InvocationCreateParams {
|
|
|
99
151
|
* Version of the application
|
|
100
152
|
*/
|
|
101
153
|
version: string;
|
|
154
|
+
/**
|
|
155
|
+
* If true, invoke asynchronously. When set, the API responds 202 Accepted with
|
|
156
|
+
* status "queued".
|
|
157
|
+
*/
|
|
158
|
+
async?: boolean;
|
|
102
159
|
/**
|
|
103
160
|
* Input data for the action, sent as a JSON string.
|
|
104
161
|
*/
|
|
105
162
|
payload?: string;
|
|
106
163
|
}
|
|
164
|
+
export interface InvocationUpdateParams {
|
|
165
|
+
/**
|
|
166
|
+
* New status for the invocation.
|
|
167
|
+
*/
|
|
168
|
+
status: 'succeeded' | 'failed';
|
|
169
|
+
/**
|
|
170
|
+
* Updated output of the invocation rendered as JSON string.
|
|
171
|
+
*/
|
|
172
|
+
output?: string;
|
|
173
|
+
}
|
|
107
174
|
export declare namespace Invocations {
|
|
108
|
-
export { type InvocationCreateResponse as InvocationCreateResponse, type InvocationRetrieveResponse as InvocationRetrieveResponse, type InvocationCreateParams as InvocationCreateParams, };
|
|
175
|
+
export { type InvocationCreateResponse as InvocationCreateResponse, type InvocationRetrieveResponse as InvocationRetrieveResponse, type InvocationUpdateResponse as InvocationUpdateResponse, type InvocationCreateParams as InvocationCreateParams, type InvocationUpdateParams as InvocationUpdateParams, };
|
|
109
176
|
}
|
|
110
177
|
//# sourceMappingURL=invocations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invocations.d.ts","sourceRoot":"","sources":["../../src/resources/apps/invocations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;IAIpG;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"invocations.d.ts","sourceRoot":"","sources":["../../src/resources/apps/invocations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IA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,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;IAEtD;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,MAAM,EAAE,WAAW,GAAG,QAAQ,CAAC;IAE/B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -6,7 +6,7 @@ const resource_1 = require("../../core/resource.js");
|
|
|
6
6
|
const path_1 = require("../../internal/utils/path.js");
|
|
7
7
|
class Invocations extends resource_1.APIResource {
|
|
8
8
|
/**
|
|
9
|
-
* Invoke an
|
|
9
|
+
* Invoke an action.
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* ```ts
|
|
@@ -21,7 +21,7 @@ class Invocations extends resource_1.APIResource {
|
|
|
21
21
|
return this._client.post('/invocations', { body, ...options });
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* Get an
|
|
24
|
+
* Get details about an invocation's status and output.
|
|
25
25
|
*
|
|
26
26
|
* @example
|
|
27
27
|
* ```ts
|
|
@@ -33,6 +33,20 @@ class Invocations extends resource_1.APIResource {
|
|
|
33
33
|
retrieve(id, options) {
|
|
34
34
|
return this._client.get((0, path_1.path) `/invocations/${id}`, options);
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Update an invocation's status or output.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const invocation = await client.apps.invocations.update(
|
|
42
|
+
* 'id',
|
|
43
|
+
* { status: 'succeeded' },
|
|
44
|
+
* );
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
update(id, body, options) {
|
|
48
|
+
return this._client.patch((0, path_1.path) `/invocations/${id}`, { body, ...options });
|
|
49
|
+
}
|
|
36
50
|
}
|
|
37
51
|
exports.Invocations = Invocations;
|
|
38
52
|
//# sourceMappingURL=invocations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invocations.js","sourceRoot":"","sources":["../../src/resources/apps/invocations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,gBAAgB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"invocations.js","sourceRoot":"","sources":["../../src/resources/apps/invocations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,gBAAgB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CACJ,EAAU,EACV,IAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,gBAAgB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;CACF;AAjDD,kCAiDC"}
|
|
@@ -3,7 +3,7 @@ import { APIResource } from "../../core/resource.mjs";
|
|
|
3
3
|
import { path } from "../../internal/utils/path.mjs";
|
|
4
4
|
export class Invocations extends APIResource {
|
|
5
5
|
/**
|
|
6
|
-
* Invoke an
|
|
6
|
+
* Invoke an action.
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
* ```ts
|
|
@@ -18,7 +18,7 @@ export class Invocations extends APIResource {
|
|
|
18
18
|
return this._client.post('/invocations', { body, ...options });
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
* Get an
|
|
21
|
+
* Get details about an invocation's status and output.
|
|
22
22
|
*
|
|
23
23
|
* @example
|
|
24
24
|
* ```ts
|
|
@@ -30,5 +30,19 @@ export class Invocations extends APIResource {
|
|
|
30
30
|
retrieve(id, options) {
|
|
31
31
|
return this._client.get(path `/invocations/${id}`, options);
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Update an invocation's status or output.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const invocation = await client.apps.invocations.update(
|
|
39
|
+
* 'id',
|
|
40
|
+
* { status: 'succeeded' },
|
|
41
|
+
* );
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
update(id, body, options) {
|
|
45
|
+
return this._client.patch(path `/invocations/${id}`, { body, ...options });
|
|
46
|
+
}
|
|
33
47
|
}
|
|
34
48
|
//# sourceMappingURL=invocations.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invocations.mjs","sourceRoot":"","sources":["../../src/resources/apps/invocations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,gBAAgB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"invocations.mjs","sourceRoot":"","sources":["../../src/resources/apps/invocations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,gBAAgB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CACJ,EAAU,EACV,IAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,gBAAgB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;CACF"}
|
package/resources/browsers.d.mts
CHANGED
|
@@ -4,7 +4,7 @@ import { APIPromise } from "../core/api-promise.mjs";
|
|
|
4
4
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
5
|
export declare class Browsers extends APIResource {
|
|
6
6
|
/**
|
|
7
|
-
* Create
|
|
7
|
+
* Create a new browser session from within an action.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```ts
|
|
@@ -15,7 +15,7 @@ export declare class Browsers extends APIResource {
|
|
|
15
15
|
*/
|
|
16
16
|
create(body: BrowserCreateParams, options?: RequestOptions): APIPromise<BrowserCreateResponse>;
|
|
17
17
|
/**
|
|
18
|
-
* Get
|
|
18
|
+
* Get information about a browser session.
|
|
19
19
|
*
|
|
20
20
|
* @example
|
|
21
21
|
* ```ts
|
|
@@ -26,7 +26,7 @@ export declare class Browsers extends APIResource {
|
|
|
26
26
|
*/
|
|
27
27
|
retrieve(id: string, options?: RequestOptions): APIPromise<BrowserRetrieveResponse>;
|
|
28
28
|
/**
|
|
29
|
-
* List active browser sessions
|
|
29
|
+
* List active browser sessions
|
|
30
30
|
*
|
|
31
31
|
* @example
|
|
32
32
|
* ```ts
|
|
@@ -35,7 +35,7 @@ export declare class Browsers extends APIResource {
|
|
|
35
35
|
*/
|
|
36
36
|
list(options?: RequestOptions): APIPromise<BrowserListResponse>;
|
|
37
37
|
/**
|
|
38
|
-
* Delete a persistent browser session by persistent_id
|
|
38
|
+
* Delete a persistent browser session by its persistent_id.
|
|
39
39
|
*
|
|
40
40
|
* @example
|
|
41
41
|
* ```ts
|
|
@@ -46,7 +46,7 @@ export declare class Browsers extends APIResource {
|
|
|
46
46
|
*/
|
|
47
47
|
delete(params: BrowserDeleteParams, options?: RequestOptions): APIPromise<void>;
|
|
48
48
|
/**
|
|
49
|
-
* Delete
|
|
49
|
+
* Delete a browser session by ID
|
|
50
50
|
*
|
|
51
51
|
* @example
|
|
52
52
|
* ```ts
|
|
@@ -132,6 +132,11 @@ export interface BrowserCreateParams {
|
|
|
132
132
|
* Optional persistence configuration for the browser session.
|
|
133
133
|
*/
|
|
134
134
|
persistence?: BrowserPersistence;
|
|
135
|
+
/**
|
|
136
|
+
* If true, launches the browser in stealth mode to reduce detection by anti-bot
|
|
137
|
+
* mechanisms.
|
|
138
|
+
*/
|
|
139
|
+
stealth?: boolean;
|
|
135
140
|
}
|
|
136
141
|
export interface BrowserDeleteParams {
|
|
137
142
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browsers.d.mts","sourceRoot":"","sources":["../src/resources/browsers.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;OASG;IACH,MAAM,CAAC,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ED
|
@@ -4,7 +4,7 @@ import { APIPromise } from "../core/api-promise.js";
|
|
|
4
4
|
import { RequestOptions } from "../internal/request-options.js";
|
|
5
5
|
export declare class Browsers extends APIResource {
|
|
6
6
|
/**
|
|
7
|
-
* Create
|
|
7
|
+
* Create a new browser session from within an action.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```ts
|
|
@@ -15,7 +15,7 @@ export declare class Browsers extends APIResource {
|
|
|
15
15
|
*/
|
|
16
16
|
create(body: BrowserCreateParams, options?: RequestOptions): APIPromise<BrowserCreateResponse>;
|
|
17
17
|
/**
|
|
18
|
-
* Get
|
|
18
|
+
* Get information about a browser session.
|
|
19
19
|
*
|
|
20
20
|
* @example
|
|
21
21
|
* ```ts
|
|
@@ -26,7 +26,7 @@ export declare class Browsers extends APIResource {
|
|
|
26
26
|
*/
|
|
27
27
|
retrieve(id: string, options?: RequestOptions): APIPromise<BrowserRetrieveResponse>;
|
|
28
28
|
/**
|
|
29
|
-
* List active browser sessions
|
|
29
|
+
* List active browser sessions
|
|
30
30
|
*
|
|
31
31
|
* @example
|
|
32
32
|
* ```ts
|
|
@@ -35,7 +35,7 @@ export declare class Browsers extends APIResource {
|
|
|
35
35
|
*/
|
|
36
36
|
list(options?: RequestOptions): APIPromise<BrowserListResponse>;
|
|
37
37
|
/**
|
|
38
|
-
* Delete a persistent browser session by persistent_id
|
|
38
|
+
* Delete a persistent browser session by its persistent_id.
|
|
39
39
|
*
|
|
40
40
|
* @example
|
|
41
41
|
* ```ts
|
|
@@ -46,7 +46,7 @@ export declare class Browsers extends APIResource {
|
|
|
46
46
|
*/
|
|
47
47
|
delete(params: BrowserDeleteParams, options?: RequestOptions): APIPromise<void>;
|
|
48
48
|
/**
|
|
49
|
-
* Delete
|
|
49
|
+
* Delete a browser session by ID
|
|
50
50
|
*
|
|
51
51
|
* @example
|
|
52
52
|
* ```ts
|
|
@@ -132,6 +132,11 @@ export interface BrowserCreateParams {
|
|
|
132
132
|
* Optional persistence configuration for the browser session.
|
|
133
133
|
*/
|
|
134
134
|
persistence?: BrowserPersistence;
|
|
135
|
+
/**
|
|
136
|
+
* If true, launches the browser in stealth mode to reduce detection by anti-bot
|
|
137
|
+
* mechanisms.
|
|
138
|
+
*/
|
|
139
|
+
stealth?: boolean;
|
|
135
140
|
}
|
|
136
141
|
export interface BrowserDeleteParams {
|
|
137
142
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browsers.d.ts","sourceRoot":"","sources":["../src/resources/browsers.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAI9F;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAInF;;;;;;;OAOG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;IAI/D;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAM,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAS/E;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAMnE;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,UAAU,EAAE,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AE,MAAM,CAAC;IAEtB;;OAEG;IACH,WAAW,CAAC,EAAE,kBAAkB,CAAC;IAEjC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
package/resources/browsers.js
CHANGED
|
@@ -7,7 +7,7 @@ const headers_1 = require("../internal/headers.js");
|
|
|
7
7
|
const path_1 = require("../internal/utils/path.js");
|
|
8
8
|
class Browsers extends resource_1.APIResource {
|
|
9
9
|
/**
|
|
10
|
-
* Create
|
|
10
|
+
* Create a new browser session from within an action.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
13
|
* ```ts
|
|
@@ -20,7 +20,7 @@ class Browsers extends resource_1.APIResource {
|
|
|
20
20
|
return this._client.post('/browsers', { body, ...options });
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Get
|
|
23
|
+
* Get information about a browser session.
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
26
|
* ```ts
|
|
@@ -33,7 +33,7 @@ class Browsers extends resource_1.APIResource {
|
|
|
33
33
|
return this._client.get((0, path_1.path) `/browsers/${id}`, options);
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
|
-
* List active browser sessions
|
|
36
|
+
* List active browser sessions
|
|
37
37
|
*
|
|
38
38
|
* @example
|
|
39
39
|
* ```ts
|
|
@@ -44,7 +44,7 @@ class Browsers extends resource_1.APIResource {
|
|
|
44
44
|
return this._client.get('/browsers', options);
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
|
-
* Delete a persistent browser session by persistent_id
|
|
47
|
+
* Delete a persistent browser session by its persistent_id.
|
|
48
48
|
*
|
|
49
49
|
* @example
|
|
50
50
|
* ```ts
|
|
@@ -62,7 +62,7 @@ class Browsers extends resource_1.APIResource {
|
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
|
-
* Delete
|
|
65
|
+
* Delete a browser session by ID
|
|
66
66
|
*
|
|
67
67
|
* @example
|
|
68
68
|
* ```ts
|
package/resources/browsers.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { buildHeaders } from "../internal/headers.mjs";
|
|
|
4
4
|
import { path } from "../internal/utils/path.mjs";
|
|
5
5
|
export class Browsers extends APIResource {
|
|
6
6
|
/**
|
|
7
|
-
* Create
|
|
7
|
+
* Create a new browser session from within an action.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```ts
|
|
@@ -17,7 +17,7 @@ export class Browsers extends APIResource {
|
|
|
17
17
|
return this._client.post('/browsers', { body, ...options });
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
* Get
|
|
20
|
+
* Get information about a browser session.
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* ```ts
|
|
@@ -30,7 +30,7 @@ export class Browsers extends APIResource {
|
|
|
30
30
|
return this._client.get(path `/browsers/${id}`, options);
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
|
-
* List active browser sessions
|
|
33
|
+
* List active browser sessions
|
|
34
34
|
*
|
|
35
35
|
* @example
|
|
36
36
|
* ```ts
|
|
@@ -41,7 +41,7 @@ export class Browsers extends APIResource {
|
|
|
41
41
|
return this._client.get('/browsers', options);
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
* Delete a persistent browser session by persistent_id
|
|
44
|
+
* Delete a persistent browser session by its persistent_id.
|
|
45
45
|
*
|
|
46
46
|
* @example
|
|
47
47
|
* ```ts
|
|
@@ -59,7 +59,7 @@ export class Browsers extends APIResource {
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
|
-
* Delete
|
|
62
|
+
* Delete a browser session by ID
|
|
63
63
|
*
|
|
64
64
|
* @example
|
|
65
65
|
* ```ts
|
|
@@ -85,10 +85,10 @@ const getPlatformProperties = (): PlatformProperties => {
|
|
|
85
85
|
return {
|
|
86
86
|
'X-Stainless-Lang': 'js',
|
|
87
87
|
'X-Stainless-Package-Version': VERSION,
|
|
88
|
-
'X-Stainless-OS': normalizePlatform((globalThis as any).process.platform),
|
|
89
|
-
'X-Stainless-Arch': normalizeArch((globalThis as any).process.arch),
|
|
88
|
+
'X-Stainless-OS': normalizePlatform((globalThis as any).process.platform ?? 'unknown'),
|
|
89
|
+
'X-Stainless-Arch': normalizeArch((globalThis as any).process.arch ?? 'unknown'),
|
|
90
90
|
'X-Stainless-Runtime': 'node',
|
|
91
|
-
'X-Stainless-Runtime-Version': (globalThis as any).process.version,
|
|
91
|
+
'X-Stainless-Runtime-Version': (globalThis as any).process.version ?? 'unknown',
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Shims for types that we can't always rely on being available globally.
|
|
5
|
+
*
|
|
6
|
+
* Note: these only exist at the type-level, there is no corresponding runtime
|
|
7
|
+
* version for any of these symbols.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
type NeverToAny<T> = T extends never ? any : T;
|
|
11
|
+
|
|
12
|
+
/** @ts-ignore */
|
|
13
|
+
type _DOMReadableStream<R = any> = globalThis.ReadableStream<R>;
|
|
14
|
+
|
|
15
|
+
/** @ts-ignore */
|
|
16
|
+
type _NodeReadableStream<R = any> = import('stream/web').ReadableStream<R>;
|
|
17
|
+
|
|
18
|
+
type _ConditionalNodeReadableStream<R = any> =
|
|
19
|
+
typeof globalThis extends { ReadableStream: any } ? never : _NodeReadableStream<R>;
|
|
20
|
+
|
|
21
|
+
type _ReadableStream<R = any> = NeverToAny<
|
|
22
|
+
| ([0] extends [1 & _DOMReadableStream<R>] ? never : _DOMReadableStream<R>)
|
|
23
|
+
| ([0] extends [1 & _ConditionalNodeReadableStream<R>] ? never : _ConditionalNodeReadableStream<R>)
|
|
24
|
+
>;
|
|
25
|
+
|
|
26
|
+
export type { _ReadableStream as ReadableStream };
|
package/src/internal/shims.ts
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* messages in cases where an environment isn't fully supported.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import type { Fetch } from './builtin-types';
|
|
11
|
+
import type { ReadableStream } from './shim-types';
|
|
12
12
|
|
|
13
13
|
export function getDefaultFetch(): Fetch {
|
|
14
14
|
if (typeof fetch !== 'undefined') {
|
|
@@ -13,6 +13,8 @@ import {
|
|
|
13
13
|
InvocationCreateParams,
|
|
14
14
|
InvocationCreateResponse,
|
|
15
15
|
InvocationRetrieveResponse,
|
|
16
|
+
InvocationUpdateParams,
|
|
17
|
+
InvocationUpdateResponse,
|
|
16
18
|
Invocations,
|
|
17
19
|
} from './invocations';
|
|
18
20
|
import { APIPromise } from '../../core/api-promise';
|
|
@@ -23,8 +25,7 @@ export class Apps extends APIResource {
|
|
|
23
25
|
invocations: InvocationsAPI.Invocations = new InvocationsAPI.Invocations(this._client);
|
|
24
26
|
|
|
25
27
|
/**
|
|
26
|
-
* List
|
|
27
|
-
* name and/or version label.
|
|
28
|
+
* List applications. Optionally filter by app name and/or version label.
|
|
28
29
|
*
|
|
29
30
|
* @example
|
|
30
31
|
* ```ts
|
|
@@ -99,6 +100,8 @@ export declare namespace Apps {
|
|
|
99
100
|
Invocations as Invocations,
|
|
100
101
|
type InvocationCreateResponse as InvocationCreateResponse,
|
|
101
102
|
type InvocationRetrieveResponse as InvocationRetrieveResponse,
|
|
103
|
+
type InvocationUpdateResponse as InvocationUpdateResponse,
|
|
102
104
|
type InvocationCreateParams as InvocationCreateParams,
|
|
105
|
+
type InvocationUpdateParams as InvocationUpdateParams,
|
|
103
106
|
};
|
|
104
107
|
}
|