asteroid-odyssey 1.2.3 → 1.3.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/dist/index.d.mts +1760 -0
- package/dist/index.d.ts +1611 -20
- package/dist/index.js +2 -334
- package/dist/index.mjs +2 -0
- package/package.json +20 -7
- package/dist/generated/agents/client.gen.d.ts +0 -12
- package/dist/generated/agents/client.gen.js +0 -8
- package/dist/generated/agents/index.d.ts +0 -2
- package/dist/generated/agents/index.js +0 -19
- package/dist/generated/agents/sdk.gen.d.ts +0 -85
- package/dist/generated/agents/sdk.gen.js +0 -232
- package/dist/generated/agents/types.gen.d.ts +0 -641
- package/dist/generated/agents/types.gen.js +0 -3
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,1760 @@
|
|
|
1
|
+
type AuthToken$1 = string | undefined;
|
|
2
|
+
interface Auth$1 {
|
|
3
|
+
/**
|
|
4
|
+
* Which part of the request do we use to send the auth?
|
|
5
|
+
*
|
|
6
|
+
* @default 'header'
|
|
7
|
+
*/
|
|
8
|
+
in?: 'header' | 'query' | 'cookie';
|
|
9
|
+
/**
|
|
10
|
+
* Header or query parameter name.
|
|
11
|
+
*
|
|
12
|
+
* @default 'Authorization'
|
|
13
|
+
*/
|
|
14
|
+
name?: string;
|
|
15
|
+
scheme?: 'basic' | 'bearer';
|
|
16
|
+
type: 'apiKey' | 'http';
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface SerializerOptions$1<T> {
|
|
20
|
+
/**
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
explode: boolean;
|
|
24
|
+
style: T;
|
|
25
|
+
}
|
|
26
|
+
type ArrayStyle$1 = 'form' | 'spaceDelimited' | 'pipeDelimited';
|
|
27
|
+
type ObjectStyle$1 = 'form' | 'deepObject';
|
|
28
|
+
|
|
29
|
+
type QuerySerializer$1 = (query: Record<string, unknown>) => string;
|
|
30
|
+
type BodySerializer$1 = (body: any) => any;
|
|
31
|
+
interface QuerySerializerOptions$1 {
|
|
32
|
+
allowReserved?: boolean;
|
|
33
|
+
array?: SerializerOptions$1<ArrayStyle$1>;
|
|
34
|
+
object?: SerializerOptions$1<ObjectStyle$1>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
interface Client$3<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never> {
|
|
38
|
+
/**
|
|
39
|
+
* Returns the final request URL.
|
|
40
|
+
*/
|
|
41
|
+
buildUrl: BuildUrlFn;
|
|
42
|
+
connect: MethodFn;
|
|
43
|
+
delete: MethodFn;
|
|
44
|
+
get: MethodFn;
|
|
45
|
+
getConfig: () => Config;
|
|
46
|
+
head: MethodFn;
|
|
47
|
+
options: MethodFn;
|
|
48
|
+
patch: MethodFn;
|
|
49
|
+
post: MethodFn;
|
|
50
|
+
put: MethodFn;
|
|
51
|
+
request: RequestFn;
|
|
52
|
+
setConfig: (config: Config) => Config;
|
|
53
|
+
trace: MethodFn;
|
|
54
|
+
}
|
|
55
|
+
interface Config$3 {
|
|
56
|
+
/**
|
|
57
|
+
* Auth token or a function returning auth token. The resolved value will be
|
|
58
|
+
* added to the request payload as defined by its `security` array.
|
|
59
|
+
*/
|
|
60
|
+
auth?: ((auth: Auth$1) => Promise<AuthToken$1> | AuthToken$1) | AuthToken$1;
|
|
61
|
+
/**
|
|
62
|
+
* A function for serializing request body parameter. By default,
|
|
63
|
+
* {@link JSON.stringify()} will be used.
|
|
64
|
+
*/
|
|
65
|
+
bodySerializer?: BodySerializer$1 | null;
|
|
66
|
+
/**
|
|
67
|
+
* An object containing any HTTP headers that you want to pre-populate your
|
|
68
|
+
* `Headers` object with.
|
|
69
|
+
*
|
|
70
|
+
* {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
|
|
71
|
+
*/
|
|
72
|
+
headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
|
|
73
|
+
/**
|
|
74
|
+
* The request method.
|
|
75
|
+
*
|
|
76
|
+
* {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
|
|
77
|
+
*/
|
|
78
|
+
method?: 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE';
|
|
79
|
+
/**
|
|
80
|
+
* A function for serializing request query parameters. By default, arrays
|
|
81
|
+
* will be exploded in form style, objects will be exploded in deepObject
|
|
82
|
+
* style, and reserved characters are percent-encoded.
|
|
83
|
+
*
|
|
84
|
+
* This method will have no effect if the native `paramsSerializer()` Axios
|
|
85
|
+
* API function is used.
|
|
86
|
+
*
|
|
87
|
+
* {@link https://swagger.io/docs/specification/serialization/#query View examples}
|
|
88
|
+
*/
|
|
89
|
+
querySerializer?: QuerySerializer$1 | QuerySerializerOptions$1;
|
|
90
|
+
/**
|
|
91
|
+
* A function validating request data. This is useful if you want to ensure
|
|
92
|
+
* the request conforms to the desired shape, so it can be safely sent to
|
|
93
|
+
* the server.
|
|
94
|
+
*/
|
|
95
|
+
requestValidator?: (data: unknown) => Promise<unknown>;
|
|
96
|
+
/**
|
|
97
|
+
* A function transforming response data before it's returned. This is useful
|
|
98
|
+
* for post-processing data, e.g. converting ISO strings into Date objects.
|
|
99
|
+
*/
|
|
100
|
+
responseTransformer?: (data: unknown) => Promise<unknown>;
|
|
101
|
+
/**
|
|
102
|
+
* A function validating response data. This is useful if you want to ensure
|
|
103
|
+
* the response conforms to the desired shape, so it can be safely passed to
|
|
104
|
+
* the transformers and returned to the user.
|
|
105
|
+
*/
|
|
106
|
+
responseValidator?: (data: unknown) => Promise<unknown>;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
type ErrInterceptor$1<Err, Res, Req, Options> = (error: Err, response: Res, request: Req, options: Options) => Err | Promise<Err>;
|
|
110
|
+
type ReqInterceptor$1<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;
|
|
111
|
+
type ResInterceptor$1<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>;
|
|
112
|
+
declare class Interceptors$1<Interceptor> {
|
|
113
|
+
_fns: (Interceptor | null)[];
|
|
114
|
+
constructor();
|
|
115
|
+
clear(): void;
|
|
116
|
+
getInterceptorIndex(id: number | Interceptor): number;
|
|
117
|
+
exists(id: number | Interceptor): boolean;
|
|
118
|
+
eject(id: number | Interceptor): void;
|
|
119
|
+
update(id: number | Interceptor, fn: Interceptor): number | false | Interceptor;
|
|
120
|
+
use(fn: Interceptor): number;
|
|
121
|
+
}
|
|
122
|
+
interface Middleware$1<Req, Res, Err, Options> {
|
|
123
|
+
error: Pick<Interceptors$1<ErrInterceptor$1<Err, Res, Req, Options>>, 'eject' | 'use'>;
|
|
124
|
+
request: Pick<Interceptors$1<ReqInterceptor$1<Req, Options>>, 'eject' | 'use'>;
|
|
125
|
+
response: Pick<Interceptors$1<ResInterceptor$1<Res, Req, Options>>, 'eject' | 'use'>;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
type ResponseStyle$1 = 'data' | 'fields';
|
|
129
|
+
interface Config$2<T extends ClientOptions$3 = ClientOptions$3> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config$3 {
|
|
130
|
+
/**
|
|
131
|
+
* Base URL for all requests made by this client.
|
|
132
|
+
*/
|
|
133
|
+
baseUrl?: T['baseUrl'];
|
|
134
|
+
/**
|
|
135
|
+
* Fetch API implementation. You can use this option to provide a custom
|
|
136
|
+
* fetch instance.
|
|
137
|
+
*
|
|
138
|
+
* @default globalThis.fetch
|
|
139
|
+
*/
|
|
140
|
+
fetch?: (request: Request) => ReturnType<typeof fetch>;
|
|
141
|
+
/**
|
|
142
|
+
* Please don't use the Fetch client for Next.js applications. The `next`
|
|
143
|
+
* options won't have any effect.
|
|
144
|
+
*
|
|
145
|
+
* Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.
|
|
146
|
+
*/
|
|
147
|
+
next?: never;
|
|
148
|
+
/**
|
|
149
|
+
* Return the response data parsed in a specified format. By default, `auto`
|
|
150
|
+
* will infer the appropriate method from the `Content-Type` response header.
|
|
151
|
+
* You can override this behavior with any of the {@link Body} methods.
|
|
152
|
+
* Select `stream` if you don't want to parse response data at all.
|
|
153
|
+
*
|
|
154
|
+
* @default 'auto'
|
|
155
|
+
*/
|
|
156
|
+
parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';
|
|
157
|
+
/**
|
|
158
|
+
* Should we return only data or multiple fields (data, error, response, etc.)?
|
|
159
|
+
*
|
|
160
|
+
* @default 'fields'
|
|
161
|
+
*/
|
|
162
|
+
responseStyle?: ResponseStyle$1;
|
|
163
|
+
/**
|
|
164
|
+
* Throw an error instead of returning it in the response?
|
|
165
|
+
*
|
|
166
|
+
* @default false
|
|
167
|
+
*/
|
|
168
|
+
throwOnError?: T['throwOnError'];
|
|
169
|
+
}
|
|
170
|
+
interface RequestOptions$1<TResponseStyle extends ResponseStyle$1 = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config$2<{
|
|
171
|
+
responseStyle: TResponseStyle;
|
|
172
|
+
throwOnError: ThrowOnError;
|
|
173
|
+
}> {
|
|
174
|
+
/**
|
|
175
|
+
* Any body that you want to add to your request.
|
|
176
|
+
*
|
|
177
|
+
* {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
|
|
178
|
+
*/
|
|
179
|
+
body?: unknown;
|
|
180
|
+
path?: Record<string, unknown>;
|
|
181
|
+
query?: Record<string, unknown>;
|
|
182
|
+
/**
|
|
183
|
+
* Security mechanism(s) to use for the request.
|
|
184
|
+
*/
|
|
185
|
+
security?: ReadonlyArray<Auth$1>;
|
|
186
|
+
url: Url;
|
|
187
|
+
}
|
|
188
|
+
interface ResolvedRequestOptions$1<TResponseStyle extends ResponseStyle$1 = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions$1<TResponseStyle, ThrowOnError, Url> {
|
|
189
|
+
serializedBody?: string;
|
|
190
|
+
}
|
|
191
|
+
type RequestResult$1<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle$1 = 'fields'> = ThrowOnError extends true ? Promise<TResponseStyle extends 'data' ? TData extends Record<string, unknown> ? TData[keyof TData] : TData : {
|
|
192
|
+
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
193
|
+
request: Request;
|
|
194
|
+
response: Response;
|
|
195
|
+
}> : Promise<TResponseStyle extends 'data' ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined : ({
|
|
196
|
+
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
197
|
+
error: undefined;
|
|
198
|
+
} | {
|
|
199
|
+
data: undefined;
|
|
200
|
+
error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
|
|
201
|
+
}) & {
|
|
202
|
+
request: Request;
|
|
203
|
+
response: Response;
|
|
204
|
+
}>;
|
|
205
|
+
interface ClientOptions$3 {
|
|
206
|
+
baseUrl?: string;
|
|
207
|
+
responseStyle?: ResponseStyle$1;
|
|
208
|
+
throwOnError?: boolean;
|
|
209
|
+
}
|
|
210
|
+
type MethodFn$1 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle$1 = 'fields'>(options: Omit<RequestOptions$1<TResponseStyle, ThrowOnError>, 'method'>) => RequestResult$1<TData, TError, ThrowOnError, TResponseStyle>;
|
|
211
|
+
type RequestFn$1 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle$1 = 'fields'>(options: Omit<RequestOptions$1<TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions$1<TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult$1<TData, TError, ThrowOnError, TResponseStyle>;
|
|
212
|
+
type BuildUrlFn$1 = <TData extends {
|
|
213
|
+
body?: unknown;
|
|
214
|
+
path?: Record<string, unknown>;
|
|
215
|
+
query?: Record<string, unknown>;
|
|
216
|
+
url: string;
|
|
217
|
+
}>(options: Pick<TData, 'url'> & Options$3<TData>) => string;
|
|
218
|
+
type Client$2 = Client$3<RequestFn$1, Config$2, MethodFn$1, BuildUrlFn$1> & {
|
|
219
|
+
interceptors: Middleware$1<Request, Response, unknown, ResolvedRequestOptions$1>;
|
|
220
|
+
};
|
|
221
|
+
interface TDataShape$1 {
|
|
222
|
+
body?: unknown;
|
|
223
|
+
headers?: unknown;
|
|
224
|
+
path?: unknown;
|
|
225
|
+
query?: unknown;
|
|
226
|
+
url: string;
|
|
227
|
+
}
|
|
228
|
+
type OmitKeys$1<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
229
|
+
type Options$3<TData extends TDataShape$1 = TDataShape$1, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle$1 = 'fields'> = OmitKeys$1<RequestOptions$1<TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & Omit<TData, 'url'>;
|
|
230
|
+
|
|
231
|
+
type AuthToken = string | undefined;
|
|
232
|
+
interface Auth {
|
|
233
|
+
/**
|
|
234
|
+
* Which part of the request do we use to send the auth?
|
|
235
|
+
*
|
|
236
|
+
* @default 'header'
|
|
237
|
+
*/
|
|
238
|
+
in?: 'header' | 'query' | 'cookie';
|
|
239
|
+
/**
|
|
240
|
+
* Header or query parameter name.
|
|
241
|
+
*
|
|
242
|
+
* @default 'Authorization'
|
|
243
|
+
*/
|
|
244
|
+
name?: string;
|
|
245
|
+
scheme?: 'basic' | 'bearer';
|
|
246
|
+
type: 'apiKey' | 'http';
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
interface SerializerOptions<T> {
|
|
250
|
+
/**
|
|
251
|
+
* @default true
|
|
252
|
+
*/
|
|
253
|
+
explode: boolean;
|
|
254
|
+
style: T;
|
|
255
|
+
}
|
|
256
|
+
type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
|
|
257
|
+
type ObjectStyle = 'form' | 'deepObject';
|
|
258
|
+
|
|
259
|
+
type QuerySerializer = (query: Record<string, unknown>) => string;
|
|
260
|
+
type BodySerializer = (body: any) => any;
|
|
261
|
+
interface QuerySerializerOptions {
|
|
262
|
+
allowReserved?: boolean;
|
|
263
|
+
array?: SerializerOptions<ArrayStyle>;
|
|
264
|
+
object?: SerializerOptions<ObjectStyle>;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
interface Client$1<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never> {
|
|
268
|
+
/**
|
|
269
|
+
* Returns the final request URL.
|
|
270
|
+
*/
|
|
271
|
+
buildUrl: BuildUrlFn;
|
|
272
|
+
connect: MethodFn;
|
|
273
|
+
delete: MethodFn;
|
|
274
|
+
get: MethodFn;
|
|
275
|
+
getConfig: () => Config;
|
|
276
|
+
head: MethodFn;
|
|
277
|
+
options: MethodFn;
|
|
278
|
+
patch: MethodFn;
|
|
279
|
+
post: MethodFn;
|
|
280
|
+
put: MethodFn;
|
|
281
|
+
request: RequestFn;
|
|
282
|
+
setConfig: (config: Config) => Config;
|
|
283
|
+
trace: MethodFn;
|
|
284
|
+
}
|
|
285
|
+
interface Config$1 {
|
|
286
|
+
/**
|
|
287
|
+
* Auth token or a function returning auth token. The resolved value will be
|
|
288
|
+
* added to the request payload as defined by its `security` array.
|
|
289
|
+
*/
|
|
290
|
+
auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
|
|
291
|
+
/**
|
|
292
|
+
* A function for serializing request body parameter. By default,
|
|
293
|
+
* {@link JSON.stringify()} will be used.
|
|
294
|
+
*/
|
|
295
|
+
bodySerializer?: BodySerializer | null;
|
|
296
|
+
/**
|
|
297
|
+
* An object containing any HTTP headers that you want to pre-populate your
|
|
298
|
+
* `Headers` object with.
|
|
299
|
+
*
|
|
300
|
+
* {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
|
|
301
|
+
*/
|
|
302
|
+
headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
|
|
303
|
+
/**
|
|
304
|
+
* The request method.
|
|
305
|
+
*
|
|
306
|
+
* {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
|
|
307
|
+
*/
|
|
308
|
+
method?: 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE';
|
|
309
|
+
/**
|
|
310
|
+
* A function for serializing request query parameters. By default, arrays
|
|
311
|
+
* will be exploded in form style, objects will be exploded in deepObject
|
|
312
|
+
* style, and reserved characters are percent-encoded.
|
|
313
|
+
*
|
|
314
|
+
* This method will have no effect if the native `paramsSerializer()` Axios
|
|
315
|
+
* API function is used.
|
|
316
|
+
*
|
|
317
|
+
* {@link https://swagger.io/docs/specification/serialization/#query View examples}
|
|
318
|
+
*/
|
|
319
|
+
querySerializer?: QuerySerializer | QuerySerializerOptions;
|
|
320
|
+
/**
|
|
321
|
+
* A function validating request data. This is useful if you want to ensure
|
|
322
|
+
* the request conforms to the desired shape, so it can be safely sent to
|
|
323
|
+
* the server.
|
|
324
|
+
*/
|
|
325
|
+
requestValidator?: (data: unknown) => Promise<unknown>;
|
|
326
|
+
/**
|
|
327
|
+
* A function transforming response data before it's returned. This is useful
|
|
328
|
+
* for post-processing data, e.g. converting ISO strings into Date objects.
|
|
329
|
+
*/
|
|
330
|
+
responseTransformer?: (data: unknown) => Promise<unknown>;
|
|
331
|
+
/**
|
|
332
|
+
* A function validating response data. This is useful if you want to ensure
|
|
333
|
+
* the response conforms to the desired shape, so it can be safely passed to
|
|
334
|
+
* the transformers and returned to the user.
|
|
335
|
+
*/
|
|
336
|
+
responseValidator?: (data: unknown) => Promise<unknown>;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
type ErrInterceptor<Err, Res, Req, Options> = (error: Err, response: Res, request: Req, options: Options) => Err | Promise<Err>;
|
|
340
|
+
type ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;
|
|
341
|
+
type ResInterceptor<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>;
|
|
342
|
+
declare class Interceptors<Interceptor> {
|
|
343
|
+
_fns: (Interceptor | null)[];
|
|
344
|
+
constructor();
|
|
345
|
+
clear(): void;
|
|
346
|
+
getInterceptorIndex(id: number | Interceptor): number;
|
|
347
|
+
exists(id: number | Interceptor): boolean;
|
|
348
|
+
eject(id: number | Interceptor): void;
|
|
349
|
+
update(id: number | Interceptor, fn: Interceptor): number | false | Interceptor;
|
|
350
|
+
use(fn: Interceptor): number;
|
|
351
|
+
}
|
|
352
|
+
interface Middleware<Req, Res, Err, Options> {
|
|
353
|
+
error: Pick<Interceptors<ErrInterceptor<Err, Res, Req, Options>>, 'eject' | 'use'>;
|
|
354
|
+
request: Pick<Interceptors<ReqInterceptor<Req, Options>>, 'eject' | 'use'>;
|
|
355
|
+
response: Pick<Interceptors<ResInterceptor<Res, Req, Options>>, 'eject' | 'use'>;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
type ResponseStyle = 'data' | 'fields';
|
|
359
|
+
interface Config<T extends ClientOptions$2 = ClientOptions$2> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config$1 {
|
|
360
|
+
/**
|
|
361
|
+
* Base URL for all requests made by this client.
|
|
362
|
+
*/
|
|
363
|
+
baseUrl?: T['baseUrl'];
|
|
364
|
+
/**
|
|
365
|
+
* Fetch API implementation. You can use this option to provide a custom
|
|
366
|
+
* fetch instance.
|
|
367
|
+
*
|
|
368
|
+
* @default globalThis.fetch
|
|
369
|
+
*/
|
|
370
|
+
fetch?: (request: Request) => ReturnType<typeof fetch>;
|
|
371
|
+
/**
|
|
372
|
+
* Please don't use the Fetch client for Next.js applications. The `next`
|
|
373
|
+
* options won't have any effect.
|
|
374
|
+
*
|
|
375
|
+
* Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.
|
|
376
|
+
*/
|
|
377
|
+
next?: never;
|
|
378
|
+
/**
|
|
379
|
+
* Return the response data parsed in a specified format. By default, `auto`
|
|
380
|
+
* will infer the appropriate method from the `Content-Type` response header.
|
|
381
|
+
* You can override this behavior with any of the {@link Body} methods.
|
|
382
|
+
* Select `stream` if you don't want to parse response data at all.
|
|
383
|
+
*
|
|
384
|
+
* @default 'auto'
|
|
385
|
+
*/
|
|
386
|
+
parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';
|
|
387
|
+
/**
|
|
388
|
+
* Should we return only data or multiple fields (data, error, response, etc.)?
|
|
389
|
+
*
|
|
390
|
+
* @default 'fields'
|
|
391
|
+
*/
|
|
392
|
+
responseStyle?: ResponseStyle;
|
|
393
|
+
/**
|
|
394
|
+
* Throw an error instead of returning it in the response?
|
|
395
|
+
*
|
|
396
|
+
* @default false
|
|
397
|
+
*/
|
|
398
|
+
throwOnError?: T['throwOnError'];
|
|
399
|
+
}
|
|
400
|
+
interface RequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
|
|
401
|
+
responseStyle: TResponseStyle;
|
|
402
|
+
throwOnError: ThrowOnError;
|
|
403
|
+
}> {
|
|
404
|
+
/**
|
|
405
|
+
* Any body that you want to add to your request.
|
|
406
|
+
*
|
|
407
|
+
* {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
|
|
408
|
+
*/
|
|
409
|
+
body?: unknown;
|
|
410
|
+
path?: Record<string, unknown>;
|
|
411
|
+
query?: Record<string, unknown>;
|
|
412
|
+
/**
|
|
413
|
+
* Security mechanism(s) to use for the request.
|
|
414
|
+
*/
|
|
415
|
+
security?: ReadonlyArray<Auth>;
|
|
416
|
+
url: Url;
|
|
417
|
+
}
|
|
418
|
+
interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<TResponseStyle, ThrowOnError, Url> {
|
|
419
|
+
serializedBody?: string;
|
|
420
|
+
}
|
|
421
|
+
type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'fields'> = ThrowOnError extends true ? Promise<TResponseStyle extends 'data' ? TData extends Record<string, unknown> ? TData[keyof TData] : TData : {
|
|
422
|
+
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
423
|
+
request: Request;
|
|
424
|
+
response: Response;
|
|
425
|
+
}> : Promise<TResponseStyle extends 'data' ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined : ({
|
|
426
|
+
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
427
|
+
error: undefined;
|
|
428
|
+
} | {
|
|
429
|
+
data: undefined;
|
|
430
|
+
error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
|
|
431
|
+
}) & {
|
|
432
|
+
request: Request;
|
|
433
|
+
response: Response;
|
|
434
|
+
}>;
|
|
435
|
+
interface ClientOptions$2 {
|
|
436
|
+
baseUrl?: string;
|
|
437
|
+
responseStyle?: ResponseStyle;
|
|
438
|
+
throwOnError?: boolean;
|
|
439
|
+
}
|
|
440
|
+
type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
441
|
+
type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
442
|
+
type BuildUrlFn = <TData extends {
|
|
443
|
+
body?: unknown;
|
|
444
|
+
path?: Record<string, unknown>;
|
|
445
|
+
query?: Record<string, unknown>;
|
|
446
|
+
url: string;
|
|
447
|
+
}>(options: Pick<TData, 'url'> & Options$2<TData>) => string;
|
|
448
|
+
type Client = Client$1<RequestFn, Config, MethodFn, BuildUrlFn> & {
|
|
449
|
+
interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;
|
|
450
|
+
};
|
|
451
|
+
interface TDataShape {
|
|
452
|
+
body?: unknown;
|
|
453
|
+
headers?: unknown;
|
|
454
|
+
path?: unknown;
|
|
455
|
+
query?: unknown;
|
|
456
|
+
url: string;
|
|
457
|
+
}
|
|
458
|
+
type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
459
|
+
type Options$2<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & Omit<TData, 'url'>;
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Request to execute an agent with specific parameters
|
|
463
|
+
*/
|
|
464
|
+
type AgentExecutionRequest = {
|
|
465
|
+
[key: string]: unknown;
|
|
466
|
+
};
|
|
467
|
+
type ExecutionResponse = {
|
|
468
|
+
/**
|
|
469
|
+
* The ID of the execution
|
|
470
|
+
*/
|
|
471
|
+
execution_id: string;
|
|
472
|
+
};
|
|
473
|
+
type ExecutionStatusResponse = {
|
|
474
|
+
/**
|
|
475
|
+
* The ID of the execution
|
|
476
|
+
*/
|
|
477
|
+
execution_id: string;
|
|
478
|
+
status: Status;
|
|
479
|
+
/**
|
|
480
|
+
* Reason for the current status (if applicable)
|
|
481
|
+
*/
|
|
482
|
+
reason?: string;
|
|
483
|
+
/**
|
|
484
|
+
* Time when the status was last updated
|
|
485
|
+
*/
|
|
486
|
+
updated_at?: string;
|
|
487
|
+
};
|
|
488
|
+
type ExecutionResultResponse = {
|
|
489
|
+
/**
|
|
490
|
+
* The ID of the execution
|
|
491
|
+
*/
|
|
492
|
+
execution_id: string;
|
|
493
|
+
status: Status;
|
|
494
|
+
/**
|
|
495
|
+
* (Deprecated, use execution_result instead) The structured result data from the execution. Contains the outcome, reasoning, final answer, and result.
|
|
496
|
+
* @deprecated
|
|
497
|
+
*/
|
|
498
|
+
result?: {
|
|
499
|
+
[key: string]: unknown;
|
|
500
|
+
};
|
|
501
|
+
/**
|
|
502
|
+
* Error message (if execution failed)
|
|
503
|
+
*/
|
|
504
|
+
error?: string;
|
|
505
|
+
execution_result?: ExecutionResult;
|
|
506
|
+
};
|
|
507
|
+
/**
|
|
508
|
+
* The result of an execution. Contains the outcome, reasoning, and result.
|
|
509
|
+
*/
|
|
510
|
+
type ExecutionResult = {
|
|
511
|
+
/**
|
|
512
|
+
* The outcome of the execution (success or failure)
|
|
513
|
+
*/
|
|
514
|
+
outcome?: 'success' | 'failure';
|
|
515
|
+
/**
|
|
516
|
+
* The reasoning behind the execution outcome
|
|
517
|
+
*/
|
|
518
|
+
reasoning?: string;
|
|
519
|
+
/**
|
|
520
|
+
* The structured result data from the execution. This will follow the format defined in the result_schema of the agent.
|
|
521
|
+
*/
|
|
522
|
+
result?: {
|
|
523
|
+
[key: string]: unknown;
|
|
524
|
+
};
|
|
525
|
+
};
|
|
526
|
+
/**
|
|
527
|
+
* Status of the execution
|
|
528
|
+
*/
|
|
529
|
+
type Status = 'starting' | 'running' | 'paused' | 'completed' | 'cancelled' | 'failed' | 'awaiting_confirmation' | 'paused_by_agent';
|
|
530
|
+
type ErrorResponse = {
|
|
531
|
+
/**
|
|
532
|
+
* Error message
|
|
533
|
+
*/
|
|
534
|
+
error: string;
|
|
535
|
+
};
|
|
536
|
+
type BrowserSessionRecordingResponse = {
|
|
537
|
+
/**
|
|
538
|
+
* The URL of the browser session recording
|
|
539
|
+
*/
|
|
540
|
+
recording_url: string;
|
|
541
|
+
};
|
|
542
|
+
/**
|
|
543
|
+
* Request to execute an agent with structured parameters including optional agent profile configuration
|
|
544
|
+
*/
|
|
545
|
+
type StructuredAgentExecutionRequest = {
|
|
546
|
+
/**
|
|
547
|
+
* The ID of the browser profile to use
|
|
548
|
+
*/
|
|
549
|
+
agent_profile_id?: string;
|
|
550
|
+
/**
|
|
551
|
+
* Dynamic data to be merged into the saved agent configuration.
|
|
552
|
+
*/
|
|
553
|
+
dynamic_data?: {
|
|
554
|
+
[key: string]: unknown;
|
|
555
|
+
};
|
|
556
|
+
};
|
|
557
|
+
type AgentProfile = {
|
|
558
|
+
/**
|
|
559
|
+
* Unique identifier for the agent profile
|
|
560
|
+
*/
|
|
561
|
+
id: string;
|
|
562
|
+
/**
|
|
563
|
+
* Name of the agent profile (unique within organization)
|
|
564
|
+
*/
|
|
565
|
+
name: string;
|
|
566
|
+
/**
|
|
567
|
+
* Description of the agent profile
|
|
568
|
+
*/
|
|
569
|
+
description: string;
|
|
570
|
+
/**
|
|
571
|
+
* The ID of the organization that the agent profile belongs to
|
|
572
|
+
*/
|
|
573
|
+
organization_id: string;
|
|
574
|
+
proxy_cc: CountryCode;
|
|
575
|
+
proxy_type: ProxyType;
|
|
576
|
+
/**
|
|
577
|
+
* Whether the captcha solver is active for this profile
|
|
578
|
+
*/
|
|
579
|
+
captcha_solver_active: boolean;
|
|
580
|
+
/**
|
|
581
|
+
* Whether the same IP address should be used for all executions of this profile
|
|
582
|
+
*/
|
|
583
|
+
sticky_ip: boolean;
|
|
584
|
+
/**
|
|
585
|
+
* List of credentials associated with this agent profile
|
|
586
|
+
*/
|
|
587
|
+
credentials: Array<Credential>;
|
|
588
|
+
/**
|
|
589
|
+
* The date and time the agent profile was created
|
|
590
|
+
*/
|
|
591
|
+
created_at: string;
|
|
592
|
+
/**
|
|
593
|
+
* The last update time of the agent profile
|
|
594
|
+
*/
|
|
595
|
+
updated_at: string;
|
|
596
|
+
};
|
|
597
|
+
type CreateAgentProfileRequest = {
|
|
598
|
+
/**
|
|
599
|
+
* Name of the agent profile (must be unique within organization)
|
|
600
|
+
*/
|
|
601
|
+
name: string;
|
|
602
|
+
/**
|
|
603
|
+
* Description of the agent profile
|
|
604
|
+
*/
|
|
605
|
+
description: string;
|
|
606
|
+
/**
|
|
607
|
+
* The ID of the organization that the agent profile belongs to
|
|
608
|
+
*/
|
|
609
|
+
organization_id: string;
|
|
610
|
+
proxy_cc: CountryCode;
|
|
611
|
+
proxy_type: ProxyType;
|
|
612
|
+
/**
|
|
613
|
+
* Whether the captcha solver should be active for this profile
|
|
614
|
+
*/
|
|
615
|
+
captcha_solver_active: boolean;
|
|
616
|
+
/**
|
|
617
|
+
* Whether the same IP address should be used for all executions of this profile
|
|
618
|
+
*/
|
|
619
|
+
sticky_ip: boolean;
|
|
620
|
+
/**
|
|
621
|
+
* Optional list of credentials to create with the profile
|
|
622
|
+
*/
|
|
623
|
+
credentials: Array<Credential>;
|
|
624
|
+
};
|
|
625
|
+
type UpdateAgentProfileRequest = {
|
|
626
|
+
/**
|
|
627
|
+
* The name of the agent profile
|
|
628
|
+
*/
|
|
629
|
+
name?: string;
|
|
630
|
+
/**
|
|
631
|
+
* The description of the agent profile
|
|
632
|
+
*/
|
|
633
|
+
description?: string;
|
|
634
|
+
proxy_cc?: CountryCode;
|
|
635
|
+
proxy_type?: ProxyType;
|
|
636
|
+
/**
|
|
637
|
+
* Whether the captcha solver should be active for this profile
|
|
638
|
+
*/
|
|
639
|
+
captcha_solver_active?: boolean;
|
|
640
|
+
/**
|
|
641
|
+
* Whether the same IP address should be used for all executions of this profile
|
|
642
|
+
*/
|
|
643
|
+
sticky_ip?: boolean;
|
|
644
|
+
/**
|
|
645
|
+
* List of credentials to add to the profile
|
|
646
|
+
*/
|
|
647
|
+
credentials_to_add?: Array<Credential>;
|
|
648
|
+
/**
|
|
649
|
+
* List of credential IDs to delete from the profile
|
|
650
|
+
*/
|
|
651
|
+
credentials_to_delete?: Array<string>;
|
|
652
|
+
};
|
|
653
|
+
/**
|
|
654
|
+
* Two-letter country code for proxy location
|
|
655
|
+
*/
|
|
656
|
+
type CountryCode = 'us' | 'uk' | 'fr' | 'it' | 'jp' | 'au' | 'de' | 'fi' | 'ca';
|
|
657
|
+
/**
|
|
658
|
+
* Type of proxy to use
|
|
659
|
+
*/
|
|
660
|
+
type ProxyType = 'residential' | 'mobile';
|
|
661
|
+
type Credential = {
|
|
662
|
+
/**
|
|
663
|
+
* The unique identifier for this credential
|
|
664
|
+
*/
|
|
665
|
+
id?: string;
|
|
666
|
+
/**
|
|
667
|
+
* The credential name
|
|
668
|
+
*/
|
|
669
|
+
name: string;
|
|
670
|
+
/**
|
|
671
|
+
* The encrypted credential
|
|
672
|
+
*/
|
|
673
|
+
data: string;
|
|
674
|
+
/**
|
|
675
|
+
* When the credential was created
|
|
676
|
+
*/
|
|
677
|
+
created_at?: string;
|
|
678
|
+
};
|
|
679
|
+
type GetOpenApiData = {
|
|
680
|
+
body?: never;
|
|
681
|
+
path?: never;
|
|
682
|
+
query?: never;
|
|
683
|
+
url: '/openapi.yaml';
|
|
684
|
+
};
|
|
685
|
+
type GetOpenApiResponses = {
|
|
686
|
+
/**
|
|
687
|
+
* OpenAPI schema
|
|
688
|
+
*/
|
|
689
|
+
200: unknown;
|
|
690
|
+
};
|
|
691
|
+
type UploadExecutionFilesData = {
|
|
692
|
+
body: {
|
|
693
|
+
/**
|
|
694
|
+
* Files to upload to the execution
|
|
695
|
+
*/
|
|
696
|
+
files?: Array<Blob | File>;
|
|
697
|
+
};
|
|
698
|
+
path: {
|
|
699
|
+
/**
|
|
700
|
+
* The ID of the execution
|
|
701
|
+
*/
|
|
702
|
+
id: string;
|
|
703
|
+
};
|
|
704
|
+
query?: never;
|
|
705
|
+
url: '/execution/{id}/files';
|
|
706
|
+
};
|
|
707
|
+
type UploadExecutionFilesErrors = {
|
|
708
|
+
/**
|
|
709
|
+
* Bad request
|
|
710
|
+
*/
|
|
711
|
+
400: ErrorResponse;
|
|
712
|
+
/**
|
|
713
|
+
* Unauthorized
|
|
714
|
+
*/
|
|
715
|
+
401: ErrorResponse;
|
|
716
|
+
/**
|
|
717
|
+
* Execution not found
|
|
718
|
+
*/
|
|
719
|
+
404: ErrorResponse;
|
|
720
|
+
};
|
|
721
|
+
type UploadExecutionFilesError = UploadExecutionFilesErrors[keyof UploadExecutionFilesErrors];
|
|
722
|
+
type UploadExecutionFilesResponses = {
|
|
723
|
+
/**
|
|
724
|
+
* Files uploaded successfully
|
|
725
|
+
*/
|
|
726
|
+
200: {
|
|
727
|
+
/**
|
|
728
|
+
* Success message
|
|
729
|
+
*/
|
|
730
|
+
message?: string;
|
|
731
|
+
/**
|
|
732
|
+
* IDs of the uploaded files
|
|
733
|
+
*/
|
|
734
|
+
file_ids?: Array<string>;
|
|
735
|
+
};
|
|
736
|
+
};
|
|
737
|
+
type UploadExecutionFilesResponse = UploadExecutionFilesResponses[keyof UploadExecutionFilesResponses];
|
|
738
|
+
type HealthCheckData = {
|
|
739
|
+
body?: never;
|
|
740
|
+
path?: never;
|
|
741
|
+
query?: never;
|
|
742
|
+
url: '/health';
|
|
743
|
+
};
|
|
744
|
+
type HealthCheckErrors = {
|
|
745
|
+
/**
|
|
746
|
+
* API is unhealthy
|
|
747
|
+
*/
|
|
748
|
+
500: {
|
|
749
|
+
/**
|
|
750
|
+
* The error message
|
|
751
|
+
*/
|
|
752
|
+
error?: string;
|
|
753
|
+
};
|
|
754
|
+
};
|
|
755
|
+
type HealthCheckError = HealthCheckErrors[keyof HealthCheckErrors];
|
|
756
|
+
type HealthCheckResponses = {
|
|
757
|
+
/**
|
|
758
|
+
* API is healthy
|
|
759
|
+
*/
|
|
760
|
+
200: {
|
|
761
|
+
/**
|
|
762
|
+
* The health status of the API
|
|
763
|
+
*/
|
|
764
|
+
status?: string;
|
|
765
|
+
};
|
|
766
|
+
};
|
|
767
|
+
type HealthCheckResponse = HealthCheckResponses[keyof HealthCheckResponses];
|
|
768
|
+
type ExecuteAgentData = {
|
|
769
|
+
body: AgentExecutionRequest;
|
|
770
|
+
path: {
|
|
771
|
+
/**
|
|
772
|
+
* The ID of the agent
|
|
773
|
+
*/
|
|
774
|
+
id: string;
|
|
775
|
+
};
|
|
776
|
+
query?: never;
|
|
777
|
+
url: '/agent/{id}';
|
|
778
|
+
};
|
|
779
|
+
type ExecuteAgentErrors = {
|
|
780
|
+
/**
|
|
781
|
+
* Invalid request
|
|
782
|
+
*/
|
|
783
|
+
400: ErrorResponse;
|
|
784
|
+
/**
|
|
785
|
+
* Agent not found
|
|
786
|
+
*/
|
|
787
|
+
404: ErrorResponse;
|
|
788
|
+
/**
|
|
789
|
+
* Internal server error
|
|
790
|
+
*/
|
|
791
|
+
500: ErrorResponse;
|
|
792
|
+
};
|
|
793
|
+
type ExecuteAgentError = ExecuteAgentErrors[keyof ExecuteAgentErrors];
|
|
794
|
+
type ExecuteAgentResponses = {
|
|
795
|
+
/**
|
|
796
|
+
* Agent execution started successfully
|
|
797
|
+
*/
|
|
798
|
+
202: ExecutionResponse;
|
|
799
|
+
};
|
|
800
|
+
type ExecuteAgentResponse = ExecuteAgentResponses[keyof ExecuteAgentResponses];
|
|
801
|
+
type ExecuteAgentStructuredData = {
|
|
802
|
+
body: StructuredAgentExecutionRequest;
|
|
803
|
+
path: {
|
|
804
|
+
/**
|
|
805
|
+
* The ID of the agent
|
|
806
|
+
*/
|
|
807
|
+
id: string;
|
|
808
|
+
};
|
|
809
|
+
query?: never;
|
|
810
|
+
url: '/agent/{id}/execute';
|
|
811
|
+
};
|
|
812
|
+
type ExecuteAgentStructuredErrors = {
|
|
813
|
+
/**
|
|
814
|
+
* Invalid request
|
|
815
|
+
*/
|
|
816
|
+
400: ErrorResponse;
|
|
817
|
+
/**
|
|
818
|
+
* Agent not found
|
|
819
|
+
*/
|
|
820
|
+
404: ErrorResponse;
|
|
821
|
+
/**
|
|
822
|
+
* Internal server error
|
|
823
|
+
*/
|
|
824
|
+
500: ErrorResponse;
|
|
825
|
+
};
|
|
826
|
+
type ExecuteAgentStructuredError = ExecuteAgentStructuredErrors[keyof ExecuteAgentStructuredErrors];
|
|
827
|
+
type ExecuteAgentStructuredResponses = {
|
|
828
|
+
/**
|
|
829
|
+
* Agent execution started successfully
|
|
830
|
+
*/
|
|
831
|
+
202: ExecutionResponse;
|
|
832
|
+
};
|
|
833
|
+
type ExecuteAgentStructuredResponse = ExecuteAgentStructuredResponses[keyof ExecuteAgentStructuredResponses];
|
|
834
|
+
type GetExecutionStatusData = {
|
|
835
|
+
body?: never;
|
|
836
|
+
path: {
|
|
837
|
+
/**
|
|
838
|
+
* The ID of the execution
|
|
839
|
+
*/
|
|
840
|
+
id: string;
|
|
841
|
+
};
|
|
842
|
+
query?: never;
|
|
843
|
+
url: '/execution/{id}/status';
|
|
844
|
+
};
|
|
845
|
+
type GetExecutionStatusErrors = {
|
|
846
|
+
/**
|
|
847
|
+
* Execution not found
|
|
848
|
+
*/
|
|
849
|
+
404: ErrorResponse;
|
|
850
|
+
/**
|
|
851
|
+
* Internal server error
|
|
852
|
+
*/
|
|
853
|
+
500: ErrorResponse;
|
|
854
|
+
};
|
|
855
|
+
type GetExecutionStatusError = GetExecutionStatusErrors[keyof GetExecutionStatusErrors];
|
|
856
|
+
type GetExecutionStatusResponses = {
|
|
857
|
+
/**
|
|
858
|
+
* Execution status retrieved successfully
|
|
859
|
+
*/
|
|
860
|
+
200: ExecutionStatusResponse;
|
|
861
|
+
};
|
|
862
|
+
type GetExecutionStatusResponse = GetExecutionStatusResponses[keyof GetExecutionStatusResponses];
|
|
863
|
+
type GetExecutionResultData = {
|
|
864
|
+
body?: never;
|
|
865
|
+
path: {
|
|
866
|
+
/**
|
|
867
|
+
* The ID of the execution
|
|
868
|
+
*/
|
|
869
|
+
id: string;
|
|
870
|
+
};
|
|
871
|
+
query?: never;
|
|
872
|
+
url: '/execution/{id}/result';
|
|
873
|
+
};
|
|
874
|
+
type GetExecutionResultErrors = {
|
|
875
|
+
/**
|
|
876
|
+
* Execution not found
|
|
877
|
+
*/
|
|
878
|
+
404: ErrorResponse;
|
|
879
|
+
/**
|
|
880
|
+
* Internal server error
|
|
881
|
+
*/
|
|
882
|
+
500: ErrorResponse;
|
|
883
|
+
};
|
|
884
|
+
type GetExecutionResultError = GetExecutionResultErrors[keyof GetExecutionResultErrors];
|
|
885
|
+
type GetExecutionResultResponses = {
|
|
886
|
+
/**
|
|
887
|
+
* Execution result retrieved successfully
|
|
888
|
+
*/
|
|
889
|
+
200: ExecutionResultResponse;
|
|
890
|
+
};
|
|
891
|
+
type GetExecutionResultResponse = GetExecutionResultResponses[keyof GetExecutionResultResponses];
|
|
892
|
+
type GetBrowserSessionRecordingData = {
|
|
893
|
+
body?: never;
|
|
894
|
+
path: {
|
|
895
|
+
/**
|
|
896
|
+
* The ID of the execution
|
|
897
|
+
*/
|
|
898
|
+
id: string;
|
|
899
|
+
};
|
|
900
|
+
query?: never;
|
|
901
|
+
url: '/execution/{id}/browser_session/recording';
|
|
902
|
+
};
|
|
903
|
+
type GetBrowserSessionRecordingErrors = {
|
|
904
|
+
/**
|
|
905
|
+
* Browser session not found
|
|
906
|
+
*/
|
|
907
|
+
404: ErrorResponse;
|
|
908
|
+
/**
|
|
909
|
+
* Internal server error
|
|
910
|
+
*/
|
|
911
|
+
500: ErrorResponse;
|
|
912
|
+
};
|
|
913
|
+
type GetBrowserSessionRecordingError = GetBrowserSessionRecordingErrors[keyof GetBrowserSessionRecordingErrors];
|
|
914
|
+
type GetBrowserSessionRecordingResponses = {
|
|
915
|
+
/**
|
|
916
|
+
* Browser session recording retrieved successfully
|
|
917
|
+
*/
|
|
918
|
+
200: BrowserSessionRecordingResponse;
|
|
919
|
+
};
|
|
920
|
+
type GetBrowserSessionRecordingResponse = GetBrowserSessionRecordingResponses[keyof GetBrowserSessionRecordingResponses];
|
|
921
|
+
type GetAgentProfilesData = {
|
|
922
|
+
body?: never;
|
|
923
|
+
path?: never;
|
|
924
|
+
query?: {
|
|
925
|
+
/**
|
|
926
|
+
* The ID of the organization to filter by
|
|
927
|
+
*/
|
|
928
|
+
organization_id?: string;
|
|
929
|
+
};
|
|
930
|
+
url: '/agent-profiles';
|
|
931
|
+
};
|
|
932
|
+
type GetAgentProfilesErrors = {
|
|
933
|
+
/**
|
|
934
|
+
* Unauthorized - Authentication required
|
|
935
|
+
*/
|
|
936
|
+
401: ErrorResponse;
|
|
937
|
+
/**
|
|
938
|
+
* Forbidden - Insufficient permissions
|
|
939
|
+
*/
|
|
940
|
+
403: ErrorResponse;
|
|
941
|
+
/**
|
|
942
|
+
* Internal server error
|
|
943
|
+
*/
|
|
944
|
+
500: ErrorResponse;
|
|
945
|
+
};
|
|
946
|
+
type GetAgentProfilesError = GetAgentProfilesErrors[keyof GetAgentProfilesErrors];
|
|
947
|
+
type GetAgentProfilesResponses = {
|
|
948
|
+
/**
|
|
949
|
+
* List of agent profiles
|
|
950
|
+
*/
|
|
951
|
+
200: Array<AgentProfile>;
|
|
952
|
+
};
|
|
953
|
+
type GetAgentProfilesResponse = GetAgentProfilesResponses[keyof GetAgentProfilesResponses];
|
|
954
|
+
type CreateAgentProfileData = {
|
|
955
|
+
body: CreateAgentProfileRequest;
|
|
956
|
+
path?: never;
|
|
957
|
+
query?: never;
|
|
958
|
+
url: '/agent-profiles';
|
|
959
|
+
};
|
|
960
|
+
type CreateAgentProfileErrors = {
|
|
961
|
+
/**
|
|
962
|
+
* Bad request - Invalid input or profile name already exists
|
|
963
|
+
*/
|
|
964
|
+
400: ErrorResponse;
|
|
965
|
+
/**
|
|
966
|
+
* Unauthorized - Authentication required
|
|
967
|
+
*/
|
|
968
|
+
401: ErrorResponse;
|
|
969
|
+
/**
|
|
970
|
+
* Forbidden - Insufficient permissions
|
|
971
|
+
*/
|
|
972
|
+
403: ErrorResponse;
|
|
973
|
+
/**
|
|
974
|
+
* Internal server error
|
|
975
|
+
*/
|
|
976
|
+
500: ErrorResponse;
|
|
977
|
+
};
|
|
978
|
+
type CreateAgentProfileError = CreateAgentProfileErrors[keyof CreateAgentProfileErrors];
|
|
979
|
+
type CreateAgentProfileResponses = {
|
|
980
|
+
/**
|
|
981
|
+
* Agent profile created successfully
|
|
982
|
+
*/
|
|
983
|
+
201: AgentProfile;
|
|
984
|
+
};
|
|
985
|
+
type CreateAgentProfileResponse = CreateAgentProfileResponses[keyof CreateAgentProfileResponses];
|
|
986
|
+
type DeleteAgentProfileData = {
|
|
987
|
+
body?: never;
|
|
988
|
+
path: {
|
|
989
|
+
/**
|
|
990
|
+
* The ID of the agent profile
|
|
991
|
+
*/
|
|
992
|
+
profile_id: string;
|
|
993
|
+
};
|
|
994
|
+
query?: never;
|
|
995
|
+
url: '/agent-profiles/{profile_id}';
|
|
996
|
+
};
|
|
997
|
+
type DeleteAgentProfileErrors = {
|
|
998
|
+
/**
|
|
999
|
+
* Unauthorized - Authentication required
|
|
1000
|
+
*/
|
|
1001
|
+
401: ErrorResponse;
|
|
1002
|
+
/**
|
|
1003
|
+
* Forbidden - Insufficient permissions
|
|
1004
|
+
*/
|
|
1005
|
+
403: ErrorResponse;
|
|
1006
|
+
/**
|
|
1007
|
+
* Agent profile not found
|
|
1008
|
+
*/
|
|
1009
|
+
404: ErrorResponse;
|
|
1010
|
+
/**
|
|
1011
|
+
* Internal server error
|
|
1012
|
+
*/
|
|
1013
|
+
500: ErrorResponse;
|
|
1014
|
+
};
|
|
1015
|
+
type DeleteAgentProfileError = DeleteAgentProfileErrors[keyof DeleteAgentProfileErrors];
|
|
1016
|
+
type DeleteAgentProfileResponses = {
|
|
1017
|
+
/**
|
|
1018
|
+
* Agent profile deleted successfully
|
|
1019
|
+
*/
|
|
1020
|
+
200: {
|
|
1021
|
+
message?: string;
|
|
1022
|
+
};
|
|
1023
|
+
};
|
|
1024
|
+
type DeleteAgentProfileResponse = DeleteAgentProfileResponses[keyof DeleteAgentProfileResponses];
|
|
1025
|
+
type GetAgentProfileData = {
|
|
1026
|
+
body?: never;
|
|
1027
|
+
path: {
|
|
1028
|
+
/**
|
|
1029
|
+
* The ID of the agent profile
|
|
1030
|
+
*/
|
|
1031
|
+
profile_id: string;
|
|
1032
|
+
};
|
|
1033
|
+
query?: never;
|
|
1034
|
+
url: '/agent-profiles/{profile_id}';
|
|
1035
|
+
};
|
|
1036
|
+
type GetAgentProfileErrors = {
|
|
1037
|
+
/**
|
|
1038
|
+
* Unauthorized - Authentication required
|
|
1039
|
+
*/
|
|
1040
|
+
401: ErrorResponse;
|
|
1041
|
+
/**
|
|
1042
|
+
* Forbidden - Insufficient permissions
|
|
1043
|
+
*/
|
|
1044
|
+
403: ErrorResponse;
|
|
1045
|
+
/**
|
|
1046
|
+
* Agent profile not found
|
|
1047
|
+
*/
|
|
1048
|
+
404: ErrorResponse;
|
|
1049
|
+
/**
|
|
1050
|
+
* Internal server error
|
|
1051
|
+
*/
|
|
1052
|
+
500: ErrorResponse;
|
|
1053
|
+
};
|
|
1054
|
+
type GetAgentProfileError = GetAgentProfileErrors[keyof GetAgentProfileErrors];
|
|
1055
|
+
type GetAgentProfileResponses = {
|
|
1056
|
+
/**
|
|
1057
|
+
* Agent profile found
|
|
1058
|
+
*/
|
|
1059
|
+
200: AgentProfile;
|
|
1060
|
+
};
|
|
1061
|
+
type GetAgentProfileResponse = GetAgentProfileResponses[keyof GetAgentProfileResponses];
|
|
1062
|
+
type UpdateAgentProfileData = {
|
|
1063
|
+
body: UpdateAgentProfileRequest;
|
|
1064
|
+
path: {
|
|
1065
|
+
/**
|
|
1066
|
+
* The ID of the agent profile
|
|
1067
|
+
*/
|
|
1068
|
+
profile_id: string;
|
|
1069
|
+
};
|
|
1070
|
+
query?: never;
|
|
1071
|
+
url: '/agent-profiles/{profile_id}';
|
|
1072
|
+
};
|
|
1073
|
+
type UpdateAgentProfileErrors = {
|
|
1074
|
+
/**
|
|
1075
|
+
* Bad request - Invalid input
|
|
1076
|
+
*/
|
|
1077
|
+
400: ErrorResponse;
|
|
1078
|
+
/**
|
|
1079
|
+
* Unauthorized - Authentication required
|
|
1080
|
+
*/
|
|
1081
|
+
401: ErrorResponse;
|
|
1082
|
+
/**
|
|
1083
|
+
* Forbidden - Insufficient permissions
|
|
1084
|
+
*/
|
|
1085
|
+
403: ErrorResponse;
|
|
1086
|
+
/**
|
|
1087
|
+
* Agent profile not found
|
|
1088
|
+
*/
|
|
1089
|
+
404: ErrorResponse;
|
|
1090
|
+
/**
|
|
1091
|
+
* Internal server error
|
|
1092
|
+
*/
|
|
1093
|
+
500: ErrorResponse;
|
|
1094
|
+
};
|
|
1095
|
+
type UpdateAgentProfileError = UpdateAgentProfileErrors[keyof UpdateAgentProfileErrors];
|
|
1096
|
+
type UpdateAgentProfileResponses = {
|
|
1097
|
+
/**
|
|
1098
|
+
* Agent profile updated successfully
|
|
1099
|
+
*/
|
|
1100
|
+
200: AgentProfile;
|
|
1101
|
+
};
|
|
1102
|
+
type UpdateAgentProfileResponse = UpdateAgentProfileResponses[keyof UpdateAgentProfileResponses];
|
|
1103
|
+
type GetCredentialsPublicKeyData = {
|
|
1104
|
+
body?: never;
|
|
1105
|
+
path?: never;
|
|
1106
|
+
query?: never;
|
|
1107
|
+
url: '/credentials/public_key';
|
|
1108
|
+
};
|
|
1109
|
+
type GetCredentialsPublicKeyErrors = {
|
|
1110
|
+
/**
|
|
1111
|
+
* Public key not found
|
|
1112
|
+
*/
|
|
1113
|
+
404: unknown;
|
|
1114
|
+
};
|
|
1115
|
+
type GetCredentialsPublicKeyResponses = {
|
|
1116
|
+
/**
|
|
1117
|
+
* The public key for credentials
|
|
1118
|
+
*/
|
|
1119
|
+
200: string;
|
|
1120
|
+
};
|
|
1121
|
+
type GetCredentialsPublicKeyResponse = GetCredentialsPublicKeyResponses[keyof GetCredentialsPublicKeyResponses];
|
|
1122
|
+
type ClientOptions$1 = {
|
|
1123
|
+
baseUrl: 'https://odyssey.asteroid.ai/api/v1' | `${string}://${string}/api/v1` | (string & {});
|
|
1124
|
+
};
|
|
1125
|
+
|
|
1126
|
+
type types_gen$1_AgentExecutionRequest = AgentExecutionRequest;
|
|
1127
|
+
type types_gen$1_AgentProfile = AgentProfile;
|
|
1128
|
+
type types_gen$1_BrowserSessionRecordingResponse = BrowserSessionRecordingResponse;
|
|
1129
|
+
type types_gen$1_CountryCode = CountryCode;
|
|
1130
|
+
type types_gen$1_CreateAgentProfileData = CreateAgentProfileData;
|
|
1131
|
+
type types_gen$1_CreateAgentProfileError = CreateAgentProfileError;
|
|
1132
|
+
type types_gen$1_CreateAgentProfileErrors = CreateAgentProfileErrors;
|
|
1133
|
+
type types_gen$1_CreateAgentProfileRequest = CreateAgentProfileRequest;
|
|
1134
|
+
type types_gen$1_CreateAgentProfileResponse = CreateAgentProfileResponse;
|
|
1135
|
+
type types_gen$1_CreateAgentProfileResponses = CreateAgentProfileResponses;
|
|
1136
|
+
type types_gen$1_Credential = Credential;
|
|
1137
|
+
type types_gen$1_DeleteAgentProfileData = DeleteAgentProfileData;
|
|
1138
|
+
type types_gen$1_DeleteAgentProfileError = DeleteAgentProfileError;
|
|
1139
|
+
type types_gen$1_DeleteAgentProfileErrors = DeleteAgentProfileErrors;
|
|
1140
|
+
type types_gen$1_DeleteAgentProfileResponse = DeleteAgentProfileResponse;
|
|
1141
|
+
type types_gen$1_DeleteAgentProfileResponses = DeleteAgentProfileResponses;
|
|
1142
|
+
type types_gen$1_ErrorResponse = ErrorResponse;
|
|
1143
|
+
type types_gen$1_ExecuteAgentData = ExecuteAgentData;
|
|
1144
|
+
type types_gen$1_ExecuteAgentError = ExecuteAgentError;
|
|
1145
|
+
type types_gen$1_ExecuteAgentErrors = ExecuteAgentErrors;
|
|
1146
|
+
type types_gen$1_ExecuteAgentResponse = ExecuteAgentResponse;
|
|
1147
|
+
type types_gen$1_ExecuteAgentResponses = ExecuteAgentResponses;
|
|
1148
|
+
type types_gen$1_ExecuteAgentStructuredData = ExecuteAgentStructuredData;
|
|
1149
|
+
type types_gen$1_ExecuteAgentStructuredError = ExecuteAgentStructuredError;
|
|
1150
|
+
type types_gen$1_ExecuteAgentStructuredErrors = ExecuteAgentStructuredErrors;
|
|
1151
|
+
type types_gen$1_ExecuteAgentStructuredResponse = ExecuteAgentStructuredResponse;
|
|
1152
|
+
type types_gen$1_ExecuteAgentStructuredResponses = ExecuteAgentStructuredResponses;
|
|
1153
|
+
type types_gen$1_ExecutionResponse = ExecutionResponse;
|
|
1154
|
+
type types_gen$1_ExecutionResult = ExecutionResult;
|
|
1155
|
+
type types_gen$1_ExecutionResultResponse = ExecutionResultResponse;
|
|
1156
|
+
type types_gen$1_ExecutionStatusResponse = ExecutionStatusResponse;
|
|
1157
|
+
type types_gen$1_GetAgentProfileData = GetAgentProfileData;
|
|
1158
|
+
type types_gen$1_GetAgentProfileError = GetAgentProfileError;
|
|
1159
|
+
type types_gen$1_GetAgentProfileErrors = GetAgentProfileErrors;
|
|
1160
|
+
type types_gen$1_GetAgentProfileResponse = GetAgentProfileResponse;
|
|
1161
|
+
type types_gen$1_GetAgentProfileResponses = GetAgentProfileResponses;
|
|
1162
|
+
type types_gen$1_GetAgentProfilesData = GetAgentProfilesData;
|
|
1163
|
+
type types_gen$1_GetAgentProfilesError = GetAgentProfilesError;
|
|
1164
|
+
type types_gen$1_GetAgentProfilesErrors = GetAgentProfilesErrors;
|
|
1165
|
+
type types_gen$1_GetAgentProfilesResponse = GetAgentProfilesResponse;
|
|
1166
|
+
type types_gen$1_GetAgentProfilesResponses = GetAgentProfilesResponses;
|
|
1167
|
+
type types_gen$1_GetBrowserSessionRecordingData = GetBrowserSessionRecordingData;
|
|
1168
|
+
type types_gen$1_GetBrowserSessionRecordingError = GetBrowserSessionRecordingError;
|
|
1169
|
+
type types_gen$1_GetBrowserSessionRecordingErrors = GetBrowserSessionRecordingErrors;
|
|
1170
|
+
type types_gen$1_GetBrowserSessionRecordingResponse = GetBrowserSessionRecordingResponse;
|
|
1171
|
+
type types_gen$1_GetBrowserSessionRecordingResponses = GetBrowserSessionRecordingResponses;
|
|
1172
|
+
type types_gen$1_GetCredentialsPublicKeyData = GetCredentialsPublicKeyData;
|
|
1173
|
+
type types_gen$1_GetCredentialsPublicKeyErrors = GetCredentialsPublicKeyErrors;
|
|
1174
|
+
type types_gen$1_GetCredentialsPublicKeyResponse = GetCredentialsPublicKeyResponse;
|
|
1175
|
+
type types_gen$1_GetCredentialsPublicKeyResponses = GetCredentialsPublicKeyResponses;
|
|
1176
|
+
type types_gen$1_GetExecutionResultData = GetExecutionResultData;
|
|
1177
|
+
type types_gen$1_GetExecutionResultError = GetExecutionResultError;
|
|
1178
|
+
type types_gen$1_GetExecutionResultErrors = GetExecutionResultErrors;
|
|
1179
|
+
type types_gen$1_GetExecutionResultResponse = GetExecutionResultResponse;
|
|
1180
|
+
type types_gen$1_GetExecutionResultResponses = GetExecutionResultResponses;
|
|
1181
|
+
type types_gen$1_GetExecutionStatusData = GetExecutionStatusData;
|
|
1182
|
+
type types_gen$1_GetExecutionStatusError = GetExecutionStatusError;
|
|
1183
|
+
type types_gen$1_GetExecutionStatusErrors = GetExecutionStatusErrors;
|
|
1184
|
+
type types_gen$1_GetExecutionStatusResponse = GetExecutionStatusResponse;
|
|
1185
|
+
type types_gen$1_GetExecutionStatusResponses = GetExecutionStatusResponses;
|
|
1186
|
+
type types_gen$1_GetOpenApiData = GetOpenApiData;
|
|
1187
|
+
type types_gen$1_GetOpenApiResponses = GetOpenApiResponses;
|
|
1188
|
+
type types_gen$1_HealthCheckData = HealthCheckData;
|
|
1189
|
+
type types_gen$1_HealthCheckError = HealthCheckError;
|
|
1190
|
+
type types_gen$1_HealthCheckErrors = HealthCheckErrors;
|
|
1191
|
+
type types_gen$1_HealthCheckResponse = HealthCheckResponse;
|
|
1192
|
+
type types_gen$1_HealthCheckResponses = HealthCheckResponses;
|
|
1193
|
+
type types_gen$1_ProxyType = ProxyType;
|
|
1194
|
+
type types_gen$1_Status = Status;
|
|
1195
|
+
type types_gen$1_StructuredAgentExecutionRequest = StructuredAgentExecutionRequest;
|
|
1196
|
+
type types_gen$1_UpdateAgentProfileData = UpdateAgentProfileData;
|
|
1197
|
+
type types_gen$1_UpdateAgentProfileError = UpdateAgentProfileError;
|
|
1198
|
+
type types_gen$1_UpdateAgentProfileErrors = UpdateAgentProfileErrors;
|
|
1199
|
+
type types_gen$1_UpdateAgentProfileRequest = UpdateAgentProfileRequest;
|
|
1200
|
+
type types_gen$1_UpdateAgentProfileResponse = UpdateAgentProfileResponse;
|
|
1201
|
+
type types_gen$1_UpdateAgentProfileResponses = UpdateAgentProfileResponses;
|
|
1202
|
+
type types_gen$1_UploadExecutionFilesData = UploadExecutionFilesData;
|
|
1203
|
+
type types_gen$1_UploadExecutionFilesError = UploadExecutionFilesError;
|
|
1204
|
+
type types_gen$1_UploadExecutionFilesErrors = UploadExecutionFilesErrors;
|
|
1205
|
+
type types_gen$1_UploadExecutionFilesResponse = UploadExecutionFilesResponse;
|
|
1206
|
+
type types_gen$1_UploadExecutionFilesResponses = UploadExecutionFilesResponses;
|
|
1207
|
+
declare namespace types_gen$1 {
|
|
1208
|
+
export type { types_gen$1_AgentExecutionRequest as AgentExecutionRequest, types_gen$1_AgentProfile as AgentProfile, types_gen$1_BrowserSessionRecordingResponse as BrowserSessionRecordingResponse, ClientOptions$1 as ClientOptions, types_gen$1_CountryCode as CountryCode, types_gen$1_CreateAgentProfileData as CreateAgentProfileData, types_gen$1_CreateAgentProfileError as CreateAgentProfileError, types_gen$1_CreateAgentProfileErrors as CreateAgentProfileErrors, types_gen$1_CreateAgentProfileRequest as CreateAgentProfileRequest, types_gen$1_CreateAgentProfileResponse as CreateAgentProfileResponse, types_gen$1_CreateAgentProfileResponses as CreateAgentProfileResponses, types_gen$1_Credential as Credential, types_gen$1_DeleteAgentProfileData as DeleteAgentProfileData, types_gen$1_DeleteAgentProfileError as DeleteAgentProfileError, types_gen$1_DeleteAgentProfileErrors as DeleteAgentProfileErrors, types_gen$1_DeleteAgentProfileResponse as DeleteAgentProfileResponse, types_gen$1_DeleteAgentProfileResponses as DeleteAgentProfileResponses, types_gen$1_ErrorResponse as ErrorResponse, types_gen$1_ExecuteAgentData as ExecuteAgentData, types_gen$1_ExecuteAgentError as ExecuteAgentError, types_gen$1_ExecuteAgentErrors as ExecuteAgentErrors, types_gen$1_ExecuteAgentResponse as ExecuteAgentResponse, types_gen$1_ExecuteAgentResponses as ExecuteAgentResponses, types_gen$1_ExecuteAgentStructuredData as ExecuteAgentStructuredData, types_gen$1_ExecuteAgentStructuredError as ExecuteAgentStructuredError, types_gen$1_ExecuteAgentStructuredErrors as ExecuteAgentStructuredErrors, types_gen$1_ExecuteAgentStructuredResponse as ExecuteAgentStructuredResponse, types_gen$1_ExecuteAgentStructuredResponses as ExecuteAgentStructuredResponses, types_gen$1_ExecutionResponse as ExecutionResponse, types_gen$1_ExecutionResult as ExecutionResult, types_gen$1_ExecutionResultResponse as ExecutionResultResponse, types_gen$1_ExecutionStatusResponse as ExecutionStatusResponse, types_gen$1_GetAgentProfileData as GetAgentProfileData, types_gen$1_GetAgentProfileError as GetAgentProfileError, types_gen$1_GetAgentProfileErrors as GetAgentProfileErrors, types_gen$1_GetAgentProfileResponse as GetAgentProfileResponse, types_gen$1_GetAgentProfileResponses as GetAgentProfileResponses, types_gen$1_GetAgentProfilesData as GetAgentProfilesData, types_gen$1_GetAgentProfilesError as GetAgentProfilesError, types_gen$1_GetAgentProfilesErrors as GetAgentProfilesErrors, types_gen$1_GetAgentProfilesResponse as GetAgentProfilesResponse, types_gen$1_GetAgentProfilesResponses as GetAgentProfilesResponses, types_gen$1_GetBrowserSessionRecordingData as GetBrowserSessionRecordingData, types_gen$1_GetBrowserSessionRecordingError as GetBrowserSessionRecordingError, types_gen$1_GetBrowserSessionRecordingErrors as GetBrowserSessionRecordingErrors, types_gen$1_GetBrowserSessionRecordingResponse as GetBrowserSessionRecordingResponse, types_gen$1_GetBrowserSessionRecordingResponses as GetBrowserSessionRecordingResponses, types_gen$1_GetCredentialsPublicKeyData as GetCredentialsPublicKeyData, types_gen$1_GetCredentialsPublicKeyErrors as GetCredentialsPublicKeyErrors, types_gen$1_GetCredentialsPublicKeyResponse as GetCredentialsPublicKeyResponse, types_gen$1_GetCredentialsPublicKeyResponses as GetCredentialsPublicKeyResponses, types_gen$1_GetExecutionResultData as GetExecutionResultData, types_gen$1_GetExecutionResultError as GetExecutionResultError, types_gen$1_GetExecutionResultErrors as GetExecutionResultErrors, types_gen$1_GetExecutionResultResponse as GetExecutionResultResponse, types_gen$1_GetExecutionResultResponses as GetExecutionResultResponses, types_gen$1_GetExecutionStatusData as GetExecutionStatusData, types_gen$1_GetExecutionStatusError as GetExecutionStatusError, types_gen$1_GetExecutionStatusErrors as GetExecutionStatusErrors, types_gen$1_GetExecutionStatusResponse as GetExecutionStatusResponse, types_gen$1_GetExecutionStatusResponses as GetExecutionStatusResponses, types_gen$1_GetOpenApiData as GetOpenApiData, types_gen$1_GetOpenApiResponses as GetOpenApiResponses, types_gen$1_HealthCheckData as HealthCheckData, types_gen$1_HealthCheckError as HealthCheckError, types_gen$1_HealthCheckErrors as HealthCheckErrors, types_gen$1_HealthCheckResponse as HealthCheckResponse, types_gen$1_HealthCheckResponses as HealthCheckResponses, types_gen$1_ProxyType as ProxyType, types_gen$1_Status as Status, types_gen$1_StructuredAgentExecutionRequest as StructuredAgentExecutionRequest, types_gen$1_UpdateAgentProfileData as UpdateAgentProfileData, types_gen$1_UpdateAgentProfileError as UpdateAgentProfileError, types_gen$1_UpdateAgentProfileErrors as UpdateAgentProfileErrors, types_gen$1_UpdateAgentProfileRequest as UpdateAgentProfileRequest, types_gen$1_UpdateAgentProfileResponse as UpdateAgentProfileResponse, types_gen$1_UpdateAgentProfileResponses as UpdateAgentProfileResponses, types_gen$1_UploadExecutionFilesData as UploadExecutionFilesData, types_gen$1_UploadExecutionFilesError as UploadExecutionFilesError, types_gen$1_UploadExecutionFilesErrors as UploadExecutionFilesErrors, types_gen$1_UploadExecutionFilesResponse as UploadExecutionFilesResponse, types_gen$1_UploadExecutionFilesResponses as UploadExecutionFilesResponses };
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
type ActivityPayloadUnionActionCompleted = {
|
|
1212
|
+
activityType: 'action_completed';
|
|
1213
|
+
data: ExecutionActivityActionCompletedPayload;
|
|
1214
|
+
};
|
|
1215
|
+
type ActivityPayloadUnionActionFailed = {
|
|
1216
|
+
activityType: 'action_failed';
|
|
1217
|
+
data: ExecutionActivityActionFailedPayload;
|
|
1218
|
+
};
|
|
1219
|
+
type ActivityPayloadUnionActionStarted = {
|
|
1220
|
+
activityType: 'action_started';
|
|
1221
|
+
data: ExecutionActivityActionStartedPayload;
|
|
1222
|
+
};
|
|
1223
|
+
type ActivityPayloadUnionGeneric = {
|
|
1224
|
+
activityType: 'generic';
|
|
1225
|
+
data: ExecutionActivityGenericPayload;
|
|
1226
|
+
};
|
|
1227
|
+
type ActivityPayloadUnionStatusChanged = {
|
|
1228
|
+
activityType: 'status_changed';
|
|
1229
|
+
data: ExecutionActivityStatusChangedPayload;
|
|
1230
|
+
};
|
|
1231
|
+
type ActivityPayloadUnionStepCompleted = {
|
|
1232
|
+
activityType: 'step_completed';
|
|
1233
|
+
data: ExecutionActivityStepCompletedPayload;
|
|
1234
|
+
};
|
|
1235
|
+
type ActivityPayloadUnionStepStarted = {
|
|
1236
|
+
activityType: 'step_started';
|
|
1237
|
+
data: ExecutionActivityStepStartedPayload;
|
|
1238
|
+
};
|
|
1239
|
+
type ActivityPayloadUnionTerminal = {
|
|
1240
|
+
activityType: 'terminal';
|
|
1241
|
+
data: ExecutionTerminalPayload;
|
|
1242
|
+
};
|
|
1243
|
+
type ActivityPayloadUnionTransitionedNode = {
|
|
1244
|
+
activityType: 'transitioned_node';
|
|
1245
|
+
data: ExecutionActivityTransitionedNodePayload;
|
|
1246
|
+
};
|
|
1247
|
+
type ActivityPayloadUnionUserMessageReceived = {
|
|
1248
|
+
activityType: 'user_message_received';
|
|
1249
|
+
data: ExecutionActivityUserMessageReceivedPayload;
|
|
1250
|
+
};
|
|
1251
|
+
type _Error = {
|
|
1252
|
+
code: number;
|
|
1253
|
+
message: string;
|
|
1254
|
+
};
|
|
1255
|
+
type ExecutionActivity = {
|
|
1256
|
+
id: Uuid;
|
|
1257
|
+
payload: ExecutionActivityPayloadUnion;
|
|
1258
|
+
executionId: Uuid;
|
|
1259
|
+
timestamp: string;
|
|
1260
|
+
};
|
|
1261
|
+
type ExecutionActivityActionCompletedPayload = {
|
|
1262
|
+
message: string;
|
|
1263
|
+
};
|
|
1264
|
+
type ExecutionActivityActionFailedPayload = {
|
|
1265
|
+
message: string;
|
|
1266
|
+
};
|
|
1267
|
+
type ExecutionActivityActionStartedPayload = {
|
|
1268
|
+
message: string;
|
|
1269
|
+
};
|
|
1270
|
+
type ExecutionActivityGenericPayload = {
|
|
1271
|
+
message: string;
|
|
1272
|
+
};
|
|
1273
|
+
type ExecutionActivityPayloadUnion = ({
|
|
1274
|
+
activityType: 'terminal';
|
|
1275
|
+
} & ActivityPayloadUnionTerminal) | ({
|
|
1276
|
+
activityType: 'generic';
|
|
1277
|
+
} & ActivityPayloadUnionGeneric) | ({
|
|
1278
|
+
activityType: 'step_started';
|
|
1279
|
+
} & ActivityPayloadUnionStepStarted) | ({
|
|
1280
|
+
activityType: 'step_completed';
|
|
1281
|
+
} & ActivityPayloadUnionStepCompleted) | ({
|
|
1282
|
+
activityType: 'transitioned_node';
|
|
1283
|
+
} & ActivityPayloadUnionTransitionedNode) | ({
|
|
1284
|
+
activityType: 'status_changed';
|
|
1285
|
+
} & ActivityPayloadUnionStatusChanged) | ({
|
|
1286
|
+
activityType: 'action_started';
|
|
1287
|
+
} & ActivityPayloadUnionActionStarted) | ({
|
|
1288
|
+
activityType: 'action_completed';
|
|
1289
|
+
} & ActivityPayloadUnionActionCompleted) | ({
|
|
1290
|
+
activityType: 'action_failed';
|
|
1291
|
+
} & ActivityPayloadUnionActionFailed) | ({
|
|
1292
|
+
activityType: 'user_message_received';
|
|
1293
|
+
} & ActivityPayloadUnionUserMessageReceived);
|
|
1294
|
+
type ExecutionActivityStatusChangedPayload = {
|
|
1295
|
+
status: ExecutionStatus;
|
|
1296
|
+
};
|
|
1297
|
+
type ExecutionActivityStepCompletedPayload = {
|
|
1298
|
+
stepNumber: number;
|
|
1299
|
+
};
|
|
1300
|
+
type ExecutionActivityStepStartedPayload = {
|
|
1301
|
+
stepNumber: number;
|
|
1302
|
+
};
|
|
1303
|
+
type ExecutionActivityTransitionedNodePayload = {
|
|
1304
|
+
newNodeUUID: Uuid;
|
|
1305
|
+
newNodeName: string;
|
|
1306
|
+
};
|
|
1307
|
+
type ExecutionActivityUserMessageReceivedPayload = {
|
|
1308
|
+
message: string;
|
|
1309
|
+
userUUID: Uuid;
|
|
1310
|
+
};
|
|
1311
|
+
type ExecutionStatus = 'starting' | 'running' | 'paused' | 'awaiting_confirmation' | 'completed' | 'cancelled' | 'failed' | 'paused_by_agent';
|
|
1312
|
+
type ExecutionTerminalPayload = {
|
|
1313
|
+
reason: 'unsubscribe' | 'complete' | 'error';
|
|
1314
|
+
message?: string;
|
|
1315
|
+
};
|
|
1316
|
+
type ExecutionUserMessagesAddTextBody = {
|
|
1317
|
+
message: string;
|
|
1318
|
+
};
|
|
1319
|
+
type FilePart = Blob | File;
|
|
1320
|
+
type Versions = 'frontend' | 'v2';
|
|
1321
|
+
type Uuid = string;
|
|
1322
|
+
type ActivitiesGetData = {
|
|
1323
|
+
body?: never;
|
|
1324
|
+
path: {
|
|
1325
|
+
/**
|
|
1326
|
+
* The unique identifier of the execution
|
|
1327
|
+
*/
|
|
1328
|
+
executionId: Uuid;
|
|
1329
|
+
};
|
|
1330
|
+
query?: {
|
|
1331
|
+
/**
|
|
1332
|
+
* Sort order for activities by timestamp
|
|
1333
|
+
*/
|
|
1334
|
+
order?: 'asc' | 'desc';
|
|
1335
|
+
/**
|
|
1336
|
+
* Maximum number of activities to return
|
|
1337
|
+
*/
|
|
1338
|
+
limit?: number;
|
|
1339
|
+
};
|
|
1340
|
+
url: '/executions/{executionId}/activities';
|
|
1341
|
+
};
|
|
1342
|
+
type ActivitiesGetErrors = {
|
|
1343
|
+
/**
|
|
1344
|
+
* An unexpected error response.
|
|
1345
|
+
*/
|
|
1346
|
+
default: _Error;
|
|
1347
|
+
};
|
|
1348
|
+
type ActivitiesGetError = ActivitiesGetErrors[keyof ActivitiesGetErrors];
|
|
1349
|
+
type ActivitiesGetResponses = {
|
|
1350
|
+
/**
|
|
1351
|
+
* The request has succeeded.
|
|
1352
|
+
*/
|
|
1353
|
+
200: Array<ExecutionActivity>;
|
|
1354
|
+
};
|
|
1355
|
+
type ActivitiesGetResponse = ActivitiesGetResponses[keyof ActivitiesGetResponses];
|
|
1356
|
+
type UserMessagesAddData = {
|
|
1357
|
+
/**
|
|
1358
|
+
* The message content to send
|
|
1359
|
+
*/
|
|
1360
|
+
body: ExecutionUserMessagesAddTextBody;
|
|
1361
|
+
path: {
|
|
1362
|
+
/**
|
|
1363
|
+
* The unique identifier of the execution
|
|
1364
|
+
*/
|
|
1365
|
+
executionId: Uuid;
|
|
1366
|
+
};
|
|
1367
|
+
query?: never;
|
|
1368
|
+
url: '/executions/{executionId}/user-messages';
|
|
1369
|
+
};
|
|
1370
|
+
type UserMessagesAddErrors = {
|
|
1371
|
+
/**
|
|
1372
|
+
* An unexpected error response.
|
|
1373
|
+
*/
|
|
1374
|
+
default: _Error;
|
|
1375
|
+
};
|
|
1376
|
+
type UserMessagesAddError = UserMessagesAddErrors[keyof UserMessagesAddErrors];
|
|
1377
|
+
type UserMessagesAddResponses = {
|
|
1378
|
+
/**
|
|
1379
|
+
* The request has succeeded and a new resource has been created as a result.
|
|
1380
|
+
*/
|
|
1381
|
+
201: 'User message added.';
|
|
1382
|
+
};
|
|
1383
|
+
type UserMessagesAddResponse = UserMessagesAddResponses[keyof UserMessagesAddResponses];
|
|
1384
|
+
type ClientOptions = {
|
|
1385
|
+
baseUrl: 'https://odyssey.asteroid.ai/agents/{version}' | (string & {});
|
|
1386
|
+
};
|
|
1387
|
+
|
|
1388
|
+
type types_gen_ActivitiesGetData = ActivitiesGetData;
|
|
1389
|
+
type types_gen_ActivitiesGetError = ActivitiesGetError;
|
|
1390
|
+
type types_gen_ActivitiesGetErrors = ActivitiesGetErrors;
|
|
1391
|
+
type types_gen_ActivitiesGetResponse = ActivitiesGetResponse;
|
|
1392
|
+
type types_gen_ActivitiesGetResponses = ActivitiesGetResponses;
|
|
1393
|
+
type types_gen_ActivityPayloadUnionActionCompleted = ActivityPayloadUnionActionCompleted;
|
|
1394
|
+
type types_gen_ActivityPayloadUnionActionFailed = ActivityPayloadUnionActionFailed;
|
|
1395
|
+
type types_gen_ActivityPayloadUnionActionStarted = ActivityPayloadUnionActionStarted;
|
|
1396
|
+
type types_gen_ActivityPayloadUnionGeneric = ActivityPayloadUnionGeneric;
|
|
1397
|
+
type types_gen_ActivityPayloadUnionStatusChanged = ActivityPayloadUnionStatusChanged;
|
|
1398
|
+
type types_gen_ActivityPayloadUnionStepCompleted = ActivityPayloadUnionStepCompleted;
|
|
1399
|
+
type types_gen_ActivityPayloadUnionStepStarted = ActivityPayloadUnionStepStarted;
|
|
1400
|
+
type types_gen_ActivityPayloadUnionTerminal = ActivityPayloadUnionTerminal;
|
|
1401
|
+
type types_gen_ActivityPayloadUnionTransitionedNode = ActivityPayloadUnionTransitionedNode;
|
|
1402
|
+
type types_gen_ActivityPayloadUnionUserMessageReceived = ActivityPayloadUnionUserMessageReceived;
|
|
1403
|
+
type types_gen_ClientOptions = ClientOptions;
|
|
1404
|
+
type types_gen_ExecutionActivity = ExecutionActivity;
|
|
1405
|
+
type types_gen_ExecutionActivityActionCompletedPayload = ExecutionActivityActionCompletedPayload;
|
|
1406
|
+
type types_gen_ExecutionActivityActionFailedPayload = ExecutionActivityActionFailedPayload;
|
|
1407
|
+
type types_gen_ExecutionActivityActionStartedPayload = ExecutionActivityActionStartedPayload;
|
|
1408
|
+
type types_gen_ExecutionActivityGenericPayload = ExecutionActivityGenericPayload;
|
|
1409
|
+
type types_gen_ExecutionActivityPayloadUnion = ExecutionActivityPayloadUnion;
|
|
1410
|
+
type types_gen_ExecutionActivityStatusChangedPayload = ExecutionActivityStatusChangedPayload;
|
|
1411
|
+
type types_gen_ExecutionActivityStepCompletedPayload = ExecutionActivityStepCompletedPayload;
|
|
1412
|
+
type types_gen_ExecutionActivityStepStartedPayload = ExecutionActivityStepStartedPayload;
|
|
1413
|
+
type types_gen_ExecutionActivityTransitionedNodePayload = ExecutionActivityTransitionedNodePayload;
|
|
1414
|
+
type types_gen_ExecutionActivityUserMessageReceivedPayload = ExecutionActivityUserMessageReceivedPayload;
|
|
1415
|
+
type types_gen_ExecutionStatus = ExecutionStatus;
|
|
1416
|
+
type types_gen_ExecutionTerminalPayload = ExecutionTerminalPayload;
|
|
1417
|
+
type types_gen_ExecutionUserMessagesAddTextBody = ExecutionUserMessagesAddTextBody;
|
|
1418
|
+
type types_gen_FilePart = FilePart;
|
|
1419
|
+
type types_gen_UserMessagesAddData = UserMessagesAddData;
|
|
1420
|
+
type types_gen_UserMessagesAddError = UserMessagesAddError;
|
|
1421
|
+
type types_gen_UserMessagesAddErrors = UserMessagesAddErrors;
|
|
1422
|
+
type types_gen_UserMessagesAddResponse = UserMessagesAddResponse;
|
|
1423
|
+
type types_gen_UserMessagesAddResponses = UserMessagesAddResponses;
|
|
1424
|
+
type types_gen_Uuid = Uuid;
|
|
1425
|
+
type types_gen_Versions = Versions;
|
|
1426
|
+
type types_gen__Error = _Error;
|
|
1427
|
+
declare namespace types_gen {
|
|
1428
|
+
export type { types_gen_ActivitiesGetData as ActivitiesGetData, types_gen_ActivitiesGetError as ActivitiesGetError, types_gen_ActivitiesGetErrors as ActivitiesGetErrors, types_gen_ActivitiesGetResponse as ActivitiesGetResponse, types_gen_ActivitiesGetResponses as ActivitiesGetResponses, types_gen_ActivityPayloadUnionActionCompleted as ActivityPayloadUnionActionCompleted, types_gen_ActivityPayloadUnionActionFailed as ActivityPayloadUnionActionFailed, types_gen_ActivityPayloadUnionActionStarted as ActivityPayloadUnionActionStarted, types_gen_ActivityPayloadUnionGeneric as ActivityPayloadUnionGeneric, types_gen_ActivityPayloadUnionStatusChanged as ActivityPayloadUnionStatusChanged, types_gen_ActivityPayloadUnionStepCompleted as ActivityPayloadUnionStepCompleted, types_gen_ActivityPayloadUnionStepStarted as ActivityPayloadUnionStepStarted, types_gen_ActivityPayloadUnionTerminal as ActivityPayloadUnionTerminal, types_gen_ActivityPayloadUnionTransitionedNode as ActivityPayloadUnionTransitionedNode, types_gen_ActivityPayloadUnionUserMessageReceived as ActivityPayloadUnionUserMessageReceived, types_gen_ClientOptions as ClientOptions, types_gen_ExecutionActivity as ExecutionActivity, types_gen_ExecutionActivityActionCompletedPayload as ExecutionActivityActionCompletedPayload, types_gen_ExecutionActivityActionFailedPayload as ExecutionActivityActionFailedPayload, types_gen_ExecutionActivityActionStartedPayload as ExecutionActivityActionStartedPayload, types_gen_ExecutionActivityGenericPayload as ExecutionActivityGenericPayload, types_gen_ExecutionActivityPayloadUnion as ExecutionActivityPayloadUnion, types_gen_ExecutionActivityStatusChangedPayload as ExecutionActivityStatusChangedPayload, types_gen_ExecutionActivityStepCompletedPayload as ExecutionActivityStepCompletedPayload, types_gen_ExecutionActivityStepStartedPayload as ExecutionActivityStepStartedPayload, types_gen_ExecutionActivityTransitionedNodePayload as ExecutionActivityTransitionedNodePayload, types_gen_ExecutionActivityUserMessageReceivedPayload as ExecutionActivityUserMessageReceivedPayload, types_gen_ExecutionStatus as ExecutionStatus, types_gen_ExecutionTerminalPayload as ExecutionTerminalPayload, types_gen_ExecutionUserMessagesAddTextBody as ExecutionUserMessagesAddTextBody, types_gen_FilePart as FilePart, types_gen_UserMessagesAddData as UserMessagesAddData, types_gen_UserMessagesAddError as UserMessagesAddError, types_gen_UserMessagesAddErrors as UserMessagesAddErrors, types_gen_UserMessagesAddResponse as UserMessagesAddResponse, types_gen_UserMessagesAddResponses as UserMessagesAddResponses, types_gen_Uuid as Uuid, types_gen_Versions as Versions, types_gen__Error as _Error };
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
type Options$1<TData extends TDataShape$1 = TDataShape$1, ThrowOnError extends boolean = boolean> = Options$3<TData, ThrowOnError> & {
|
|
1432
|
+
/**
|
|
1433
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
1434
|
+
* individual options. This might be also useful if you want to implement a
|
|
1435
|
+
* custom client.
|
|
1436
|
+
*/
|
|
1437
|
+
client?: Client$2;
|
|
1438
|
+
/**
|
|
1439
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
1440
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
1441
|
+
*/
|
|
1442
|
+
meta?: Record<string, unknown>;
|
|
1443
|
+
};
|
|
1444
|
+
/**
|
|
1445
|
+
* Retrieve execution activities
|
|
1446
|
+
* Get activities for an execution
|
|
1447
|
+
*/
|
|
1448
|
+
declare const activitiesGet: <ThrowOnError extends boolean = false>(options: Options$1<ActivitiesGetData, ThrowOnError>) => RequestResult$1<ActivitiesGetResponses, ActivitiesGetErrors, ThrowOnError, "fields">;
|
|
1449
|
+
/**
|
|
1450
|
+
* Send user message to execution
|
|
1451
|
+
* Add a user message to an execution
|
|
1452
|
+
*/
|
|
1453
|
+
declare const userMessagesAdd: <ThrowOnError extends boolean = false>(options: Options$1<UserMessagesAddData, ThrowOnError>) => RequestResult$1<UserMessagesAddResponses, UserMessagesAddErrors, ThrowOnError, "fields">;
|
|
1454
|
+
|
|
1455
|
+
declare const sdk_gen$1_activitiesGet: typeof activitiesGet;
|
|
1456
|
+
declare const sdk_gen$1_userMessagesAdd: typeof userMessagesAdd;
|
|
1457
|
+
declare namespace sdk_gen$1 {
|
|
1458
|
+
export { type Options$1 as Options, sdk_gen$1_activitiesGet as activitiesGet, sdk_gen$1_userMessagesAdd as userMessagesAdd };
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1461
|
+
type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$2<TData, ThrowOnError> & {
|
|
1462
|
+
/**
|
|
1463
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
1464
|
+
* individual options. This might be also useful if you want to implement a
|
|
1465
|
+
* custom client.
|
|
1466
|
+
*/
|
|
1467
|
+
client?: Client;
|
|
1468
|
+
/**
|
|
1469
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
1470
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
1471
|
+
*/
|
|
1472
|
+
meta?: Record<string, unknown>;
|
|
1473
|
+
};
|
|
1474
|
+
/**
|
|
1475
|
+
* Get the OpenAPI schema
|
|
1476
|
+
*/
|
|
1477
|
+
declare const getOpenApi: <ThrowOnError extends boolean = false>(options?: Options<GetOpenApiData, ThrowOnError>) => RequestResult<GetOpenApiResponses, unknown, ThrowOnError, "fields">;
|
|
1478
|
+
/**
|
|
1479
|
+
* Upload files to an execution
|
|
1480
|
+
*/
|
|
1481
|
+
declare const uploadExecutionFiles$1: <ThrowOnError extends boolean = false>(options: Options<UploadExecutionFilesData, ThrowOnError>) => RequestResult<UploadExecutionFilesResponses, UploadExecutionFilesErrors, ThrowOnError, "fields">;
|
|
1482
|
+
/**
|
|
1483
|
+
* Check the health of the API
|
|
1484
|
+
*/
|
|
1485
|
+
declare const healthCheck: <ThrowOnError extends boolean = false>(options?: Options<HealthCheckData, ThrowOnError>) => RequestResult<HealthCheckResponses, HealthCheckErrors, ThrowOnError, "fields">;
|
|
1486
|
+
/**
|
|
1487
|
+
* Execute an agent
|
|
1488
|
+
* Executes an agent with the provided parameters
|
|
1489
|
+
* @deprecated
|
|
1490
|
+
*/
|
|
1491
|
+
declare const executeAgent$1: <ThrowOnError extends boolean = false>(options: Options<ExecuteAgentData, ThrowOnError>) => RequestResult<ExecuteAgentResponses, ExecuteAgentErrors, ThrowOnError, "fields">;
|
|
1492
|
+
/**
|
|
1493
|
+
* Execute an agent with structured parameters
|
|
1494
|
+
* Executes an agent with structured parameters including optional agent profile configuration. This is the recommended method for new integrations.
|
|
1495
|
+
*/
|
|
1496
|
+
declare const executeAgentStructured: <ThrowOnError extends boolean = false>(options: Options<ExecuteAgentStructuredData, ThrowOnError>) => RequestResult<ExecuteAgentStructuredResponses, ExecuteAgentStructuredErrors, ThrowOnError, "fields">;
|
|
1497
|
+
/**
|
|
1498
|
+
* Get execution status
|
|
1499
|
+
*/
|
|
1500
|
+
declare const getExecutionStatus$1: <ThrowOnError extends boolean = false>(options: Options<GetExecutionStatusData, ThrowOnError>) => RequestResult<GetExecutionStatusResponses, GetExecutionStatusErrors, ThrowOnError, "fields">;
|
|
1501
|
+
/**
|
|
1502
|
+
* Get execution result
|
|
1503
|
+
*/
|
|
1504
|
+
declare const getExecutionResult$1: <ThrowOnError extends boolean = false>(options: Options<GetExecutionResultData, ThrowOnError>) => RequestResult<GetExecutionResultResponses, GetExecutionResultErrors, ThrowOnError, "fields">;
|
|
1505
|
+
/**
|
|
1506
|
+
* Get browser session recording
|
|
1507
|
+
* Retrieves the browser session recording URL for a completed execution
|
|
1508
|
+
*/
|
|
1509
|
+
declare const getBrowserSessionRecording$1: <ThrowOnError extends boolean = false>(options: Options<GetBrowserSessionRecordingData, ThrowOnError>) => RequestResult<GetBrowserSessionRecordingResponses, GetBrowserSessionRecordingErrors, ThrowOnError, "fields">;
|
|
1510
|
+
/**
|
|
1511
|
+
* Get agent profiles
|
|
1512
|
+
* Returns all agent profiles for the organization. If organization_id is not provided, returns profiles for all user's organizations.
|
|
1513
|
+
*/
|
|
1514
|
+
declare const getAgentProfiles$1: <ThrowOnError extends boolean = false>(options?: Options<GetAgentProfilesData, ThrowOnError>) => RequestResult<GetAgentProfilesResponses, GetAgentProfilesErrors, ThrowOnError, "fields">;
|
|
1515
|
+
/**
|
|
1516
|
+
* Create an agent profile
|
|
1517
|
+
* Creates a new agent profile for the organization
|
|
1518
|
+
*/
|
|
1519
|
+
declare const createAgentProfile$1: <ThrowOnError extends boolean = false>(options: Options<CreateAgentProfileData, ThrowOnError>) => RequestResult<CreateAgentProfileResponses, CreateAgentProfileErrors, ThrowOnError, "fields">;
|
|
1520
|
+
/**
|
|
1521
|
+
* Delete an agent profile
|
|
1522
|
+
* Deletes the specified agent profile
|
|
1523
|
+
*/
|
|
1524
|
+
declare const deleteAgentProfile$1: <ThrowOnError extends boolean = false>(options: Options<DeleteAgentProfileData, ThrowOnError>) => RequestResult<DeleteAgentProfileResponses, DeleteAgentProfileErrors, ThrowOnError, "fields">;
|
|
1525
|
+
/**
|
|
1526
|
+
* Get an agent profile by ID
|
|
1527
|
+
* Returns the complete agent profile including credentials
|
|
1528
|
+
*/
|
|
1529
|
+
declare const getAgentProfile$1: <ThrowOnError extends boolean = false>(options: Options<GetAgentProfileData, ThrowOnError>) => RequestResult<GetAgentProfileResponses, GetAgentProfileErrors, ThrowOnError, "fields">;
|
|
1530
|
+
/**
|
|
1531
|
+
* Update an agent profile
|
|
1532
|
+
* Updates an agent profile including metadata and/or credentials
|
|
1533
|
+
*/
|
|
1534
|
+
declare const updateAgentProfile$1: <ThrowOnError extends boolean = false>(options: Options<UpdateAgentProfileData, ThrowOnError>) => RequestResult<UpdateAgentProfileResponses, UpdateAgentProfileErrors, ThrowOnError, "fields">;
|
|
1535
|
+
/**
|
|
1536
|
+
* Get the public key for credentials
|
|
1537
|
+
*/
|
|
1538
|
+
declare const getCredentialsPublicKey$1: <ThrowOnError extends boolean = false>(options?: Options<GetCredentialsPublicKeyData, ThrowOnError>) => RequestResult<GetCredentialsPublicKeyResponses, GetCredentialsPublicKeyErrors, ThrowOnError, "fields">;
|
|
1539
|
+
|
|
1540
|
+
type sdk_gen_Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options<TData, ThrowOnError>;
|
|
1541
|
+
declare const sdk_gen_executeAgentStructured: typeof executeAgentStructured;
|
|
1542
|
+
declare const sdk_gen_getOpenApi: typeof getOpenApi;
|
|
1543
|
+
declare const sdk_gen_healthCheck: typeof healthCheck;
|
|
1544
|
+
declare namespace sdk_gen {
|
|
1545
|
+
export { type sdk_gen_Options as Options, createAgentProfile$1 as createAgentProfile, deleteAgentProfile$1 as deleteAgentProfile, executeAgent$1 as executeAgent, sdk_gen_executeAgentStructured as executeAgentStructured, getAgentProfile$1 as getAgentProfile, getAgentProfiles$1 as getAgentProfiles, getBrowserSessionRecording$1 as getBrowserSessionRecording, getCredentialsPublicKey$1 as getCredentialsPublicKey, getExecutionResult$1 as getExecutionResult, getExecutionStatus$1 as getExecutionStatus, sdk_gen_getOpenApi as getOpenApi, sdk_gen_healthCheck as healthCheck, updateAgentProfile$1 as updateAgentProfile, uploadExecutionFiles$1 as uploadExecutionFiles };
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
/**
|
|
1549
|
+
* Create an API client with a provided API key.
|
|
1550
|
+
*
|
|
1551
|
+
* @param apiKey - Your API key.
|
|
1552
|
+
* @returns A configured API client.
|
|
1553
|
+
*
|
|
1554
|
+
* @example
|
|
1555
|
+
* const client = AsteroidClient('your-api-key');
|
|
1556
|
+
*/
|
|
1557
|
+
declare const AsteroidClient: (apiKey: string, options?: {
|
|
1558
|
+
v1?: {
|
|
1559
|
+
baseUrl?: string;
|
|
1560
|
+
};
|
|
1561
|
+
v2?: {
|
|
1562
|
+
baseUrl?: string;
|
|
1563
|
+
};
|
|
1564
|
+
}) => {
|
|
1565
|
+
agentsV1Client: Client;
|
|
1566
|
+
agentsV2Client: Client$2;
|
|
1567
|
+
};
|
|
1568
|
+
type AsteroidClient = ReturnType<typeof AsteroidClient>;
|
|
1569
|
+
/** --- V1 --- */
|
|
1570
|
+
/**
|
|
1571
|
+
* Execute an agent with parameters including optional agent profile ID.
|
|
1572
|
+
*
|
|
1573
|
+
* @param client - The API client.
|
|
1574
|
+
* @param agentId - The ID of the agent to execute.
|
|
1575
|
+
* @param executionData - The structured execution parameters.
|
|
1576
|
+
* @returns The execution ID.
|
|
1577
|
+
*
|
|
1578
|
+
* @example
|
|
1579
|
+
* const executionId = await executeAgent(client, 'my-agent-id', {
|
|
1580
|
+
* agent_profile_id: 'profile-123',
|
|
1581
|
+
* dynamic_data: { input: "some dynamic value" }
|
|
1582
|
+
* });
|
|
1583
|
+
*/
|
|
1584
|
+
declare const executeAgent: (client: AsteroidClient, agentId: string, executionData: StructuredAgentExecutionRequest) => Promise<string>;
|
|
1585
|
+
/**
|
|
1586
|
+
* Get the current status for an execution.
|
|
1587
|
+
*
|
|
1588
|
+
* @param client - The API client.
|
|
1589
|
+
* @param executionId - The execution identifier.
|
|
1590
|
+
* @returns The execution status details.
|
|
1591
|
+
*
|
|
1592
|
+
* @example
|
|
1593
|
+
* const status = await getExecutionStatus(client, executionId);
|
|
1594
|
+
* console.log(status.status);
|
|
1595
|
+
*/
|
|
1596
|
+
declare const getExecutionStatus: (client: AsteroidClient, executionId: string) => Promise<ExecutionStatusResponse>;
|
|
1597
|
+
/**
|
|
1598
|
+
* Get the final result of an execution.
|
|
1599
|
+
*
|
|
1600
|
+
* @param client - The API client.
|
|
1601
|
+
* @param executionId - The execution identifier.
|
|
1602
|
+
* @returns The result object of the execution.
|
|
1603
|
+
*
|
|
1604
|
+
* @example
|
|
1605
|
+
* const result = await getExecutionResult(client, executionId);
|
|
1606
|
+
* console.log(result);
|
|
1607
|
+
*/
|
|
1608
|
+
declare const getExecutionResult: (client: AsteroidClient, executionId: string) => Promise<Record<string, unknown>>;
|
|
1609
|
+
/**
|
|
1610
|
+
* Waits for an execution to reach a terminal state and returns the result.
|
|
1611
|
+
* Continuously polls the execution status until it's either "completed", "cancelled", or "failed".
|
|
1612
|
+
*
|
|
1613
|
+
* @param client - The API client.
|
|
1614
|
+
* @param executionId - The execution identifier.
|
|
1615
|
+
* @param interval - Polling interval in milliseconds (default is 1000ms).
|
|
1616
|
+
* @returns A promise that resolves with the execution result if completed.
|
|
1617
|
+
* @throws An error if the execution ends as "cancelled" or "failed".
|
|
1618
|
+
*
|
|
1619
|
+
* @example
|
|
1620
|
+
* const result = await waitForExecutionResult(client, executionId, 2000);
|
|
1621
|
+
*/
|
|
1622
|
+
declare const waitForExecutionResult: (client: AsteroidClient, executionId: string, interval?: number, timeout?: number) => Promise<Record<string, unknown>>;
|
|
1623
|
+
/**
|
|
1624
|
+
* Get the browser session recording URL for a completed execution.
|
|
1625
|
+
*
|
|
1626
|
+
* @param client - The API client.
|
|
1627
|
+
* @param executionId - The execution identifier.
|
|
1628
|
+
* @returns The browser session recording URL.
|
|
1629
|
+
*
|
|
1630
|
+
* @example
|
|
1631
|
+
* const recording = await getBrowserSessionRecording(client, executionId);
|
|
1632
|
+
* console.log(recording.recording_url);
|
|
1633
|
+
*/
|
|
1634
|
+
declare const getBrowserSessionRecording: (client: AsteroidClient, executionId: string) => Promise<BrowserSessionRecordingResponse>;
|
|
1635
|
+
/**
|
|
1636
|
+
* Upload files to an execution.
|
|
1637
|
+
*
|
|
1638
|
+
* @param client - The API client.
|
|
1639
|
+
* @param executionId - The execution identifier.
|
|
1640
|
+
* @param files - Array of files to upload.
|
|
1641
|
+
* @returns The uploaded file IDs and success message.
|
|
1642
|
+
*
|
|
1643
|
+
* @example
|
|
1644
|
+
* const fileInput = document.getElementById('file-input') as HTMLInputElement;
|
|
1645
|
+
* const files = Array.from(fileInput.files || []);
|
|
1646
|
+
* const result = await uploadExecutionFiles(client, executionId, files);
|
|
1647
|
+
* console.log(result.file_ids);
|
|
1648
|
+
*/
|
|
1649
|
+
declare const uploadExecutionFiles: (client: AsteroidClient, executionId: string, files: Array<Blob | File>) => Promise<{
|
|
1650
|
+
message?: string;
|
|
1651
|
+
file_ids?: string[];
|
|
1652
|
+
}>;
|
|
1653
|
+
/**
|
|
1654
|
+
* Get agent profiles for an organization (or all organizations for the user if not specified).
|
|
1655
|
+
*
|
|
1656
|
+
* @param client - The API client.
|
|
1657
|
+
* @param organizationId - Optional organization ID to filter by.
|
|
1658
|
+
* @returns The list of agent profiles.
|
|
1659
|
+
*
|
|
1660
|
+
* @example
|
|
1661
|
+
* const profiles = await getAgentProfiles(client, 'org_123');
|
|
1662
|
+
*/
|
|
1663
|
+
declare const getAgentProfiles: (client: AsteroidClient, organizationId?: string) => Promise<AgentProfile[]>;
|
|
1664
|
+
/**
|
|
1665
|
+
* Get the public key for encrypting credentials.
|
|
1666
|
+
*
|
|
1667
|
+
* @param client - The API client.
|
|
1668
|
+
* @returns The PEM-formatted public key.
|
|
1669
|
+
*
|
|
1670
|
+
* @example
|
|
1671
|
+
* const publicKey = await getCredentialsPublicKey(client);
|
|
1672
|
+
*/
|
|
1673
|
+
declare const getCredentialsPublicKey: (client: AsteroidClient) => Promise<string>;
|
|
1674
|
+
/**
|
|
1675
|
+
* Create a new agent profile.
|
|
1676
|
+
*
|
|
1677
|
+
* @param client - The API client.
|
|
1678
|
+
* @param payload - The agent profile data.
|
|
1679
|
+
* @returns The created agent profile.
|
|
1680
|
+
*
|
|
1681
|
+
* @example
|
|
1682
|
+
* const profile = await createAgentProfile(client, {
|
|
1683
|
+
* name: 'My Profile',
|
|
1684
|
+
* description: 'Profile description',
|
|
1685
|
+
* organization_id: 'org_123',
|
|
1686
|
+
* proxy_cc: 'us',
|
|
1687
|
+
* proxy_type: 'residential',
|
|
1688
|
+
* captcha_solver_active: false,
|
|
1689
|
+
* sticky_ip: false,
|
|
1690
|
+
* credentials: []
|
|
1691
|
+
* });
|
|
1692
|
+
*/
|
|
1693
|
+
declare const createAgentProfile: (client: AsteroidClient, payload: CreateAgentProfileRequest) => Promise<AgentProfile>;
|
|
1694
|
+
/**
|
|
1695
|
+
* Get a specific agent profile by ID.
|
|
1696
|
+
*
|
|
1697
|
+
* @param client - The API client.
|
|
1698
|
+
* @param profileId - The agent profile ID.
|
|
1699
|
+
* @returns The agent profile.
|
|
1700
|
+
*
|
|
1701
|
+
* @example
|
|
1702
|
+
* const profile = await getAgentProfile(client, 'profile_123');
|
|
1703
|
+
*/
|
|
1704
|
+
declare const getAgentProfile: (client: AsteroidClient, profileId: string) => Promise<AgentProfile>;
|
|
1705
|
+
/**
|
|
1706
|
+
* Update an existing agent profile.
|
|
1707
|
+
*
|
|
1708
|
+
* @param client - The API client.
|
|
1709
|
+
* @param profileId - The agent profile ID.
|
|
1710
|
+
* @param payload - The update data.
|
|
1711
|
+
* @returns The updated agent profile.
|
|
1712
|
+
*
|
|
1713
|
+
* @example
|
|
1714
|
+
* const updated = await updateAgentProfile(client, 'profile_123', {
|
|
1715
|
+
* name: 'New Name',
|
|
1716
|
+
* credentials_to_add: [{ name: 'API_KEY', data: 'secret-key' }],
|
|
1717
|
+
* credentials_to_delete: ['cred_456']
|
|
1718
|
+
* });
|
|
1719
|
+
*/
|
|
1720
|
+
declare const updateAgentProfile: (client: AsteroidClient, profileId: string, payload: UpdateAgentProfileRequest) => Promise<AgentProfile>;
|
|
1721
|
+
/**
|
|
1722
|
+
* Delete an agent profile by ID.
|
|
1723
|
+
*
|
|
1724
|
+
* @param client - The API client.
|
|
1725
|
+
* @param profileId - The agent profile ID.
|
|
1726
|
+
* @returns A success message.
|
|
1727
|
+
*
|
|
1728
|
+
* @example
|
|
1729
|
+
* await deleteAgentProfile(client, 'profile_123');
|
|
1730
|
+
*/
|
|
1731
|
+
declare const deleteAgentProfile: (client: AsteroidClient, profileId: string) => Promise<{
|
|
1732
|
+
message?: string;
|
|
1733
|
+
}>;
|
|
1734
|
+
/** --- V2 --- */
|
|
1735
|
+
/**
|
|
1736
|
+
* Get the last N execution activities for a given execution ID, sorted by their timestamp in descending order.
|
|
1737
|
+
*
|
|
1738
|
+
* @param client - The API client.
|
|
1739
|
+
* @param executionId - The execution identifier.
|
|
1740
|
+
* @param n - The number of activities to return.
|
|
1741
|
+
* @returns The list of execution activities.
|
|
1742
|
+
*
|
|
1743
|
+
* @example
|
|
1744
|
+
* const activities = await getLastNExecutionActivities(client, 'execution_123', 10);
|
|
1745
|
+
* console.log(activities);
|
|
1746
|
+
*/
|
|
1747
|
+
declare const getLastNExecutionActivities: (client: AsteroidClient, executionId: string, n: number) => Promise<ExecutionActivity[]>;
|
|
1748
|
+
/**
|
|
1749
|
+
* Add a message to an execution.
|
|
1750
|
+
*
|
|
1751
|
+
* @param client - The API client.
|
|
1752
|
+
* @param executionId - The execution identifier.
|
|
1753
|
+
* @param message - The message to add.
|
|
1754
|
+
*
|
|
1755
|
+
* @example
|
|
1756
|
+
* await addMessageToExecution(client, 'execution_123', 'Hello, world!');
|
|
1757
|
+
*/
|
|
1758
|
+
declare const addMessageToExecution: (client: AsteroidClient, executionId: string, message: string) => Promise<void>;
|
|
1759
|
+
|
|
1760
|
+
export { sdk_gen as AgentsV1SDK, types_gen$1 as AgentsV1Types, sdk_gen$1 as AgentsV2SDK, types_gen as AgentsV2Types, AsteroidClient, addMessageToExecution, createAgentProfile, deleteAgentProfile, executeAgent, getAgentProfile, getAgentProfiles, getBrowserSessionRecording, getCredentialsPublicKey, getExecutionResult, getExecutionStatus, getLastNExecutionActivities, updateAgentProfile, uploadExecutionFiles, waitForExecutionResult };
|