@airtop/sdk 1.0.0-alpha2.19 → 1.0.0-alpha2.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1085,173 +1085,31 @@ declare class AirtopClient extends AirtopBase {
1085
1085
  }
1086
1086
 
1087
1087
  /**
1088
- * Enumeration of available plugin augmentation types.
1089
- * Determines which part of the SDK a plugin can extend.
1090
- * @group Plugin Development
1091
- */
1092
- declare enum AirtopPluginAugmentationType {
1093
- /** Plugin for extending the AirtopClient class */
1094
- AirtopClient = "AirtopClient",
1095
- /** Plugin for extending AirtopWindowClient class functionality */
1096
- AirtopWindowClient = "AirtopWindowClient",
1097
- /** Plugin for extending AirtopWindow class functionality */
1098
- AirtopWindow = "AirtopWindow",
1099
- /** Plugin for extending AirtopSession class functionality */
1100
- AirtopSessionClient = "AirtopSessionClient",
1101
- /** Plugin for extending AirtopSession class functionality */
1102
- AirtopSession = "AirtopSession",
1103
- /** Plugin for extending AirtopWindowScreenshot class functionality */
1104
- AirtopWindowScreenshot = "AirtopWindowScreenshot"
1105
- }
1106
- /**
1107
- * Interface for plugins that extend the main AirtopClient class.
1108
- * Plugins allow you to add custom functionality to the AirtopClient prototype.
1109
- *
1110
- * @group Plugin Development
1111
- */
1112
- interface AirtopClientPlugin {
1113
- /**
1114
- * Specifies that this plugin augments the main AirtopClient class.
1115
- * This type discrimination allows TypeScript to properly type-check plugin usage.
1116
- */
1117
- augmentationType: AirtopPluginAugmentationType.AirtopClient;
1118
- /**
1119
- * Function that performs the augmentation of the AirtopClient prototype.
1120
- *
1121
- * @param prototype - The AirtopClient class prototype being augmented
1122
- */
1123
- augment: (prototype: typeof AirtopClient.prototype) => void;
1124
- }
1125
- /**
1126
- * Interface for plugins that extend the AirtopWindowClient class functionality.
1127
- * These plugins can modify or enhance the behavior of all window instances
1128
- * by modifying the prototype.
1129
- *
1130
- * @group Plugin Development
1131
- */
1132
- interface AirtopWindowClientPlugin {
1133
- /**
1134
- * Specifies that this plugin augments AirtopWindowClient class functionality.
1135
- * This type discrimination ensures proper type checking when using window plugins.
1136
- */
1137
- augmentationType: AirtopPluginAugmentationType.AirtopWindowClient;
1138
- /**
1139
- * Function that performs the augmentation of the AirtopWindowClient prototype.
1140
- *
1141
- * @param prototype - The AirtopWindowClient class prototype being augmented
1142
- */
1143
- augment: (prototype: typeof AirtopWindowClient.prototype) => void;
1144
- }
1145
- /**
1146
- * Interface for plugins that extend the AirtopSessionClient class functionality.
1147
- * These plugins can modify or enhance the behavior of all session instances
1148
- * by modifying the prototype.
1149
- *
1150
- * @group Plugin Development
1151
- */
1152
- interface AirtopSessionClientPlugin {
1153
- /**
1154
- * Specifies that this plugin augments AirtopSessionClient class functionality.
1155
- * This type discrimination ensures proper type checking when using session plugins.
1156
- */
1157
- augmentationType: AirtopPluginAugmentationType.AirtopSessionClient;
1158
- /**
1159
- * Function that performs the augmentation of the AirtopSessionClient prototype.
1160
- *
1161
- * @param prototype - The AirtopSessionClient class prototype being augmented
1162
- */
1163
- augment: (prototype: typeof AirtopSessionClient.prototype) => void;
1164
- }
1165
- /**
1166
- * Interface for plugins that extend the AirtopWindow class functionality.
1167
- * These plugins can modify or enhance the behavior of window instances
1168
- * by modifying the prototype.
1169
- *
1170
- * @group Plugin Development
1171
- */
1172
- interface AirtopWindowPlugin {
1173
- /**
1174
- * Specifies that this plugin augments AirtopWindow class functionality.
1175
- * This type discrimination ensures proper type checking when using window plugins.
1176
- */
1177
- augmentationType: AirtopPluginAugmentationType.AirtopWindow;
1178
- /**
1179
- * Function that performs the augmentation of the AirtopWindow prototype.
1180
- *
1181
- * @param prototype - The AirtopWindow class prototype being augmented
1182
- */
1183
- augment: (prototype: typeof AirtopWindow.prototype) => void;
1184
- }
1185
- /**
1186
- * Interface for plugins that extend the AirtopSession class functionality.
1187
- * These plugins can modify or enhance the behavior of session instances
1188
- * by modifying the prototype.
1189
- *
1190
- * @group Plugin Development
1088
+ * Provides utility methods for creating mock instances of Airtop classes.
1089
+ * @hideconstructor
1191
1090
  */
1192
- interface AirtopSessionPlugin {
1193
- /**
1194
- * Specifies that this plugin augments AirtopSession class functionality.
1195
- * This type discrimination ensures proper type checking when using session plugins.
1196
- */
1197
- augmentationType: AirtopPluginAugmentationType.AirtopSession;
1091
+ declare class AirtopMocks {
1198
1092
  /**
1199
- * Function that performs the augmentation of the AirtopSession prototype.
1200
- *
1201
- * @param prototype - The AirtopSession class prototype being augmented
1093
+ * Creates an AirtopBase instance (the class used as the base for other Airtop classes) with a mock client and logger.
1202
1094
  */
1203
- augment: (prototype: typeof AirtopSession.prototype) => void;
1204
- }
1205
- /**
1206
- * Interface for plugins that extend the AirtopWindowScreenshot class functionality.
1207
- * These plugins can modify or enhance the behavior of screenshot instances
1208
- * by modifying the prototype.
1209
- *
1210
- * @group Plugin Development
1211
- */
1212
- interface AirtopWindowScreenshotPlugin {
1095
+ static getAirtopBaseMock(config?: Partial<CommonAirtopConfig>): AirtopBase;
1213
1096
  /**
1214
- * Specifies that this plugin augments AirtopWindowScreenshot class functionality.
1215
- * This type discrimination ensures proper type checking when using screenshot plugins.
1097
+ * Creates an Airtop instance with a mock client and data.
1216
1098
  */
1217
- augmentationType: AirtopPluginAugmentationType.AirtopWindowScreenshot;
1099
+ static getAirtopClientMock(config?: Partial<AirtopConstructorConfig>): AirtopClient;
1218
1100
  /**
1219
- * Function that performs the augmentation of the AirtopWindowScreenshot prototype.
1220
- *
1221
- * @param prototype - The AirtopWindowScreenshot class prototype being augmented
1101
+ * Creates an AirtopSession instance with a mock client and data.
1222
1102
  */
1223
- augment: (prototype: typeof AirtopWindowScreenshot.prototype) => void;
1224
- }
1225
- /**
1226
- * Union type of all possible plugin types.
1227
- * Used when handling plugins generically.
1228
- *
1229
- * @group Plugin Development
1230
- *
1231
- * @see {@link AirtopClientPlugin | AirtopClientPlugin}
1232
- * @see {@link AirtopWindowClientPlugin | AirtopWindowClientPlugin}
1233
- * @see {@link AirtopSessionClientPlugin | AirtopSessionClientPlugin}
1234
- * @see {@link AirtopWindowPlugin | AirtopWindowPlugin}
1235
- * @see {@link AirtopSessionPlugin | AirtopSessionPlugin}
1236
- * @see {@link AirtopWindowScreenshotPlugin | AirtopWindowScreenshotPlugin}
1237
- */
1238
- type AirtopPluginType = AirtopClientPlugin | AirtopWindowClientPlugin | AirtopSessionClientPlugin | AirtopWindowPlugin | AirtopSessionPlugin | AirtopWindowScreenshotPlugin;
1239
- /**
1240
- * Interface for registering plugins with the SDK.
1241
- */
1242
- interface AirtopPluginRegistration {
1103
+ static getAirtopSessionMock(responseData?: Partial<AirtopSessionResponse>): AirtopSession;
1243
1104
  /**
1244
- * Array of plugins to add to the SDK.
1105
+ * Creates an AirtopWindow instance with a mock client and data.
1245
1106
  */
1246
- pluginsToAdd: AirtopPluginType[];
1107
+ static getAirtopWindowMock({ sessionId, windowData, }?: {
1108
+ sessionId?: string;
1109
+ windowData?: AirtopWindowGetInfoResponse;
1110
+ }): AirtopWindow<AirtopWindowGetInfoResponse>;
1247
1111
  }
1248
1112
 
1249
- /**
1250
- * Registers a plugin with the SDK.
1251
- * @param plugin - The plugin to register
1252
- */
1253
- declare function registerAirtopPlugin(plugin: AirtopPluginRegistration): void;
1254
-
1255
1113
  interface AirtopAgentCreateAgentParams extends Airtop.AgentCreateAgentParams {
1256
1114
  }
1257
1115
  interface AirtopAgentGetAgentsParams extends Airtop.AgentGetAgentsParams {
@@ -1399,29 +1257,171 @@ declare class AirtopAgentClient extends AirtopBase {
1399
1257
  }
1400
1258
 
1401
1259
  /**
1402
- * Provides utility methods for creating mock instances of Airtop classes.
1403
- * @hideconstructor
1260
+ * Enumeration of available plugin augmentation types.
1261
+ * Determines which part of the SDK a plugin can extend.
1262
+ * @group Plugin Development
1404
1263
  */
1405
- declare class AirtopMocks {
1264
+ declare enum AirtopPluginAugmentationType {
1265
+ /** Plugin for extending the AirtopClient class */
1266
+ AirtopClient = "AirtopClient",
1267
+ /** Plugin for extending AirtopWindowClient class functionality */
1268
+ AirtopWindowClient = "AirtopWindowClient",
1269
+ /** Plugin for extending AirtopWindow class functionality */
1270
+ AirtopWindow = "AirtopWindow",
1271
+ /** Plugin for extending AirtopSession class functionality */
1272
+ AirtopSessionClient = "AirtopSessionClient",
1273
+ /** Plugin for extending AirtopSession class functionality */
1274
+ AirtopSession = "AirtopSession",
1275
+ /** Plugin for extending AirtopWindowScreenshot class functionality */
1276
+ AirtopWindowScreenshot = "AirtopWindowScreenshot"
1277
+ }
1278
+ /**
1279
+ * Interface for plugins that extend the main AirtopClient class.
1280
+ * Plugins allow you to add custom functionality to the AirtopClient prototype.
1281
+ *
1282
+ * @group Plugin Development
1283
+ */
1284
+ interface AirtopClientPlugin {
1406
1285
  /**
1407
- * Creates an AirtopBase instance (the class used as the base for other Airtop classes) with a mock client and logger.
1286
+ * Specifies that this plugin augments the main AirtopClient class.
1287
+ * This type discrimination allows TypeScript to properly type-check plugin usage.
1408
1288
  */
1409
- static getAirtopBaseMock(config?: Partial<CommonAirtopConfig>): AirtopBase;
1289
+ augmentationType: AirtopPluginAugmentationType.AirtopClient;
1410
1290
  /**
1411
- * Creates an Airtop instance with a mock client and data.
1291
+ * Function that performs the augmentation of the AirtopClient prototype.
1292
+ *
1293
+ * @param prototype - The AirtopClient class prototype being augmented
1412
1294
  */
1413
- static getAirtopClientMock(config?: Partial<AirtopConstructorConfig>): AirtopClient;
1295
+ augment: (prototype: typeof AirtopClient.prototype) => void;
1296
+ }
1297
+ /**
1298
+ * Interface for plugins that extend the AirtopWindowClient class functionality.
1299
+ * These plugins can modify or enhance the behavior of all window instances
1300
+ * by modifying the prototype.
1301
+ *
1302
+ * @group Plugin Development
1303
+ */
1304
+ interface AirtopWindowClientPlugin {
1414
1305
  /**
1415
- * Creates an AirtopSession instance with a mock client and data.
1306
+ * Specifies that this plugin augments AirtopWindowClient class functionality.
1307
+ * This type discrimination ensures proper type checking when using window plugins.
1416
1308
  */
1417
- static getAirtopSessionMock(responseData?: Partial<AirtopSessionResponse>): AirtopSession;
1309
+ augmentationType: AirtopPluginAugmentationType.AirtopWindowClient;
1418
1310
  /**
1419
- * Creates an AirtopWindow instance with a mock client and data.
1311
+ * Function that performs the augmentation of the AirtopWindowClient prototype.
1312
+ *
1313
+ * @param prototype - The AirtopWindowClient class prototype being augmented
1420
1314
  */
1421
- static getAirtopWindowMock({ sessionId, windowData, }?: {
1422
- sessionId?: string;
1423
- windowData?: AirtopWindowGetInfoResponse;
1424
- }): AirtopWindow<AirtopWindowGetInfoResponse>;
1315
+ augment: (prototype: typeof AirtopWindowClient.prototype) => void;
1316
+ }
1317
+ /**
1318
+ * Interface for plugins that extend the AirtopSessionClient class functionality.
1319
+ * These plugins can modify or enhance the behavior of all session instances
1320
+ * by modifying the prototype.
1321
+ *
1322
+ * @group Plugin Development
1323
+ */
1324
+ interface AirtopSessionClientPlugin {
1325
+ /**
1326
+ * Specifies that this plugin augments AirtopSessionClient class functionality.
1327
+ * This type discrimination ensures proper type checking when using session plugins.
1328
+ */
1329
+ augmentationType: AirtopPluginAugmentationType.AirtopSessionClient;
1330
+ /**
1331
+ * Function that performs the augmentation of the AirtopSessionClient prototype.
1332
+ *
1333
+ * @param prototype - The AirtopSessionClient class prototype being augmented
1334
+ */
1335
+ augment: (prototype: typeof AirtopSessionClient.prototype) => void;
1336
+ }
1337
+ /**
1338
+ * Interface for plugins that extend the AirtopWindow class functionality.
1339
+ * These plugins can modify or enhance the behavior of window instances
1340
+ * by modifying the prototype.
1341
+ *
1342
+ * @group Plugin Development
1343
+ */
1344
+ interface AirtopWindowPlugin {
1345
+ /**
1346
+ * Specifies that this plugin augments AirtopWindow class functionality.
1347
+ * This type discrimination ensures proper type checking when using window plugins.
1348
+ */
1349
+ augmentationType: AirtopPluginAugmentationType.AirtopWindow;
1350
+ /**
1351
+ * Function that performs the augmentation of the AirtopWindow prototype.
1352
+ *
1353
+ * @param prototype - The AirtopWindow class prototype being augmented
1354
+ */
1355
+ augment: (prototype: typeof AirtopWindow.prototype) => void;
1425
1356
  }
1357
+ /**
1358
+ * Interface for plugins that extend the AirtopSession class functionality.
1359
+ * These plugins can modify or enhance the behavior of session instances
1360
+ * by modifying the prototype.
1361
+ *
1362
+ * @group Plugin Development
1363
+ */
1364
+ interface AirtopSessionPlugin {
1365
+ /**
1366
+ * Specifies that this plugin augments AirtopSession class functionality.
1367
+ * This type discrimination ensures proper type checking when using session plugins.
1368
+ */
1369
+ augmentationType: AirtopPluginAugmentationType.AirtopSession;
1370
+ /**
1371
+ * Function that performs the augmentation of the AirtopSession prototype.
1372
+ *
1373
+ * @param prototype - The AirtopSession class prototype being augmented
1374
+ */
1375
+ augment: (prototype: typeof AirtopSession.prototype) => void;
1376
+ }
1377
+ /**
1378
+ * Interface for plugins that extend the AirtopWindowScreenshot class functionality.
1379
+ * These plugins can modify or enhance the behavior of screenshot instances
1380
+ * by modifying the prototype.
1381
+ *
1382
+ * @group Plugin Development
1383
+ */
1384
+ interface AirtopWindowScreenshotPlugin {
1385
+ /**
1386
+ * Specifies that this plugin augments AirtopWindowScreenshot class functionality.
1387
+ * This type discrimination ensures proper type checking when using screenshot plugins.
1388
+ */
1389
+ augmentationType: AirtopPluginAugmentationType.AirtopWindowScreenshot;
1390
+ /**
1391
+ * Function that performs the augmentation of the AirtopWindowScreenshot prototype.
1392
+ *
1393
+ * @param prototype - The AirtopWindowScreenshot class prototype being augmented
1394
+ */
1395
+ augment: (prototype: typeof AirtopWindowScreenshot.prototype) => void;
1396
+ }
1397
+ /**
1398
+ * Union type of all possible plugin types.
1399
+ * Used when handling plugins generically.
1400
+ *
1401
+ * @group Plugin Development
1402
+ *
1403
+ * @see {@link AirtopClientPlugin | AirtopClientPlugin}
1404
+ * @see {@link AirtopWindowClientPlugin | AirtopWindowClientPlugin}
1405
+ * @see {@link AirtopSessionClientPlugin | AirtopSessionClientPlugin}
1406
+ * @see {@link AirtopWindowPlugin | AirtopWindowPlugin}
1407
+ * @see {@link AirtopSessionPlugin | AirtopSessionPlugin}
1408
+ * @see {@link AirtopWindowScreenshotPlugin | AirtopWindowScreenshotPlugin}
1409
+ */
1410
+ type AirtopPluginType = AirtopClientPlugin | AirtopWindowClientPlugin | AirtopSessionClientPlugin | AirtopWindowPlugin | AirtopSessionPlugin | AirtopWindowScreenshotPlugin;
1411
+ /**
1412
+ * Interface for registering plugins with the SDK.
1413
+ */
1414
+ interface AirtopPluginRegistration {
1415
+ /**
1416
+ * Array of plugins to add to the SDK.
1417
+ */
1418
+ pluginsToAdd: AirtopPluginType[];
1419
+ }
1420
+
1421
+ /**
1422
+ * Registers a plugin with the SDK.
1423
+ * @param plugin - The plugin to register
1424
+ */
1425
+ declare function registerAirtopPlugin(plugin: AirtopPluginRegistration): void;
1426
1426
 
1427
1427
  export { type AirtopAgentCancelInvocationParams, AirtopAgentClient, type AirtopAgentCreateAgentParams, type AirtopAgentCreateInvocationParams, type AirtopAgentCreateVersionParams, type AirtopAgentDeleteAgentsParams, type AirtopAgentDuplicateAgentParams, type AirtopAgentGetAgentsParams, type AirtopAgentGetInvocationsParams, type AirtopAgentGetVersionsParams, type AirtopAgentResponse, type AirtopAgentUpdateAgentParams, type AirtopAutomationData, type AirtopAutomationListResponse, type AirtopAutomationUpdateDescriptionConfig, AirtopBase, AirtopClient, type AirtopClientPlugin, type AirtopConstructorConfig, type AirtopCreateAgentInvocationResponse, type AirtopCreateAgentResponse, type AirtopCreateAgentVersionResponse, type AirtopDeleteAgentsResponse, type AirtopDuplicateAgentResponse, AirtopError, type AirtopFileListParams, type AirtopFileResponse, type AirtopFilesResponse, type AirtopGetAgentInvocationsResponse, type AirtopGetAgentResponse, type AirtopGetAgentVersionsResponse, type AirtopGetAgentsResponse, AirtopMocks, AirtopNode, type AirtopNodeApiResponseData, AirtopPluginAugmentationType, type AirtopPluginRegistration, type AirtopPluginType, type AirtopProfile, type AirtopRequestOptions, AirtopSession, AirtopSessionClient, type AirtopSessionClientPlugin, type AirtopSessionPlugin, type AirtopSessionResponse, type AirtopUpdateAgentResponse, AirtopWindow, AirtopWindowClient, type AirtopWindowClientPlugin, type AirtopWindowCreateResponse, type AirtopWindowGetInfoResponse, type AirtopWindowPlugin, AirtopWindowScreenshot, type AirtopWindowScreenshotPlugin, type AirtopWindowScreenshotResponse, type CommonAirtopConfig, type CommonResponse, type CommonWindowResponse, type CreateFileConfig, type CreateSessionConfig, type GetFilesConfig, type GetSessionsConfig, type OutputJsonSchemaConfig, type ScreenshotData, type SessionData, type SessionError, type SessionMetadata, type SessionServiceResponse, type SessionWarning, type WindowActConfig, type WindowActResponse, type WindowClickConfig, type WindowCreateData, type WindowError, type WindowExtractConfig, type WindowExtractResponse, type WindowFillFormConfig, type WindowFindManyConfig, type WindowFindManyResponse, type WindowFindOneConfig, type WindowFindOneResponse, type WindowGetConfig, type WindowHoverConfig, type WindowInfoData, type WindowLlmConfig, type WindowLlmResponse, type WindowLoadUrlConfig, type WindowMetadata, type WindowMonitorConfig, type WindowNavigateConfig, WindowNavigateDirection, type WindowNavigateResponse, type WindowPageQueryConfig, type WindowPaginatedExtractionConfig, type WindowPromptResponse, type WindowScrapeConfig, type WindowScrapeResponse, type WindowScreenshotConfig, type WindowScrollConfig, type WindowTypeConfig, type WindowWaitForPageConfig, type WindowWaitForPageResponse, type WindowWarning, registerAirtopPlugin };