@onkernel/sdk 0.4.0 → 0.6.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 +60 -0
- package/README.md +24 -36
- package/client.d.mts +15 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +15 -5
- package/client.d.ts.map +1 -1
- package/client.js +31 -22
- package/client.js.map +1 -1
- package/client.mjs +20 -11
- package/client.mjs.map +1 -1
- package/core/resource.d.mts +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/resource.js.map +1 -1
- package/core/resource.mjs.map +1 -1
- 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/headers.d.mts.map +1 -1
- package/internal/headers.d.ts.map +1 -1
- package/internal/headers.js +4 -4
- package/internal/headers.js.map +1 -1
- package/internal/headers.mjs +4 -4
- package/internal/headers.mjs.map +1 -1
- package/internal/request-options.d.mts +1 -0
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +1 -0
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.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/internal/uploads.js +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/log.js +1 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.d.mts.map +1 -1
- package/internal/utils/path.d.ts.map +1 -1
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/values.d.mts +2 -0
- package/internal/utils/values.d.mts.map +1 -1
- package/internal/utils/values.d.ts +2 -0
- package/internal/utils/values.d.ts.map +1 -1
- package/internal/utils/values.js +4 -1
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +2 -0
- package/internal/utils/values.mjs.map +1 -1
- package/package.json +1 -4
- package/resources/apps/apps.d.mts +2 -7
- package/resources/apps/apps.d.mts.map +1 -1
- package/resources/apps/apps.d.ts +2 -7
- package/resources/apps/apps.d.ts.map +1 -1
- package/resources/apps/apps.js +1 -6
- package/resources/apps/apps.js.map +1 -1
- package/resources/apps/apps.mjs +1 -6
- package/resources/apps/apps.mjs.map +1 -1
- package/resources/apps/deployments.d.mts +3 -19
- package/resources/apps/deployments.d.mts.map +1 -1
- package/resources/apps/deployments.d.ts +3 -19
- package/resources/apps/deployments.d.ts.map +1 -1
- package/resources/apps/deployments.js +1 -1
- package/resources/apps/deployments.js.map +1 -1
- package/resources/apps/deployments.mjs +1 -1
- package/resources/apps/deployments.mjs.map +1 -1
- package/resources/apps/index.d.mts +0 -1
- package/resources/apps/index.d.mts.map +1 -1
- package/resources/apps/index.d.ts +0 -1
- package/resources/apps/index.d.ts.map +1 -1
- package/resources/apps/index.js +1 -3
- package/resources/apps/index.js.map +1 -1
- package/resources/apps/index.mjs +0 -1
- package/resources/apps/index.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/resources/deployments.d.mts +255 -0
- package/resources/deployments.d.mts.map +1 -0
- package/resources/deployments.d.ts +255 -0
- package/resources/deployments.d.ts.map +1 -0
- package/resources/deployments.js +54 -0
- package/resources/deployments.js.map +1 -0
- package/resources/deployments.mjs +50 -0
- package/resources/deployments.mjs.map +1 -0
- package/resources/index.d.mts +3 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -1
- package/resources/{apps/invocations.d.mts → invocations.d.mts} +85 -13
- package/resources/invocations.d.mts.map +1 -0
- package/resources/{apps/invocations.d.ts → invocations.d.ts} +85 -13
- package/resources/invocations.d.ts.map +1 -0
- package/resources/invocations.js +69 -0
- package/resources/invocations.js.map +1 -0
- package/resources/invocations.mjs +65 -0
- package/resources/invocations.mjs.map +1 -0
- package/resources/shared.d.mts +57 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +57 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +4 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +3 -0
- package/resources/shared.mjs.map +1 -0
- package/src/client.ts +75 -11
- package/src/core/resource.ts +1 -1
- package/src/internal/detect-platform.ts +3 -3
- package/src/internal/headers.ts +5 -5
- package/src/internal/request-options.ts +1 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +2 -2
- package/src/internal/uploads.ts +2 -2
- package/src/internal/utils/log.ts +1 -1
- package/src/internal/utils/path.ts +1 -1
- package/src/internal/utils/values.ts +3 -0
- package/src/resources/apps/apps.ts +2 -23
- package/src/resources/apps/deployments.ts +3 -22
- package/src/resources/apps/index.ts +0 -8
- package/src/resources/browsers.ts +11 -5
- package/src/resources/deployments.ts +326 -0
- package/src/resources/index.ts +19 -0
- package/src/resources/{apps/invocations.ts → invocations.ts} +108 -13
- package/src/resources/shared.ts +69 -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/resources/apps/invocations.d.mts.map +0 -1
- package/resources/apps/invocations.d.ts.map +0 -1
- package/resources/apps/invocations.js +0 -52
- package/resources/apps/invocations.js.map +0 -1
- package/resources/apps/invocations.mjs +0 -48
- package/resources/apps/invocations.mjs.map +0 -1
- package/src/internal/shim-types.d.ts +0 -28
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import * as Shared from './shared';
|
|
5
|
+
import { APIPromise } from '../core/api-promise';
|
|
6
|
+
import { Stream } from '../core/streaming';
|
|
7
|
+
import { buildHeaders } from '../internal/headers';
|
|
8
|
+
import { RequestOptions } from '../internal/request-options';
|
|
9
|
+
import { path } from '../internal/utils/path';
|
|
7
10
|
|
|
8
11
|
export class Invocations extends APIResource {
|
|
9
12
|
/**
|
|
10
|
-
* Invoke an
|
|
13
|
+
* Invoke an action.
|
|
11
14
|
*
|
|
12
15
|
* @example
|
|
13
16
|
* ```ts
|
|
14
|
-
* const invocation = await client.
|
|
17
|
+
* const invocation = await client.invocations.create({
|
|
15
18
|
* action_name: 'analyze',
|
|
16
19
|
* app_name: 'my-app',
|
|
17
20
|
* version: '1.0.0',
|
|
@@ -23,11 +26,11 @@ export class Invocations extends APIResource {
|
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
/**
|
|
26
|
-
* Get an
|
|
29
|
+
* Get details about an invocation's status and output.
|
|
27
30
|
*
|
|
28
31
|
* @example
|
|
29
32
|
* ```ts
|
|
30
|
-
* const invocation = await client.
|
|
33
|
+
* const invocation = await client.invocations.retrieve(
|
|
31
34
|
* 'rr33xuugxj9h0bkf1rdt2bet',
|
|
32
35
|
* );
|
|
33
36
|
* ```
|
|
@@ -37,14 +40,13 @@ export class Invocations extends APIResource {
|
|
|
37
40
|
}
|
|
38
41
|
|
|
39
42
|
/**
|
|
40
|
-
* Update invocation status or output
|
|
43
|
+
* Update an invocation's status or output.
|
|
41
44
|
*
|
|
42
45
|
* @example
|
|
43
46
|
* ```ts
|
|
44
|
-
* const invocation = await client.
|
|
45
|
-
* '
|
|
46
|
-
*
|
|
47
|
-
* );
|
|
47
|
+
* const invocation = await client.invocations.update('id', {
|
|
48
|
+
* status: 'succeeded',
|
|
49
|
+
* });
|
|
48
50
|
* ```
|
|
49
51
|
*/
|
|
50
52
|
update(
|
|
@@ -54,6 +56,92 @@ export class Invocations extends APIResource {
|
|
|
54
56
|
): APIPromise<InvocationUpdateResponse> {
|
|
55
57
|
return this._client.patch(path`/invocations/${id}`, { body, ...options });
|
|
56
58
|
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Establishes a Server-Sent Events (SSE) stream that delivers real-time logs and
|
|
62
|
+
* status updates for an invocation. The stream terminates automatically once the
|
|
63
|
+
* invocation reaches a terminal state.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* const response = await client.invocations.follow('id');
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
follow(id: string, options?: RequestOptions): APIPromise<Stream<InvocationFollowResponse>> {
|
|
71
|
+
return this._client.get(path`/invocations/${id}/events`, {
|
|
72
|
+
...options,
|
|
73
|
+
headers: buildHeaders([{ Accept: 'text/event-stream' }, options?.headers]),
|
|
74
|
+
stream: true,
|
|
75
|
+
}) as APIPromise<Stream<InvocationFollowResponse>>;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* An event representing the current state of an invocation.
|
|
81
|
+
*/
|
|
82
|
+
export interface InvocationStateEvent {
|
|
83
|
+
/**
|
|
84
|
+
* Event type identifier (always "invocation_state").
|
|
85
|
+
*/
|
|
86
|
+
event: 'invocation_state';
|
|
87
|
+
|
|
88
|
+
invocation: InvocationStateEvent.Invocation;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Time the state was reported.
|
|
92
|
+
*/
|
|
93
|
+
timestamp: string;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export namespace InvocationStateEvent {
|
|
97
|
+
export interface Invocation {
|
|
98
|
+
/**
|
|
99
|
+
* ID of the invocation
|
|
100
|
+
*/
|
|
101
|
+
id: string;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Name of the action invoked
|
|
105
|
+
*/
|
|
106
|
+
action_name: string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Name of the application
|
|
110
|
+
*/
|
|
111
|
+
app_name: string;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* RFC 3339 Nanoseconds timestamp when the invocation started
|
|
115
|
+
*/
|
|
116
|
+
started_at: string;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Status of the invocation
|
|
120
|
+
*/
|
|
121
|
+
status: 'queued' | 'running' | 'succeeded' | 'failed';
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* RFC 3339 Nanoseconds timestamp when the invocation finished (null if still
|
|
125
|
+
* running)
|
|
126
|
+
*/
|
|
127
|
+
finished_at?: string | null;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Output produced by the action, rendered as a JSON string. This could be: string,
|
|
131
|
+
* number, boolean, array, object, or null.
|
|
132
|
+
*/
|
|
133
|
+
output?: string;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Payload provided to the invocation. This is a string that can be parsed as JSON.
|
|
137
|
+
*/
|
|
138
|
+
payload?: string;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Status reason
|
|
142
|
+
*/
|
|
143
|
+
status_reason?: string;
|
|
144
|
+
}
|
|
57
145
|
}
|
|
58
146
|
|
|
59
147
|
export interface InvocationCreateResponse {
|
|
@@ -177,6 +265,11 @@ export interface InvocationUpdateResponse {
|
|
|
177
265
|
status_reason?: string;
|
|
178
266
|
}
|
|
179
267
|
|
|
268
|
+
/**
|
|
269
|
+
* Union type representing any invocation event.
|
|
270
|
+
*/
|
|
271
|
+
export type InvocationFollowResponse = Shared.LogEvent | InvocationStateEvent | Shared.ErrorEvent;
|
|
272
|
+
|
|
180
273
|
export interface InvocationCreateParams {
|
|
181
274
|
/**
|
|
182
275
|
* Name of the action to invoke
|
|
@@ -219,9 +312,11 @@ export interface InvocationUpdateParams {
|
|
|
219
312
|
|
|
220
313
|
export declare namespace Invocations {
|
|
221
314
|
export {
|
|
315
|
+
type InvocationStateEvent as InvocationStateEvent,
|
|
222
316
|
type InvocationCreateResponse as InvocationCreateResponse,
|
|
223
317
|
type InvocationRetrieveResponse as InvocationRetrieveResponse,
|
|
224
318
|
type InvocationUpdateResponse as InvocationUpdateResponse,
|
|
319
|
+
type InvocationFollowResponse as InvocationFollowResponse,
|
|
225
320
|
type InvocationCreateParams as InvocationCreateParams,
|
|
226
321
|
type InvocationUpdateParams as InvocationUpdateParams,
|
|
227
322
|
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export interface ErrorDetail {
|
|
4
|
+
/**
|
|
5
|
+
* Lower-level error code providing more specific detail
|
|
6
|
+
*/
|
|
7
|
+
code?: string;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Further detail about the error
|
|
11
|
+
*/
|
|
12
|
+
message?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* An error event from the application.
|
|
17
|
+
*/
|
|
18
|
+
export interface ErrorEvent {
|
|
19
|
+
error: ErrorModel;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Event type identifier (always "error").
|
|
23
|
+
*/
|
|
24
|
+
event: 'error';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Time the error occurred.
|
|
28
|
+
*/
|
|
29
|
+
timestamp: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ErrorModel {
|
|
33
|
+
/**
|
|
34
|
+
* Application-specific error code (machine-readable)
|
|
35
|
+
*/
|
|
36
|
+
code: string;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Human-readable error description for debugging
|
|
40
|
+
*/
|
|
41
|
+
message: string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Additional error details (for multiple errors)
|
|
45
|
+
*/
|
|
46
|
+
details?: Array<ErrorDetail>;
|
|
47
|
+
|
|
48
|
+
inner_error?: ErrorDetail;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* A log entry from the application.
|
|
53
|
+
*/
|
|
54
|
+
export interface LogEvent {
|
|
55
|
+
/**
|
|
56
|
+
* Event type identifier (always "log").
|
|
57
|
+
*/
|
|
58
|
+
event: 'log';
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Log message text.
|
|
62
|
+
*/
|
|
63
|
+
message: string;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Time the log entry was produced.
|
|
67
|
+
*/
|
|
68
|
+
timestamp: string;
|
|
69
|
+
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.6.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.6.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.6.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.6.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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,CAAC,wBAAwB,CAAC;IAIpG;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;IAItF;;;;;;;;;;OAUG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,sBAAsB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,wBAAwB,CAAC;CAGxC;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;IAEtD;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,EAAE,QAAQ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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"}
|
|
@@ -1,52 +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.Invocations = void 0;
|
|
5
|
-
const resource_1 = require("../../core/resource.js");
|
|
6
|
-
const path_1 = require("../../internal/utils/path.js");
|
|
7
|
-
class Invocations extends resource_1.APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Invoke an application
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const invocation = await client.apps.invocations.create({
|
|
14
|
-
* action_name: 'analyze',
|
|
15
|
-
* app_name: 'my-app',
|
|
16
|
-
* version: '1.0.0',
|
|
17
|
-
* });
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
create(body, options) {
|
|
21
|
-
return this._client.post('/invocations', { body, ...options });
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Get an app invocation by id
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```ts
|
|
28
|
-
* const invocation = await client.apps.invocations.retrieve(
|
|
29
|
-
* 'rr33xuugxj9h0bkf1rdt2bet',
|
|
30
|
-
* );
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
retrieve(id, options) {
|
|
34
|
-
return this._client.get((0, path_1.path) `/invocations/${id}`, options);
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Update invocation 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
|
-
}
|
|
50
|
-
}
|
|
51
|
-
exports.Invocations = Invocations;
|
|
52
|
-
//# sourceMappingURL=invocations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,48 +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 { path } from "../../internal/utils/path.mjs";
|
|
4
|
-
export class Invocations extends APIResource {
|
|
5
|
-
/**
|
|
6
|
-
* Invoke an application
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```ts
|
|
10
|
-
* const invocation = await client.apps.invocations.create({
|
|
11
|
-
* action_name: 'analyze',
|
|
12
|
-
* app_name: 'my-app',
|
|
13
|
-
* version: '1.0.0',
|
|
14
|
-
* });
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
create(body, options) {
|
|
18
|
-
return this._client.post('/invocations', { body, ...options });
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Get an app invocation by id
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```ts
|
|
25
|
-
* const invocation = await client.apps.invocations.retrieve(
|
|
26
|
-
* 'rr33xuugxj9h0bkf1rdt2bet',
|
|
27
|
-
* );
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
retrieve(id, options) {
|
|
31
|
-
return this._client.get(path `/invocations/${id}`, options);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Update invocation 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
|
-
}
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=invocations.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,28 +0,0 @@
|
|
|
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
|
-
/**
|
|
11
|
-
* In order to properly access the global `NodeJS` type, if it's available, we
|
|
12
|
-
* need to make use of declaration shadowing. Without this, any checks for the
|
|
13
|
-
* presence of `NodeJS.ReadableStream` will fail.
|
|
14
|
-
*/
|
|
15
|
-
declare namespace NodeJS {
|
|
16
|
-
interface ReadableStream {}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
type HasProperties<T> = keyof T extends never ? false : true;
|
|
20
|
-
|
|
21
|
-
// @ts-ignore
|
|
22
|
-
type _ReadableStream<R = any> =
|
|
23
|
-
// @ts-ignore
|
|
24
|
-
HasProperties<NodeJS.ReadableStream> extends true ? NodeJS.ReadableStream<R> : ReadableStream<R>;
|
|
25
|
-
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
declare const _ReadableStream: unknown extends typeof ReadableStream ? never : typeof ReadableStream;
|
|
28
|
-
export { _ReadableStream as ReadableStream };
|