@airtop/sdk 1.0.0-alpha2.21 → 1.0.0-alpha2.23
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 +79 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +64 -62
- package/dist/index.d.ts +64 -62
- package/dist/index.js +79 -53
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
@@ -8,13 +8,13 @@ import { Issue, SessionConfigV1, GetFileResponse, FilesResponse, ListAutomations
|
|
8
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';
|
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
|
-
import { SessionListParams, ProfileOutput, FileListParams, FileCreateFileParams, WindowIDData, EnvelopeDefaultMeta as EnvelopeDefaultMeta$1, Issue as Issue$1, WindowInfo, WindowGetParams, AIPromptResponse, ScrapeResponse } from '@airtop/core/resources/index.js';
|
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';
|
12
12
|
export { AIPromptResponse, ScrapeResponse } from '@airtop/core/resources/index.js';
|
13
13
|
import * as _airtop_core_resources_sessions_mjs from '@airtop/core/resources/sessions.mjs';
|
14
|
-
import { WindowClickParams, WindowHoverParams, WindowLoadURLParams, WindowMonitorParams, WindowScrapeParams, WindowScreenshotParams, WindowScrollParams, WindowTypeParams, WindowExtractParams, WindowActParams, WindowLlmParams, WindowFindOneParams, WindowFindManyParams, WindowWaitForPageParams, WindowNavigateParams, WindowFillFormParams } from '@airtop/core/resources/windows.js';
|
15
|
-
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';
|
16
14
|
import * as _airtop_core_resources_js from '@airtop/core/resources.js';
|
17
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';
|
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
18
|
export { DeepOmit } from 'deep-utility-types';
|
19
19
|
|
20
20
|
/**
|
@@ -214,7 +214,7 @@ interface AirtopConstructorConfig {
|
|
214
214
|
apiKey: string;
|
215
215
|
/**
|
216
216
|
* The base URL for the Airtop API.
|
217
|
-
* Defaults to https://api.airtop.ai/api
|
217
|
+
* Defaults to https://api.airtop.ai/api if not specified.
|
218
218
|
*/
|
219
219
|
airtopUrl?: string;
|
220
220
|
/**
|
@@ -359,6 +359,8 @@ interface CommonWindowResponse extends CommonResponse {
|
|
359
359
|
windowId: string;
|
360
360
|
};
|
361
361
|
}
|
362
|
+
interface WindowCreateOptions extends Omit<WindowCreateParams, "url"> {
|
363
|
+
}
|
362
364
|
/**
|
363
365
|
* The window data from creating a new window.
|
364
366
|
*/
|
@@ -920,7 +922,7 @@ declare class AirtopSessionClient extends AirtopBase {
|
|
920
922
|
* @param requestOptions - Request options
|
921
923
|
* @returns A new AirtopWindow<AirtopWindowCreateResponse> instance
|
922
924
|
*/
|
923
|
-
createWindow(url: string, requestOptions?: AirtopRequestOptions): Promise<AirtopWindow<AirtopWindowCreateResponse>>;
|
925
|
+
createWindow(url: string, createOptions?: WindowCreateOptions, requestOptions?: AirtopRequestOptions): Promise<AirtopWindow<AirtopWindowCreateResponse>>;
|
924
926
|
/**
|
925
927
|
* Returns a window client instance for making window-based requests for a given window id.
|
926
928
|
*
|
@@ -1125,17 +1127,15 @@ interface AirtopAgentUpdateAgentParams extends Airtop.AgentUpdateAgentParams {
|
|
1125
1127
|
}
|
1126
1128
|
interface AirtopAgentDeleteAgentsParams extends Airtop.AgentDeleteAgentsParams {
|
1127
1129
|
}
|
1128
|
-
interface AirtopAgentDuplicateAgentParams extends Airtop.AgentDuplicateAgentParams {
|
1129
|
-
}
|
1130
|
-
interface AirtopAgentCreateVersionParams extends Airtop.AgentCreateVersionParams {
|
1131
|
-
}
|
1132
|
-
interface AirtopAgentGetVersionsParams extends Airtop.AgentGetVersionsParams {
|
1133
|
-
}
|
1134
1130
|
interface AirtopAgentCreateInvocationParams extends Airtop.AgentCreateInvocationParams {
|
1135
1131
|
}
|
1136
1132
|
interface AirtopAgentGetInvocationsParams extends Airtop.AgentGetInvocationsParams {
|
1137
1133
|
}
|
1138
|
-
interface AirtopAgentCancelInvocationParams extends Airtop.AgentCancelInvocationParams {
|
1134
|
+
interface AirtopAgentCancelInvocationParams extends Omit<Airtop.AgentCancelInvocationParams, "id"> {
|
1135
|
+
}
|
1136
|
+
interface AirtopAgentGetVersionDataParams extends Airtop.AgentGetCurrentAgentVersionParams {
|
1137
|
+
}
|
1138
|
+
interface AirtopAgentUpdateVersionDataParams extends Omit<Airtop.AgentUpdateAgentVersionDataParams, "id"> {
|
1139
1139
|
}
|
1140
1140
|
interface AirtopCreateAgentResponse extends Airtop.CreateAgentResponse {
|
1141
1141
|
}
|
@@ -1147,18 +1147,20 @@ interface AirtopUpdateAgentResponse extends Airtop.UpdateAgentResponse {
|
|
1147
1147
|
}
|
1148
1148
|
interface AirtopDeleteAgentsResponse extends Airtop.DeleteResponse {
|
1149
1149
|
}
|
1150
|
-
interface AirtopDuplicateAgentResponse extends Airtop.DuplicateAgentResponse {
|
1151
|
-
}
|
1152
|
-
interface AirtopCreateAgentVersionResponse extends Airtop.CreateAgentVersionResponse {
|
1153
|
-
}
|
1154
|
-
interface AirtopGetAgentVersionsResponse extends Airtop.GetAgentVersionsResponse {
|
1155
|
-
}
|
1156
1150
|
interface AirtopCreateAgentInvocationResponse extends Airtop.CreateAgentInvocationResponse {
|
1157
1151
|
}
|
1158
1152
|
interface AirtopGetAgentInvocationsResponse extends Airtop.GetAgentInvocationsResponse {
|
1159
1153
|
}
|
1160
1154
|
interface AirtopAgentResponse extends Airtop.GetAgentResponse {
|
1161
1155
|
}
|
1156
|
+
interface AirtopCreateNewAgentDraftResponse extends Airtop.AgentCreateDraftResponse {
|
1157
|
+
}
|
1158
|
+
interface AirtopPublishNewAgentResponse extends Airtop.AgentPublishAgentResponse {
|
1159
|
+
}
|
1160
|
+
interface AirtopGetAgentVersionDataResponse extends Airtop.AgentGetVersionDataResponse {
|
1161
|
+
}
|
1162
|
+
interface AirtopUpdateVersionDataResponse extends Airtop.AgentUpdateVersionDataResponse {
|
1163
|
+
}
|
1162
1164
|
|
1163
1165
|
/**
|
1164
1166
|
* Client for making Agent-specific requests to the Airtop API.
|
@@ -1170,85 +1172,85 @@ declare class AirtopAgentClient extends AirtopBase {
|
|
1170
1172
|
*/
|
1171
1173
|
constructor(config: AirtopConstructorConfig);
|
1172
1174
|
/**
|
1173
|
-
* Creates a new agent.
|
1174
|
-
* @param params - Parameters for creating the agent.
|
1175
|
+
* Creates a new agent. A new draft version is created by default.
|
1176
|
+
* @param params - Parameters for creating the agent.
|
1175
1177
|
* @param requestOptions - Request options.
|
1176
|
-
* @returns The created agent data
|
1178
|
+
* @returns The created agent data.
|
1177
1179
|
*/
|
1178
1180
|
createAgent(params: AirtopAgentCreateAgentParams, requestOptions?: AirtopRequestOptions): Promise<AirtopCreateAgentResponse>;
|
1179
1181
|
/**
|
1180
1182
|
* Retrieves a specific agent by its ID.
|
1181
1183
|
* @param agentId - The ID of the agent to retrieve.
|
1182
1184
|
* @param requestOptions - Request options.
|
1183
|
-
* @returns The agent data
|
1185
|
+
* @returns The agent data.
|
1184
1186
|
*/
|
1185
|
-
getAgent(agentId: string,
|
1186
|
-
requestOptions?: AirtopRequestOptions): Promise<AirtopGetAgentResponse>;
|
1187
|
+
getAgent(agentId: string, requestOptions?: AirtopRequestOptions): Promise<AirtopGetAgentResponse>;
|
1187
1188
|
/**
|
1188
1189
|
* Lists agents.
|
1189
|
-
* @param params - Optional parameters for listing agents (e.g., pagination).
|
1190
|
+
* @param params - Optional parameters for listing agents (e.g., pagination).
|
1190
1191
|
* @param requestOptions - Request options.
|
1191
|
-
* @returns A list of agents
|
1192
|
+
* @returns A list of agents.
|
1192
1193
|
*/
|
1193
1194
|
listAgents(params?: AirtopAgentGetAgentsParams, requestOptions?: AirtopRequestOptions): Promise<AirtopGetAgentsResponse>;
|
1194
1195
|
/**
|
1195
|
-
*
|
1196
|
-
* @param agentId - The ID of the agent to
|
1197
|
-
* @param params - The new data for the agent. Corresponds to `AirtopAgentUpdateAgentParams`.
|
1196
|
+
* Creates a new draft version of an agent. If one already exists, does nothing.
|
1197
|
+
* @param agentId - The ID of the agent for which to create a new draft version.
|
1198
1198
|
* @param requestOptions - Request options.
|
1199
|
-
* @returns The
|
1199
|
+
* @returns The draft version data.
|
1200
1200
|
*/
|
1201
|
-
|
1202
|
-
params: AirtopAgentUpdateAgentParams, requestOptions?: AirtopRequestOptions): Promise<AirtopUpdateAgentResponse>;
|
1201
|
+
createNewAgentDraftVersion(agentId: string, requestOptions?: AirtopRequestOptions): Promise<AirtopCreateNewAgentDraftResponse>;
|
1203
1202
|
/**
|
1204
|
-
*
|
1205
|
-
* @param
|
1203
|
+
* Publishes a new version of an agent from the current draft.
|
1204
|
+
* @param agentId - The ID of the agent to publish.
|
1205
|
+
* @returns The published version data
|
1206
|
+
*/
|
1207
|
+
publishNewAgentVersion(agentId: string): Promise<AirtopPublishNewAgentResponse>;
|
1208
|
+
/**
|
1209
|
+
* Retrieves the data for a specific version of an agent.
|
1210
|
+
* @param agentId - The ID of the agent.
|
1211
|
+
* @param version - The version number of the agent to retrieve.
|
1206
1212
|
* @param requestOptions - Request options.
|
1207
|
-
* @returns
|
1213
|
+
* @returns The agent version data.
|
1208
1214
|
*/
|
1209
|
-
|
1215
|
+
getAgentVersionData(agentId: string, version: number, requestOptions?: AirtopRequestOptions): Promise<AirtopGetAgentVersionDataResponse>;
|
1216
|
+
updateAgentVersionData(agentId: string, version: number, params: AirtopAgentUpdateVersionDataParams, requestOptions?: AirtopRequestOptions): Promise<AirtopUpdateVersionDataResponse>;
|
1210
1217
|
/**
|
1211
|
-
*
|
1212
|
-
* @param agentId - The ID of the agent
|
1213
|
-
* @param params -
|
1218
|
+
* Retrieves the current version data of an agent. This is the version that is currently active or in draft state.
|
1219
|
+
* @param agentId - The ID of the agent.
|
1220
|
+
* @param params - Optional parameters for retrieving the version data.
|
1214
1221
|
* @param requestOptions - Request options.
|
1215
|
-
* @returns The
|
1222
|
+
* @returns The current agent version data
|
1216
1223
|
*/
|
1217
|
-
|
1218
|
-
params: AirtopAgentDuplicateAgentParams, requestOptions?: AirtopRequestOptions): Promise<AirtopDuplicateAgentResponse>;
|
1224
|
+
getCurrentAgentVersionData(agentId: string, params?: AirtopAgentGetVersionDataParams, requestOptions?: AirtopRequestOptions): Promise<_airtop_core_resources_shared_mjs.AgentGetCurrentVersionDataResponse>;
|
1219
1225
|
/**
|
1220
|
-
*
|
1221
|
-
* @param agentId - The ID of the agent
|
1222
|
-
* @param params -
|
1226
|
+
* Updates an existing agent.
|
1227
|
+
* @param agentId - The ID of the agent to update.
|
1228
|
+
* @param params - The new data for the agent.
|
1223
1229
|
* @param requestOptions - Request options.
|
1224
|
-
* @returns The
|
1230
|
+
* @returns The updated agent data.
|
1225
1231
|
*/
|
1226
|
-
|
1227
|
-
params: AirtopAgentCreateVersionParams, requestOptions?: AirtopRequestOptions): Promise<AirtopCreateAgentVersionResponse>;
|
1232
|
+
updateAgent(agentId: string, params: AirtopAgentUpdateAgentParams, requestOptions?: AirtopRequestOptions): Promise<AirtopUpdateAgentResponse>;
|
1228
1233
|
/**
|
1229
|
-
*
|
1230
|
-
* @param
|
1231
|
-
* @param params - Optional parameters for listing agent versions. Corresponds to `AirtopAgentGetVersionsParams`.
|
1234
|
+
* Deletes one or more agents.
|
1235
|
+
* @param params - Parameters for deleting agents.
|
1232
1236
|
* @param requestOptions - Request options.
|
1233
|
-
* @returns A
|
1237
|
+
* @returns A response confirming the deletion.
|
1234
1238
|
*/
|
1235
|
-
|
1236
|
-
params?: AirtopAgentGetVersionsParams, requestOptions?: AirtopRequestOptions): Promise<AirtopGetAgentVersionsResponse>;
|
1239
|
+
deleteAgents(params: AirtopAgentDeleteAgentsParams, requestOptions?: AirtopRequestOptions): Promise<AirtopDeleteAgentsResponse>;
|
1237
1240
|
/**
|
1238
1241
|
* Creates an invocation for an agent.
|
1239
1242
|
* @param agentId - The ID of the agent for which to create an invocation.
|
1240
|
-
* @param params - Parameters for creating the agent invocation.
|
1243
|
+
* @param params - Parameters for creating the agent invocation.
|
1241
1244
|
* @param requestOptions - Request options.
|
1242
|
-
* @returns The created agent invocation data
|
1245
|
+
* @returns The created agent invocation data.
|
1243
1246
|
*/
|
1244
|
-
createAgentInvocation(agentId: string,
|
1245
|
-
params: AirtopAgentCreateInvocationParams, requestOptions?: AirtopRequestOptions): Promise<AirtopCreateAgentInvocationResponse>;
|
1247
|
+
createAgentInvocation(agentId: string, params: AirtopAgentCreateInvocationParams, requestOptions?: AirtopRequestOptions): Promise<AirtopCreateAgentInvocationResponse>;
|
1246
1248
|
/**
|
1247
1249
|
* Lists invocations of an agent.
|
1248
1250
|
* @param agentIds - The ID of the agent whose invocations to list.
|
1249
|
-
* @param params - Optional parameters for listing agent invocations.
|
1251
|
+
* @param params - Optional parameters for listing agent invocations.
|
1250
1252
|
* @param requestOptions - Request options.
|
1251
|
-
* @returns A list of agent invocations
|
1253
|
+
* @returns A list of agent invocations.
|
1252
1254
|
*/
|
1253
1255
|
listAgentInvocations(agentIds: string, // Renamed
|
1254
1256
|
params?: AirtopAgentGetInvocationsParams, requestOptions?: AirtopRequestOptions): Promise<AirtopGetAgentInvocationsResponse>;
|
@@ -1256,7 +1258,7 @@ declare class AirtopAgentClient extends AirtopBase {
|
|
1256
1258
|
* Cancels a specific invocation of an agent.
|
1257
1259
|
* @param agentId - The ID of the agent.
|
1258
1260
|
* @param invocationId - The ID of the invocation to cancel.
|
1259
|
-
* @param paramsBody - Optional body parameters for cancelling the invocation.
|
1261
|
+
* @param paramsBody - Optional body parameters for cancelling the invocation.
|
1260
1262
|
* @param requestOptions - Request options.
|
1261
1263
|
* @returns A promise that resolves when the operation is complete.
|
1262
1264
|
*/
|
@@ -1431,4 +1433,4 @@ interface AirtopPluginRegistration {
|
|
1431
1433
|
*/
|
1432
1434
|
declare function registerAirtopPlugin(plugin: AirtopPluginRegistration): void;
|
1433
1435
|
|
1434
|
-
export { type AirtopAgentCancelInvocationParams, AirtopAgentClient, type AirtopAgentCreateAgentParams, type AirtopAgentCreateInvocationParams, type
|
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 };
|
package/dist/index.d.ts
CHANGED
@@ -8,13 +8,13 @@ import { Issue, SessionConfigV1, GetFileResponse, FilesResponse, ListAutomations
|
|
8
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';
|
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
|
-
import { SessionListParams, ProfileOutput, FileListParams, FileCreateFileParams, WindowIDData, EnvelopeDefaultMeta as EnvelopeDefaultMeta$1, Issue as Issue$1, WindowInfo, WindowGetParams, AIPromptResponse, ScrapeResponse } from '@airtop/core/resources/index.js';
|
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';
|
12
12
|
export { AIPromptResponse, ScrapeResponse } from '@airtop/core/resources/index.js';
|
13
13
|
import * as _airtop_core_resources_sessions_mjs from '@airtop/core/resources/sessions.mjs';
|
14
|
-
import { WindowClickParams, WindowHoverParams, WindowLoadURLParams, WindowMonitorParams, WindowScrapeParams, WindowScreenshotParams, WindowScrollParams, WindowTypeParams, WindowExtractParams, WindowActParams, WindowLlmParams, WindowFindOneParams, WindowFindManyParams, WindowWaitForPageParams, WindowNavigateParams, WindowFillFormParams } from '@airtop/core/resources/windows.js';
|
15
|
-
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';
|
16
14
|
import * as _airtop_core_resources_js from '@airtop/core/resources.js';
|
17
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';
|
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
18
|
export { DeepOmit } from 'deep-utility-types';
|
19
19
|
|
20
20
|
/**
|
@@ -214,7 +214,7 @@ interface AirtopConstructorConfig {
|
|
214
214
|
apiKey: string;
|
215
215
|
/**
|
216
216
|
* The base URL for the Airtop API.
|
217
|
-
* Defaults to https://api.airtop.ai/api
|
217
|
+
* Defaults to https://api.airtop.ai/api if not specified.
|
218
218
|
*/
|
219
219
|
airtopUrl?: string;
|
220
220
|
/**
|
@@ -359,6 +359,8 @@ interface CommonWindowResponse extends CommonResponse {
|
|
359
359
|
windowId: string;
|
360
360
|
};
|
361
361
|
}
|
362
|
+
interface WindowCreateOptions extends Omit<WindowCreateParams, "url"> {
|
363
|
+
}
|
362
364
|
/**
|
363
365
|
* The window data from creating a new window.
|
364
366
|
*/
|
@@ -920,7 +922,7 @@ declare class AirtopSessionClient extends AirtopBase {
|
|
920
922
|
* @param requestOptions - Request options
|
921
923
|
* @returns A new AirtopWindow<AirtopWindowCreateResponse> instance
|
922
924
|
*/
|
923
|
-
createWindow(url: string, requestOptions?: AirtopRequestOptions): Promise<AirtopWindow<AirtopWindowCreateResponse>>;
|
925
|
+
createWindow(url: string, createOptions?: WindowCreateOptions, requestOptions?: AirtopRequestOptions): Promise<AirtopWindow<AirtopWindowCreateResponse>>;
|
924
926
|
/**
|
925
927
|
* Returns a window client instance for making window-based requests for a given window id.
|
926
928
|
*
|
@@ -1125,17 +1127,15 @@ interface AirtopAgentUpdateAgentParams extends Airtop.AgentUpdateAgentParams {
|
|
1125
1127
|
}
|
1126
1128
|
interface AirtopAgentDeleteAgentsParams extends Airtop.AgentDeleteAgentsParams {
|
1127
1129
|
}
|
1128
|
-
interface AirtopAgentDuplicateAgentParams extends Airtop.AgentDuplicateAgentParams {
|
1129
|
-
}
|
1130
|
-
interface AirtopAgentCreateVersionParams extends Airtop.AgentCreateVersionParams {
|
1131
|
-
}
|
1132
|
-
interface AirtopAgentGetVersionsParams extends Airtop.AgentGetVersionsParams {
|
1133
|
-
}
|
1134
1130
|
interface AirtopAgentCreateInvocationParams extends Airtop.AgentCreateInvocationParams {
|
1135
1131
|
}
|
1136
1132
|
interface AirtopAgentGetInvocationsParams extends Airtop.AgentGetInvocationsParams {
|
1137
1133
|
}
|
1138
|
-
interface AirtopAgentCancelInvocationParams extends Airtop.AgentCancelInvocationParams {
|
1134
|
+
interface AirtopAgentCancelInvocationParams extends Omit<Airtop.AgentCancelInvocationParams, "id"> {
|
1135
|
+
}
|
1136
|
+
interface AirtopAgentGetVersionDataParams extends Airtop.AgentGetCurrentAgentVersionParams {
|
1137
|
+
}
|
1138
|
+
interface AirtopAgentUpdateVersionDataParams extends Omit<Airtop.AgentUpdateAgentVersionDataParams, "id"> {
|
1139
1139
|
}
|
1140
1140
|
interface AirtopCreateAgentResponse extends Airtop.CreateAgentResponse {
|
1141
1141
|
}
|
@@ -1147,18 +1147,20 @@ interface AirtopUpdateAgentResponse extends Airtop.UpdateAgentResponse {
|
|
1147
1147
|
}
|
1148
1148
|
interface AirtopDeleteAgentsResponse extends Airtop.DeleteResponse {
|
1149
1149
|
}
|
1150
|
-
interface AirtopDuplicateAgentResponse extends Airtop.DuplicateAgentResponse {
|
1151
|
-
}
|
1152
|
-
interface AirtopCreateAgentVersionResponse extends Airtop.CreateAgentVersionResponse {
|
1153
|
-
}
|
1154
|
-
interface AirtopGetAgentVersionsResponse extends Airtop.GetAgentVersionsResponse {
|
1155
|
-
}
|
1156
1150
|
interface AirtopCreateAgentInvocationResponse extends Airtop.CreateAgentInvocationResponse {
|
1157
1151
|
}
|
1158
1152
|
interface AirtopGetAgentInvocationsResponse extends Airtop.GetAgentInvocationsResponse {
|
1159
1153
|
}
|
1160
1154
|
interface AirtopAgentResponse extends Airtop.GetAgentResponse {
|
1161
1155
|
}
|
1156
|
+
interface AirtopCreateNewAgentDraftResponse extends Airtop.AgentCreateDraftResponse {
|
1157
|
+
}
|
1158
|
+
interface AirtopPublishNewAgentResponse extends Airtop.AgentPublishAgentResponse {
|
1159
|
+
}
|
1160
|
+
interface AirtopGetAgentVersionDataResponse extends Airtop.AgentGetVersionDataResponse {
|
1161
|
+
}
|
1162
|
+
interface AirtopUpdateVersionDataResponse extends Airtop.AgentUpdateVersionDataResponse {
|
1163
|
+
}
|
1162
1164
|
|
1163
1165
|
/**
|
1164
1166
|
* Client for making Agent-specific requests to the Airtop API.
|
@@ -1170,85 +1172,85 @@ declare class AirtopAgentClient extends AirtopBase {
|
|
1170
1172
|
*/
|
1171
1173
|
constructor(config: AirtopConstructorConfig);
|
1172
1174
|
/**
|
1173
|
-
* Creates a new agent.
|
1174
|
-
* @param params - Parameters for creating the agent.
|
1175
|
+
* Creates a new agent. A new draft version is created by default.
|
1176
|
+
* @param params - Parameters for creating the agent.
|
1175
1177
|
* @param requestOptions - Request options.
|
1176
|
-
* @returns The created agent data
|
1178
|
+
* @returns The created agent data.
|
1177
1179
|
*/
|
1178
1180
|
createAgent(params: AirtopAgentCreateAgentParams, requestOptions?: AirtopRequestOptions): Promise<AirtopCreateAgentResponse>;
|
1179
1181
|
/**
|
1180
1182
|
* Retrieves a specific agent by its ID.
|
1181
1183
|
* @param agentId - The ID of the agent to retrieve.
|
1182
1184
|
* @param requestOptions - Request options.
|
1183
|
-
* @returns The agent data
|
1185
|
+
* @returns The agent data.
|
1184
1186
|
*/
|
1185
|
-
getAgent(agentId: string,
|
1186
|
-
requestOptions?: AirtopRequestOptions): Promise<AirtopGetAgentResponse>;
|
1187
|
+
getAgent(agentId: string, requestOptions?: AirtopRequestOptions): Promise<AirtopGetAgentResponse>;
|
1187
1188
|
/**
|
1188
1189
|
* Lists agents.
|
1189
|
-
* @param params - Optional parameters for listing agents (e.g., pagination).
|
1190
|
+
* @param params - Optional parameters for listing agents (e.g., pagination).
|
1190
1191
|
* @param requestOptions - Request options.
|
1191
|
-
* @returns A list of agents
|
1192
|
+
* @returns A list of agents.
|
1192
1193
|
*/
|
1193
1194
|
listAgents(params?: AirtopAgentGetAgentsParams, requestOptions?: AirtopRequestOptions): Promise<AirtopGetAgentsResponse>;
|
1194
1195
|
/**
|
1195
|
-
*
|
1196
|
-
* @param agentId - The ID of the agent to
|
1197
|
-
* @param params - The new data for the agent. Corresponds to `AirtopAgentUpdateAgentParams`.
|
1196
|
+
* Creates a new draft version of an agent. If one already exists, does nothing.
|
1197
|
+
* @param agentId - The ID of the agent for which to create a new draft version.
|
1198
1198
|
* @param requestOptions - Request options.
|
1199
|
-
* @returns The
|
1199
|
+
* @returns The draft version data.
|
1200
1200
|
*/
|
1201
|
-
|
1202
|
-
params: AirtopAgentUpdateAgentParams, requestOptions?: AirtopRequestOptions): Promise<AirtopUpdateAgentResponse>;
|
1201
|
+
createNewAgentDraftVersion(agentId: string, requestOptions?: AirtopRequestOptions): Promise<AirtopCreateNewAgentDraftResponse>;
|
1203
1202
|
/**
|
1204
|
-
*
|
1205
|
-
* @param
|
1203
|
+
* Publishes a new version of an agent from the current draft.
|
1204
|
+
* @param agentId - The ID of the agent to publish.
|
1205
|
+
* @returns The published version data
|
1206
|
+
*/
|
1207
|
+
publishNewAgentVersion(agentId: string): Promise<AirtopPublishNewAgentResponse>;
|
1208
|
+
/**
|
1209
|
+
* Retrieves the data for a specific version of an agent.
|
1210
|
+
* @param agentId - The ID of the agent.
|
1211
|
+
* @param version - The version number of the agent to retrieve.
|
1206
1212
|
* @param requestOptions - Request options.
|
1207
|
-
* @returns
|
1213
|
+
* @returns The agent version data.
|
1208
1214
|
*/
|
1209
|
-
|
1215
|
+
getAgentVersionData(agentId: string, version: number, requestOptions?: AirtopRequestOptions): Promise<AirtopGetAgentVersionDataResponse>;
|
1216
|
+
updateAgentVersionData(agentId: string, version: number, params: AirtopAgentUpdateVersionDataParams, requestOptions?: AirtopRequestOptions): Promise<AirtopUpdateVersionDataResponse>;
|
1210
1217
|
/**
|
1211
|
-
*
|
1212
|
-
* @param agentId - The ID of the agent
|
1213
|
-
* @param params -
|
1218
|
+
* Retrieves the current version data of an agent. This is the version that is currently active or in draft state.
|
1219
|
+
* @param agentId - The ID of the agent.
|
1220
|
+
* @param params - Optional parameters for retrieving the version data.
|
1214
1221
|
* @param requestOptions - Request options.
|
1215
|
-
* @returns The
|
1222
|
+
* @returns The current agent version data
|
1216
1223
|
*/
|
1217
|
-
|
1218
|
-
params: AirtopAgentDuplicateAgentParams, requestOptions?: AirtopRequestOptions): Promise<AirtopDuplicateAgentResponse>;
|
1224
|
+
getCurrentAgentVersionData(agentId: string, params?: AirtopAgentGetVersionDataParams, requestOptions?: AirtopRequestOptions): Promise<_airtop_core_resources_shared_mjs.AgentGetCurrentVersionDataResponse>;
|
1219
1225
|
/**
|
1220
|
-
*
|
1221
|
-
* @param agentId - The ID of the agent
|
1222
|
-
* @param params -
|
1226
|
+
* Updates an existing agent.
|
1227
|
+
* @param agentId - The ID of the agent to update.
|
1228
|
+
* @param params - The new data for the agent.
|
1223
1229
|
* @param requestOptions - Request options.
|
1224
|
-
* @returns The
|
1230
|
+
* @returns The updated agent data.
|
1225
1231
|
*/
|
1226
|
-
|
1227
|
-
params: AirtopAgentCreateVersionParams, requestOptions?: AirtopRequestOptions): Promise<AirtopCreateAgentVersionResponse>;
|
1232
|
+
updateAgent(agentId: string, params: AirtopAgentUpdateAgentParams, requestOptions?: AirtopRequestOptions): Promise<AirtopUpdateAgentResponse>;
|
1228
1233
|
/**
|
1229
|
-
*
|
1230
|
-
* @param
|
1231
|
-
* @param params - Optional parameters for listing agent versions. Corresponds to `AirtopAgentGetVersionsParams`.
|
1234
|
+
* Deletes one or more agents.
|
1235
|
+
* @param params - Parameters for deleting agents.
|
1232
1236
|
* @param requestOptions - Request options.
|
1233
|
-
* @returns A
|
1237
|
+
* @returns A response confirming the deletion.
|
1234
1238
|
*/
|
1235
|
-
|
1236
|
-
params?: AirtopAgentGetVersionsParams, requestOptions?: AirtopRequestOptions): Promise<AirtopGetAgentVersionsResponse>;
|
1239
|
+
deleteAgents(params: AirtopAgentDeleteAgentsParams, requestOptions?: AirtopRequestOptions): Promise<AirtopDeleteAgentsResponse>;
|
1237
1240
|
/**
|
1238
1241
|
* Creates an invocation for an agent.
|
1239
1242
|
* @param agentId - The ID of the agent for which to create an invocation.
|
1240
|
-
* @param params - Parameters for creating the agent invocation.
|
1243
|
+
* @param params - Parameters for creating the agent invocation.
|
1241
1244
|
* @param requestOptions - Request options.
|
1242
|
-
* @returns The created agent invocation data
|
1245
|
+
* @returns The created agent invocation data.
|
1243
1246
|
*/
|
1244
|
-
createAgentInvocation(agentId: string,
|
1245
|
-
params: AirtopAgentCreateInvocationParams, requestOptions?: AirtopRequestOptions): Promise<AirtopCreateAgentInvocationResponse>;
|
1247
|
+
createAgentInvocation(agentId: string, params: AirtopAgentCreateInvocationParams, requestOptions?: AirtopRequestOptions): Promise<AirtopCreateAgentInvocationResponse>;
|
1246
1248
|
/**
|
1247
1249
|
* Lists invocations of an agent.
|
1248
1250
|
* @param agentIds - The ID of the agent whose invocations to list.
|
1249
|
-
* @param params - Optional parameters for listing agent invocations.
|
1251
|
+
* @param params - Optional parameters for listing agent invocations.
|
1250
1252
|
* @param requestOptions - Request options.
|
1251
|
-
* @returns A list of agent invocations
|
1253
|
+
* @returns A list of agent invocations.
|
1252
1254
|
*/
|
1253
1255
|
listAgentInvocations(agentIds: string, // Renamed
|
1254
1256
|
params?: AirtopAgentGetInvocationsParams, requestOptions?: AirtopRequestOptions): Promise<AirtopGetAgentInvocationsResponse>;
|
@@ -1256,7 +1258,7 @@ declare class AirtopAgentClient extends AirtopBase {
|
|
1256
1258
|
* Cancels a specific invocation of an agent.
|
1257
1259
|
* @param agentId - The ID of the agent.
|
1258
1260
|
* @param invocationId - The ID of the invocation to cancel.
|
1259
|
-
* @param paramsBody - Optional body parameters for cancelling the invocation.
|
1261
|
+
* @param paramsBody - Optional body parameters for cancelling the invocation.
|
1260
1262
|
* @param requestOptions - Request options.
|
1261
1263
|
* @returns A promise that resolves when the operation is complete.
|
1262
1264
|
*/
|
@@ -1431,4 +1433,4 @@ interface AirtopPluginRegistration {
|
|
1431
1433
|
*/
|
1432
1434
|
declare function registerAirtopPlugin(plugin: AirtopPluginRegistration): void;
|
1433
1435
|
|
1434
|
-
export { type AirtopAgentCancelInvocationParams, AirtopAgentClient, type AirtopAgentCreateAgentParams, type AirtopAgentCreateInvocationParams, type
|
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 };
|