asteroid-odyssey 1.3.11 → 1.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- type AuthToken$1 = string | undefined;
2
- interface Auth$1 {
1
+ type AuthToken = string | undefined;
2
+ interface Auth {
3
3
  /**
4
4
  * Which part of the request do we use to send the auth?
5
5
  *
@@ -16,53 +16,60 @@ interface Auth$1 {
16
16
  type: 'apiKey' | 'http';
17
17
  }
18
18
 
19
- interface SerializerOptions$1<T> {
19
+ interface SerializerOptions<T> {
20
20
  /**
21
21
  * @default true
22
22
  */
23
23
  explode: boolean;
24
24
  style: T;
25
25
  }
26
- type ArrayStyle$1 = 'form' | 'spaceDelimited' | 'pipeDelimited';
27
- type ObjectStyle$1 = 'form' | 'deepObject';
26
+ type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
27
+ type ObjectStyle = 'form' | 'deepObject';
28
28
 
29
- type QuerySerializer$1 = (query: Record<string, unknown>) => string;
30
- type BodySerializer$1 = (body: any) => any;
31
- interface QuerySerializerOptions$1 {
29
+ type QuerySerializer = (query: Record<string, unknown>) => string;
30
+ type BodySerializer = (body: any) => any;
31
+ type QuerySerializerOptionsObject = {
32
32
  allowReserved?: boolean;
33
- array?: SerializerOptions$1<ArrayStyle$1>;
34
- object?: SerializerOptions$1<ObjectStyle$1>;
35
- }
33
+ array?: Partial<SerializerOptions<ArrayStyle>>;
34
+ object?: Partial<SerializerOptions<ObjectStyle>>;
35
+ };
36
+ type QuerySerializerOptions = QuerySerializerOptionsObject & {
37
+ /**
38
+ * Per-parameter serialization overrides. When provided, these settings
39
+ * override the global array/object settings for specific parameter names.
40
+ */
41
+ parameters?: Record<string, QuerySerializerOptionsObject>;
42
+ };
36
43
 
37
- interface Client$3<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never> {
44
+ type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
45
+ type Client$1<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never, SseFn = never> = {
38
46
  /**
39
47
  * Returns the final request URL.
40
48
  */
41
49
  buildUrl: BuildUrlFn;
42
- connect: MethodFn;
43
- delete: MethodFn;
44
- get: MethodFn;
45
50
  getConfig: () => Config;
46
- head: MethodFn;
47
- options: MethodFn;
48
- patch: MethodFn;
49
- post: MethodFn;
50
- put: MethodFn;
51
51
  request: RequestFn;
52
52
  setConfig: (config: Config) => Config;
53
- trace: MethodFn;
54
- }
55
- interface Config$3 {
53
+ } & {
54
+ [K in HttpMethod]: MethodFn;
55
+ } & ([SseFn] extends [never] ? {
56
+ sse?: never;
57
+ } : {
58
+ sse: {
59
+ [K in HttpMethod]: SseFn;
60
+ };
61
+ });
62
+ interface Config$1 {
56
63
  /**
57
64
  * Auth token or a function returning auth token. The resolved value will be
58
65
  * added to the request payload as defined by its `security` array.
59
66
  */
60
- auth?: ((auth: Auth$1) => Promise<AuthToken$1> | AuthToken$1) | AuthToken$1;
67
+ auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
61
68
  /**
62
69
  * A function for serializing request body parameter. By default,
63
70
  * {@link JSON.stringify()} will be used.
64
71
  */
65
- bodySerializer?: BodySerializer$1 | null;
72
+ bodySerializer?: BodySerializer | null;
66
73
  /**
67
74
  * An object containing any HTTP headers that you want to pre-populate your
68
75
  * `Headers` object with.
@@ -75,7 +82,7 @@ interface Config$3 {
75
82
  *
76
83
  * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
77
84
  */
78
- method?: 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE';
85
+ method?: Uppercase<HttpMethod>;
79
86
  /**
80
87
  * A function for serializing request query parameters. By default, arrays
81
88
  * will be exploded in form style, objects will be exploded in deepObject
@@ -86,7 +93,7 @@ interface Config$3 {
86
93
  *
87
94
  * {@link https://swagger.io/docs/specification/serialization/#query View examples}
88
95
  */
89
- querySerializer?: QuerySerializer$1 | QuerySerializerOptions$1;
96
+ querySerializer?: QuerySerializer | QuerySerializerOptions;
90
97
  /**
91
98
  * A function validating request data. This is useful if you want to ensure
92
99
  * the request conforms to the desired shape, so it can be safely sent to
@@ -106,257 +113,96 @@ interface Config$3 {
106
113
  responseValidator?: (data: unknown) => Promise<unknown>;
107
114
  }
108
115
 
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'];
116
+ type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> & Pick<Config$1, 'method' | 'responseTransformer' | 'responseValidator'> & {
134
117
  /**
135
118
  * Fetch API implementation. You can use this option to provide a custom
136
119
  * fetch instance.
137
120
  *
138
121
  * @default globalThis.fetch
139
122
  */
140
- fetch?: (request: Request) => ReturnType<typeof fetch>;
123
+ fetch?: typeof fetch;
141
124
  /**
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.
125
+ * Implementing clients can call request interceptors inside this hook.
146
126
  */
147
- next?: never;
127
+ onRequest?: (url: string, init: RequestInit) => Promise<Request>;
148
128
  /**
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.
129
+ * Callback invoked when a network or parsing error occurs during streaming.
153
130
  *
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.)?
131
+ * This option applies only if the endpoint returns a stream of events.
159
132
  *
160
- * @default 'fields'
133
+ * @param error The error that occurred.
161
134
  */
162
- responseStyle?: ResponseStyle$1;
135
+ onSseError?: (error: unknown) => void;
163
136
  /**
164
- * Throw an error instead of returning it in the response?
137
+ * Callback invoked when an event is streamed from the server.
165
138
  *
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.
139
+ * This option applies only if the endpoint returns a stream of events.
176
140
  *
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.
141
+ * @param event Event streamed from the server.
142
+ * @returns Nothing (void).
184
143
  */
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 {
144
+ onSseEvent?: (event: StreamEvent<TData>) => void;
145
+ serializedBody?: RequestInit['body'];
233
146
  /**
234
- * Which part of the request do we use to send the auth?
147
+ * Default retry delay in milliseconds.
235
148
  *
236
- * @default 'header'
237
- */
238
- in?: 'header' | 'query' | 'cookie';
239
- /**
240
- * Header or query parameter name.
149
+ * This option applies only if the endpoint returns a stream of events.
241
150
  *
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.
151
+ * @default 3000
294
152
  */
295
- bodySerializer?: BodySerializer | null;
153
+ sseDefaultRetryDelay?: number;
296
154
  /**
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}
155
+ * Maximum number of retry attempts before giving up.
301
156
  */
302
- headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
157
+ sseMaxRetryAttempts?: number;
303
158
  /**
304
- * The request method.
159
+ * Maximum retry delay in milliseconds.
305
160
  *
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.
161
+ * Applies only when exponential backoff is used.
313
162
  *
314
- * This method will have no effect if the native `paramsSerializer()` Axios
315
- * API function is used.
163
+ * This option applies only if the endpoint returns a stream of events.
316
164
  *
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.
165
+ * @default 30000
329
166
  */
330
- responseTransformer?: (data: unknown) => Promise<unknown>;
167
+ sseMaxRetryDelay?: number;
331
168
  /**
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.
169
+ * Optional sleep function for retry backoff.
170
+ *
171
+ * Defaults to using `setTimeout`.
335
172
  */
336
- responseValidator?: (data: unknown) => Promise<unknown>;
173
+ sseSleepFn?: (ms: number) => Promise<void>;
174
+ url: string;
175
+ };
176
+ interface StreamEvent<TData = unknown> {
177
+ data: TData;
178
+ event?: string;
179
+ id?: string;
180
+ retry?: number;
337
181
  }
182
+ type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {
183
+ stream: AsyncGenerator<TData extends Record<string, unknown> ? TData[keyof TData] : TData, TReturn, TNext>;
184
+ };
338
185
 
339
186
  type ErrInterceptor<Err, Res, Req, Options> = (error: Err, response: Res, request: Req, options: Options) => Err | Promise<Err>;
340
187
  type ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;
341
188
  type ResInterceptor<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>;
342
189
  declare class Interceptors<Interceptor> {
343
- _fns: (Interceptor | null)[];
344
- constructor();
190
+ fns: Array<Interceptor | null>;
345
191
  clear(): void;
346
- getInterceptorIndex(id: number | Interceptor): number;
347
- exists(id: number | Interceptor): boolean;
348
192
  eject(id: number | Interceptor): void;
349
- update(id: number | Interceptor, fn: Interceptor): number | false | Interceptor;
193
+ exists(id: number | Interceptor): boolean;
194
+ getInterceptorIndex(id: number | Interceptor): number;
195
+ update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
350
196
  use(fn: Interceptor): number;
351
197
  }
352
198
  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'>;
199
+ error: Interceptors<ErrInterceptor<Err, Res, Req, Options>>;
200
+ request: Interceptors<ReqInterceptor<Req, Options>>;
201
+ response: Interceptors<ResInterceptor<Res, Req, Options>>;
356
202
  }
357
203
 
358
204
  type ResponseStyle = 'data' | 'fields';
359
- interface Config<T extends ClientOptions$2 = ClientOptions$2> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config$1 {
205
+ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config$1 {
360
206
  /**
361
207
  * Base URL for all requests made by this client.
362
208
  */
@@ -367,7 +213,7 @@ interface Config<T extends ClientOptions$2 = ClientOptions$2> extends Omit<Reque
367
213
  *
368
214
  * @default globalThis.fetch
369
215
  */
370
- fetch?: (request: Request) => ReturnType<typeof fetch>;
216
+ fetch?: typeof fetch;
371
217
  /**
372
218
  * Please don't use the Fetch client for Next.js applications. The `next`
373
219
  * options won't have any effect.
@@ -397,10 +243,10 @@ interface Config<T extends ClientOptions$2 = ClientOptions$2> extends Omit<Reque
397
243
  */
398
244
  throwOnError?: T['throwOnError'];
399
245
  }
400
- interface RequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
246
+ interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
401
247
  responseStyle: TResponseStyle;
402
248
  throwOnError: ThrowOnError;
403
- }> {
249
+ }>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
404
250
  /**
405
251
  * Any body that you want to add to your request.
406
252
  *
@@ -415,7 +261,7 @@ interface RequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowO
415
261
  security?: ReadonlyArray<Auth>;
416
262
  url: Url;
417
263
  }
418
- interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<TResponseStyle, ThrowOnError, Url> {
264
+ interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {
419
265
  serializedBody?: string;
420
266
  }
421
267
  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 : {
@@ -432,20 +278,21 @@ type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boole
432
278
  request: Request;
433
279
  response: Response;
434
280
  }>;
435
- interface ClientOptions$2 {
281
+ interface ClientOptions$1 {
436
282
  baseUrl?: string;
437
283
  responseStyle?: ResponseStyle;
438
284
  throwOnError?: boolean;
439
285
  }
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>;
286
+ type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
287
+ type SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
288
+ type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
442
289
  type BuildUrlFn = <TData extends {
443
290
  body?: unknown;
444
291
  path?: Record<string, unknown>;
445
292
  query?: Record<string, unknown>;
446
293
  url: string;
447
- }>(options: Pick<TData, 'url'> & Options$2<TData>) => string;
448
- type Client = Client$1<RequestFn, Config, MethodFn, BuildUrlFn> & {
294
+ }>(options: TData & Options$1<TData>) => string;
295
+ type Client = Client$1<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {
449
296
  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;
450
297
  };
451
298
  interface TDataShape {
@@ -456,1453 +303,1268 @@ interface TDataShape {
456
303
  url: string;
457
304
  }
458
305
  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'>;
306
+ type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
460
307
 
461
- /**
462
- * Request to execute an agent with specific parameters
463
- */
464
- type AgentExecutionRequest = {
465
- [key: string]: unknown;
308
+ type ClientOptions = {
309
+ baseUrl: 'https://odyssey.asteroid.ai/agents/v2' | (string & {});
466
310
  };
467
- type ExecutionResponse = {
468
- /**
469
- * The ID of the execution
470
- */
471
- execution_id: string;
311
+ type AgentsAgentBase = {
312
+ id: CommonUuid;
313
+ name: string;
314
+ createdAt: string;
315
+ organizationId?: CommonUuid;
316
+ userId: CommonUuid;
472
317
  };
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;
318
+ type AgentsAgentExecuteAgentRequest = {
483
319
  /**
484
- * Time when the status was last updated
320
+ * The ID of the agent profile to use. Note this is not the agent ID
485
321
  */
486
- updated_at?: string;
487
- };
488
- type ExecutionResultResponse = {
322
+ agentProfileId?: CommonUuid;
489
323
  /**
490
- * The ID of the execution
324
+ * Inputs to be merged into the placeholders defined in prompts
491
325
  */
492
- execution_id: string;
493
- status: Status;
326
+ inputs?: {
327
+ [key: string]: unknown;
328
+ };
494
329
  /**
495
- * (Deprecated, use execution_result instead) The structured result data from the execution. Contains the outcome, reasoning, final answer, and result.
330
+ * Deprecated: Use 'inputs' instead. Inputs to be merged into the placeholders defined in prompts
331
+ *
496
332
  * @deprecated
497
333
  */
498
- result?: {
334
+ dynamicData?: {
499
335
  [key: string]: unknown;
500
336
  };
501
337
  /**
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
338
+ * Array of temporary files to attach to the execution. Must have been pre-uploaded using the stage file endpoint
517
339
  */
518
- reasoning?: string;
340
+ tempFiles?: Array<AgentsFilesTempFile>;
519
341
  /**
520
- * The structured result data from the execution. This will follow the format defined in the result_schema of the agent.
342
+ * Optional metadata key-value pairs (string keys and string values) for organizing and filtering executions
521
343
  */
522
- result?: {
344
+ metadata?: {
523
345
  [key: string]: unknown;
524
346
  };
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
347
  /**
532
- * Error message
348
+ * The version of the agent to execute. If not provided, the latest version will be used.
533
349
  */
534
- error: string;
350
+ version?: number;
535
351
  };
536
- type BrowserSessionRecordingResponse = {
352
+ type AgentsAgentExecuteAgentResponse = {
537
353
  /**
538
- * The URL of the browser session recording
354
+ * The ID of the newly created execution
539
355
  */
540
- recording_url: string;
356
+ executionId: CommonUuid;
541
357
  };
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
- };
358
+ type AgentsAgentSortField = 'name' | 'created_at';
359
+ type AgentsExecutionActionName = 'element_click' | 'element_type' | 'element_select' | 'element_hover' | 'element_drag' | 'element_wait' | 'element_fill_form' | 'element_get_text' | 'element_file_upload' | 'coord_move' | 'coord_click' | 'coord_double_click' | 'coord_drag' | 'coord_scroll' | 'nav_to' | 'nav_back' | 'nav_refresh' | 'nav_tabs' | 'nav_close_browser' | 'nav_resize_browser' | 'nav_install_browser' | 'nav_zoom_in' | 'nav_zoom_out' | 'obs_snapshot' | 'obs_snapshot_with_selectors' | 'obs_screenshot' | 'obs_console_messages' | 'obs_network_requests' | 'obs_extract_html' | 'script_eval' | 'script_playwright' | 'script_playwright_llm_vars' | 'script_hybrid_playwright' | 'browser_press_key' | 'browser_handle_dialog' | 'browser_read_clipboard' | 'file_list' | 'file_read' | 'file_stage' | 'file_download' | 'file_pdf_save' | 'scratchpad_read' | 'scratchpad_write' | 'scriptpad_run_function' | 'scriptpad_search_replace' | 'scriptpad_read' | 'scriptpad_write' | 'ext_google_sheets_get_data' | 'ext_google_sheets_set_value' | 'ext_get_mail' | 'ext_api_call' | 'util_wait_time' | 'util_get_datetime' | 'util_generate_totp_secret' | 'util_send_user_message' | 'agent_query_context' | 'agent_compile_workflow' | 'llm_call';
360
+ type AgentsExecutionActivity = {
361
+ id: CommonUuid;
362
+ payload: AgentsExecutionActivityPayloadUnion;
363
+ executionId: CommonUuid;
364
+ timestamp: string;
556
365
  };
557
- type Cookie = {
558
- /**
559
- * Unique identifier for the cookie
560
- */
561
- id?: string;
562
- /**
563
- * Display name for the cookie
564
- */
565
- name: string;
566
- /**
567
- * The cookie name/key
568
- */
569
- key: string;
570
- /**
571
- * The cookie value
572
- */
573
- value: string;
574
- /**
575
- * When the cookie expires (optional)
576
- */
577
- expiry?: string;
578
- /**
579
- * The domain for which the cookie is valid
580
- */
581
- domain: string;
582
- /**
583
- * Whether the cookie should only be sent over HTTPS
584
- */
585
- secure: boolean;
586
- /**
587
- * SameSite attribute for the cookie
588
- */
589
- same_site: 'Strict' | 'Lax' | 'None';
590
- /**
591
- * Whether the cookie should be accessible only via HTTP(S)
592
- */
593
- http_only: boolean;
594
- /**
595
- * When the cookie was created
596
- */
597
- created_at: string;
366
+ type AgentsExecutionActivityActionCompletedInfo = ({
367
+ actionName: 'ext_api_call';
368
+ } & AgentsExecutionExtApiCallCompletedDetails) | ({
369
+ actionName: 'scratchpad_read';
370
+ } & AgentsExecutionScratchpadReadCompletedDetails) | ({
371
+ actionName: 'scratchpad_write';
372
+ } & AgentsExecutionScratchpadWriteCompletedDetails) | ({
373
+ actionName: 'script_playwright';
374
+ } & AgentsExecutionScriptPlaywrightCompletedDetails) | ({
375
+ actionName: 'script_hybrid_playwright';
376
+ } & AgentsExecutionScriptHybridPlaywrightCompletedDetails) | ({
377
+ actionName: 'script_eval';
378
+ } & AgentsExecutionScriptEvalCompletedDetails) | ({
379
+ actionName: 'file_read';
380
+ } & AgentsExecutionFileReadCompletedDetails) | ({
381
+ actionName: 'file_list';
382
+ } & AgentsExecutionFileListCompletedDetails) | ({
383
+ actionName: 'file_stage';
384
+ } & AgentsExecutionFileStageCompletedDetails) | ({
385
+ actionName: 'element_file_upload';
386
+ } & AgentsExecutionElementFileUploadCompletedDetails) | ({
387
+ actionName: 'ext_get_mail';
388
+ } & AgentsExecutionExtGetMailCompletedDetails) | ({
389
+ actionName: 'scriptpad_run_function';
390
+ } & AgentsExecutionScriptPadRunFunctionCompletedDetails) | ({
391
+ actionName: 'scriptpad_read';
392
+ } & AgentsExecutionScriptpadReadCompletedDetails) | ({
393
+ actionName: 'scriptpad_write';
394
+ } & AgentsExecutionScriptpadWriteCompletedDetails) | ({
395
+ actionName: 'scriptpad_search_replace';
396
+ } & AgentsExecutionScriptpadSearchReplaceCompletedDetails) | ({
397
+ actionName: 'obs_snapshot_with_selectors';
398
+ } & AgentsExecutionObsSnapshotWithSelectorsCompletedDetails) | ({
399
+ actionName: 'util_get_datetime';
400
+ } & AgentsExecutionUtilGetDatetimeCompletedDetails) | ({
401
+ actionName: 'nav_to';
402
+ } & AgentsExecutionNavToCompletedDetails) | ({
403
+ actionName: 'agent_query_context';
404
+ } & AgentsExecutionAgentQueryContextCompletedDetails);
405
+ type AgentsExecutionActivityActionCompletedPayload = {
406
+ activityType: 'action_completed';
407
+ message: string;
408
+ actionId: string;
409
+ actionName: AgentsExecutionActionName;
410
+ duration?: number;
411
+ info?: AgentsExecutionActivityActionCompletedInfo;
598
412
  };
599
- type AgentProfile = {
600
- /**
601
- * Unique identifier for the agent profile
602
- */
603
- id: string;
604
- /**
605
- * Name of the agent profile (unique within organization)
606
- */
607
- name: string;
608
- /**
609
- * Description of the agent profile
610
- */
611
- description: string;
413
+ type AgentsExecutionActivityActionFailedPayload = {
414
+ activityType: 'action_failed';
415
+ message: string;
416
+ actionName: AgentsExecutionActionName;
417
+ actionId: string;
418
+ duration?: number;
419
+ };
420
+ type AgentsExecutionActivityActionStartedInfo = ({
421
+ actionName: 'nav_to';
422
+ } & AgentsExecutionNavToStartedDetails) | ({
423
+ actionName: 'scratchpad_read';
424
+ } & AgentsExecutionScratchpadReadStartedDetails) | ({
425
+ actionName: 'scratchpad_write';
426
+ } & AgentsExecutionScratchpadWriteStartedDetails) | ({
427
+ actionName: 'scriptpad_run_function';
428
+ } & AgentsExecutionScriptpadRunFunctionStartedDetails) | ({
429
+ actionName: 'script_playwright';
430
+ } & AgentsExecutionScriptPlaywrightStartedDetails) | ({
431
+ actionName: 'script_hybrid_playwright';
432
+ } & AgentsExecutionScriptHybridPlaywrightStartedDetails) | ({
433
+ actionName: 'script_eval';
434
+ } & AgentsExecutionScriptEvalStartedDetails) | ({
435
+ actionName: 'scriptpad_search_replace';
436
+ } & AgentsExecutionScriptpadSearchReplaceStartedDetails) | ({
437
+ actionName: 'util_get_datetime';
438
+ } & AgentsExecutionUtilGetDatetimeStartedDetails) | ({
439
+ actionName: 'scriptpad_read';
440
+ } & AgentsExecutionScriptpadReadStartedDetails) | ({
441
+ actionName: 'llm_call';
442
+ } & AgentsExecutionLlmCallStartedDetails) | ({
443
+ actionName: 'agent_query_context';
444
+ } & AgentsExecutionAgentQueryContextStartedDetails);
445
+ type AgentsExecutionActivityActionStartedPayload = {
446
+ activityType: 'action_started';
447
+ message: string;
448
+ actionName: AgentsExecutionActionName;
449
+ actionId: string;
450
+ info?: AgentsExecutionActivityActionStartedInfo;
451
+ };
452
+ type AgentsExecutionActivityFileAddedPayload = {
453
+ activityType: 'file_added';
454
+ fileId: CommonUuid;
455
+ fileName: string;
456
+ mimeType: string;
457
+ fileSize: number;
458
+ source: 'upload' | 'download';
459
+ presignedUrl: string;
460
+ };
461
+ type AgentsExecutionActivityGenericPayload = {
462
+ activityType: 'generic';
463
+ message: string;
464
+ };
465
+ type AgentsExecutionActivityPayloadUnion = ({
466
+ activityType: 'terminal';
467
+ } & AgentsExecutionTerminalPayload) | ({
468
+ activityType: 'generic';
469
+ } & AgentsExecutionActivityGenericPayload) | ({
470
+ activityType: 'reasoning';
471
+ } & AgentsExecutionActivityReasoningPayload) | ({
472
+ activityType: 'step_started';
473
+ } & AgentsExecutionActivityStepStartedPayload) | ({
474
+ activityType: 'step_completed';
475
+ } & AgentsExecutionActivityStepCompletedPayload) | ({
476
+ activityType: 'transitioned_node';
477
+ } & AgentsExecutionActivityTransitionedNodePayload) | ({
478
+ activityType: 'status_changed';
479
+ } & AgentsExecutionActivityStatusChangedPayload) | ({
480
+ activityType: 'action_started';
481
+ } & AgentsExecutionActivityActionStartedPayload) | ({
482
+ activityType: 'action_completed';
483
+ } & AgentsExecutionActivityActionCompletedPayload) | ({
484
+ activityType: 'action_failed';
485
+ } & AgentsExecutionActivityActionFailedPayload) | ({
486
+ activityType: 'user_message_received';
487
+ } & AgentsExecutionActivityUserMessageReceivedPayload) | ({
488
+ activityType: 'file_added';
489
+ } & AgentsExecutionActivityFileAddedPayload) | ({
490
+ activityType: 'workflow_updated';
491
+ } & AgentsExecutionActivityWorkflowUpdatedPayload) | ({
492
+ activityType: 'playwright_script_generated';
493
+ } & AgentsExecutionActivityPlaywrightScriptGeneratedPayload);
494
+ type AgentsExecutionActivityPlaywrightScriptGeneratedPayload = {
495
+ activityType: 'playwright_script_generated';
496
+ nodeId: CommonUuid;
497
+ nodeName: string;
498
+ script: string;
499
+ llmVars?: Array<AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVar>;
500
+ context: string;
501
+ oldScript?: string;
502
+ };
503
+ type AgentsExecutionActivityReasoningPayload = {
504
+ activityType: 'reasoning';
505
+ reasoning: string;
506
+ };
507
+ type AgentsExecutionActivityStatusChangedPayload = {
508
+ activityType: 'status_changed';
509
+ status: AgentsExecutionStatus;
510
+ completedPayload?: AgentsExecutionCompletedPayload;
511
+ failedPayload?: AgentsExecutionFailedPayload;
512
+ pausedPayload?: AgentsExecutionPausedPayload;
513
+ awaitingConfirmationPayload?: AgentsExecutionAwaitingConfirmationPayload;
514
+ cancelledPayload?: AgentsExecutionCancelledPayload;
515
+ };
516
+ type AgentsExecutionActivityStepCompletedPayload = {
517
+ activityType: 'step_completed';
518
+ stepNumber: number;
519
+ };
520
+ type AgentsExecutionActivityStepStartedPayload = {
521
+ activityType: 'step_started';
522
+ stepNumber: number;
523
+ };
524
+ type AgentsExecutionActivityTransitionedNodePayload = {
525
+ activityType: 'transitioned_node';
526
+ newNodeUUID: CommonUuid;
527
+ newNodeName: string;
528
+ newNodeType: string;
529
+ fromNodeDuration?: number;
530
+ transitionType?: AgentsGraphModelsTransitionsTransitionType;
612
531
  /**
613
- * The ID of the organization that the agent profile belongs to
532
+ * Output variables provided by the from node
614
533
  */
615
- organization_id: string;
616
- proxy_cc?: CountryCode;
617
- proxy_type?: ProxyType;
534
+ fromNodeOutput?: Array<AgentsExecutionNodeOutputItem>;
535
+ };
536
+ type AgentsExecutionActivityUserMessageReceivedPayload = {
537
+ activityType: 'user_message_received';
538
+ message: string;
539
+ userUUID: CommonUuid;
540
+ };
541
+ type AgentsExecutionActivityWorkflowUpdatedPayload = {
542
+ activityType: 'workflow_updated';
543
+ workflowUpdate: Array<AgentsExecutionWorkflowUpdate>;
544
+ };
545
+ type AgentsExecutionAgentQueryContextCompletedDetails = {
546
+ actionName: 'agent_query_context';
547
+ query: string;
548
+ answer: string;
549
+ };
550
+ type AgentsExecutionAgentQueryContextStartedDetails = {
551
+ actionName: 'agent_query_context';
552
+ query: string;
553
+ };
554
+ type AgentsExecutionAwaitingConfirmationPayload = {
555
+ reason: string;
556
+ };
557
+ type AgentsExecutionCancelReason = 'timeout' | 'max_steps' | 'user_requested';
558
+ type AgentsExecutionCancelledPayload = {
559
+ reason: AgentsExecutionCancelReason;
560
+ };
561
+ /**
562
+ * User comment on an execution
563
+ */
564
+ type AgentsExecutionComment = {
618
565
  /**
619
- * Whether the captcha solver is active for this profile
566
+ * Unique identifier for the comment
620
567
  */
621
- captcha_solver_active: boolean;
568
+ id: CommonUuid;
622
569
  /**
623
- * Whether the same IP address should be used for all executions of this profile
570
+ * Execution this comment belongs to
624
571
  */
625
- sticky_ip: boolean;
572
+ executionId: CommonUuid;
626
573
  /**
627
- * List of credentials associated with this agent profile
574
+ * User who created the comment
628
575
  */
629
- credentials: Array<Credential>;
576
+ userId: CommonUuid;
630
577
  /**
631
- * List of cookies associated with this agent profile
578
+ * Comment content
632
579
  */
633
- cookies: Array<Cookie>;
580
+ content: string;
634
581
  /**
635
- * The date and time the agent profile was created
582
+ * Whether the comment is public
636
583
  */
637
- created_at: string;
584
+ public: boolean;
638
585
  /**
639
- * The last update time of the agent profile
586
+ * When the comment was created
640
587
  */
641
- updated_at: string;
588
+ createdAt: string;
642
589
  /**
643
- * Whether to enable extra stealth for the profile
590
+ * When the comment was last updated
644
591
  */
645
- extra_stealth: boolean;
592
+ updatedAt?: string;
646
593
  };
647
- type CreateAgentProfileRequest = {
648
- /**
649
- * Name of the agent profile (must be unique within organization)
650
- */
651
- name: string;
652
- /**
653
- * Description of the agent profile
654
- */
655
- description: string;
594
+ type AgentsExecutionCompletedPayload = {
595
+ outcome: string;
596
+ reasoning: string;
597
+ result: unknown;
598
+ lessons_learned?: string;
599
+ };
600
+ type AgentsExecutionElementFileUploadCompletedDetails = {
601
+ actionName: 'element_file_upload';
602
+ fileNames: Array<string>;
603
+ };
604
+ /**
605
+ * Execution result containing outcome, reasoning, and result data
606
+ */
607
+ type AgentsExecutionExecutionResult = {
656
608
  /**
657
- * The ID of the organization that the agent profile belongs to
609
+ * Unique identifier for the result
658
610
  */
659
- organization_id: string;
660
- proxy_cc: CountryCode;
661
- proxy_type: ProxyType;
611
+ id: CommonUuid;
662
612
  /**
663
- * Whether the captcha solver should be active for this profile
613
+ * Execution this result belongs to
664
614
  */
665
- captcha_solver_active: boolean;
615
+ executionId: CommonUuid;
666
616
  /**
667
- * Whether the same IP address should be used for all executions of this profile
617
+ * Outcome of the execution (success or failure)
668
618
  */
669
- sticky_ip: boolean;
619
+ outcome: string;
670
620
  /**
671
- * Optional list of credentials to create with the profile
621
+ * AI reasoning for the outcome
672
622
  */
673
- credentials: Array<Credential>;
623
+ reasoning: string;
674
624
  /**
675
- * Optional list of cookies to create with the profile
625
+ * Result data as JSON
676
626
  */
677
- cookies: Array<Cookie>;
627
+ result: unknown;
678
628
  /**
679
- * Whether to enable extra stealth for the profile
629
+ * When the result was created
680
630
  */
681
- extra_stealth?: boolean;
631
+ createdAt: string;
682
632
  };
683
- type UpdateAgentProfileRequest = {
684
- /**
685
- * The name of the agent profile
686
- */
687
- name?: string;
688
- /**
689
- * The description of the agent profile
690
- */
691
- description?: string;
692
- proxy_cc?: CountryCode;
693
- proxy_type?: ProxyType;
694
- /**
695
- * Whether the captcha solver should be active for this profile
696
- */
697
- captcha_solver_active?: boolean;
698
- /**
699
- * Whether the same IP address should be used for all executions of this profile
700
- */
701
- sticky_ip?: boolean;
633
+ type AgentsExecutionExtApiCallCompletedDetails = {
634
+ actionName: 'ext_api_call';
635
+ statusCode: string;
636
+ responseBody: string;
637
+ requestMethod?: string;
638
+ requestUrl?: string;
639
+ };
640
+ type AgentsExecutionExtGetMailCompletedDetails = {
641
+ actionName: 'ext_get_mail';
642
+ emailCount: number;
643
+ emails: Array<unknown>;
644
+ };
645
+ type AgentsExecutionFailedPayload = {
646
+ reason: string;
647
+ os_error?: CommonOsError;
648
+ };
649
+ type AgentsExecutionFileListCompletedDetails = {
650
+ actionName: 'file_list';
651
+ fileNames: Array<string>;
652
+ };
653
+ type AgentsExecutionFileReadCompletedDetails = {
654
+ actionName: 'file_read';
655
+ fileNames: Array<string>;
656
+ errorCount?: number;
657
+ totalSizeBytes?: number;
658
+ };
659
+ type AgentsExecutionFileStageCompletedDetails = {
660
+ actionName: 'file_stage';
661
+ fileNames: Array<string>;
662
+ };
663
+ /**
664
+ * Human-applied label for categorizing executions
665
+ */
666
+ type AgentsExecutionHumanLabel = {
702
667
  /**
703
- * List of credentials to add to the profile
668
+ * Unique identifier for the label
704
669
  */
705
- credentials_to_add?: Array<Credential>;
670
+ id: CommonUuid;
706
671
  /**
707
- * List of credential IDs to delete from the profile
672
+ * Organization this label belongs to
708
673
  */
709
- credentials_to_delete?: Array<string>;
674
+ organizationId: CommonUuid;
710
675
  /**
711
- * List of cookies to add to the profile
676
+ * Display name of the label
712
677
  */
713
- cookies_to_add?: Array<Cookie>;
678
+ name: string;
714
679
  /**
715
- * List of cookie IDs to delete from the profile
680
+ * Hex color code for the label (e.g., #FF5733)
716
681
  */
717
- cookies_to_delete?: Array<string>;
682
+ color: string;
718
683
  /**
719
- * Whether to enable extra stealth for the profile
684
+ * When the label was created
720
685
  */
721
- extra_stealth?: boolean;
686
+ createdAt: string;
687
+ };
688
+ type AgentsExecutionLlmCallPurpose = 'iris_pick_next_action' | 'transition_pick_next_node' | 'output_populate_result' | 'generate_hybrid_playwright_code' | 'generate_playwright_variables';
689
+ type AgentsExecutionLlmCallStartedDetails = {
690
+ actionName: 'llm_call';
691
+ purpose: AgentsExecutionLlmCallPurpose;
722
692
  };
723
693
  /**
724
- * Two-letter country code for proxy location
725
- */
726
- type CountryCode = 'us' | 'uk' | 'fr' | 'it' | 'jp' | 'au' | 'de' | 'fi' | 'ca';
727
- /**
728
- * Type of proxy to use
694
+ * Represents a single execution in a list view
729
695
  */
730
- type ProxyType = 'basic' | 'residential' | 'mobile';
731
- type Credential = {
732
- /**
733
- * The unique identifier for this credential
734
- */
735
- id?: string;
696
+ type AgentsExecutionListItem = {
736
697
  /**
737
- * The credential name
698
+ * The unique identifier of the execution
738
699
  */
739
- name: string;
700
+ id: CommonUuid;
740
701
  /**
741
- * The encrypted credential
702
+ * The ID of the agent that was executed
742
703
  */
743
- data: string;
704
+ agentId: CommonUuid;
744
705
  /**
745
- * When the credential was created
706
+ * The ID of the workflow that was executed
746
707
  */
747
- created_at?: string;
748
- };
749
- type GetOpenApiData = {
750
- body?: never;
751
- path?: never;
752
- query?: never;
753
- url: '/openapi.yaml';
754
- };
755
- type GetOpenApiResponses = {
708
+ workflowId: CommonUuid;
756
709
  /**
757
- * OpenAPI schema
710
+ * The current status of the execution
758
711
  */
759
- 200: unknown;
760
- };
761
- type HealthCheckData = {
762
- body?: never;
763
- path?: never;
764
- query?: never;
765
- url: '/health';
766
- };
767
- type HealthCheckErrors = {
712
+ status: AgentsExecutionStatus;
768
713
  /**
769
- * API is unhealthy
714
+ * When the execution was created
770
715
  */
771
- 500: {
772
- /**
773
- * The error message
774
- */
775
- error?: string;
776
- };
777
- };
778
- type HealthCheckError = HealthCheckErrors[keyof HealthCheckErrors];
779
- type HealthCheckResponses = {
716
+ createdAt: string;
780
717
  /**
781
- * API is healthy
718
+ * When the execution reached a terminal state (if applicable)
782
719
  */
783
- 200: {
784
- /**
785
- * The health status of the API
786
- */
787
- status?: string;
788
- };
789
- };
790
- type HealthCheckResponse = HealthCheckResponses[keyof HealthCheckResponses];
791
- type ExecuteAgentData = {
792
- body: AgentExecutionRequest;
793
- path: {
794
- /**
795
- * The ID of the agent
796
- */
797
- id: string;
798
- };
799
- query?: never;
800
- url: '/agent/{id}';
801
- };
802
- type ExecuteAgentErrors = {
720
+ terminalAt?: string;
803
721
  /**
804
- * Invalid request
722
+ * The organization this execution belongs to
805
723
  */
806
- 400: ErrorResponse;
724
+ organizationId: CommonUuid;
807
725
  /**
808
- * Agent not found
726
+ * The agent display name
809
727
  */
810
- 404: ErrorResponse;
728
+ agentName: string;
811
729
  /**
812
- * Internal server error
730
+ * The name of the agent profile used for this execution (if any)
813
731
  */
814
- 500: ErrorResponse;
815
- };
816
- type ExecuteAgentError = ExecuteAgentErrors[keyof ExecuteAgentErrors];
817
- type ExecuteAgentResponses = {
732
+ agentProfileName?: string;
818
733
  /**
819
- * Agent execution started successfully
734
+ * Execution result with outcome, reasoning, and result data
820
735
  */
821
- 202: ExecutionResponse;
822
- };
823
- type ExecuteAgentResponse = ExecuteAgentResponses[keyof ExecuteAgentResponses];
824
- type ExecuteAgentStructuredData = {
825
- body: StructuredAgentExecutionRequest;
826
- path: {
827
- /**
828
- * The ID of the agent
829
- */
830
- id: string;
831
- };
832
- query?: never;
833
- url: '/agent/{id}/execute';
834
- };
835
- type ExecuteAgentStructuredErrors = {
736
+ executionResult?: AgentsExecutionExecutionResult;
836
737
  /**
837
- * Invalid request
738
+ * Execution duration in seconds (only present for terminal executions)
838
739
  */
839
- 400: ErrorResponse;
740
+ duration?: number;
840
741
  /**
841
- * Agent not found
742
+ * Human-applied labels for this execution
842
743
  */
843
- 404: ErrorResponse;
744
+ humanLabels: Array<AgentsExecutionHumanLabel>;
844
745
  /**
845
- * Internal server error
746
+ * Comments on this execution
846
747
  */
847
- 500: ErrorResponse;
848
- };
849
- type ExecuteAgentStructuredError = ExecuteAgentStructuredErrors[keyof ExecuteAgentStructuredErrors];
850
- type ExecuteAgentStructuredResponses = {
748
+ comments: Array<AgentsExecutionComment>;
851
749
  /**
852
- * Agent execution started successfully
750
+ * Optional metadata key-value pairs attached to this execution
853
751
  */
854
- 202: ExecutionResponse;
855
- };
856
- type ExecuteAgentStructuredResponse = ExecuteAgentStructuredResponses[keyof ExecuteAgentStructuredResponses];
857
- type GetExecutionStatusData = {
858
- body?: never;
859
- path: {
860
- /**
861
- * The ID of the execution
862
- */
863
- id: string;
752
+ metadata?: {
753
+ [key: string]: unknown;
864
754
  };
865
- query?: never;
866
- url: '/execution/{id}/status';
867
- };
868
- type GetExecutionStatusErrors = {
869
755
  /**
870
- * Execution not found
756
+ * Browser recording URL (if a browser session was used and execution is terminal)
871
757
  */
872
- 404: ErrorResponse;
758
+ browserRecordingUrl?: string;
873
759
  /**
874
- * Internal server error
760
+ * Browser live view URL for debugging (if a browser session is active and execution is running)
875
761
  */
876
- 500: ErrorResponse;
762
+ browserLiveViewUrl?: string;
877
763
  };
878
- type GetExecutionStatusError = GetExecutionStatusErrors[keyof GetExecutionStatusErrors];
879
- type GetExecutionStatusResponses = {
880
- /**
881
- * Execution status retrieved successfully
882
- */
883
- 200: ExecutionStatusResponse;
764
+ type AgentsExecutionNavToCompletedDetails = {
765
+ actionName: 'nav_to';
766
+ pageTitle?: string;
884
767
  };
885
- type GetExecutionStatusResponse = GetExecutionStatusResponses[keyof GetExecutionStatusResponses];
886
- type GetExecutionResultData = {
887
- body?: never;
888
- path: {
889
- /**
890
- * The ID of the execution
891
- */
892
- id: string;
893
- };
894
- query?: never;
895
- url: '/execution/{id}/result';
768
+ type AgentsExecutionNavToStartedDetails = {
769
+ actionName: 'nav_to';
770
+ url: string;
771
+ };
772
+ type AgentsExecutionNodeDetails = {
773
+ nodeID: CommonUuid;
774
+ nodeName: string;
775
+ nodeType: string;
896
776
  };
897
- type GetExecutionResultErrors = {
777
+ /**
778
+ * A single output variable with a name and value
779
+ */
780
+ type AgentsExecutionNodeOutputItem = {
898
781
  /**
899
- * Execution not found
782
+ * The name of the output variable
900
783
  */
901
- 404: ErrorResponse;
784
+ name: string;
902
785
  /**
903
- * Internal server error
786
+ * The value of the output variable
904
787
  */
905
- 500: ErrorResponse;
788
+ value: string;
906
789
  };
907
- type GetExecutionResultError = GetExecutionResultErrors[keyof GetExecutionResultErrors];
908
- type GetExecutionResultResponses = {
909
- /**
910
- * Execution result retrieved successfully
911
- */
912
- 200: ExecutionResultResponse;
790
+ type AgentsExecutionObsSnapshotWithSelectorsCompletedDetails = {
791
+ actionName: 'obs_snapshot_with_selectors';
792
+ url: string;
793
+ title: string;
913
794
  };
914
- type GetExecutionResultResponse = GetExecutionResultResponses[keyof GetExecutionResultResponses];
915
- type GetBrowserSessionRecordingData = {
916
- body?: never;
917
- path: {
918
- /**
919
- * The ID of the execution
920
- */
921
- id: string;
922
- };
923
- query?: never;
924
- url: '/execution/{id}/browser_session/recording';
795
+ type AgentsExecutionPausedPayload = {
796
+ reason: string;
925
797
  };
926
- type GetBrowserSessionRecordingErrors = {
927
- /**
928
- * Browser session not found
929
- */
930
- 404: ErrorResponse;
931
- /**
932
- * Internal server error
933
- */
934
- 500: ErrorResponse;
798
+ type AgentsExecutionRulesDetails = {
799
+ rules: string;
935
800
  };
936
- type GetBrowserSessionRecordingError = GetBrowserSessionRecordingErrors[keyof GetBrowserSessionRecordingErrors];
937
- type GetBrowserSessionRecordingResponses = {
938
- /**
939
- * Browser session recording retrieved successfully
940
- */
941
- 200: BrowserSessionRecordingResponse;
801
+ type AgentsExecutionScratchpadReadCompletedDetails = {
802
+ actionName: 'scratchpad_read';
803
+ content?: string;
804
+ contentTruncated?: boolean;
942
805
  };
943
- type GetBrowserSessionRecordingResponse = GetBrowserSessionRecordingResponses[keyof GetBrowserSessionRecordingResponses];
944
- type GetAgentProfilesData = {
945
- body?: never;
946
- path?: never;
947
- query?: {
948
- /**
949
- * The ID of the organization to filter by
950
- */
951
- organization_id?: string;
952
- };
953
- url: '/agent-profiles';
806
+ type AgentsExecutionScratchpadReadStartedDetails = {
807
+ actionName: 'scratchpad_read';
808
+ operation: 'read';
954
809
  };
955
- type GetAgentProfilesErrors = {
956
- /**
957
- * Unauthorized - Authentication required
958
- */
959
- 401: ErrorResponse;
960
- /**
961
- * Forbidden - Insufficient permissions
962
- */
963
- 403: ErrorResponse;
964
- /**
965
- * Internal server error
966
- */
967
- 500: ErrorResponse;
810
+ type AgentsExecutionScratchpadWriteCompletedDetails = {
811
+ actionName: 'scratchpad_write';
812
+ linesChanged: number;
813
+ totalLines: number;
814
+ patchesApplied: number;
815
+ content?: string;
816
+ contentTruncated?: boolean;
968
817
  };
969
- type GetAgentProfilesError = GetAgentProfilesErrors[keyof GetAgentProfilesErrors];
970
- type GetAgentProfilesResponses = {
971
- /**
972
- * List of agent profiles
973
- */
974
- 200: Array<AgentProfile>;
818
+ type AgentsExecutionScratchpadWriteStartedDetails = {
819
+ actionName: 'scratchpad_write';
820
+ operation: 'write';
975
821
  };
976
- type GetAgentProfilesResponse = GetAgentProfilesResponses[keyof GetAgentProfilesResponses];
977
- type CreateAgentProfileData = {
978
- body: CreateAgentProfileRequest;
979
- path?: never;
980
- query?: never;
981
- url: '/agent-profiles';
822
+ type AgentsExecutionScriptEvalCompletedDetails = {
823
+ actionName: 'script_eval';
824
+ result: unknown;
982
825
  };
983
- type CreateAgentProfileErrors = {
984
- /**
985
- * Bad request - Invalid input or profile name already exists
986
- */
987
- 400: ErrorResponse;
988
- /**
989
- * Unauthorized - Authentication required
990
- */
991
- 401: ErrorResponse;
992
- /**
993
- * Forbidden - Insufficient permissions
994
- */
995
- 403: ErrorResponse;
996
- /**
997
- * Internal server error
998
- */
999
- 500: ErrorResponse;
826
+ type AgentsExecutionScriptEvalStartedDetails = {
827
+ actionName: 'script_eval';
828
+ element?: string;
829
+ ref?: string;
830
+ function: string;
1000
831
  };
1001
- type CreateAgentProfileError = CreateAgentProfileErrors[keyof CreateAgentProfileErrors];
1002
- type CreateAgentProfileResponses = {
1003
- /**
1004
- * Agent profile created successfully
1005
- */
1006
- 201: AgentProfile;
832
+ type AgentsExecutionScriptHybridPlaywrightCompletedDetails = {
833
+ actionName: 'script_hybrid_playwright';
834
+ success: boolean;
835
+ result: string;
836
+ consoleLogs: Array<string>;
837
+ failedLine?: number;
1007
838
  };
1008
- type CreateAgentProfileResponse = CreateAgentProfileResponses[keyof CreateAgentProfileResponses];
1009
- type DeleteAgentProfileData = {
1010
- body?: never;
1011
- path: {
1012
- /**
1013
- * The ID of the agent profile
1014
- */
1015
- profile_id: string;
1016
- };
1017
- query?: never;
1018
- url: '/agent-profiles/{profile_id}';
839
+ type AgentsExecutionScriptHybridPlaywrightStartedDetails = {
840
+ actionName: 'script_hybrid_playwright';
841
+ llmVars?: Array<string>;
1019
842
  };
1020
- type DeleteAgentProfileErrors = {
1021
- /**
1022
- * Unauthorized - Authentication required
1023
- */
1024
- 401: ErrorResponse;
1025
- /**
1026
- * Forbidden - Insufficient permissions
1027
- */
1028
- 403: ErrorResponse;
1029
- /**
1030
- * Agent profile not found
1031
- */
1032
- 404: ErrorResponse;
1033
- /**
1034
- * Internal server error
1035
- */
1036
- 500: ErrorResponse;
843
+ type AgentsExecutionScriptPadRunFunctionCompletedDetails = {
844
+ actionName: 'scriptpad_run_function';
845
+ success: boolean;
846
+ result: string;
847
+ consoleLogs: Array<string>;
848
+ failedLine?: number;
849
+ };
850
+ type AgentsExecutionScriptPlaywrightCompletedDetails = {
851
+ actionName: 'script_playwright';
852
+ success: boolean;
853
+ result: string;
854
+ consoleLogs: Array<string>;
855
+ failedLine?: number;
856
+ };
857
+ type AgentsExecutionScriptPlaywrightStartedDetails = {
858
+ actionName: 'script_playwright';
859
+ llmVars?: Array<string>;
860
+ };
861
+ type AgentsExecutionScriptpadReadCompletedDetails = {
862
+ actionName: 'scriptpad_read';
863
+ content: string;
864
+ };
865
+ type AgentsExecutionScriptpadReadStartedDetails = {
866
+ actionName: 'scriptpad_read';
867
+ offset: number;
868
+ limit: number;
869
+ };
870
+ type AgentsExecutionScriptpadRunFunctionStartedDetails = {
871
+ actionName: 'scriptpad_run_function';
872
+ functionName: string;
873
+ arguments: unknown;
874
+ };
875
+ type AgentsExecutionScriptpadSearchReplaceCompletedDetails = {
876
+ actionName: 'scriptpad_search_replace';
877
+ linesReplaced: number;
878
+ linesReplacedWith: number;
879
+ oldTotalLines: number;
880
+ newTotalLines: number;
881
+ oldScriptpad?: string;
882
+ newScriptpad?: string;
883
+ };
884
+ type AgentsExecutionScriptpadSearchReplaceStartedDetails = {
885
+ actionName: 'scriptpad_search_replace';
886
+ search: string;
887
+ replace: string;
888
+ replaceAll: boolean;
889
+ };
890
+ type AgentsExecutionScriptpadWriteCompletedDetails = {
891
+ actionName: 'scriptpad_write';
892
+ linesChanged: number;
893
+ totalLines: number;
894
+ patchesApplied: number;
895
+ scriptpad?: string;
896
+ };
897
+ /**
898
+ * Fields that can be used for sorting executions
899
+ */
900
+ type AgentsExecutionSortField = 'created_at' | 'status';
901
+ type AgentsExecutionStatus = 'starting' | 'running' | 'paused' | 'awaiting_confirmation' | 'completed' | 'cancelled' | 'failed' | 'paused_by_agent';
902
+ type AgentsExecutionTerminalPayload = {
903
+ activityType: 'terminal';
904
+ reason: 'unsubscribe' | 'complete' | 'error';
905
+ message?: string;
906
+ };
907
+ type AgentsExecutionTransitionDetails = {
908
+ transitionID: CommonUuid;
909
+ transitionType: string;
1037
910
  };
1038
- type DeleteAgentProfileError = DeleteAgentProfileErrors[keyof DeleteAgentProfileErrors];
1039
- type DeleteAgentProfileResponses = {
911
+ type AgentsExecutionUpdateExecutionStatusRequest = {
1040
912
  /**
1041
- * Agent profile deleted successfully
913
+ * The new status to set for the execution
1042
914
  */
1043
- 200: {
1044
- message?: string;
1045
- };
915
+ status: AgentsExecutionUpdateableStatus;
1046
916
  };
1047
- type DeleteAgentProfileResponse = DeleteAgentProfileResponses[keyof DeleteAgentProfileResponses];
1048
- type GetAgentProfileData = {
1049
- body?: never;
1050
- path: {
1051
- /**
1052
- * The ID of the agent profile
1053
- */
1054
- profile_id: string;
1055
- };
1056
- query?: never;
1057
- url: '/agent-profiles/{profile_id}';
917
+ type AgentsExecutionUpdateType = 'add' | 'edit' | 'delete';
918
+ /**
919
+ * Status values that can be set via the update endpoint
920
+ */
921
+ type AgentsExecutionUpdateableStatus = 'running' | 'paused' | 'cancelled';
922
+ type AgentsExecutionUserMessagesAddTextBody = {
923
+ message: string;
924
+ };
925
+ type AgentsExecutionUtilGetDatetimeCompletedDetails = {
926
+ actionName: 'util_get_datetime';
927
+ usedBrowserTimezone: boolean;
928
+ datetime: string;
929
+ tzTimezoneIdentifier: string;
930
+ };
931
+ type AgentsExecutionUtilGetDatetimeStartedDetails = {
932
+ actionName: 'util_get_datetime';
933
+ tzTimezoneIdentifier: string;
934
+ };
935
+ type AgentsExecutionWorkflowUpdate = {
936
+ updateType: AgentsExecutionUpdateType;
937
+ rulesDetails?: AgentsExecutionRulesDetails;
938
+ nodeDetails?: AgentsExecutionNodeDetails;
939
+ transitionDetails?: AgentsExecutionTransitionDetails;
940
+ };
941
+ type AgentsFilesFile = {
942
+ id: CommonUuid;
943
+ executionId: CommonUuid;
944
+ agentId: CommonUuid;
945
+ filePath: string;
946
+ fileName: string;
947
+ fileExt: string;
948
+ fileSize: number;
949
+ fileType: string;
950
+ mimeType: string;
951
+ createdAt: string;
952
+ signedUrl: string;
953
+ };
954
+ type AgentsFilesFilePart = Blob | File;
955
+ type AgentsFilesTempFile = {
956
+ id: CommonUuid;
957
+ name: string;
958
+ };
959
+ type AgentsFilesTempFilesResponse = {
960
+ tempFiles: Array<AgentsFilesTempFile>;
961
+ };
962
+ type AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVar = {
963
+ name: string;
964
+ type: AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVarType;
965
+ description: string;
1058
966
  };
1059
- type GetAgentProfileErrors = {
967
+ type AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVarType = 'string' | 'number' | 'boolean';
968
+ type AgentsGraphModelsTransitionsTransitionType = 'iris' | 'selector' | 'outcome_success';
969
+ /**
970
+ * An agent profile containing browser configuration and credentials
971
+ */
972
+ type AgentsProfileAgentProfile = {
1060
973
  /**
1061
- * Unauthorized - Authentication required
974
+ * Unique identifier for the agent profile
1062
975
  */
1063
- 401: ErrorResponse;
976
+ id: CommonUuid;
1064
977
  /**
1065
- * Forbidden - Insufficient permissions
978
+ * Name of the agent profile (unique within organization)
1066
979
  */
1067
- 403: ErrorResponse;
980
+ name: string;
1068
981
  /**
1069
- * Agent profile not found
982
+ * Description of the agent profile
1070
983
  */
1071
- 404: ErrorResponse;
984
+ description: string;
1072
985
  /**
1073
- * Internal server error
986
+ * The ID of the organization that owns this profile
1074
987
  */
1075
- 500: ErrorResponse;
1076
- };
1077
- type GetAgentProfileError = GetAgentProfileErrors[keyof GetAgentProfileErrors];
1078
- type GetAgentProfileResponses = {
988
+ organizationId: CommonUuid;
1079
989
  /**
1080
- * Agent profile found
990
+ * Country code for proxy location
1081
991
  */
1082
- 200: AgentProfile;
1083
- };
1084
- type GetAgentProfileResponse = GetAgentProfileResponses[keyof GetAgentProfileResponses];
1085
- type UpdateAgentProfileData = {
1086
- body: UpdateAgentProfileRequest;
1087
- path: {
1088
- /**
1089
- * The ID of the agent profile
1090
- */
1091
- profile_id: string;
1092
- };
1093
- query?: never;
1094
- url: '/agent-profiles/{profile_id}';
1095
- };
1096
- type UpdateAgentProfileErrors = {
992
+ proxyCC?: AgentsProfileCountryCode;
1097
993
  /**
1098
- * Bad request - Invalid input
994
+ * Type of proxy to use
1099
995
  */
1100
- 400: ErrorResponse;
996
+ proxyType?: AgentsProfileProxyType;
1101
997
  /**
1102
- * Unauthorized - Authentication required
998
+ * Whether the captcha solver is active for this profile
1103
999
  */
1104
- 401: ErrorResponse;
1000
+ captchaSolverActive: boolean;
1105
1001
  /**
1106
- * Forbidden - Insufficient permissions
1002
+ * Whether to use the same IP address for all executions
1107
1003
  */
1108
- 403: ErrorResponse;
1004
+ stickyIP: boolean;
1109
1005
  /**
1110
- * Agent profile not found
1006
+ * Operating system to emulate
1111
1007
  */
1112
- 404: ErrorResponse;
1008
+ operatingSystem?: AgentsProfileOperatingSystem;
1113
1009
  /**
1114
- * Internal server error
1010
+ * Whether extra stealth mode is enabled
1115
1011
  */
1116
- 500: ErrorResponse;
1117
- };
1118
- type UpdateAgentProfileError = UpdateAgentProfileErrors[keyof UpdateAgentProfileErrors];
1119
- type UpdateAgentProfileResponses = {
1012
+ extraStealth: boolean;
1120
1013
  /**
1121
- * Agent profile updated successfully
1014
+ * Whether to persist browser cache between sessions
1122
1015
  */
1123
- 200: AgentProfile;
1124
- };
1125
- type UpdateAgentProfileResponse = UpdateAgentProfileResponses[keyof UpdateAgentProfileResponses];
1126
- type GetCredentialsPublicKeyData = {
1127
- body?: never;
1128
- path?: never;
1129
- query?: never;
1130
- url: '/credentials/public_key';
1131
- };
1132
- type GetCredentialsPublicKeyErrors = {
1016
+ cachePersistence: boolean;
1133
1017
  /**
1134
- * Public key not found
1018
+ * List of credentials associated with this profile
1135
1019
  */
1136
- 404: unknown;
1137
- };
1138
- type GetCredentialsPublicKeyResponses = {
1020
+ credentials: Array<AgentsProfileCredential>;
1139
1021
  /**
1140
- * The public key for credentials
1022
+ * List of cookies associated with this profile
1141
1023
  */
1142
- 200: string;
1143
- };
1144
- type GetCredentialsPublicKeyResponse = GetCredentialsPublicKeyResponses[keyof GetCredentialsPublicKeyResponses];
1145
- type ClientOptions$1 = {
1146
- baseUrl: 'https://odyssey.asteroid.ai/api/v1' | `${string}://${string}/api/v1` | (string & {});
1024
+ cookies: Array<AgentsProfileCookie>;
1025
+ /**
1026
+ * When the profile was created
1027
+ */
1028
+ createdAt: string;
1029
+ /**
1030
+ * When the profile was last updated
1031
+ */
1032
+ updatedAt: string;
1147
1033
  };
1148
-
1149
- type types_gen$1_AgentExecutionRequest = AgentExecutionRequest;
1150
- type types_gen$1_AgentProfile = AgentProfile;
1151
- type types_gen$1_BrowserSessionRecordingResponse = BrowserSessionRecordingResponse;
1152
- type types_gen$1_Cookie = Cookie;
1153
- type types_gen$1_CountryCode = CountryCode;
1154
- type types_gen$1_CreateAgentProfileData = CreateAgentProfileData;
1155
- type types_gen$1_CreateAgentProfileError = CreateAgentProfileError;
1156
- type types_gen$1_CreateAgentProfileErrors = CreateAgentProfileErrors;
1157
- type types_gen$1_CreateAgentProfileRequest = CreateAgentProfileRequest;
1158
- type types_gen$1_CreateAgentProfileResponse = CreateAgentProfileResponse;
1159
- type types_gen$1_CreateAgentProfileResponses = CreateAgentProfileResponses;
1160
- type types_gen$1_Credential = Credential;
1161
- type types_gen$1_DeleteAgentProfileData = DeleteAgentProfileData;
1162
- type types_gen$1_DeleteAgentProfileError = DeleteAgentProfileError;
1163
- type types_gen$1_DeleteAgentProfileErrors = DeleteAgentProfileErrors;
1164
- type types_gen$1_DeleteAgentProfileResponse = DeleteAgentProfileResponse;
1165
- type types_gen$1_DeleteAgentProfileResponses = DeleteAgentProfileResponses;
1166
- type types_gen$1_ErrorResponse = ErrorResponse;
1167
- type types_gen$1_ExecuteAgentData = ExecuteAgentData;
1168
- type types_gen$1_ExecuteAgentError = ExecuteAgentError;
1169
- type types_gen$1_ExecuteAgentErrors = ExecuteAgentErrors;
1170
- type types_gen$1_ExecuteAgentResponse = ExecuteAgentResponse;
1171
- type types_gen$1_ExecuteAgentResponses = ExecuteAgentResponses;
1172
- type types_gen$1_ExecuteAgentStructuredData = ExecuteAgentStructuredData;
1173
- type types_gen$1_ExecuteAgentStructuredError = ExecuteAgentStructuredError;
1174
- type types_gen$1_ExecuteAgentStructuredErrors = ExecuteAgentStructuredErrors;
1175
- type types_gen$1_ExecuteAgentStructuredResponse = ExecuteAgentStructuredResponse;
1176
- type types_gen$1_ExecuteAgentStructuredResponses = ExecuteAgentStructuredResponses;
1177
- type types_gen$1_ExecutionResponse = ExecutionResponse;
1178
- type types_gen$1_ExecutionResult = ExecutionResult;
1179
- type types_gen$1_ExecutionResultResponse = ExecutionResultResponse;
1180
- type types_gen$1_ExecutionStatusResponse = ExecutionStatusResponse;
1181
- type types_gen$1_GetAgentProfileData = GetAgentProfileData;
1182
- type types_gen$1_GetAgentProfileError = GetAgentProfileError;
1183
- type types_gen$1_GetAgentProfileErrors = GetAgentProfileErrors;
1184
- type types_gen$1_GetAgentProfileResponse = GetAgentProfileResponse;
1185
- type types_gen$1_GetAgentProfileResponses = GetAgentProfileResponses;
1186
- type types_gen$1_GetAgentProfilesData = GetAgentProfilesData;
1187
- type types_gen$1_GetAgentProfilesError = GetAgentProfilesError;
1188
- type types_gen$1_GetAgentProfilesErrors = GetAgentProfilesErrors;
1189
- type types_gen$1_GetAgentProfilesResponse = GetAgentProfilesResponse;
1190
- type types_gen$1_GetAgentProfilesResponses = GetAgentProfilesResponses;
1191
- type types_gen$1_GetBrowserSessionRecordingData = GetBrowserSessionRecordingData;
1192
- type types_gen$1_GetBrowserSessionRecordingError = GetBrowserSessionRecordingError;
1193
- type types_gen$1_GetBrowserSessionRecordingErrors = GetBrowserSessionRecordingErrors;
1194
- type types_gen$1_GetBrowserSessionRecordingResponse = GetBrowserSessionRecordingResponse;
1195
- type types_gen$1_GetBrowserSessionRecordingResponses = GetBrowserSessionRecordingResponses;
1196
- type types_gen$1_GetCredentialsPublicKeyData = GetCredentialsPublicKeyData;
1197
- type types_gen$1_GetCredentialsPublicKeyErrors = GetCredentialsPublicKeyErrors;
1198
- type types_gen$1_GetCredentialsPublicKeyResponse = GetCredentialsPublicKeyResponse;
1199
- type types_gen$1_GetCredentialsPublicKeyResponses = GetCredentialsPublicKeyResponses;
1200
- type types_gen$1_GetExecutionResultData = GetExecutionResultData;
1201
- type types_gen$1_GetExecutionResultError = GetExecutionResultError;
1202
- type types_gen$1_GetExecutionResultErrors = GetExecutionResultErrors;
1203
- type types_gen$1_GetExecutionResultResponse = GetExecutionResultResponse;
1204
- type types_gen$1_GetExecutionResultResponses = GetExecutionResultResponses;
1205
- type types_gen$1_GetExecutionStatusData = GetExecutionStatusData;
1206
- type types_gen$1_GetExecutionStatusError = GetExecutionStatusError;
1207
- type types_gen$1_GetExecutionStatusErrors = GetExecutionStatusErrors;
1208
- type types_gen$1_GetExecutionStatusResponse = GetExecutionStatusResponse;
1209
- type types_gen$1_GetExecutionStatusResponses = GetExecutionStatusResponses;
1210
- type types_gen$1_GetOpenApiData = GetOpenApiData;
1211
- type types_gen$1_GetOpenApiResponses = GetOpenApiResponses;
1212
- type types_gen$1_HealthCheckData = HealthCheckData;
1213
- type types_gen$1_HealthCheckError = HealthCheckError;
1214
- type types_gen$1_HealthCheckErrors = HealthCheckErrors;
1215
- type types_gen$1_HealthCheckResponse = HealthCheckResponse;
1216
- type types_gen$1_HealthCheckResponses = HealthCheckResponses;
1217
- type types_gen$1_ProxyType = ProxyType;
1218
- type types_gen$1_Status = Status;
1219
- type types_gen$1_StructuredAgentExecutionRequest = StructuredAgentExecutionRequest;
1220
- type types_gen$1_UpdateAgentProfileData = UpdateAgentProfileData;
1221
- type types_gen$1_UpdateAgentProfileError = UpdateAgentProfileError;
1222
- type types_gen$1_UpdateAgentProfileErrors = UpdateAgentProfileErrors;
1223
- type types_gen$1_UpdateAgentProfileRequest = UpdateAgentProfileRequest;
1224
- type types_gen$1_UpdateAgentProfileResponse = UpdateAgentProfileResponse;
1225
- type types_gen$1_UpdateAgentProfileResponses = UpdateAgentProfileResponses;
1226
- declare namespace types_gen$1 {
1227
- 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_Cookie as Cookie, 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 };
1228
- }
1229
-
1230
- type AgentsAgentBase = {
1231
- id: CommonUuid;
1034
+ /**
1035
+ * A browser cookie stored for an agent profile
1036
+ */
1037
+ type AgentsProfileCookie = {
1038
+ /**
1039
+ * Unique identifier for the cookie
1040
+ */
1041
+ id?: CommonUuid;
1042
+ /**
1043
+ * Display name for the cookie
1044
+ */
1232
1045
  name: string;
1233
- createdAt: string;
1234
- organizationId?: CommonUuid;
1235
- userId: CommonUuid;
1046
+ /**
1047
+ * The cookie key/name as sent in HTTP headers
1048
+ */
1049
+ key: string;
1050
+ /**
1051
+ * The cookie value
1052
+ */
1053
+ value: string;
1054
+ /**
1055
+ * When the cookie expires (optional)
1056
+ */
1057
+ expiry?: string;
1058
+ /**
1059
+ * The domain for which the cookie is valid
1060
+ */
1061
+ domain: string;
1062
+ /**
1063
+ * Whether the cookie should only be sent over HTTPS
1064
+ */
1065
+ secure: boolean;
1066
+ /**
1067
+ * SameSite attribute for the cookie
1068
+ */
1069
+ sameSite: AgentsProfileSameSite;
1070
+ /**
1071
+ * Whether the cookie should be accessible only via HTTP(S)
1072
+ */
1073
+ httpOnly: boolean;
1074
+ /**
1075
+ * When the cookie was created
1076
+ */
1077
+ createdAt?: string;
1236
1078
  };
1237
- type AgentsAgentExecuteAgentRequest = {
1079
+ /**
1080
+ * Two-letter country code for proxy location
1081
+ */
1082
+ type AgentsProfileCountryCode = 'us' | 'uk' | 'fr' | 'it' | 'jp' | 'au' | 'de' | 'fi' | 'ca';
1083
+ /**
1084
+ * Request to create a new agent profile
1085
+ */
1086
+ type AgentsProfileCreateAgentProfileRequest = {
1238
1087
  /**
1239
- * The ID of the agent profile to use. Note this is not the agent ID
1088
+ * Name of the agent profile (must be unique within organization)
1240
1089
  */
1241
- agentProfileId?: CommonUuid;
1090
+ name: string;
1242
1091
  /**
1243
- * Dynamic data to be merged into the placeholders defined in prompts
1092
+ * Description of the agent profile
1244
1093
  */
1245
- dynamicData?: {
1246
- [key: string]: unknown;
1247
- };
1094
+ description: string;
1248
1095
  /**
1249
- * Array of temporary files to attach to the execution. Must have been pre-uploaded using the stage file endpoint
1096
+ * The ID of the organization that the profile belongs to
1250
1097
  */
1251
- tempFiles?: Array<AgentsFilesTempFile>;
1098
+ organizationId: CommonUuid;
1252
1099
  /**
1253
- * Optional metadata key-value pairs (string keys and string values) for organizing and filtering executions
1100
+ * Country code for proxy location
1254
1101
  */
1255
- metadata?: {
1256
- [key: string]: unknown;
1257
- };
1102
+ proxyCC?: AgentsProfileCountryCode;
1258
1103
  /**
1259
- * The version of the agent to execute. If not provided, the latest version will be used.
1104
+ * Type of proxy to use
1260
1105
  */
1261
- version?: number;
1106
+ proxyType?: AgentsProfileProxyType;
1107
+ /**
1108
+ * Whether the captcha solver should be active
1109
+ */
1110
+ captchaSolverActive?: boolean;
1111
+ /**
1112
+ * Whether to use the same IP address for all executions
1113
+ */
1114
+ stickyIP?: boolean;
1115
+ /**
1116
+ * Operating system to emulate
1117
+ */
1118
+ operatingSystem?: AgentsProfileOperatingSystem;
1119
+ /**
1120
+ * Whether to enable extra stealth mode
1121
+ */
1122
+ extraStealth?: boolean;
1123
+ /**
1124
+ * Whether to persist browser cache between sessions
1125
+ */
1126
+ cachePersistence?: boolean;
1127
+ /**
1128
+ * Initial credentials to create with the profile
1129
+ */
1130
+ credentials?: Array<AgentsProfileCredential>;
1131
+ /**
1132
+ * Initial cookies to create with the profile
1133
+ */
1134
+ cookies?: Array<AgentsProfileCookie>;
1262
1135
  };
1263
- type AgentsAgentExecuteAgentResponse = {
1136
+ /**
1137
+ * A credential stored for an agent profile
1138
+ */
1139
+ type AgentsProfileCredential = {
1264
1140
  /**
1265
- * The ID of the newly created execution
1141
+ * Unique identifier for the credential
1266
1142
  */
1267
- executionId: CommonUuid;
1143
+ id?: CommonUuid;
1144
+ /**
1145
+ * Display name for the credential (will be uppercased)
1146
+ */
1147
+ name: string;
1148
+ /**
1149
+ * The credential value (plaintext - will be encrypted server-side)
1150
+ */
1151
+ data: string;
1152
+ /**
1153
+ * When the credential was created
1154
+ */
1155
+ createdAt?: string;
1268
1156
  };
1269
- type AgentsAgentSortField = 'name' | 'created_at';
1270
- type AgentsExecutionActionName = 'element_click' | 'element_type' | 'element_select' | 'element_hover' | 'element_drag' | 'element_wait' | 'element_fill_form' | 'element_get_text' | 'element_file_upload' | 'coord_move' | 'coord_click' | 'coord_double_click' | 'coord_drag' | 'coord_scroll' | 'nav_to' | 'nav_back' | 'nav_refresh' | 'nav_tabs' | 'nav_close_browser' | 'nav_resize_browser' | 'nav_install_browser' | 'nav_zoom_in' | 'nav_zoom_out' | 'obs_snapshot' | 'obs_snapshot_with_selectors' | 'obs_screenshot' | 'obs_console_messages' | 'obs_network_requests' | 'obs_extract_html' | 'script_eval' | 'script_playwright' | 'script_playwright_llm_vars' | 'script_hybrid_playwright' | 'browser_press_key' | 'browser_handle_dialog' | 'browser_read_clipboard' | 'file_list' | 'file_read' | 'file_stage' | 'file_download' | 'file_pdf_save' | 'scratchpad_read' | 'scratchpad_write' | 'scriptpad_run_function' | 'scriptpad_search_replace' | 'scriptpad_read' | 'scriptpad_write' | 'ext_google_sheets_get_data' | 'ext_google_sheets_set_value' | 'ext_get_mail' | 'ext_api_call' | 'util_wait_time' | 'util_get_datetime' | 'util_generate_totp_secret' | 'util_send_user_message' | 'agent_query_context' | 'agent_compile_workflow' | 'llm_call';
1271
- type AgentsExecutionActivity = {
1272
- id: CommonUuid;
1273
- payload: AgentsExecutionActivityPayloadUnion;
1274
- executionId: CommonUuid;
1275
- timestamp: string;
1157
+ /**
1158
+ * Operating system to emulate in the browser
1159
+ */
1160
+ type AgentsProfileOperatingSystem = 'macos' | 'windows';
1161
+ /**
1162
+ * Type of proxy to use for browser sessions
1163
+ */
1164
+ type AgentsProfileProxyType = 'basic' | 'residential' | 'mobile';
1165
+ /**
1166
+ * SameSite attribute for cookies
1167
+ */
1168
+ type AgentsProfileSameSite = 'Strict' | 'Lax' | 'None';
1169
+ /**
1170
+ * Available fields for sorting agent profiles
1171
+ */
1172
+ type AgentsProfileSortField = 'name' | 'created_at' | 'updated_at';
1173
+ /**
1174
+ * Request to update an existing agent profile
1175
+ */
1176
+ type AgentsProfileUpdateAgentProfileRequest = {
1177
+ /**
1178
+ * New name for the profile
1179
+ */
1180
+ name?: string;
1181
+ /**
1182
+ * New description for the profile
1183
+ */
1184
+ description?: string;
1185
+ /**
1186
+ * Country code for proxy location
1187
+ */
1188
+ proxyCC?: AgentsProfileCountryCode;
1189
+ /**
1190
+ * Type of proxy to use (set to empty string to disable proxy)
1191
+ */
1192
+ proxyType?: AgentsProfileProxyType;
1193
+ /**
1194
+ * Whether the captcha solver should be active
1195
+ */
1196
+ captchaSolverActive?: boolean;
1197
+ /**
1198
+ * Operating system to emulate
1199
+ */
1200
+ operatingSystem?: AgentsProfileOperatingSystem;
1201
+ /**
1202
+ * Whether to enable extra stealth mode
1203
+ */
1204
+ extraStealth?: boolean;
1205
+ /**
1206
+ * Whether to persist browser cache between sessions
1207
+ */
1208
+ cachePersistence?: boolean;
1209
+ /**
1210
+ * Credentials to add to the profile
1211
+ */
1212
+ credentialsToAdd?: Array<AgentsProfileCredential>;
1213
+ /**
1214
+ * IDs of credentials to remove from the profile
1215
+ */
1216
+ credentialsToDelete?: Array<CommonUuid>;
1217
+ /**
1218
+ * Cookies to add to the profile
1219
+ */
1220
+ cookiesToAdd?: Array<AgentsProfileCookie>;
1221
+ /**
1222
+ * IDs of cookies to remove from the profile
1223
+ */
1224
+ cookiesToDelete?: Array<CommonUuid>;
1276
1225
  };
1277
- type AgentsExecutionActivityActionCompletedInfo = ({
1278
- actionName: 'ext_api_call';
1279
- } & AgentsExecutionExtApiCallCompletedDetails) | ({
1280
- actionName: 'scratchpad_read';
1281
- } & AgentsExecutionScratchpadReadCompletedDetails) | ({
1282
- actionName: 'scratchpad_write';
1283
- } & AgentsExecutionScratchpadWriteCompletedDetails) | ({
1284
- actionName: 'script_playwright';
1285
- } & AgentsExecutionScriptPlaywrightCompletedDetails) | ({
1286
- actionName: 'script_hybrid_playwright';
1287
- } & AgentsExecutionScriptHybridPlaywrightCompletedDetails) | ({
1288
- actionName: 'file_read';
1289
- } & AgentsExecutionFileReadCompletedDetails) | ({
1290
- actionName: 'file_list';
1291
- } & AgentsExecutionFileListCompletedDetails) | ({
1292
- actionName: 'file_stage';
1293
- } & AgentsExecutionFileStageCompletedDetails) | ({
1294
- actionName: 'element_file_upload';
1295
- } & AgentsExecutionElementFileUploadCompletedDetails) | ({
1296
- actionName: 'ext_get_mail';
1297
- } & AgentsExecutionExtGetMailCompletedDetails) | ({
1298
- actionName: 'scriptpad_run_function';
1299
- } & AgentsExecutionScriptPadRunFunctionCompletedDetails) | ({
1300
- actionName: 'scriptpad_read';
1301
- } & AgentsExecutionScriptpadReadCompletedDetails) | ({
1302
- actionName: 'scriptpad_write';
1303
- } & AgentsExecutionScriptpadWriteCompletedDetails) | ({
1304
- actionName: 'scriptpad_search_replace';
1305
- } & AgentsExecutionScriptpadSearchReplaceCompletedDetails) | ({
1306
- actionName: 'obs_snapshot_with_selectors';
1307
- } & AgentsExecutionObsSnapshotWithSelectorsCompletedDetails) | ({
1308
- actionName: 'util_get_datetime';
1309
- } & AgentsExecutionUtilGetDatetimeCompletedDetails) | ({
1310
- actionName: 'nav_to';
1311
- } & AgentsExecutionNavToCompletedDetails);
1312
- type AgentsExecutionActivityActionCompletedPayload = {
1313
- activityType: 'action_completed';
1226
+ type CommonBadRequestErrorBody = {
1227
+ code: 400;
1314
1228
  message: string;
1315
- actionId: string;
1316
- actionName: AgentsExecutionActionName;
1317
- duration?: number;
1318
- info?: AgentsExecutionActivityActionCompletedInfo;
1319
1229
  };
1320
- type AgentsExecutionActivityActionFailedPayload = {
1321
- activityType: 'action_failed';
1230
+ type CommonError = {
1231
+ code: number;
1322
1232
  message: string;
1323
- actionName: AgentsExecutionActionName;
1324
- actionId: string;
1325
- duration?: number;
1326
1233
  };
1327
- type AgentsExecutionActivityActionStartedInfo = ({
1328
- actionName: 'nav_to';
1329
- } & AgentsExecutionNavToStartedDetails) | ({
1330
- actionName: 'scratchpad_read';
1331
- } & AgentsExecutionScratchpadReadStartedDetails) | ({
1332
- actionName: 'scratchpad_write';
1333
- } & AgentsExecutionScratchpadWriteStartedDetails) | ({
1334
- actionName: 'scriptpad_run_function';
1335
- } & AgentsExecutionScriptpadRunFunctionStartedDetails) | ({
1336
- actionName: 'script_playwright';
1337
- } & AgentsExecutionScriptPlaywrightStartedDetails) | ({
1338
- actionName: 'script_hybrid_playwright';
1339
- } & AgentsExecutionScriptHybridPlaywrightStartedDetails) | ({
1340
- actionName: 'scriptpad_search_replace';
1341
- } & AgentsExecutionScriptpadSearchReplaceStartedDetails) | ({
1342
- actionName: 'util_get_datetime';
1343
- } & AgentsExecutionUtilGetDatetimeStartedDetails) | ({
1344
- actionName: 'scriptpad_read';
1345
- } & AgentsExecutionScriptpadReadStartedDetails) | ({
1346
- actionName: 'llm_call';
1347
- } & AgentsExecutionLlmCallStartedDetails);
1348
- type AgentsExecutionActivityActionStartedPayload = {
1349
- activityType: 'action_started';
1234
+ type CommonForbiddenErrorBody = {
1235
+ code: 403;
1350
1236
  message: string;
1351
- actionName: AgentsExecutionActionName;
1352
- actionId: string;
1353
- info?: AgentsExecutionActivityActionStartedInfo;
1354
1237
  };
1355
- type AgentsExecutionActivityFileAddedPayload = {
1356
- activityType: 'file_added';
1357
- fileId: CommonUuid;
1358
- fileName: string;
1359
- mimeType: string;
1360
- fileSize: number;
1361
- source: 'upload' | 'download';
1362
- presignedUrl: string;
1363
- };
1364
- type AgentsExecutionActivityGenericPayload = {
1365
- activityType: 'generic';
1238
+ type CommonInternalServerErrorBody = {
1239
+ code: 500;
1366
1240
  message: string;
1367
1241
  };
1368
- type AgentsExecutionActivityPayloadUnion = ({
1369
- activityType: 'terminal';
1370
- } & AgentsExecutionTerminalPayload) | ({
1371
- activityType: 'generic';
1372
- } & AgentsExecutionActivityGenericPayload) | ({
1373
- activityType: 'reasoning';
1374
- } & AgentsExecutionActivityReasoningPayload) | ({
1375
- activityType: 'step_started';
1376
- } & AgentsExecutionActivityStepStartedPayload) | ({
1377
- activityType: 'step_completed';
1378
- } & AgentsExecutionActivityStepCompletedPayload) | ({
1379
- activityType: 'transitioned_node';
1380
- } & AgentsExecutionActivityTransitionedNodePayload) | ({
1381
- activityType: 'status_changed';
1382
- } & AgentsExecutionActivityStatusChangedPayload) | ({
1383
- activityType: 'action_started';
1384
- } & AgentsExecutionActivityActionStartedPayload) | ({
1385
- activityType: 'action_completed';
1386
- } & AgentsExecutionActivityActionCompletedPayload) | ({
1387
- activityType: 'action_failed';
1388
- } & AgentsExecutionActivityActionFailedPayload) | ({
1389
- activityType: 'user_message_received';
1390
- } & AgentsExecutionActivityUserMessageReceivedPayload) | ({
1391
- activityType: 'file_added';
1392
- } & AgentsExecutionActivityFileAddedPayload) | ({
1393
- activityType: 'workflow_updated';
1394
- } & AgentsExecutionActivityWorkflowUpdatedPayload) | ({
1395
- activityType: 'playwright_script_generated';
1396
- } & AgentsExecutionActivityPlaywrightScriptGeneratedPayload);
1397
- type AgentsExecutionActivityPlaywrightScriptGeneratedPayload = {
1398
- activityType: 'playwright_script_generated';
1399
- nodeId: CommonUuid;
1400
- nodeName: string;
1401
- script: string;
1402
- llmVars?: Array<AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVar>;
1403
- context: string;
1404
- oldScript?: string;
1405
- };
1406
- type AgentsExecutionActivityReasoningPayload = {
1407
- activityType: 'reasoning';
1408
- reasoning: string;
1409
- };
1410
- type AgentsExecutionActivityStatusChangedPayload = {
1411
- activityType: 'status_changed';
1412
- status: AgentsExecutionStatus;
1413
- completedPayload?: AgentsExecutionCompletedPayload;
1414
- failedPayload?: AgentsExecutionFailedPayload;
1415
- pausedPayload?: AgentsExecutionPausedPayload;
1416
- awaitingConfirmationPayload?: AgentsExecutionAwaitingConfirmationPayload;
1417
- cancelledPayload?: AgentsExecutionCancelledPayload;
1418
- };
1419
- type AgentsExecutionActivityStepCompletedPayload = {
1420
- activityType: 'step_completed';
1421
- stepNumber: number;
1422
- };
1423
- type AgentsExecutionActivityStepStartedPayload = {
1424
- activityType: 'step_started';
1425
- stepNumber: number;
1426
- };
1427
- type AgentsExecutionActivityTransitionedNodePayload = {
1428
- activityType: 'transitioned_node';
1429
- newNodeUUID: CommonUuid;
1430
- newNodeName: string;
1431
- newNodeType: string;
1432
- fromNodeDuration?: number;
1433
- transitionType?: AgentsGraphModelsTransitionsTransitionType;
1434
- };
1435
- type AgentsExecutionActivityUserMessageReceivedPayload = {
1436
- activityType: 'user_message_received';
1242
+ type CommonNotFoundErrorBody = {
1243
+ code: 404;
1437
1244
  message: string;
1438
- userUUID: CommonUuid;
1439
1245
  };
1440
- type AgentsExecutionActivityWorkflowUpdatedPayload = {
1441
- activityType: 'workflow_updated';
1442
- workflowUpdate: Array<AgentsExecutionWorkflowUpdate>;
1443
- };
1444
- type AgentsExecutionAwaitingConfirmationPayload = {
1445
- reason: string;
1246
+ type CommonOsError = {
1247
+ message: string;
1446
1248
  };
1447
- type AgentsExecutionCancelReason = 'timeout' | 'max_steps' | 'user_requested';
1448
- type AgentsExecutionCancelledPayload = {
1449
- reason: AgentsExecutionCancelReason;
1249
+ type CommonSortDirection = 'asc' | 'desc';
1250
+ type CommonUnauthorizedErrorBody = {
1251
+ code: 401;
1252
+ message: string;
1450
1253
  };
1254
+ type CommonUuid = string;
1255
+ type Version = 'v1';
1256
+ type AgentsAgentSearch = string;
1451
1257
  /**
1452
- * User comment on an execution
1258
+ * Filter by agent ID
1453
1259
  */
1454
- type AgentsExecutionComment = {
1260
+ type AgentsExecutionSearchAgentId = CommonUuid;
1261
+ /**
1262
+ * Filter executions created after this timestamp
1263
+ */
1264
+ type AgentsExecutionSearchCreatedAfter = string;
1265
+ /**
1266
+ * Filter executions created before this timestamp
1267
+ */
1268
+ type AgentsExecutionSearchCreatedBefore = string;
1269
+ /**
1270
+ * Search by execution ID (partial, case-insensitive match)
1271
+ */
1272
+ type AgentsExecutionSearchExecutionId = string;
1273
+ /**
1274
+ * Filter by human labels (can specify multiple label IDs, there is an 'OR' condition applied to these)
1275
+ */
1276
+ type AgentsExecutionSearchHumanLabels = Array<CommonUuid>;
1277
+ /**
1278
+ * Filter by metadata key - must be used together with metadataValue
1279
+ */
1280
+ type AgentsExecutionSearchMetadataKey = string;
1281
+ /**
1282
+ * Filter by metadata value - must be used together with metadataKey
1283
+ */
1284
+ type AgentsExecutionSearchMetadataValue = string;
1285
+ /**
1286
+ * Filter by execution result outcome (partial, case-insensitive match)
1287
+ */
1288
+ type AgentsExecutionSearchOutcomeLabel = string;
1289
+ /**
1290
+ * Filter by execution status (can specify multiple, there is an 'OR' condition applied to these)
1291
+ */
1292
+ type AgentsExecutionSearchStatus = Array<AgentsExecutionStatus>;
1293
+ /**
1294
+ * Search profiles by name (partial match)
1295
+ */
1296
+ type AgentsProfileSearch = string;
1297
+ type CommonPaginationPage = number;
1298
+ type CommonPaginationPageSize = number;
1299
+ type AgentProfilesListData = {
1300
+ body?: never;
1301
+ path?: never;
1302
+ query?: {
1303
+ /**
1304
+ * Filter by organization ID
1305
+ */
1306
+ organizationId?: CommonUuid;
1307
+ pageSize?: number;
1308
+ page?: number;
1309
+ /**
1310
+ * Search profiles by name (partial match)
1311
+ */
1312
+ searchName?: string;
1313
+ sortField?: AgentsProfileSortField;
1314
+ sortDirection?: CommonSortDirection;
1315
+ };
1316
+ url: '/agent-profiles';
1317
+ };
1318
+ type AgentProfilesListErrors = {
1455
1319
  /**
1456
- * Unique identifier for the comment
1320
+ * The server could not understand the request due to invalid syntax.
1457
1321
  */
1458
- id: CommonUuid;
1322
+ 400: CommonBadRequestErrorBody;
1459
1323
  /**
1460
- * Execution this comment belongs to
1324
+ * Access is unauthorized.
1461
1325
  */
1462
- executionId: CommonUuid;
1326
+ 401: CommonUnauthorizedErrorBody;
1463
1327
  /**
1464
- * User who created the comment
1328
+ * Access is forbidden.
1465
1329
  */
1466
- userId: CommonUuid;
1330
+ 403: CommonForbiddenErrorBody;
1467
1331
  /**
1468
- * Comment content
1332
+ * The server cannot find the requested resource.
1469
1333
  */
1470
- content: string;
1334
+ 404: CommonNotFoundErrorBody;
1471
1335
  /**
1472
- * Whether the comment is public
1336
+ * Server error
1473
1337
  */
1474
- public: boolean;
1338
+ 500: CommonInternalServerErrorBody;
1339
+ };
1340
+ type AgentProfilesListError = AgentProfilesListErrors[keyof AgentProfilesListErrors];
1341
+ type AgentProfilesListResponses = {
1475
1342
  /**
1476
- * When the comment was created
1343
+ * The request has succeeded.
1477
1344
  */
1478
- createdAt: string;
1345
+ 200: {
1346
+ items: Array<AgentsProfileAgentProfile>;
1347
+ page: number;
1348
+ pageSize: number;
1349
+ total: number;
1350
+ };
1351
+ };
1352
+ type AgentProfilesListResponse = AgentProfilesListResponses[keyof AgentProfilesListResponses];
1353
+ type AgentProfilesCreateData = {
1479
1354
  /**
1480
- * When the comment was last updated
1355
+ * Agent profile to create
1481
1356
  */
1482
- updatedAt?: string;
1483
- };
1484
- type AgentsExecutionCompletedPayload = {
1485
- outcome: string;
1486
- reasoning: string;
1487
- result: unknown;
1488
- lessons_learned?: string;
1489
- };
1490
- type AgentsExecutionElementFileUploadCompletedDetails = {
1491
- actionName: 'element_file_upload';
1492
- fileNames: Array<string>;
1357
+ body: AgentsProfileCreateAgentProfileRequest;
1358
+ path?: never;
1359
+ query?: never;
1360
+ url: '/agent-profiles';
1493
1361
  };
1494
- /**
1495
- * Execution result containing outcome, reasoning, and result data
1496
- */
1497
- type AgentsExecutionExecutionResult = {
1362
+ type AgentProfilesCreateErrors = {
1498
1363
  /**
1499
- * Unique identifier for the result
1364
+ * The server could not understand the request due to invalid syntax.
1500
1365
  */
1501
- id: CommonUuid;
1366
+ 400: CommonBadRequestErrorBody;
1502
1367
  /**
1503
- * Execution this result belongs to
1368
+ * Access is unauthorized.
1504
1369
  */
1505
- executionId: CommonUuid;
1370
+ 401: CommonUnauthorizedErrorBody;
1506
1371
  /**
1507
- * Outcome of the execution (success or failure)
1372
+ * Access is forbidden.
1508
1373
  */
1509
- outcome: string;
1374
+ 403: CommonForbiddenErrorBody;
1510
1375
  /**
1511
- * AI reasoning for the outcome
1376
+ * The server cannot find the requested resource.
1512
1377
  */
1513
- reasoning: string;
1378
+ 404: CommonNotFoundErrorBody;
1514
1379
  /**
1515
- * Result data as JSON
1380
+ * Server error
1516
1381
  */
1517
- result: unknown;
1382
+ 500: CommonInternalServerErrorBody;
1383
+ };
1384
+ type AgentProfilesCreateError = AgentProfilesCreateErrors[keyof AgentProfilesCreateErrors];
1385
+ type AgentProfilesCreateResponses = {
1518
1386
  /**
1519
- * When the result was created
1387
+ * The request has succeeded and a new resource has been created as a result.
1520
1388
  */
1521
- createdAt: string;
1522
- };
1523
- type AgentsExecutionExtApiCallCompletedDetails = {
1524
- actionName: 'ext_api_call';
1525
- statusCode: string;
1526
- responseBody: string;
1527
- requestMethod?: string;
1528
- requestUrl?: string;
1529
- };
1530
- type AgentsExecutionExtGetMailCompletedDetails = {
1531
- actionName: 'ext_get_mail';
1532
- emailCount: number;
1533
- emails: Array<unknown>;
1534
- };
1535
- type AgentsExecutionFailedPayload = {
1536
- reason: string;
1537
- os_error?: CommonOsError;
1389
+ 201: AgentsProfileAgentProfile;
1538
1390
  };
1539
- type AgentsExecutionFileListCompletedDetails = {
1540
- actionName: 'file_list';
1541
- fileNames: Array<string>;
1542
- };
1543
- type AgentsExecutionFileReadCompletedDetails = {
1544
- actionName: 'file_read';
1545
- fileNames: Array<string>;
1546
- errorCount?: number;
1547
- totalSizeBytes?: number;
1548
- };
1549
- type AgentsExecutionFileStageCompletedDetails = {
1550
- actionName: 'file_stage';
1551
- fileNames: Array<string>;
1391
+ type AgentProfilesCreateResponse = AgentProfilesCreateResponses[keyof AgentProfilesCreateResponses];
1392
+ type AgentProfileDeleteData = {
1393
+ body?: never;
1394
+ path: {
1395
+ /**
1396
+ * The ID of the agent profile
1397
+ */
1398
+ profileId: CommonUuid;
1399
+ };
1400
+ query?: never;
1401
+ url: '/agent-profiles/{profileId}';
1552
1402
  };
1553
- /**
1554
- * Human-applied label for categorizing executions
1555
- */
1556
- type AgentsExecutionHumanLabel = {
1403
+ type AgentProfileDeleteErrors = {
1557
1404
  /**
1558
- * Unique identifier for the label
1405
+ * The server could not understand the request due to invalid syntax.
1559
1406
  */
1560
- id: CommonUuid;
1407
+ 400: CommonBadRequestErrorBody;
1561
1408
  /**
1562
- * Organization this label belongs to
1409
+ * Access is unauthorized.
1563
1410
  */
1564
- organizationId: CommonUuid;
1411
+ 401: CommonUnauthorizedErrorBody;
1565
1412
  /**
1566
- * Display name of the label
1413
+ * Access is forbidden.
1567
1414
  */
1568
- name: string;
1415
+ 403: CommonForbiddenErrorBody;
1569
1416
  /**
1570
- * Hex color code for the label (e.g., #FF5733)
1417
+ * The server cannot find the requested resource.
1571
1418
  */
1572
- color: string;
1419
+ 404: CommonNotFoundErrorBody;
1573
1420
  /**
1574
- * When the label was created
1421
+ * Server error
1575
1422
  */
1576
- createdAt: string;
1577
- };
1578
- type AgentsExecutionLlmCallPurpose = 'iris_pick_next_action' | 'transition_pick_next_node' | 'output_populate_result' | 'generate_hybrid_playwright_code' | 'generate_playwright_variables';
1579
- type AgentsExecutionLlmCallStartedDetails = {
1580
- actionName: 'llm_call';
1581
- purpose: AgentsExecutionLlmCallPurpose;
1423
+ 500: CommonInternalServerErrorBody;
1582
1424
  };
1583
- /**
1584
- * Represents a single execution in a list view
1585
- */
1586
- type AgentsExecutionListItem = {
1587
- /**
1588
- * The unique identifier of the execution
1589
- */
1590
- id: CommonUuid;
1425
+ type AgentProfileDeleteError = AgentProfileDeleteErrors[keyof AgentProfileDeleteErrors];
1426
+ type AgentProfileDeleteResponses = {
1591
1427
  /**
1592
- * The ID of the agent that was executed
1593
- */
1594
- agentId: CommonUuid;
1595
- /**
1596
- * The ID of the workflow that was executed
1428
+ * There is no content to send for this request, but the headers may be useful.
1597
1429
  */
1598
- workflowId: CommonUuid;
1430
+ 204: void;
1431
+ };
1432
+ type AgentProfileDeleteResponse = AgentProfileDeleteResponses[keyof AgentProfileDeleteResponses];
1433
+ type AgentProfileGetData = {
1434
+ body?: never;
1435
+ path: {
1436
+ /**
1437
+ * The ID of the agent profile
1438
+ */
1439
+ profileId: CommonUuid;
1440
+ };
1441
+ query?: never;
1442
+ url: '/agent-profiles/{profileId}';
1443
+ };
1444
+ type AgentProfileGetErrors = {
1599
1445
  /**
1600
- * The version of the agent that was executed
1446
+ * The server could not understand the request due to invalid syntax.
1601
1447
  */
1602
- agentVersion: number;
1448
+ 400: CommonBadRequestErrorBody;
1603
1449
  /**
1604
- * Whether the agent version was modified from the original
1450
+ * Access is unauthorized.
1605
1451
  */
1606
- agentVersionDirty: boolean;
1452
+ 401: CommonUnauthorizedErrorBody;
1607
1453
  /**
1608
- * The current status of the execution
1454
+ * Access is forbidden.
1609
1455
  */
1610
- status: AgentsExecutionStatus;
1456
+ 403: CommonForbiddenErrorBody;
1611
1457
  /**
1612
- * When the execution was created
1458
+ * The server cannot find the requested resource.
1613
1459
  */
1614
- createdAt: string;
1460
+ 404: CommonNotFoundErrorBody;
1615
1461
  /**
1616
- * When the execution reached a terminal state (if applicable)
1462
+ * Server error
1617
1463
  */
1618
- terminalAt?: string;
1464
+ 500: CommonInternalServerErrorBody;
1465
+ };
1466
+ type AgentProfileGetError = AgentProfileGetErrors[keyof AgentProfileGetErrors];
1467
+ type AgentProfileGetResponses = {
1619
1468
  /**
1620
- * The organization this execution belongs to
1469
+ * The request has succeeded.
1621
1470
  */
1622
- organizationId: CommonUuid;
1471
+ 200: AgentsProfileAgentProfile;
1472
+ };
1473
+ type AgentProfileGetResponse = AgentProfileGetResponses[keyof AgentProfileGetResponses];
1474
+ type AgentProfileUpdateData = {
1623
1475
  /**
1624
- * The agent display name
1476
+ * Fields to update
1625
1477
  */
1626
- agentName: string;
1478
+ body: AgentsProfileUpdateAgentProfileRequest;
1479
+ path: {
1480
+ /**
1481
+ * The ID of the agent profile
1482
+ */
1483
+ profileId: CommonUuid;
1484
+ };
1485
+ query?: never;
1486
+ url: '/agent-profiles/{profileId}';
1487
+ };
1488
+ type AgentProfileUpdateErrors = {
1627
1489
  /**
1628
- * The name of the agent profile used for this execution (if any)
1490
+ * The server could not understand the request due to invalid syntax.
1629
1491
  */
1630
- agentProfileName?: string;
1492
+ 400: CommonBadRequestErrorBody;
1631
1493
  /**
1632
- * Execution result with outcome, reasoning, and result data
1494
+ * Access is unauthorized.
1633
1495
  */
1634
- executionResult?: AgentsExecutionExecutionResult;
1496
+ 401: CommonUnauthorizedErrorBody;
1635
1497
  /**
1636
- * Execution duration in seconds (only present for terminal executions)
1498
+ * Access is forbidden.
1637
1499
  */
1638
- duration?: number;
1500
+ 403: CommonForbiddenErrorBody;
1639
1501
  /**
1640
- * Human-applied labels for this execution
1502
+ * The server cannot find the requested resource.
1641
1503
  */
1642
- humanLabels: Array<AgentsExecutionHumanLabel>;
1504
+ 404: CommonNotFoundErrorBody;
1643
1505
  /**
1644
- * Comments on this execution
1506
+ * Server error
1645
1507
  */
1646
- comments: Array<AgentsExecutionComment>;
1508
+ 500: CommonInternalServerErrorBody;
1509
+ };
1510
+ type AgentProfileUpdateError = AgentProfileUpdateErrors[keyof AgentProfileUpdateErrors];
1511
+ type AgentProfileUpdateResponses = {
1647
1512
  /**
1648
- * Optional metadata key-value pairs attached to this execution
1513
+ * The request has succeeded.
1649
1514
  */
1650
- metadata?: {
1651
- [key: string]: unknown;
1515
+ 200: AgentsProfileAgentProfile;
1516
+ };
1517
+ type AgentProfileUpdateResponse = AgentProfileUpdateResponses[keyof AgentProfileUpdateResponses];
1518
+ type AgentProfileClearBrowserCacheData = {
1519
+ body?: never;
1520
+ path: {
1521
+ /**
1522
+ * The ID of the agent profile
1523
+ */
1524
+ profileId: CommonUuid;
1652
1525
  };
1526
+ query?: never;
1527
+ url: '/agent-profiles/{profileId}/clear-browser-cache';
1528
+ };
1529
+ type AgentProfileClearBrowserCacheErrors = {
1653
1530
  /**
1654
- * Browser recording URL (if a browser session was used and execution is terminal)
1531
+ * The server could not understand the request due to invalid syntax.
1655
1532
  */
1656
- browserRecordingUrl?: string;
1533
+ 400: CommonBadRequestErrorBody;
1657
1534
  /**
1658
- * Browser live view URL for debugging (if a browser session is active and execution is running)
1659
- */
1660
- browserLiveViewUrl?: string;
1661
- };
1662
- type AgentsExecutionNavToCompletedDetails = {
1663
- actionName: 'nav_to';
1664
- pageTitle?: string;
1665
- };
1666
- type AgentsExecutionNavToStartedDetails = {
1667
- actionName: 'nav_to';
1668
- url: string;
1669
- };
1670
- type AgentsExecutionNodeDetails = {
1671
- nodeID: CommonUuid;
1672
- nodeName: string;
1673
- nodeType: string;
1674
- };
1675
- type AgentsExecutionObsSnapshotWithSelectorsCompletedDetails = {
1676
- actionName: 'obs_snapshot_with_selectors';
1677
- url: string;
1678
- title: string;
1679
- };
1680
- type AgentsExecutionPausedPayload = {
1681
- reason: string;
1682
- };
1683
- type AgentsExecutionRulesDetails = {
1684
- rules: string;
1685
- };
1686
- type AgentsExecutionScratchpadReadCompletedDetails = {
1687
- actionName: 'scratchpad_read';
1688
- content?: string;
1689
- contentTruncated?: boolean;
1690
- };
1691
- type AgentsExecutionScratchpadReadStartedDetails = {
1692
- actionName: 'scratchpad_read';
1693
- operation: 'read';
1694
- };
1695
- type AgentsExecutionScratchpadWriteCompletedDetails = {
1696
- actionName: 'scratchpad_write';
1697
- linesChanged: number;
1698
- totalLines: number;
1699
- patchesApplied: number;
1700
- content?: string;
1701
- contentTruncated?: boolean;
1702
- };
1703
- type AgentsExecutionScratchpadWriteStartedDetails = {
1704
- actionName: 'scratchpad_write';
1705
- operation: 'write';
1706
- };
1707
- type AgentsExecutionScriptHybridPlaywrightCompletedDetails = {
1708
- actionName: 'script_hybrid_playwright';
1709
- success: boolean;
1710
- result: string;
1711
- consoleLogs: Array<string>;
1712
- failedLine?: number;
1713
- };
1714
- type AgentsExecutionScriptHybridPlaywrightStartedDetails = {
1715
- actionName: 'script_hybrid_playwright';
1716
- llmVars?: Array<string>;
1717
- };
1718
- type AgentsExecutionScriptPadRunFunctionCompletedDetails = {
1719
- actionName: 'scriptpad_run_function';
1720
- success: boolean;
1721
- result: string;
1722
- consoleLogs: Array<string>;
1723
- failedLine?: number;
1724
- };
1725
- type AgentsExecutionScriptPlaywrightCompletedDetails = {
1726
- actionName: 'script_playwright';
1727
- success: boolean;
1728
- result: string;
1729
- consoleLogs: Array<string>;
1730
- failedLine?: number;
1731
- };
1732
- type AgentsExecutionScriptPlaywrightStartedDetails = {
1733
- actionName: 'script_playwright';
1734
- llmVars?: Array<string>;
1735
- };
1736
- type AgentsExecutionScriptpadReadCompletedDetails = {
1737
- actionName: 'scriptpad_read';
1738
- content: string;
1739
- };
1740
- type AgentsExecutionScriptpadReadStartedDetails = {
1741
- actionName: 'scriptpad_read';
1742
- offset: number;
1743
- limit: number;
1744
- };
1745
- type AgentsExecutionScriptpadRunFunctionStartedDetails = {
1746
- actionName: 'scriptpad_run_function';
1747
- functionName: string;
1748
- arguments: unknown;
1749
- };
1750
- type AgentsExecutionScriptpadSearchReplaceCompletedDetails = {
1751
- actionName: 'scriptpad_search_replace';
1752
- linesReplaced: number;
1753
- linesReplacedWith: number;
1754
- oldTotalLines: number;
1755
- newTotalLines: number;
1756
- oldScriptpad?: string;
1757
- newScriptpad?: string;
1758
- };
1759
- type AgentsExecutionScriptpadSearchReplaceStartedDetails = {
1760
- actionName: 'scriptpad_search_replace';
1761
- search: string;
1762
- replace: string;
1763
- replaceAll: boolean;
1764
- };
1765
- type AgentsExecutionScriptpadWriteCompletedDetails = {
1766
- actionName: 'scriptpad_write';
1767
- linesChanged: number;
1768
- totalLines: number;
1769
- patchesApplied: number;
1770
- scriptpad?: string;
1771
- };
1772
- /**
1773
- * Fields that can be used for sorting executions
1774
- */
1775
- type AgentsExecutionSortField = 'created_at' | 'status';
1776
- type AgentsExecutionStatus = 'starting' | 'running' | 'paused' | 'awaiting_confirmation' | 'completed' | 'cancelled' | 'failed' | 'paused_by_agent';
1777
- type AgentsExecutionTerminalPayload = {
1778
- activityType: 'terminal';
1779
- reason: 'unsubscribe' | 'complete' | 'error';
1780
- message?: string;
1781
- };
1782
- type AgentsExecutionTransitionDetails = {
1783
- transitionID: CommonUuid;
1784
- transitionType: string;
1785
- };
1786
- type AgentsExecutionUpdateType = 'add' | 'edit' | 'delete';
1787
- type AgentsExecutionUserMessagesAddTextBody = {
1788
- message: string;
1789
- };
1790
- type AgentsExecutionUtilGetDatetimeCompletedDetails = {
1791
- actionName: 'util_get_datetime';
1792
- usedBrowserTimezone: boolean;
1793
- datetime: string;
1794
- tzTimezoneIdentifier: string;
1795
- };
1796
- type AgentsExecutionUtilGetDatetimeStartedDetails = {
1797
- actionName: 'util_get_datetime';
1798
- tzTimezoneIdentifier: string;
1799
- };
1800
- type AgentsExecutionWorkflowUpdate = {
1801
- updateType: AgentsExecutionUpdateType;
1802
- rulesDetails?: AgentsExecutionRulesDetails;
1803
- nodeDetails?: AgentsExecutionNodeDetails;
1804
- transitionDetails?: AgentsExecutionTransitionDetails;
1805
- };
1806
- type AgentsFilesFile = {
1807
- id: CommonUuid;
1808
- executionId: CommonUuid;
1809
- agentId: CommonUuid;
1810
- filePath: string;
1811
- fileName: string;
1812
- fileExt: string;
1813
- fileSize: number;
1814
- fileType: string;
1815
- mimeType: string;
1816
- createdAt: string;
1817
- signedUrl: string;
1818
- };
1819
- type AgentsFilesFilePart = Blob | File;
1820
- type AgentsFilesTempFile = {
1821
- id: CommonUuid;
1822
- name: string;
1823
- };
1824
- type AgentsFilesTempFilesResponse = {
1825
- tempFiles: Array<AgentsFilesTempFile>;
1826
- };
1827
- type AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVar = {
1828
- name: string;
1829
- type: AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVarType;
1830
- description: string;
1831
- };
1832
- type AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVarType = 'string' | 'number' | 'boolean';
1833
- type AgentsGraphModelsTransitionsTransitionType = 'iris' | 'selector' | 'outcome_success';
1834
- type CommonBadRequestErrorBody = {
1835
- code: 400;
1836
- message: string;
1837
- };
1838
- type CommonError = {
1839
- code: number;
1840
- message: string;
1841
- };
1842
- type CommonForbiddenErrorBody = {
1843
- code: 403;
1844
- message: string;
1845
- };
1846
- type CommonNotFoundErrorBody = {
1847
- code: 404;
1848
- message: string;
1535
+ * Access is unauthorized.
1536
+ */
1537
+ 401: CommonUnauthorizedErrorBody;
1538
+ /**
1539
+ * Access is forbidden.
1540
+ */
1541
+ 403: CommonForbiddenErrorBody;
1542
+ /**
1543
+ * The server cannot find the requested resource.
1544
+ */
1545
+ 404: CommonNotFoundErrorBody;
1546
+ /**
1547
+ * Server error
1548
+ */
1549
+ 500: CommonInternalServerErrorBody;
1849
1550
  };
1850
- type CommonOsError = {
1851
- message: string;
1551
+ type AgentProfileClearBrowserCacheError = AgentProfileClearBrowserCacheErrors[keyof AgentProfileClearBrowserCacheErrors];
1552
+ type AgentProfileClearBrowserCacheResponses = {
1553
+ /**
1554
+ * The request has succeeded.
1555
+ */
1556
+ 200: {
1557
+ message: string;
1558
+ };
1852
1559
  };
1853
- type CommonSortDirection = 'asc' | 'desc';
1854
- type CommonUuid = string;
1855
- type Version = 'v1';
1856
- type AgentsAgentSearch = string;
1857
- /**
1858
- * Filter by agent ID
1859
- */
1860
- type AgentsExecutionSearchAgentId = CommonUuid;
1861
- /**
1862
- * Filter by agent version
1863
- */
1864
- type AgentsExecutionSearchAgentVersion = number;
1865
- /**
1866
- * Filter executions created after this timestamp
1867
- */
1868
- type AgentsExecutionSearchCreatedAfter = string;
1869
- /**
1870
- * Filter executions created before this timestamp
1871
- */
1872
- type AgentsExecutionSearchCreatedBefore = string;
1873
- /**
1874
- * Search by execution ID (partial, case-insensitive match)
1875
- */
1876
- type AgentsExecutionSearchExecutionId = string;
1877
- /**
1878
- * Filter by human labels (can specify multiple label IDs, there is an 'OR' condition applied to these)
1879
- */
1880
- type AgentsExecutionSearchHumanLabels = Array<CommonUuid>;
1881
- /**
1882
- * Filter by metadata key - must be used together with metadataValue
1883
- */
1884
- type AgentsExecutionSearchMetadataKey = string;
1885
- /**
1886
- * Filter by metadata value - must be used together with metadataKey
1887
- */
1888
- type AgentsExecutionSearchMetadataValue = string;
1889
- /**
1890
- * Filter by execution result outcome (partial, case-insensitive match)
1891
- */
1892
- type AgentsExecutionSearchOutcomeLabel = string;
1893
- /**
1894
- * Filter by execution status (can specify multiple, there is an 'OR' condition applied to these)
1895
- */
1896
- type AgentsExecutionSearchStatus = Array<AgentsExecutionStatus>;
1897
- type CommonPaginationPage = number;
1898
- type CommonPaginationPageSize = number;
1560
+ type AgentProfileClearBrowserCacheResponse = AgentProfileClearBrowserCacheResponses[keyof AgentProfileClearBrowserCacheResponses];
1899
1561
  type AgentListData = {
1900
1562
  body?: never;
1901
1563
  path?: never;
1902
- query: {
1564
+ query?: {
1903
1565
  organizationId?: CommonUuid;
1904
- pageSize: number;
1905
- page: number;
1566
+ pageSize?: number;
1567
+ page?: number;
1906
1568
  searchName?: string;
1907
1569
  sortField?: AgentsAgentSortField;
1908
1570
  sortDirection?: CommonSortDirection;
@@ -1967,13 +1629,13 @@ type AgentExecutePostResponse = AgentExecutePostResponses[keyof AgentExecutePost
1967
1629
  type ExecutionsListData = {
1968
1630
  body?: never;
1969
1631
  path?: never;
1970
- query: {
1632
+ query?: {
1971
1633
  /**
1972
1634
  * Optional organization ID filter (required for customer queries)
1973
1635
  */
1974
1636
  organizationId?: CommonUuid;
1975
- pageSize: number;
1976
- page: number;
1637
+ pageSize?: number;
1638
+ page?: number;
1977
1639
  /**
1978
1640
  * Search by execution ID (partial, case-insensitive match)
1979
1641
  */
@@ -1986,10 +1648,6 @@ type ExecutionsListData = {
1986
1648
  * Filter by execution status (can specify multiple, there is an 'OR' condition applied to these)
1987
1649
  */
1988
1650
  status?: Array<AgentsExecutionStatus>;
1989
- /**
1990
- * Filter by agent version
1991
- */
1992
- agentVersion?: number;
1993
1651
  /**
1994
1652
  * Filter executions created after this timestamp
1995
1653
  */
@@ -2024,6 +1682,10 @@ type ExecutionsListErrors = {
2024
1682
  * The server could not understand the request due to invalid syntax.
2025
1683
  */
2026
1684
  400: CommonBadRequestErrorBody;
1685
+ /**
1686
+ * Access is unauthorized.
1687
+ */
1688
+ 401: CommonUnauthorizedErrorBody;
2027
1689
  /**
2028
1690
  * Access is forbidden.
2029
1691
  */
@@ -2032,6 +1694,10 @@ type ExecutionsListErrors = {
2032
1694
  * The server cannot find the requested resource.
2033
1695
  */
2034
1696
  404: CommonNotFoundErrorBody;
1697
+ /**
1698
+ * Server error
1699
+ */
1700
+ 500: CommonInternalServerErrorBody;
2035
1701
  };
2036
1702
  type ExecutionsListError = ExecutionsListErrors[keyof ExecutionsListErrors];
2037
1703
  type ExecutionsListResponses = {
@@ -2062,6 +1728,10 @@ type ExecutionGetErrors = {
2062
1728
  * The server could not understand the request due to invalid syntax.
2063
1729
  */
2064
1730
  400: CommonBadRequestErrorBody;
1731
+ /**
1732
+ * Access is unauthorized.
1733
+ */
1734
+ 401: CommonUnauthorizedErrorBody;
2065
1735
  /**
2066
1736
  * Access is forbidden.
2067
1737
  */
@@ -2070,6 +1740,10 @@ type ExecutionGetErrors = {
2070
1740
  * The server cannot find the requested resource.
2071
1741
  */
2072
1742
  404: CommonNotFoundErrorBody;
1743
+ /**
1744
+ * Server error
1745
+ */
1746
+ 500: CommonInternalServerErrorBody;
2073
1747
  };
2074
1748
  type ExecutionGetError = ExecutionGetErrors[keyof ExecutionGetErrors];
2075
1749
  type ExecutionGetResponses = {
@@ -2104,6 +1778,10 @@ type ExecutionActivitiesGetErrors = {
2104
1778
  * The server could not understand the request due to invalid syntax.
2105
1779
  */
2106
1780
  400: CommonBadRequestErrorBody;
1781
+ /**
1782
+ * Access is unauthorized.
1783
+ */
1784
+ 401: CommonUnauthorizedErrorBody;
2107
1785
  /**
2108
1786
  * Access is forbidden.
2109
1787
  */
@@ -2112,6 +1790,10 @@ type ExecutionActivitiesGetErrors = {
2112
1790
  * The server cannot find the requested resource.
2113
1791
  */
2114
1792
  404: CommonNotFoundErrorBody;
1793
+ /**
1794
+ * Server error
1795
+ */
1796
+ 500: CommonInternalServerErrorBody;
2115
1797
  };
2116
1798
  type ExecutionActivitiesGetError = ExecutionActivitiesGetErrors[keyof ExecutionActivitiesGetErrors];
2117
1799
  type ExecutionActivitiesGetResponses = {
@@ -2150,6 +1832,7 @@ type ExecutionContextFilesUploadData = {
2150
1832
  path: {
2151
1833
  /**
2152
1834
  * Upload files to a running execution
1835
+ *
2153
1836
  * Upload files to a running execution that is already in progress. If you want to attach files to an execution that is not yet running, see the /temp-files endpoint.
2154
1837
  */
2155
1838
  executionId: CommonUuid;
@@ -2175,6 +1858,50 @@ type ExecutionContextFilesUploadResponses = {
2175
1858
  200: 'Files uploaded.';
2176
1859
  };
2177
1860
  type ExecutionContextFilesUploadResponse = ExecutionContextFilesUploadResponses[keyof ExecutionContextFilesUploadResponses];
1861
+ type ExecutionStatusUpdateData = {
1862
+ /**
1863
+ * The status update request
1864
+ */
1865
+ body: AgentsExecutionUpdateExecutionStatusRequest;
1866
+ path: {
1867
+ /**
1868
+ * The unique identifier of the execution
1869
+ */
1870
+ executionId: CommonUuid;
1871
+ };
1872
+ query?: never;
1873
+ url: '/executions/{executionId}/status';
1874
+ };
1875
+ type ExecutionStatusUpdateErrors = {
1876
+ /**
1877
+ * The server could not understand the request due to invalid syntax.
1878
+ */
1879
+ 400: CommonBadRequestErrorBody;
1880
+ /**
1881
+ * Access is unauthorized.
1882
+ */
1883
+ 401: CommonUnauthorizedErrorBody;
1884
+ /**
1885
+ * Access is forbidden.
1886
+ */
1887
+ 403: CommonForbiddenErrorBody;
1888
+ /**
1889
+ * The server cannot find the requested resource.
1890
+ */
1891
+ 404: CommonNotFoundErrorBody;
1892
+ /**
1893
+ * Server error
1894
+ */
1895
+ 500: CommonInternalServerErrorBody;
1896
+ };
1897
+ type ExecutionStatusUpdateError = ExecutionStatusUpdateErrors[keyof ExecutionStatusUpdateErrors];
1898
+ type ExecutionStatusUpdateResponses = {
1899
+ /**
1900
+ * The request has succeeded.
1901
+ */
1902
+ 200: 'Execution status updated.';
1903
+ };
1904
+ type ExecutionStatusUpdateResponse = ExecutionStatusUpdateResponses[keyof ExecutionStatusUpdateResponses];
2178
1905
  type ExecutionUserMessagesAddData = {
2179
1906
  /**
2180
1907
  * The message content to send
@@ -2194,6 +1921,10 @@ type ExecutionUserMessagesAddErrors = {
2194
1921
  * The server could not understand the request due to invalid syntax.
2195
1922
  */
2196
1923
  400: CommonBadRequestErrorBody;
1924
+ /**
1925
+ * Access is unauthorized.
1926
+ */
1927
+ 401: CommonUnauthorizedErrorBody;
2197
1928
  /**
2198
1929
  * Access is forbidden.
2199
1930
  */
@@ -2202,6 +1933,10 @@ type ExecutionUserMessagesAddErrors = {
2202
1933
  * The server cannot find the requested resource.
2203
1934
  */
2204
1935
  404: CommonNotFoundErrorBody;
1936
+ /**
1937
+ * Server error
1938
+ */
1939
+ 500: CommonInternalServerErrorBody;
2205
1940
  };
2206
1941
  type ExecutionUserMessagesAddError = ExecutionUserMessagesAddErrors[keyof ExecutionUserMessagesAddErrors];
2207
1942
  type ExecutionUserMessagesAddResponses = {
@@ -2243,158 +1978,8 @@ type TempFilesStageResponses = {
2243
1978
  200: AgentsFilesTempFilesResponse;
2244
1979
  };
2245
1980
  type TempFilesStageResponse = TempFilesStageResponses[keyof TempFilesStageResponses];
2246
- type ClientOptions = {
2247
- baseUrl: 'https://odyssey.asteroid.ai/agents/v2' | (string & {});
2248
- };
2249
-
2250
- type types_gen_AgentExecutePostData = AgentExecutePostData;
2251
- type types_gen_AgentExecutePostError = AgentExecutePostError;
2252
- type types_gen_AgentExecutePostErrors = AgentExecutePostErrors;
2253
- type types_gen_AgentExecutePostResponse = AgentExecutePostResponse;
2254
- type types_gen_AgentExecutePostResponses = AgentExecutePostResponses;
2255
- type types_gen_AgentListData = AgentListData;
2256
- type types_gen_AgentListError = AgentListError;
2257
- type types_gen_AgentListErrors = AgentListErrors;
2258
- type types_gen_AgentListResponse = AgentListResponse;
2259
- type types_gen_AgentListResponses = AgentListResponses;
2260
- type types_gen_AgentsAgentBase = AgentsAgentBase;
2261
- type types_gen_AgentsAgentExecuteAgentRequest = AgentsAgentExecuteAgentRequest;
2262
- type types_gen_AgentsAgentExecuteAgentResponse = AgentsAgentExecuteAgentResponse;
2263
- type types_gen_AgentsAgentSearch = AgentsAgentSearch;
2264
- type types_gen_AgentsAgentSortField = AgentsAgentSortField;
2265
- type types_gen_AgentsExecutionActionName = AgentsExecutionActionName;
2266
- type types_gen_AgentsExecutionActivity = AgentsExecutionActivity;
2267
- type types_gen_AgentsExecutionActivityActionCompletedInfo = AgentsExecutionActivityActionCompletedInfo;
2268
- type types_gen_AgentsExecutionActivityActionCompletedPayload = AgentsExecutionActivityActionCompletedPayload;
2269
- type types_gen_AgentsExecutionActivityActionFailedPayload = AgentsExecutionActivityActionFailedPayload;
2270
- type types_gen_AgentsExecutionActivityActionStartedInfo = AgentsExecutionActivityActionStartedInfo;
2271
- type types_gen_AgentsExecutionActivityActionStartedPayload = AgentsExecutionActivityActionStartedPayload;
2272
- type types_gen_AgentsExecutionActivityFileAddedPayload = AgentsExecutionActivityFileAddedPayload;
2273
- type types_gen_AgentsExecutionActivityGenericPayload = AgentsExecutionActivityGenericPayload;
2274
- type types_gen_AgentsExecutionActivityPayloadUnion = AgentsExecutionActivityPayloadUnion;
2275
- type types_gen_AgentsExecutionActivityPlaywrightScriptGeneratedPayload = AgentsExecutionActivityPlaywrightScriptGeneratedPayload;
2276
- type types_gen_AgentsExecutionActivityReasoningPayload = AgentsExecutionActivityReasoningPayload;
2277
- type types_gen_AgentsExecutionActivityStatusChangedPayload = AgentsExecutionActivityStatusChangedPayload;
2278
- type types_gen_AgentsExecutionActivityStepCompletedPayload = AgentsExecutionActivityStepCompletedPayload;
2279
- type types_gen_AgentsExecutionActivityStepStartedPayload = AgentsExecutionActivityStepStartedPayload;
2280
- type types_gen_AgentsExecutionActivityTransitionedNodePayload = AgentsExecutionActivityTransitionedNodePayload;
2281
- type types_gen_AgentsExecutionActivityUserMessageReceivedPayload = AgentsExecutionActivityUserMessageReceivedPayload;
2282
- type types_gen_AgentsExecutionActivityWorkflowUpdatedPayload = AgentsExecutionActivityWorkflowUpdatedPayload;
2283
- type types_gen_AgentsExecutionAwaitingConfirmationPayload = AgentsExecutionAwaitingConfirmationPayload;
2284
- type types_gen_AgentsExecutionCancelReason = AgentsExecutionCancelReason;
2285
- type types_gen_AgentsExecutionCancelledPayload = AgentsExecutionCancelledPayload;
2286
- type types_gen_AgentsExecutionComment = AgentsExecutionComment;
2287
- type types_gen_AgentsExecutionCompletedPayload = AgentsExecutionCompletedPayload;
2288
- type types_gen_AgentsExecutionElementFileUploadCompletedDetails = AgentsExecutionElementFileUploadCompletedDetails;
2289
- type types_gen_AgentsExecutionExecutionResult = AgentsExecutionExecutionResult;
2290
- type types_gen_AgentsExecutionExtApiCallCompletedDetails = AgentsExecutionExtApiCallCompletedDetails;
2291
- type types_gen_AgentsExecutionExtGetMailCompletedDetails = AgentsExecutionExtGetMailCompletedDetails;
2292
- type types_gen_AgentsExecutionFailedPayload = AgentsExecutionFailedPayload;
2293
- type types_gen_AgentsExecutionFileListCompletedDetails = AgentsExecutionFileListCompletedDetails;
2294
- type types_gen_AgentsExecutionFileReadCompletedDetails = AgentsExecutionFileReadCompletedDetails;
2295
- type types_gen_AgentsExecutionFileStageCompletedDetails = AgentsExecutionFileStageCompletedDetails;
2296
- type types_gen_AgentsExecutionHumanLabel = AgentsExecutionHumanLabel;
2297
- type types_gen_AgentsExecutionListItem = AgentsExecutionListItem;
2298
- type types_gen_AgentsExecutionLlmCallPurpose = AgentsExecutionLlmCallPurpose;
2299
- type types_gen_AgentsExecutionLlmCallStartedDetails = AgentsExecutionLlmCallStartedDetails;
2300
- type types_gen_AgentsExecutionNavToCompletedDetails = AgentsExecutionNavToCompletedDetails;
2301
- type types_gen_AgentsExecutionNavToStartedDetails = AgentsExecutionNavToStartedDetails;
2302
- type types_gen_AgentsExecutionNodeDetails = AgentsExecutionNodeDetails;
2303
- type types_gen_AgentsExecutionObsSnapshotWithSelectorsCompletedDetails = AgentsExecutionObsSnapshotWithSelectorsCompletedDetails;
2304
- type types_gen_AgentsExecutionPausedPayload = AgentsExecutionPausedPayload;
2305
- type types_gen_AgentsExecutionRulesDetails = AgentsExecutionRulesDetails;
2306
- type types_gen_AgentsExecutionScratchpadReadCompletedDetails = AgentsExecutionScratchpadReadCompletedDetails;
2307
- type types_gen_AgentsExecutionScratchpadReadStartedDetails = AgentsExecutionScratchpadReadStartedDetails;
2308
- type types_gen_AgentsExecutionScratchpadWriteCompletedDetails = AgentsExecutionScratchpadWriteCompletedDetails;
2309
- type types_gen_AgentsExecutionScratchpadWriteStartedDetails = AgentsExecutionScratchpadWriteStartedDetails;
2310
- type types_gen_AgentsExecutionScriptHybridPlaywrightCompletedDetails = AgentsExecutionScriptHybridPlaywrightCompletedDetails;
2311
- type types_gen_AgentsExecutionScriptHybridPlaywrightStartedDetails = AgentsExecutionScriptHybridPlaywrightStartedDetails;
2312
- type types_gen_AgentsExecutionScriptPadRunFunctionCompletedDetails = AgentsExecutionScriptPadRunFunctionCompletedDetails;
2313
- type types_gen_AgentsExecutionScriptPlaywrightCompletedDetails = AgentsExecutionScriptPlaywrightCompletedDetails;
2314
- type types_gen_AgentsExecutionScriptPlaywrightStartedDetails = AgentsExecutionScriptPlaywrightStartedDetails;
2315
- type types_gen_AgentsExecutionScriptpadReadCompletedDetails = AgentsExecutionScriptpadReadCompletedDetails;
2316
- type types_gen_AgentsExecutionScriptpadReadStartedDetails = AgentsExecutionScriptpadReadStartedDetails;
2317
- type types_gen_AgentsExecutionScriptpadRunFunctionStartedDetails = AgentsExecutionScriptpadRunFunctionStartedDetails;
2318
- type types_gen_AgentsExecutionScriptpadSearchReplaceCompletedDetails = AgentsExecutionScriptpadSearchReplaceCompletedDetails;
2319
- type types_gen_AgentsExecutionScriptpadSearchReplaceStartedDetails = AgentsExecutionScriptpadSearchReplaceStartedDetails;
2320
- type types_gen_AgentsExecutionScriptpadWriteCompletedDetails = AgentsExecutionScriptpadWriteCompletedDetails;
2321
- type types_gen_AgentsExecutionSearchAgentId = AgentsExecutionSearchAgentId;
2322
- type types_gen_AgentsExecutionSearchAgentVersion = AgentsExecutionSearchAgentVersion;
2323
- type types_gen_AgentsExecutionSearchCreatedAfter = AgentsExecutionSearchCreatedAfter;
2324
- type types_gen_AgentsExecutionSearchCreatedBefore = AgentsExecutionSearchCreatedBefore;
2325
- type types_gen_AgentsExecutionSearchExecutionId = AgentsExecutionSearchExecutionId;
2326
- type types_gen_AgentsExecutionSearchHumanLabels = AgentsExecutionSearchHumanLabels;
2327
- type types_gen_AgentsExecutionSearchMetadataKey = AgentsExecutionSearchMetadataKey;
2328
- type types_gen_AgentsExecutionSearchMetadataValue = AgentsExecutionSearchMetadataValue;
2329
- type types_gen_AgentsExecutionSearchOutcomeLabel = AgentsExecutionSearchOutcomeLabel;
2330
- type types_gen_AgentsExecutionSearchStatus = AgentsExecutionSearchStatus;
2331
- type types_gen_AgentsExecutionSortField = AgentsExecutionSortField;
2332
- type types_gen_AgentsExecutionStatus = AgentsExecutionStatus;
2333
- type types_gen_AgentsExecutionTerminalPayload = AgentsExecutionTerminalPayload;
2334
- type types_gen_AgentsExecutionTransitionDetails = AgentsExecutionTransitionDetails;
2335
- type types_gen_AgentsExecutionUpdateType = AgentsExecutionUpdateType;
2336
- type types_gen_AgentsExecutionUserMessagesAddTextBody = AgentsExecutionUserMessagesAddTextBody;
2337
- type types_gen_AgentsExecutionUtilGetDatetimeCompletedDetails = AgentsExecutionUtilGetDatetimeCompletedDetails;
2338
- type types_gen_AgentsExecutionUtilGetDatetimeStartedDetails = AgentsExecutionUtilGetDatetimeStartedDetails;
2339
- type types_gen_AgentsExecutionWorkflowUpdate = AgentsExecutionWorkflowUpdate;
2340
- type types_gen_AgentsFilesFile = AgentsFilesFile;
2341
- type types_gen_AgentsFilesFilePart = AgentsFilesFilePart;
2342
- type types_gen_AgentsFilesTempFile = AgentsFilesTempFile;
2343
- type types_gen_AgentsFilesTempFilesResponse = AgentsFilesTempFilesResponse;
2344
- type types_gen_AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVar = AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVar;
2345
- type types_gen_AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVarType = AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVarType;
2346
- type types_gen_AgentsGraphModelsTransitionsTransitionType = AgentsGraphModelsTransitionsTransitionType;
2347
- type types_gen_ClientOptions = ClientOptions;
2348
- type types_gen_CommonBadRequestErrorBody = CommonBadRequestErrorBody;
2349
- type types_gen_CommonError = CommonError;
2350
- type types_gen_CommonForbiddenErrorBody = CommonForbiddenErrorBody;
2351
- type types_gen_CommonNotFoundErrorBody = CommonNotFoundErrorBody;
2352
- type types_gen_CommonOsError = CommonOsError;
2353
- type types_gen_CommonPaginationPage = CommonPaginationPage;
2354
- type types_gen_CommonPaginationPageSize = CommonPaginationPageSize;
2355
- type types_gen_CommonSortDirection = CommonSortDirection;
2356
- type types_gen_CommonUuid = CommonUuid;
2357
- type types_gen_ExecutionActivitiesGetData = ExecutionActivitiesGetData;
2358
- type types_gen_ExecutionActivitiesGetError = ExecutionActivitiesGetError;
2359
- type types_gen_ExecutionActivitiesGetErrors = ExecutionActivitiesGetErrors;
2360
- type types_gen_ExecutionActivitiesGetResponse = ExecutionActivitiesGetResponse;
2361
- type types_gen_ExecutionActivitiesGetResponses = ExecutionActivitiesGetResponses;
2362
- type types_gen_ExecutionContextFilesGetData = ExecutionContextFilesGetData;
2363
- type types_gen_ExecutionContextFilesGetError = ExecutionContextFilesGetError;
2364
- type types_gen_ExecutionContextFilesGetErrors = ExecutionContextFilesGetErrors;
2365
- type types_gen_ExecutionContextFilesGetResponse = ExecutionContextFilesGetResponse;
2366
- type types_gen_ExecutionContextFilesGetResponses = ExecutionContextFilesGetResponses;
2367
- type types_gen_ExecutionContextFilesUploadData = ExecutionContextFilesUploadData;
2368
- type types_gen_ExecutionContextFilesUploadError = ExecutionContextFilesUploadError;
2369
- type types_gen_ExecutionContextFilesUploadErrors = ExecutionContextFilesUploadErrors;
2370
- type types_gen_ExecutionContextFilesUploadResponse = ExecutionContextFilesUploadResponse;
2371
- type types_gen_ExecutionContextFilesUploadResponses = ExecutionContextFilesUploadResponses;
2372
- type types_gen_ExecutionGetData = ExecutionGetData;
2373
- type types_gen_ExecutionGetError = ExecutionGetError;
2374
- type types_gen_ExecutionGetErrors = ExecutionGetErrors;
2375
- type types_gen_ExecutionGetResponse = ExecutionGetResponse;
2376
- type types_gen_ExecutionGetResponses = ExecutionGetResponses;
2377
- type types_gen_ExecutionUserMessagesAddData = ExecutionUserMessagesAddData;
2378
- type types_gen_ExecutionUserMessagesAddError = ExecutionUserMessagesAddError;
2379
- type types_gen_ExecutionUserMessagesAddErrors = ExecutionUserMessagesAddErrors;
2380
- type types_gen_ExecutionUserMessagesAddResponse = ExecutionUserMessagesAddResponse;
2381
- type types_gen_ExecutionUserMessagesAddResponses = ExecutionUserMessagesAddResponses;
2382
- type types_gen_ExecutionsListData = ExecutionsListData;
2383
- type types_gen_ExecutionsListError = ExecutionsListError;
2384
- type types_gen_ExecutionsListErrors = ExecutionsListErrors;
2385
- type types_gen_ExecutionsListResponse = ExecutionsListResponse;
2386
- type types_gen_ExecutionsListResponses = ExecutionsListResponses;
2387
- type types_gen_TempFilesStageData = TempFilesStageData;
2388
- type types_gen_TempFilesStageError = TempFilesStageError;
2389
- type types_gen_TempFilesStageErrors = TempFilesStageErrors;
2390
- type types_gen_TempFilesStageResponse = TempFilesStageResponse;
2391
- type types_gen_TempFilesStageResponses = TempFilesStageResponses;
2392
- type types_gen_Version = Version;
2393
- declare namespace types_gen {
2394
- export type { types_gen_AgentExecutePostData as AgentExecutePostData, types_gen_AgentExecutePostError as AgentExecutePostError, types_gen_AgentExecutePostErrors as AgentExecutePostErrors, types_gen_AgentExecutePostResponse as AgentExecutePostResponse, types_gen_AgentExecutePostResponses as AgentExecutePostResponses, types_gen_AgentListData as AgentListData, types_gen_AgentListError as AgentListError, types_gen_AgentListErrors as AgentListErrors, types_gen_AgentListResponse as AgentListResponse, types_gen_AgentListResponses as AgentListResponses, types_gen_AgentsAgentBase as AgentsAgentBase, types_gen_AgentsAgentExecuteAgentRequest as AgentsAgentExecuteAgentRequest, types_gen_AgentsAgentExecuteAgentResponse as AgentsAgentExecuteAgentResponse, types_gen_AgentsAgentSearch as AgentsAgentSearch, types_gen_AgentsAgentSortField as AgentsAgentSortField, types_gen_AgentsExecutionActionName as AgentsExecutionActionName, types_gen_AgentsExecutionActivity as AgentsExecutionActivity, types_gen_AgentsExecutionActivityActionCompletedInfo as AgentsExecutionActivityActionCompletedInfo, types_gen_AgentsExecutionActivityActionCompletedPayload as AgentsExecutionActivityActionCompletedPayload, types_gen_AgentsExecutionActivityActionFailedPayload as AgentsExecutionActivityActionFailedPayload, types_gen_AgentsExecutionActivityActionStartedInfo as AgentsExecutionActivityActionStartedInfo, types_gen_AgentsExecutionActivityActionStartedPayload as AgentsExecutionActivityActionStartedPayload, types_gen_AgentsExecutionActivityFileAddedPayload as AgentsExecutionActivityFileAddedPayload, types_gen_AgentsExecutionActivityGenericPayload as AgentsExecutionActivityGenericPayload, types_gen_AgentsExecutionActivityPayloadUnion as AgentsExecutionActivityPayloadUnion, types_gen_AgentsExecutionActivityPlaywrightScriptGeneratedPayload as AgentsExecutionActivityPlaywrightScriptGeneratedPayload, types_gen_AgentsExecutionActivityReasoningPayload as AgentsExecutionActivityReasoningPayload, types_gen_AgentsExecutionActivityStatusChangedPayload as AgentsExecutionActivityStatusChangedPayload, types_gen_AgentsExecutionActivityStepCompletedPayload as AgentsExecutionActivityStepCompletedPayload, types_gen_AgentsExecutionActivityStepStartedPayload as AgentsExecutionActivityStepStartedPayload, types_gen_AgentsExecutionActivityTransitionedNodePayload as AgentsExecutionActivityTransitionedNodePayload, types_gen_AgentsExecutionActivityUserMessageReceivedPayload as AgentsExecutionActivityUserMessageReceivedPayload, types_gen_AgentsExecutionActivityWorkflowUpdatedPayload as AgentsExecutionActivityWorkflowUpdatedPayload, types_gen_AgentsExecutionAwaitingConfirmationPayload as AgentsExecutionAwaitingConfirmationPayload, types_gen_AgentsExecutionCancelReason as AgentsExecutionCancelReason, types_gen_AgentsExecutionCancelledPayload as AgentsExecutionCancelledPayload, types_gen_AgentsExecutionComment as AgentsExecutionComment, types_gen_AgentsExecutionCompletedPayload as AgentsExecutionCompletedPayload, types_gen_AgentsExecutionElementFileUploadCompletedDetails as AgentsExecutionElementFileUploadCompletedDetails, types_gen_AgentsExecutionExecutionResult as AgentsExecutionExecutionResult, types_gen_AgentsExecutionExtApiCallCompletedDetails as AgentsExecutionExtApiCallCompletedDetails, types_gen_AgentsExecutionExtGetMailCompletedDetails as AgentsExecutionExtGetMailCompletedDetails, types_gen_AgentsExecutionFailedPayload as AgentsExecutionFailedPayload, types_gen_AgentsExecutionFileListCompletedDetails as AgentsExecutionFileListCompletedDetails, types_gen_AgentsExecutionFileReadCompletedDetails as AgentsExecutionFileReadCompletedDetails, types_gen_AgentsExecutionFileStageCompletedDetails as AgentsExecutionFileStageCompletedDetails, types_gen_AgentsExecutionHumanLabel as AgentsExecutionHumanLabel, types_gen_AgentsExecutionListItem as AgentsExecutionListItem, types_gen_AgentsExecutionLlmCallPurpose as AgentsExecutionLlmCallPurpose, types_gen_AgentsExecutionLlmCallStartedDetails as AgentsExecutionLlmCallStartedDetails, types_gen_AgentsExecutionNavToCompletedDetails as AgentsExecutionNavToCompletedDetails, types_gen_AgentsExecutionNavToStartedDetails as AgentsExecutionNavToStartedDetails, types_gen_AgentsExecutionNodeDetails as AgentsExecutionNodeDetails, types_gen_AgentsExecutionObsSnapshotWithSelectorsCompletedDetails as AgentsExecutionObsSnapshotWithSelectorsCompletedDetails, types_gen_AgentsExecutionPausedPayload as AgentsExecutionPausedPayload, types_gen_AgentsExecutionRulesDetails as AgentsExecutionRulesDetails, types_gen_AgentsExecutionScratchpadReadCompletedDetails as AgentsExecutionScratchpadReadCompletedDetails, types_gen_AgentsExecutionScratchpadReadStartedDetails as AgentsExecutionScratchpadReadStartedDetails, types_gen_AgentsExecutionScratchpadWriteCompletedDetails as AgentsExecutionScratchpadWriteCompletedDetails, types_gen_AgentsExecutionScratchpadWriteStartedDetails as AgentsExecutionScratchpadWriteStartedDetails, types_gen_AgentsExecutionScriptHybridPlaywrightCompletedDetails as AgentsExecutionScriptHybridPlaywrightCompletedDetails, types_gen_AgentsExecutionScriptHybridPlaywrightStartedDetails as AgentsExecutionScriptHybridPlaywrightStartedDetails, types_gen_AgentsExecutionScriptPadRunFunctionCompletedDetails as AgentsExecutionScriptPadRunFunctionCompletedDetails, types_gen_AgentsExecutionScriptPlaywrightCompletedDetails as AgentsExecutionScriptPlaywrightCompletedDetails, types_gen_AgentsExecutionScriptPlaywrightStartedDetails as AgentsExecutionScriptPlaywrightStartedDetails, types_gen_AgentsExecutionScriptpadReadCompletedDetails as AgentsExecutionScriptpadReadCompletedDetails, types_gen_AgentsExecutionScriptpadReadStartedDetails as AgentsExecutionScriptpadReadStartedDetails, types_gen_AgentsExecutionScriptpadRunFunctionStartedDetails as AgentsExecutionScriptpadRunFunctionStartedDetails, types_gen_AgentsExecutionScriptpadSearchReplaceCompletedDetails as AgentsExecutionScriptpadSearchReplaceCompletedDetails, types_gen_AgentsExecutionScriptpadSearchReplaceStartedDetails as AgentsExecutionScriptpadSearchReplaceStartedDetails, types_gen_AgentsExecutionScriptpadWriteCompletedDetails as AgentsExecutionScriptpadWriteCompletedDetails, types_gen_AgentsExecutionSearchAgentId as AgentsExecutionSearchAgentId, types_gen_AgentsExecutionSearchAgentVersion as AgentsExecutionSearchAgentVersion, types_gen_AgentsExecutionSearchCreatedAfter as AgentsExecutionSearchCreatedAfter, types_gen_AgentsExecutionSearchCreatedBefore as AgentsExecutionSearchCreatedBefore, types_gen_AgentsExecutionSearchExecutionId as AgentsExecutionSearchExecutionId, types_gen_AgentsExecutionSearchHumanLabels as AgentsExecutionSearchHumanLabels, types_gen_AgentsExecutionSearchMetadataKey as AgentsExecutionSearchMetadataKey, types_gen_AgentsExecutionSearchMetadataValue as AgentsExecutionSearchMetadataValue, types_gen_AgentsExecutionSearchOutcomeLabel as AgentsExecutionSearchOutcomeLabel, types_gen_AgentsExecutionSearchStatus as AgentsExecutionSearchStatus, types_gen_AgentsExecutionSortField as AgentsExecutionSortField, types_gen_AgentsExecutionStatus as AgentsExecutionStatus, types_gen_AgentsExecutionTerminalPayload as AgentsExecutionTerminalPayload, types_gen_AgentsExecutionTransitionDetails as AgentsExecutionTransitionDetails, types_gen_AgentsExecutionUpdateType as AgentsExecutionUpdateType, types_gen_AgentsExecutionUserMessagesAddTextBody as AgentsExecutionUserMessagesAddTextBody, types_gen_AgentsExecutionUtilGetDatetimeCompletedDetails as AgentsExecutionUtilGetDatetimeCompletedDetails, types_gen_AgentsExecutionUtilGetDatetimeStartedDetails as AgentsExecutionUtilGetDatetimeStartedDetails, types_gen_AgentsExecutionWorkflowUpdate as AgentsExecutionWorkflowUpdate, types_gen_AgentsFilesFile as AgentsFilesFile, types_gen_AgentsFilesFilePart as AgentsFilesFilePart, types_gen_AgentsFilesTempFile as AgentsFilesTempFile, types_gen_AgentsFilesTempFilesResponse as AgentsFilesTempFilesResponse, types_gen_AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVar as AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVar, types_gen_AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVarType as AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVarType, types_gen_AgentsGraphModelsTransitionsTransitionType as AgentsGraphModelsTransitionsTransitionType, types_gen_ClientOptions as ClientOptions, types_gen_CommonBadRequestErrorBody as CommonBadRequestErrorBody, types_gen_CommonError as CommonError, types_gen_CommonForbiddenErrorBody as CommonForbiddenErrorBody, types_gen_CommonNotFoundErrorBody as CommonNotFoundErrorBody, types_gen_CommonOsError as CommonOsError, types_gen_CommonPaginationPage as CommonPaginationPage, types_gen_CommonPaginationPageSize as CommonPaginationPageSize, types_gen_CommonSortDirection as CommonSortDirection, types_gen_CommonUuid as CommonUuid, types_gen_ExecutionActivitiesGetData as ExecutionActivitiesGetData, types_gen_ExecutionActivitiesGetError as ExecutionActivitiesGetError, types_gen_ExecutionActivitiesGetErrors as ExecutionActivitiesGetErrors, types_gen_ExecutionActivitiesGetResponse as ExecutionActivitiesGetResponse, types_gen_ExecutionActivitiesGetResponses as ExecutionActivitiesGetResponses, types_gen_ExecutionContextFilesGetData as ExecutionContextFilesGetData, types_gen_ExecutionContextFilesGetError as ExecutionContextFilesGetError, types_gen_ExecutionContextFilesGetErrors as ExecutionContextFilesGetErrors, types_gen_ExecutionContextFilesGetResponse as ExecutionContextFilesGetResponse, types_gen_ExecutionContextFilesGetResponses as ExecutionContextFilesGetResponses, types_gen_ExecutionContextFilesUploadData as ExecutionContextFilesUploadData, types_gen_ExecutionContextFilesUploadError as ExecutionContextFilesUploadError, types_gen_ExecutionContextFilesUploadErrors as ExecutionContextFilesUploadErrors, types_gen_ExecutionContextFilesUploadResponse as ExecutionContextFilesUploadResponse, types_gen_ExecutionContextFilesUploadResponses as ExecutionContextFilesUploadResponses, types_gen_ExecutionGetData as ExecutionGetData, types_gen_ExecutionGetError as ExecutionGetError, types_gen_ExecutionGetErrors as ExecutionGetErrors, types_gen_ExecutionGetResponse as ExecutionGetResponse, types_gen_ExecutionGetResponses as ExecutionGetResponses, types_gen_ExecutionUserMessagesAddData as ExecutionUserMessagesAddData, types_gen_ExecutionUserMessagesAddError as ExecutionUserMessagesAddError, types_gen_ExecutionUserMessagesAddErrors as ExecutionUserMessagesAddErrors, types_gen_ExecutionUserMessagesAddResponse as ExecutionUserMessagesAddResponse, types_gen_ExecutionUserMessagesAddResponses as ExecutionUserMessagesAddResponses, types_gen_ExecutionsListData as ExecutionsListData, types_gen_ExecutionsListError as ExecutionsListError, types_gen_ExecutionsListErrors as ExecutionsListErrors, types_gen_ExecutionsListResponse as ExecutionsListResponse, types_gen_ExecutionsListResponses as ExecutionsListResponses, types_gen_TempFilesStageData as TempFilesStageData, types_gen_TempFilesStageError as TempFilesStageError, types_gen_TempFilesStageErrors as TempFilesStageErrors, types_gen_TempFilesStageResponse as TempFilesStageResponse, types_gen_TempFilesStageResponses as TempFilesStageResponses, types_gen_Version as Version };
2395
- }
2396
1981
 
2397
- type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$2<TData, ThrowOnError> & {
1982
+ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$1<TData, ThrowOnError> & {
2398
1983
  /**
2399
1984
  * You can provide a client instance returned by `createClient()` instead of
2400
1985
  * individual options. This might be also useful if you want to implement a
@@ -2408,431 +1993,85 @@ type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boole
2408
1993
  meta?: Record<string, unknown>;
2409
1994
  };
2410
1995
  /**
2411
- * Get the OpenAPI schema
2412
- */
2413
- declare const getOpenApi: <ThrowOnError extends boolean = false>(options?: Options$1<GetOpenApiData, ThrowOnError>) => RequestResult<GetOpenApiResponses, unknown, ThrowOnError, "fields">;
2414
- /**
2415
- * Check the health of the API
2416
- */
2417
- declare const healthCheck: <ThrowOnError extends boolean = false>(options?: Options$1<HealthCheckData, ThrowOnError>) => RequestResult<HealthCheckResponses, HealthCheckErrors, ThrowOnError, "fields">;
2418
- /**
2419
- * Execute an agent
2420
- * Executes an agent with the provided parameters
2421
- * @deprecated
2422
- */
2423
- declare const executeAgent$1: <ThrowOnError extends boolean = false>(options: Options$1<ExecuteAgentData, ThrowOnError>) => RequestResult<ExecuteAgentResponses, ExecuteAgentErrors, ThrowOnError, "fields">;
2424
- /**
2425
- * Execute an agent with structured parameters
2426
- * Executes an agent with structured parameters including optional agent profile configuration. This is the recommended method for new integrations.
2427
- * @deprecated
2428
- */
2429
- declare const executeAgentStructured: <ThrowOnError extends boolean = false>(options: Options$1<ExecuteAgentStructuredData, ThrowOnError>) => RequestResult<ExecuteAgentStructuredResponses, ExecuteAgentStructuredErrors, ThrowOnError, "fields">;
2430
- /**
2431
- * Get execution status
2432
- * @deprecated
2433
- */
2434
- declare const getExecutionStatus$1: <ThrowOnError extends boolean = false>(options: Options$1<GetExecutionStatusData, ThrowOnError>) => RequestResult<GetExecutionStatusResponses, GetExecutionStatusErrors, ThrowOnError, "fields">;
2435
- /**
2436
- * Get execution result
2437
- * @deprecated
2438
- */
2439
- declare const getExecutionResult$1: <ThrowOnError extends boolean = false>(options: Options$1<GetExecutionResultData, ThrowOnError>) => RequestResult<GetExecutionResultResponses, GetExecutionResultErrors, ThrowOnError, "fields">;
2440
- /**
2441
- * Get browser session recording
2442
- * Retrieves the browser session recording URL for a completed execution
2443
- * @deprecated
2444
- */
2445
- declare const getBrowserSessionRecording$1: <ThrowOnError extends boolean = false>(options: Options$1<GetBrowserSessionRecordingData, ThrowOnError>) => RequestResult<GetBrowserSessionRecordingResponses, GetBrowserSessionRecordingErrors, ThrowOnError, "fields">;
2446
- /**
2447
- * Get agent profiles
2448
- * Returns all agent profiles for the organization. If organization_id is not provided, returns profiles for all user's organizations.
2449
- */
2450
- declare const getAgentProfiles$1: <ThrowOnError extends boolean = false>(options?: Options$1<GetAgentProfilesData, ThrowOnError>) => RequestResult<GetAgentProfilesResponses, GetAgentProfilesErrors, ThrowOnError, "fields">;
2451
- /**
2452
- * Create an agent profile
2453
- * Creates a new agent profile for the organization
2454
- */
2455
- declare const createAgentProfile$1: <ThrowOnError extends boolean = false>(options: Options$1<CreateAgentProfileData, ThrowOnError>) => RequestResult<CreateAgentProfileResponses, CreateAgentProfileErrors, ThrowOnError, "fields">;
2456
- /**
2457
- * Delete an agent profile
2458
- * Deletes the specified agent profile
2459
- */
2460
- declare const deleteAgentProfile$1: <ThrowOnError extends boolean = false>(options: Options$1<DeleteAgentProfileData, ThrowOnError>) => RequestResult<DeleteAgentProfileResponses, DeleteAgentProfileErrors, ThrowOnError, "fields">;
2461
- /**
2462
- * Get an agent profile by ID
2463
- * Returns the complete agent profile including credentials
2464
- */
2465
- declare const getAgentProfile$1: <ThrowOnError extends boolean = false>(options: Options$1<GetAgentProfileData, ThrowOnError>) => RequestResult<GetAgentProfileResponses, GetAgentProfileErrors, ThrowOnError, "fields">;
2466
- /**
2467
- * Update an agent profile
2468
- * Updates an agent profile including metadata and/or credentials
2469
- */
2470
- declare const updateAgentProfile$1: <ThrowOnError extends boolean = false>(options: Options$1<UpdateAgentProfileData, ThrowOnError>) => RequestResult<UpdateAgentProfileResponses, UpdateAgentProfileErrors, ThrowOnError, "fields">;
2471
- /**
2472
- * Get the public key for credentials
2473
- */
2474
- declare const getCredentialsPublicKey$1: <ThrowOnError extends boolean = false>(options?: Options$1<GetCredentialsPublicKeyData, ThrowOnError>) => RequestResult<GetCredentialsPublicKeyResponses, GetCredentialsPublicKeyErrors, ThrowOnError, "fields">;
2475
-
2476
- declare const sdk_gen$1_executeAgentStructured: typeof executeAgentStructured;
2477
- declare const sdk_gen$1_getOpenApi: typeof getOpenApi;
2478
- declare const sdk_gen$1_healthCheck: typeof healthCheck;
2479
- declare namespace sdk_gen$1 {
2480
- export { type Options$1 as Options, createAgentProfile$1 as createAgentProfile, deleteAgentProfile$1 as deleteAgentProfile, executeAgent$1 as executeAgent, sdk_gen$1_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$1_getOpenApi as getOpenApi, sdk_gen$1_healthCheck as healthCheck, updateAgentProfile$1 as updateAgentProfile };
2481
- }
2482
-
2483
- type Options<TData extends TDataShape$1 = TDataShape$1, ThrowOnError extends boolean = boolean> = Options$3<TData, ThrowOnError> & {
2484
- /**
2485
- * You can provide a client instance returned by `createClient()` instead of
2486
- * individual options. This might be also useful if you want to implement a
2487
- * custom client.
2488
- */
2489
- client?: Client$2;
2490
- /**
2491
- * You can pass arbitrary values through the `meta` object. This can be
2492
- * used to access values that aren't defined as part of the SDK function.
2493
- */
2494
- meta?: Record<string, unknown>;
2495
- };
2496
- declare const agentList: <ThrowOnError extends boolean = false>(options: Options<AgentListData, ThrowOnError>) => RequestResult$1<AgentListResponses, AgentListErrors, ThrowOnError, "fields">;
2497
- /**
2498
- * Execute an agent
2499
- * Start an execution for the given agent.
2500
- */
2501
- declare const agentExecutePost: <ThrowOnError extends boolean = false>(options: Options<AgentExecutePostData, ThrowOnError>) => RequestResult$1<AgentExecutePostResponses, AgentExecutePostErrors, ThrowOnError, "fields">;
2502
- /**
2503
- * List executions
2504
- * List executions with filtering and pagination
2505
- */
2506
- declare const executionsList: <ThrowOnError extends boolean = false>(options: Options<ExecutionsListData, ThrowOnError>) => RequestResult$1<ExecutionsListResponses, ExecutionsListErrors, ThrowOnError, "fields">;
2507
- /**
2508
- * Get execution
2509
- * Get a single execution by ID with all details
2510
- */
2511
- declare const executionGet: <ThrowOnError extends boolean = false>(options: Options<ExecutionGetData, ThrowOnError>) => RequestResult$1<ExecutionGetResponses, ExecutionGetErrors, ThrowOnError, "fields">;
2512
- /**
2513
- * Retrieve execution activities
2514
- * Get activities for an execution
2515
- */
2516
- declare const executionActivitiesGet: <ThrowOnError extends boolean = false>(options: Options<ExecutionActivitiesGetData, ThrowOnError>) => RequestResult$1<ExecutionActivitiesGetResponses, ExecutionActivitiesGetErrors, ThrowOnError, "fields">;
2517
- declare const executionContextFilesGet: <ThrowOnError extends boolean = false>(options: Options<ExecutionContextFilesGetData, ThrowOnError>) => RequestResult$1<ExecutionContextFilesGetResponses, ExecutionContextFilesGetErrors, ThrowOnError, "fields">;
2518
- declare const executionContextFilesUpload: <ThrowOnError extends boolean = false>(options: Options<ExecutionContextFilesUploadData, ThrowOnError>) => RequestResult$1<ExecutionContextFilesUploadResponses, ExecutionContextFilesUploadErrors, ThrowOnError, "fields">;
2519
- /**
2520
- * Send user message to execution
2521
- * Add a user message to an execution
2522
- */
2523
- declare const executionUserMessagesAdd: <ThrowOnError extends boolean = false>(options: Options<ExecutionUserMessagesAddData, ThrowOnError>) => RequestResult$1<ExecutionUserMessagesAddResponses, ExecutionUserMessagesAddErrors, ThrowOnError, "fields">;
2524
- /**
2525
- * Stage a file for an execution
2526
- * Stage a file prior to starting an execution, so that it can be used when the execution is started. See the /agents/{agentId}/execute to understand how to pass the returned file information to the execution endpoint.
2527
- */
2528
- declare const tempFilesStage: <ThrowOnError extends boolean = false>(options: Options<TempFilesStageData, ThrowOnError>) => RequestResult$1<TempFilesStageResponses, TempFilesStageErrors, ThrowOnError, "fields">;
2529
-
2530
- type sdk_gen_Options<TData extends TDataShape$1 = TDataShape$1, ThrowOnError extends boolean = boolean> = Options<TData, ThrowOnError>;
2531
- declare const sdk_gen_agentExecutePost: typeof agentExecutePost;
2532
- declare const sdk_gen_agentList: typeof agentList;
2533
- declare const sdk_gen_executionActivitiesGet: typeof executionActivitiesGet;
2534
- declare const sdk_gen_executionContextFilesGet: typeof executionContextFilesGet;
2535
- declare const sdk_gen_executionContextFilesUpload: typeof executionContextFilesUpload;
2536
- declare const sdk_gen_executionGet: typeof executionGet;
2537
- declare const sdk_gen_executionUserMessagesAdd: typeof executionUserMessagesAdd;
2538
- declare const sdk_gen_executionsList: typeof executionsList;
2539
- declare const sdk_gen_tempFilesStage: typeof tempFilesStage;
2540
- declare namespace sdk_gen {
2541
- export { type sdk_gen_Options as Options, sdk_gen_agentExecutePost as agentExecutePost, sdk_gen_agentList as agentList, sdk_gen_executionActivitiesGet as executionActivitiesGet, sdk_gen_executionContextFilesGet as executionContextFilesGet, sdk_gen_executionContextFilesUpload as executionContextFilesUpload, sdk_gen_executionGet as executionGet, sdk_gen_executionUserMessagesAdd as executionUserMessagesAdd, sdk_gen_executionsList as executionsList, sdk_gen_tempFilesStage as tempFilesStage };
2542
- }
2543
-
2544
- /**
2545
- * Create an API client with a provided API key.
2546
- *
2547
- * @param apiKey - Your API key.
2548
- * @returns A configured API client.
2549
- *
2550
- * @example
2551
- * const client = AsteroidClient('your-api-key');
2552
- */
2553
- declare const AsteroidClient: (apiKey: string, options?: {
2554
- v1?: {
2555
- baseUrl?: string;
2556
- };
2557
- v2?: {
2558
- baseUrl?: string;
2559
- };
2560
- }) => {
2561
- agentsV1Client: Client;
2562
- agentsV2Client: Client$2;
2563
- };
2564
- type AsteroidClient = ReturnType<typeof AsteroidClient>;
2565
- /** --- V1 --- */
2566
- /**
2567
- * Execute an agent with parameters including optional agent profile ID, dynamic data, and metadata.
2568
- *
2569
- * @param client - The API client.
2570
- * @param agentId - The ID of the agent to execute.
2571
- * @param executionData - The structured execution parameters.
2572
- * @returns The execution ID.
2573
- *
2574
- * @example
2575
- * const executionId = await executeAgent(client, 'my-agent-id', {
2576
- * agentProfileId: 'profile-123',
2577
- * dynamicData: { input: "some dynamic value" },
2578
- * metadata: { environment: "production", userId: "user-123" }
2579
- * });
2580
- */
2581
- declare const executeAgent: (client: AsteroidClient, agentId: string, executionData: AgentsAgentExecuteAgentRequest) => Promise<string>;
2582
- /**
2583
- * Get the current status for an execution.
2584
- *
2585
- * @param client - The API client.
2586
- * @param executionId - The execution identifier.
2587
- * @returns The execution status details.
2588
- *
2589
- * @example
2590
- * const status = await getExecutionStatus(client, executionId);
2591
- * console.log(status.status);
2592
- */
2593
- declare const getExecutionStatus: (client: AsteroidClient, executionId: string) => Promise<ExecutionStatusResponse>;
2594
- /**
2595
- * Get the final result of an execution.
2596
- *
2597
- * @param client - The API client.
2598
- * @param executionId - The execution identifier.
2599
- * @returns The result object of the execution.
2600
- *
2601
- * @example
2602
- * const result = await getExecutionResult(client, executionId);
2603
- * console.log(result);
2604
- */
2605
- declare const getExecutionResult: (client: AsteroidClient, executionId: string) => Promise<Record<string, unknown>>;
2606
- /**
2607
- * Waits for an execution to reach a terminal state and returns the result.
2608
- * Continuously polls the execution status until it's either "completed", "cancelled", or "failed".
2609
- *
2610
- * @param client - The API client.
2611
- * @param executionId - The execution identifier.
2612
- * @param interval - Polling interval in milliseconds (default is 1000ms).
2613
- * @returns A promise that resolves with the execution result if completed.
2614
- * @throws An error if the execution ends as "cancelled" or "failed".
2615
- *
2616
- * @example
2617
- * const result = await waitForExecutionResult(client, executionId, 2000);
2618
- */
2619
- declare const waitForExecutionResult: (client: AsteroidClient, executionId: string, interval?: number, timeout?: number) => Promise<Record<string, unknown>>;
2620
- /**
2621
- * Get the browser session recording URL for a completed execution.
2622
- *
2623
- * @param client - The API client.
2624
- * @param executionId - The execution identifier.
2625
- * @returns The browser session recording URL.
2626
- *
2627
- * @example
2628
- * const recording = await getBrowserSessionRecording(client, executionId);
2629
- * console.log(recording.recording_url);
2630
- */
2631
- declare const getBrowserSessionRecording: (client: AsteroidClient, executionId: string) => Promise<BrowserSessionRecordingResponse>;
2632
- /**
2633
- * Upload files to an execution.
2634
- *
2635
- * @param client - The API client.
2636
- * @param executionId - The execution identifier.
2637
- * @param files - Array of files to upload.
2638
- * @returns A success message.
1996
+ * List Agent Profiles
2639
1997
  *
2640
- * @example
2641
- * const fileInput = document.getElementById('file-input') as HTMLInputElement;
2642
- * const files = Array.from(fileInput.files || []);
2643
- * const result = await uploadExecutionFiles(client, executionId, files);
2644
- * console.log(result); // "Files uploaded."
1998
+ * List all agent profiles for an organization
2645
1999
  */
2646
- declare const uploadExecutionFiles: (client: AsteroidClient, executionId: string, files: Array<Blob | globalThis.File>) => Promise<string>;
2000
+ declare const agentProfilesList: <ThrowOnError extends boolean = false>(options?: Options<AgentProfilesListData, ThrowOnError>) => RequestResult<AgentProfilesListResponses, AgentProfilesListErrors, ThrowOnError, "fields">;
2647
2001
  /**
2648
- * Get agent profiles for an organization (or all organizations for the user if not specified).
2002
+ * Create Agent Profile
2649
2003
  *
2650
- * @param client - The API client.
2651
- * @param organizationId - Optional organization ID to filter by.
2652
- * @returns []AgentProfile - List of agent profiles.
2653
- *
2654
- * @example
2655
- * const profiles = await getAgentProfiles(client, 'org_123');
2004
+ * Create a new agent profile
2656
2005
  */
2657
- declare const getAgentProfiles: (client: AsteroidClient, organizationId?: string) => Promise<AgentProfile[]>;
2006
+ declare const agentProfilesCreate: <ThrowOnError extends boolean = false>(options: Options<AgentProfilesCreateData, ThrowOnError>) => RequestResult<AgentProfilesCreateResponses, AgentProfilesCreateErrors, ThrowOnError, "fields">;
2658
2007
  /**
2659
- * Get the public key for encrypting credentials.
2660
- *
2661
- * @param client - The API client.
2662
- * @returns The PEM-formatted public key.
2008
+ * Delete Agent Profile
2663
2009
  *
2664
- * @example
2665
- * const publicKey = await getCredentialsPublicKey(client);
2010
+ * Delete an agent profile
2666
2011
  */
2667
- declare const getCredentialsPublicKey: (client: AsteroidClient) => Promise<string>;
2012
+ declare const agentProfileDelete: <ThrowOnError extends boolean = false>(options: Options<AgentProfileDeleteData, ThrowOnError>) => RequestResult<AgentProfileDeleteResponses, AgentProfileDeleteErrors, ThrowOnError, "fields">;
2668
2013
  /**
2669
- * Create a new agent profile.
2670
- *
2671
- * @param client - The API client.
2672
- * @param payload - The agent profile data.
2673
- * @returns The created agent profile.
2014
+ * Get Agent Profile
2674
2015
  *
2675
- * @example
2676
- * const profile = await createAgentProfile(client, {
2677
- * name: 'My Profile',
2678
- * description: 'Profile description',
2679
- * organization_id: 'org_123',
2680
- * proxy_cc: 'us',
2681
- * proxy_type: 'residential',
2682
- * captcha_solver_active: false,
2683
- * sticky_ip: false,
2684
- * credentials: []
2685
- * cookies: []
2686
- * });
2016
+ * Get an agent profile by ID
2687
2017
  */
2688
- declare const createAgentProfile: (client: AsteroidClient, payload: CreateAgentProfileRequest) => Promise<AgentProfile>;
2018
+ declare const agentProfileGet: <ThrowOnError extends boolean = false>(options: Options<AgentProfileGetData, ThrowOnError>) => RequestResult<AgentProfileGetResponses, AgentProfileGetErrors, ThrowOnError, "fields">;
2689
2019
  /**
2690
- * Get a specific agent profile by ID.
2691
- *
2692
- * @param client - The API client.
2693
- * @param profileId - The agent profile ID.
2694
- * @returns The agent profile.
2020
+ * Update Agent Profile
2695
2021
  *
2696
- * @example
2697
- * const profile = await getAgentProfile(client, 'profile_123');
2022
+ * Update an existing agent profile
2698
2023
  */
2699
- declare const getAgentProfile: (client: AsteroidClient, profileId: string) => Promise<AgentProfile>;
2024
+ declare const agentProfileUpdate: <ThrowOnError extends boolean = false>(options: Options<AgentProfileUpdateData, ThrowOnError>) => RequestResult<AgentProfileUpdateResponses, AgentProfileUpdateErrors, ThrowOnError, "fields">;
2700
2025
  /**
2701
- * Update an existing agent profile.
2026
+ * Clear Browser Cache
2702
2027
  *
2703
- * @param client - The API client.
2704
- * @param profileId - The agent profile ID.
2705
- * @param payload - The update data.
2706
- * @returns The updated agent profile.
2707
- *
2708
- * @example
2709
- * const updated = await updateAgentProfile(client, 'profile_123', {
2710
- * name: 'New Name',
2711
- * credentials_to_add: [{ name: 'API_KEY', data: 'secret-key' }],
2712
- * credentials_to_delete: ['cred_456']
2713
- * });
2028
+ * Clears the browser profile/cache for the specified agent profile by deleting its browser profile
2714
2029
  */
2715
- declare const updateAgentProfile: (client: AsteroidClient, profileId: string, payload: UpdateAgentProfileRequest) => Promise<AgentProfile>;
2030
+ declare const agentProfileClearBrowserCache: <ThrowOnError extends boolean = false>(options: Options<AgentProfileClearBrowserCacheData, ThrowOnError>) => RequestResult<AgentProfileClearBrowserCacheResponses, AgentProfileClearBrowserCacheErrors, ThrowOnError, "fields">;
2031
+ declare const agentList: <ThrowOnError extends boolean = false>(options?: Options<AgentListData, ThrowOnError>) => RequestResult<AgentListResponses, AgentListErrors, ThrowOnError, "fields">;
2716
2032
  /**
2717
- * Delete an agent profile by ID.
2718
- *
2719
- * @param client - The API client.
2720
- * @param profileId - The agent profile ID.
2721
- * @returns A success message.
2033
+ * Execute an agent
2722
2034
  *
2723
- * @example
2724
- * await deleteAgentProfile(client, 'profile_123');
2035
+ * Start an execution for the given agent.
2725
2036
  */
2726
- declare const deleteAgentProfile: (client: AsteroidClient, profileId: string) => Promise<{
2727
- message?: string;
2728
- }>;
2037
+ declare const agentExecutePost: <ThrowOnError extends boolean = false>(options: Options<AgentExecutePostData, ThrowOnError>) => RequestResult<AgentExecutePostResponses, AgentExecutePostErrors, ThrowOnError, "fields">;
2729
2038
  /**
2730
- * Get the last N execution activities for a given execution ID, sorted by their timestamp in descending order.
2731
- *
2732
- * @param client - The API client.
2733
- * @param executionId - The execution identifier.
2734
- * @param n - The number of activities to return.
2735
- * @returns The list of execution activities.
2039
+ * List executions
2736
2040
  *
2737
- * @example
2738
- * const activities = await getLastNExecutionActivities(client, 'execution_123', 10);
2739
- * console.log(activities);
2041
+ * List executions with filtering and pagination
2740
2042
  */
2741
- declare const getLastNExecutionActivities: (client: AsteroidClient, executionId: string, n: number) => Promise<AgentsExecutionActivity[]>;
2043
+ declare const executionsList: <ThrowOnError extends boolean = false>(options?: Options<ExecutionsListData, ThrowOnError>) => RequestResult<ExecutionsListResponses, ExecutionsListErrors, ThrowOnError, "fields">;
2742
2044
  /**
2743
- * Add a message to an execution.
2744
- *
2745
- * @param client - The API client.
2746
- * @param executionId - The execution identifier.
2747
- * @param message - The message to add.
2045
+ * Get execution
2748
2046
  *
2749
- * @example
2750
- * await addMessageToExecution(client, 'execution_123', 'Hello, world!');
2047
+ * Get a single execution by ID with all details
2751
2048
  */
2752
- declare const addMessageToExecution: (client: AsteroidClient, executionId: string, message: string) => Promise<void>;
2049
+ declare const executionGet: <ThrowOnError extends boolean = false>(options: Options<ExecutionGetData, ThrowOnError>) => RequestResult<ExecutionGetResponses, ExecutionGetErrors, ThrowOnError, "fields">;
2753
2050
  /**
2754
- * Get a list of files associated with an execution.
2755
- *
2756
- * @param client - The API client.
2757
- * @param executionId - The execution identifier.
2758
- * @returns A list of files associated with the execution.
2051
+ * Retrieve execution activities
2759
2052
  *
2760
- * @example
2761
- * const files = await getExecutionFiles(client, 'execution_123');
2762
- * files.forEach(file => {
2763
- * console.log(`File: ${file.fileName}, Size: ${file.fileSize}`);
2764
- * });
2053
+ * Get activities for an execution
2765
2054
  */
2766
- declare const getExecutionFiles: (client: AsteroidClient, executionId: string) => Promise<AgentsFilesFile[]>;
2055
+ declare const executionActivitiesGet: <ThrowOnError extends boolean = false>(options: Options<ExecutionActivitiesGetData, ThrowOnError>) => RequestResult<ExecutionActivitiesGetResponses, ExecutionActivitiesGetErrors, ThrowOnError, "fields">;
2056
+ declare const executionContextFilesGet: <ThrowOnError extends boolean = false>(options: Options<ExecutionContextFilesGetData, ThrowOnError>) => RequestResult<ExecutionContextFilesGetResponses, ExecutionContextFilesGetErrors, ThrowOnError, "fields">;
2057
+ declare const executionContextFilesUpload: <ThrowOnError extends boolean = false>(options: Options<ExecutionContextFilesUploadData, ThrowOnError>) => RequestResult<ExecutionContextFilesUploadResponses, ExecutionContextFilesUploadErrors, ThrowOnError, "fields">;
2767
2058
  /**
2768
- * Download a file from an execution using its signed URL.
2769
- *
2770
- * @param client - The API client.
2771
- * @param file - The File object containing the signed URL and metadata.
2772
- * @param downloadPath - Path where the file should be saved. Can be a directory or full file path.
2773
- * @param createDirs - Whether to create parent directories if they don't exist (default: true).
2774
- * @param timeout - Request timeout in seconds (default: 30).
2775
- * @returns The full path where the file was saved.
2059
+ * Update execution status
2776
2060
  *
2777
- * @example
2778
- * const files = await getExecutionFiles(client, 'execution_123');
2779
- * for (const file of files) {
2780
- * // Download to specific directory
2781
- * const savedPath = await downloadExecutionFile(client, file, './downloads/');
2782
- * console.log(`Downloaded ${file.fileName} to ${savedPath}`);
2783
- *
2784
- * // Download with specific filename
2785
- * const savedPath2 = await downloadExecutionFile(client, file, './downloads/my_file.txt');
2786
- * console.log(`Downloaded to ${savedPath2}`);
2787
- * }
2061
+ * Update the status of an execution. Use this to pause, resume, or cancel an execution.
2788
2062
  */
2789
- declare const downloadExecutionFile: (client: AsteroidClient, file: AgentsFilesFile, downloadPath: string, createDirs?: boolean, timeout?: number) => Promise<string>;
2790
- /** --- V2 --- */
2063
+ declare const executionStatusUpdate: <ThrowOnError extends boolean = false>(options: Options<ExecutionStatusUpdateData, ThrowOnError>) => RequestResult<ExecutionStatusUpdateResponses, ExecutionStatusUpdateErrors, ThrowOnError, "fields">;
2791
2064
  /**
2792
- * Get a paginated list of agents for an organization.
2065
+ * Send user message to execution
2793
2066
  *
2794
- * @param client - The API client.
2795
- * @param organizationId - The organization identifier.
2796
- * @param page - The page number.
2797
- * @param pageSize - The page size.
2798
- * @returns The list of agents.
2067
+ * Add a user message to an execution
2799
2068
  */
2800
- declare const getAgents: (client: AsteroidClient, organizationId: string, page: number, pageSize: number) => Promise<AgentsAgentBase[]>;
2069
+ declare const executionUserMessagesAdd: <ThrowOnError extends boolean = false>(options: Options<ExecutionUserMessagesAddData, ThrowOnError>) => RequestResult<ExecutionUserMessagesAddResponses, ExecutionUserMessagesAddErrors, ThrowOnError, "fields">;
2801
2070
  /**
2802
- * Get a paginated list of executions with optional filtering.
2803
- *
2804
- * @param client - The API client.
2805
- * @param options - Filtering and pagination options.
2806
- * @returns Paginated execution list with metadata.
2807
- *
2808
- * @example
2809
- * // Get all executions for an organization
2810
- * const result = await getExecutions(client, {
2811
- * organizationId: 'org_123',
2812
- * page: 1,
2813
- * pageSize: 20
2814
- * });
2815
- *
2816
- * @example
2817
- * // Filter by agent and status
2818
- * const result = await getExecutions(client, {
2819
- * organizationId: 'org_123',
2820
- * agentId: 'agent_456',
2821
- * status: ['completed', 'failed'],
2822
- * page: 1,
2823
- * pageSize: 20,
2824
- * sortField: 'created_at',
2825
- * sortDirection: 'desc'
2826
- * });
2071
+ * Stage a file for an execution
2827
2072
  *
2828
- * @example
2829
- * // Search by execution ID
2830
- * const result = await getExecutions(client, {
2831
- * executionId: 'exec_',
2832
- * page: 1,
2833
- * pageSize: 20
2834
- * });
2073
+ * Stage a file prior to starting an execution, so that it can be used when the execution is started. See the /agents/{agentId}/execute to understand how to pass the returned file information to the execution endpoint.
2835
2074
  */
2836
- declare const getExecutions: (client: AsteroidClient, options: ExecutionsListData) => Promise<ExecutionsListResponses["200"]>;
2075
+ declare const tempFilesStage: <ThrowOnError extends boolean = false>(options: Options<TempFilesStageData, ThrowOnError>) => RequestResult<TempFilesStageResponses, TempFilesStageErrors, ThrowOnError, "fields">;
2837
2076
 
2838
- export { sdk_gen$1 as AgentsV1SDK, types_gen$1 as AgentsV1Types, sdk_gen as AgentsV2SDK, types_gen as AgentsV2Types, AsteroidClient, addMessageToExecution, createAgentProfile, deleteAgentProfile, downloadExecutionFile, executeAgent, getAgentProfile, getAgentProfiles, getAgents, getBrowserSessionRecording, getCredentialsPublicKey, getExecutionFiles, getExecutionResult, getExecutionStatus, getExecutions, getLastNExecutionActivities, updateAgentProfile, uploadExecutionFiles, waitForExecutionResult };
2077
+ export { type AgentExecutePostData, type AgentExecutePostError, type AgentExecutePostErrors, type AgentExecutePostResponse, type AgentExecutePostResponses, type AgentListData, type AgentListError, type AgentListErrors, type AgentListResponse, type AgentListResponses, type AgentProfileClearBrowserCacheData, type AgentProfileClearBrowserCacheError, type AgentProfileClearBrowserCacheErrors, type AgentProfileClearBrowserCacheResponse, type AgentProfileClearBrowserCacheResponses, type AgentProfileDeleteData, type AgentProfileDeleteError, type AgentProfileDeleteErrors, type AgentProfileDeleteResponse, type AgentProfileDeleteResponses, type AgentProfileGetData, type AgentProfileGetError, type AgentProfileGetErrors, type AgentProfileGetResponse, type AgentProfileGetResponses, type AgentProfileUpdateData, type AgentProfileUpdateError, type AgentProfileUpdateErrors, type AgentProfileUpdateResponse, type AgentProfileUpdateResponses, type AgentProfilesCreateData, type AgentProfilesCreateError, type AgentProfilesCreateErrors, type AgentProfilesCreateResponse, type AgentProfilesCreateResponses, type AgentProfilesListData, type AgentProfilesListError, type AgentProfilesListErrors, type AgentProfilesListResponse, type AgentProfilesListResponses, type AgentsAgentBase, type AgentsAgentExecuteAgentRequest, type AgentsAgentExecuteAgentResponse, type AgentsAgentSearch, type AgentsAgentSortField, type AgentsExecutionActionName, type AgentsExecutionActivity, type AgentsExecutionActivityActionCompletedInfo, type AgentsExecutionActivityActionCompletedPayload, type AgentsExecutionActivityActionFailedPayload, type AgentsExecutionActivityActionStartedInfo, type AgentsExecutionActivityActionStartedPayload, type AgentsExecutionActivityFileAddedPayload, type AgentsExecutionActivityGenericPayload, type AgentsExecutionActivityPayloadUnion, type AgentsExecutionActivityPlaywrightScriptGeneratedPayload, type AgentsExecutionActivityReasoningPayload, type AgentsExecutionActivityStatusChangedPayload, type AgentsExecutionActivityStepCompletedPayload, type AgentsExecutionActivityStepStartedPayload, type AgentsExecutionActivityTransitionedNodePayload, type AgentsExecutionActivityUserMessageReceivedPayload, type AgentsExecutionActivityWorkflowUpdatedPayload, type AgentsExecutionAgentQueryContextCompletedDetails, type AgentsExecutionAgentQueryContextStartedDetails, type AgentsExecutionAwaitingConfirmationPayload, type AgentsExecutionCancelReason, type AgentsExecutionCancelledPayload, type AgentsExecutionComment, type AgentsExecutionCompletedPayload, type AgentsExecutionElementFileUploadCompletedDetails, type AgentsExecutionExecutionResult, type AgentsExecutionExtApiCallCompletedDetails, type AgentsExecutionExtGetMailCompletedDetails, type AgentsExecutionFailedPayload, type AgentsExecutionFileListCompletedDetails, type AgentsExecutionFileReadCompletedDetails, type AgentsExecutionFileStageCompletedDetails, type AgentsExecutionHumanLabel, type AgentsExecutionListItem, type AgentsExecutionLlmCallPurpose, type AgentsExecutionLlmCallStartedDetails, type AgentsExecutionNavToCompletedDetails, type AgentsExecutionNavToStartedDetails, type AgentsExecutionNodeDetails, type AgentsExecutionNodeOutputItem, type AgentsExecutionObsSnapshotWithSelectorsCompletedDetails, type AgentsExecutionPausedPayload, type AgentsExecutionRulesDetails, type AgentsExecutionScratchpadReadCompletedDetails, type AgentsExecutionScratchpadReadStartedDetails, type AgentsExecutionScratchpadWriteCompletedDetails, type AgentsExecutionScratchpadWriteStartedDetails, type AgentsExecutionScriptEvalCompletedDetails, type AgentsExecutionScriptEvalStartedDetails, type AgentsExecutionScriptHybridPlaywrightCompletedDetails, type AgentsExecutionScriptHybridPlaywrightStartedDetails, type AgentsExecutionScriptPadRunFunctionCompletedDetails, type AgentsExecutionScriptPlaywrightCompletedDetails, type AgentsExecutionScriptPlaywrightStartedDetails, type AgentsExecutionScriptpadReadCompletedDetails, type AgentsExecutionScriptpadReadStartedDetails, type AgentsExecutionScriptpadRunFunctionStartedDetails, type AgentsExecutionScriptpadSearchReplaceCompletedDetails, type AgentsExecutionScriptpadSearchReplaceStartedDetails, type AgentsExecutionScriptpadWriteCompletedDetails, type AgentsExecutionSearchAgentId, type AgentsExecutionSearchCreatedAfter, type AgentsExecutionSearchCreatedBefore, type AgentsExecutionSearchExecutionId, type AgentsExecutionSearchHumanLabels, type AgentsExecutionSearchMetadataKey, type AgentsExecutionSearchMetadataValue, type AgentsExecutionSearchOutcomeLabel, type AgentsExecutionSearchStatus, type AgentsExecutionSortField, type AgentsExecutionStatus, type AgentsExecutionTerminalPayload, type AgentsExecutionTransitionDetails, type AgentsExecutionUpdateExecutionStatusRequest, type AgentsExecutionUpdateType, type AgentsExecutionUpdateableStatus, type AgentsExecutionUserMessagesAddTextBody, type AgentsExecutionUtilGetDatetimeCompletedDetails, type AgentsExecutionUtilGetDatetimeStartedDetails, type AgentsExecutionWorkflowUpdate, type AgentsFilesFile, type AgentsFilesFilePart, type AgentsFilesTempFile, type AgentsFilesTempFilesResponse, type AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVar, type AgentsGraphModelsNodesPropertiesPlaywrightScriptLlmVarType, type AgentsGraphModelsTransitionsTransitionType, type AgentsProfileAgentProfile, type AgentsProfileCookie, type AgentsProfileCountryCode, type AgentsProfileCreateAgentProfileRequest, type AgentsProfileCredential, type AgentsProfileOperatingSystem, type AgentsProfileProxyType, type AgentsProfileSameSite, type AgentsProfileSearch, type AgentsProfileSortField, type AgentsProfileUpdateAgentProfileRequest, type ClientOptions, type CommonBadRequestErrorBody, type CommonError, type CommonForbiddenErrorBody, type CommonInternalServerErrorBody, type CommonNotFoundErrorBody, type CommonOsError, type CommonPaginationPage, type CommonPaginationPageSize, type CommonSortDirection, type CommonUnauthorizedErrorBody, type CommonUuid, type ExecutionActivitiesGetData, type ExecutionActivitiesGetError, type ExecutionActivitiesGetErrors, type ExecutionActivitiesGetResponse, type ExecutionActivitiesGetResponses, type ExecutionContextFilesGetData, type ExecutionContextFilesGetError, type ExecutionContextFilesGetErrors, type ExecutionContextFilesGetResponse, type ExecutionContextFilesGetResponses, type ExecutionContextFilesUploadData, type ExecutionContextFilesUploadError, type ExecutionContextFilesUploadErrors, type ExecutionContextFilesUploadResponse, type ExecutionContextFilesUploadResponses, type ExecutionGetData, type ExecutionGetError, type ExecutionGetErrors, type ExecutionGetResponse, type ExecutionGetResponses, type ExecutionStatusUpdateData, type ExecutionStatusUpdateError, type ExecutionStatusUpdateErrors, type ExecutionStatusUpdateResponse, type ExecutionStatusUpdateResponses, type ExecutionUserMessagesAddData, type ExecutionUserMessagesAddError, type ExecutionUserMessagesAddErrors, type ExecutionUserMessagesAddResponse, type ExecutionUserMessagesAddResponses, type ExecutionsListData, type ExecutionsListError, type ExecutionsListErrors, type ExecutionsListResponse, type ExecutionsListResponses, type Options, type TempFilesStageData, type TempFilesStageError, type TempFilesStageErrors, type TempFilesStageResponse, type TempFilesStageResponses, type Version, agentExecutePost, agentList, agentProfileClearBrowserCache, agentProfileDelete, agentProfileGet, agentProfileUpdate, agentProfilesCreate, agentProfilesList, executionActivitiesGet, executionContextFilesGet, executionContextFilesUpload, executionGet, executionStatusUpdate, executionUserMessagesAdd, executionsList, tempFilesStage };