asteroid-odyssey 1.3.11 → 1.6.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts 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,1272 @@ 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)
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;
412
+ };
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;
531
+ /**
532
+ * Output variables provided by the from node
576
533
  */
577
- expiry?: string;
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 = {
578
565
  /**
579
- * The domain for which the cookie is valid
566
+ * Unique identifier for the comment
580
567
  */
581
- domain: string;
568
+ id: CommonUuid;
582
569
  /**
583
- * Whether the cookie should only be sent over HTTPS
570
+ * Execution this comment belongs to
584
571
  */
585
- secure: boolean;
572
+ executionId: CommonUuid;
586
573
  /**
587
- * SameSite attribute for the cookie
574
+ * User who created the comment
588
575
  */
589
- same_site: 'Strict' | 'Lax' | 'None';
576
+ userId: CommonUuid;
590
577
  /**
591
- * Whether the cookie should be accessible only via HTTP(S)
578
+ * Comment content
592
579
  */
593
- http_only: boolean;
580
+ content: string;
594
581
  /**
595
- * When the cookie was created
582
+ * Whether the comment is public
596
583
  */
597
- created_at: string;
584
+ public: boolean;
585
+ /**
586
+ * When the comment was created
587
+ */
588
+ createdAt: string;
589
+ /**
590
+ * When the comment was last updated
591
+ */
592
+ updatedAt?: string;
598
593
  };
599
- type AgentProfile = {
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 = {
600
608
  /**
601
- * Unique identifier for the agent profile
609
+ * Unique identifier for the result
602
610
  */
603
- id: string;
611
+ id: CommonUuid;
604
612
  /**
605
- * Name of the agent profile (unique within organization)
613
+ * Execution this result belongs to
606
614
  */
607
- name: string;
615
+ executionId: CommonUuid;
608
616
  /**
609
- * Description of the agent profile
617
+ * Outcome of the execution (success or failure)
610
618
  */
611
- description: string;
619
+ outcome: string;
612
620
  /**
613
- * The ID of the organization that the agent profile belongs to
621
+ * AI reasoning for the outcome
614
622
  */
615
- organization_id: string;
616
- proxy_cc?: CountryCode;
617
- proxy_type?: ProxyType;
623
+ reasoning: string;
618
624
  /**
619
- * Whether the captcha solver is active for this profile
625
+ * Result data as JSON
620
626
  */
621
- captcha_solver_active: boolean;
627
+ result: unknown;
622
628
  /**
623
- * Whether the same IP address should be used for all executions of this profile
629
+ * When the result was created
624
630
  */
625
- sticky_ip: boolean;
631
+ createdAt: string;
632
+ };
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 = {
626
667
  /**
627
- * List of credentials associated with this agent profile
668
+ * Unique identifier for the label
628
669
  */
629
- credentials: Array<Credential>;
670
+ id: CommonUuid;
630
671
  /**
631
- * List of cookies associated with this agent profile
672
+ * Organization this label belongs to
632
673
  */
633
- cookies: Array<Cookie>;
674
+ organizationId: CommonUuid;
634
675
  /**
635
- * The date and time the agent profile was created
676
+ * Display name of the label
636
677
  */
637
- created_at: string;
678
+ name: string;
638
679
  /**
639
- * The last update time of the agent profile
680
+ * Hex color code for the label (e.g., #FF5733)
640
681
  */
641
- updated_at: string;
682
+ color: string;
642
683
  /**
643
- * Whether to enable extra stealth for the profile
684
+ * When the label was created
644
685
  */
645
- 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;
646
692
  };
647
- type CreateAgentProfileRequest = {
693
+ /**
694
+ * Represents a single execution in a list view
695
+ */
696
+ type AgentsExecutionListItem = {
648
697
  /**
649
- * Name of the agent profile (must be unique within organization)
698
+ * The unique identifier of the execution
650
699
  */
651
- name: string;
700
+ id: CommonUuid;
652
701
  /**
653
- * Description of the agent profile
702
+ * The ID of the agent that was executed
654
703
  */
655
- description: string;
704
+ agentId: CommonUuid;
656
705
  /**
657
- * The ID of the organization that the agent profile belongs to
706
+ * The ID of the workflow that was executed
658
707
  */
659
- organization_id: string;
660
- proxy_cc: CountryCode;
661
- proxy_type: ProxyType;
708
+ workflowId: CommonUuid;
662
709
  /**
663
- * Whether the captcha solver should be active for this profile
710
+ * The current status of the execution
664
711
  */
665
- captcha_solver_active: boolean;
712
+ status: AgentsExecutionStatus;
666
713
  /**
667
- * Whether the same IP address should be used for all executions of this profile
714
+ * When the execution was created
668
715
  */
669
- sticky_ip: boolean;
716
+ createdAt: string;
670
717
  /**
671
- * Optional list of credentials to create with the profile
718
+ * When the execution reached a terminal state (if applicable)
672
719
  */
673
- credentials: Array<Credential>;
720
+ terminalAt?: string;
674
721
  /**
675
- * Optional list of cookies to create with the profile
722
+ * The organization this execution belongs to
676
723
  */
677
- cookies: Array<Cookie>;
724
+ organizationId: CommonUuid;
678
725
  /**
679
- * Whether to enable extra stealth for the profile
726
+ * The agent display name
680
727
  */
681
- extra_stealth?: boolean;
682
- };
683
- type UpdateAgentProfileRequest = {
728
+ agentName: string;
684
729
  /**
685
- * The name of the agent profile
730
+ * The name of the agent profile used for this execution (if any)
686
731
  */
687
- name?: string;
732
+ agentProfileName?: string;
688
733
  /**
689
- * The description of the agent profile
734
+ * Execution result with outcome, reasoning, and result data
690
735
  */
691
- description?: string;
692
- proxy_cc?: CountryCode;
693
- proxy_type?: ProxyType;
736
+ executionResult?: AgentsExecutionExecutionResult;
737
+ /**
738
+ * Execution duration in seconds (only present for terminal executions)
739
+ */
740
+ duration?: number;
694
741
  /**
695
- * Whether the captcha solver should be active for this profile
742
+ * Human-applied labels for this execution
696
743
  */
697
- captcha_solver_active?: boolean;
744
+ humanLabels: Array<AgentsExecutionHumanLabel>;
698
745
  /**
699
- * Whether the same IP address should be used for all executions of this profile
746
+ * Comments on this execution
700
747
  */
701
- sticky_ip?: boolean;
748
+ comments: Array<AgentsExecutionComment>;
702
749
  /**
703
- * List of credentials to add to the profile
750
+ * Optional metadata key-value pairs attached to this execution
704
751
  */
705
- credentials_to_add?: Array<Credential>;
752
+ metadata?: {
753
+ [key: string]: unknown;
754
+ };
706
755
  /**
707
- * List of credential IDs to delete from the profile
756
+ * Browser recording URL (if a browser session was used and execution is terminal)
708
757
  */
709
- credentials_to_delete?: Array<string>;
758
+ browserRecordingUrl?: string;
710
759
  /**
711
- * List of cookies to add to the profile
760
+ * Browser live view URL for debugging (if a browser session is active and execution is running)
712
761
  */
713
- cookies_to_add?: Array<Cookie>;
762
+ browserLiveViewUrl?: string;
763
+ };
764
+ type AgentsExecutionNavToCompletedDetails = {
765
+ actionName: 'nav_to';
766
+ pageTitle?: string;
767
+ };
768
+ type AgentsExecutionNavToStartedDetails = {
769
+ actionName: 'nav_to';
770
+ url: string;
771
+ };
772
+ type AgentsExecutionNodeDetails = {
773
+ nodeID: CommonUuid;
774
+ nodeName: string;
775
+ nodeType: string;
776
+ };
777
+ /**
778
+ * A single output variable with a name and value
779
+ */
780
+ type AgentsExecutionNodeOutputItem = {
714
781
  /**
715
- * List of cookie IDs to delete from the profile
782
+ * The name of the output variable
716
783
  */
717
- cookies_to_delete?: Array<string>;
784
+ name: string;
718
785
  /**
719
- * Whether to enable extra stealth for the profile
786
+ * The value of the output variable
720
787
  */
721
- extra_stealth?: boolean;
788
+ value: string;
789
+ };
790
+ type AgentsExecutionObsSnapshotWithSelectorsCompletedDetails = {
791
+ actionName: 'obs_snapshot_with_selectors';
792
+ url: string;
793
+ title: string;
794
+ };
795
+ type AgentsExecutionPausedPayload = {
796
+ reason: string;
797
+ };
798
+ type AgentsExecutionRulesDetails = {
799
+ rules: string;
800
+ };
801
+ type AgentsExecutionScratchpadReadCompletedDetails = {
802
+ actionName: 'scratchpad_read';
803
+ content?: string;
804
+ contentTruncated?: boolean;
805
+ };
806
+ type AgentsExecutionScratchpadReadStartedDetails = {
807
+ actionName: 'scratchpad_read';
808
+ operation: 'read';
809
+ };
810
+ type AgentsExecutionScratchpadWriteCompletedDetails = {
811
+ actionName: 'scratchpad_write';
812
+ linesChanged: number;
813
+ totalLines: number;
814
+ patchesApplied: number;
815
+ content?: string;
816
+ contentTruncated?: boolean;
817
+ };
818
+ type AgentsExecutionScratchpadWriteStartedDetails = {
819
+ actionName: 'scratchpad_write';
820
+ operation: 'write';
821
+ };
822
+ type AgentsExecutionScriptEvalCompletedDetails = {
823
+ actionName: 'script_eval';
824
+ result: unknown;
825
+ };
826
+ type AgentsExecutionScriptEvalStartedDetails = {
827
+ actionName: 'script_eval';
828
+ element?: string;
829
+ ref?: string;
830
+ function: string;
722
831
  };
723
- /**
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
729
- */
730
- type ProxyType = 'basic' | 'residential' | 'mobile';
731
- type Credential = {
732
- /**
733
- * The unique identifier for this credential
734
- */
735
- id?: string;
736
- /**
737
- * The credential name
738
- */
739
- name: string;
740
- /**
741
- * The encrypted credential
742
- */
743
- data: string;
744
- /**
745
- * When the credential was created
746
- */
747
- created_at?: string;
832
+ type AgentsExecutionScriptHybridPlaywrightCompletedDetails = {
833
+ actionName: 'script_hybrid_playwright';
834
+ success: boolean;
835
+ result: string;
836
+ consoleLogs: Array<string>;
837
+ failedLine?: number;
748
838
  };
749
- type GetOpenApiData = {
750
- body?: never;
751
- path?: never;
752
- query?: never;
753
- url: '/openapi.yaml';
839
+ type AgentsExecutionScriptHybridPlaywrightStartedDetails = {
840
+ actionName: 'script_hybrid_playwright';
841
+ llmVars?: Array<string>;
754
842
  };
755
- type GetOpenApiResponses = {
756
- /**
757
- * OpenAPI schema
758
- */
759
- 200: unknown;
843
+ type AgentsExecutionScriptPadRunFunctionCompletedDetails = {
844
+ actionName: 'scriptpad_run_function';
845
+ success: boolean;
846
+ result: string;
847
+ consoleLogs: Array<string>;
848
+ failedLine?: number;
760
849
  };
761
- type HealthCheckData = {
762
- body?: never;
763
- path?: never;
764
- query?: never;
765
- url: '/health';
850
+ type AgentsExecutionScriptPlaywrightCompletedDetails = {
851
+ actionName: 'script_playwright';
852
+ success: boolean;
853
+ result: string;
854
+ consoleLogs: Array<string>;
855
+ failedLine?: number;
766
856
  };
767
- type HealthCheckErrors = {
768
- /**
769
- * API is unhealthy
770
- */
771
- 500: {
772
- /**
773
- * The error message
774
- */
775
- error?: string;
776
- };
857
+ type AgentsExecutionScriptPlaywrightStartedDetails = {
858
+ actionName: 'script_playwright';
859
+ llmVars?: Array<string>;
777
860
  };
778
- type HealthCheckError = HealthCheckErrors[keyof HealthCheckErrors];
779
- type HealthCheckResponses = {
780
- /**
781
- * API is healthy
782
- */
783
- 200: {
784
- /**
785
- * The health status of the API
786
- */
787
- status?: string;
788
- };
861
+ type AgentsExecutionScriptpadReadCompletedDetails = {
862
+ actionName: 'scriptpad_read';
863
+ content: string;
789
864
  };
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}';
865
+ type AgentsExecutionScriptpadReadStartedDetails = {
866
+ actionName: 'scriptpad_read';
867
+ offset: number;
868
+ limit: number;
801
869
  };
802
- type ExecuteAgentErrors = {
803
- /**
804
- * Invalid request
805
- */
806
- 400: ErrorResponse;
807
- /**
808
- * Agent not found
809
- */
810
- 404: ErrorResponse;
811
- /**
812
- * Internal server error
813
- */
814
- 500: ErrorResponse;
870
+ type AgentsExecutionScriptpadRunFunctionStartedDetails = {
871
+ actionName: 'scriptpad_run_function';
872
+ functionName: string;
873
+ arguments: unknown;
815
874
  };
816
- type ExecuteAgentError = ExecuteAgentErrors[keyof ExecuteAgentErrors];
817
- type ExecuteAgentResponses = {
818
- /**
819
- * Agent execution started successfully
820
- */
821
- 202: ExecutionResponse;
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;
822
883
  };
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';
884
+ type AgentsExecutionScriptpadSearchReplaceStartedDetails = {
885
+ actionName: 'scriptpad_search_replace';
886
+ search: string;
887
+ replace: string;
888
+ replaceAll: boolean;
834
889
  };
835
- type ExecuteAgentStructuredErrors = {
836
- /**
837
- * Invalid request
838
- */
839
- 400: ErrorResponse;
840
- /**
841
- * Agent not found
842
- */
843
- 404: ErrorResponse;
844
- /**
845
- * Internal server error
846
- */
847
- 500: ErrorResponse;
890
+ type AgentsExecutionScriptpadWriteCompletedDetails = {
891
+ actionName: 'scriptpad_write';
892
+ linesChanged: number;
893
+ totalLines: number;
894
+ patchesApplied: number;
895
+ scriptpad?: string;
848
896
  };
849
- type ExecuteAgentStructuredError = ExecuteAgentStructuredErrors[keyof ExecuteAgentStructuredErrors];
850
- type ExecuteAgentStructuredResponses = {
851
- /**
852
- * Agent execution started successfully
853
- */
854
- 202: ExecutionResponse;
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;
855
906
  };
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;
864
- };
865
- query?: never;
866
- url: '/execution/{id}/status';
907
+ type AgentsExecutionTransitionDetails = {
908
+ transitionID: CommonUuid;
909
+ transitionType: string;
867
910
  };
868
- type GetExecutionStatusErrors = {
869
- /**
870
- * Execution not found
871
- */
872
- 404: ErrorResponse;
911
+ type AgentsExecutionUpdateExecutionStatusRequest = {
873
912
  /**
874
- * Internal server error
913
+ * The new status to set for the execution
875
914
  */
876
- 500: ErrorResponse;
915
+ status: AgentsExecutionUpdateableStatus;
877
916
  };
878
- type GetExecutionStatusError = GetExecutionStatusErrors[keyof GetExecutionStatusErrors];
879
- type GetExecutionStatusResponses = {
880
- /**
881
- * Execution status retrieved successfully
882
- */
883
- 200: ExecutionStatusResponse;
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;
884
924
  };
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';
925
+ type AgentsExecutionUtilGetDatetimeCompletedDetails = {
926
+ actionName: 'util_get_datetime';
927
+ usedBrowserTimezone: boolean;
928
+ datetime: string;
929
+ tzTimezoneIdentifier: string;
896
930
  };
897
- type GetExecutionResultErrors = {
898
- /**
899
- * Execution not found
900
- */
901
- 404: ErrorResponse;
902
- /**
903
- * Internal server error
904
- */
905
- 500: ErrorResponse;
931
+ type AgentsExecutionUtilGetDatetimeStartedDetails = {
932
+ actionName: 'util_get_datetime';
933
+ tzTimezoneIdentifier: string;
906
934
  };
907
- type GetExecutionResultError = GetExecutionResultErrors[keyof GetExecutionResultErrors];
908
- type GetExecutionResultResponses = {
909
- /**
910
- * Execution result retrieved successfully
911
- */
912
- 200: ExecutionResultResponse;
935
+ type AgentsExecutionWorkflowUpdate = {
936
+ updateType: AgentsExecutionUpdateType;
937
+ rulesDetails?: AgentsExecutionRulesDetails;
938
+ nodeDetails?: AgentsExecutionNodeDetails;
939
+ transitionDetails?: AgentsExecutionTransitionDetails;
913
940
  };
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';
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;
925
966
  };
926
- type GetBrowserSessionRecordingErrors = {
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 = {
927
973
  /**
928
- * Browser session not found
974
+ * Unique identifier for the agent profile
929
975
  */
930
- 404: ErrorResponse;
976
+ id: CommonUuid;
931
977
  /**
932
- * Internal server error
978
+ * Name of the agent profile (unique within organization)
933
979
  */
934
- 500: ErrorResponse;
935
- };
936
- type GetBrowserSessionRecordingError = GetBrowserSessionRecordingErrors[keyof GetBrowserSessionRecordingErrors];
937
- type GetBrowserSessionRecordingResponses = {
980
+ name: string;
938
981
  /**
939
- * Browser session recording retrieved successfully
982
+ * Description of the agent profile
940
983
  */
941
- 200: BrowserSessionRecordingResponse;
942
- };
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';
954
- };
955
- type GetAgentProfilesErrors = {
984
+ description: string;
956
985
  /**
957
- * Unauthorized - Authentication required
986
+ * The ID of the organization that owns this profile
958
987
  */
959
- 401: ErrorResponse;
988
+ organizationId: CommonUuid;
960
989
  /**
961
- * Forbidden - Insufficient permissions
990
+ * Country code for proxy location
962
991
  */
963
- 403: ErrorResponse;
992
+ proxyCC?: AgentsProfileCountryCode;
964
993
  /**
965
- * Internal server error
994
+ * Type of proxy to use
966
995
  */
967
- 500: ErrorResponse;
968
- };
969
- type GetAgentProfilesError = GetAgentProfilesErrors[keyof GetAgentProfilesErrors];
970
- type GetAgentProfilesResponses = {
996
+ proxyType?: AgentsProfileProxyType;
971
997
  /**
972
- * List of agent profiles
998
+ * Whether the captcha solver is active for this profile
973
999
  */
974
- 200: Array<AgentProfile>;
975
- };
976
- type GetAgentProfilesResponse = GetAgentProfilesResponses[keyof GetAgentProfilesResponses];
977
- type CreateAgentProfileData = {
978
- body: CreateAgentProfileRequest;
979
- path?: never;
980
- query?: never;
981
- url: '/agent-profiles';
982
- };
983
- type CreateAgentProfileErrors = {
1000
+ captchaSolverActive: boolean;
984
1001
  /**
985
- * Bad request - Invalid input or profile name already exists
1002
+ * Whether to use the same IP address for all executions
986
1003
  */
987
- 400: ErrorResponse;
1004
+ stickyIP: boolean;
988
1005
  /**
989
- * Unauthorized - Authentication required
1006
+ * Operating system to emulate
990
1007
  */
991
- 401: ErrorResponse;
1008
+ operatingSystem?: AgentsProfileOperatingSystem;
992
1009
  /**
993
- * Forbidden - Insufficient permissions
1010
+ * Whether extra stealth mode is enabled
994
1011
  */
995
- 403: ErrorResponse;
1012
+ extraStealth: boolean;
996
1013
  /**
997
- * Internal server error
1014
+ * Whether to persist browser cache between sessions
998
1015
  */
999
- 500: ErrorResponse;
1000
- };
1001
- type CreateAgentProfileError = CreateAgentProfileErrors[keyof CreateAgentProfileErrors];
1002
- type CreateAgentProfileResponses = {
1016
+ cachePersistence: boolean;
1003
1017
  /**
1004
- * Agent profile created successfully
1018
+ * List of credentials associated with this profile
1005
1019
  */
1006
- 201: AgentProfile;
1007
- };
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}';
1019
- };
1020
- type DeleteAgentProfileErrors = {
1020
+ credentials: Array<AgentsProfileCredential>;
1021
1021
  /**
1022
- * Unauthorized - Authentication required
1022
+ * List of cookies associated with this profile
1023
1023
  */
1024
- 401: ErrorResponse;
1024
+ cookies: Array<AgentsProfileCookie>;
1025
1025
  /**
1026
- * Forbidden - Insufficient permissions
1026
+ * When the profile was created
1027
1027
  */
1028
- 403: ErrorResponse;
1028
+ createdAt: string;
1029
1029
  /**
1030
- * Agent profile not found
1030
+ * When the profile was last updated
1031
1031
  */
1032
- 404: ErrorResponse;
1032
+ updatedAt: string;
1033
+ };
1034
+ /**
1035
+ * A browser cookie stored for an agent profile
1036
+ */
1037
+ type AgentsProfileCookie = {
1033
1038
  /**
1034
- * Internal server error
1039
+ * Unique identifier for the cookie
1035
1040
  */
1036
- 500: ErrorResponse;
1037
- };
1038
- type DeleteAgentProfileError = DeleteAgentProfileErrors[keyof DeleteAgentProfileErrors];
1039
- type DeleteAgentProfileResponses = {
1041
+ id?: CommonUuid;
1040
1042
  /**
1041
- * Agent profile deleted successfully
1043
+ * Display name for the cookie
1042
1044
  */
1043
- 200: {
1044
- message?: string;
1045
- };
1046
- };
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}';
1058
- };
1059
- type GetAgentProfileErrors = {
1045
+ name: string;
1060
1046
  /**
1061
- * Unauthorized - Authentication required
1047
+ * The cookie key/name as sent in HTTP headers
1062
1048
  */
1063
- 401: ErrorResponse;
1049
+ key: string;
1064
1050
  /**
1065
- * Forbidden - Insufficient permissions
1051
+ * The cookie value
1066
1052
  */
1067
- 403: ErrorResponse;
1053
+ value: string;
1068
1054
  /**
1069
- * Agent profile not found
1055
+ * When the cookie expires (optional)
1070
1056
  */
1071
- 404: ErrorResponse;
1057
+ expiry?: string;
1072
1058
  /**
1073
- * Internal server error
1059
+ * The domain for which the cookie is valid
1074
1060
  */
1075
- 500: ErrorResponse;
1076
- };
1077
- type GetAgentProfileError = GetAgentProfileErrors[keyof GetAgentProfileErrors];
1078
- type GetAgentProfileResponses = {
1061
+ domain: string;
1079
1062
  /**
1080
- * Agent profile found
1063
+ * Whether the cookie should only be sent over HTTPS
1081
1064
  */
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 = {
1065
+ secure: boolean;
1097
1066
  /**
1098
- * Bad request - Invalid input
1067
+ * SameSite attribute for the cookie
1099
1068
  */
1100
- 400: ErrorResponse;
1069
+ sameSite: AgentsProfileSameSite;
1101
1070
  /**
1102
- * Unauthorized - Authentication required
1071
+ * Whether the cookie should be accessible only via HTTP(S)
1103
1072
  */
1104
- 401: ErrorResponse;
1073
+ httpOnly: boolean;
1105
1074
  /**
1106
- * Forbidden - Insufficient permissions
1075
+ * When the cookie was created
1107
1076
  */
1108
- 403: ErrorResponse;
1077
+ createdAt?: string;
1078
+ };
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 = {
1109
1087
  /**
1110
- * Agent profile not found
1088
+ * Name of the agent profile (must be unique within organization)
1111
1089
  */
1112
- 404: ErrorResponse;
1090
+ name: string;
1113
1091
  /**
1114
- * Internal server error
1092
+ * Description of the agent profile
1115
1093
  */
1116
- 500: ErrorResponse;
1117
- };
1118
- type UpdateAgentProfileError = UpdateAgentProfileErrors[keyof UpdateAgentProfileErrors];
1119
- type UpdateAgentProfileResponses = {
1094
+ description: string;
1120
1095
  /**
1121
- * Agent profile updated successfully
1096
+ * The ID of the organization that the profile belongs to
1122
1097
  */
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 = {
1098
+ organizationId: CommonUuid;
1133
1099
  /**
1134
- * Public key not found
1100
+ * Country code for proxy location
1135
1101
  */
1136
- 404: unknown;
1137
- };
1138
- type GetCredentialsPublicKeyResponses = {
1102
+ proxyCC?: AgentsProfileCountryCode;
1139
1103
  /**
1140
- * The public key for credentials
1104
+ * Type of proxy to use
1141
1105
  */
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 & {});
1147
- };
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;
1232
- name: string;
1233
- createdAt: string;
1234
- organizationId?: CommonUuid;
1235
- userId: CommonUuid;
1236
- };
1237
- type AgentsAgentExecuteAgentRequest = {
1106
+ proxyType?: AgentsProfileProxyType;
1238
1107
  /**
1239
- * The ID of the agent profile to use. Note this is not the agent ID
1108
+ * Whether the captcha solver should be active
1240
1109
  */
1241
- agentProfileId?: CommonUuid;
1110
+ captchaSolverActive?: boolean;
1242
1111
  /**
1243
- * Dynamic data to be merged into the placeholders defined in prompts
1112
+ * Whether to use the same IP address for all executions
1244
1113
  */
1245
- dynamicData?: {
1246
- [key: string]: unknown;
1247
- };
1114
+ stickyIP?: boolean;
1248
1115
  /**
1249
- * Array of temporary files to attach to the execution. Must have been pre-uploaded using the stage file endpoint
1116
+ * Operating system to emulate
1250
1117
  */
1251
- tempFiles?: Array<AgentsFilesTempFile>;
1118
+ operatingSystem?: AgentsProfileOperatingSystem;
1252
1119
  /**
1253
- * Optional metadata key-value pairs (string keys and string values) for organizing and filtering executions
1120
+ * Whether to enable extra stealth mode
1254
1121
  */
1255
- metadata?: {
1256
- [key: string]: unknown;
1257
- };
1122
+ extraStealth?: boolean;
1258
1123
  /**
1259
- * The version of the agent to execute. If not provided, the latest version will be used.
1124
+ * Whether to persist browser cache between sessions
1260
1125
  */
1261
- version?: number;
1262
- };
1263
- type AgentsAgentExecuteAgentResponse = {
1126
+ cachePersistence?: boolean;
1264
1127
  /**
1265
- * The ID of the newly created execution
1128
+ * Initial credentials to create with the profile
1266
1129
  */
1267
- executionId: CommonUuid;
1268
- };
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;
1276
- };
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';
1314
- message: string;
1315
- actionId: string;
1316
- actionName: AgentsExecutionActionName;
1317
- duration?: number;
1318
- info?: AgentsExecutionActivityActionCompletedInfo;
1319
- };
1320
- type AgentsExecutionActivityActionFailedPayload = {
1321
- activityType: 'action_failed';
1322
- message: string;
1323
- actionName: AgentsExecutionActionName;
1324
- actionId: string;
1325
- duration?: number;
1326
- };
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';
1350
- message: string;
1351
- actionName: AgentsExecutionActionName;
1352
- actionId: string;
1353
- info?: AgentsExecutionActivityActionStartedInfo;
1354
- };
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';
1366
- message: string;
1367
- };
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';
1437
- message: string;
1438
- userUUID: CommonUuid;
1439
- };
1440
- type AgentsExecutionActivityWorkflowUpdatedPayload = {
1441
- activityType: 'workflow_updated';
1442
- workflowUpdate: Array<AgentsExecutionWorkflowUpdate>;
1443
- };
1444
- type AgentsExecutionAwaitingConfirmationPayload = {
1445
- reason: string;
1130
+ credentials?: Array<AgentsProfileCredential>;
1131
+ /**
1132
+ * Initial cookies to create with the profile
1133
+ */
1134
+ cookies?: Array<AgentsProfileCookie>;
1446
1135
  };
1447
- type AgentsExecutionCancelReason = 'timeout' | 'max_steps' | 'user_requested';
1448
- type AgentsExecutionCancelledPayload = {
1449
- reason: AgentsExecutionCancelReason;
1136
+ /**
1137
+ * A credential stored for an agent profile
1138
+ */
1139
+ type AgentsProfileCredential = {
1140
+ /**
1141
+ * Unique identifier for the credential
1142
+ */
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;
1450
1156
  };
1451
1157
  /**
1452
- * User comment on an execution
1158
+ * Operating system to emulate in the browser
1453
1159
  */
1454
- type AgentsExecutionComment = {
1455
- /**
1456
- * Unique identifier for the comment
1457
- */
1458
- id: CommonUuid;
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 = {
1459
1177
  /**
1460
- * Execution this comment belongs to
1178
+ * New name for the profile
1461
1179
  */
1462
- executionId: CommonUuid;
1180
+ name?: string;
1463
1181
  /**
1464
- * User who created the comment
1182
+ * New description for the profile
1465
1183
  */
1466
- userId: CommonUuid;
1184
+ description?: string;
1467
1185
  /**
1468
- * Comment content
1186
+ * Country code for proxy location
1469
1187
  */
1470
- content: string;
1188
+ proxyCC?: AgentsProfileCountryCode;
1471
1189
  /**
1472
- * Whether the comment is public
1190
+ * Type of proxy to use (set to empty string to disable proxy)
1473
1191
  */
1474
- public: boolean;
1192
+ proxyType?: AgentsProfileProxyType;
1475
1193
  /**
1476
- * When the comment was created
1194
+ * Whether the captcha solver should be active
1477
1195
  */
1478
- createdAt: string;
1196
+ captchaSolverActive?: boolean;
1479
1197
  /**
1480
- * When the comment was last updated
1198
+ * Operating system to emulate
1481
1199
  */
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>;
1493
- };
1494
- /**
1495
- * Execution result containing outcome, reasoning, and result data
1496
- */
1497
- type AgentsExecutionExecutionResult = {
1200
+ operatingSystem?: AgentsProfileOperatingSystem;
1498
1201
  /**
1499
- * Unique identifier for the result
1202
+ * Whether to enable extra stealth mode
1500
1203
  */
1501
- id: CommonUuid;
1204
+ extraStealth?: boolean;
1502
1205
  /**
1503
- * Execution this result belongs to
1206
+ * Whether to persist browser cache between sessions
1504
1207
  */
1505
- executionId: CommonUuid;
1208
+ cachePersistence?: boolean;
1506
1209
  /**
1507
- * Outcome of the execution (success or failure)
1210
+ * Credentials to add to the profile
1508
1211
  */
1509
- outcome: string;
1212
+ credentialsToAdd?: Array<AgentsProfileCredential>;
1510
1213
  /**
1511
- * AI reasoning for the outcome
1214
+ * IDs of credentials to remove from the profile
1512
1215
  */
1513
- reasoning: string;
1216
+ credentialsToDelete?: Array<CommonUuid>;
1514
1217
  /**
1515
- * Result data as JSON
1218
+ * Cookies to add to the profile
1516
1219
  */
1517
- result: unknown;
1220
+ cookiesToAdd?: Array<AgentsProfileCookie>;
1518
1221
  /**
1519
- * When the result was created
1222
+ * IDs of cookies to remove from the profile
1520
1223
  */
1521
- createdAt: string;
1224
+ cookiesToDelete?: Array<CommonUuid>;
1522
1225
  };
1523
- type AgentsExecutionExtApiCallCompletedDetails = {
1524
- actionName: 'ext_api_call';
1525
- statusCode: string;
1526
- responseBody: string;
1527
- requestMethod?: string;
1528
- requestUrl?: string;
1226
+ type CommonBadRequestErrorBody = {
1227
+ code: 400;
1228
+ message: string;
1529
1229
  };
1530
- type AgentsExecutionExtGetMailCompletedDetails = {
1531
- actionName: 'ext_get_mail';
1532
- emailCount: number;
1533
- emails: Array<unknown>;
1230
+ type CommonError = {
1231
+ code: number;
1232
+ message: string;
1534
1233
  };
1535
- type AgentsExecutionFailedPayload = {
1536
- reason: string;
1537
- os_error?: CommonOsError;
1234
+ type CommonForbiddenErrorBody = {
1235
+ code: 403;
1236
+ message: string;
1538
1237
  };
1539
- type AgentsExecutionFileListCompletedDetails = {
1540
- actionName: 'file_list';
1541
- fileNames: Array<string>;
1238
+ type CommonInternalServerErrorBody = {
1239
+ code: 500;
1240
+ message: string;
1542
1241
  };
1543
- type AgentsExecutionFileReadCompletedDetails = {
1544
- actionName: 'file_read';
1545
- fileNames: Array<string>;
1546
- errorCount?: number;
1547
- totalSizeBytes?: number;
1242
+ type CommonNotFoundErrorBody = {
1243
+ code: 404;
1244
+ message: string;
1548
1245
  };
1549
- type AgentsExecutionFileStageCompletedDetails = {
1550
- actionName: 'file_stage';
1551
- fileNames: Array<string>;
1246
+ type CommonOsError = {
1247
+ message: string;
1248
+ };
1249
+ type CommonSortDirection = 'asc' | 'desc';
1250
+ type CommonUnauthorizedErrorBody = {
1251
+ code: 401;
1252
+ message: string;
1552
1253
  };
1254
+ type CommonUuid = string;
1255
+ type Version = 'v1';
1256
+ type AgentsAgentSearch = string;
1553
1257
  /**
1554
- * Human-applied label for categorizing executions
1258
+ * Filter by agent ID
1555
1259
  */
1556
- type AgentsExecutionHumanLabel = {
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
+ * Filter by workflow version number
1295
+ */
1296
+ type AgentsExecutionSearchWorkflowVersion = number;
1297
+ /**
1298
+ * Search profiles by name (partial match)
1299
+ */
1300
+ type AgentsProfileSearch = string;
1301
+ type CommonPaginationPage = number;
1302
+ type CommonPaginationPageSize = number;
1303
+ type AgentProfilesListData = {
1304
+ body?: never;
1305
+ path?: never;
1306
+ query?: {
1307
+ /**
1308
+ * Filter by organization ID
1309
+ */
1310
+ organizationId?: CommonUuid;
1311
+ pageSize?: number;
1312
+ page?: number;
1313
+ /**
1314
+ * Search profiles by name (partial match)
1315
+ */
1316
+ searchName?: string;
1317
+ sortField?: AgentsProfileSortField;
1318
+ sortDirection?: CommonSortDirection;
1319
+ };
1320
+ url: '/agent-profiles';
1321
+ };
1322
+ type AgentProfilesListErrors = {
1557
1323
  /**
1558
- * Unique identifier for the label
1324
+ * The server could not understand the request due to invalid syntax.
1559
1325
  */
1560
- id: CommonUuid;
1326
+ 400: CommonBadRequestErrorBody;
1561
1327
  /**
1562
- * Organization this label belongs to
1328
+ * Access is unauthorized.
1563
1329
  */
1564
- organizationId: CommonUuid;
1330
+ 401: CommonUnauthorizedErrorBody;
1565
1331
  /**
1566
- * Display name of the label
1332
+ * Access is forbidden.
1567
1333
  */
1568
- name: string;
1334
+ 403: CommonForbiddenErrorBody;
1569
1335
  /**
1570
- * Hex color code for the label (e.g., #FF5733)
1336
+ * The server cannot find the requested resource.
1571
1337
  */
1572
- color: string;
1338
+ 404: CommonNotFoundErrorBody;
1573
1339
  /**
1574
- * When the label was created
1340
+ * Server error
1575
1341
  */
1576
- createdAt: string;
1342
+ 500: CommonInternalServerErrorBody;
1577
1343
  };
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;
1344
+ type AgentProfilesListError = AgentProfilesListErrors[keyof AgentProfilesListErrors];
1345
+ type AgentProfilesListResponses = {
1346
+ /**
1347
+ * The request has succeeded.
1348
+ */
1349
+ 200: {
1350
+ items: Array<AgentsProfileAgentProfile>;
1351
+ page: number;
1352
+ pageSize: number;
1353
+ total: number;
1354
+ };
1582
1355
  };
1583
- /**
1584
- * Represents a single execution in a list view
1585
- */
1586
- type AgentsExecutionListItem = {
1356
+ type AgentProfilesListResponse = AgentProfilesListResponses[keyof AgentProfilesListResponses];
1357
+ type AgentProfilesCreateData = {
1587
1358
  /**
1588
- * The unique identifier of the execution
1359
+ * Agent profile to create
1589
1360
  */
1590
- id: CommonUuid;
1361
+ body: AgentsProfileCreateAgentProfileRequest;
1362
+ path?: never;
1363
+ query?: never;
1364
+ url: '/agent-profiles';
1365
+ };
1366
+ type AgentProfilesCreateErrors = {
1591
1367
  /**
1592
- * The ID of the agent that was executed
1368
+ * The server could not understand the request due to invalid syntax.
1593
1369
  */
1594
- agentId: CommonUuid;
1370
+ 400: CommonBadRequestErrorBody;
1595
1371
  /**
1596
- * The ID of the workflow that was executed
1372
+ * Access is unauthorized.
1597
1373
  */
1598
- workflowId: CommonUuid;
1374
+ 401: CommonUnauthorizedErrorBody;
1375
+ /**
1376
+ * Access is forbidden.
1377
+ */
1378
+ 403: CommonForbiddenErrorBody;
1379
+ /**
1380
+ * The server cannot find the requested resource.
1381
+ */
1382
+ 404: CommonNotFoundErrorBody;
1383
+ /**
1384
+ * Server error
1385
+ */
1386
+ 500: CommonInternalServerErrorBody;
1387
+ };
1388
+ type AgentProfilesCreateError = AgentProfilesCreateErrors[keyof AgentProfilesCreateErrors];
1389
+ type AgentProfilesCreateResponses = {
1390
+ /**
1391
+ * The request has succeeded and a new resource has been created as a result.
1392
+ */
1393
+ 201: AgentsProfileAgentProfile;
1394
+ };
1395
+ type AgentProfilesCreateResponse = AgentProfilesCreateResponses[keyof AgentProfilesCreateResponses];
1396
+ type AgentProfileDeleteData = {
1397
+ body?: never;
1398
+ path: {
1399
+ /**
1400
+ * The ID of the agent profile
1401
+ */
1402
+ profileId: CommonUuid;
1403
+ };
1404
+ query?: never;
1405
+ url: '/agent-profiles/{profileId}';
1406
+ };
1407
+ type AgentProfileDeleteErrors = {
1408
+ /**
1409
+ * The server could not understand the request due to invalid syntax.
1410
+ */
1411
+ 400: CommonBadRequestErrorBody;
1412
+ /**
1413
+ * Access is unauthorized.
1414
+ */
1415
+ 401: CommonUnauthorizedErrorBody;
1416
+ /**
1417
+ * Access is forbidden.
1418
+ */
1419
+ 403: CommonForbiddenErrorBody;
1420
+ /**
1421
+ * The server cannot find the requested resource.
1422
+ */
1423
+ 404: CommonNotFoundErrorBody;
1424
+ /**
1425
+ * Server error
1426
+ */
1427
+ 500: CommonInternalServerErrorBody;
1428
+ };
1429
+ type AgentProfileDeleteError = AgentProfileDeleteErrors[keyof AgentProfileDeleteErrors];
1430
+ type AgentProfileDeleteResponses = {
1431
+ /**
1432
+ * There is no content to send for this request, but the headers may be useful.
1433
+ */
1434
+ 204: void;
1435
+ };
1436
+ type AgentProfileDeleteResponse = AgentProfileDeleteResponses[keyof AgentProfileDeleteResponses];
1437
+ type AgentProfileGetData = {
1438
+ body?: never;
1439
+ path: {
1440
+ /**
1441
+ * The ID of the agent profile
1442
+ */
1443
+ profileId: CommonUuid;
1444
+ };
1445
+ query?: never;
1446
+ url: '/agent-profiles/{profileId}';
1447
+ };
1448
+ type AgentProfileGetErrors = {
1599
1449
  /**
1600
- * The version of the agent that was executed
1450
+ * The server could not understand the request due to invalid syntax.
1601
1451
  */
1602
- agentVersion: number;
1452
+ 400: CommonBadRequestErrorBody;
1603
1453
  /**
1604
- * Whether the agent version was modified from the original
1454
+ * Access is unauthorized.
1605
1455
  */
1606
- agentVersionDirty: boolean;
1456
+ 401: CommonUnauthorizedErrorBody;
1607
1457
  /**
1608
- * The current status of the execution
1458
+ * Access is forbidden.
1609
1459
  */
1610
- status: AgentsExecutionStatus;
1460
+ 403: CommonForbiddenErrorBody;
1611
1461
  /**
1612
- * When the execution was created
1462
+ * The server cannot find the requested resource.
1613
1463
  */
1614
- createdAt: string;
1464
+ 404: CommonNotFoundErrorBody;
1615
1465
  /**
1616
- * When the execution reached a terminal state (if applicable)
1466
+ * Server error
1617
1467
  */
1618
- terminalAt?: string;
1468
+ 500: CommonInternalServerErrorBody;
1469
+ };
1470
+ type AgentProfileGetError = AgentProfileGetErrors[keyof AgentProfileGetErrors];
1471
+ type AgentProfileGetResponses = {
1619
1472
  /**
1620
- * The organization this execution belongs to
1473
+ * The request has succeeded.
1621
1474
  */
1622
- organizationId: CommonUuid;
1475
+ 200: AgentsProfileAgentProfile;
1476
+ };
1477
+ type AgentProfileGetResponse = AgentProfileGetResponses[keyof AgentProfileGetResponses];
1478
+ type AgentProfileUpdateData = {
1623
1479
  /**
1624
- * The agent display name
1480
+ * Fields to update
1625
1481
  */
1626
- agentName: string;
1482
+ body: AgentsProfileUpdateAgentProfileRequest;
1483
+ path: {
1484
+ /**
1485
+ * The ID of the agent profile
1486
+ */
1487
+ profileId: CommonUuid;
1488
+ };
1489
+ query?: never;
1490
+ url: '/agent-profiles/{profileId}';
1491
+ };
1492
+ type AgentProfileUpdateErrors = {
1627
1493
  /**
1628
- * The name of the agent profile used for this execution (if any)
1494
+ * The server could not understand the request due to invalid syntax.
1629
1495
  */
1630
- agentProfileName?: string;
1496
+ 400: CommonBadRequestErrorBody;
1631
1497
  /**
1632
- * Execution result with outcome, reasoning, and result data
1498
+ * Access is unauthorized.
1633
1499
  */
1634
- executionResult?: AgentsExecutionExecutionResult;
1500
+ 401: CommonUnauthorizedErrorBody;
1635
1501
  /**
1636
- * Execution duration in seconds (only present for terminal executions)
1502
+ * Access is forbidden.
1637
1503
  */
1638
- duration?: number;
1504
+ 403: CommonForbiddenErrorBody;
1639
1505
  /**
1640
- * Human-applied labels for this execution
1506
+ * The server cannot find the requested resource.
1641
1507
  */
1642
- humanLabels: Array<AgentsExecutionHumanLabel>;
1508
+ 404: CommonNotFoundErrorBody;
1643
1509
  /**
1644
- * Comments on this execution
1510
+ * Server error
1645
1511
  */
1646
- comments: Array<AgentsExecutionComment>;
1512
+ 500: CommonInternalServerErrorBody;
1513
+ };
1514
+ type AgentProfileUpdateError = AgentProfileUpdateErrors[keyof AgentProfileUpdateErrors];
1515
+ type AgentProfileUpdateResponses = {
1647
1516
  /**
1648
- * Optional metadata key-value pairs attached to this execution
1517
+ * The request has succeeded.
1649
1518
  */
1650
- metadata?: {
1651
- [key: string]: unknown;
1519
+ 200: AgentsProfileAgentProfile;
1520
+ };
1521
+ type AgentProfileUpdateResponse = AgentProfileUpdateResponses[keyof AgentProfileUpdateResponses];
1522
+ type AgentProfileClearBrowserCacheData = {
1523
+ body?: never;
1524
+ path: {
1525
+ /**
1526
+ * The ID of the agent profile
1527
+ */
1528
+ profileId: CommonUuid;
1652
1529
  };
1530
+ query?: never;
1531
+ url: '/agent-profiles/{profileId}/clear-browser-cache';
1532
+ };
1533
+ type AgentProfileClearBrowserCacheErrors = {
1653
1534
  /**
1654
- * Browser recording URL (if a browser session was used and execution is terminal)
1535
+ * The server could not understand the request due to invalid syntax.
1655
1536
  */
1656
- browserRecordingUrl?: string;
1537
+ 400: CommonBadRequestErrorBody;
1657
1538
  /**
1658
- * Browser live view URL for debugging (if a browser session is active and execution is running)
1539
+ * Access is unauthorized.
1659
1540
  */
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;
1541
+ 401: CommonUnauthorizedErrorBody;
1542
+ /**
1543
+ * Access is forbidden.
1544
+ */
1545
+ 403: CommonForbiddenErrorBody;
1546
+ /**
1547
+ * The server cannot find the requested resource.
1548
+ */
1549
+ 404: CommonNotFoundErrorBody;
1550
+ /**
1551
+ * Server error
1552
+ */
1553
+ 500: CommonInternalServerErrorBody;
1849
1554
  };
1850
- type CommonOsError = {
1851
- message: string;
1555
+ type AgentProfileClearBrowserCacheError = AgentProfileClearBrowserCacheErrors[keyof AgentProfileClearBrowserCacheErrors];
1556
+ type AgentProfileClearBrowserCacheResponses = {
1557
+ /**
1558
+ * The request has succeeded.
1559
+ */
1560
+ 200: {
1561
+ message: string;
1562
+ };
1852
1563
  };
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;
1564
+ type AgentProfileClearBrowserCacheResponse = AgentProfileClearBrowserCacheResponses[keyof AgentProfileClearBrowserCacheResponses];
1899
1565
  type AgentListData = {
1900
1566
  body?: never;
1901
1567
  path?: never;
1902
- query: {
1568
+ query?: {
1903
1569
  organizationId?: CommonUuid;
1904
- pageSize: number;
1905
- page: number;
1570
+ pageSize?: number;
1571
+ page?: number;
1906
1572
  searchName?: string;
1907
1573
  sortField?: AgentsAgentSortField;
1908
1574
  sortDirection?: CommonSortDirection;
@@ -1967,13 +1633,13 @@ type AgentExecutePostResponse = AgentExecutePostResponses[keyof AgentExecutePost
1967
1633
  type ExecutionsListData = {
1968
1634
  body?: never;
1969
1635
  path?: never;
1970
- query: {
1636
+ query?: {
1971
1637
  /**
1972
1638
  * Optional organization ID filter (required for customer queries)
1973
1639
  */
1974
1640
  organizationId?: CommonUuid;
1975
- pageSize: number;
1976
- page: number;
1641
+ pageSize?: number;
1642
+ page?: number;
1977
1643
  /**
1978
1644
  * Search by execution ID (partial, case-insensitive match)
1979
1645
  */
@@ -1986,10 +1652,6 @@ type ExecutionsListData = {
1986
1652
  * Filter by execution status (can specify multiple, there is an 'OR' condition applied to these)
1987
1653
  */
1988
1654
  status?: Array<AgentsExecutionStatus>;
1989
- /**
1990
- * Filter by agent version
1991
- */
1992
- agentVersion?: number;
1993
1655
  /**
1994
1656
  * Filter executions created after this timestamp
1995
1657
  */
@@ -2014,6 +1676,10 @@ type ExecutionsListData = {
2014
1676
  * Filter by metadata value - must be used together with metadataKey
2015
1677
  */
2016
1678
  metadataValue?: string;
1679
+ /**
1680
+ * Filter by workflow version number
1681
+ */
1682
+ workflowVersion?: number;
2017
1683
  sortField?: AgentsExecutionSortField;
2018
1684
  sortDirection?: CommonSortDirection;
2019
1685
  };
@@ -2024,6 +1690,10 @@ type ExecutionsListErrors = {
2024
1690
  * The server could not understand the request due to invalid syntax.
2025
1691
  */
2026
1692
  400: CommonBadRequestErrorBody;
1693
+ /**
1694
+ * Access is unauthorized.
1695
+ */
1696
+ 401: CommonUnauthorizedErrorBody;
2027
1697
  /**
2028
1698
  * Access is forbidden.
2029
1699
  */
@@ -2032,6 +1702,10 @@ type ExecutionsListErrors = {
2032
1702
  * The server cannot find the requested resource.
2033
1703
  */
2034
1704
  404: CommonNotFoundErrorBody;
1705
+ /**
1706
+ * Server error
1707
+ */
1708
+ 500: CommonInternalServerErrorBody;
2035
1709
  };
2036
1710
  type ExecutionsListError = ExecutionsListErrors[keyof ExecutionsListErrors];
2037
1711
  type ExecutionsListResponses = {
@@ -2062,6 +1736,10 @@ type ExecutionGetErrors = {
2062
1736
  * The server could not understand the request due to invalid syntax.
2063
1737
  */
2064
1738
  400: CommonBadRequestErrorBody;
1739
+ /**
1740
+ * Access is unauthorized.
1741
+ */
1742
+ 401: CommonUnauthorizedErrorBody;
2065
1743
  /**
2066
1744
  * Access is forbidden.
2067
1745
  */
@@ -2070,6 +1748,10 @@ type ExecutionGetErrors = {
2070
1748
  * The server cannot find the requested resource.
2071
1749
  */
2072
1750
  404: CommonNotFoundErrorBody;
1751
+ /**
1752
+ * Server error
1753
+ */
1754
+ 500: CommonInternalServerErrorBody;
2073
1755
  };
2074
1756
  type ExecutionGetError = ExecutionGetErrors[keyof ExecutionGetErrors];
2075
1757
  type ExecutionGetResponses = {
@@ -2104,6 +1786,10 @@ type ExecutionActivitiesGetErrors = {
2104
1786
  * The server could not understand the request due to invalid syntax.
2105
1787
  */
2106
1788
  400: CommonBadRequestErrorBody;
1789
+ /**
1790
+ * Access is unauthorized.
1791
+ */
1792
+ 401: CommonUnauthorizedErrorBody;
2107
1793
  /**
2108
1794
  * Access is forbidden.
2109
1795
  */
@@ -2112,6 +1798,10 @@ type ExecutionActivitiesGetErrors = {
2112
1798
  * The server cannot find the requested resource.
2113
1799
  */
2114
1800
  404: CommonNotFoundErrorBody;
1801
+ /**
1802
+ * Server error
1803
+ */
1804
+ 500: CommonInternalServerErrorBody;
2115
1805
  };
2116
1806
  type ExecutionActivitiesGetError = ExecutionActivitiesGetErrors[keyof ExecutionActivitiesGetErrors];
2117
1807
  type ExecutionActivitiesGetResponses = {
@@ -2150,6 +1840,7 @@ type ExecutionContextFilesUploadData = {
2150
1840
  path: {
2151
1841
  /**
2152
1842
  * Upload files to a running execution
1843
+ *
2153
1844
  * 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
1845
  */
2155
1846
  executionId: CommonUuid;
@@ -2175,6 +1866,50 @@ type ExecutionContextFilesUploadResponses = {
2175
1866
  200: 'Files uploaded.';
2176
1867
  };
2177
1868
  type ExecutionContextFilesUploadResponse = ExecutionContextFilesUploadResponses[keyof ExecutionContextFilesUploadResponses];
1869
+ type ExecutionStatusUpdateData = {
1870
+ /**
1871
+ * The status update request
1872
+ */
1873
+ body: AgentsExecutionUpdateExecutionStatusRequest;
1874
+ path: {
1875
+ /**
1876
+ * The unique identifier of the execution
1877
+ */
1878
+ executionId: CommonUuid;
1879
+ };
1880
+ query?: never;
1881
+ url: '/executions/{executionId}/status';
1882
+ };
1883
+ type ExecutionStatusUpdateErrors = {
1884
+ /**
1885
+ * The server could not understand the request due to invalid syntax.
1886
+ */
1887
+ 400: CommonBadRequestErrorBody;
1888
+ /**
1889
+ * Access is unauthorized.
1890
+ */
1891
+ 401: CommonUnauthorizedErrorBody;
1892
+ /**
1893
+ * Access is forbidden.
1894
+ */
1895
+ 403: CommonForbiddenErrorBody;
1896
+ /**
1897
+ * The server cannot find the requested resource.
1898
+ */
1899
+ 404: CommonNotFoundErrorBody;
1900
+ /**
1901
+ * Server error
1902
+ */
1903
+ 500: CommonInternalServerErrorBody;
1904
+ };
1905
+ type ExecutionStatusUpdateError = ExecutionStatusUpdateErrors[keyof ExecutionStatusUpdateErrors];
1906
+ type ExecutionStatusUpdateResponses = {
1907
+ /**
1908
+ * The request has succeeded.
1909
+ */
1910
+ 200: 'Execution status updated.';
1911
+ };
1912
+ type ExecutionStatusUpdateResponse = ExecutionStatusUpdateResponses[keyof ExecutionStatusUpdateResponses];
2178
1913
  type ExecutionUserMessagesAddData = {
2179
1914
  /**
2180
1915
  * The message content to send
@@ -2194,6 +1929,10 @@ type ExecutionUserMessagesAddErrors = {
2194
1929
  * The server could not understand the request due to invalid syntax.
2195
1930
  */
2196
1931
  400: CommonBadRequestErrorBody;
1932
+ /**
1933
+ * Access is unauthorized.
1934
+ */
1935
+ 401: CommonUnauthorizedErrorBody;
2197
1936
  /**
2198
1937
  * Access is forbidden.
2199
1938
  */
@@ -2202,6 +1941,10 @@ type ExecutionUserMessagesAddErrors = {
2202
1941
  * The server cannot find the requested resource.
2203
1942
  */
2204
1943
  404: CommonNotFoundErrorBody;
1944
+ /**
1945
+ * Server error
1946
+ */
1947
+ 500: CommonInternalServerErrorBody;
2205
1948
  };
2206
1949
  type ExecutionUserMessagesAddError = ExecutionUserMessagesAddErrors[keyof ExecutionUserMessagesAddErrors];
2207
1950
  type ExecutionUserMessagesAddResponses = {
@@ -2243,158 +1986,8 @@ type TempFilesStageResponses = {
2243
1986
  200: AgentsFilesTempFilesResponse;
2244
1987
  };
2245
1988
  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
1989
 
2397
- type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$2<TData, ThrowOnError> & {
1990
+ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$1<TData, ThrowOnError> & {
2398
1991
  /**
2399
1992
  * You can provide a client instance returned by `createClient()` instead of
2400
1993
  * individual options. This might be also useful if you want to implement a
@@ -2408,431 +2001,85 @@ type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boole
2408
2001
  meta?: Record<string, unknown>;
2409
2002
  };
2410
2003
  /**
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.
2004
+ * List Agent Profiles
2639
2005
  *
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."
2006
+ * List all agent profiles for an organization
2645
2007
  */
2646
- declare const uploadExecutionFiles: (client: AsteroidClient, executionId: string, files: Array<Blob | globalThis.File>) => Promise<string>;
2008
+ declare const agentProfilesList: <ThrowOnError extends boolean = false>(options?: Options<AgentProfilesListData, ThrowOnError>) => RequestResult<AgentProfilesListResponses, AgentProfilesListErrors, ThrowOnError, "fields">;
2647
2009
  /**
2648
- * Get agent profiles for an organization (or all organizations for the user if not specified).
2010
+ * Create Agent Profile
2649
2011
  *
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');
2012
+ * Create a new agent profile
2656
2013
  */
2657
- declare const getAgentProfiles: (client: AsteroidClient, organizationId?: string) => Promise<AgentProfile[]>;
2014
+ declare const agentProfilesCreate: <ThrowOnError extends boolean = false>(options: Options<AgentProfilesCreateData, ThrowOnError>) => RequestResult<AgentProfilesCreateResponses, AgentProfilesCreateErrors, ThrowOnError, "fields">;
2658
2015
  /**
2659
- * Get the public key for encrypting credentials.
2660
- *
2661
- * @param client - The API client.
2662
- * @returns The PEM-formatted public key.
2016
+ * Delete Agent Profile
2663
2017
  *
2664
- * @example
2665
- * const publicKey = await getCredentialsPublicKey(client);
2018
+ * Delete an agent profile
2666
2019
  */
2667
- declare const getCredentialsPublicKey: (client: AsteroidClient) => Promise<string>;
2020
+ declare const agentProfileDelete: <ThrowOnError extends boolean = false>(options: Options<AgentProfileDeleteData, ThrowOnError>) => RequestResult<AgentProfileDeleteResponses, AgentProfileDeleteErrors, ThrowOnError, "fields">;
2668
2021
  /**
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.
2022
+ * Get Agent Profile
2674
2023
  *
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
- * });
2024
+ * Get an agent profile by ID
2687
2025
  */
2688
- declare const createAgentProfile: (client: AsteroidClient, payload: CreateAgentProfileRequest) => Promise<AgentProfile>;
2026
+ declare const agentProfileGet: <ThrowOnError extends boolean = false>(options: Options<AgentProfileGetData, ThrowOnError>) => RequestResult<AgentProfileGetResponses, AgentProfileGetErrors, ThrowOnError, "fields">;
2689
2027
  /**
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.
2028
+ * Update Agent Profile
2695
2029
  *
2696
- * @example
2697
- * const profile = await getAgentProfile(client, 'profile_123');
2030
+ * Update an existing agent profile
2698
2031
  */
2699
- declare const getAgentProfile: (client: AsteroidClient, profileId: string) => Promise<AgentProfile>;
2032
+ declare const agentProfileUpdate: <ThrowOnError extends boolean = false>(options: Options<AgentProfileUpdateData, ThrowOnError>) => RequestResult<AgentProfileUpdateResponses, AgentProfileUpdateErrors, ThrowOnError, "fields">;
2700
2033
  /**
2701
- * Update an existing agent profile.
2034
+ * Clear Browser Cache
2702
2035
  *
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
- * });
2036
+ * Clears the browser profile/cache for the specified agent profile by deleting its browser profile
2714
2037
  */
2715
- declare const updateAgentProfile: (client: AsteroidClient, profileId: string, payload: UpdateAgentProfileRequest) => Promise<AgentProfile>;
2038
+ declare const agentProfileClearBrowserCache: <ThrowOnError extends boolean = false>(options: Options<AgentProfileClearBrowserCacheData, ThrowOnError>) => RequestResult<AgentProfileClearBrowserCacheResponses, AgentProfileClearBrowserCacheErrors, ThrowOnError, "fields">;
2039
+ declare const agentList: <ThrowOnError extends boolean = false>(options?: Options<AgentListData, ThrowOnError>) => RequestResult<AgentListResponses, AgentListErrors, ThrowOnError, "fields">;
2716
2040
  /**
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.
2041
+ * Execute an agent
2722
2042
  *
2723
- * @example
2724
- * await deleteAgentProfile(client, 'profile_123');
2043
+ * Start an execution for the given agent.
2725
2044
  */
2726
- declare const deleteAgentProfile: (client: AsteroidClient, profileId: string) => Promise<{
2727
- message?: string;
2728
- }>;
2045
+ declare const agentExecutePost: <ThrowOnError extends boolean = false>(options: Options<AgentExecutePostData, ThrowOnError>) => RequestResult<AgentExecutePostResponses, AgentExecutePostErrors, ThrowOnError, "fields">;
2729
2046
  /**
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.
2047
+ * List executions
2736
2048
  *
2737
- * @example
2738
- * const activities = await getLastNExecutionActivities(client, 'execution_123', 10);
2739
- * console.log(activities);
2049
+ * List executions with filtering and pagination
2740
2050
  */
2741
- declare const getLastNExecutionActivities: (client: AsteroidClient, executionId: string, n: number) => Promise<AgentsExecutionActivity[]>;
2051
+ declare const executionsList: <ThrowOnError extends boolean = false>(options?: Options<ExecutionsListData, ThrowOnError>) => RequestResult<ExecutionsListResponses, ExecutionsListErrors, ThrowOnError, "fields">;
2742
2052
  /**
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.
2053
+ * Get execution
2748
2054
  *
2749
- * @example
2750
- * await addMessageToExecution(client, 'execution_123', 'Hello, world!');
2055
+ * Get a single execution by ID with all details
2751
2056
  */
2752
- declare const addMessageToExecution: (client: AsteroidClient, executionId: string, message: string) => Promise<void>;
2057
+ declare const executionGet: <ThrowOnError extends boolean = false>(options: Options<ExecutionGetData, ThrowOnError>) => RequestResult<ExecutionGetResponses, ExecutionGetErrors, ThrowOnError, "fields">;
2753
2058
  /**
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.
2059
+ * Retrieve execution activities
2759
2060
  *
2760
- * @example
2761
- * const files = await getExecutionFiles(client, 'execution_123');
2762
- * files.forEach(file => {
2763
- * console.log(`File: ${file.fileName}, Size: ${file.fileSize}`);
2764
- * });
2061
+ * Get activities for an execution
2765
2062
  */
2766
- declare const getExecutionFiles: (client: AsteroidClient, executionId: string) => Promise<AgentsFilesFile[]>;
2063
+ declare const executionActivitiesGet: <ThrowOnError extends boolean = false>(options: Options<ExecutionActivitiesGetData, ThrowOnError>) => RequestResult<ExecutionActivitiesGetResponses, ExecutionActivitiesGetErrors, ThrowOnError, "fields">;
2064
+ declare const executionContextFilesGet: <ThrowOnError extends boolean = false>(options: Options<ExecutionContextFilesGetData, ThrowOnError>) => RequestResult<ExecutionContextFilesGetResponses, ExecutionContextFilesGetErrors, ThrowOnError, "fields">;
2065
+ declare const executionContextFilesUpload: <ThrowOnError extends boolean = false>(options: Options<ExecutionContextFilesUploadData, ThrowOnError>) => RequestResult<ExecutionContextFilesUploadResponses, ExecutionContextFilesUploadErrors, ThrowOnError, "fields">;
2767
2066
  /**
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.
2067
+ * Update execution status
2776
2068
  *
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
- * }
2069
+ * Update the status of an execution. Use this to pause, resume, or cancel an execution.
2788
2070
  */
2789
- declare const downloadExecutionFile: (client: AsteroidClient, file: AgentsFilesFile, downloadPath: string, createDirs?: boolean, timeout?: number) => Promise<string>;
2790
- /** --- V2 --- */
2071
+ declare const executionStatusUpdate: <ThrowOnError extends boolean = false>(options: Options<ExecutionStatusUpdateData, ThrowOnError>) => RequestResult<ExecutionStatusUpdateResponses, ExecutionStatusUpdateErrors, ThrowOnError, "fields">;
2791
2072
  /**
2792
- * Get a paginated list of agents for an organization.
2073
+ * Send user message to execution
2793
2074
  *
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.
2075
+ * Add a user message to an execution
2799
2076
  */
2800
- declare const getAgents: (client: AsteroidClient, organizationId: string, page: number, pageSize: number) => Promise<AgentsAgentBase[]>;
2077
+ declare const executionUserMessagesAdd: <ThrowOnError extends boolean = false>(options: Options<ExecutionUserMessagesAddData, ThrowOnError>) => RequestResult<ExecutionUserMessagesAddResponses, ExecutionUserMessagesAddErrors, ThrowOnError, "fields">;
2801
2078
  /**
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
- * });
2079
+ * Stage a file for an execution
2827
2080
  *
2828
- * @example
2829
- * // Search by execution ID
2830
- * const result = await getExecutions(client, {
2831
- * executionId: 'exec_',
2832
- * page: 1,
2833
- * pageSize: 20
2834
- * });
2081
+ * 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
2082
  */
2836
- declare const getExecutions: (client: AsteroidClient, options: ExecutionsListData) => Promise<ExecutionsListResponses["200"]>;
2083
+ declare const tempFilesStage: <ThrowOnError extends boolean = false>(options: Options<TempFilesStageData, ThrowOnError>) => RequestResult<TempFilesStageResponses, TempFilesStageErrors, ThrowOnError, "fields">;
2837
2084
 
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 };
2085
+ 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 AgentsExecutionSearchWorkflowVersion, 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 };