@airtop/sdk 1.0.0-alpha2.1 → 1.0.0-alpha2.11

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
@@ -6,12 +6,12 @@ import { ILogLayer } from 'loglayer';
6
6
  export { ILogLayer } from 'loglayer';
7
7
  import * as _airtop_core_resources_shared_mjs from '@airtop/core/resources/shared.mjs';
8
8
  import { AutomationUpdateDescriptionParams } from '@airtop/core/resources/automations.js';
9
- import { SessionListParams, ProfileOutput, FileListParams, FilesResponse, FileCreateFileParams, WindowIDData, EnvelopeDefaultMeta as EnvelopeDefaultMeta$1, Issue as Issue$1, WindowInfo, WindowGetParams, AIPromptResponse, ScrapeResponse } from '@airtop/core/resources/index.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
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';
11
+ import { SessionConfigV1, GetFileResponse, FilesResponse, ListAutomationsOutput, AutomationData, ExternalSessionWithConnectionInfo, EnvelopeDefaultMeta, Issue, AIPromptResponse as AIPromptResponse$1, WindowIDDataResponse, OperationOutcomeResponse } from '@airtop/core/resources/shared.js';
12
12
  export { AIResponseEnvelope, AirtopPagination, ExternalSessionAIResponseMetadata, ExternalSessionWithConnectionInfo, Issue, OperationOutcomeResponse, WindowIDDataResponse } from '@airtop/core/resources/shared.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 } from '@airtop/core/resources/windows.js';
14
+ import { WindowClickParams, WindowHoverParams, WindowLoadURLParams, WindowMonitorParams, WindowScrapeParams, WindowScreenshotParams, WindowScrollParams, WindowTypeParams, WindowExtractParams, WindowActParams, WindowLlmParams, WindowFindOneParams, WindowFindManyParams, WindowWaitForPageParams } from '@airtop/core/resources/windows.js';
15
15
 
16
16
  /**
17
17
  * Shared configuration between Airtop classes.
@@ -36,6 +36,10 @@ interface CommonAirtopConfig {
36
36
  * Used for customizing output schema handling.
37
37
  */
38
38
  outputSchemaAdapter?: AirtopJsonSchemaAdapter;
39
+ /**
40
+ * The automation job ID to use for the request.
41
+ */
42
+ jobId?: string;
39
43
  }
40
44
  /**
41
45
  * Configuration for defining the JSON schema output.
@@ -97,11 +101,33 @@ declare class AirtopBase {
97
101
  * @internal
98
102
  **/
99
103
  protected outputJsonAdapter: AirtopJsonSchemaAdapter;
104
+ /**
105
+ * The job id for the ongoing automation
106
+ * @internal
107
+ */
108
+ protected jobId?: string;
109
+ /**
110
+ * Instance for sending agent events
111
+ * @internal
112
+ */
113
+ protected agentEventPublisher?: ILogLayer;
100
114
  /**
101
115
  * Creates a new instance of AirtopBase
102
116
  * @param config - Configuration options for the SDK
103
117
  */
104
118
  constructor(config: CommonAirtopConfig);
119
+ /**
120
+ * Sets the publisher for sending agent events. Internal use only.
121
+ * @internal
122
+ */
123
+ _setAgentEventPublisher(logger: ILogLayer): void;
124
+ /**
125
+ * Sends a payload to the agent with the specified event name.
126
+ * @param eventName The name of the event
127
+ * @param payload The payload to send to the agent
128
+ * @internal
129
+ */
130
+ protected _sendAgentPayload(eventName: string, payload: any): void;
105
131
  /**
106
132
  * Returns the API key used by the SDK
107
133
  * @returns API key string
@@ -180,6 +206,10 @@ interface AirtopConstructorConfig {
180
206
  * Used to customize how response data is structured.
181
207
  */
182
208
  outputSchemaAdapter?: AirtopJsonSchemaAdapter;
209
+ /**
210
+ * The job ID to use for the ongoing automation.
211
+ */
212
+ jobId?: string;
183
213
  }
184
214
  /**
185
215
  * Configuration options for creating a new session.
@@ -206,8 +236,6 @@ interface GetFilesConfig extends Omit<FileListParams, "sessionIds"> {
206
236
  }
207
237
  interface AirtopFileResponse extends GetFileResponse {
208
238
  }
209
- interface AirtopFilesListResponse extends FilesResponse {
210
- }
211
239
  interface AirtopAutomationUpdateDescriptionConfig extends AutomationUpdateDescriptionParams {
212
240
  }
213
241
  interface AirtopAutomationData extends AutomationData {
@@ -216,6 +244,10 @@ interface AirtopAutomationListResponse extends ListAutomationsOutput {
216
244
  }
217
245
  interface AirtopProfile extends ProfileOutput {
218
246
  }
247
+ interface AirtopFileListParams extends FileListParams {
248
+ }
249
+ interface AirtopFilesResponse extends FilesResponse {
250
+ }
219
251
 
220
252
  /**
221
253
  * The session data containing connection and state information.
@@ -420,6 +452,102 @@ interface WindowPromptResponse extends AIPromptResponse {
420
452
  */
421
453
  interface WindowScrapeResponse extends ScrapeResponse {
422
454
  }
455
+ /**
456
+ * Configuration parameters for extracting content from a window.
457
+ */
458
+ interface WindowExtractConfig extends Omit<WindowExtractParams, "sessionId" | "prompt" | "jobId"> {
459
+ }
460
+ /**
461
+ * Configuration parameters for acting on content in a window.
462
+ */
463
+ interface WindowActConfig extends Omit<WindowActParams, "sessionId" | "prompt" | "jobId"> {
464
+ }
465
+ /**
466
+ * Configuration parameters for executing an LLM call in a window.
467
+ */
468
+ interface WindowLlmConfig extends Omit<WindowLlmParams, "sessionId" | "prompt"> {
469
+ }
470
+ /**
471
+ * Configuration parameters for finding one element in a window.
472
+ */
473
+ interface WindowFindOneConfig extends Omit<WindowFindOneParams, "sessionId" | "prompt" | "jobId"> {
474
+ }
475
+ /**
476
+ * Configuration parameters for finding multiple elements in a window.
477
+ */
478
+ interface WindowFindManyConfig extends Omit<WindowFindManyParams, "sessionId" | "prompt" | "jobId"> {
479
+ }
480
+ /**
481
+ * Configuration parameters for waiting for a page to load in a window.
482
+ */
483
+ interface WindowWaitForPageConfig extends Omit<WindowWaitForPageParams, "sessionId"> {
484
+ }
485
+ /**
486
+ * Data object representing a node returned from the Airtop API.
487
+ */
488
+ interface AirtopNodeApiResponseData {
489
+ id: string;
490
+ xpath: string;
491
+ }
492
+
493
+ /**
494
+ * Represents a node in the DOM
495
+ */
496
+ declare class AirtopNode {
497
+ /**
498
+ * The window client
499
+ */
500
+ protected windowClient: AirtopWindowClient;
501
+ /**
502
+ * The node handle id to use for all requests
503
+ */
504
+ nodeHandleId: string;
505
+ /**
506
+ * The xpath selector of the node
507
+ */
508
+ selector: string;
509
+ /**
510
+ * Constructor
511
+ * @param client - The window client
512
+ * @param nodeData - The node data to use for all requests
513
+ */
514
+ constructor(client: AirtopWindowClient, nodeData: AirtopNodeApiResponseData);
515
+ /**
516
+ * Extract content from the node
517
+ * @param prompt - The prompt to use for the extraction
518
+ * @param config - The configuration to use for the extraction
519
+ * @param requestOptions - The request options to use for the extraction
520
+ */
521
+ extract(prompt: string, config?: WindowExtractConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
522
+ /**
523
+ * Act on the node
524
+ * @param prompt - The prompt to use for the action
525
+ * @param config - The configuration to use for the action
526
+ * @param requestOptions - The request options to use for the action
527
+ */
528
+ act(prompt: string, config?: WindowActConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
529
+ /**
530
+ * Execute an LLM call on the node
531
+ * @param prompt - The prompt to use for the LLM call
532
+ * @param config - The configuration to use for the LLM call
533
+ * @param requestOptions - The request options to use for the LLM call
534
+ */
535
+ llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
536
+ /**
537
+ * Find one element in the node
538
+ * @param prompt - The prompt to use for the find one
539
+ * @param config - The configuration to use for the find one
540
+ * @param requestOptions - The request options to use for the find one
541
+ */
542
+ findOne(prompt: string, config?: WindowFindOneConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode>;
543
+ /**
544
+ * Find many elements in the node
545
+ * @param prompt - The prompt to use for the find many
546
+ * @param config - The configuration to use for the find many
547
+ * @param requestOptions - The request options to use for the find many
548
+ */
549
+ findMany(prompt: string, config?: WindowFindManyConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode[]>;
550
+ }
423
551
 
424
552
  /**
425
553
  * Response object for a screenshot operation.
@@ -465,7 +593,7 @@ declare class AirtopWindowScreenshot {
465
593
  };
466
594
  }
467
595
 
468
- /**
596
+ /**, waitForRequestCompletion
469
597
  * Client for making window-specific requests to the Airtop API.
470
598
  */
471
599
  declare class AirtopWindowClient extends AirtopBase {
@@ -583,6 +711,12 @@ declare class AirtopWindowClient extends AirtopBase {
583
711
  * @returns Promise resolving when the text has been typed
584
712
  */
585
713
  type(text: string, config?: WindowTypeConfig, requestOptions?: AirtopRequestOptions): Promise<_airtop_core_resources_shared_mjs.AIPromptResponse>;
714
+ extract(prompt: string, config?: WindowExtractConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
715
+ act(prompt: string, config?: WindowActConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
716
+ llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
717
+ findOne(prompt: string, config?: WindowFindOneConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode>;
718
+ findMany(prompt: string, config?: WindowFindManyConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode[]>;
719
+ waitForPage(config?: WindowWaitForPageConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
586
720
  }
587
721
 
588
722
  /**
@@ -798,20 +932,18 @@ declare class AirtopClient extends AirtopBase {
798
932
  * @param requestOptions
799
933
  */
800
934
  getFile(fileId: string, requestOptions?: AirtopRequestOptions): Promise<AirtopFileResponse>;
801
- /**
802
- * Lists files filtered by session IDs.
803
- * @param sessionIds - Array of session IDs to retrieve files for
804
- * @param config - Configuration options for the request
805
- * @param requestOptions - Request options
806
- * @returns Object containing pagination info and array of AirtopSession instances
807
- */
808
- listFiles(sessionIds: string[], config?: GetFilesConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopFilesListResponse>;
809
935
  /**
810
936
  * Removes a file by ID.
811
937
  * @param fileId - ID of the file to remove
812
938
  * @param requestOptions - Request options
813
939
  */
814
940
  removeFile(fileId: string, requestOptions?: AirtopRequestOptions): Promise<void>;
941
+ /**
942
+ * List files
943
+ * @param query
944
+ * @param requestOptions
945
+ */
946
+ listFiles(query: AirtopFileListParams, requestOptions?: AirtopRequestOptions): Promise<AirtopFilesResponse>;
815
947
  /**
816
948
  * List all automations
817
949
  * @param requestOptions - Request options
@@ -1025,4 +1157,4 @@ declare class AirtopMocks {
1025
1157
  }): AirtopWindow<AirtopWindowGetInfoResponse>;
1026
1158
  }
1027
1159
 
1028
- export { type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopFileResponse, type AirtopFilesListResponse, 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 };
1160
+ export { type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopFileListParams, type AirtopFileResponse, type AirtopFilesResponse, AirtopMocks, AirtopNode, type AirtopNodeApiResponseData, 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 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 WindowPageQueryConfig, type WindowPaginatedExtractionConfig, type WindowPromptResponse, type WindowScrapeConfig, type WindowScrapeResponse, type WindowScreenshotConfig, type WindowScrollConfig, type WindowTypeConfig, type WindowWaitForPageConfig, type WindowWarning, registerAirtopPlugin };
package/dist/index.d.ts CHANGED
@@ -6,12 +6,12 @@ import { ILogLayer } from 'loglayer';
6
6
  export { ILogLayer } from 'loglayer';
7
7
  import * as _airtop_core_resources_shared_mjs from '@airtop/core/resources/shared.mjs';
8
8
  import { AutomationUpdateDescriptionParams } from '@airtop/core/resources/automations.js';
9
- import { SessionListParams, ProfileOutput, FileListParams, FilesResponse, FileCreateFileParams, WindowIDData, EnvelopeDefaultMeta as EnvelopeDefaultMeta$1, Issue as Issue$1, WindowInfo, WindowGetParams, AIPromptResponse, ScrapeResponse } from '@airtop/core/resources/index.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
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';
11
+ import { SessionConfigV1, GetFileResponse, FilesResponse, ListAutomationsOutput, AutomationData, ExternalSessionWithConnectionInfo, EnvelopeDefaultMeta, Issue, AIPromptResponse as AIPromptResponse$1, WindowIDDataResponse, OperationOutcomeResponse } from '@airtop/core/resources/shared.js';
12
12
  export { AIResponseEnvelope, AirtopPagination, ExternalSessionAIResponseMetadata, ExternalSessionWithConnectionInfo, Issue, OperationOutcomeResponse, WindowIDDataResponse } from '@airtop/core/resources/shared.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 } from '@airtop/core/resources/windows.js';
14
+ import { WindowClickParams, WindowHoverParams, WindowLoadURLParams, WindowMonitorParams, WindowScrapeParams, WindowScreenshotParams, WindowScrollParams, WindowTypeParams, WindowExtractParams, WindowActParams, WindowLlmParams, WindowFindOneParams, WindowFindManyParams, WindowWaitForPageParams } from '@airtop/core/resources/windows.js';
15
15
 
16
16
  /**
17
17
  * Shared configuration between Airtop classes.
@@ -36,6 +36,10 @@ interface CommonAirtopConfig {
36
36
  * Used for customizing output schema handling.
37
37
  */
38
38
  outputSchemaAdapter?: AirtopJsonSchemaAdapter;
39
+ /**
40
+ * The automation job ID to use for the request.
41
+ */
42
+ jobId?: string;
39
43
  }
40
44
  /**
41
45
  * Configuration for defining the JSON schema output.
@@ -97,11 +101,33 @@ declare class AirtopBase {
97
101
  * @internal
98
102
  **/
99
103
  protected outputJsonAdapter: AirtopJsonSchemaAdapter;
104
+ /**
105
+ * The job id for the ongoing automation
106
+ * @internal
107
+ */
108
+ protected jobId?: string;
109
+ /**
110
+ * Instance for sending agent events
111
+ * @internal
112
+ */
113
+ protected agentEventPublisher?: ILogLayer;
100
114
  /**
101
115
  * Creates a new instance of AirtopBase
102
116
  * @param config - Configuration options for the SDK
103
117
  */
104
118
  constructor(config: CommonAirtopConfig);
119
+ /**
120
+ * Sets the publisher for sending agent events. Internal use only.
121
+ * @internal
122
+ */
123
+ _setAgentEventPublisher(logger: ILogLayer): void;
124
+ /**
125
+ * Sends a payload to the agent with the specified event name.
126
+ * @param eventName The name of the event
127
+ * @param payload The payload to send to the agent
128
+ * @internal
129
+ */
130
+ protected _sendAgentPayload(eventName: string, payload: any): void;
105
131
  /**
106
132
  * Returns the API key used by the SDK
107
133
  * @returns API key string
@@ -180,6 +206,10 @@ interface AirtopConstructorConfig {
180
206
  * Used to customize how response data is structured.
181
207
  */
182
208
  outputSchemaAdapter?: AirtopJsonSchemaAdapter;
209
+ /**
210
+ * The job ID to use for the ongoing automation.
211
+ */
212
+ jobId?: string;
183
213
  }
184
214
  /**
185
215
  * Configuration options for creating a new session.
@@ -206,8 +236,6 @@ interface GetFilesConfig extends Omit<FileListParams, "sessionIds"> {
206
236
  }
207
237
  interface AirtopFileResponse extends GetFileResponse {
208
238
  }
209
- interface AirtopFilesListResponse extends FilesResponse {
210
- }
211
239
  interface AirtopAutomationUpdateDescriptionConfig extends AutomationUpdateDescriptionParams {
212
240
  }
213
241
  interface AirtopAutomationData extends AutomationData {
@@ -216,6 +244,10 @@ interface AirtopAutomationListResponse extends ListAutomationsOutput {
216
244
  }
217
245
  interface AirtopProfile extends ProfileOutput {
218
246
  }
247
+ interface AirtopFileListParams extends FileListParams {
248
+ }
249
+ interface AirtopFilesResponse extends FilesResponse {
250
+ }
219
251
 
220
252
  /**
221
253
  * The session data containing connection and state information.
@@ -420,6 +452,102 @@ interface WindowPromptResponse extends AIPromptResponse {
420
452
  */
421
453
  interface WindowScrapeResponse extends ScrapeResponse {
422
454
  }
455
+ /**
456
+ * Configuration parameters for extracting content from a window.
457
+ */
458
+ interface WindowExtractConfig extends Omit<WindowExtractParams, "sessionId" | "prompt" | "jobId"> {
459
+ }
460
+ /**
461
+ * Configuration parameters for acting on content in a window.
462
+ */
463
+ interface WindowActConfig extends Omit<WindowActParams, "sessionId" | "prompt" | "jobId"> {
464
+ }
465
+ /**
466
+ * Configuration parameters for executing an LLM call in a window.
467
+ */
468
+ interface WindowLlmConfig extends Omit<WindowLlmParams, "sessionId" | "prompt"> {
469
+ }
470
+ /**
471
+ * Configuration parameters for finding one element in a window.
472
+ */
473
+ interface WindowFindOneConfig extends Omit<WindowFindOneParams, "sessionId" | "prompt" | "jobId"> {
474
+ }
475
+ /**
476
+ * Configuration parameters for finding multiple elements in a window.
477
+ */
478
+ interface WindowFindManyConfig extends Omit<WindowFindManyParams, "sessionId" | "prompt" | "jobId"> {
479
+ }
480
+ /**
481
+ * Configuration parameters for waiting for a page to load in a window.
482
+ */
483
+ interface WindowWaitForPageConfig extends Omit<WindowWaitForPageParams, "sessionId"> {
484
+ }
485
+ /**
486
+ * Data object representing a node returned from the Airtop API.
487
+ */
488
+ interface AirtopNodeApiResponseData {
489
+ id: string;
490
+ xpath: string;
491
+ }
492
+
493
+ /**
494
+ * Represents a node in the DOM
495
+ */
496
+ declare class AirtopNode {
497
+ /**
498
+ * The window client
499
+ */
500
+ protected windowClient: AirtopWindowClient;
501
+ /**
502
+ * The node handle id to use for all requests
503
+ */
504
+ nodeHandleId: string;
505
+ /**
506
+ * The xpath selector of the node
507
+ */
508
+ selector: string;
509
+ /**
510
+ * Constructor
511
+ * @param client - The window client
512
+ * @param nodeData - The node data to use for all requests
513
+ */
514
+ constructor(client: AirtopWindowClient, nodeData: AirtopNodeApiResponseData);
515
+ /**
516
+ * Extract content from the node
517
+ * @param prompt - The prompt to use for the extraction
518
+ * @param config - The configuration to use for the extraction
519
+ * @param requestOptions - The request options to use for the extraction
520
+ */
521
+ extract(prompt: string, config?: WindowExtractConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
522
+ /**
523
+ * Act on the node
524
+ * @param prompt - The prompt to use for the action
525
+ * @param config - The configuration to use for the action
526
+ * @param requestOptions - The request options to use for the action
527
+ */
528
+ act(prompt: string, config?: WindowActConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
529
+ /**
530
+ * Execute an LLM call on the node
531
+ * @param prompt - The prompt to use for the LLM call
532
+ * @param config - The configuration to use for the LLM call
533
+ * @param requestOptions - The request options to use for the LLM call
534
+ */
535
+ llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
536
+ /**
537
+ * Find one element in the node
538
+ * @param prompt - The prompt to use for the find one
539
+ * @param config - The configuration to use for the find one
540
+ * @param requestOptions - The request options to use for the find one
541
+ */
542
+ findOne(prompt: string, config?: WindowFindOneConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode>;
543
+ /**
544
+ * Find many elements in the node
545
+ * @param prompt - The prompt to use for the find many
546
+ * @param config - The configuration to use for the find many
547
+ * @param requestOptions - The request options to use for the find many
548
+ */
549
+ findMany(prompt: string, config?: WindowFindManyConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode[]>;
550
+ }
423
551
 
424
552
  /**
425
553
  * Response object for a screenshot operation.
@@ -465,7 +593,7 @@ declare class AirtopWindowScreenshot {
465
593
  };
466
594
  }
467
595
 
468
- /**
596
+ /**, waitForRequestCompletion
469
597
  * Client for making window-specific requests to the Airtop API.
470
598
  */
471
599
  declare class AirtopWindowClient extends AirtopBase {
@@ -583,6 +711,12 @@ declare class AirtopWindowClient extends AirtopBase {
583
711
  * @returns Promise resolving when the text has been typed
584
712
  */
585
713
  type(text: string, config?: WindowTypeConfig, requestOptions?: AirtopRequestOptions): Promise<_airtop_core_resources_shared_mjs.AIPromptResponse>;
714
+ extract(prompt: string, config?: WindowExtractConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
715
+ act(prompt: string, config?: WindowActConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
716
+ llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
717
+ findOne(prompt: string, config?: WindowFindOneConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode>;
718
+ findMany(prompt: string, config?: WindowFindManyConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode[]>;
719
+ waitForPage(config?: WindowWaitForPageConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
586
720
  }
587
721
 
588
722
  /**
@@ -798,20 +932,18 @@ declare class AirtopClient extends AirtopBase {
798
932
  * @param requestOptions
799
933
  */
800
934
  getFile(fileId: string, requestOptions?: AirtopRequestOptions): Promise<AirtopFileResponse>;
801
- /**
802
- * Lists files filtered by session IDs.
803
- * @param sessionIds - Array of session IDs to retrieve files for
804
- * @param config - Configuration options for the request
805
- * @param requestOptions - Request options
806
- * @returns Object containing pagination info and array of AirtopSession instances
807
- */
808
- listFiles(sessionIds: string[], config?: GetFilesConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopFilesListResponse>;
809
935
  /**
810
936
  * Removes a file by ID.
811
937
  * @param fileId - ID of the file to remove
812
938
  * @param requestOptions - Request options
813
939
  */
814
940
  removeFile(fileId: string, requestOptions?: AirtopRequestOptions): Promise<void>;
941
+ /**
942
+ * List files
943
+ * @param query
944
+ * @param requestOptions
945
+ */
946
+ listFiles(query: AirtopFileListParams, requestOptions?: AirtopRequestOptions): Promise<AirtopFilesResponse>;
815
947
  /**
816
948
  * List all automations
817
949
  * @param requestOptions - Request options
@@ -1025,4 +1157,4 @@ declare class AirtopMocks {
1025
1157
  }): AirtopWindow<AirtopWindowGetInfoResponse>;
1026
1158
  }
1027
1159
 
1028
- export { type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopFileResponse, type AirtopFilesListResponse, 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 };
1160
+ export { type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopFileListParams, type AirtopFileResponse, type AirtopFilesResponse, AirtopMocks, AirtopNode, type AirtopNodeApiResponseData, 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 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 WindowPageQueryConfig, type WindowPaginatedExtractionConfig, type WindowPromptResponse, type WindowScrapeConfig, type WindowScrapeResponse, type WindowScreenshotConfig, type WindowScrollConfig, type WindowTypeConfig, type WindowWaitForPageConfig, type WindowWarning, registerAirtopPlugin };