@airtop/sdk 0.1.37-beta1 → 0.1.37
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 +10 -9
- package/api/resources/automations/client/Client.js +4 -4
- package/api/resources/files/client/Client.js +4 -4
- 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 +7 -7
- package/api/resources/sessions/types/index.d.ts +2 -2
- package/api/resources/sessions/types/index.js +2 -2
- package/api/resources/windows/client/Client.d.ts +0 -126
- package/api/resources/windows/client/Client.js +21 -577
- package/api/resources/windows/client/requests/index.d.ts +0 -10
- package/api/types/index.d.ts +0 -1
- package/api/types/index.js +0 -1
- package/dist/api/resources/automations/client/Client.js +4 -4
- package/dist/api/resources/files/client/Client.js +4 -4
- 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 +7 -7
- package/dist/api/resources/sessions/types/index.d.ts +2 -2
- package/dist/api/resources/sessions/types/index.js +2 -2
- package/dist/api/resources/windows/client/Client.d.ts +0 -126
- package/dist/api/resources/windows/client/Client.js +21 -577
- package/dist/api/resources/windows/client/requests/index.d.ts +0 -10
- package/dist/api/types/index.d.ts +0 -1
- package/dist/api/types/index.js +0 -1
- package/dist/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +9 -9
- package/dist/serialization/resources/sessions/types/SessionsEventsResponse.js +4 -4
- package/dist/serialization/resources/sessions/types/index.d.ts +2 -2
- package/dist/serialization/resources/sessions/types/index.js +2 -2
- package/dist/serialization/resources/windows/client/requests/index.d.ts +0 -10
- package/dist/serialization/resources/windows/client/requests/index.js +1 -21
- package/dist/serialization/types/index.d.ts +0 -1
- package/dist/serialization/types/index.js +0 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/AirtopSessions.d.ts +21 -22
- package/dist/wrapper/AirtopSessions.js +40 -25
- package/package.json +1 -1
- package/reference.md +24 -766
- package/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +9 -9
- package/serialization/resources/sessions/types/SessionsEventsResponse.js +4 -4
- package/serialization/resources/sessions/types/index.d.ts +2 -2
- package/serialization/resources/sessions/types/index.js +2 -2
- package/serialization/resources/windows/client/requests/index.d.ts +0 -10
- package/serialization/resources/windows/client/requests/index.js +1 -21
- package/serialization/types/index.d.ts +0 -1
- package/serialization/types/index.js +0 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/AirtopSessions.d.ts +21 -22
- package/wrapper/AirtopSessions.js +40 -25
- package/api/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -29
- package/api/resources/windows/client/requests/AsyncClickRequest.js +0 -5
- package/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -27
- package/api/resources/windows/client/requests/AsyncHoverRequest.js +0 -5
- package/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -27
- package/api/resources/windows/client/requests/AsyncMonitorRequest.js +0 -5
- package/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -29
- package/api/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -5
- package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -27
- package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -5
- package/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -29
- package/api/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -5
- package/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -23
- package/api/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -5
- package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -25
- package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -5
- package/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -37
- package/api/resources/windows/client/requests/AsyncTypeRequest.js +0 -5
- package/api/resources/windows/client/requests/OperatorPromptV1Body.d.ts +0 -25
- package/api/resources/windows/client/requests/OperatorPromptV1Body.js +0 -5
- package/api/types/AsyncOperatorPromptResponseEnvelope.d.ts +0 -9
- package/api/types/AsyncOperatorPromptResponseEnvelope.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -29
- package/dist/api/resources/windows/client/requests/AsyncClickRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -27
- package/dist/api/resources/windows/client/requests/AsyncHoverRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -27
- package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -29
- package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -27
- package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -29
- package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -23
- package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -25
- package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -37
- package/dist/api/resources/windows/client/requests/AsyncTypeRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/OperatorPromptV1Body.d.ts +0 -25
- package/dist/api/resources/windows/client/requests/OperatorPromptV1Body.js +0 -5
- package/dist/api/types/AsyncOperatorPromptResponseEnvelope.d.ts +0 -9
- package/dist/api/types/AsyncOperatorPromptResponseEnvelope.js +0 -5
- package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -20
- package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.js +0 -51
- package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -19
- package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.js +0 -50
- package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -19
- package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +0 -50
- package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -20
- package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -51
- package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -19
- package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -50
- package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -20
- package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -51
- package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -18
- package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -49
- package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -19
- package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -50
- package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -24
- package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.js +0 -55
- package/dist/serialization/resources/windows/client/requests/OperatorPromptV1Body.d.ts +0 -17
- package/dist/serialization/resources/windows/client/requests/OperatorPromptV1Body.js +0 -48
- package/dist/serialization/types/AsyncOperatorPromptResponseEnvelope.d.ts +0 -15
- package/dist/serialization/types/AsyncOperatorPromptResponseEnvelope.js +0 -46
- package/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -20
- package/serialization/resources/windows/client/requests/AsyncClickRequest.js +0 -51
- package/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -19
- package/serialization/resources/windows/client/requests/AsyncHoverRequest.js +0 -50
- package/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -19
- package/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +0 -50
- package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -20
- package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -51
- package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -19
- package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -50
- package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -20
- package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -51
- package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -18
- package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -49
- package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -19
- package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -50
- package/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -24
- package/serialization/resources/windows/client/requests/AsyncTypeRequest.js +0 -55
- package/serialization/resources/windows/client/requests/OperatorPromptV1Body.d.ts +0 -17
- package/serialization/resources/windows/client/requests/OperatorPromptV1Body.js +0 -48
- package/serialization/types/AsyncOperatorPromptResponseEnvelope.d.ts +0 -15
- package/serialization/types/AsyncOperatorPromptResponseEnvelope.js +0 -46
@@ -1,16 +1,7 @@
|
|
1
|
-
export { type AsyncClickRequest } from "./AsyncClickRequest";
|
2
1
|
export { type AsyncCreateAutomationRequest } from "./AsyncCreateAutomationRequest";
|
3
2
|
export { type AsyncCreateFormFillerRequest } from "./AsyncCreateFormFillerRequest";
|
4
3
|
export { type AsyncExecuteAutomationRequest } from "./AsyncExecuteAutomationRequest";
|
5
4
|
export { type AsyncFillFormRequest } from "./AsyncFillFormRequest";
|
6
|
-
export { type AsyncHoverRequest } from "./AsyncHoverRequest";
|
7
|
-
export { type AsyncMonitorRequest } from "./AsyncMonitorRequest";
|
8
|
-
export { type AsyncPageQueryRequest } from "./AsyncPageQueryRequest";
|
9
|
-
export { type AsyncPaginatedExtractionRequest } from "./AsyncPaginatedExtractionRequest";
|
10
|
-
export { type AsyncPromptContentRequest } from "./AsyncPromptContentRequest";
|
11
|
-
export { type AsyncScreenshotRequest } from "./AsyncScreenshotRequest";
|
12
|
-
export { type AsyncSummarizeContentRequest } from "./AsyncSummarizeContentRequest";
|
13
|
-
export { type AsyncTypeRequest } from "./AsyncTypeRequest";
|
14
5
|
export { type CreateWindowInputV1Body } from "./CreateWindowInputV1Body";
|
15
6
|
export { type GetWindowInfoRequest } from "./GetWindowInfoRequest";
|
16
7
|
export { type WindowLoadUrlV1Body } from "./WindowLoadUrlV1Body";
|
@@ -19,7 +10,6 @@ export { type CreateFormFillerRequest } from "./CreateFormFillerRequest";
|
|
19
10
|
export { type FillFormRequest } from "./FillFormRequest";
|
20
11
|
export { type SessionHoverHandlerRequestBody } from "./SessionHoverHandlerRequestBody";
|
21
12
|
export { type SessionMonitorHandlerRequestBody } from "./SessionMonitorHandlerRequestBody";
|
22
|
-
export { type OperatorPromptV1Body } from "./OperatorPromptV1Body";
|
23
13
|
export { type SessionPaginatedExtractionHandlerRequestBody } from "./SessionPaginatedExtractionHandlerRequestBody";
|
24
14
|
export { type ScrapeContentRequest } from "./ScrapeContentRequest";
|
25
15
|
export { type SessionScreenshotHandlerRequestBody } from "./SessionScreenshotHandlerRequestBody";
|
@@ -1,7 +1,6 @@
|
|
1
1
|
export * from "./AiPromptResponse";
|
2
2
|
export * from "./AiResponseEnvelope";
|
3
3
|
export * from "./AsyncConfig";
|
4
|
-
export * from "./AsyncOperatorPromptResponseEnvelope";
|
5
4
|
export * from "./AsyncSessionAiResponseEnvelope";
|
6
5
|
export * from "./AutomationOutput";
|
7
6
|
export * from "./BrowserWaitNavigationConfigWaitUntil";
|
package/dist/api/types/index.js
CHANGED
@@ -17,7 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./AiPromptResponse"), exports);
|
18
18
|
__exportStar(require("./AiResponseEnvelope"), exports);
|
19
19
|
__exportStar(require("./AsyncConfig"), exports);
|
20
|
-
__exportStar(require("./AsyncOperatorPromptResponseEnvelope"), exports);
|
21
20
|
__exportStar(require("./AsyncSessionAiResponseEnvelope"), exports);
|
22
21
|
__exportStar(require("./AutomationOutput"), exports);
|
23
22
|
__exportStar(require("./BrowserWaitNavigationConfigWaitUntil"), exports);
|
@@ -4,20 +4,14 @@
|
|
4
4
|
import * as serializers from "../../../index";
|
5
5
|
import * as Airtop from "../../../../api/index";
|
6
6
|
import * as core from "../../../../core";
|
7
|
-
import { SessionsEventsResponseSessionEvent } from "./SessionsEventsResponseSessionEvent";
|
8
|
-
import { SessionsEventsResponseFileEvent } from "./SessionsEventsResponseFileEvent";
|
9
7
|
import { SessionsEventsResponseStatus } from "./SessionsEventsResponseStatus";
|
10
8
|
import { SessionsEventsResponseError } from "./SessionsEventsResponseError";
|
11
9
|
import { SessionsEventsResponseWindowEvent } from "./SessionsEventsResponseWindowEvent";
|
10
|
+
import { SessionsEventsResponseSessionEvent } from "./SessionsEventsResponseSessionEvent";
|
11
|
+
import { SessionsEventsResponseFileEvent } from "./SessionsEventsResponseFileEvent";
|
12
12
|
export declare const SessionsEventsResponse: core.serialization.Schema<serializers.SessionsEventsResponse.Raw, Airtop.SessionsEventsResponse>;
|
13
13
|
export declare namespace SessionsEventsResponse {
|
14
|
-
type Raw = SessionsEventsResponse.
|
15
|
-
interface SessionEvent extends SessionsEventsResponseSessionEvent.Raw {
|
16
|
-
event: "sessionEvent";
|
17
|
-
}
|
18
|
-
interface FileEvent extends SessionsEventsResponseFileEvent.Raw {
|
19
|
-
event: "fileEvent";
|
20
|
-
}
|
14
|
+
type Raw = SessionsEventsResponse.Status | SessionsEventsResponse.Error | SessionsEventsResponse.WindowEvent | SessionsEventsResponse.SessionEvent | SessionsEventsResponse.FileEvent;
|
21
15
|
interface Status extends SessionsEventsResponseStatus.Raw {
|
22
16
|
event: "status";
|
23
17
|
}
|
@@ -27,4 +21,10 @@ export declare namespace SessionsEventsResponse {
|
|
27
21
|
interface WindowEvent extends SessionsEventsResponseWindowEvent.Raw {
|
28
22
|
event: "windowEvent";
|
29
23
|
}
|
24
|
+
interface SessionEvent extends SessionsEventsResponseSessionEvent.Raw {
|
25
|
+
event: "sessionEvent";
|
26
|
+
}
|
27
|
+
interface FileEvent extends SessionsEventsResponseFileEvent.Raw {
|
28
|
+
event: "fileEvent";
|
29
|
+
}
|
30
30
|
}
|
@@ -38,18 +38,18 @@ 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 SessionsEventsResponseSessionEvent_1 = require("./SessionsEventsResponseSessionEvent");
|
42
|
-
const SessionsEventsResponseFileEvent_1 = require("./SessionsEventsResponseFileEvent");
|
43
41
|
const SessionsEventsResponseStatus_1 = require("./SessionsEventsResponseStatus");
|
44
42
|
const SessionsEventsResponseError_1 = require("./SessionsEventsResponseError");
|
45
43
|
const SessionsEventsResponseWindowEvent_1 = require("./SessionsEventsResponseWindowEvent");
|
44
|
+
const SessionsEventsResponseSessionEvent_1 = require("./SessionsEventsResponseSessionEvent");
|
45
|
+
const SessionsEventsResponseFileEvent_1 = require("./SessionsEventsResponseFileEvent");
|
46
46
|
exports.SessionsEventsResponse = core.serialization
|
47
47
|
.union("event", {
|
48
|
-
sessionEvent: SessionsEventsResponseSessionEvent_1.SessionsEventsResponseSessionEvent,
|
49
|
-
fileEvent: SessionsEventsResponseFileEvent_1.SessionsEventsResponseFileEvent,
|
50
48
|
status: SessionsEventsResponseStatus_1.SessionsEventsResponseStatus,
|
51
49
|
error: SessionsEventsResponseError_1.SessionsEventsResponseError,
|
52
50
|
windowEvent: SessionsEventsResponseWindowEvent_1.SessionsEventsResponseWindowEvent,
|
51
|
+
sessionEvent: SessionsEventsResponseSessionEvent_1.SessionsEventsResponseSessionEvent,
|
52
|
+
fileEvent: SessionsEventsResponseFileEvent_1.SessionsEventsResponseFileEvent,
|
53
53
|
})
|
54
54
|
.transform({
|
55
55
|
transform: (value) => value,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
export * from "./SessionsListRequestStatus";
|
2
|
-
export * from "./SessionsEventsResponseSessionEvent";
|
3
|
-
export * from "./SessionsEventsResponseFileEvent";
|
4
2
|
export * from "./SessionsEventsResponseStatus";
|
5
3
|
export * from "./SessionsEventsResponseError";
|
6
4
|
export * from "./SessionsEventsResponseWindowEvent";
|
5
|
+
export * from "./SessionsEventsResponseSessionEvent";
|
6
|
+
export * from "./SessionsEventsResponseFileEvent";
|
7
7
|
export * from "./SessionsEventsResponse";
|
@@ -15,9 +15,9 @@ 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("./SessionsEventsResponseSessionEvent"), exports);
|
19
|
-
__exportStar(require("./SessionsEventsResponseFileEvent"), exports);
|
20
18
|
__exportStar(require("./SessionsEventsResponseStatus"), exports);
|
21
19
|
__exportStar(require("./SessionsEventsResponseError"), exports);
|
22
20
|
__exportStar(require("./SessionsEventsResponseWindowEvent"), exports);
|
21
|
+
__exportStar(require("./SessionsEventsResponseSessionEvent"), exports);
|
22
|
+
__exportStar(require("./SessionsEventsResponseFileEvent"), exports);
|
23
23
|
__exportStar(require("./SessionsEventsResponse"), exports);
|
@@ -1,16 +1,7 @@
|
|
1
|
-
export { AsyncClickRequest } from "./AsyncClickRequest";
|
2
1
|
export { AsyncCreateAutomationRequest } from "./AsyncCreateAutomationRequest";
|
3
2
|
export { AsyncCreateFormFillerRequest } from "./AsyncCreateFormFillerRequest";
|
4
3
|
export { AsyncExecuteAutomationRequest } from "./AsyncExecuteAutomationRequest";
|
5
4
|
export { AsyncFillFormRequest } from "./AsyncFillFormRequest";
|
6
|
-
export { AsyncHoverRequest } from "./AsyncHoverRequest";
|
7
|
-
export { AsyncMonitorRequest } from "./AsyncMonitorRequest";
|
8
|
-
export { AsyncPageQueryRequest } from "./AsyncPageQueryRequest";
|
9
|
-
export { AsyncPaginatedExtractionRequest } from "./AsyncPaginatedExtractionRequest";
|
10
|
-
export { AsyncPromptContentRequest } from "./AsyncPromptContentRequest";
|
11
|
-
export { AsyncScreenshotRequest } from "./AsyncScreenshotRequest";
|
12
|
-
export { AsyncSummarizeContentRequest } from "./AsyncSummarizeContentRequest";
|
13
|
-
export { AsyncTypeRequest } from "./AsyncTypeRequest";
|
14
5
|
export { CreateWindowInputV1Body } from "./CreateWindowInputV1Body";
|
15
6
|
export { WindowLoadUrlV1Body } from "./WindowLoadUrlV1Body";
|
16
7
|
export { SessionClickHandlerRequestBody } from "./SessionClickHandlerRequestBody";
|
@@ -18,7 +9,6 @@ export { CreateFormFillerRequest } from "./CreateFormFillerRequest";
|
|
18
9
|
export { FillFormRequest } from "./FillFormRequest";
|
19
10
|
export { SessionHoverHandlerRequestBody } from "./SessionHoverHandlerRequestBody";
|
20
11
|
export { SessionMonitorHandlerRequestBody } from "./SessionMonitorHandlerRequestBody";
|
21
|
-
export { OperatorPromptV1Body } from "./OperatorPromptV1Body";
|
22
12
|
export { SessionPaginatedExtractionHandlerRequestBody } from "./SessionPaginatedExtractionHandlerRequestBody";
|
23
13
|
export { ScrapeContentRequest } from "./ScrapeContentRequest";
|
24
14
|
export { SessionScreenshotHandlerRequestBody } from "./SessionScreenshotHandlerRequestBody";
|
@@ -1,8 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.SessionTypeHandlerRequestBody = exports.SessionSummaryHandlerRequestBody = exports.SessionScrollHandlerRequestBody = exports.SessionScreenshotHandlerRequestBody = exports.ScrapeContentRequest = exports.SessionPaginatedExtractionHandlerRequestBody = exports.
|
4
|
-
var AsyncClickRequest_1 = require("./AsyncClickRequest");
|
5
|
-
Object.defineProperty(exports, "AsyncClickRequest", { enumerable: true, get: function () { return AsyncClickRequest_1.AsyncClickRequest; } });
|
3
|
+
exports.SessionTypeHandlerRequestBody = exports.SessionSummaryHandlerRequestBody = exports.SessionScrollHandlerRequestBody = exports.SessionScreenshotHandlerRequestBody = exports.ScrapeContentRequest = exports.SessionPaginatedExtractionHandlerRequestBody = exports.SessionMonitorHandlerRequestBody = exports.SessionHoverHandlerRequestBody = exports.FillFormRequest = exports.CreateFormFillerRequest = exports.SessionClickHandlerRequestBody = exports.WindowLoadUrlV1Body = exports.CreateWindowInputV1Body = exports.AsyncFillFormRequest = exports.AsyncExecuteAutomationRequest = exports.AsyncCreateFormFillerRequest = exports.AsyncCreateAutomationRequest = void 0;
|
6
4
|
var AsyncCreateAutomationRequest_1 = require("./AsyncCreateAutomationRequest");
|
7
5
|
Object.defineProperty(exports, "AsyncCreateAutomationRequest", { enumerable: true, get: function () { return AsyncCreateAutomationRequest_1.AsyncCreateAutomationRequest; } });
|
8
6
|
var AsyncCreateFormFillerRequest_1 = require("./AsyncCreateFormFillerRequest");
|
@@ -11,22 +9,6 @@ var AsyncExecuteAutomationRequest_1 = require("./AsyncExecuteAutomationRequest")
|
|
11
9
|
Object.defineProperty(exports, "AsyncExecuteAutomationRequest", { enumerable: true, get: function () { return AsyncExecuteAutomationRequest_1.AsyncExecuteAutomationRequest; } });
|
12
10
|
var AsyncFillFormRequest_1 = require("./AsyncFillFormRequest");
|
13
11
|
Object.defineProperty(exports, "AsyncFillFormRequest", { enumerable: true, get: function () { return AsyncFillFormRequest_1.AsyncFillFormRequest; } });
|
14
|
-
var AsyncHoverRequest_1 = require("./AsyncHoverRequest");
|
15
|
-
Object.defineProperty(exports, "AsyncHoverRequest", { enumerable: true, get: function () { return AsyncHoverRequest_1.AsyncHoverRequest; } });
|
16
|
-
var AsyncMonitorRequest_1 = require("./AsyncMonitorRequest");
|
17
|
-
Object.defineProperty(exports, "AsyncMonitorRequest", { enumerable: true, get: function () { return AsyncMonitorRequest_1.AsyncMonitorRequest; } });
|
18
|
-
var AsyncPageQueryRequest_1 = require("./AsyncPageQueryRequest");
|
19
|
-
Object.defineProperty(exports, "AsyncPageQueryRequest", { enumerable: true, get: function () { return AsyncPageQueryRequest_1.AsyncPageQueryRequest; } });
|
20
|
-
var AsyncPaginatedExtractionRequest_1 = require("./AsyncPaginatedExtractionRequest");
|
21
|
-
Object.defineProperty(exports, "AsyncPaginatedExtractionRequest", { enumerable: true, get: function () { return AsyncPaginatedExtractionRequest_1.AsyncPaginatedExtractionRequest; } });
|
22
|
-
var AsyncPromptContentRequest_1 = require("./AsyncPromptContentRequest");
|
23
|
-
Object.defineProperty(exports, "AsyncPromptContentRequest", { enumerable: true, get: function () { return AsyncPromptContentRequest_1.AsyncPromptContentRequest; } });
|
24
|
-
var AsyncScreenshotRequest_1 = require("./AsyncScreenshotRequest");
|
25
|
-
Object.defineProperty(exports, "AsyncScreenshotRequest", { enumerable: true, get: function () { return AsyncScreenshotRequest_1.AsyncScreenshotRequest; } });
|
26
|
-
var AsyncSummarizeContentRequest_1 = require("./AsyncSummarizeContentRequest");
|
27
|
-
Object.defineProperty(exports, "AsyncSummarizeContentRequest", { enumerable: true, get: function () { return AsyncSummarizeContentRequest_1.AsyncSummarizeContentRequest; } });
|
28
|
-
var AsyncTypeRequest_1 = require("./AsyncTypeRequest");
|
29
|
-
Object.defineProperty(exports, "AsyncTypeRequest", { enumerable: true, get: function () { return AsyncTypeRequest_1.AsyncTypeRequest; } });
|
30
12
|
var CreateWindowInputV1Body_1 = require("./CreateWindowInputV1Body");
|
31
13
|
Object.defineProperty(exports, "CreateWindowInputV1Body", { enumerable: true, get: function () { return CreateWindowInputV1Body_1.CreateWindowInputV1Body; } });
|
32
14
|
var WindowLoadUrlV1Body_1 = require("./WindowLoadUrlV1Body");
|
@@ -41,8 +23,6 @@ var SessionHoverHandlerRequestBody_1 = require("./SessionHoverHandlerRequestBody
|
|
41
23
|
Object.defineProperty(exports, "SessionHoverHandlerRequestBody", { enumerable: true, get: function () { return SessionHoverHandlerRequestBody_1.SessionHoverHandlerRequestBody; } });
|
42
24
|
var SessionMonitorHandlerRequestBody_1 = require("./SessionMonitorHandlerRequestBody");
|
43
25
|
Object.defineProperty(exports, "SessionMonitorHandlerRequestBody", { enumerable: true, get: function () { return SessionMonitorHandlerRequestBody_1.SessionMonitorHandlerRequestBody; } });
|
44
|
-
var OperatorPromptV1Body_1 = require("./OperatorPromptV1Body");
|
45
|
-
Object.defineProperty(exports, "OperatorPromptV1Body", { enumerable: true, get: function () { return OperatorPromptV1Body_1.OperatorPromptV1Body; } });
|
46
26
|
var SessionPaginatedExtractionHandlerRequestBody_1 = require("./SessionPaginatedExtractionHandlerRequestBody");
|
47
27
|
Object.defineProperty(exports, "SessionPaginatedExtractionHandlerRequestBody", { enumerable: true, get: function () { return SessionPaginatedExtractionHandlerRequestBody_1.SessionPaginatedExtractionHandlerRequestBody; } });
|
48
28
|
var ScrapeContentRequest_1 = require("./ScrapeContentRequest");
|
@@ -1,7 +1,6 @@
|
|
1
1
|
export * from "./AiPromptResponse";
|
2
2
|
export * from "./AiResponseEnvelope";
|
3
3
|
export * from "./AsyncConfig";
|
4
|
-
export * from "./AsyncOperatorPromptResponseEnvelope";
|
5
4
|
export * from "./AsyncSessionAiResponseEnvelope";
|
6
5
|
export * from "./AutomationOutput";
|
7
6
|
export * from "./BrowserWaitNavigationConfigWaitUntil";
|
@@ -17,7 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./AiPromptResponse"), exports);
|
18
18
|
__exportStar(require("./AiResponseEnvelope"), exports);
|
19
19
|
__exportStar(require("./AsyncConfig"), exports);
|
20
|
-
__exportStar(require("./AsyncOperatorPromptResponseEnvelope"), exports);
|
21
20
|
__exportStar(require("./AsyncSessionAiResponseEnvelope"), exports);
|
22
21
|
__exportStar(require("./AutomationOutput"), exports);
|
23
22
|
__exportStar(require("./BrowserWaitNavigationConfigWaitUntil"), exports);
|
package/dist/version.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export declare const SDK_VERSION = "0.1.37
|
1
|
+
export declare const SDK_VERSION = "0.1.37";
|
package/dist/version.js
CHANGED
@@ -31,34 +31,33 @@ export declare class AirtopSessions extends SessionsClass {
|
|
31
31
|
/**
|
32
32
|
* Waits for a file to be downloaded in a session and reach 'available' status.
|
33
33
|
* Defaults to looking back 5 seconds in the event stream for the file to be available.
|
34
|
-
* Use `
|
34
|
+
* Use `lookbackSeconds` to control this behavior.
|
35
35
|
*
|
36
|
-
* @param {
|
37
|
-
* @param {
|
38
|
-
* @param {
|
39
|
-
* @param {number} [params.lookbackSeconds=5] - The number of seconds to look back for prior events. Default `5`.
|
36
|
+
* @param {string} sessionId - The ID of the session to monitor
|
37
|
+
* @param {Object} configuration - The optional configuration parameters for the function
|
38
|
+
* @param {number} [configuration.lookbackSeconds=5] - The number of seconds to look back for prior events. Default `5`. 0 means no lookback.
|
40
39
|
* @param {Sessions.RequestOptions} [requestOptions] - Optional request configuration including timeout
|
41
40
|
* @returns {Promise<{ id: string, downloadUrl: string } | null>} Object containing file's id and downloadUrl, or null if timed out
|
42
41
|
*/
|
43
42
|
waitForDownload(sessionId: string, configuration?: {
|
44
|
-
includePriorEvents?: boolean;
|
45
43
|
lookbackSeconds?: number;
|
46
44
|
}, requestOptions?: SessionsNamespace.RequestOptions): Promise<{
|
47
45
|
id: string;
|
48
46
|
downloadUrl: string;
|
49
47
|
} | null>;
|
50
48
|
/**
|
51
|
-
* Waits for a file download to start in a session
|
49
|
+
* Waits for a file download to start in a session.
|
50
|
+
* Defaults to looking back 5 seconds in the event stream for the file to be available.
|
51
|
+
* Use `lookbackSeconds` to control this behavior.
|
52
52
|
*
|
53
|
-
* @param {
|
54
|
-
* @param {
|
55
|
-
* @param {
|
53
|
+
* @param {string} sessionId - The ID of the session to monitor
|
54
|
+
* @param {Object} configuration - The optional configuration parameters for the function
|
55
|
+
* @param {number} [configuration.lookbackSeconds=5] - The number of seconds to look back for prior events. Default `5`. 0 means no lookback.
|
56
56
|
* @param {Sessions.RequestOptions} [requestOptions] - Optional request configuration including timeout
|
57
57
|
* @returns {Promise<{ id: string, downloadUrl: string } | null>} Object containing file's id and downloadUrl, or null if timed out
|
58
58
|
*/
|
59
|
-
waitForDownloadStart(
|
60
|
-
|
61
|
-
includePriorEvents?: boolean;
|
59
|
+
waitForDownloadStart(sessionId: string, configuration?: {
|
60
|
+
lookbackSeconds?: number;
|
62
61
|
}, requestOptions?: SessionsNamespace.RequestOptions): Promise<{
|
63
62
|
id: string;
|
64
63
|
downloadUrl: string;
|
@@ -66,18 +65,18 @@ export declare class AirtopSessions extends SessionsClass {
|
|
66
65
|
/**
|
67
66
|
* Downloads the next file from a session as soon as it starts to become available
|
68
67
|
*
|
69
|
-
* @param {
|
70
|
-
* @param {string}
|
71
|
-
* @param {
|
72
|
-
* @param {function} [
|
73
|
-
* @param {
|
68
|
+
* @param {string} sessionId - The ID of the session to download from
|
69
|
+
* @param {string} destinationPath - The local path where the file should be saved
|
70
|
+
* @param {Object} configuration - The optional configuration parameters for the function
|
71
|
+
* @param {function} [configuration.onProgress] - Optional callback to track download progress
|
72
|
+
* @param {number} [configuration.lookbackSeconds=5] - Optional number of seconds to look back for prior events. Default `5`. 0 means no lookback.
|
73
|
+
* @param {number} [configuration.timeoutSeconds=120] - Optional timeout in seconds. Default `120`.
|
74
74
|
* @param {Sessions.RequestOptions} [requestOptions] - Optional request configuration including timeout
|
75
75
|
* @throws Error if no file is available to download within the timeout period
|
76
76
|
*/
|
77
|
-
downloadNextFile(
|
78
|
-
sessionId: string;
|
79
|
-
destinationPath: string;
|
77
|
+
downloadNextFile(sessionId: string, destinationPath: string, configuration?: {
|
80
78
|
onProgress?: (downloadedBytes: number, totalBytes: number) => void;
|
81
|
-
|
79
|
+
lookbackSeconds?: number;
|
80
|
+
timeoutSeconds?: number;
|
82
81
|
}, requestOptions?: SessionsNamespace.RequestOptions): Promise<void>;
|
83
82
|
}
|
@@ -154,28 +154,31 @@ class AirtopSessions extends Client_1.Sessions {
|
|
154
154
|
/**
|
155
155
|
* Waits for a file to be downloaded in a session and reach 'available' status.
|
156
156
|
* Defaults to looking back 5 seconds in the event stream for the file to be available.
|
157
|
-
* Use `
|
157
|
+
* Use `lookbackSeconds` to control this behavior.
|
158
158
|
*
|
159
|
-
* @param {
|
160
|
-
* @param {
|
161
|
-
* @param {
|
162
|
-
* @param {number} [params.lookbackSeconds=5] - The number of seconds to look back for prior events. Default `5`.
|
159
|
+
* @param {string} sessionId - The ID of the session to monitor
|
160
|
+
* @param {Object} configuration - The optional configuration parameters for the function
|
161
|
+
* @param {number} [configuration.lookbackSeconds=5] - The number of seconds to look back for prior events. Default `5`. 0 means no lookback.
|
163
162
|
* @param {Sessions.RequestOptions} [requestOptions] - Optional request configuration including timeout
|
164
163
|
* @returns {Promise<{ id: string, downloadUrl: string } | null>} Object containing file's id and downloadUrl, or null if timed out
|
165
164
|
*/
|
166
165
|
waitForDownload(sessionId, configuration, requestOptions) {
|
167
166
|
return __awaiter(this, void 0, void 0, function* () {
|
168
|
-
const {
|
167
|
+
const { lookbackSeconds = 5 } = configuration || {};
|
168
|
+
this.log(`waiting for file to be available on session: ${sessionId}`);
|
169
169
|
const startTime = new Date();
|
170
170
|
const timeoutSeconds = (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) || 120;
|
171
171
|
// Create a promise that resolves to null after the timeout
|
172
172
|
const timeoutPromise = new Promise((resolve) => {
|
173
|
-
setTimeout(() =>
|
173
|
+
setTimeout(() => {
|
174
|
+
this.log(`waiting for file timed out after ${timeoutSeconds} seconds`);
|
175
|
+
resolve(null);
|
176
|
+
}, timeoutSeconds * 1000);
|
174
177
|
});
|
175
178
|
// Create a promise for the event processing
|
176
179
|
const processEventsPromise = (() => __awaiter(this, void 0, void 0, function* () {
|
177
180
|
var _a, e_2, _b, _c;
|
178
|
-
const sessionEvents = yield this.events(sessionId, { all:
|
181
|
+
const sessionEvents = yield this.events(sessionId, { all: lookbackSeconds >= 0 }, Object.assign({ timeoutInSeconds: timeoutSeconds }, (requestOptions || {})));
|
179
182
|
try {
|
180
183
|
for (var _d = true, sessionEvents_2 = __asyncValues(sessionEvents), sessionEvents_2_1; sessionEvents_2_1 = yield sessionEvents_2.next(), _a = sessionEvents_2_1.done, !_a; _d = true) {
|
181
184
|
_c = sessionEvents_2_1.value;
|
@@ -213,16 +216,20 @@ class AirtopSessions extends Client_1.Sessions {
|
|
213
216
|
});
|
214
217
|
}
|
215
218
|
/**
|
216
|
-
* Waits for a file download to start in a session
|
219
|
+
* Waits for a file download to start in a session.
|
220
|
+
* Defaults to looking back 5 seconds in the event stream for the file to be available.
|
221
|
+
* Use `lookbackSeconds` to control this behavior.
|
217
222
|
*
|
218
|
-
* @param {
|
219
|
-
* @param {
|
220
|
-
* @param {
|
223
|
+
* @param {string} sessionId - The ID of the session to monitor
|
224
|
+
* @param {Object} configuration - The optional configuration parameters for the function
|
225
|
+
* @param {number} [configuration.lookbackSeconds=5] - The number of seconds to look back for prior events. Default `5`. 0 means no lookback.
|
221
226
|
* @param {Sessions.RequestOptions} [requestOptions] - Optional request configuration including timeout
|
222
227
|
* @returns {Promise<{ id: string, downloadUrl: string } | null>} Object containing file's id and downloadUrl, or null if timed out
|
223
228
|
*/
|
224
|
-
waitForDownloadStart(
|
225
|
-
return __awaiter(this,
|
229
|
+
waitForDownloadStart(sessionId, configuration, requestOptions) {
|
230
|
+
return __awaiter(this, void 0, void 0, function* () {
|
231
|
+
const { lookbackSeconds = 5 } = configuration || {};
|
232
|
+
const startTime = new Date();
|
226
233
|
const timeoutSeconds = (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) || 60;
|
227
234
|
// Create a promise that resolves to null after the timeout
|
228
235
|
const timeoutPromise = new Promise((resolve) => {
|
@@ -231,7 +238,7 @@ class AirtopSessions extends Client_1.Sessions {
|
|
231
238
|
// Create a promise for the event processing
|
232
239
|
const processEventsPromise = (() => __awaiter(this, void 0, void 0, function* () {
|
233
240
|
var _a, e_3, _b, _c;
|
234
|
-
const sessionEvents = yield this.events(sessionId, { all:
|
241
|
+
const sessionEvents = yield this.events(sessionId, { all: lookbackSeconds >= 0 }, Object.assign({ timeoutInSeconds: timeoutSeconds }, (requestOptions || {})));
|
235
242
|
try {
|
236
243
|
for (var _d = true, sessionEvents_3 = __asyncValues(sessionEvents), sessionEvents_3_1; sessionEvents_3_1 = yield sessionEvents_3.next(), _a = sessionEvents_3_1.done, !_a; _d = true) {
|
237
244
|
_c = sessionEvents_3_1.value;
|
@@ -241,6 +248,12 @@ class AirtopSessions extends Client_1.Sessions {
|
|
241
248
|
if (e.event === 'file_status') {
|
242
249
|
this.log(`file_status message received:\n${JSON.stringify(event, null, 2)}`);
|
243
250
|
if (e.status === 'uploading') {
|
251
|
+
const eventTime = Date.parse(e.eventTime);
|
252
|
+
const thresholdTime = startTime.getTime() - lookbackSeconds * 1000;
|
253
|
+
if (eventTime < thresholdTime) {
|
254
|
+
this.log(`skipping file uploading event for ${e.fileId} because its timestamp is earlier than lookbackSeconds`);
|
255
|
+
continue;
|
256
|
+
}
|
244
257
|
return {
|
245
258
|
id: e.fileId,
|
246
259
|
downloadUrl: e.downloadUrl,
|
@@ -265,18 +278,20 @@ class AirtopSessions extends Client_1.Sessions {
|
|
265
278
|
/**
|
266
279
|
* Downloads the next file from a session as soon as it starts to become available
|
267
280
|
*
|
268
|
-
* @param {
|
269
|
-
* @param {string}
|
270
|
-
* @param {
|
271
|
-
* @param {function} [
|
272
|
-
* @param {
|
281
|
+
* @param {string} sessionId - The ID of the session to download from
|
282
|
+
* @param {string} destinationPath - The local path where the file should be saved
|
283
|
+
* @param {Object} configuration - The optional configuration parameters for the function
|
284
|
+
* @param {function} [configuration.onProgress] - Optional callback to track download progress
|
285
|
+
* @param {number} [configuration.lookbackSeconds=5] - Optional number of seconds to look back for prior events. Default `5`. 0 means no lookback.
|
286
|
+
* @param {number} [configuration.timeoutSeconds=120] - Optional timeout in seconds. Default `120`.
|
273
287
|
* @param {Sessions.RequestOptions} [requestOptions] - Optional request configuration including timeout
|
274
288
|
* @throws Error if no file is available to download within the timeout period
|
275
289
|
*/
|
276
|
-
downloadNextFile(
|
277
|
-
return __awaiter(this,
|
278
|
-
var
|
279
|
-
const
|
290
|
+
downloadNextFile(sessionId, destinationPath, configuration, requestOptions) {
|
291
|
+
return __awaiter(this, void 0, void 0, function* () {
|
292
|
+
var _a;
|
293
|
+
const { onProgress = undefined, lookbackSeconds = 5, timeoutSeconds = 120 } = configuration || {};
|
294
|
+
const nextFile = yield this.waitForDownload(sessionId, { lookbackSeconds }, Object.assign({ timeoutInSeconds: timeoutSeconds }, (requestOptions || {})));
|
280
295
|
if (!nextFile) {
|
281
296
|
throw new Error('No file to download within timeout');
|
282
297
|
}
|
@@ -284,7 +299,7 @@ class AirtopSessions extends Client_1.Sessions {
|
|
284
299
|
if (!downloadResponse.ok) {
|
285
300
|
throw new Error(`Failed to download file: ${downloadResponse.statusText}`);
|
286
301
|
}
|
287
|
-
const totalBytes = Number.parseInt((
|
302
|
+
const totalBytes = Number.parseInt((_a = downloadResponse.headers.get('content-length')) !== null && _a !== void 0 ? _a : '0', 10);
|
288
303
|
let downloadedBytes = 0;
|
289
304
|
fs.mkdirSync(path.dirname(destinationPath), { recursive: true });
|
290
305
|
const fileStream = fs.createWriteStream(destinationPath);
|