@airtop/sdk 1.0.0-alpha2.3 → 1.0.0-alpha2.30

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.cts CHANGED
@@ -1,17 +1,27 @@
1
+ import { SessionListParams, ProfileOutput, FileListParams, FileCreateFileParams, WindowCreateParams, WindowIDData, EnvelopeDefaultMeta as EnvelopeDefaultMeta$1, Issue as Issue$1, WindowInfo, WindowGetParams, AIPromptResponse, ScrapeResponse } from '@airtop/core/resources/index.js';
2
+ import * as index_js from '@airtop/core/resources/index.js';
3
+ export { index_js as AirtopCore };
4
+ export { AIPromptResponse, ScrapeResponse } from '@airtop/core/resources/index.js';
5
+ import * as _airtop_core_resources_shared_mjs from '@airtop/core/resources/shared.mjs';
6
+ export { _airtop_core_resources_shared_mjs as AirtopCoreShared };
7
+ import { WindowClickParams, WindowHoverParams, WindowLoadURLParams, WindowMonitorParams, WindowPageQueryParams, WindowPaginatedExtractionParams, WindowScrapeParams, WindowScreenshotParams, WindowScrollParams, WindowTypeParams, WindowExtractParams, WindowActParams, WindowLlmParams, WindowFindOneParams, WindowFindManyParams, WindowWaitForPageParams, WindowNavigateParams, WindowFillFormParams } from '@airtop/core/resources/windows.js';
8
+ import * as windows_js from '@airtop/core/resources/windows.js';
9
+ export { windows_js as AirtopCoreWindows };
10
+ export { WindowActParams, WindowClickParams, WindowExtractParams, WindowFillFormParams, WindowFindManyParams, WindowFindOneParams, WindowGetParams, WindowHoverParams, WindowLlmParams, WindowLoadURLParams, WindowMonitorParams, WindowNavigateParams, WindowPageQueryParams, WindowPaginatedExtractionParams, WindowScrapeParams, WindowScreenshotParams, WindowScrollParams, WindowTypeParams, WindowWaitForPageParams } from '@airtop/core/resources/windows.js';
1
11
  import * as _airtop_core from '@airtop/core';
2
12
  import { Airtop } from '@airtop/core';
3
13
  import { AirtopJsonSchemaAdapter } from '@airtop/json-schema-adapter';
4
14
  export { AirtopJsonSchemaAdapter } from '@airtop/json-schema-adapter';
5
15
  import { ILogLayer } from 'loglayer';
6
16
  export { ILogLayer } from 'loglayer';
7
- import * as _airtop_core_resources_shared_mjs from '@airtop/core/resources/shared.mjs';
17
+ import { Issue, SessionConfigV1, ListAutomationsOutput, AutomationData, FilesResponse, EnvelopeDefaultMeta, GetFileData, CreateFileData, AirtopPagination, ExternalFile, ServicePromptActionResponseEnvelope, ServicePromptParameters, ExternalSessionWithConnectionInfo, ExtractActionResponseEnvelope, ActActionResponseEnvelope, LlmActionResponseEnvelope, NodeHandle, WaitForPageActionResponseEnvelope, NavigateActionResponseEnvelope, FindOneActionResponseEnvelope, FindManyActionResponseEnvelope, AIPromptResponse as AIPromptResponse$1, WindowIDDataResponse, OperationOutcomeResponse, WindowsResponse } from '@airtop/core/resources/shared.js';
18
+ export { AIResponseEnvelope, ActActionResponseData, AgentInvocationData, AgentVersionData, AirtopPagination, AsyncConfig, AsyncSessionAIResponseEnvelope, BrowserWaitNavigationConfig, ClickConfig, ClientProvidedResponseMetadata, CreateFileData, EnvelopeDefaultMeta, ExternalSessionAIResponseMetadata, ExternalSessionAIResponseMetadataUsage, ExternalSessionConfig, ExternalSessionWithConnectionInfo, ExtractActionResponseData, FindManyActionResponseData, FindOneActionResponseData, GetFileData, IntervalMonitorConfig, Issue, LlmActionResponseData, MicroInteractionConfig, MonitorConfig, NavigateActionResponseData, OperationOutcome, OperationOutcomeResponse, PageQueryConfig, PageQueryExperimentalConfig, PaginatedExtractionConfig, ScrapeResponseContent, ScrapeResponseEnvelope, ScrapeResponseOutput, ScreenshotConfig, ScreenshotMetadata, ScreenshotRequestConfig, ScreenshotScrollPosition, ScreenshotViewportDimensions, ScrollByConfig, ScrollToEdgeConfig, ServicePromptActionResponseData, SummaryExperimentalConfig, VisualAnalysisConfig, WaitForPageActionResponseData, WindowIDData, WindowIDDataResponse, WindowInfo, WindowResponse, WindowsResponse, WindowsWithMeta } from '@airtop/core/resources/shared.js';
8
19
  import { AutomationUpdateDescriptionParams } from '@airtop/core/resources/automations.js';
9
- import { SessionListParams, ProfileOutput, FileListParams, FileCreateFileParams, WindowIDData, EnvelopeDefaultMeta as EnvelopeDefaultMeta$1, Issue as Issue$1, WindowInfo, WindowGetParams, AIPromptResponse, ScrapeResponse } from '@airtop/core/resources/index.js';
10
- import * as _airtop_core_resources_shared_js from '@airtop/core/resources/shared.js';
11
- import { SessionConfigV1, GetFileResponse, ListAutomationsOutput, AutomationData, ExternalSessionWithConnectionInfo, EnvelopeDefaultMeta, Issue, AIPromptResponse as AIPromptResponse$1, WindowIDDataResponse, OperationOutcomeResponse } from '@airtop/core/resources/shared.js';
12
- export { AIResponseEnvelope, AirtopPagination, ExternalSessionAIResponseMetadata, ExternalSessionWithConnectionInfo, Issue, OperationOutcomeResponse, WindowIDDataResponse } from '@airtop/core/resources/shared.js';
13
20
  import * as _airtop_core_resources_sessions_mjs from '@airtop/core/resources/sessions.mjs';
14
- import { WindowClickParams, WindowHoverParams, WindowLoadURLParams, WindowMonitorParams, WindowScrapeParams, WindowScreenshotParams, WindowScrollParams, WindowTypeParams } from '@airtop/core/resources/windows.js';
21
+ import * as _airtop_core_resources_js from '@airtop/core/resources.js';
22
+ import { ConnectedServicesActionResponseEnvelope } from '@airtop/core/resources.js';
23
+ import { DeepOmit } from 'deep-utility-types';
24
+ export { DeepOmit } from 'deep-utility-types';
15
25
 
16
26
  /**
17
27
  * Shared configuration between Airtop classes.
@@ -36,12 +46,25 @@ interface CommonAirtopConfig {
36
46
  * Used for customizing output schema handling.
37
47
  */
38
48
  outputSchemaAdapter?: AirtopJsonSchemaAdapter;
49
+ /**
50
+ * The automation job ID to use for the request.
51
+ */
52
+ jobId?: string;
53
+ /**
54
+ * Logger instance for publishing agent events.
55
+ * Used to send event data to external systems during automation execution.
56
+ */
57
+ agentEventPublisher?: ILogLayer;
58
+ /**
59
+ * The default timeout in seconds for API requests.
60
+ */
61
+ defaultTimeoutInSeconds?: number;
39
62
  }
40
63
  /**
41
64
  * Configuration for defining the JSON schema output.
42
65
  */
43
66
  interface OutputJsonSchemaConfig {
44
- configuration: {
67
+ configuration?: {
45
68
  /**
46
69
  * JSON schema defining the structure of the output.
47
70
  */
@@ -75,6 +98,15 @@ interface CommonResponse {
75
98
  warnings?: unknown;
76
99
  errors?: unknown;
77
100
  }
101
+ /**
102
+ * Custom error class that implements the Issue interface.
103
+ * Extends the native Error class to provide a more structured error handling mechanism.
104
+ */
105
+ declare class AirtopError extends Error {
106
+ issues: Issue[];
107
+ metadata?: Record<string, unknown>;
108
+ constructor(issues: Issue[], metadata?: Record<string, unknown>);
109
+ }
78
110
 
79
111
  /**
80
112
  * Base class for Airtop SDK implementation
@@ -97,11 +129,38 @@ declare class AirtopBase {
97
129
  * @internal
98
130
  **/
99
131
  protected outputJsonAdapter: AirtopJsonSchemaAdapter;
132
+ /**
133
+ * The job id for the ongoing automation
134
+ * @internal
135
+ */
136
+ protected jobId?: string;
137
+ /**
138
+ * Instance for sending agent events
139
+ * @internal
140
+ */
141
+ protected agentEventPublisher?: ILogLayer;
142
+ /**
143
+ * The default timeout in seconds for API requests.
144
+ * @internal
145
+ */
146
+ protected defaultTimeoutInSeconds: number;
100
147
  /**
101
148
  * Creates a new instance of AirtopBase
102
149
  * @param config - Configuration options for the SDK
103
150
  */
104
151
  constructor(config: CommonAirtopConfig);
152
+ /**
153
+ * Sets the publisher for sending agent events. Internal use only.
154
+ * @internal
155
+ */
156
+ _setAgentEventPublisher(logger: ILogLayer): void;
157
+ /**
158
+ * Sends a payload to the agent with the specified event name.
159
+ * @param eventName The name of the event
160
+ * @param payload The payload to send to the agent
161
+ * @internal
162
+ */
163
+ protected _sendAgentPayload(eventName: string, payload: any): void;
105
164
  /**
106
165
  * Returns the API key used by the SDK
107
166
  * @returns API key string
@@ -161,7 +220,7 @@ interface AirtopConstructorConfig {
161
220
  apiKey: string;
162
221
  /**
163
222
  * The base URL for the Airtop API.
164
- * Defaults to https://api.airtop.ai/api/v1 if not specified.
223
+ * Defaults to https://api.airtop.ai/api if not specified.
165
224
  */
166
225
  airtopUrl?: string;
167
226
  /**
@@ -180,6 +239,20 @@ interface AirtopConstructorConfig {
180
239
  * Used to customize how response data is structured.
181
240
  */
182
241
  outputSchemaAdapter?: AirtopJsonSchemaAdapter;
242
+ /**
243
+ * The job ID to use for the ongoing automation.
244
+ */
245
+ jobId?: string;
246
+ /**
247
+ * Logger instance for publishing agent events.
248
+ * Used to send event data to external systems during automation execution.
249
+ */
250
+ agentEventPublisher?: ILogLayer;
251
+ /**
252
+ * The default timeout in seconds for API requests.
253
+ * Defaults to 5 minutes if not specified.
254
+ */
255
+ defaultTimeoutInSeconds?: number;
183
256
  }
184
257
  /**
185
258
  * Configuration options for creating a new session.
@@ -204,8 +277,6 @@ interface GetSessionsConfig extends Omit<SessionListParams, "sessionIds"> {
204
277
  */
205
278
  interface GetFilesConfig extends Omit<FileListParams, "sessionIds"> {
206
279
  }
207
- interface AirtopFileResponse extends GetFileResponse {
208
- }
209
280
  interface AirtopAutomationUpdateDescriptionConfig extends AutomationUpdateDescriptionParams {
210
281
  }
211
282
  interface AirtopAutomationData extends AutomationData {
@@ -214,6 +285,226 @@ interface AirtopAutomationListResponse extends ListAutomationsOutput {
214
285
  }
215
286
  interface AirtopProfile extends ProfileOutput {
216
287
  }
288
+ interface AirtopFileListParams extends FileListParams {
289
+ }
290
+ interface AirtopFilesResponse extends FilesResponse {
291
+ }
292
+
293
+ /**
294
+ * Common data found in a file API call response.
295
+ */
296
+ interface CommonFileResponse {
297
+ data: {
298
+ /**
299
+ * The ID of the file.
300
+ */
301
+ id: string;
302
+ };
303
+ meta?: EnvelopeDefaultMeta;
304
+ warnings?: Issue[];
305
+ errors?: Issue[];
306
+ }
307
+ /**
308
+ * The file data containing details such as the id, file name, type, and download URL.
309
+ */
310
+ interface FileData extends GetFileData {
311
+ }
312
+ /**
313
+ * The file data from creating a new file.
314
+ */
315
+ interface FileCreateData extends CreateFileData {
316
+ }
317
+ /**
318
+ * The file data from listing files (external file data).
319
+ */
320
+ interface FileListData extends ExternalFile {
321
+ }
322
+ /**
323
+ * The metadata associated with the file.
324
+ */
325
+ interface FileMetadata extends EnvelopeDefaultMeta {
326
+ }
327
+ /**
328
+ * A non-fatal file operation issue.
329
+ */
330
+ interface FileWarning extends Issue {
331
+ }
332
+ /**
333
+ * A fatal file operation issue.
334
+ */
335
+ interface FileError extends Issue {
336
+ }
337
+ /**
338
+ * Response object for getting file information.
339
+ */
340
+ interface AirtopFileGetResponse {
341
+ /**
342
+ * The file data containing details such as the id, file name, type, and download URL.
343
+ * Includes all information about the file that was processed or retrieved.
344
+ */
345
+ data: FileData;
346
+ /**
347
+ * The metadata associated with the file operation.
348
+ * Contains information about the request that processed the file.
349
+ */
350
+ meta?: FileMetadata;
351
+ /**
352
+ * Warnings that occurred during file processing or operation.
353
+ * These are non-fatal issues that didn't prevent file processing.
354
+ */
355
+ warnings?: FileWarning[];
356
+ /**
357
+ * Errors that occurred during file processing or operation.
358
+ * These are fatal issues that prevented file processing.
359
+ */
360
+ errors?: FileError[];
361
+ }
362
+ /**
363
+ * Response object for creating a new file.
364
+ */
365
+ interface AirtopFileCreateResponse {
366
+ /**
367
+ * The file data containing details such as the id, file name, type, and download URL.
368
+ * Includes all information about the file that was created.
369
+ */
370
+ data: FileCreateData;
371
+ /**
372
+ * The metadata associated with the file operation.
373
+ * Contains information about the request that created the file.
374
+ */
375
+ meta?: FileMetadata;
376
+ /**
377
+ * Warnings that occurred during file processing or operation.
378
+ * These are non-fatal issues that didn't prevent file processing.
379
+ */
380
+ warnings?: FileWarning[];
381
+ /**
382
+ * Errors that occurred during file processing or operation.
383
+ * These are fatal issues that prevented file processing.
384
+ */
385
+ errors?: FileError[];
386
+ }
387
+ /**
388
+ * Response object for listing file information.
389
+ */
390
+ interface AirtopFileListResponse {
391
+ /**
392
+ * The file data containing details such as the id, file name, type, and download URL.
393
+ * Includes all information about the file from the list operation.
394
+ */
395
+ data: FileListData;
396
+ /**
397
+ * The metadata associated with the file operation.
398
+ * Contains information about the request that listed the file.
399
+ */
400
+ meta?: FileMetadata;
401
+ /**
402
+ * Warnings that occurred during file processing or operation.
403
+ * These are non-fatal issues that didn't prevent file processing.
404
+ */
405
+ warnings?: FileWarning[];
406
+ /**
407
+ * Errors that occurred during file processing or operation.
408
+ * These are fatal issues that prevented file processing.
409
+ */
410
+ errors?: FileError[];
411
+ }
412
+ /**
413
+ * Response object for listing files with AirtopFile instances.
414
+ * Note: The files array contains AirtopFile<AirtopFileListInfoResponse> instances.
415
+ */
416
+ interface AirtopFileListWithInstancesResponse {
417
+ /**
418
+ * Pagination information for the file list.
419
+ */
420
+ pagination: AirtopPagination;
421
+ /**
422
+ * Array of AirtopFile instances (typed as any to avoid circular reference).
423
+ * In practice, these are AirtopFile<AirtopFileListInfoResponse> instances.
424
+ */
425
+ files: any[];
426
+ /**
427
+ * Errors that occurred during file listing.
428
+ */
429
+ errors?: FileError[];
430
+ /**
431
+ * The metadata associated with the file listing operation.
432
+ */
433
+ meta?: FileMetadata;
434
+ /**
435
+ * Warnings that occurred during file listing.
436
+ */
437
+ warnings?: FileWarning[];
438
+ }
439
+
440
+ /**
441
+ * Represents a file in the Airtop system.
442
+ */
443
+ declare class AirtopFile<Response extends CommonFileResponse> extends AirtopFileClient {
444
+ /**
445
+ * The file data containing details such as the id, file name, type, and download URL.
446
+ * Includes all information about the file that was processed or retrieved.
447
+ */
448
+ data: Response["data"];
449
+ /**
450
+ * The metadata associated with the file operation.
451
+ * Contains information about the request that processed the file.
452
+ */
453
+ meta: Response["meta"];
454
+ /**
455
+ * Warnings that occurred during file processing or operation.
456
+ * These are non-fatal issues that didn't prevent file processing.
457
+ */
458
+ warnings: Response["warnings"];
459
+ /**
460
+ * Errors that occurred during file processing or operation.
461
+ * These are fatal issues that prevented file processing.
462
+ */
463
+ errors: Response["errors"];
464
+ /**
465
+ * Creates a new AirtopFile instance.
466
+ * @param config - Common configuration options for the file
467
+ * @param fileData - File data
468
+ */
469
+ constructor(config: CommonAirtopConfig, fileData: Response);
470
+ /**
471
+ * Returns response data as a JSON object.
472
+ */
473
+ toJSON(): {
474
+ data: Response["data"];
475
+ meta: Response["meta"];
476
+ warnings: Response["warnings"];
477
+ errors: Response["errors"];
478
+ };
479
+ }
480
+
481
+ /**
482
+ * Client for making file-specific requests to the Airtop API.
483
+ */
484
+ declare class AirtopFileClient extends AirtopBase {
485
+ /**
486
+ * The file id
487
+ * @internal
488
+ */
489
+ protected fileId: string;
490
+ /**
491
+ * Creates a new AirtopFileClient instance.
492
+ * @param config - Common configuration options
493
+ * @param fileId - File id
494
+ */
495
+ constructor(config: CommonAirtopConfig, fileId: string);
496
+ /**
497
+ * Gets a file by ID.
498
+ * @param requestOptions
499
+ * @returns AirtopFile instance
500
+ */
501
+ getFile(requestOptions?: AirtopRequestOptions): Promise<AirtopFile<AirtopFileGetResponse>>;
502
+ /**
503
+ * Removes a file by ID.
504
+ * @param requestOptions - Request options
505
+ */
506
+ removeFile(requestOptions?: AirtopRequestOptions): Promise<void>;
507
+ }
217
508
 
218
509
  /**
219
510
  * The session data containing connection and state information.
@@ -269,8 +560,76 @@ interface AirtopSessionResponse {
269
560
  * Configuration parameters for retrieving a window.
270
561
  * Excludes session ID which is provided by the parent session.
271
562
  */
563
+ /**
564
+ * File status event data structure.
565
+ * Represents the status of a file in the session.
566
+ */
567
+ interface FileStatusEvent {
568
+ /**
569
+ * The type of event.
570
+ */
571
+ event: "file_status";
572
+ /**
573
+ * The status of the file.
574
+ */
575
+ status: "available" | "processing" | "error";
576
+ /**
577
+ * The ID of the file.
578
+ */
579
+ fileId: string;
580
+ /**
581
+ * The download URL for the file (when status is 'available').
582
+ */
583
+ downloadUrl?: string;
584
+ /**
585
+ * The timestamp when the event occurred.
586
+ */
587
+ eventTime: string;
588
+ }
589
+ /**
590
+ * Configuration for the waitForDownload method.
591
+ */
592
+ interface WaitForDownloadConfig {
593
+ /**
594
+ * The number of seconds to look back for prior events.
595
+ * Default is 5. 0 means no lookback.
596
+ */
597
+ lookbackSeconds?: number;
598
+ }
599
+ /**
600
+ * Result of waiting for a file download.
601
+ */
602
+ interface WaitForDownloadResult {
603
+ /**
604
+ * The ID of the file.
605
+ */
606
+ id: string;
607
+ /**
608
+ * The download URL for the file.
609
+ */
610
+ downloadUrl: string;
611
+ }
272
612
  interface CreateFileConfig extends Omit<FileCreateFileParams, "sessionId" | "fileName"> {
273
613
  }
614
+ /**
615
+ * Extended service prompt parameters that allow outputSchema to be either a string or an object.
616
+ * The SDK will automatically convert object schemas to JSON strings.
617
+ */
618
+ interface ExtendedServicePromptParameters extends Omit<ServicePromptParameters, "outputSchema"> {
619
+ /**
620
+ * JSON schema for structured output. Can be provided as a JSON string or as an object.
621
+ * If provided as an object, it will be automatically stringified.
622
+ *
623
+ * Requirements: root must be object, all fields required, every object needs
624
+ * additionalProperties:false. No format/pattern keywords. Include 'error' field for failures.
625
+ */
626
+ outputSchema?: string | Record<string, any>;
627
+ }
628
+ /**
629
+ * Response from a session service call.
630
+ */
631
+ interface SessionServiceResponse extends ServicePromptActionResponseEnvelope {
632
+ }
274
633
 
275
634
  /**
276
635
  * Common data found in a window API call response.
@@ -283,6 +642,8 @@ interface CommonWindowResponse extends CommonResponse {
283
642
  windowId: string;
284
643
  };
285
644
  }
645
+ interface WindowCreateOptions extends Omit<WindowCreateParams, "url"> {
646
+ }
286
647
  /**
287
648
  * The window data from creating a new window.
288
649
  */
@@ -378,18 +739,20 @@ interface WindowLoadUrlConfig extends Omit<WindowLoadURLParams, "sessionId" | "u
378
739
  * Configuration parameters for monitoring window events.
379
740
  * Excludes session ID which is provided by the parent session.
380
741
  */
381
- interface WindowMonitorConfig extends Omit<WindowMonitorParams, "sessionId"> {
742
+ interface WindowMonitorConfig extends Omit<WindowMonitorParams, "sessionId" | "condition"> {
743
+ }
744
+ interface WindowPageQueryParamsBase extends DeepOmit<WindowPageQueryParams, "sessionId" | "prompt" | "configuration.outputSchema"> {
382
745
  }
383
746
  /**
384
747
  * Configuration parameters for performing a natural language query on page content.
385
748
  */
386
- interface WindowPageQueryConfig extends OutputJsonSchemaConfig {
749
+ type WindowPageQueryConfig = WindowPageQueryParamsBase & OutputJsonSchemaConfig;
750
+ interface WindowPaginatedExtractionParamsBase extends DeepOmit<WindowPaginatedExtractionParams, "sessionId" | "prompt" | "configuration.outputSchema"> {
387
751
  }
388
752
  /**
389
753
  * Configuration parameters for extracting paginated data from a window.
390
754
  */
391
- interface WindowPaginatedExtractionConfig extends OutputJsonSchemaConfig {
392
- }
755
+ type WindowPaginatedExtractionConfig = WindowPaginatedExtractionParamsBase & OutputJsonSchemaConfig;
393
756
  /**
394
757
  * Configuration parameters for scraping content from a window.
395
758
  * Excludes session ID which is provided by the parent session.
@@ -418,6 +781,167 @@ interface WindowPromptResponse extends AIPromptResponse {
418
781
  */
419
782
  interface WindowScrapeResponse extends ScrapeResponse {
420
783
  }
784
+ /**
785
+ * Configuration parameters for extracting content from a window.
786
+ */
787
+ interface WindowExtractConfig extends Omit<WindowExtractParams, "sessionId" | "prompt" | "jobId"> {
788
+ }
789
+ /**
790
+ * Extract window response.
791
+ */
792
+ interface WindowExtractResponse extends ExtractActionResponseEnvelope {
793
+ }
794
+ /**
795
+ * Configuration parameters for acting on content in a window.
796
+ */
797
+ interface WindowActConfig extends Omit<WindowActParams, "sessionId" | "prompt" | "jobId"> {
798
+ }
799
+ /**
800
+ * Act window response.
801
+ */
802
+ interface WindowActResponse extends ActActionResponseEnvelope {
803
+ }
804
+ /**
805
+ * Configuration parameters for executing an LLM call in a window.
806
+ */
807
+ interface WindowLlmConfig extends Omit<WindowLlmParams, "sessionId" | "jobId" | "prompt" | "includeWebContext" | "outputSchema"> {
808
+ outputSchema?: string | object;
809
+ }
810
+ /**
811
+ * LLM window response.
812
+ */
813
+ interface WindowLlmResponse extends LlmActionResponseEnvelope {
814
+ }
815
+ /**
816
+ * Configuration parameters for finding one element in a window.
817
+ */
818
+ interface WindowFindOneConfig extends Omit<WindowFindOneParams, "sessionId" | "prompt" | "jobId"> {
819
+ }
820
+ /**
821
+ * Find one window response.
822
+ */
823
+ interface WindowFindOneResponse extends FindOneActionResponseEnvelope {
824
+ }
825
+ /**
826
+ * Configuration parameters for finding multiple elements in a window.
827
+ */
828
+ interface WindowFindManyConfig extends Omit<WindowFindManyParams, "sessionId" | "prompt" | "jobId"> {
829
+ }
830
+ /**
831
+ * Find many window response.
832
+ */
833
+ interface WindowFindManyResponse extends FindManyActionResponseEnvelope {
834
+ }
835
+ /**
836
+ * Configuration parameters for waiting for a page to load in a window.
837
+ */
838
+ interface WindowWaitForPageConfig extends Omit<WindowWaitForPageParams, "sessionId"> {
839
+ }
840
+ /**
841
+ * Wait for page window response.
842
+ */
843
+ interface WindowWaitForPageResponse extends WaitForPageActionResponseEnvelope {
844
+ }
845
+ /**
846
+ * Configuration parameters for navigating browser history in a window.
847
+ */
848
+ interface WindowNavigateConfig extends Omit<WindowNavigateParams, "sessionId"> {
849
+ }
850
+ /**
851
+ * Navigate window response.
852
+ */
853
+ interface WindowNavigateResponse extends NavigateActionResponseEnvelope {
854
+ }
855
+ /**
856
+ * The direction to navigate in browser history.
857
+ */
858
+ declare enum WindowNavigateDirection {
859
+ BACK = "backward",
860
+ FORWARD = "forward"
861
+ }
862
+ /**
863
+ * Data object representing a node returned from the Airtop API.
864
+ */
865
+ interface AirtopNodeApiResponseData extends NodeHandle {
866
+ }
867
+ /**
868
+ * Configuration parameters for filling a form in a window.
869
+ */
870
+ interface WindowFillFormConfig extends Omit<WindowFillFormParams, "sessionId" | "parameters"> {
871
+ }
872
+
873
+ /**
874
+ * Represents a node in the DOM
875
+ */
876
+ declare class AirtopNode {
877
+ /**
878
+ * The window client
879
+ */
880
+ protected windowClient: AirtopWindowClient;
881
+ /**
882
+ * The node handle id to use for all requests
883
+ */
884
+ nodeHandleId: string;
885
+ /**
886
+ * The xpath selector of the node
887
+ */
888
+ selector: string;
889
+ /**
890
+ * Constructor
891
+ * @param client - The window client
892
+ * @param nodeData - The node data to use for all requests
893
+ */
894
+ constructor(client: AirtopWindowClient, nodeData: AirtopNodeApiResponseData);
895
+ /**
896
+ * Extract content from the node
897
+ * @param prompt - The prompt to use for the extraction
898
+ * @param config - The configuration to use for the extraction
899
+ * @param requestOptions - The request options to use for the extraction
900
+ */
901
+ extract(prompt: string, config?: WindowExtractConfig, requestOptions?: AirtopRequestOptions): Promise<WindowExtractResponse>;
902
+ /**
903
+ * Act on the node
904
+ * @param prompt - The prompt to use for the action
905
+ * @param config - The configuration to use for the action
906
+ * @param requestOptions - The request options to use for the action
907
+ */
908
+ act(prompt: string, config?: WindowActConfig, requestOptions?: AirtopRequestOptions): Promise<WindowActResponse>;
909
+ /**
910
+ * Execute an LLM call on the node
911
+ * @param prompt - The prompt to use for the LLM call
912
+ * @param config - The configuration to use for the LLM call
913
+ * @param requestOptions - The request options to use for the LLM call
914
+ */
915
+ llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowLlmResponse>;
916
+ /**
917
+ * Find one element in the node
918
+ * @param prompt - The prompt to use for the find one
919
+ * @param config - The configuration to use for the find one
920
+ * @param requestOptions - The request options to use for the find one
921
+ */
922
+ findOne(prompt: string, config?: WindowFindOneConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode>;
923
+ /**
924
+ * Find one element in the node
925
+ * @param prompt - The prompt to use for the find one
926
+ * @param config - The configuration to use for the find one
927
+ * @param requestOptions - The request options to use for the find one
928
+ */
929
+ findOneOptional(prompt: string, config?: WindowFindOneConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode>;
930
+ /**
931
+ * Find many elements in the node
932
+ * @param prompt - The prompt to use for the find many
933
+ * @param config - The configuration to use for the find many
934
+ * @param requestOptions - The request options to use for the find many
935
+ */
936
+ findMany(prompt: string, config?: WindowFindManyConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode[]>;
937
+ /**
938
+ * Find many elements in the node
939
+ * @param prompt - The prompt to use for the find many
940
+ * @param config - The configuration to use for the find many
941
+ * @param requestOptions - The request options to use for the find many
942
+ */
943
+ findManyOptional(prompt: string, config?: WindowFindManyConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode[]>;
944
+ }
421
945
 
422
946
  /**
423
947
  * Response object for a screenshot operation.
@@ -456,14 +980,14 @@ declare class AirtopWindowScreenshot {
456
980
  * Returns response data as a JSON object.
457
981
  */
458
982
  toJSON(): {
459
- data: _airtop_core_resources_shared_js.AIResponseEnvelope;
460
- meta: _airtop_core_resources_shared_js.ExternalSessionAIResponseMetadata;
461
- warnings: _airtop_core_resources_shared_js.Issue[];
462
- errors: _airtop_core_resources_shared_js.Issue[];
983
+ data: _airtop_core_resources_js.AIResponseEnvelope;
984
+ meta: _airtop_core_resources_js.ExternalSessionAIResponseMetadata;
985
+ warnings: _airtop_core_resources_js.Issue[];
986
+ errors: _airtop_core_resources_js.Issue[];
463
987
  };
464
988
  }
465
989
 
466
- /**
990
+ /**, waitForRequestCompletion
467
991
  * Client for making window-specific requests to the Airtop API.
468
992
  */
469
993
  declare class AirtopWindowClient extends AirtopBase {
@@ -580,7 +1104,19 @@ declare class AirtopWindowClient extends AirtopBase {
580
1104
  * @param requestOptions - Request options
581
1105
  * @returns Promise resolving when the text has been typed
582
1106
  */
583
- type(text: string, config?: WindowTypeConfig, requestOptions?: AirtopRequestOptions): Promise<_airtop_core_resources_shared_mjs.AIPromptResponse>;
1107
+ type(text: string, config?: WindowTypeConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
1108
+ extract(prompt: string, config?: WindowExtractConfig, requestOptions?: AirtopRequestOptions): Promise<WindowExtractResponse>;
1109
+ act(prompt: string, config?: WindowActConfig, requestOptions?: AirtopRequestOptions): Promise<WindowActResponse>;
1110
+ llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowLlmResponse>;
1111
+ private findOnePrivate;
1112
+ findOne(prompt: string, config?: Omit<WindowFindOneConfig, "optional">, requestOptions?: AirtopRequestOptions): Promise<AirtopNode>;
1113
+ findOneOptional(prompt: string, config?: Omit<WindowFindOneConfig, "optional">, requestOptions?: AirtopRequestOptions): Promise<AirtopNode | null>;
1114
+ private findManyPrivate;
1115
+ findMany(prompt: string, config?: Omit<WindowFindManyConfig, "optional">, requestOptions?: AirtopRequestOptions): Promise<AirtopNode[]>;
1116
+ findManyOptional(prompt: string, config?: Omit<WindowFindManyConfig, "optional">, requestOptions?: AirtopRequestOptions): Promise<AirtopNode[]>;
1117
+ waitForPage(config?: WindowWaitForPageConfig, requestOptions?: AirtopRequestOptions): Promise<WindowWaitForPageResponse>;
1118
+ navigate(direction: WindowNavigateDirection, config?: WindowNavigateConfig, requestOptions?: AirtopRequestOptions): Promise<WindowNavigateResponse>;
1119
+ fillForm(formData: string | object, config?: WindowFillFormConfig, requestOptions?: AirtopRequestOptions): Promise<AIPromptResponse>;
584
1120
  }
585
1121
 
586
1122
  /**
@@ -633,7 +1169,7 @@ declare class AirtopSessionClient extends AirtopBase {
633
1169
  */
634
1170
  protected sessionId: string;
635
1171
  /**
636
- * Creates a new AirtopSession instance.
1172
+ * Creates a new AirtopSessionClient instance.
637
1173
  * @param config - Common configuration options for the session
638
1174
  * @param sessionId - Browser session id
639
1175
  */
@@ -642,6 +1178,7 @@ declare class AirtopSessionClient extends AirtopBase {
642
1178
  * Returns the browser session ID.
643
1179
  */
644
1180
  getSessionId(): string;
1181
+ listWindows(requestOptions?: AirtopRequestOptions): Promise<WindowsResponse>;
645
1182
  /**
646
1183
  * Gets the state of the session using the attached session id.
647
1184
  * @param requestOptions - Request options
@@ -670,7 +1207,7 @@ declare class AirtopSessionClient extends AirtopBase {
670
1207
  * @param requestOptions - Request options
671
1208
  * @returns A new AirtopWindow<AirtopWindowCreateResponse> instance
672
1209
  */
673
- createWindow(url: string, requestOptions?: AirtopRequestOptions): Promise<AirtopWindow<AirtopWindowCreateResponse>>;
1210
+ createWindow(url: string, createOptions?: WindowCreateOptions, requestOptions?: AirtopRequestOptions): Promise<AirtopWindow<AirtopWindowCreateResponse>>;
674
1211
  /**
675
1212
  * Returns a window client instance for making window-based requests for a given window id.
676
1213
  *
@@ -682,8 +1219,41 @@ declare class AirtopSessionClient extends AirtopBase {
682
1219
  * @param fileName - The name of the file to create
683
1220
  * @param config - Additional configuration options for creating the file
684
1221
  * @param requestOptions - Request options
1222
+ * @returns AirtopFile instance
1223
+ */
1224
+ createFile(fileName: string, config?: CreateFileConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopFile<AirtopFileCreateResponse>>;
1225
+ llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowLlmResponse>;
1226
+ /**
1227
+ * Calls the service endpoint with a string prompt.
1228
+ * @param prompt - Natural language description of the task to perform with third-party services (e.g., "read data from Google Sheets", "create a HubSpot lead", "update this document")
1229
+ * @param service - The service id or array of service ids that will be leveraged to achieve the intent of the prompt
1230
+ * @param requestOptions - Request options
1231
+ * @deprecated Use `service(args: ExtendedServicePromptParameters, requestOptions?: AirtopRequestOptions)` instead
1232
+ */
1233
+ service(prompt: string, service?: string, requestOptions?: AirtopRequestOptions): Promise<SessionServiceResponse>;
1234
+ /**
1235
+ * Calls the service endpoint with ExtendedServicePromptParameters.
1236
+ * @param parameters - The service parameters object
1237
+ * @param requestOptions - Request options
685
1238
  */
686
- createFile(fileName: string, config?: CreateFileConfig, requestOptions?: AirtopRequestOptions): _airtop_core.APIPromise<_airtop_core_resources_shared_mjs.CreateFileResponse>;
1239
+ service(parameters: ExtendedServicePromptParameters, requestOptions?: AirtopRequestOptions): Promise<SessionServiceResponse>;
1240
+ /**
1241
+ * Retrieves the list of connected services available for the current session.
1242
+ * @param requestOptions - Request options
1243
+ * @returns A promise that resolves to the connected services response containing service details
1244
+ */
1245
+ getConnectedServices(requestOptions?: AirtopRequestOptions): Promise<ConnectedServicesActionResponseEnvelope>;
1246
+ /**
1247
+ * Waits for a file to be downloaded in a session and reach 'available' status.
1248
+ * Defaults to looking back 5 seconds in the event stream for the file to be available.
1249
+ * Use `lookbackSeconds` to control this behavior.
1250
+ *
1251
+ * @param configuration - The optional configuration parameters for the function
1252
+ * @param configuration.lookbackSeconds - The number of seconds to look back for prior events. Default `5`. 0 means no lookback.
1253
+ * @param requestOptions - Optional request configuration including timeout
1254
+ * @returns Object containing file's id and downloadUrl, or null if timed out
1255
+ */
1256
+ waitForDownload(configuration?: WaitForDownloadConfig, requestOptions?: AirtopRequestOptions): Promise<WaitForDownloadResult | null>;
687
1257
  }
688
1258
 
689
1259
  /**
@@ -783,6 +1353,11 @@ declare class AirtopClient extends AirtopBase {
783
1353
  * @param sessionId - The session ID to attach to the AirtopSessionClient instance
784
1354
  **/
785
1355
  withSessionId(sessionId: string): AirtopSessionClient;
1356
+ /**
1357
+ * Returns a file client instance for making file-based requests for a given file id.
1358
+ * @param fileId - The file ID to attach to the AirtopFileClient instance
1359
+ */
1360
+ withFileId(fileId: string): AirtopFileClient;
786
1361
  /**
787
1362
  * Retrieves the status of a request.
788
1363
  * @param requestId - ID of the request to check
@@ -791,17 +1366,12 @@ declare class AirtopClient extends AirtopBase {
791
1366
  */
792
1367
  getRequestStatus(requestId: string, requestOptions?: AirtopRequestOptions): Promise<_airtop_core_resources_shared_mjs.RequestStatusResponse>;
793
1368
  /**
794
- * Gets a file by ID.
795
- * @param fileId
796
- * @param requestOptions
797
- */
798
- getFile(fileId: string, requestOptions?: AirtopRequestOptions): Promise<AirtopFileResponse>;
799
- /**
800
- * Removes a file by ID.
801
- * @param fileId - ID of the file to remove
1369
+ * List files
1370
+ * @param query - File list parameters
802
1371
  * @param requestOptions - Request options
1372
+ * @returns Object containing pagination info and array of AirtopFile instances
803
1373
  */
804
- removeFile(fileId: string, requestOptions?: AirtopRequestOptions): Promise<void>;
1374
+ listFiles(query: AirtopFileListParams, requestOptions?: AirtopRequestOptions): Promise<AirtopFileListWithInstancesResponse>;
805
1375
  /**
806
1376
  * List all automations
807
1377
  * @param requestOptions - Request options
@@ -821,6 +1391,182 @@ declare class AirtopClient extends AirtopBase {
821
1391
  removeAutomation(automationID: string, requestOptions?: AirtopRequestOptions): _airtop_core.APIPromise<unknown>;
822
1392
  }
823
1393
 
1394
+ /**
1395
+ * Provides utility methods for creating mock instances of Airtop classes.
1396
+ * @hideconstructor
1397
+ */
1398
+ declare class AirtopMocks {
1399
+ /**
1400
+ * Creates an AirtopBase instance (the class used as the base for other Airtop classes) with a mock client and logger.
1401
+ */
1402
+ static getAirtopBaseMock(config?: Partial<CommonAirtopConfig>): AirtopBase;
1403
+ /**
1404
+ * Creates an Airtop instance with a mock client and data.
1405
+ */
1406
+ static getAirtopClientMock(config?: Partial<AirtopConstructorConfig>): AirtopClient;
1407
+ /**
1408
+ * Creates an AirtopSession instance with a mock client and data.
1409
+ */
1410
+ static getAirtopSessionMock(responseData?: Partial<AirtopSessionResponse>): AirtopSession;
1411
+ /**
1412
+ * Creates an AirtopWindow instance with a mock client and data.
1413
+ */
1414
+ static getAirtopWindowMock({ sessionId, windowData, }?: {
1415
+ sessionId?: string;
1416
+ windowData?: AirtopWindowGetInfoResponse;
1417
+ }): AirtopWindow<AirtopWindowGetInfoResponse>;
1418
+ }
1419
+
1420
+ interface AirtopAgentCreateAgentParams extends Airtop.AgentCreateAgentParams {
1421
+ }
1422
+ interface AirtopAgentGetAgentParams extends Airtop.AgentGetAgentParams {
1423
+ }
1424
+ interface AirtopAgentGetAgentsParams extends Airtop.AgentGetAgentsParams {
1425
+ }
1426
+ interface AirtopAgentUpdateAgentParams extends Airtop.AgentUpdateAgentParams {
1427
+ }
1428
+ interface AirtopAgentDeleteAgentsParams extends Airtop.AgentDeleteAgentsParams {
1429
+ }
1430
+ interface AirtopAgentCreateInvocationParams extends Airtop.AgentCreateInvocationParams {
1431
+ }
1432
+ interface AirtopAgentGetInvocationsParams extends Airtop.AgentGetInvocationsParams {
1433
+ }
1434
+ interface AirtopAgentCancelInvocationParams extends Omit<Airtop.AgentCancelInvocationParams, "id"> {
1435
+ }
1436
+ interface AirtopAgentGetVersionDataParams extends Airtop.AgentGetCurrentAgentVersionParams {
1437
+ }
1438
+ interface AirtopAgentUpdateVersionDataParams extends Omit<Airtop.AgentUpdateAgentVersionDataParams, "id"> {
1439
+ }
1440
+ interface AirtopAgentPublishAgentParams extends Airtop.AgentPublishAgentParams {
1441
+ }
1442
+ interface AirtopCreateAgentResponse extends Airtop.CreateAgentResponse {
1443
+ }
1444
+ interface AirtopGetAgentResponse extends Airtop.GetAgentResponse {
1445
+ }
1446
+ interface AirtopGetAgentsResponse extends Airtop.GetAgentsResponse {
1447
+ }
1448
+ interface AirtopUpdateAgentResponse extends Airtop.UpdateAgentResponse {
1449
+ }
1450
+ interface AirtopDeleteAgentsResponse extends Airtop.DeleteResponse {
1451
+ }
1452
+ interface AirtopCreateAgentInvocationResponse extends Airtop.CreateAgentInvocationResponse {
1453
+ }
1454
+ interface AirtopGetAgentInvocationsResponse extends Airtop.GetAgentInvocationsResponse {
1455
+ }
1456
+ interface AirtopAgentResponse extends Airtop.GetAgentResponse {
1457
+ }
1458
+ interface AirtopCreateNewAgentDraftResponse extends Airtop.AgentCreateDraftResponse {
1459
+ }
1460
+ interface AirtopPublishNewAgentResponse extends Airtop.AgentPublishDraftResponse {
1461
+ }
1462
+ interface AirtopGetAgentVersionDataResponse extends Airtop.AgentGetVersionDataResponse {
1463
+ }
1464
+ interface AirtopUpdateVersionDataResponse extends Airtop.AgentUpdateVersionDataResponse {
1465
+ }
1466
+
1467
+ /**
1468
+ * Client for making Agent-specific requests to the Airtop API.
1469
+ */
1470
+ declare class AirtopAgentClient extends AirtopBase {
1471
+ /**
1472
+ * Creates a new instance of the Airtop SDK.
1473
+ * @param config - Configuration options for the Airtop SDK
1474
+ */
1475
+ constructor(config: AirtopConstructorConfig);
1476
+ /**
1477
+ * Creates a new agent. A new draft version is created by default.
1478
+ * @param params - Parameters for creating the agent.
1479
+ * @param requestOptions - Request options.
1480
+ * @returns The created agent data.
1481
+ */
1482
+ createAgent(params: AirtopAgentCreateAgentParams, requestOptions?: AirtopRequestOptions): Promise<AirtopCreateAgentResponse>;
1483
+ /**
1484
+ * Retrieves a specific agent by its ID.
1485
+ * @param agentId - The ID of the agent to retrieve.
1486
+ * @param requestOptions - Request options.
1487
+ * @returns The agent data.
1488
+ */
1489
+ getAgent(agentId: string, params?: AirtopAgentGetAgentParams, requestOptions?: AirtopRequestOptions): Promise<AirtopGetAgentResponse>;
1490
+ /**
1491
+ * Lists agents.
1492
+ * @param params - Optional parameters for listing agents (e.g., pagination).
1493
+ * @param requestOptions - Request options.
1494
+ * @returns A list of agents.
1495
+ */
1496
+ listAgents(params?: AirtopAgentGetAgentsParams, requestOptions?: AirtopRequestOptions): Promise<AirtopGetAgentsResponse>;
1497
+ /**
1498
+ * Creates a new draft version of an agent. If one already exists, does nothing.
1499
+ * @param agentId - The ID of the agent for which to create a new draft version.
1500
+ * @param requestOptions - Request options.
1501
+ * @returns The draft version data.
1502
+ */
1503
+ createNewAgentDraftVersion(agentId: string, requestOptions?: AirtopRequestOptions): Promise<AirtopCreateNewAgentDraftResponse>;
1504
+ /**
1505
+ * Publishes a new version of an agent from the current draft.
1506
+ * @param agentId - The ID of the agent to publish.
1507
+ * @returns The published version data
1508
+ */
1509
+ publishNewAgentVersion(agentId: string, params?: AirtopAgentPublishAgentParams, requestOptions?: AirtopRequestOptions): Promise<AirtopPublishNewAgentResponse>;
1510
+ /**
1511
+ * Retrieves the data for a specific version of an agent.
1512
+ * @param agentId - The ID of the agent.
1513
+ * @param version - The version number of the agent to retrieve.
1514
+ * @param requestOptions - Request options.
1515
+ * @returns The agent version data.
1516
+ */
1517
+ getAgentVersionData(agentId: string, version: number, requestOptions?: AirtopRequestOptions): Promise<AirtopGetAgentVersionDataResponse>;
1518
+ updateAgentVersionData(agentId: string, version: number, params: AirtopAgentUpdateVersionDataParams, requestOptions?: AirtopRequestOptions): Promise<AirtopUpdateVersionDataResponse>;
1519
+ /**
1520
+ * Retrieves the current version data of an agent. This is the version that is currently active or in draft state.
1521
+ * @param agentId - The ID of the agent.
1522
+ * @param params - Optional parameters for retrieving the version data.
1523
+ * @param requestOptions - Request options.
1524
+ * @returns The current agent version data
1525
+ */
1526
+ getCurrentAgentVersionData(agentId: string, params?: AirtopAgentGetVersionDataParams, requestOptions?: AirtopRequestOptions): Promise<_airtop_core_resources_shared_mjs.AgentGetCurrentVersionDataResponse>;
1527
+ /**
1528
+ * Updates an existing agent.
1529
+ * @param agentId - The ID of the agent to update.
1530
+ * @param params - The new data for the agent.
1531
+ * @param requestOptions - Request options.
1532
+ * @returns The updated agent data.
1533
+ */
1534
+ updateAgent(agentId: string, params: AirtopAgentUpdateAgentParams, requestOptions?: AirtopRequestOptions): Promise<AirtopUpdateAgentResponse>;
1535
+ /**
1536
+ * Deletes one or more agents.
1537
+ * @param params - Parameters for deleting agents.
1538
+ * @param requestOptions - Request options.
1539
+ * @returns A response confirming the deletion.
1540
+ */
1541
+ deleteAgents(params: AirtopAgentDeleteAgentsParams, requestOptions?: AirtopRequestOptions): Promise<AirtopDeleteAgentsResponse>;
1542
+ /**
1543
+ * Creates an invocation for an agent.
1544
+ * @param agentId - The ID of the agent for which to create an invocation.
1545
+ * @param params - Parameters for creating the agent invocation.
1546
+ * @param requestOptions - Request options.
1547
+ * @returns The created agent invocation data.
1548
+ */
1549
+ createAgentInvocation(agentId: string, params: AirtopAgentCreateInvocationParams, requestOptions?: AirtopRequestOptions): Promise<AirtopCreateAgentInvocationResponse>;
1550
+ /**
1551
+ * Lists invocations of an agent.
1552
+ * @param agentIds - The ID of the agent whose invocations to list.
1553
+ * @param params - Optional parameters for listing agent invocations.
1554
+ * @param requestOptions - Request options.
1555
+ * @returns A list of agent invocations.
1556
+ */
1557
+ listAgentInvocations(agentIds: string, // Renamed
1558
+ params?: AirtopAgentGetInvocationsParams, requestOptions?: AirtopRequestOptions): Promise<AirtopGetAgentInvocationsResponse>;
1559
+ /**
1560
+ * Cancels a specific invocation of an agent.
1561
+ * @param agentId - The ID of the agent.
1562
+ * @param invocationId - The ID of the invocation to cancel.
1563
+ * @param paramsBody - Optional body parameters for cancelling the invocation.
1564
+ * @param requestOptions - Request options.
1565
+ * @returns A promise that resolves when the operation is complete.
1566
+ */
1567
+ cancelAgentInvocation(agentId: string, invocationId: string, paramsBody?: AirtopAgentCancelInvocationParams, requestOptions?: AirtopRequestOptions): Promise<void>;
1568
+ }
1569
+
824
1570
  /**
825
1571
  * Enumeration of available plugin augmentation types.
826
1572
  * Determines which part of the SDK a plugin can extend.
@@ -989,30 +1735,4 @@ interface AirtopPluginRegistration {
989
1735
  */
990
1736
  declare function registerAirtopPlugin(plugin: AirtopPluginRegistration): void;
991
1737
 
992
- /**
993
- * Provides utility methods for creating mock instances of Airtop classes.
994
- * @hideconstructor
995
- */
996
- declare class AirtopMocks {
997
- /**
998
- * Creates an AirtopBase instance (the class used as the base for other Airtop classes) with a mock client and logger.
999
- */
1000
- static getAirtopBaseMock(config?: Partial<CommonAirtopConfig>): AirtopBase;
1001
- /**
1002
- * Creates an Airtop instance with a mock client and data.
1003
- */
1004
- static getAirtopClientMock(config?: Partial<AirtopConstructorConfig>): AirtopClient;
1005
- /**
1006
- * Creates an AirtopSession instance with a mock client and data.
1007
- */
1008
- static getAirtopSessionMock(responseData?: Partial<AirtopSessionResponse>): AirtopSession;
1009
- /**
1010
- * Creates an AirtopWindow instance with a mock client and data.
1011
- */
1012
- static getAirtopWindowMock({ sessionId, windowData, }?: {
1013
- sessionId?: string;
1014
- windowData?: AirtopWindowGetInfoResponse;
1015
- }): AirtopWindow<AirtopWindowGetInfoResponse>;
1016
- }
1017
-
1018
- export { type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopFileResponse, AirtopMocks, AirtopPluginAugmentationType, type AirtopPluginRegistration, type AirtopPluginType, type AirtopProfile, type AirtopRequestOptions, AirtopSession, AirtopSessionClient, type AirtopSessionClientPlugin, type AirtopSessionPlugin, type AirtopSessionResponse, AirtopWindow, AirtopWindowClient, type AirtopWindowClientPlugin, type AirtopWindowCreateResponse, type AirtopWindowGetInfoResponse, type AirtopWindowPlugin, AirtopWindowScreenshot, type AirtopWindowScreenshotPlugin, type AirtopWindowScreenshotResponse, type CommonAirtopConfig, type CommonResponse, type CommonWindowResponse, type CreateFileConfig, type CreateSessionConfig, type GetFilesConfig, type GetSessionsConfig, type OutputJsonSchemaConfig, type ScreenshotData, type SessionData, type SessionError, type SessionMetadata, type SessionWarning, type WindowClickConfig, type WindowCreateData, type WindowError, type WindowGetConfig, type WindowHoverConfig, type WindowInfoData, type WindowLoadUrlConfig, type WindowMetadata, type WindowMonitorConfig, type WindowPageQueryConfig, type WindowPaginatedExtractionConfig, type WindowPromptResponse, type WindowScrapeConfig, type WindowScrapeResponse, type WindowScreenshotConfig, type WindowScrollConfig, type WindowTypeConfig, type WindowWarning, registerAirtopPlugin };
1738
+ export { type AirtopAgentCancelInvocationParams, AirtopAgentClient, type AirtopAgentCreateAgentParams, type AirtopAgentCreateInvocationParams, type AirtopAgentDeleteAgentsParams, type AirtopAgentGetAgentParams, type AirtopAgentGetAgentsParams, type AirtopAgentGetInvocationsParams, type AirtopAgentGetVersionDataParams, type AirtopAgentPublishAgentParams, type AirtopAgentResponse, type AirtopAgentUpdateAgentParams, type AirtopAgentUpdateVersionDataParams, type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopCreateAgentInvocationResponse, type AirtopCreateAgentResponse, type AirtopCreateNewAgentDraftResponse, type AirtopDeleteAgentsResponse, AirtopError, AirtopFile, AirtopFileClient, type AirtopFileCreateResponse, type AirtopFileGetResponse, type AirtopFileListParams, type AirtopFileListResponse, type AirtopFileListWithInstancesResponse, type AirtopFilesResponse, type AirtopGetAgentInvocationsResponse, type AirtopGetAgentResponse, type AirtopGetAgentVersionDataResponse, type AirtopGetAgentsResponse, AirtopMocks, AirtopNode, type AirtopNodeApiResponseData, AirtopPluginAugmentationType, type AirtopPluginRegistration, type AirtopPluginType, type AirtopProfile, type AirtopPublishNewAgentResponse, type AirtopRequestOptions, AirtopSession, AirtopSessionClient, type AirtopSessionClientPlugin, type AirtopSessionPlugin, type AirtopSessionResponse, type AirtopUpdateAgentResponse, type AirtopUpdateVersionDataResponse, AirtopWindow, AirtopWindowClient, type AirtopWindowClientPlugin, type AirtopWindowCreateResponse, type AirtopWindowGetInfoResponse, type AirtopWindowPlugin, AirtopWindowScreenshot, type AirtopWindowScreenshotPlugin, type AirtopWindowScreenshotResponse, type CommonAirtopConfig, type CommonFileResponse, type CommonResponse, type CommonWindowResponse, type CreateFileConfig, type CreateSessionConfig, type ExtendedServicePromptParameters, type FileCreateData, type FileData, type FileError, type FileListData, type FileMetadata, type FileStatusEvent, type FileWarning, type GetFilesConfig, type GetSessionsConfig, type OutputJsonSchemaConfig, type ScreenshotData, type SessionData, type SessionError, type SessionMetadata, type SessionServiceResponse, type SessionWarning, type WaitForDownloadConfig, type WaitForDownloadResult, type WindowActConfig, type WindowActResponse, type WindowClickConfig, type WindowCreateData, type WindowCreateOptions, type WindowError, type WindowExtractConfig, type WindowExtractResponse, type WindowFillFormConfig, type WindowFindManyConfig, type WindowFindManyResponse, type WindowFindOneConfig, type WindowFindOneResponse, type WindowGetConfig, type WindowHoverConfig, type WindowInfoData, type WindowLlmConfig, type WindowLlmResponse, type WindowLoadUrlConfig, type WindowMetadata, type WindowMonitorConfig, type WindowNavigateConfig, WindowNavigateDirection, type WindowNavigateResponse, type WindowPageQueryConfig, type WindowPaginatedExtractionConfig, type WindowPromptResponse, type WindowScrapeConfig, type WindowScrapeResponse, type WindowScreenshotConfig, type WindowScrollConfig, type WindowTypeConfig, type WindowWaitForPageConfig, type WindowWaitForPageResponse, type WindowWarning, registerAirtopPlugin };