@airtop/sdk 1.0.0-alpha2.16 → 1.0.0-alpha2.18

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
@@ -5,13 +5,13 @@ export { AirtopJsonSchemaAdapter } from '@airtop/json-schema-adapter';
5
5
  import { ILogLayer } from 'loglayer';
6
6
  export { ILogLayer } from 'loglayer';
7
7
  import * as _airtop_core_resources_shared_js from '@airtop/core/resources/shared.js';
8
- import { Issue, SessionConfigV1, GetFileResponse, FilesResponse, ListAutomationsOutput, AutomationData, ExternalSessionWithConnectionInfo, EnvelopeDefaultMeta, AIPromptResponse as AIPromptResponse$1, WindowIDDataResponse, OperationOutcomeResponse } from '@airtop/core/resources/shared.js';
8
+ import { Issue, SessionConfigV1, GetFileResponse, FilesResponse, ListAutomationsOutput, AutomationData, ExternalSessionWithConnectionInfo, EnvelopeDefaultMeta, ExtractActionResponseEnvelope, ActActionResponseEnvelope, LlmActionResponseEnvelope, NodeHandle, WaitForPageActionResponseEnvelope, NavigateActionResponseEnvelope, FindOneActionResponseEnvelope, FindManyActionResponseEnvelope, AIPromptResponse as AIPromptResponse$1, WindowIDDataResponse, OperationOutcomeResponse } from '@airtop/core/resources/shared.js';
9
9
  export { AIResponseEnvelope, AirtopPagination, ExternalSessionAIResponseMetadata, ExternalSessionWithConnectionInfo, Issue, OperationOutcomeResponse, WindowIDDataResponse } from '@airtop/core/resources/shared.js';
10
10
  import * as _airtop_core_resources_shared_mjs from '@airtop/core/resources/shared.mjs';
11
11
  import { AutomationUpdateDescriptionParams } from '@airtop/core/resources/automations.js';
12
12
  import { SessionListParams, ProfileOutput, FileListParams, FileCreateFileParams, WindowIDData, EnvelopeDefaultMeta as EnvelopeDefaultMeta$1, Issue as Issue$1, WindowInfo, WindowGetParams, AIPromptResponse, ScrapeResponse } from '@airtop/core/resources/index.js';
13
13
  import * as _airtop_core_resources_sessions_mjs from '@airtop/core/resources/sessions.mjs';
14
- import { WindowClickParams, WindowHoverParams, WindowLoadURLParams, WindowMonitorParams, WindowScrapeParams, WindowScreenshotParams, WindowScrollParams, WindowTypeParams, WindowExtractParams, WindowActParams, WindowLlmParams, WindowFindOneParams, WindowFindManyParams, WindowWaitForPageParams, WindowNavigateParams } from '@airtop/core/resources/windows.js';
14
+ import { WindowClickParams, WindowHoverParams, WindowLoadURLParams, WindowMonitorParams, WindowScrapeParams, WindowScreenshotParams, WindowScrollParams, WindowTypeParams, WindowExtractParams, WindowActParams, WindowLlmParams, WindowFindOneParams, WindowFindManyParams, WindowWaitForPageParams, WindowNavigateParams, WindowFillFormParams } from '@airtop/core/resources/windows.js';
15
15
 
16
16
  /**
17
17
  * Shared configuration between Airtop classes.
@@ -90,7 +90,8 @@ interface CommonResponse {
90
90
  */
91
91
  declare class AirtopError extends Error {
92
92
  issues: Issue[];
93
- constructor(issues: Issue[]);
93
+ metadata?: Record<string, unknown>;
94
+ constructor(issues: Issue[], metadata?: Record<string, unknown>);
94
95
  }
95
96
 
96
97
  /**
@@ -430,7 +431,7 @@ interface WindowLoadUrlConfig extends Omit<WindowLoadURLParams, "sessionId" | "u
430
431
  * Configuration parameters for monitoring window events.
431
432
  * Excludes session ID which is provided by the parent session.
432
433
  */
433
- interface WindowMonitorConfig extends Omit<WindowMonitorParams, "sessionId"> {
434
+ interface WindowMonitorConfig extends Omit<WindowMonitorParams, "sessionId" | "condition"> {
434
435
  }
435
436
  /**
436
437
  * Configuration parameters for performing a natural language query on page content.
@@ -475,36 +476,72 @@ interface WindowScrapeResponse extends ScrapeResponse {
475
476
  */
476
477
  interface WindowExtractConfig extends Omit<WindowExtractParams, "sessionId" | "prompt" | "jobId"> {
477
478
  }
479
+ /**
480
+ * Extract window response.
481
+ */
482
+ interface WindowExtractResponse extends ExtractActionResponseEnvelope {
483
+ }
478
484
  /**
479
485
  * Configuration parameters for acting on content in a window.
480
486
  */
481
487
  interface WindowActConfig extends Omit<WindowActParams, "sessionId" | "prompt" | "jobId"> {
482
488
  }
489
+ /**
490
+ * Act window response.
491
+ */
492
+ interface WindowActResponse extends ActActionResponseEnvelope {
493
+ }
483
494
  /**
484
495
  * Configuration parameters for executing an LLM call in a window.
485
496
  */
486
- interface WindowLlmConfig extends Omit<WindowLlmParams, "sessionId" | "prompt"> {
497
+ interface WindowLlmConfig extends Omit<WindowLlmParams, "sessionId" | "jobId" | "prompt" | "includeWebContext" | "outputSchema"> {
498
+ outputSchema?: string | object;
499
+ }
500
+ /**
501
+ * LLM window response.
502
+ */
503
+ interface WindowLlmResponse extends LlmActionResponseEnvelope {
487
504
  }
488
505
  /**
489
506
  * Configuration parameters for finding one element in a window.
490
507
  */
491
508
  interface WindowFindOneConfig extends Omit<WindowFindOneParams, "sessionId" | "prompt" | "jobId"> {
492
509
  }
510
+ /**
511
+ * Find one window response.
512
+ */
513
+ interface WindowFindOneResponse extends FindOneActionResponseEnvelope {
514
+ }
493
515
  /**
494
516
  * Configuration parameters for finding multiple elements in a window.
495
517
  */
496
518
  interface WindowFindManyConfig extends Omit<WindowFindManyParams, "sessionId" | "prompt" | "jobId"> {
497
519
  }
520
+ /**
521
+ * Find many window response.
522
+ */
523
+ interface WindowFindManyResponse extends FindManyActionResponseEnvelope {
524
+ }
498
525
  /**
499
526
  * Configuration parameters for waiting for a page to load in a window.
500
527
  */
501
528
  interface WindowWaitForPageConfig extends Omit<WindowWaitForPageParams, "sessionId"> {
502
529
  }
530
+ /**
531
+ * Wait for page window response.
532
+ */
533
+ interface WindowWaitForPageResponse extends WaitForPageActionResponseEnvelope {
534
+ }
503
535
  /**
504
536
  * Configuration parameters for navigating browser history in a window.
505
537
  */
506
538
  interface WindowNavigateConfig extends Omit<WindowNavigateParams, "sessionId"> {
507
539
  }
540
+ /**
541
+ * Navigate window response.
542
+ */
543
+ interface WindowNavigateResponse extends NavigateActionResponseEnvelope {
544
+ }
508
545
  /**
509
546
  * The direction to navigate in browser history.
510
547
  */
@@ -515,9 +552,12 @@ declare enum WindowNavigateDirection {
515
552
  /**
516
553
  * Data object representing a node returned from the Airtop API.
517
554
  */
518
- interface AirtopNodeApiResponseData {
519
- id: string;
520
- xpath: string;
555
+ interface AirtopNodeApiResponseData extends NodeHandle {
556
+ }
557
+ /**
558
+ * Configuration parameters for filling a form in a window.
559
+ */
560
+ interface WindowFillFormConfig extends Omit<WindowFillFormParams, "sessionId" | "parameters"> {
521
561
  }
522
562
 
523
563
  /**
@@ -548,21 +588,21 @@ declare class AirtopNode {
548
588
  * @param config - The configuration to use for the extraction
549
589
  * @param requestOptions - The request options to use for the extraction
550
590
  */
551
- extract(prompt: string, config?: WindowExtractConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
591
+ extract(prompt: string, config?: WindowExtractConfig, requestOptions?: AirtopRequestOptions): Promise<WindowExtractResponse>;
552
592
  /**
553
593
  * Act on the node
554
594
  * @param prompt - The prompt to use for the action
555
595
  * @param config - The configuration to use for the action
556
596
  * @param requestOptions - The request options to use for the action
557
597
  */
558
- act(prompt: string, config?: WindowActConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
598
+ act(prompt: string, config?: WindowActConfig, requestOptions?: AirtopRequestOptions): Promise<WindowActResponse>;
559
599
  /**
560
600
  * Execute an LLM call on the node
561
601
  * @param prompt - The prompt to use for the LLM call
562
602
  * @param config - The configuration to use for the LLM call
563
603
  * @param requestOptions - The request options to use for the LLM call
564
604
  */
565
- llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
605
+ llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowLlmResponse>;
566
606
  /**
567
607
  * Find one element in the node
568
608
  * @param prompt - The prompt to use for the find one
@@ -754,18 +794,19 @@ declare class AirtopWindowClient extends AirtopBase {
754
794
  * @param requestOptions - Request options
755
795
  * @returns Promise resolving when the text has been typed
756
796
  */
757
- type(text: string, config?: WindowTypeConfig, requestOptions?: AirtopRequestOptions): Promise<_airtop_core_resources_shared_mjs.AIPromptResponse>;
758
- extract(prompt: string, config?: WindowExtractConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
759
- act(prompt: string, config?: WindowActConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
760
- llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
797
+ type(text: string, config?: WindowTypeConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
798
+ extract(prompt: string, config?: WindowExtractConfig, requestOptions?: AirtopRequestOptions): Promise<WindowExtractResponse>;
799
+ act(prompt: string, config?: WindowActConfig, requestOptions?: AirtopRequestOptions): Promise<WindowActResponse>;
800
+ llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowLlmResponse>;
761
801
  private findOnePrivate;
762
802
  findOne(prompt: string, config?: Omit<WindowFindOneConfig, "optional">, requestOptions?: AirtopRequestOptions): Promise<AirtopNode>;
763
803
  findOneOptional(prompt: string, config?: Omit<WindowFindOneConfig, "optional">, requestOptions?: AirtopRequestOptions): Promise<AirtopNode | null>;
764
804
  private findManyPrivate;
765
805
  findMany(prompt: string, config?: Omit<WindowFindManyConfig, "optional">, requestOptions?: AirtopRequestOptions): Promise<AirtopNode[]>;
766
806
  findManyOptional(prompt: string, config?: Omit<WindowFindManyConfig, "optional">, requestOptions?: AirtopRequestOptions): Promise<AirtopNode[]>;
767
- waitForPage(config?: WindowWaitForPageConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
768
- navigate(direction: WindowNavigateDirection, config?: WindowNavigateConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
807
+ waitForPage(config?: WindowWaitForPageConfig, requestOptions?: AirtopRequestOptions): Promise<WindowWaitForPageResponse>;
808
+ navigate(direction: WindowNavigateDirection, config?: WindowNavigateConfig, requestOptions?: AirtopRequestOptions): Promise<WindowNavigateResponse>;
809
+ fillForm(formData: string | object, config?: WindowFillFormConfig, requestOptions?: AirtopRequestOptions): Promise<AIPromptResponse>;
769
810
  }
770
811
 
771
812
  /**
@@ -827,6 +868,7 @@ declare class AirtopSessionClient extends AirtopBase {
827
868
  * Returns the browser session ID.
828
869
  */
829
870
  getSessionId(): string;
871
+ listWindows(requestOptions?: AirtopRequestOptions): Promise<_airtop_core_resources_shared_mjs.WindowsResponse>;
830
872
  /**
831
873
  * Gets the state of the session using the attached session id.
832
874
  * @param requestOptions - Request options
@@ -869,6 +911,14 @@ declare class AirtopSessionClient extends AirtopBase {
869
911
  * @param requestOptions - Request options
870
912
  */
871
913
  createFile(fileName: string, config?: CreateFileConfig, requestOptions?: AirtopRequestOptions): _airtop_core.APIPromise<_airtop_core_resources_shared_mjs.CreateFileResponse>;
914
+ llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowLlmResponse>;
915
+ /**
916
+ * Calls the service endpoint.
917
+ * @param prompt - The prompt to send to the service, describing the actions to take
918
+ * @param service - The service to call, if not provided, the service will be inferred from the prompt
919
+ * @param requestOptions - Request options
920
+ */
921
+ service(prompt: string, service?: string, requestOptions?: AirtopRequestOptions): Promise<unknown>;
872
922
  }
873
923
 
874
924
  /**
@@ -1352,4 +1402,4 @@ declare class AirtopMocks {
1352
1402
  }): AirtopWindow<AirtopWindowGetInfoResponse>;
1353
1403
  }
1354
1404
 
1355
- export { type AirtopAgentCancelInvocationParams, AirtopAgentClient, type AirtopAgentCreateAgentParams, type AirtopAgentCreateInvocationParams, type AirtopAgentCreateVersionParams, type AirtopAgentDeleteAgentsParams, type AirtopAgentDuplicateAgentParams, type AirtopAgentGetAgentsParams, type AirtopAgentGetInvocationsParams, type AirtopAgentGetVersionsParams, type AirtopAgentResponse, type AirtopAgentUpdateAgentParams, type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopCreateAgentInvocationResponse, type AirtopCreateAgentResponse, type AirtopCreateAgentVersionResponse, type AirtopDeleteAgentsResponse, type AirtopDuplicateAgentResponse, AirtopError, type AirtopFileListParams, type AirtopFileResponse, type AirtopFilesResponse, type AirtopGetAgentInvocationsResponse, type AirtopGetAgentResponse, type AirtopGetAgentVersionsResponse, type AirtopGetAgentsResponse, AirtopMocks, AirtopNode, type AirtopNodeApiResponseData, AirtopPluginAugmentationType, type AirtopPluginRegistration, type AirtopPluginType, type AirtopProfile, type AirtopRequestOptions, AirtopSession, AirtopSessionClient, type AirtopSessionClientPlugin, type AirtopSessionPlugin, type AirtopSessionResponse, type AirtopUpdateAgentResponse, 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 WindowActConfig, type WindowClickConfig, type WindowCreateData, type WindowError, type WindowExtractConfig, type WindowFindManyConfig, type WindowFindOneConfig, type WindowGetConfig, type WindowHoverConfig, type WindowInfoData, type WindowLlmConfig, type WindowLoadUrlConfig, type WindowMetadata, type WindowMonitorConfig, type WindowNavigateConfig, WindowNavigateDirection, type WindowPageQueryConfig, type WindowPaginatedExtractionConfig, type WindowPromptResponse, type WindowScrapeConfig, type WindowScrapeResponse, type WindowScreenshotConfig, type WindowScrollConfig, type WindowTypeConfig, type WindowWaitForPageConfig, type WindowWarning, registerAirtopPlugin };
1405
+ export { type AirtopAgentCancelInvocationParams, AirtopAgentClient, type AirtopAgentCreateAgentParams, type AirtopAgentCreateInvocationParams, type AirtopAgentCreateVersionParams, type AirtopAgentDeleteAgentsParams, type AirtopAgentDuplicateAgentParams, type AirtopAgentGetAgentsParams, type AirtopAgentGetInvocationsParams, type AirtopAgentGetVersionsParams, type AirtopAgentResponse, type AirtopAgentUpdateAgentParams, type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopCreateAgentInvocationResponse, type AirtopCreateAgentResponse, type AirtopCreateAgentVersionResponse, type AirtopDeleteAgentsResponse, type AirtopDuplicateAgentResponse, AirtopError, type AirtopFileListParams, type AirtopFileResponse, type AirtopFilesResponse, type AirtopGetAgentInvocationsResponse, type AirtopGetAgentResponse, type AirtopGetAgentVersionsResponse, type AirtopGetAgentsResponse, AirtopMocks, AirtopNode, type AirtopNodeApiResponseData, AirtopPluginAugmentationType, type AirtopPluginRegistration, type AirtopPluginType, type AirtopProfile, type AirtopRequestOptions, AirtopSession, AirtopSessionClient, type AirtopSessionClientPlugin, type AirtopSessionPlugin, type AirtopSessionResponse, type AirtopUpdateAgentResponse, 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 WindowActConfig, type WindowActResponse, type WindowClickConfig, type WindowCreateData, 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 };
package/dist/index.d.ts CHANGED
@@ -5,13 +5,13 @@ export { AirtopJsonSchemaAdapter } from '@airtop/json-schema-adapter';
5
5
  import { ILogLayer } from 'loglayer';
6
6
  export { ILogLayer } from 'loglayer';
7
7
  import * as _airtop_core_resources_shared_js from '@airtop/core/resources/shared.js';
8
- import { Issue, SessionConfigV1, GetFileResponse, FilesResponse, ListAutomationsOutput, AutomationData, ExternalSessionWithConnectionInfo, EnvelopeDefaultMeta, AIPromptResponse as AIPromptResponse$1, WindowIDDataResponse, OperationOutcomeResponse } from '@airtop/core/resources/shared.js';
8
+ import { Issue, SessionConfigV1, GetFileResponse, FilesResponse, ListAutomationsOutput, AutomationData, ExternalSessionWithConnectionInfo, EnvelopeDefaultMeta, ExtractActionResponseEnvelope, ActActionResponseEnvelope, LlmActionResponseEnvelope, NodeHandle, WaitForPageActionResponseEnvelope, NavigateActionResponseEnvelope, FindOneActionResponseEnvelope, FindManyActionResponseEnvelope, AIPromptResponse as AIPromptResponse$1, WindowIDDataResponse, OperationOutcomeResponse } from '@airtop/core/resources/shared.js';
9
9
  export { AIResponseEnvelope, AirtopPagination, ExternalSessionAIResponseMetadata, ExternalSessionWithConnectionInfo, Issue, OperationOutcomeResponse, WindowIDDataResponse } from '@airtop/core/resources/shared.js';
10
10
  import * as _airtop_core_resources_shared_mjs from '@airtop/core/resources/shared.mjs';
11
11
  import { AutomationUpdateDescriptionParams } from '@airtop/core/resources/automations.js';
12
12
  import { SessionListParams, ProfileOutput, FileListParams, FileCreateFileParams, WindowIDData, EnvelopeDefaultMeta as EnvelopeDefaultMeta$1, Issue as Issue$1, WindowInfo, WindowGetParams, AIPromptResponse, ScrapeResponse } from '@airtop/core/resources/index.js';
13
13
  import * as _airtop_core_resources_sessions_mjs from '@airtop/core/resources/sessions.mjs';
14
- import { WindowClickParams, WindowHoverParams, WindowLoadURLParams, WindowMonitorParams, WindowScrapeParams, WindowScreenshotParams, WindowScrollParams, WindowTypeParams, WindowExtractParams, WindowActParams, WindowLlmParams, WindowFindOneParams, WindowFindManyParams, WindowWaitForPageParams, WindowNavigateParams } from '@airtop/core/resources/windows.js';
14
+ import { WindowClickParams, WindowHoverParams, WindowLoadURLParams, WindowMonitorParams, WindowScrapeParams, WindowScreenshotParams, WindowScrollParams, WindowTypeParams, WindowExtractParams, WindowActParams, WindowLlmParams, WindowFindOneParams, WindowFindManyParams, WindowWaitForPageParams, WindowNavigateParams, WindowFillFormParams } from '@airtop/core/resources/windows.js';
15
15
 
16
16
  /**
17
17
  * Shared configuration between Airtop classes.
@@ -90,7 +90,8 @@ interface CommonResponse {
90
90
  */
91
91
  declare class AirtopError extends Error {
92
92
  issues: Issue[];
93
- constructor(issues: Issue[]);
93
+ metadata?: Record<string, unknown>;
94
+ constructor(issues: Issue[], metadata?: Record<string, unknown>);
94
95
  }
95
96
 
96
97
  /**
@@ -430,7 +431,7 @@ interface WindowLoadUrlConfig extends Omit<WindowLoadURLParams, "sessionId" | "u
430
431
  * Configuration parameters for monitoring window events.
431
432
  * Excludes session ID which is provided by the parent session.
432
433
  */
433
- interface WindowMonitorConfig extends Omit<WindowMonitorParams, "sessionId"> {
434
+ interface WindowMonitorConfig extends Omit<WindowMonitorParams, "sessionId" | "condition"> {
434
435
  }
435
436
  /**
436
437
  * Configuration parameters for performing a natural language query on page content.
@@ -475,36 +476,72 @@ interface WindowScrapeResponse extends ScrapeResponse {
475
476
  */
476
477
  interface WindowExtractConfig extends Omit<WindowExtractParams, "sessionId" | "prompt" | "jobId"> {
477
478
  }
479
+ /**
480
+ * Extract window response.
481
+ */
482
+ interface WindowExtractResponse extends ExtractActionResponseEnvelope {
483
+ }
478
484
  /**
479
485
  * Configuration parameters for acting on content in a window.
480
486
  */
481
487
  interface WindowActConfig extends Omit<WindowActParams, "sessionId" | "prompt" | "jobId"> {
482
488
  }
489
+ /**
490
+ * Act window response.
491
+ */
492
+ interface WindowActResponse extends ActActionResponseEnvelope {
493
+ }
483
494
  /**
484
495
  * Configuration parameters for executing an LLM call in a window.
485
496
  */
486
- interface WindowLlmConfig extends Omit<WindowLlmParams, "sessionId" | "prompt"> {
497
+ interface WindowLlmConfig extends Omit<WindowLlmParams, "sessionId" | "jobId" | "prompt" | "includeWebContext" | "outputSchema"> {
498
+ outputSchema?: string | object;
499
+ }
500
+ /**
501
+ * LLM window response.
502
+ */
503
+ interface WindowLlmResponse extends LlmActionResponseEnvelope {
487
504
  }
488
505
  /**
489
506
  * Configuration parameters for finding one element in a window.
490
507
  */
491
508
  interface WindowFindOneConfig extends Omit<WindowFindOneParams, "sessionId" | "prompt" | "jobId"> {
492
509
  }
510
+ /**
511
+ * Find one window response.
512
+ */
513
+ interface WindowFindOneResponse extends FindOneActionResponseEnvelope {
514
+ }
493
515
  /**
494
516
  * Configuration parameters for finding multiple elements in a window.
495
517
  */
496
518
  interface WindowFindManyConfig extends Omit<WindowFindManyParams, "sessionId" | "prompt" | "jobId"> {
497
519
  }
520
+ /**
521
+ * Find many window response.
522
+ */
523
+ interface WindowFindManyResponse extends FindManyActionResponseEnvelope {
524
+ }
498
525
  /**
499
526
  * Configuration parameters for waiting for a page to load in a window.
500
527
  */
501
528
  interface WindowWaitForPageConfig extends Omit<WindowWaitForPageParams, "sessionId"> {
502
529
  }
530
+ /**
531
+ * Wait for page window response.
532
+ */
533
+ interface WindowWaitForPageResponse extends WaitForPageActionResponseEnvelope {
534
+ }
503
535
  /**
504
536
  * Configuration parameters for navigating browser history in a window.
505
537
  */
506
538
  interface WindowNavigateConfig extends Omit<WindowNavigateParams, "sessionId"> {
507
539
  }
540
+ /**
541
+ * Navigate window response.
542
+ */
543
+ interface WindowNavigateResponse extends NavigateActionResponseEnvelope {
544
+ }
508
545
  /**
509
546
  * The direction to navigate in browser history.
510
547
  */
@@ -515,9 +552,12 @@ declare enum WindowNavigateDirection {
515
552
  /**
516
553
  * Data object representing a node returned from the Airtop API.
517
554
  */
518
- interface AirtopNodeApiResponseData {
519
- id: string;
520
- xpath: string;
555
+ interface AirtopNodeApiResponseData extends NodeHandle {
556
+ }
557
+ /**
558
+ * Configuration parameters for filling a form in a window.
559
+ */
560
+ interface WindowFillFormConfig extends Omit<WindowFillFormParams, "sessionId" | "parameters"> {
521
561
  }
522
562
 
523
563
  /**
@@ -548,21 +588,21 @@ declare class AirtopNode {
548
588
  * @param config - The configuration to use for the extraction
549
589
  * @param requestOptions - The request options to use for the extraction
550
590
  */
551
- extract(prompt: string, config?: WindowExtractConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
591
+ extract(prompt: string, config?: WindowExtractConfig, requestOptions?: AirtopRequestOptions): Promise<WindowExtractResponse>;
552
592
  /**
553
593
  * Act on the node
554
594
  * @param prompt - The prompt to use for the action
555
595
  * @param config - The configuration to use for the action
556
596
  * @param requestOptions - The request options to use for the action
557
597
  */
558
- act(prompt: string, config?: WindowActConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
598
+ act(prompt: string, config?: WindowActConfig, requestOptions?: AirtopRequestOptions): Promise<WindowActResponse>;
559
599
  /**
560
600
  * Execute an LLM call on the node
561
601
  * @param prompt - The prompt to use for the LLM call
562
602
  * @param config - The configuration to use for the LLM call
563
603
  * @param requestOptions - The request options to use for the LLM call
564
604
  */
565
- llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
605
+ llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowLlmResponse>;
566
606
  /**
567
607
  * Find one element in the node
568
608
  * @param prompt - The prompt to use for the find one
@@ -754,18 +794,19 @@ declare class AirtopWindowClient extends AirtopBase {
754
794
  * @param requestOptions - Request options
755
795
  * @returns Promise resolving when the text has been typed
756
796
  */
757
- type(text: string, config?: WindowTypeConfig, requestOptions?: AirtopRequestOptions): Promise<_airtop_core_resources_shared_mjs.AIPromptResponse>;
758
- extract(prompt: string, config?: WindowExtractConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
759
- act(prompt: string, config?: WindowActConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
760
- llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
797
+ type(text: string, config?: WindowTypeConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
798
+ extract(prompt: string, config?: WindowExtractConfig, requestOptions?: AirtopRequestOptions): Promise<WindowExtractResponse>;
799
+ act(prompt: string, config?: WindowActConfig, requestOptions?: AirtopRequestOptions): Promise<WindowActResponse>;
800
+ llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowLlmResponse>;
761
801
  private findOnePrivate;
762
802
  findOne(prompt: string, config?: Omit<WindowFindOneConfig, "optional">, requestOptions?: AirtopRequestOptions): Promise<AirtopNode>;
763
803
  findOneOptional(prompt: string, config?: Omit<WindowFindOneConfig, "optional">, requestOptions?: AirtopRequestOptions): Promise<AirtopNode | null>;
764
804
  private findManyPrivate;
765
805
  findMany(prompt: string, config?: Omit<WindowFindManyConfig, "optional">, requestOptions?: AirtopRequestOptions): Promise<AirtopNode[]>;
766
806
  findManyOptional(prompt: string, config?: Omit<WindowFindManyConfig, "optional">, requestOptions?: AirtopRequestOptions): Promise<AirtopNode[]>;
767
- waitForPage(config?: WindowWaitForPageConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
768
- navigate(direction: WindowNavigateDirection, config?: WindowNavigateConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
807
+ waitForPage(config?: WindowWaitForPageConfig, requestOptions?: AirtopRequestOptions): Promise<WindowWaitForPageResponse>;
808
+ navigate(direction: WindowNavigateDirection, config?: WindowNavigateConfig, requestOptions?: AirtopRequestOptions): Promise<WindowNavigateResponse>;
809
+ fillForm(formData: string | object, config?: WindowFillFormConfig, requestOptions?: AirtopRequestOptions): Promise<AIPromptResponse>;
769
810
  }
770
811
 
771
812
  /**
@@ -827,6 +868,7 @@ declare class AirtopSessionClient extends AirtopBase {
827
868
  * Returns the browser session ID.
828
869
  */
829
870
  getSessionId(): string;
871
+ listWindows(requestOptions?: AirtopRequestOptions): Promise<_airtop_core_resources_shared_mjs.WindowsResponse>;
830
872
  /**
831
873
  * Gets the state of the session using the attached session id.
832
874
  * @param requestOptions - Request options
@@ -869,6 +911,14 @@ declare class AirtopSessionClient extends AirtopBase {
869
911
  * @param requestOptions - Request options
870
912
  */
871
913
  createFile(fileName: string, config?: CreateFileConfig, requestOptions?: AirtopRequestOptions): _airtop_core.APIPromise<_airtop_core_resources_shared_mjs.CreateFileResponse>;
914
+ llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowLlmResponse>;
915
+ /**
916
+ * Calls the service endpoint.
917
+ * @param prompt - The prompt to send to the service, describing the actions to take
918
+ * @param service - The service to call, if not provided, the service will be inferred from the prompt
919
+ * @param requestOptions - Request options
920
+ */
921
+ service(prompt: string, service?: string, requestOptions?: AirtopRequestOptions): Promise<unknown>;
872
922
  }
873
923
 
874
924
  /**
@@ -1352,4 +1402,4 @@ declare class AirtopMocks {
1352
1402
  }): AirtopWindow<AirtopWindowGetInfoResponse>;
1353
1403
  }
1354
1404
 
1355
- export { type AirtopAgentCancelInvocationParams, AirtopAgentClient, type AirtopAgentCreateAgentParams, type AirtopAgentCreateInvocationParams, type AirtopAgentCreateVersionParams, type AirtopAgentDeleteAgentsParams, type AirtopAgentDuplicateAgentParams, type AirtopAgentGetAgentsParams, type AirtopAgentGetInvocationsParams, type AirtopAgentGetVersionsParams, type AirtopAgentResponse, type AirtopAgentUpdateAgentParams, type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopCreateAgentInvocationResponse, type AirtopCreateAgentResponse, type AirtopCreateAgentVersionResponse, type AirtopDeleteAgentsResponse, type AirtopDuplicateAgentResponse, AirtopError, type AirtopFileListParams, type AirtopFileResponse, type AirtopFilesResponse, type AirtopGetAgentInvocationsResponse, type AirtopGetAgentResponse, type AirtopGetAgentVersionsResponse, type AirtopGetAgentsResponse, AirtopMocks, AirtopNode, type AirtopNodeApiResponseData, AirtopPluginAugmentationType, type AirtopPluginRegistration, type AirtopPluginType, type AirtopProfile, type AirtopRequestOptions, AirtopSession, AirtopSessionClient, type AirtopSessionClientPlugin, type AirtopSessionPlugin, type AirtopSessionResponse, type AirtopUpdateAgentResponse, 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 WindowActConfig, type WindowClickConfig, type WindowCreateData, type WindowError, type WindowExtractConfig, type WindowFindManyConfig, type WindowFindOneConfig, type WindowGetConfig, type WindowHoverConfig, type WindowInfoData, type WindowLlmConfig, type WindowLoadUrlConfig, type WindowMetadata, type WindowMonitorConfig, type WindowNavigateConfig, WindowNavigateDirection, type WindowPageQueryConfig, type WindowPaginatedExtractionConfig, type WindowPromptResponse, type WindowScrapeConfig, type WindowScrapeResponse, type WindowScreenshotConfig, type WindowScrollConfig, type WindowTypeConfig, type WindowWaitForPageConfig, type WindowWarning, registerAirtopPlugin };
1405
+ export { type AirtopAgentCancelInvocationParams, AirtopAgentClient, type AirtopAgentCreateAgentParams, type AirtopAgentCreateInvocationParams, type AirtopAgentCreateVersionParams, type AirtopAgentDeleteAgentsParams, type AirtopAgentDuplicateAgentParams, type AirtopAgentGetAgentsParams, type AirtopAgentGetInvocationsParams, type AirtopAgentGetVersionsParams, type AirtopAgentResponse, type AirtopAgentUpdateAgentParams, type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopCreateAgentInvocationResponse, type AirtopCreateAgentResponse, type AirtopCreateAgentVersionResponse, type AirtopDeleteAgentsResponse, type AirtopDuplicateAgentResponse, AirtopError, type AirtopFileListParams, type AirtopFileResponse, type AirtopFilesResponse, type AirtopGetAgentInvocationsResponse, type AirtopGetAgentResponse, type AirtopGetAgentVersionsResponse, type AirtopGetAgentsResponse, AirtopMocks, AirtopNode, type AirtopNodeApiResponseData, AirtopPluginAugmentationType, type AirtopPluginRegistration, type AirtopPluginType, type AirtopProfile, type AirtopRequestOptions, AirtopSession, AirtopSessionClient, type AirtopSessionClientPlugin, type AirtopSessionPlugin, type AirtopSessionResponse, type AirtopUpdateAgentResponse, 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 WindowActConfig, type WindowActResponse, type WindowClickConfig, type WindowCreateData, 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 };