@airtop/sdk 1.0.0-alpha2.0 → 1.0.0-alpha2.10
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/README.md +20 -0
- package/dist/index.cjs +269 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +130 -15
- package/dist/index.d.ts +130 -15
- package/dist/index.js +271 -34
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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,
|
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,6 +101,11 @@ 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;
|
100
109
|
/**
|
101
110
|
* Creates a new instance of AirtopBase
|
102
111
|
* @param config - Configuration options for the SDK
|
@@ -180,6 +189,10 @@ interface AirtopConstructorConfig {
|
|
180
189
|
* Used to customize how response data is structured.
|
181
190
|
*/
|
182
191
|
outputSchemaAdapter?: AirtopJsonSchemaAdapter;
|
192
|
+
/**
|
193
|
+
* The job ID to use for the ongoing automation.
|
194
|
+
*/
|
195
|
+
jobId?: string;
|
183
196
|
}
|
184
197
|
/**
|
185
198
|
* Configuration options for creating a new session.
|
@@ -206,8 +219,6 @@ interface GetFilesConfig extends Omit<FileListParams, "sessionIds"> {
|
|
206
219
|
}
|
207
220
|
interface AirtopFileResponse extends GetFileResponse {
|
208
221
|
}
|
209
|
-
interface AirtopFilesListResponse extends FilesResponse {
|
210
|
-
}
|
211
222
|
interface AirtopAutomationUpdateDescriptionConfig extends AutomationUpdateDescriptionParams {
|
212
223
|
}
|
213
224
|
interface AirtopAutomationData extends AutomationData {
|
@@ -216,6 +227,10 @@ interface AirtopAutomationListResponse extends ListAutomationsOutput {
|
|
216
227
|
}
|
217
228
|
interface AirtopProfile extends ProfileOutput {
|
218
229
|
}
|
230
|
+
interface AirtopFileListParams extends FileListParams {
|
231
|
+
}
|
232
|
+
interface AirtopFilesResponse extends FilesResponse {
|
233
|
+
}
|
219
234
|
|
220
235
|
/**
|
221
236
|
* The session data containing connection and state information.
|
@@ -420,6 +435,102 @@ interface WindowPromptResponse extends AIPromptResponse {
|
|
420
435
|
*/
|
421
436
|
interface WindowScrapeResponse extends ScrapeResponse {
|
422
437
|
}
|
438
|
+
/**
|
439
|
+
* Configuration parameters for extracting content from a window.
|
440
|
+
*/
|
441
|
+
interface WindowExtractConfig extends Omit<WindowExtractParams, "sessionId" | "prompt" | "jobId"> {
|
442
|
+
}
|
443
|
+
/**
|
444
|
+
* Configuration parameters for acting on content in a window.
|
445
|
+
*/
|
446
|
+
interface WindowActConfig extends Omit<WindowActParams, "sessionId" | "prompt" | "jobId"> {
|
447
|
+
}
|
448
|
+
/**
|
449
|
+
* Configuration parameters for executing an LLM call in a window.
|
450
|
+
*/
|
451
|
+
interface WindowLlmConfig extends Omit<WindowLlmParams, "sessionId" | "prompt"> {
|
452
|
+
}
|
453
|
+
/**
|
454
|
+
* Configuration parameters for finding one element in a window.
|
455
|
+
*/
|
456
|
+
interface WindowFindOneConfig extends Omit<WindowFindOneParams, "sessionId" | "prompt" | "jobId"> {
|
457
|
+
}
|
458
|
+
/**
|
459
|
+
* Configuration parameters for finding multiple elements in a window.
|
460
|
+
*/
|
461
|
+
interface WindowFindManyConfig extends Omit<WindowFindManyParams, "sessionId" | "prompt" | "jobId"> {
|
462
|
+
}
|
463
|
+
/**
|
464
|
+
* Configuration parameters for waiting for a page to load in a window.
|
465
|
+
*/
|
466
|
+
interface WindowWaitForPageConfig extends Omit<WindowWaitForPageParams, "sessionId"> {
|
467
|
+
}
|
468
|
+
/**
|
469
|
+
* Data object representing a node returned from the Airtop API.
|
470
|
+
*/
|
471
|
+
interface AirtopNodeApiResponseData {
|
472
|
+
id: string;
|
473
|
+
xpath: string;
|
474
|
+
}
|
475
|
+
|
476
|
+
/**
|
477
|
+
* Represents a node in the DOM
|
478
|
+
*/
|
479
|
+
declare class AirtopNode {
|
480
|
+
/**
|
481
|
+
* The window client
|
482
|
+
*/
|
483
|
+
protected windowClient: AirtopWindowClient;
|
484
|
+
/**
|
485
|
+
* The node handle id to use for all requests
|
486
|
+
*/
|
487
|
+
nodeHandleId: string;
|
488
|
+
/**
|
489
|
+
* The xpath selector of the node
|
490
|
+
*/
|
491
|
+
selector: string;
|
492
|
+
/**
|
493
|
+
* Constructor
|
494
|
+
* @param client - The window client
|
495
|
+
* @param nodeData - The node data to use for all requests
|
496
|
+
*/
|
497
|
+
constructor(client: AirtopWindowClient, nodeData: AirtopNodeApiResponseData);
|
498
|
+
/**
|
499
|
+
* Extract content from the node
|
500
|
+
* @param prompt - The prompt to use for the extraction
|
501
|
+
* @param config - The configuration to use for the extraction
|
502
|
+
* @param requestOptions - The request options to use for the extraction
|
503
|
+
*/
|
504
|
+
extract(prompt: string, config?: WindowExtractConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
505
|
+
/**
|
506
|
+
* Act on the node
|
507
|
+
* @param prompt - The prompt to use for the action
|
508
|
+
* @param config - The configuration to use for the action
|
509
|
+
* @param requestOptions - The request options to use for the action
|
510
|
+
*/
|
511
|
+
act(prompt: string, config?: WindowActConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
512
|
+
/**
|
513
|
+
* Execute an LLM call on the node
|
514
|
+
* @param prompt - The prompt to use for the LLM call
|
515
|
+
* @param config - The configuration to use for the LLM call
|
516
|
+
* @param requestOptions - The request options to use for the LLM call
|
517
|
+
*/
|
518
|
+
llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
519
|
+
/**
|
520
|
+
* Find one element in the node
|
521
|
+
* @param prompt - The prompt to use for the find one
|
522
|
+
* @param config - The configuration to use for the find one
|
523
|
+
* @param requestOptions - The request options to use for the find one
|
524
|
+
*/
|
525
|
+
findOne(prompt: string, config?: WindowFindOneConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode>;
|
526
|
+
/**
|
527
|
+
* Find many elements in the node
|
528
|
+
* @param prompt - The prompt to use for the find many
|
529
|
+
* @param config - The configuration to use for the find many
|
530
|
+
* @param requestOptions - The request options to use for the find many
|
531
|
+
*/
|
532
|
+
findMany(prompt: string, config?: WindowFindManyConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode[]>;
|
533
|
+
}
|
423
534
|
|
424
535
|
/**
|
425
536
|
* Response object for a screenshot operation.
|
@@ -465,7 +576,7 @@ declare class AirtopWindowScreenshot {
|
|
465
576
|
};
|
466
577
|
}
|
467
578
|
|
468
|
-
|
579
|
+
/**, waitForRequestCompletion
|
469
580
|
* Client for making window-specific requests to the Airtop API.
|
470
581
|
*/
|
471
582
|
declare class AirtopWindowClient extends AirtopBase {
|
@@ -583,6 +694,12 @@ declare class AirtopWindowClient extends AirtopBase {
|
|
583
694
|
* @returns Promise resolving when the text has been typed
|
584
695
|
*/
|
585
696
|
type(text: string, config?: WindowTypeConfig, requestOptions?: AirtopRequestOptions): Promise<_airtop_core_resources_shared_mjs.AIPromptResponse>;
|
697
|
+
extract(prompt: string, config?: WindowExtractConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
698
|
+
act(prompt: string, config?: WindowActConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
699
|
+
llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
700
|
+
findOne(prompt: string, config?: WindowFindOneConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode>;
|
701
|
+
findMany(prompt: string, config?: WindowFindManyConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode[]>;
|
702
|
+
waitForPage(config?: WindowWaitForPageConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
586
703
|
}
|
587
704
|
|
588
705
|
/**
|
@@ -798,20 +915,18 @@ declare class AirtopClient extends AirtopBase {
|
|
798
915
|
* @param requestOptions
|
799
916
|
*/
|
800
917
|
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
918
|
/**
|
810
919
|
* Removes a file by ID.
|
811
920
|
* @param fileId - ID of the file to remove
|
812
921
|
* @param requestOptions - Request options
|
813
922
|
*/
|
814
923
|
removeFile(fileId: string, requestOptions?: AirtopRequestOptions): Promise<void>;
|
924
|
+
/**
|
925
|
+
* List files
|
926
|
+
* @param query
|
927
|
+
* @param requestOptions
|
928
|
+
*/
|
929
|
+
listFiles(query: AirtopFileListParams, requestOptions?: AirtopRequestOptions): Promise<AirtopFilesResponse>;
|
815
930
|
/**
|
816
931
|
* List all automations
|
817
932
|
* @param requestOptions - Request options
|
@@ -1025,4 +1140,4 @@ declare class AirtopMocks {
|
|
1025
1140
|
}): AirtopWindow<AirtopWindowGetInfoResponse>;
|
1026
1141
|
}
|
1027
1142
|
|
1028
|
-
export { type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopFileResponse, type
|
1143
|
+
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,
|
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,6 +101,11 @@ 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;
|
100
109
|
/**
|
101
110
|
* Creates a new instance of AirtopBase
|
102
111
|
* @param config - Configuration options for the SDK
|
@@ -180,6 +189,10 @@ interface AirtopConstructorConfig {
|
|
180
189
|
* Used to customize how response data is structured.
|
181
190
|
*/
|
182
191
|
outputSchemaAdapter?: AirtopJsonSchemaAdapter;
|
192
|
+
/**
|
193
|
+
* The job ID to use for the ongoing automation.
|
194
|
+
*/
|
195
|
+
jobId?: string;
|
183
196
|
}
|
184
197
|
/**
|
185
198
|
* Configuration options for creating a new session.
|
@@ -206,8 +219,6 @@ interface GetFilesConfig extends Omit<FileListParams, "sessionIds"> {
|
|
206
219
|
}
|
207
220
|
interface AirtopFileResponse extends GetFileResponse {
|
208
221
|
}
|
209
|
-
interface AirtopFilesListResponse extends FilesResponse {
|
210
|
-
}
|
211
222
|
interface AirtopAutomationUpdateDescriptionConfig extends AutomationUpdateDescriptionParams {
|
212
223
|
}
|
213
224
|
interface AirtopAutomationData extends AutomationData {
|
@@ -216,6 +227,10 @@ interface AirtopAutomationListResponse extends ListAutomationsOutput {
|
|
216
227
|
}
|
217
228
|
interface AirtopProfile extends ProfileOutput {
|
218
229
|
}
|
230
|
+
interface AirtopFileListParams extends FileListParams {
|
231
|
+
}
|
232
|
+
interface AirtopFilesResponse extends FilesResponse {
|
233
|
+
}
|
219
234
|
|
220
235
|
/**
|
221
236
|
* The session data containing connection and state information.
|
@@ -420,6 +435,102 @@ interface WindowPromptResponse extends AIPromptResponse {
|
|
420
435
|
*/
|
421
436
|
interface WindowScrapeResponse extends ScrapeResponse {
|
422
437
|
}
|
438
|
+
/**
|
439
|
+
* Configuration parameters for extracting content from a window.
|
440
|
+
*/
|
441
|
+
interface WindowExtractConfig extends Omit<WindowExtractParams, "sessionId" | "prompt" | "jobId"> {
|
442
|
+
}
|
443
|
+
/**
|
444
|
+
* Configuration parameters for acting on content in a window.
|
445
|
+
*/
|
446
|
+
interface WindowActConfig extends Omit<WindowActParams, "sessionId" | "prompt" | "jobId"> {
|
447
|
+
}
|
448
|
+
/**
|
449
|
+
* Configuration parameters for executing an LLM call in a window.
|
450
|
+
*/
|
451
|
+
interface WindowLlmConfig extends Omit<WindowLlmParams, "sessionId" | "prompt"> {
|
452
|
+
}
|
453
|
+
/**
|
454
|
+
* Configuration parameters for finding one element in a window.
|
455
|
+
*/
|
456
|
+
interface WindowFindOneConfig extends Omit<WindowFindOneParams, "sessionId" | "prompt" | "jobId"> {
|
457
|
+
}
|
458
|
+
/**
|
459
|
+
* Configuration parameters for finding multiple elements in a window.
|
460
|
+
*/
|
461
|
+
interface WindowFindManyConfig extends Omit<WindowFindManyParams, "sessionId" | "prompt" | "jobId"> {
|
462
|
+
}
|
463
|
+
/**
|
464
|
+
* Configuration parameters for waiting for a page to load in a window.
|
465
|
+
*/
|
466
|
+
interface WindowWaitForPageConfig extends Omit<WindowWaitForPageParams, "sessionId"> {
|
467
|
+
}
|
468
|
+
/**
|
469
|
+
* Data object representing a node returned from the Airtop API.
|
470
|
+
*/
|
471
|
+
interface AirtopNodeApiResponseData {
|
472
|
+
id: string;
|
473
|
+
xpath: string;
|
474
|
+
}
|
475
|
+
|
476
|
+
/**
|
477
|
+
* Represents a node in the DOM
|
478
|
+
*/
|
479
|
+
declare class AirtopNode {
|
480
|
+
/**
|
481
|
+
* The window client
|
482
|
+
*/
|
483
|
+
protected windowClient: AirtopWindowClient;
|
484
|
+
/**
|
485
|
+
* The node handle id to use for all requests
|
486
|
+
*/
|
487
|
+
nodeHandleId: string;
|
488
|
+
/**
|
489
|
+
* The xpath selector of the node
|
490
|
+
*/
|
491
|
+
selector: string;
|
492
|
+
/**
|
493
|
+
* Constructor
|
494
|
+
* @param client - The window client
|
495
|
+
* @param nodeData - The node data to use for all requests
|
496
|
+
*/
|
497
|
+
constructor(client: AirtopWindowClient, nodeData: AirtopNodeApiResponseData);
|
498
|
+
/**
|
499
|
+
* Extract content from the node
|
500
|
+
* @param prompt - The prompt to use for the extraction
|
501
|
+
* @param config - The configuration to use for the extraction
|
502
|
+
* @param requestOptions - The request options to use for the extraction
|
503
|
+
*/
|
504
|
+
extract(prompt: string, config?: WindowExtractConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
505
|
+
/**
|
506
|
+
* Act on the node
|
507
|
+
* @param prompt - The prompt to use for the action
|
508
|
+
* @param config - The configuration to use for the action
|
509
|
+
* @param requestOptions - The request options to use for the action
|
510
|
+
*/
|
511
|
+
act(prompt: string, config?: WindowActConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
512
|
+
/**
|
513
|
+
* Execute an LLM call on the node
|
514
|
+
* @param prompt - The prompt to use for the LLM call
|
515
|
+
* @param config - The configuration to use for the LLM call
|
516
|
+
* @param requestOptions - The request options to use for the LLM call
|
517
|
+
*/
|
518
|
+
llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
519
|
+
/**
|
520
|
+
* Find one element in the node
|
521
|
+
* @param prompt - The prompt to use for the find one
|
522
|
+
* @param config - The configuration to use for the find one
|
523
|
+
* @param requestOptions - The request options to use for the find one
|
524
|
+
*/
|
525
|
+
findOne(prompt: string, config?: WindowFindOneConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode>;
|
526
|
+
/**
|
527
|
+
* Find many elements in the node
|
528
|
+
* @param prompt - The prompt to use for the find many
|
529
|
+
* @param config - The configuration to use for the find many
|
530
|
+
* @param requestOptions - The request options to use for the find many
|
531
|
+
*/
|
532
|
+
findMany(prompt: string, config?: WindowFindManyConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode[]>;
|
533
|
+
}
|
423
534
|
|
424
535
|
/**
|
425
536
|
* Response object for a screenshot operation.
|
@@ -465,7 +576,7 @@ declare class AirtopWindowScreenshot {
|
|
465
576
|
};
|
466
577
|
}
|
467
578
|
|
468
|
-
|
579
|
+
/**, waitForRequestCompletion
|
469
580
|
* Client for making window-specific requests to the Airtop API.
|
470
581
|
*/
|
471
582
|
declare class AirtopWindowClient extends AirtopBase {
|
@@ -583,6 +694,12 @@ declare class AirtopWindowClient extends AirtopBase {
|
|
583
694
|
* @returns Promise resolving when the text has been typed
|
584
695
|
*/
|
585
696
|
type(text: string, config?: WindowTypeConfig, requestOptions?: AirtopRequestOptions): Promise<_airtop_core_resources_shared_mjs.AIPromptResponse>;
|
697
|
+
extract(prompt: string, config?: WindowExtractConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
698
|
+
act(prompt: string, config?: WindowActConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
699
|
+
llm(prompt: string, config?: WindowLlmConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
700
|
+
findOne(prompt: string, config?: WindowFindOneConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode>;
|
701
|
+
findMany(prompt: string, config?: WindowFindManyConfig, requestOptions?: AirtopRequestOptions): Promise<AirtopNode[]>;
|
702
|
+
waitForPage(config?: WindowWaitForPageConfig, requestOptions?: AirtopRequestOptions): Promise<WindowPromptResponse>;
|
586
703
|
}
|
587
704
|
|
588
705
|
/**
|
@@ -798,20 +915,18 @@ declare class AirtopClient extends AirtopBase {
|
|
798
915
|
* @param requestOptions
|
799
916
|
*/
|
800
917
|
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
918
|
/**
|
810
919
|
* Removes a file by ID.
|
811
920
|
* @param fileId - ID of the file to remove
|
812
921
|
* @param requestOptions - Request options
|
813
922
|
*/
|
814
923
|
removeFile(fileId: string, requestOptions?: AirtopRequestOptions): Promise<void>;
|
924
|
+
/**
|
925
|
+
* List files
|
926
|
+
* @param query
|
927
|
+
* @param requestOptions
|
928
|
+
*/
|
929
|
+
listFiles(query: AirtopFileListParams, requestOptions?: AirtopRequestOptions): Promise<AirtopFilesResponse>;
|
815
930
|
/**
|
816
931
|
* List all automations
|
817
932
|
* @param requestOptions - Request options
|
@@ -1025,4 +1140,4 @@ declare class AirtopMocks {
|
|
1025
1140
|
}): AirtopWindow<AirtopWindowGetInfoResponse>;
|
1026
1141
|
}
|
1027
1142
|
|
1028
|
-
export { type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopFileResponse, type
|
1143
|
+
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 };
|