@airtop/sdk 1.0.0-alpha2.23 → 1.0.0-alpha2.24
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.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -12
- package/dist/index.d.ts +19 -12
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
@@ -4,8 +4,8 @@ import { AirtopJsonSchemaAdapter } from '@airtop/json-schema-adapter';
|
|
4
4
|
export { AirtopJsonSchemaAdapter } from '@airtop/json-schema-adapter';
|
5
5
|
import { ILogLayer } from 'loglayer';
|
6
6
|
export { ILogLayer } from 'loglayer';
|
7
|
-
import { Issue, SessionConfigV1, GetFileResponse, FilesResponse, ListAutomationsOutput, AutomationData, ServicePromptActionResponseEnvelope, ExternalSessionWithConnectionInfo, EnvelopeDefaultMeta, ExtractActionResponseEnvelope, ActActionResponseEnvelope, LlmActionResponseEnvelope, NodeHandle, WaitForPageActionResponseEnvelope, NavigateActionResponseEnvelope, FindOneActionResponseEnvelope, FindManyActionResponseEnvelope, AIPromptResponse as AIPromptResponse$1, WindowIDDataResponse, OperationOutcomeResponse } from '@airtop/core/resources/shared.js';
|
8
|
-
export { AIResponseEnvelope, ActActionResponseData, AgentInvocationData, AgentVersionData, AirtopPagination, AsyncConfig, AsyncSessionAIResponseEnvelope, BrowserWaitNavigationConfig, ClickConfig, ClientProvidedResponseMetadata, CreateFileData, EnvelopeDefaultMeta, ExternalSessionAIResponseMetadata, ExternalSessionAIResponseMetadataUsage, ExternalSessionConfig, ExternalSessionWithConnectionInfo, ExtractActionResponseData, FindManyActionResponseData, FindOneActionResponseData, GetFileData, IntervalMonitorConfig, Issue, LlmActionResponseData, MicroInteractionConfig, MonitorConfig, NavigateActionResponseData, OperationOutcome, OperationOutcomeResponse, PageQueryConfig, PageQueryExperimentalConfig, PaginatedExtractionConfig, ScrapeResponseContent, ScrapeResponseEnvelope, ScrapeResponseOutput, ScreenshotConfig, ScreenshotMetadata, ScreenshotRequestConfig, ScreenshotScrollPosition, ScreenshotViewportDimensions, ScrollByConfig, ScrollToEdgeConfig, ServicePromptActionResponseData, SummaryExperimentalConfig, VisualAnalysisConfig, WaitForPageActionResponseData, WindowIDData, WindowIDDataResponse, WindowInfo, WindowResponse } from '@airtop/core/resources/shared.js';
|
7
|
+
import { Issue, SessionConfigV1, GetFileResponse, FilesResponse, ListAutomationsOutput, AutomationData, ServicePromptActionResponseEnvelope, ExternalSessionWithConnectionInfo, EnvelopeDefaultMeta, ExtractActionResponseEnvelope, ActActionResponseEnvelope, LlmActionResponseEnvelope, NodeHandle, WaitForPageActionResponseEnvelope, NavigateActionResponseEnvelope, FindOneActionResponseEnvelope, FindManyActionResponseEnvelope, AIPromptResponse as AIPromptResponse$1, WindowIDDataResponse, OperationOutcomeResponse, WindowsResponse } from '@airtop/core/resources/shared.js';
|
8
|
+
export { AIResponseEnvelope, ActActionResponseData, AgentInvocationData, AgentVersionData, AirtopPagination, AsyncConfig, AsyncSessionAIResponseEnvelope, BrowserWaitNavigationConfig, ClickConfig, ClientProvidedResponseMetadata, CreateFileData, EnvelopeDefaultMeta, ExternalSessionAIResponseMetadata, ExternalSessionAIResponseMetadataUsage, ExternalSessionConfig, ExternalSessionWithConnectionInfo, ExtractActionResponseData, FindManyActionResponseData, FindOneActionResponseData, GetFileData, IntervalMonitorConfig, Issue, LlmActionResponseData, MicroInteractionConfig, MonitorConfig, NavigateActionResponseData, OperationOutcome, OperationOutcomeResponse, PageQueryConfig, PageQueryExperimentalConfig, PaginatedExtractionConfig, ScrapeResponseContent, ScrapeResponseEnvelope, ScrapeResponseOutput, ScreenshotConfig, ScreenshotMetadata, ScreenshotRequestConfig, ScreenshotScrollPosition, ScreenshotViewportDimensions, ScrollByConfig, ScrollToEdgeConfig, ServicePromptActionResponseData, SummaryExperimentalConfig, VisualAnalysisConfig, WaitForPageActionResponseData, WindowIDData, WindowIDDataResponse, WindowInfo, WindowResponse, WindowsResponse, WindowsWithMeta } from '@airtop/core/resources/shared.js';
|
9
9
|
import * as _airtop_core_resources_shared_mjs from '@airtop/core/resources/shared.mjs';
|
10
10
|
import { AutomationUpdateDescriptionParams } from '@airtop/core/resources/automations.js';
|
11
11
|
import { SessionListParams, ProfileOutput, FileListParams, FileCreateFileParams, WindowCreateParams, WindowIDData, EnvelopeDefaultMeta as EnvelopeDefaultMeta$1, Issue as Issue$1, WindowInfo, WindowGetParams, AIPromptResponse, ScrapeResponse } from '@airtop/core/resources/index.js';
|
@@ -13,8 +13,9 @@ export { AIPromptResponse, ScrapeResponse } from '@airtop/core/resources/index.j
|
|
13
13
|
import * as _airtop_core_resources_sessions_mjs from '@airtop/core/resources/sessions.mjs';
|
14
14
|
import * as _airtop_core_resources_js from '@airtop/core/resources.js';
|
15
15
|
import { ConnectedServicesActionResponseEnvelope } from '@airtop/core/resources.js';
|
16
|
-
import { WindowClickParams, WindowHoverParams, WindowLoadURLParams, WindowMonitorParams, WindowScrapeParams, WindowScreenshotParams, WindowScrollParams, WindowTypeParams, WindowExtractParams, WindowActParams, WindowLlmParams, WindowFindOneParams, WindowFindManyParams, WindowWaitForPageParams, WindowNavigateParams, WindowFillFormParams } from '@airtop/core/resources/windows.js';
|
16
|
+
import { WindowClickParams, WindowHoverParams, WindowLoadURLParams, WindowMonitorParams, WindowPageQueryParams, WindowPaginatedExtractionParams, WindowScrapeParams, WindowScreenshotParams, WindowScrollParams, WindowTypeParams, WindowExtractParams, WindowActParams, WindowLlmParams, WindowFindOneParams, WindowFindManyParams, WindowWaitForPageParams, WindowNavigateParams, WindowFillFormParams } from '@airtop/core/resources/windows.js';
|
17
17
|
export { WindowActParams, WindowClickParams, WindowExtractParams, WindowFillFormParams, WindowFindManyParams, WindowFindOneParams, WindowGetParams, WindowHoverParams, WindowLlmParams, WindowLoadURLParams, WindowMonitorParams, WindowNavigateParams, WindowPageQueryParams, WindowPaginatedExtractionParams, WindowScrapeParams, WindowScreenshotParams, WindowScrollParams, WindowTypeParams, WindowWaitForPageParams } from '@airtop/core/resources/windows.js';
|
18
|
+
import { DeepOmit } from 'deep-utility-types';
|
18
19
|
export { DeepOmit } from 'deep-utility-types';
|
19
20
|
|
20
21
|
/**
|
@@ -58,7 +59,7 @@ interface CommonAirtopConfig {
|
|
58
59
|
* Configuration for defining the JSON schema output.
|
59
60
|
*/
|
60
61
|
interface OutputJsonSchemaConfig {
|
61
|
-
configuration
|
62
|
+
configuration?: {
|
62
63
|
/**
|
63
64
|
* JSON schema defining the structure of the output.
|
64
65
|
*/
|
@@ -458,16 +459,18 @@ interface WindowLoadUrlConfig extends Omit<WindowLoadURLParams, "sessionId" | "u
|
|
458
459
|
*/
|
459
460
|
interface WindowMonitorConfig extends Omit<WindowMonitorParams, "sessionId" | "condition"> {
|
460
461
|
}
|
462
|
+
interface WindowPageQueryParamsBase extends DeepOmit<WindowPageQueryParams, "sessionId" | "prompt" | "configuration.outputSchema"> {
|
463
|
+
}
|
461
464
|
/**
|
462
465
|
* Configuration parameters for performing a natural language query on page content.
|
463
466
|
*/
|
464
|
-
|
467
|
+
type WindowPageQueryConfig = WindowPageQueryParamsBase & OutputJsonSchemaConfig;
|
468
|
+
interface WindowPaginatedExtractionParamsBase extends DeepOmit<WindowPaginatedExtractionParams, "sessionId" | "prompt" | "configuration.outputSchema"> {
|
465
469
|
}
|
466
470
|
/**
|
467
471
|
* Configuration parameters for extracting paginated data from a window.
|
468
472
|
*/
|
469
|
-
|
470
|
-
}
|
473
|
+
type WindowPaginatedExtractionConfig = WindowPaginatedExtractionParamsBase & OutputJsonSchemaConfig;
|
471
474
|
/**
|
472
475
|
* Configuration parameters for scraping content from a window.
|
473
476
|
* Excludes session ID which is provided by the parent session.
|
@@ -893,7 +896,7 @@ declare class AirtopSessionClient extends AirtopBase {
|
|
893
896
|
* Returns the browser session ID.
|
894
897
|
*/
|
895
898
|
getSessionId(): string;
|
896
|
-
listWindows(requestOptions?: AirtopRequestOptions): Promise<
|
899
|
+
listWindows(requestOptions?: AirtopRequestOptions): Promise<WindowsResponse>;
|
897
900
|
/**
|
898
901
|
* Gets the state of the session using the attached session id.
|
899
902
|
* @param requestOptions - Request options
|
@@ -1121,6 +1124,8 @@ declare class AirtopMocks {
|
|
1121
1124
|
|
1122
1125
|
interface AirtopAgentCreateAgentParams extends Airtop.AgentCreateAgentParams {
|
1123
1126
|
}
|
1127
|
+
interface AirtopAgentGetAgentParams extends Airtop.AgentGetAgentParams {
|
1128
|
+
}
|
1124
1129
|
interface AirtopAgentGetAgentsParams extends Airtop.AgentGetAgentsParams {
|
1125
1130
|
}
|
1126
1131
|
interface AirtopAgentUpdateAgentParams extends Airtop.AgentUpdateAgentParams {
|
@@ -1137,6 +1142,8 @@ interface AirtopAgentGetVersionDataParams extends Airtop.AgentGetCurrentAgentVer
|
|
1137
1142
|
}
|
1138
1143
|
interface AirtopAgentUpdateVersionDataParams extends Omit<Airtop.AgentUpdateAgentVersionDataParams, "id"> {
|
1139
1144
|
}
|
1145
|
+
interface AirtopAgentPublishAgentParams extends Airtop.AgentPublishAgentParams {
|
1146
|
+
}
|
1140
1147
|
interface AirtopCreateAgentResponse extends Airtop.CreateAgentResponse {
|
1141
1148
|
}
|
1142
1149
|
interface AirtopGetAgentResponse extends Airtop.GetAgentResponse {
|
@@ -1155,7 +1162,7 @@ interface AirtopAgentResponse extends Airtop.GetAgentResponse {
|
|
1155
1162
|
}
|
1156
1163
|
interface AirtopCreateNewAgentDraftResponse extends Airtop.AgentCreateDraftResponse {
|
1157
1164
|
}
|
1158
|
-
interface AirtopPublishNewAgentResponse extends Airtop.
|
1165
|
+
interface AirtopPublishNewAgentResponse extends Airtop.AgentPublishDraftResponse {
|
1159
1166
|
}
|
1160
1167
|
interface AirtopGetAgentVersionDataResponse extends Airtop.AgentGetVersionDataResponse {
|
1161
1168
|
}
|
@@ -1184,7 +1191,7 @@ declare class AirtopAgentClient extends AirtopBase {
|
|
1184
1191
|
* @param requestOptions - Request options.
|
1185
1192
|
* @returns The agent data.
|
1186
1193
|
*/
|
1187
|
-
getAgent(agentId: string, requestOptions?: AirtopRequestOptions): Promise<AirtopGetAgentResponse>;
|
1194
|
+
getAgent(agentId: string, params?: AirtopAgentGetAgentParams, requestOptions?: AirtopRequestOptions): Promise<AirtopGetAgentResponse>;
|
1188
1195
|
/**
|
1189
1196
|
* Lists agents.
|
1190
1197
|
* @param params - Optional parameters for listing agents (e.g., pagination).
|
@@ -1204,7 +1211,7 @@ declare class AirtopAgentClient extends AirtopBase {
|
|
1204
1211
|
* @param agentId - The ID of the agent to publish.
|
1205
1212
|
* @returns The published version data
|
1206
1213
|
*/
|
1207
|
-
publishNewAgentVersion(agentId: string): Promise<AirtopPublishNewAgentResponse>;
|
1214
|
+
publishNewAgentVersion(agentId: string, params?: AirtopAgentPublishAgentParams, requestOptions?: AirtopRequestOptions): Promise<AirtopPublishNewAgentResponse>;
|
1208
1215
|
/**
|
1209
1216
|
* Retrieves the data for a specific version of an agent.
|
1210
1217
|
* @param agentId - The ID of the agent.
|
@@ -1433,4 +1440,4 @@ interface AirtopPluginRegistration {
|
|
1433
1440
|
*/
|
1434
1441
|
declare function registerAirtopPlugin(plugin: AirtopPluginRegistration): void;
|
1435
1442
|
|
1436
|
-
export { type AirtopAgentCancelInvocationParams, AirtopAgentClient, type AirtopAgentCreateAgentParams, type AirtopAgentCreateInvocationParams, type AirtopAgentDeleteAgentsParams, type AirtopAgentGetAgentsParams, type AirtopAgentGetInvocationsParams, type AirtopAgentGetVersionDataParams, type AirtopAgentResponse, type AirtopAgentUpdateAgentParams, type AirtopAgentUpdateVersionDataParams, type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopCreateAgentInvocationResponse, type AirtopCreateAgentResponse, type AirtopCreateNewAgentDraftResponse, type AirtopDeleteAgentsResponse, AirtopError, type AirtopFileListParams, type AirtopFileResponse, type AirtopFilesResponse, type AirtopGetAgentInvocationsResponse, type AirtopGetAgentResponse, type AirtopGetAgentVersionDataResponse, type AirtopGetAgentsResponse, AirtopMocks, AirtopNode, type AirtopNodeApiResponseData, AirtopPluginAugmentationType, type AirtopPluginRegistration, type AirtopPluginType, type AirtopProfile, type AirtopPublishNewAgentResponse, type AirtopRequestOptions, AirtopSession, AirtopSessionClient, type AirtopSessionClientPlugin, type AirtopSessionPlugin, type AirtopSessionResponse, type AirtopUpdateAgentResponse, type AirtopUpdateVersionDataResponse, AirtopWindow, AirtopWindowClient, type AirtopWindowClientPlugin, type AirtopWindowCreateResponse, type AirtopWindowGetInfoResponse, type AirtopWindowPlugin, AirtopWindowScreenshot, type AirtopWindowScreenshotPlugin, type AirtopWindowScreenshotResponse, type CommonAirtopConfig, type CommonResponse, type CommonWindowResponse, type CreateFileConfig, type CreateSessionConfig, type GetFilesConfig, type GetSessionsConfig, type OutputJsonSchemaConfig, type ScreenshotData, type SessionData, type SessionError, type SessionMetadata, type SessionServiceResponse, type SessionWarning, type WindowActConfig, type WindowActResponse, type WindowClickConfig, type WindowCreateData, type WindowCreateOptions, type WindowError, type WindowExtractConfig, type WindowExtractResponse, type WindowFillFormConfig, type WindowFindManyConfig, type WindowFindManyResponse, type WindowFindOneConfig, type WindowFindOneResponse, type WindowGetConfig, type WindowHoverConfig, type WindowInfoData, type WindowLlmConfig, type WindowLlmResponse, type WindowLoadUrlConfig, type WindowMetadata, type WindowMonitorConfig, type WindowNavigateConfig, WindowNavigateDirection, type WindowNavigateResponse, type WindowPageQueryConfig, type WindowPaginatedExtractionConfig, type WindowPromptResponse, type WindowScrapeConfig, type WindowScrapeResponse, type WindowScreenshotConfig, type WindowScrollConfig, type WindowTypeConfig, type WindowWaitForPageConfig, type WindowWaitForPageResponse, type WindowWarning, registerAirtopPlugin };
|
1443
|
+
export { type AirtopAgentCancelInvocationParams, AirtopAgentClient, type AirtopAgentCreateAgentParams, type AirtopAgentCreateInvocationParams, type AirtopAgentDeleteAgentsParams, type AirtopAgentGetAgentParams, type AirtopAgentGetAgentsParams, type AirtopAgentGetInvocationsParams, type AirtopAgentGetVersionDataParams, type AirtopAgentPublishAgentParams, type AirtopAgentResponse, type AirtopAgentUpdateAgentParams, type AirtopAgentUpdateVersionDataParams, type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopCreateAgentInvocationResponse, type AirtopCreateAgentResponse, type AirtopCreateNewAgentDraftResponse, type AirtopDeleteAgentsResponse, AirtopError, type AirtopFileListParams, type AirtopFileResponse, type AirtopFilesResponse, type AirtopGetAgentInvocationsResponse, type AirtopGetAgentResponse, type AirtopGetAgentVersionDataResponse, type AirtopGetAgentsResponse, AirtopMocks, AirtopNode, type AirtopNodeApiResponseData, AirtopPluginAugmentationType, type AirtopPluginRegistration, type AirtopPluginType, type AirtopProfile, type AirtopPublishNewAgentResponse, type AirtopRequestOptions, AirtopSession, AirtopSessionClient, type AirtopSessionClientPlugin, type AirtopSessionPlugin, type AirtopSessionResponse, type AirtopUpdateAgentResponse, type AirtopUpdateVersionDataResponse, AirtopWindow, AirtopWindowClient, type AirtopWindowClientPlugin, type AirtopWindowCreateResponse, type AirtopWindowGetInfoResponse, type AirtopWindowPlugin, AirtopWindowScreenshot, type AirtopWindowScreenshotPlugin, type AirtopWindowScreenshotResponse, type CommonAirtopConfig, type CommonResponse, type CommonWindowResponse, type CreateFileConfig, type CreateSessionConfig, type GetFilesConfig, type GetSessionsConfig, type OutputJsonSchemaConfig, type ScreenshotData, type SessionData, type SessionError, type SessionMetadata, type SessionServiceResponse, type SessionWarning, type WindowActConfig, type WindowActResponse, type WindowClickConfig, type WindowCreateData, type WindowCreateOptions, type WindowError, type WindowExtractConfig, type WindowExtractResponse, type WindowFillFormConfig, type WindowFindManyConfig, type WindowFindManyResponse, type WindowFindOneConfig, type WindowFindOneResponse, type WindowGetConfig, type WindowHoverConfig, type WindowInfoData, type WindowLlmConfig, type WindowLlmResponse, type WindowLoadUrlConfig, type WindowMetadata, type WindowMonitorConfig, type WindowNavigateConfig, WindowNavigateDirection, type WindowNavigateResponse, type WindowPageQueryConfig, type WindowPaginatedExtractionConfig, type WindowPromptResponse, type WindowScrapeConfig, type WindowScrapeResponse, type WindowScreenshotConfig, type WindowScrollConfig, type WindowTypeConfig, type WindowWaitForPageConfig, type WindowWaitForPageResponse, type WindowWarning, registerAirtopPlugin };
|
package/dist/index.d.ts
CHANGED
@@ -4,8 +4,8 @@ import { AirtopJsonSchemaAdapter } from '@airtop/json-schema-adapter';
|
|
4
4
|
export { AirtopJsonSchemaAdapter } from '@airtop/json-schema-adapter';
|
5
5
|
import { ILogLayer } from 'loglayer';
|
6
6
|
export { ILogLayer } from 'loglayer';
|
7
|
-
import { Issue, SessionConfigV1, GetFileResponse, FilesResponse, ListAutomationsOutput, AutomationData, ServicePromptActionResponseEnvelope, ExternalSessionWithConnectionInfo, EnvelopeDefaultMeta, ExtractActionResponseEnvelope, ActActionResponseEnvelope, LlmActionResponseEnvelope, NodeHandle, WaitForPageActionResponseEnvelope, NavigateActionResponseEnvelope, FindOneActionResponseEnvelope, FindManyActionResponseEnvelope, AIPromptResponse as AIPromptResponse$1, WindowIDDataResponse, OperationOutcomeResponse } from '@airtop/core/resources/shared.js';
|
8
|
-
export { AIResponseEnvelope, ActActionResponseData, AgentInvocationData, AgentVersionData, AirtopPagination, AsyncConfig, AsyncSessionAIResponseEnvelope, BrowserWaitNavigationConfig, ClickConfig, ClientProvidedResponseMetadata, CreateFileData, EnvelopeDefaultMeta, ExternalSessionAIResponseMetadata, ExternalSessionAIResponseMetadataUsage, ExternalSessionConfig, ExternalSessionWithConnectionInfo, ExtractActionResponseData, FindManyActionResponseData, FindOneActionResponseData, GetFileData, IntervalMonitorConfig, Issue, LlmActionResponseData, MicroInteractionConfig, MonitorConfig, NavigateActionResponseData, OperationOutcome, OperationOutcomeResponse, PageQueryConfig, PageQueryExperimentalConfig, PaginatedExtractionConfig, ScrapeResponseContent, ScrapeResponseEnvelope, ScrapeResponseOutput, ScreenshotConfig, ScreenshotMetadata, ScreenshotRequestConfig, ScreenshotScrollPosition, ScreenshotViewportDimensions, ScrollByConfig, ScrollToEdgeConfig, ServicePromptActionResponseData, SummaryExperimentalConfig, VisualAnalysisConfig, WaitForPageActionResponseData, WindowIDData, WindowIDDataResponse, WindowInfo, WindowResponse } from '@airtop/core/resources/shared.js';
|
7
|
+
import { Issue, SessionConfigV1, GetFileResponse, FilesResponse, ListAutomationsOutput, AutomationData, ServicePromptActionResponseEnvelope, ExternalSessionWithConnectionInfo, EnvelopeDefaultMeta, ExtractActionResponseEnvelope, ActActionResponseEnvelope, LlmActionResponseEnvelope, NodeHandle, WaitForPageActionResponseEnvelope, NavigateActionResponseEnvelope, FindOneActionResponseEnvelope, FindManyActionResponseEnvelope, AIPromptResponse as AIPromptResponse$1, WindowIDDataResponse, OperationOutcomeResponse, WindowsResponse } from '@airtop/core/resources/shared.js';
|
8
|
+
export { AIResponseEnvelope, ActActionResponseData, AgentInvocationData, AgentVersionData, AirtopPagination, AsyncConfig, AsyncSessionAIResponseEnvelope, BrowserWaitNavigationConfig, ClickConfig, ClientProvidedResponseMetadata, CreateFileData, EnvelopeDefaultMeta, ExternalSessionAIResponseMetadata, ExternalSessionAIResponseMetadataUsage, ExternalSessionConfig, ExternalSessionWithConnectionInfo, ExtractActionResponseData, FindManyActionResponseData, FindOneActionResponseData, GetFileData, IntervalMonitorConfig, Issue, LlmActionResponseData, MicroInteractionConfig, MonitorConfig, NavigateActionResponseData, OperationOutcome, OperationOutcomeResponse, PageQueryConfig, PageQueryExperimentalConfig, PaginatedExtractionConfig, ScrapeResponseContent, ScrapeResponseEnvelope, ScrapeResponseOutput, ScreenshotConfig, ScreenshotMetadata, ScreenshotRequestConfig, ScreenshotScrollPosition, ScreenshotViewportDimensions, ScrollByConfig, ScrollToEdgeConfig, ServicePromptActionResponseData, SummaryExperimentalConfig, VisualAnalysisConfig, WaitForPageActionResponseData, WindowIDData, WindowIDDataResponse, WindowInfo, WindowResponse, WindowsResponse, WindowsWithMeta } from '@airtop/core/resources/shared.js';
|
9
9
|
import * as _airtop_core_resources_shared_mjs from '@airtop/core/resources/shared.mjs';
|
10
10
|
import { AutomationUpdateDescriptionParams } from '@airtop/core/resources/automations.js';
|
11
11
|
import { SessionListParams, ProfileOutput, FileListParams, FileCreateFileParams, WindowCreateParams, WindowIDData, EnvelopeDefaultMeta as EnvelopeDefaultMeta$1, Issue as Issue$1, WindowInfo, WindowGetParams, AIPromptResponse, ScrapeResponse } from '@airtop/core/resources/index.js';
|
@@ -13,8 +13,9 @@ export { AIPromptResponse, ScrapeResponse } from '@airtop/core/resources/index.j
|
|
13
13
|
import * as _airtop_core_resources_sessions_mjs from '@airtop/core/resources/sessions.mjs';
|
14
14
|
import * as _airtop_core_resources_js from '@airtop/core/resources.js';
|
15
15
|
import { ConnectedServicesActionResponseEnvelope } from '@airtop/core/resources.js';
|
16
|
-
import { WindowClickParams, WindowHoverParams, WindowLoadURLParams, WindowMonitorParams, WindowScrapeParams, WindowScreenshotParams, WindowScrollParams, WindowTypeParams, WindowExtractParams, WindowActParams, WindowLlmParams, WindowFindOneParams, WindowFindManyParams, WindowWaitForPageParams, WindowNavigateParams, WindowFillFormParams } from '@airtop/core/resources/windows.js';
|
16
|
+
import { WindowClickParams, WindowHoverParams, WindowLoadURLParams, WindowMonitorParams, WindowPageQueryParams, WindowPaginatedExtractionParams, WindowScrapeParams, WindowScreenshotParams, WindowScrollParams, WindowTypeParams, WindowExtractParams, WindowActParams, WindowLlmParams, WindowFindOneParams, WindowFindManyParams, WindowWaitForPageParams, WindowNavigateParams, WindowFillFormParams } from '@airtop/core/resources/windows.js';
|
17
17
|
export { WindowActParams, WindowClickParams, WindowExtractParams, WindowFillFormParams, WindowFindManyParams, WindowFindOneParams, WindowGetParams, WindowHoverParams, WindowLlmParams, WindowLoadURLParams, WindowMonitorParams, WindowNavigateParams, WindowPageQueryParams, WindowPaginatedExtractionParams, WindowScrapeParams, WindowScreenshotParams, WindowScrollParams, WindowTypeParams, WindowWaitForPageParams } from '@airtop/core/resources/windows.js';
|
18
|
+
import { DeepOmit } from 'deep-utility-types';
|
18
19
|
export { DeepOmit } from 'deep-utility-types';
|
19
20
|
|
20
21
|
/**
|
@@ -58,7 +59,7 @@ interface CommonAirtopConfig {
|
|
58
59
|
* Configuration for defining the JSON schema output.
|
59
60
|
*/
|
60
61
|
interface OutputJsonSchemaConfig {
|
61
|
-
configuration
|
62
|
+
configuration?: {
|
62
63
|
/**
|
63
64
|
* JSON schema defining the structure of the output.
|
64
65
|
*/
|
@@ -458,16 +459,18 @@ interface WindowLoadUrlConfig extends Omit<WindowLoadURLParams, "sessionId" | "u
|
|
458
459
|
*/
|
459
460
|
interface WindowMonitorConfig extends Omit<WindowMonitorParams, "sessionId" | "condition"> {
|
460
461
|
}
|
462
|
+
interface WindowPageQueryParamsBase extends DeepOmit<WindowPageQueryParams, "sessionId" | "prompt" | "configuration.outputSchema"> {
|
463
|
+
}
|
461
464
|
/**
|
462
465
|
* Configuration parameters for performing a natural language query on page content.
|
463
466
|
*/
|
464
|
-
|
467
|
+
type WindowPageQueryConfig = WindowPageQueryParamsBase & OutputJsonSchemaConfig;
|
468
|
+
interface WindowPaginatedExtractionParamsBase extends DeepOmit<WindowPaginatedExtractionParams, "sessionId" | "prompt" | "configuration.outputSchema"> {
|
465
469
|
}
|
466
470
|
/**
|
467
471
|
* Configuration parameters for extracting paginated data from a window.
|
468
472
|
*/
|
469
|
-
|
470
|
-
}
|
473
|
+
type WindowPaginatedExtractionConfig = WindowPaginatedExtractionParamsBase & OutputJsonSchemaConfig;
|
471
474
|
/**
|
472
475
|
* Configuration parameters for scraping content from a window.
|
473
476
|
* Excludes session ID which is provided by the parent session.
|
@@ -893,7 +896,7 @@ declare class AirtopSessionClient extends AirtopBase {
|
|
893
896
|
* Returns the browser session ID.
|
894
897
|
*/
|
895
898
|
getSessionId(): string;
|
896
|
-
listWindows(requestOptions?: AirtopRequestOptions): Promise<
|
899
|
+
listWindows(requestOptions?: AirtopRequestOptions): Promise<WindowsResponse>;
|
897
900
|
/**
|
898
901
|
* Gets the state of the session using the attached session id.
|
899
902
|
* @param requestOptions - Request options
|
@@ -1121,6 +1124,8 @@ declare class AirtopMocks {
|
|
1121
1124
|
|
1122
1125
|
interface AirtopAgentCreateAgentParams extends Airtop.AgentCreateAgentParams {
|
1123
1126
|
}
|
1127
|
+
interface AirtopAgentGetAgentParams extends Airtop.AgentGetAgentParams {
|
1128
|
+
}
|
1124
1129
|
interface AirtopAgentGetAgentsParams extends Airtop.AgentGetAgentsParams {
|
1125
1130
|
}
|
1126
1131
|
interface AirtopAgentUpdateAgentParams extends Airtop.AgentUpdateAgentParams {
|
@@ -1137,6 +1142,8 @@ interface AirtopAgentGetVersionDataParams extends Airtop.AgentGetCurrentAgentVer
|
|
1137
1142
|
}
|
1138
1143
|
interface AirtopAgentUpdateVersionDataParams extends Omit<Airtop.AgentUpdateAgentVersionDataParams, "id"> {
|
1139
1144
|
}
|
1145
|
+
interface AirtopAgentPublishAgentParams extends Airtop.AgentPublishAgentParams {
|
1146
|
+
}
|
1140
1147
|
interface AirtopCreateAgentResponse extends Airtop.CreateAgentResponse {
|
1141
1148
|
}
|
1142
1149
|
interface AirtopGetAgentResponse extends Airtop.GetAgentResponse {
|
@@ -1155,7 +1162,7 @@ interface AirtopAgentResponse extends Airtop.GetAgentResponse {
|
|
1155
1162
|
}
|
1156
1163
|
interface AirtopCreateNewAgentDraftResponse extends Airtop.AgentCreateDraftResponse {
|
1157
1164
|
}
|
1158
|
-
interface AirtopPublishNewAgentResponse extends Airtop.
|
1165
|
+
interface AirtopPublishNewAgentResponse extends Airtop.AgentPublishDraftResponse {
|
1159
1166
|
}
|
1160
1167
|
interface AirtopGetAgentVersionDataResponse extends Airtop.AgentGetVersionDataResponse {
|
1161
1168
|
}
|
@@ -1184,7 +1191,7 @@ declare class AirtopAgentClient extends AirtopBase {
|
|
1184
1191
|
* @param requestOptions - Request options.
|
1185
1192
|
* @returns The agent data.
|
1186
1193
|
*/
|
1187
|
-
getAgent(agentId: string, requestOptions?: AirtopRequestOptions): Promise<AirtopGetAgentResponse>;
|
1194
|
+
getAgent(agentId: string, params?: AirtopAgentGetAgentParams, requestOptions?: AirtopRequestOptions): Promise<AirtopGetAgentResponse>;
|
1188
1195
|
/**
|
1189
1196
|
* Lists agents.
|
1190
1197
|
* @param params - Optional parameters for listing agents (e.g., pagination).
|
@@ -1204,7 +1211,7 @@ declare class AirtopAgentClient extends AirtopBase {
|
|
1204
1211
|
* @param agentId - The ID of the agent to publish.
|
1205
1212
|
* @returns The published version data
|
1206
1213
|
*/
|
1207
|
-
publishNewAgentVersion(agentId: string): Promise<AirtopPublishNewAgentResponse>;
|
1214
|
+
publishNewAgentVersion(agentId: string, params?: AirtopAgentPublishAgentParams, requestOptions?: AirtopRequestOptions): Promise<AirtopPublishNewAgentResponse>;
|
1208
1215
|
/**
|
1209
1216
|
* Retrieves the data for a specific version of an agent.
|
1210
1217
|
* @param agentId - The ID of the agent.
|
@@ -1433,4 +1440,4 @@ interface AirtopPluginRegistration {
|
|
1433
1440
|
*/
|
1434
1441
|
declare function registerAirtopPlugin(plugin: AirtopPluginRegistration): void;
|
1435
1442
|
|
1436
|
-
export { type AirtopAgentCancelInvocationParams, AirtopAgentClient, type AirtopAgentCreateAgentParams, type AirtopAgentCreateInvocationParams, type AirtopAgentDeleteAgentsParams, type AirtopAgentGetAgentsParams, type AirtopAgentGetInvocationsParams, type AirtopAgentGetVersionDataParams, type AirtopAgentResponse, type AirtopAgentUpdateAgentParams, type AirtopAgentUpdateVersionDataParams, type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopCreateAgentInvocationResponse, type AirtopCreateAgentResponse, type AirtopCreateNewAgentDraftResponse, type AirtopDeleteAgentsResponse, AirtopError, type AirtopFileListParams, type AirtopFileResponse, type AirtopFilesResponse, type AirtopGetAgentInvocationsResponse, type AirtopGetAgentResponse, type AirtopGetAgentVersionDataResponse, type AirtopGetAgentsResponse, AirtopMocks, AirtopNode, type AirtopNodeApiResponseData, AirtopPluginAugmentationType, type AirtopPluginRegistration, type AirtopPluginType, type AirtopProfile, type AirtopPublishNewAgentResponse, type AirtopRequestOptions, AirtopSession, AirtopSessionClient, type AirtopSessionClientPlugin, type AirtopSessionPlugin, type AirtopSessionResponse, type AirtopUpdateAgentResponse, type AirtopUpdateVersionDataResponse, AirtopWindow, AirtopWindowClient, type AirtopWindowClientPlugin, type AirtopWindowCreateResponse, type AirtopWindowGetInfoResponse, type AirtopWindowPlugin, AirtopWindowScreenshot, type AirtopWindowScreenshotPlugin, type AirtopWindowScreenshotResponse, type CommonAirtopConfig, type CommonResponse, type CommonWindowResponse, type CreateFileConfig, type CreateSessionConfig, type GetFilesConfig, type GetSessionsConfig, type OutputJsonSchemaConfig, type ScreenshotData, type SessionData, type SessionError, type SessionMetadata, type SessionServiceResponse, type SessionWarning, type WindowActConfig, type WindowActResponse, type WindowClickConfig, type WindowCreateData, type WindowCreateOptions, type WindowError, type WindowExtractConfig, type WindowExtractResponse, type WindowFillFormConfig, type WindowFindManyConfig, type WindowFindManyResponse, type WindowFindOneConfig, type WindowFindOneResponse, type WindowGetConfig, type WindowHoverConfig, type WindowInfoData, type WindowLlmConfig, type WindowLlmResponse, type WindowLoadUrlConfig, type WindowMetadata, type WindowMonitorConfig, type WindowNavigateConfig, WindowNavigateDirection, type WindowNavigateResponse, type WindowPageQueryConfig, type WindowPaginatedExtractionConfig, type WindowPromptResponse, type WindowScrapeConfig, type WindowScrapeResponse, type WindowScreenshotConfig, type WindowScrollConfig, type WindowTypeConfig, type WindowWaitForPageConfig, type WindowWaitForPageResponse, type WindowWarning, registerAirtopPlugin };
|
1443
|
+
export { type AirtopAgentCancelInvocationParams, AirtopAgentClient, type AirtopAgentCreateAgentParams, type AirtopAgentCreateInvocationParams, type AirtopAgentDeleteAgentsParams, type AirtopAgentGetAgentParams, type AirtopAgentGetAgentsParams, type AirtopAgentGetInvocationsParams, type AirtopAgentGetVersionDataParams, type AirtopAgentPublishAgentParams, type AirtopAgentResponse, type AirtopAgentUpdateAgentParams, type AirtopAgentUpdateVersionDataParams, type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopCreateAgentInvocationResponse, type AirtopCreateAgentResponse, type AirtopCreateNewAgentDraftResponse, type AirtopDeleteAgentsResponse, AirtopError, type AirtopFileListParams, type AirtopFileResponse, type AirtopFilesResponse, type AirtopGetAgentInvocationsResponse, type AirtopGetAgentResponse, type AirtopGetAgentVersionDataResponse, type AirtopGetAgentsResponse, AirtopMocks, AirtopNode, type AirtopNodeApiResponseData, AirtopPluginAugmentationType, type AirtopPluginRegistration, type AirtopPluginType, type AirtopProfile, type AirtopPublishNewAgentResponse, type AirtopRequestOptions, AirtopSession, AirtopSessionClient, type AirtopSessionClientPlugin, type AirtopSessionPlugin, type AirtopSessionResponse, type AirtopUpdateAgentResponse, type AirtopUpdateVersionDataResponse, AirtopWindow, AirtopWindowClient, type AirtopWindowClientPlugin, type AirtopWindowCreateResponse, type AirtopWindowGetInfoResponse, type AirtopWindowPlugin, AirtopWindowScreenshot, type AirtopWindowScreenshotPlugin, type AirtopWindowScreenshotResponse, type CommonAirtopConfig, type CommonResponse, type CommonWindowResponse, type CreateFileConfig, type CreateSessionConfig, type GetFilesConfig, type GetSessionsConfig, type OutputJsonSchemaConfig, type ScreenshotData, type SessionData, type SessionError, type SessionMetadata, type SessionServiceResponse, type SessionWarning, type WindowActConfig, type WindowActResponse, type WindowClickConfig, type WindowCreateData, type WindowCreateOptions, type WindowError, type WindowExtractConfig, type WindowExtractResponse, type WindowFillFormConfig, type WindowFindManyConfig, type WindowFindManyResponse, type WindowFindOneConfig, type WindowFindOneResponse, type WindowGetConfig, type WindowHoverConfig, type WindowInfoData, type WindowLlmConfig, type WindowLlmResponse, type WindowLoadUrlConfig, type WindowMetadata, type WindowMonitorConfig, type WindowNavigateConfig, WindowNavigateDirection, type WindowNavigateResponse, type WindowPageQueryConfig, type WindowPaginatedExtractionConfig, type WindowPromptResponse, type WindowScrapeConfig, type WindowScrapeResponse, type WindowScreenshotConfig, type WindowScrollConfig, type WindowTypeConfig, type WindowWaitForPageConfig, type WindowWaitForPageResponse, type WindowWarning, registerAirtopPlugin };
|
package/dist/index.js
CHANGED
@@ -9,7 +9,7 @@ var require_package = __commonJS({
|
|
9
9
|
module.exports = {
|
10
10
|
name: "@airtop/sdk",
|
11
11
|
description: "Airtop SDK for TypeScript",
|
12
|
-
version: "1.0.0-alpha2.
|
12
|
+
version: "1.0.0-alpha2.24",
|
13
13
|
type: "module",
|
14
14
|
main: "./dist/index.cjs",
|
15
15
|
module: "./dist/index.js",
|
@@ -48,7 +48,7 @@ var require_package = __commonJS({
|
|
48
48
|
},
|
49
49
|
dependencies: {
|
50
50
|
"@airtop/json-schema-adapter": "workspace:*",
|
51
|
-
"@airtop/core": "0.1.0-alpha.
|
51
|
+
"@airtop/core": "0.1.0-alpha.40",
|
52
52
|
"date-fns": "4.1.0",
|
53
53
|
loglayer: "6.6.0",
|
54
54
|
"serialize-error": "12.0.0",
|
@@ -1709,9 +1709,9 @@ var AirtopAgentClient = class extends AirtopBase {
|
|
1709
1709
|
* @param requestOptions - Request options.
|
1710
1710
|
* @returns The agent data.
|
1711
1711
|
*/
|
1712
|
-
async getAgent(agentId, requestOptions = {}) {
|
1712
|
+
async getAgent(agentId, params = {}, requestOptions = {}) {
|
1713
1713
|
this.log.withMetadata({ agentId }).info("Retrieving agent");
|
1714
|
-
return this.client.agents.getAgent(agentId, this.resolveRequestOptions(requestOptions));
|
1714
|
+
return this.client.agents.getAgent(agentId, params, this.resolveRequestOptions(requestOptions));
|
1715
1715
|
}
|
1716
1716
|
/**
|
1717
1717
|
* Lists agents.
|
@@ -1738,9 +1738,9 @@ var AirtopAgentClient = class extends AirtopBase {
|
|
1738
1738
|
* @param agentId - The ID of the agent to publish.
|
1739
1739
|
* @returns The published version data
|
1740
1740
|
*/
|
1741
|
-
async publishNewAgentVersion(agentId) {
|
1741
|
+
async publishNewAgentVersion(agentId, params = {}, requestOptions = {}) {
|
1742
1742
|
this.log.withMetadata({ agentId }).info("Publishing new version of agent");
|
1743
|
-
return this.client.agents.publishAgent(agentId, this.resolveRequestOptions());
|
1743
|
+
return this.client.agents.publishAgent(agentId, params, this.resolveRequestOptions(requestOptions));
|
1744
1744
|
}
|
1745
1745
|
/**
|
1746
1746
|
* Retrieves the data for a specific version of an agent.
|