@airtop/sdk 0.1.41 → 0.1.42-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/README.md +9 -10
- package/api/resources/automations/client/Client.js +4 -4
- package/api/resources/files/client/Client.js +5 -5
- package/api/resources/files/client/requests/CreateFileRestInputV1.d.ts +1 -1
- 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 +233 -5
- package/api/resources/windows/client/Client.js +1173 -214
- package/api/resources/windows/client/requests/ActRequest.d.ts +30 -0
- package/api/resources/windows/client/requests/ActRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncClickRequest.d.ts +29 -0
- package/api/resources/windows/client/requests/AsyncClickRequest.js +5 -0
- 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/AsyncHoverRequest.d.ts +27 -0
- package/api/resources/windows/client/requests/AsyncHoverRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +27 -0
- package/api/resources/windows/client/requests/AsyncMonitorRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +29 -0
- package/api/resources/windows/client/requests/AsyncPageQueryRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +27 -0
- package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +29 -0
- package/api/resources/windows/client/requests/AsyncPromptContentRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +23 -0
- package/api/resources/windows/client/requests/AsyncScreenshotRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +25 -0
- package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +37 -0
- package/api/resources/windows/client/requests/AsyncTypeRequest.js +5 -0
- package/api/resources/windows/client/requests/ExtractRequest.d.ts +30 -0
- package/api/resources/windows/client/requests/ExtractRequest.js +5 -0
- package/api/resources/windows/client/requests/FindManyRequest.d.ts +30 -0
- package/api/resources/windows/client/requests/FindManyRequest.js +5 -0
- package/api/resources/windows/client/requests/FindOneRequest.d.ts +30 -0
- package/api/resources/windows/client/requests/FindOneRequest.js +5 -0
- package/api/resources/windows/client/requests/LlmRequest.d.ts +25 -0
- package/api/resources/windows/client/requests/LlmRequest.js +5 -0
- package/api/resources/windows/client/requests/OperatorPromptV1Body.d.ts +25 -0
- package/api/resources/windows/client/requests/OperatorPromptV1Body.js +5 -0
- package/api/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts +4 -4
- package/api/resources/windows/client/requests/WaitForPageRequest.d.ts +23 -0
- package/api/resources/windows/client/requests/WaitForPageRequest.js +5 -0
- package/api/resources/windows/client/requests/index.d.ts +17 -0
- package/api/resources/windows/types/WaitForPageRequestTargetStatus.d.ts +11 -0
- package/api/resources/windows/types/WaitForPageRequestTargetStatus.js +10 -0
- package/api/resources/windows/types/index.d.ts +1 -0
- package/api/resources/windows/types/index.js +1 -0
- package/api/types/AsyncOperatorPromptResponseEnvelope.d.ts +9 -0
- package/api/types/AsyncOperatorPromptResponseEnvelope.js +5 -0
- package/api/types/FileEventData.d.ts +7 -0
- package/api/types/FileEventData.js +5 -0
- package/api/types/FileEventMessage.d.ts +2 -1
- package/api/types/index.d.ts +2 -0
- package/api/types/index.js +2 -0
- package/dist/api/resources/automations/client/Client.js +4 -4
- package/dist/api/resources/files/client/Client.js +5 -5
- package/dist/api/resources/files/client/requests/CreateFileRestInputV1.d.ts +1 -1
- 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 +233 -5
- package/dist/api/resources/windows/client/Client.js +1173 -214
- package/dist/api/resources/windows/client/requests/ActRequest.d.ts +30 -0
- package/dist/api/resources/windows/client/requests/ActRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncClickRequest.d.ts +29 -0
- package/dist/api/resources/windows/client/requests/AsyncClickRequest.js +5 -0
- 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/AsyncHoverRequest.d.ts +27 -0
- package/dist/api/resources/windows/client/requests/AsyncHoverRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +27 -0
- package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +29 -0
- package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +27 -0
- package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +29 -0
- package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +23 -0
- package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +25 -0
- package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +37 -0
- package/dist/api/resources/windows/client/requests/AsyncTypeRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/ExtractRequest.d.ts +30 -0
- package/dist/api/resources/windows/client/requests/ExtractRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/FindManyRequest.d.ts +30 -0
- package/dist/api/resources/windows/client/requests/FindManyRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/FindOneRequest.d.ts +30 -0
- package/dist/api/resources/windows/client/requests/FindOneRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/LlmRequest.d.ts +25 -0
- package/dist/api/resources/windows/client/requests/LlmRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/OperatorPromptV1Body.d.ts +25 -0
- package/dist/api/resources/windows/client/requests/OperatorPromptV1Body.js +5 -0
- package/dist/api/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts +4 -4
- package/dist/api/resources/windows/client/requests/WaitForPageRequest.d.ts +23 -0
- package/dist/api/resources/windows/client/requests/WaitForPageRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/index.d.ts +17 -0
- package/dist/api/resources/windows/types/WaitForPageRequestTargetStatus.d.ts +11 -0
- package/dist/api/resources/windows/types/WaitForPageRequestTargetStatus.js +10 -0
- package/dist/api/resources/windows/types/index.d.ts +1 -0
- package/dist/api/resources/windows/types/index.js +1 -0
- package/dist/api/types/AsyncOperatorPromptResponseEnvelope.d.ts +9 -0
- package/dist/api/types/AsyncOperatorPromptResponseEnvelope.js +5 -0
- package/dist/api/types/FileEventData.d.ts +7 -0
- package/dist/api/types/FileEventData.js +5 -0
- package/dist/api/types/FileEventMessage.d.ts +2 -1
- package/dist/api/types/index.d.ts +2 -0
- package/dist/api/types/index.js +2 -0
- 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/ActRequest.d.ts +19 -0
- package/dist/serialization/resources/windows/client/requests/ActRequest.js +50 -0
- package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +20 -0
- package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.js +51 -0
- package/dist/serialization/resources/windows/client/requests/AsyncFileInputRequest.d.ts +23 -0
- package/dist/serialization/resources/windows/client/requests/AsyncFileInputRequest.js +54 -0
- package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +19 -0
- package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.js +50 -0
- package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +19 -0
- package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +50 -0
- package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +20 -0
- package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +51 -0
- package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +19 -0
- package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +50 -0
- package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +20 -0
- package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +51 -0
- package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +18 -0
- package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +49 -0
- package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +19 -0
- package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +50 -0
- package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +24 -0
- package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.js +55 -0
- package/dist/serialization/resources/windows/client/requests/ExtractRequest.d.ts +19 -0
- package/dist/serialization/resources/windows/client/requests/ExtractRequest.js +50 -0
- package/dist/serialization/resources/windows/client/requests/FindManyRequest.d.ts +19 -0
- package/dist/serialization/resources/windows/client/requests/FindManyRequest.js +50 -0
- package/dist/serialization/resources/windows/client/requests/FindOneRequest.d.ts +19 -0
- package/dist/serialization/resources/windows/client/requests/FindOneRequest.js +50 -0
- package/dist/serialization/resources/windows/client/requests/LlmRequest.d.ts +17 -0
- package/dist/serialization/resources/windows/client/requests/LlmRequest.js +48 -0
- package/dist/serialization/resources/windows/client/requests/OperatorPromptV1Body.d.ts +17 -0
- package/dist/serialization/resources/windows/client/requests/OperatorPromptV1Body.js +48 -0
- package/dist/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts +2 -1
- package/dist/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js +2 -1
- package/dist/serialization/resources/windows/client/requests/WaitForPageRequest.d.ts +18 -0
- package/dist/serialization/resources/windows/client/requests/WaitForPageRequest.js +49 -0
- package/dist/serialization/resources/windows/client/requests/index.d.ts +17 -0
- package/dist/serialization/resources/windows/client/requests/index.js +35 -1
- package/dist/serialization/resources/windows/types/WaitForPageRequestTargetStatus.d.ts +10 -0
- package/dist/serialization/resources/windows/types/WaitForPageRequestTargetStatus.js +41 -0
- package/dist/serialization/resources/windows/types/index.d.ts +1 -0
- package/dist/serialization/resources/windows/types/index.js +1 -0
- package/dist/serialization/types/AsyncOperatorPromptResponseEnvelope.d.ts +15 -0
- package/dist/serialization/types/AsyncOperatorPromptResponseEnvelope.js +46 -0
- package/dist/serialization/types/FileEventData.d.ts +13 -0
- package/dist/serialization/types/FileEventData.js +44 -0
- package/dist/serialization/types/FileEventMessage.d.ts +2 -1
- package/dist/serialization/types/FileEventMessage.js +2 -1
- package/dist/serialization/types/index.d.ts +2 -0
- package/dist/serialization/types/index.js +2 -0
- package/dist/utils/upload.js +12 -7
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/AirtopSessions.js +12 -5
- package/package.json +1 -1
- package/reference.md +1457 -144
- 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/ActRequest.d.ts +19 -0
- package/serialization/resources/windows/client/requests/ActRequest.js +50 -0
- package/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +20 -0
- package/serialization/resources/windows/client/requests/AsyncClickRequest.js +51 -0
- package/serialization/resources/windows/client/requests/AsyncFileInputRequest.d.ts +23 -0
- package/serialization/resources/windows/client/requests/AsyncFileInputRequest.js +54 -0
- package/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +19 -0
- package/serialization/resources/windows/client/requests/AsyncHoverRequest.js +50 -0
- package/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +19 -0
- package/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +50 -0
- package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +20 -0
- package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +51 -0
- package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +19 -0
- package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +50 -0
- package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +20 -0
- package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +51 -0
- package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +18 -0
- package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +49 -0
- package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +19 -0
- package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +50 -0
- package/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +24 -0
- package/serialization/resources/windows/client/requests/AsyncTypeRequest.js +55 -0
- package/serialization/resources/windows/client/requests/ExtractRequest.d.ts +19 -0
- package/serialization/resources/windows/client/requests/ExtractRequest.js +50 -0
- package/serialization/resources/windows/client/requests/FindManyRequest.d.ts +19 -0
- package/serialization/resources/windows/client/requests/FindManyRequest.js +50 -0
- package/serialization/resources/windows/client/requests/FindOneRequest.d.ts +19 -0
- package/serialization/resources/windows/client/requests/FindOneRequest.js +50 -0
- package/serialization/resources/windows/client/requests/LlmRequest.d.ts +17 -0
- package/serialization/resources/windows/client/requests/LlmRequest.js +48 -0
- package/serialization/resources/windows/client/requests/OperatorPromptV1Body.d.ts +17 -0
- package/serialization/resources/windows/client/requests/OperatorPromptV1Body.js +48 -0
- package/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts +2 -1
- package/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js +2 -1
- package/serialization/resources/windows/client/requests/WaitForPageRequest.d.ts +18 -0
- package/serialization/resources/windows/client/requests/WaitForPageRequest.js +49 -0
- package/serialization/resources/windows/client/requests/index.d.ts +17 -0
- package/serialization/resources/windows/client/requests/index.js +35 -1
- package/serialization/resources/windows/types/WaitForPageRequestTargetStatus.d.ts +10 -0
- package/serialization/resources/windows/types/WaitForPageRequestTargetStatus.js +41 -0
- package/serialization/resources/windows/types/index.d.ts +1 -0
- package/serialization/resources/windows/types/index.js +1 -0
- package/serialization/types/AsyncOperatorPromptResponseEnvelope.d.ts +15 -0
- package/serialization/types/AsyncOperatorPromptResponseEnvelope.js +46 -0
- package/serialization/types/FileEventData.d.ts +13 -0
- package/serialization/types/FileEventData.js +44 -0
- package/serialization/types/FileEventMessage.d.ts +2 -1
- package/serialization/types/FileEventMessage.js +2 -1
- package/serialization/types/index.d.ts +2 -0
- package/serialization/types/index.js +2 -0
- package/utils/upload.js +12 -7
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/AirtopSessions.js +12 -5
package/dist/version.js
CHANGED
@@ -336,6 +336,7 @@ class AirtopSessions extends Client_1.Sessions {
|
|
336
336
|
*/
|
337
337
|
waitForUploadAvailable(sessionId_1, fileId_1) {
|
338
338
|
return __awaiter(this, arguments, void 0, function* (sessionId, fileId, timeoutSeconds = 300) {
|
339
|
+
this.log(`waiting for uploaded file to be available on session: ${sessionId} ${fileId}`);
|
339
340
|
// Create a promise that resolves to null after the timeout
|
340
341
|
const timeoutPromise = new Promise((resolve) => {
|
341
342
|
setTimeout(() => resolve(null), timeoutSeconds * 1000);
|
@@ -351,9 +352,15 @@ class AirtopSessions extends Client_1.Sessions {
|
|
351
352
|
const event = _c;
|
352
353
|
const e = event;
|
353
354
|
if (e.event === 'file_upload_status') {
|
354
|
-
|
355
|
-
|
356
|
-
|
355
|
+
if (e.fileId === fileId) {
|
356
|
+
if (e.status === 'available') {
|
357
|
+
this.log(`uploaded file is now available on session: ${sessionId} ${fileId}`);
|
358
|
+
return event;
|
359
|
+
}
|
360
|
+
if (e.status === 'upload_failed') {
|
361
|
+
this.log(`upload failed: ${sessionId} ${fileId}`);
|
362
|
+
throw new Error(`upload failed: ${e.eventData.error}`);
|
363
|
+
}
|
357
364
|
}
|
358
365
|
}
|
359
366
|
}
|
@@ -409,7 +416,7 @@ class AirtopSessions extends Client_1.Sessions {
|
|
409
416
|
}
|
410
417
|
lastCallbackPromise = lastCallbackPromise
|
411
418
|
.then(() => callback(msg))
|
412
|
-
.catch(error => this.log(`Error in captcha callback: ${error}`));
|
419
|
+
.catch((error) => this.log(`Error in captcha callback: ${error}`));
|
413
420
|
}
|
414
421
|
}
|
415
422
|
}
|
@@ -420,7 +427,7 @@ class AirtopSessions extends Client_1.Sessions {
|
|
420
427
|
}
|
421
428
|
finally { if (e_5) throw e_5.error; }
|
422
429
|
}
|
423
|
-
}))().catch(error => {
|
430
|
+
}))().catch((error) => {
|
424
431
|
if (error.name !== 'AbortError') {
|
425
432
|
this.log(`Error in event processing: ${error}`);
|
426
433
|
}
|