@airtop/sdk 0.1.40-beta0 → 0.1.41-beta0
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/api/resources/automations/client/Client.js +4 -4
- package/api/resources/files/client/Client.d.ts +11 -0
- package/api/resources/files/client/Client.js +52 -4
- package/api/resources/files/client/requests/PushFileBodyV1.d.ts +11 -0
- package/api/resources/files/client/requests/PushFileBodyV1.js +5 -0
- package/api/resources/files/client/requests/index.d.ts +1 -0
- package/api/resources/profiles/client/Client.js +1 -1
- package/api/resources/requests/client/Client.js +1 -1
- package/api/resources/sessions/client/Client.js +6 -6
- package/api/resources/sessions/types/SessionsEventsResponse.d.ts +4 -4
- package/api/resources/sessions/types/index.d.ts +1 -1
- package/api/resources/sessions/types/index.js +1 -1
- package/api/resources/windows/client/Client.d.ts +28 -0
- package/api/resources/windows/client/Client.js +152 -36
- package/api/resources/windows/client/requests/AsyncFileInputRequest.d.ts +33 -0
- package/api/resources/windows/client/requests/AsyncFileInputRequest.js +5 -0
- package/api/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts +31 -0
- package/api/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js +5 -0
- package/api/resources/windows/client/requests/index.d.ts +2 -0
- package/api/types/FileEventMessage.d.ts +1 -0
- package/dist/api/resources/automations/client/Client.js +4 -4
- package/dist/api/resources/files/client/Client.d.ts +11 -0
- package/dist/api/resources/files/client/Client.js +52 -4
- package/dist/api/resources/files/client/requests/PushFileBodyV1.d.ts +11 -0
- package/dist/api/resources/files/client/requests/PushFileBodyV1.js +5 -0
- package/dist/api/resources/files/client/requests/index.d.ts +1 -0
- package/dist/api/resources/profiles/client/Client.js +1 -1
- package/dist/api/resources/requests/client/Client.js +1 -1
- package/dist/api/resources/sessions/client/Client.js +6 -6
- package/dist/api/resources/sessions/types/SessionsEventsResponse.d.ts +4 -4
- package/dist/api/resources/sessions/types/index.d.ts +1 -1
- package/dist/api/resources/sessions/types/index.js +1 -1
- package/dist/api/resources/windows/client/Client.d.ts +28 -0
- package/dist/api/resources/windows/client/Client.js +152 -36
- package/dist/api/resources/windows/client/requests/AsyncFileInputRequest.d.ts +33 -0
- package/dist/api/resources/windows/client/requests/AsyncFileInputRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts +31 -0
- package/dist/api/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js +5 -0
- package/dist/api/resources/windows/client/requests/index.d.ts +2 -0
- package/dist/api/types/FileEventMessage.d.ts +1 -0
- package/dist/serialization/resources/files/client/requests/PushFileBodyV1.d.ts +12 -0
- package/dist/serialization/resources/files/client/requests/PushFileBodyV1.js +43 -0
- package/dist/serialization/resources/files/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/files/client/requests/index.js +3 -1
- package/dist/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +5 -5
- package/dist/serialization/resources/sessions/types/SessionsEventsResponse.js +2 -2
- package/dist/serialization/resources/sessions/types/index.d.ts +1 -1
- package/dist/serialization/resources/sessions/types/index.js +1 -1
- package/dist/serialization/resources/windows/client/requests/AsyncFileInputRequest.d.ts +22 -0
- package/dist/serialization/resources/windows/client/requests/AsyncFileInputRequest.js +53 -0
- package/dist/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts +20 -0
- package/dist/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js +51 -0
- package/dist/serialization/resources/windows/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/windows/client/requests/index.js +5 -1
- package/dist/serialization/types/FileEventMessage.d.ts +1 -0
- package/dist/serialization/types/FileEventMessage.js +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/upload.d.ts +13 -0
- package/dist/utils/upload.js +55 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/AirtopClient.js +1 -1
- package/dist/wrapper/AirtopFiles.js +3 -3
- package/dist/wrapper/AirtopSessions.d.ts +24 -0
- package/dist/wrapper/AirtopSessions.js +103 -0
- package/dist/wrapper/AirtopWindows.d.ts +25 -1
- package/dist/wrapper/AirtopWindows.js +23 -1
- package/package.json +1 -1
- package/reference.md +233 -0
- package/serialization/resources/files/client/requests/PushFileBodyV1.d.ts +12 -0
- package/serialization/resources/files/client/requests/PushFileBodyV1.js +43 -0
- package/serialization/resources/files/client/requests/index.d.ts +1 -0
- package/serialization/resources/files/client/requests/index.js +3 -1
- package/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +5 -5
- package/serialization/resources/sessions/types/SessionsEventsResponse.js +2 -2
- package/serialization/resources/sessions/types/index.d.ts +1 -1
- package/serialization/resources/sessions/types/index.js +1 -1
- package/serialization/resources/windows/client/requests/AsyncFileInputRequest.d.ts +22 -0
- package/serialization/resources/windows/client/requests/AsyncFileInputRequest.js +53 -0
- package/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts +20 -0
- package/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js +51 -0
- package/serialization/resources/windows/client/requests/index.d.ts +2 -0
- package/serialization/resources/windows/client/requests/index.js +5 -1
- package/serialization/types/FileEventMessage.d.ts +1 -0
- package/serialization/types/FileEventMessage.js +1 -0
- package/utils/index.d.ts +1 -0
- package/utils/index.js +1 -0
- package/utils/upload.d.ts +13 -0
- package/utils/upload.js +55 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/AirtopClient.js +1 -1
- package/wrapper/AirtopFiles.js +3 -3
- package/wrapper/AirtopSessions.d.ts +24 -0
- package/wrapper/AirtopSessions.js +103 -0
- package/wrapper/AirtopWindows.d.ts +25 -1
- package/wrapper/AirtopWindows.js +23 -1
@@ -326,5 +326,108 @@ class AirtopSessions extends Client_1.Sessions {
|
|
326
326
|
});
|
327
327
|
});
|
328
328
|
}
|
329
|
+
/**
|
330
|
+
* Waits for a file upload to become available to a session.
|
331
|
+
*
|
332
|
+
* @param sessionId - The session id for the file upload.
|
333
|
+
* @param fileId - The file id for the file upload.
|
334
|
+
* @param timeoutSeconds - The timeout in seconds.
|
335
|
+
* @returns The event for the file upload.
|
336
|
+
*/
|
337
|
+
waitForUploadAvailable(sessionId_1, fileId_1) {
|
338
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, fileId, timeoutSeconds = 300) {
|
339
|
+
// Create a promise that resolves to null after the timeout
|
340
|
+
const timeoutPromise = new Promise((resolve) => {
|
341
|
+
setTimeout(() => resolve(null), timeoutSeconds * 1000);
|
342
|
+
});
|
343
|
+
// Create a promise for the event processing
|
344
|
+
const processEventsPromise = (() => __awaiter(this, void 0, void 0, function* () {
|
345
|
+
var _a, e_4, _b, _c;
|
346
|
+
const sessionEvents = yield this.events(sessionId, { all: true }, { timeoutInSeconds: timeoutSeconds });
|
347
|
+
try {
|
348
|
+
for (var _d = true, sessionEvents_4 = __asyncValues(sessionEvents), sessionEvents_4_1; sessionEvents_4_1 = yield sessionEvents_4.next(), _a = sessionEvents_4_1.done, !_a; _d = true) {
|
349
|
+
_c = sessionEvents_4_1.value;
|
350
|
+
_d = false;
|
351
|
+
const event = _c;
|
352
|
+
const e = event;
|
353
|
+
if (e.event === 'file_upload_status') {
|
354
|
+
this.log(`file_upload_status message received:\n${JSON.stringify(event, null, 2)}`);
|
355
|
+
if (e.status === 'available' && e.fileId === fileId) {
|
356
|
+
return event;
|
357
|
+
}
|
358
|
+
}
|
359
|
+
}
|
360
|
+
}
|
361
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
362
|
+
finally {
|
363
|
+
try {
|
364
|
+
if (!_d && !_a && (_b = sessionEvents_4.return)) yield _b.call(sessionEvents_4);
|
365
|
+
}
|
366
|
+
finally { if (e_4) throw e_4.error; }
|
367
|
+
}
|
368
|
+
return null;
|
369
|
+
}))();
|
370
|
+
// Race the timeout against the event processing
|
371
|
+
return Promise.race([timeoutPromise, processEventsPromise]);
|
372
|
+
});
|
373
|
+
}
|
374
|
+
/**
|
375
|
+
* Captcha event listener
|
376
|
+
* Defaults to looking back 5 seconds in the event stream for the captcha event to be available.
|
377
|
+
* Use `lookbackSeconds` to control this behavior.
|
378
|
+
*
|
379
|
+
* @param {string} sessionId - The ID of the session to monitor
|
380
|
+
* @param {function} callback - The callback function to be called when a captcha event is received
|
381
|
+
* @param {Object} configuration - The optional configuration parameters for the function
|
382
|
+
* @param {number} [configuration.lookbackSeconds=5] - The number of seconds to look back for prior events. Default `5`. 0 means no lookback.
|
383
|
+
* @param {Sessions.RequestOptions} [requestOptions] - Optional request configuration including timeout
|
384
|
+
* @returns {function} - A function to stop listening for captcha events
|
385
|
+
*/
|
386
|
+
onCaptchaEvent(sessionId, callback, configuration, requestOptions) {
|
387
|
+
let lastCallbackPromise = Promise.resolve();
|
388
|
+
const abortController = new AbortController();
|
389
|
+
const startTime = new Date();
|
390
|
+
const { lookbackSeconds = 5 } = configuration || {};
|
391
|
+
const timeoutSeconds = (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) || 60;
|
392
|
+
(() => __awaiter(this, void 0, void 0, function* () {
|
393
|
+
var _a, e_5, _b, _c;
|
394
|
+
const sessionEvents = yield this.events(sessionId, { all: lookbackSeconds >= 0 }, Object.assign(Object.assign({ timeoutInSeconds: timeoutSeconds }, requestOptions), { abortSignal: abortController.signal }));
|
395
|
+
try {
|
396
|
+
for (var _d = true, sessionEvents_5 = __asyncValues(sessionEvents), sessionEvents_5_1; sessionEvents_5_1 = yield sessionEvents_5.next(), _a = sessionEvents_5_1.done, !_a; _d = true) {
|
397
|
+
_c = sessionEvents_5_1.value;
|
398
|
+
_d = false;
|
399
|
+
const event = _c;
|
400
|
+
const e = event;
|
401
|
+
if (e.event === 'captcha-event') {
|
402
|
+
this.log(`captcha-event message received:\n${JSON.stringify(event, null, 2)}`);
|
403
|
+
const msg = e;
|
404
|
+
const eventTime = Date.parse(e.eventTime);
|
405
|
+
const thresholdTime = startTime.getTime() - lookbackSeconds * 1000;
|
406
|
+
if (eventTime < thresholdTime) {
|
407
|
+
this.log('skipping captcha event because its timestamp is earlier than lookbackSeconds');
|
408
|
+
continue;
|
409
|
+
}
|
410
|
+
lastCallbackPromise = lastCallbackPromise
|
411
|
+
.then(() => callback(msg))
|
412
|
+
.catch(error => this.log(`Error in captcha callback: ${error}`));
|
413
|
+
}
|
414
|
+
}
|
415
|
+
}
|
416
|
+
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
417
|
+
finally {
|
418
|
+
try {
|
419
|
+
if (!_d && !_a && (_b = sessionEvents_5.return)) yield _b.call(sessionEvents_5);
|
420
|
+
}
|
421
|
+
finally { if (e_5) throw e_5.error; }
|
422
|
+
}
|
423
|
+
}))().catch(error => {
|
424
|
+
if (error.name !== 'AbortError') {
|
425
|
+
this.log(`Error in event processing: ${error}`);
|
426
|
+
}
|
427
|
+
});
|
428
|
+
return () => {
|
429
|
+
abortController.abort();
|
430
|
+
};
|
431
|
+
}
|
329
432
|
}
|
330
433
|
exports.AirtopSessions = AirtopSessions;
|
@@ -17,10 +17,16 @@ declare namespace seleniumWebdriver {
|
|
17
17
|
import type * as Airtop from '../api';
|
18
18
|
import { type Windows, Windows as WindowsClass, type Windows as WindowsNamespace } from '../api/resources/windows/client/Client';
|
19
19
|
import * as core from '../core';
|
20
|
+
import type { AirtopClient } from './AirtopClient';
|
21
|
+
type UploadAndFillFileInputConfiguration = Airtop.SessionFileInputHandlerRequestBody & {
|
22
|
+
uploadFilePath: string;
|
23
|
+
};
|
20
24
|
export declare class AirtopWindows extends WindowsClass {
|
25
|
+
readonly _client: AirtopClient;
|
21
26
|
readonly _options: WindowsNamespace.Options;
|
22
27
|
private apiKeySupplier;
|
23
|
-
|
28
|
+
private readonly mainClient;
|
29
|
+
constructor(_client: AirtopClient, _options: WindowsNamespace.Options, apiKeySupplier: core.Supplier<core.BearerToken | undefined>);
|
24
30
|
/**
|
25
31
|
* @param {string} sessionId - The session id for the window.
|
26
32
|
* @param {string} windowId - The Airtop window id of the browser window to target with an Airtop AI prompt.
|
@@ -176,5 +182,23 @@ export declare class AirtopWindows extends WindowsClass {
|
|
176
182
|
monitor(sessionId: string, windowId: string, request: Airtop.SessionMonitorHandlerRequestBody, requestOptions?: Windows.RequestOptions): Promise<Airtop.AiPromptResponse>;
|
177
183
|
private executeSeleniumCDPCommand;
|
178
184
|
getWindowInfoForSeleniumDriver(session: Airtop.ExternalSessionWithConnectionInfo, driver: seleniumWebdriver.WebDriver, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowResponse>;
|
185
|
+
/**
|
186
|
+
* Upload a file, push the file to a session, and fill a file input field in a window.
|
187
|
+
* After this operation, the file input will be ready to be submitted.
|
188
|
+
*
|
189
|
+
* @param sessionId - The session id for the window.
|
190
|
+
* @param windowId - The window id of the browser window.
|
191
|
+
* @param {UploadAndFillFileInputConfiguration} configuration
|
192
|
+
* @param configuration.uploadFilePath - The path to the local file to upload.
|
193
|
+
* @param configuration.elementDescription - A natural language description of the file input to
|
194
|
+
* interact with (e.g. 'the file input', 'file upload selection box'). The interaction will be
|
195
|
+
* aborted if the target element cannot be found.
|
196
|
+
* @see Airtop.SessionFileInputHandlerRequestBody - For additional micro-interaction configuration options.
|
197
|
+
* @returns The file id and the ai response.
|
198
|
+
*/
|
199
|
+
uploadFileAndSelectInput(sessionId: string, windowId: string, configuration: UploadAndFillFileInputConfiguration): Promise<{
|
200
|
+
fileId: string;
|
201
|
+
aiResponse: Airtop.AiPromptResponse;
|
202
|
+
}>;
|
179
203
|
}
|
180
204
|
export {};
|
@@ -49,11 +49,14 @@ exports.AirtopWindows = void 0;
|
|
49
49
|
const node_fetch_1 = __importDefault(require("node-fetch"));
|
50
50
|
const Client_1 = require("../api/resources/windows/client/Client");
|
51
51
|
const core = __importStar(require("../core"));
|
52
|
+
const utils_1 = require("../utils");
|
52
53
|
class AirtopWindows extends Client_1.Windows {
|
53
|
-
constructor(_options, apiKeySupplier) {
|
54
|
+
constructor(_client, _options, apiKeySupplier) {
|
54
55
|
super(_options);
|
56
|
+
this._client = _client;
|
55
57
|
this._options = _options;
|
56
58
|
this.apiKeySupplier = apiKeySupplier;
|
59
|
+
this.mainClient = _client;
|
57
60
|
}
|
58
61
|
/**
|
59
62
|
* @param {string} sessionId - The session id for the window.
|
@@ -329,5 +332,24 @@ class AirtopWindows extends Client_1.Windows {
|
|
329
332
|
return yield this.getWindowInfo(session.id, targetId, request, requestOptions);
|
330
333
|
});
|
331
334
|
}
|
335
|
+
/**
|
336
|
+
* Upload a file, push the file to a session, and fill a file input field in a window.
|
337
|
+
* After this operation, the file input will be ready to be submitted.
|
338
|
+
*
|
339
|
+
* @param sessionId - The session id for the window.
|
340
|
+
* @param windowId - The window id of the browser window.
|
341
|
+
* @param {UploadAndFillFileInputConfiguration} configuration
|
342
|
+
* @param configuration.uploadFilePath - The path to the local file to upload.
|
343
|
+
* @param configuration.elementDescription - A natural language description of the file input to
|
344
|
+
* interact with (e.g. 'the file input', 'file upload selection box'). The interaction will be
|
345
|
+
* aborted if the target element cannot be found.
|
346
|
+
* @see Airtop.SessionFileInputHandlerRequestBody - For additional micro-interaction configuration options.
|
347
|
+
* @returns The file id and the ai response.
|
348
|
+
*/
|
349
|
+
uploadFileAndSelectInput(sessionId, windowId, configuration) {
|
350
|
+
return __awaiter(this, void 0, void 0, function* () {
|
351
|
+
return (0, utils_1.uploadFileAndSelectInput)({ client: this.mainClient, sessionId, windowId, configuration });
|
352
|
+
});
|
353
|
+
}
|
332
354
|
}
|
333
355
|
exports.AirtopWindows = AirtopWindows;
|
package/package.json
CHANGED
package/reference.md
CHANGED
@@ -332,6 +332,87 @@ await client.windows.asyncExecuteAutomation(
|
|
332
332
|
</dl>
|
333
333
|
</details>
|
334
334
|
|
335
|
+
<details><summary><code>client.windows.<a href="/src/api/resources/windows/client/Client.ts">asyncFileInput</a>(sessionId, windowId, { ...params }) -> Airtop.AsyncSessionAiResponseEnvelope</code></summary>
|
336
|
+
<dl>
|
337
|
+
<dd>
|
338
|
+
|
339
|
+
#### 📝 Description
|
340
|
+
|
341
|
+
<dl>
|
342
|
+
<dd>
|
343
|
+
|
344
|
+
<dl>
|
345
|
+
<dd>
|
346
|
+
|
347
|
+
Execute a file input interaction in a specific browser window asynchronously
|
348
|
+
|
349
|
+
</dd>
|
350
|
+
</dl>
|
351
|
+
</dd>
|
352
|
+
</dl>
|
353
|
+
|
354
|
+
#### 🔌 Usage
|
355
|
+
|
356
|
+
<dl>
|
357
|
+
<dd>
|
358
|
+
|
359
|
+
<dl>
|
360
|
+
<dd>
|
361
|
+
|
362
|
+
```typescript
|
363
|
+
await client.windows.asyncFileInput("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
364
|
+
elementDescription: "The file input in the bottom left corner",
|
365
|
+
});
|
366
|
+
```
|
367
|
+
|
368
|
+
</dd>
|
369
|
+
</dl>
|
370
|
+
</dd>
|
371
|
+
</dl>
|
372
|
+
|
373
|
+
#### ⚙️ Parameters
|
374
|
+
|
375
|
+
<dl>
|
376
|
+
<dd>
|
377
|
+
|
378
|
+
<dl>
|
379
|
+
<dd>
|
380
|
+
|
381
|
+
**sessionId:** `string` — The session id for the window.
|
382
|
+
|
383
|
+
</dd>
|
384
|
+
</dl>
|
385
|
+
|
386
|
+
<dl>
|
387
|
+
<dd>
|
388
|
+
|
389
|
+
**windowId:** `string` — The Airtop window id of the browser window.
|
390
|
+
|
391
|
+
</dd>
|
392
|
+
</dl>
|
393
|
+
|
394
|
+
<dl>
|
395
|
+
<dd>
|
396
|
+
|
397
|
+
**request:** `Airtop.AsyncFileInputRequest`
|
398
|
+
|
399
|
+
</dd>
|
400
|
+
</dl>
|
401
|
+
|
402
|
+
<dl>
|
403
|
+
<dd>
|
404
|
+
|
405
|
+
**requestOptions:** `Windows.RequestOptions`
|
406
|
+
|
407
|
+
</dd>
|
408
|
+
</dl>
|
409
|
+
</dd>
|
410
|
+
</dl>
|
411
|
+
|
412
|
+
</dd>
|
413
|
+
</dl>
|
414
|
+
</details>
|
415
|
+
|
335
416
|
<details><summary><code>client.windows.<a href="/src/api/resources/windows/client/Client.ts">asyncFillForm</a>(sessionId, windowId, { ...params }) -> Airtop.AsyncSessionAiResponseEnvelope</code></summary>
|
336
417
|
<dl>
|
337
418
|
<dd>
|
@@ -1457,6 +1538,87 @@ await client.windows.createFormFiller("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0
|
|
1457
1538
|
</dl>
|
1458
1539
|
</details>
|
1459
1540
|
|
1541
|
+
<details><summary><code>client.windows.<a href="/src/api/resources/windows/client/Client.ts">fileInput</a>(sessionId, windowId, { ...params }) -> Airtop.AiPromptResponse</code></summary>
|
1542
|
+
<dl>
|
1543
|
+
<dd>
|
1544
|
+
|
1545
|
+
#### 📝 Description
|
1546
|
+
|
1547
|
+
<dl>
|
1548
|
+
<dd>
|
1549
|
+
|
1550
|
+
<dl>
|
1551
|
+
<dd>
|
1552
|
+
|
1553
|
+
Execute a file input interaction in a specific browser window
|
1554
|
+
|
1555
|
+
</dd>
|
1556
|
+
</dl>
|
1557
|
+
</dd>
|
1558
|
+
</dl>
|
1559
|
+
|
1560
|
+
#### 🔌 Usage
|
1561
|
+
|
1562
|
+
<dl>
|
1563
|
+
<dd>
|
1564
|
+
|
1565
|
+
<dl>
|
1566
|
+
<dd>
|
1567
|
+
|
1568
|
+
```typescript
|
1569
|
+
await client.windows.fileInput("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
1570
|
+
elementDescription: "The file input in the bottom left corner",
|
1571
|
+
});
|
1572
|
+
```
|
1573
|
+
|
1574
|
+
</dd>
|
1575
|
+
</dl>
|
1576
|
+
</dd>
|
1577
|
+
</dl>
|
1578
|
+
|
1579
|
+
#### ⚙️ Parameters
|
1580
|
+
|
1581
|
+
<dl>
|
1582
|
+
<dd>
|
1583
|
+
|
1584
|
+
<dl>
|
1585
|
+
<dd>
|
1586
|
+
|
1587
|
+
**sessionId:** `string` — The session id for the window.
|
1588
|
+
|
1589
|
+
</dd>
|
1590
|
+
</dl>
|
1591
|
+
|
1592
|
+
<dl>
|
1593
|
+
<dd>
|
1594
|
+
|
1595
|
+
**windowId:** `string` — The Airtop window id of the browser window.
|
1596
|
+
|
1597
|
+
</dd>
|
1598
|
+
</dl>
|
1599
|
+
|
1600
|
+
<dl>
|
1601
|
+
<dd>
|
1602
|
+
|
1603
|
+
**request:** `Airtop.SessionFileInputHandlerRequestBody`
|
1604
|
+
|
1605
|
+
</dd>
|
1606
|
+
</dl>
|
1607
|
+
|
1608
|
+
<dl>
|
1609
|
+
<dd>
|
1610
|
+
|
1611
|
+
**requestOptions:** `Windows.RequestOptions`
|
1612
|
+
|
1613
|
+
</dd>
|
1614
|
+
</dl>
|
1615
|
+
</dd>
|
1616
|
+
</dl>
|
1617
|
+
|
1618
|
+
</dd>
|
1619
|
+
</dl>
|
1620
|
+
</details>
|
1621
|
+
|
1460
1622
|
<details><summary><code>client.windows.<a href="/src/api/resources/windows/client/Client.ts">fillForm</a>(sessionId, windowId, { ...params }) -> Airtop.AiPromptResponse</code></summary>
|
1461
1623
|
<dl>
|
1462
1624
|
<dd>
|
@@ -3283,6 +3445,77 @@ await client.files.delete("id");
|
|
3283
3445
|
</dl>
|
3284
3446
|
</details>
|
3285
3447
|
|
3448
|
+
<details><summary><code>client.files.<a href="/src/api/resources/files/client/Client.ts">push</a>(id, { ...params }) -> void</code></summary>
|
3449
|
+
<dl>
|
3450
|
+
<dd>
|
3451
|
+
|
3452
|
+
#### 📝 Description
|
3453
|
+
|
3454
|
+
<dl>
|
3455
|
+
<dd>
|
3456
|
+
|
3457
|
+
<dl>
|
3458
|
+
<dd>
|
3459
|
+
|
3460
|
+
Push a file to one or more sessions, making it available for the sessions to use
|
3461
|
+
|
3462
|
+
</dd>
|
3463
|
+
</dl>
|
3464
|
+
</dd>
|
3465
|
+
</dl>
|
3466
|
+
|
3467
|
+
#### 🔌 Usage
|
3468
|
+
|
3469
|
+
<dl>
|
3470
|
+
<dd>
|
3471
|
+
|
3472
|
+
<dl>
|
3473
|
+
<dd>
|
3474
|
+
|
3475
|
+
```typescript
|
3476
|
+
await client.files.push("id");
|
3477
|
+
```
|
3478
|
+
|
3479
|
+
</dd>
|
3480
|
+
</dl>
|
3481
|
+
</dd>
|
3482
|
+
</dl>
|
3483
|
+
|
3484
|
+
#### ⚙️ Parameters
|
3485
|
+
|
3486
|
+
<dl>
|
3487
|
+
<dd>
|
3488
|
+
|
3489
|
+
<dl>
|
3490
|
+
<dd>
|
3491
|
+
|
3492
|
+
**id:** `string` — ID of the file
|
3493
|
+
|
3494
|
+
</dd>
|
3495
|
+
</dl>
|
3496
|
+
|
3497
|
+
<dl>
|
3498
|
+
<dd>
|
3499
|
+
|
3500
|
+
**request:** `Airtop.PushFileBodyV1`
|
3501
|
+
|
3502
|
+
</dd>
|
3503
|
+
</dl>
|
3504
|
+
|
3505
|
+
<dl>
|
3506
|
+
<dd>
|
3507
|
+
|
3508
|
+
**requestOptions:** `Files.RequestOptions`
|
3509
|
+
|
3510
|
+
</dd>
|
3511
|
+
</dl>
|
3512
|
+
</dd>
|
3513
|
+
</dl>
|
3514
|
+
|
3515
|
+
</dd>
|
3516
|
+
</dl>
|
3517
|
+
</details>
|
3518
|
+
|
3286
3519
|
## Profiles
|
3287
3520
|
|
3288
3521
|
<details><summary><code>client.profiles.<a href="/src/api/resources/profiles/client/Client.ts">delete</a>({ ...params }) -> void</code></summary>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as serializers from "../../../../index";
|
5
|
+
import * as Airtop from "../../../../../api/index";
|
6
|
+
import * as core from "../../../../../core";
|
7
|
+
export declare const PushFileBodyV1: core.serialization.Schema<serializers.PushFileBodyV1.Raw, Airtop.PushFileBodyV1>;
|
8
|
+
export declare namespace PushFileBodyV1 {
|
9
|
+
interface Raw {
|
10
|
+
sessionIds?: string[] | null;
|
11
|
+
}
|
12
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
10
|
+
}
|
11
|
+
Object.defineProperty(o, k2, desc);
|
12
|
+
}) : (function(o, m, k, k2) {
|
13
|
+
if (k2 === undefined) k2 = k;
|
14
|
+
o[k2] = m[k];
|
15
|
+
}));
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
18
|
+
}) : function(o, v) {
|
19
|
+
o["default"] = v;
|
20
|
+
});
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
22
|
+
var ownKeys = function(o) {
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
24
|
+
var ar = [];
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
26
|
+
return ar;
|
27
|
+
};
|
28
|
+
return ownKeys(o);
|
29
|
+
};
|
30
|
+
return function (mod) {
|
31
|
+
if (mod && mod.__esModule) return mod;
|
32
|
+
var result = {};
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
34
|
+
__setModuleDefault(result, mod);
|
35
|
+
return result;
|
36
|
+
};
|
37
|
+
})();
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
39
|
+
exports.PushFileBodyV1 = void 0;
|
40
|
+
const core = __importStar(require("../../../../../core"));
|
41
|
+
exports.PushFileBodyV1 = core.serialization.object({
|
42
|
+
sessionIds: core.serialization.list(core.serialization.string()).optional(),
|
43
|
+
});
|
@@ -1,5 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.CreateFileRestInputV1 = void 0;
|
3
|
+
exports.PushFileBodyV1 = exports.CreateFileRestInputV1 = void 0;
|
4
4
|
var CreateFileRestInputV1_1 = require("./CreateFileRestInputV1");
|
5
5
|
Object.defineProperty(exports, "CreateFileRestInputV1", { enumerable: true, get: function () { return CreateFileRestInputV1_1.CreateFileRestInputV1; } });
|
6
|
+
var PushFileBodyV1_1 = require("./PushFileBodyV1");
|
7
|
+
Object.defineProperty(exports, "PushFileBodyV1", { enumerable: true, get: function () { return PushFileBodyV1_1.PushFileBodyV1; } });
|
@@ -4,15 +4,18 @@
|
|
4
4
|
import * as serializers from "../../../index";
|
5
5
|
import * as Airtop from "../../../../api/index";
|
6
6
|
import * as core from "../../../../core";
|
7
|
+
import { SessionsEventsResponseCaptchaEvent } from "./SessionsEventsResponseCaptchaEvent";
|
7
8
|
import { SessionsEventsResponseStatus } from "./SessionsEventsResponseStatus";
|
8
9
|
import { SessionsEventsResponseError } from "./SessionsEventsResponseError";
|
9
10
|
import { SessionsEventsResponseWindowEvent } from "./SessionsEventsResponseWindowEvent";
|
10
11
|
import { SessionsEventsResponseSessionEvent } from "./SessionsEventsResponseSessionEvent";
|
11
12
|
import { SessionsEventsResponseFileEvent } from "./SessionsEventsResponseFileEvent";
|
12
|
-
import { SessionsEventsResponseCaptchaEvent } from "./SessionsEventsResponseCaptchaEvent";
|
13
13
|
export declare const SessionsEventsResponse: core.serialization.Schema<serializers.SessionsEventsResponse.Raw, Airtop.SessionsEventsResponse>;
|
14
14
|
export declare namespace SessionsEventsResponse {
|
15
|
-
type Raw = SessionsEventsResponse.Status | SessionsEventsResponse.Error | SessionsEventsResponse.WindowEvent | SessionsEventsResponse.SessionEvent | SessionsEventsResponse.FileEvent
|
15
|
+
type Raw = SessionsEventsResponse.CaptchaEvent | SessionsEventsResponse.Status | SessionsEventsResponse.Error | SessionsEventsResponse.WindowEvent | SessionsEventsResponse.SessionEvent | SessionsEventsResponse.FileEvent;
|
16
|
+
interface CaptchaEvent extends SessionsEventsResponseCaptchaEvent.Raw {
|
17
|
+
event: "captchaEvent";
|
18
|
+
}
|
16
19
|
interface Status extends SessionsEventsResponseStatus.Raw {
|
17
20
|
event: "status";
|
18
21
|
}
|
@@ -28,7 +31,4 @@ export declare namespace SessionsEventsResponse {
|
|
28
31
|
interface FileEvent extends SessionsEventsResponseFileEvent.Raw {
|
29
32
|
event: "fileEvent";
|
30
33
|
}
|
31
|
-
interface CaptchaEvent extends SessionsEventsResponseCaptchaEvent.Raw {
|
32
|
-
event: "captchaEvent";
|
33
|
-
}
|
34
34
|
}
|
@@ -38,20 +38,20 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
39
39
|
exports.SessionsEventsResponse = void 0;
|
40
40
|
const core = __importStar(require("../../../../core"));
|
41
|
+
const SessionsEventsResponseCaptchaEvent_1 = require("./SessionsEventsResponseCaptchaEvent");
|
41
42
|
const SessionsEventsResponseStatus_1 = require("./SessionsEventsResponseStatus");
|
42
43
|
const SessionsEventsResponseError_1 = require("./SessionsEventsResponseError");
|
43
44
|
const SessionsEventsResponseWindowEvent_1 = require("./SessionsEventsResponseWindowEvent");
|
44
45
|
const SessionsEventsResponseSessionEvent_1 = require("./SessionsEventsResponseSessionEvent");
|
45
46
|
const SessionsEventsResponseFileEvent_1 = require("./SessionsEventsResponseFileEvent");
|
46
|
-
const SessionsEventsResponseCaptchaEvent_1 = require("./SessionsEventsResponseCaptchaEvent");
|
47
47
|
exports.SessionsEventsResponse = core.serialization
|
48
48
|
.union("event", {
|
49
|
+
captchaEvent: SessionsEventsResponseCaptchaEvent_1.SessionsEventsResponseCaptchaEvent,
|
49
50
|
status: SessionsEventsResponseStatus_1.SessionsEventsResponseStatus,
|
50
51
|
error: SessionsEventsResponseError_1.SessionsEventsResponseError,
|
51
52
|
windowEvent: SessionsEventsResponseWindowEvent_1.SessionsEventsResponseWindowEvent,
|
52
53
|
sessionEvent: SessionsEventsResponseSessionEvent_1.SessionsEventsResponseSessionEvent,
|
53
54
|
fileEvent: SessionsEventsResponseFileEvent_1.SessionsEventsResponseFileEvent,
|
54
|
-
captchaEvent: SessionsEventsResponseCaptchaEvent_1.SessionsEventsResponseCaptchaEvent,
|
55
55
|
})
|
56
56
|
.transform({
|
57
57
|
transform: (value) => value,
|
@@ -1,8 +1,8 @@
|
|
1
1
|
export * from "./SessionsListRequestStatus";
|
2
|
+
export * from "./SessionsEventsResponseCaptchaEvent";
|
2
3
|
export * from "./SessionsEventsResponseStatus";
|
3
4
|
export * from "./SessionsEventsResponseError";
|
4
5
|
export * from "./SessionsEventsResponseWindowEvent";
|
5
6
|
export * from "./SessionsEventsResponseSessionEvent";
|
6
7
|
export * from "./SessionsEventsResponseFileEvent";
|
7
|
-
export * from "./SessionsEventsResponseCaptchaEvent";
|
8
8
|
export * from "./SessionsEventsResponse";
|
@@ -15,10 +15,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
17
|
__exportStar(require("./SessionsListRequestStatus"), exports);
|
18
|
+
__exportStar(require("./SessionsEventsResponseCaptchaEvent"), exports);
|
18
19
|
__exportStar(require("./SessionsEventsResponseStatus"), exports);
|
19
20
|
__exportStar(require("./SessionsEventsResponseError"), exports);
|
20
21
|
__exportStar(require("./SessionsEventsResponseWindowEvent"), exports);
|
21
22
|
__exportStar(require("./SessionsEventsResponseSessionEvent"), exports);
|
22
23
|
__exportStar(require("./SessionsEventsResponseFileEvent"), exports);
|
23
|
-
__exportStar(require("./SessionsEventsResponseCaptchaEvent"), exports);
|
24
24
|
__exportStar(require("./SessionsEventsResponse"), exports);
|
@@ -0,0 +1,22 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as serializers from "../../../../index";
|
5
|
+
import * as Airtop from "../../../../../api/index";
|
6
|
+
import * as core from "../../../../../core";
|
7
|
+
import { AsyncConfig } from "../../../../types/AsyncConfig";
|
8
|
+
import { MicroInteractionConfigWithExperimental } from "../../../../types/MicroInteractionConfigWithExperimental";
|
9
|
+
export declare const AsyncFileInputRequest: core.serialization.Schema<serializers.AsyncFileInputRequest.Raw, Airtop.AsyncFileInputRequest>;
|
10
|
+
export declare namespace AsyncFileInputRequest {
|
11
|
+
interface Raw {
|
12
|
+
async?: AsyncConfig.Raw | null;
|
13
|
+
clientRequestId?: string | null;
|
14
|
+
configuration?: MicroInteractionConfigWithExperimental.Raw | null;
|
15
|
+
costThresholdCredits?: number | null;
|
16
|
+
elementDescription: string;
|
17
|
+
fileId?: string | null;
|
18
|
+
fileName?: string | null;
|
19
|
+
timeThresholdSeconds?: number | null;
|
20
|
+
waitForNavigation?: boolean | null;
|
21
|
+
}
|
22
|
+
}
|