@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
@@ -2,6 +2,7 @@ export { type AsyncClickRequest } from "./AsyncClickRequest";
|
|
2
2
|
export { type AsyncCreateAutomationRequest } from "./AsyncCreateAutomationRequest";
|
3
3
|
export { type AsyncCreateFormFillerRequest } from "./AsyncCreateFormFillerRequest";
|
4
4
|
export { type AsyncExecuteAutomationRequest } from "./AsyncExecuteAutomationRequest";
|
5
|
+
export { type AsyncFileInputRequest } from "./AsyncFileInputRequest";
|
5
6
|
export { type AsyncFillFormRequest } from "./AsyncFillFormRequest";
|
6
7
|
export { type AsyncHoverRequest } from "./AsyncHoverRequest";
|
7
8
|
export { type AsyncMonitorRequest } from "./AsyncMonitorRequest";
|
@@ -16,6 +17,7 @@ export { type GetWindowInfoRequest } from "./GetWindowInfoRequest";
|
|
16
17
|
export { type WindowLoadUrlV1Body } from "./WindowLoadUrlV1Body";
|
17
18
|
export { type SessionClickHandlerRequestBody } from "./SessionClickHandlerRequestBody";
|
18
19
|
export { type CreateFormFillerRequest } from "./CreateFormFillerRequest";
|
20
|
+
export { type SessionFileInputHandlerRequestBody } from "./SessionFileInputHandlerRequestBody";
|
19
21
|
export { type FillFormRequest } from "./FillFormRequest";
|
20
22
|
export { type SessionHoverHandlerRequestBody } from "./SessionHoverHandlerRequestBody";
|
21
23
|
export { type SessionMonitorHandlerRequestBody } from "./SessionMonitorHandlerRequestBody";
|
@@ -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
|
+
}
|
@@ -0,0 +1,53 @@
|
|
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.AsyncFileInputRequest = void 0;
|
40
|
+
const core = __importStar(require("../../../../../core"));
|
41
|
+
const AsyncConfig_1 = require("../../../../types/AsyncConfig");
|
42
|
+
const MicroInteractionConfigWithExperimental_1 = require("../../../../types/MicroInteractionConfigWithExperimental");
|
43
|
+
exports.AsyncFileInputRequest = core.serialization.object({
|
44
|
+
async: AsyncConfig_1.AsyncConfig.optional(),
|
45
|
+
clientRequestId: core.serialization.string().optional(),
|
46
|
+
configuration: MicroInteractionConfigWithExperimental_1.MicroInteractionConfigWithExperimental.optional(),
|
47
|
+
costThresholdCredits: core.serialization.number().optional(),
|
48
|
+
elementDescription: core.serialization.string(),
|
49
|
+
fileId: core.serialization.string().optional(),
|
50
|
+
fileName: core.serialization.string().optional(),
|
51
|
+
timeThresholdSeconds: core.serialization.number().optional(),
|
52
|
+
waitForNavigation: core.serialization.boolean().optional(),
|
53
|
+
});
|
package/dist/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts
ADDED
@@ -0,0 +1,20 @@
|
|
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 { MicroInteractionConfigWithExperimental } from "../../../../types/MicroInteractionConfigWithExperimental";
|
8
|
+
export declare const SessionFileInputHandlerRequestBody: core.serialization.Schema<serializers.SessionFileInputHandlerRequestBody.Raw, Airtop.SessionFileInputHandlerRequestBody>;
|
9
|
+
export declare namespace SessionFileInputHandlerRequestBody {
|
10
|
+
interface Raw {
|
11
|
+
clientRequestId?: string | null;
|
12
|
+
configuration?: MicroInteractionConfigWithExperimental.Raw | null;
|
13
|
+
costThresholdCredits?: number | null;
|
14
|
+
elementDescription: string;
|
15
|
+
fileId?: string | null;
|
16
|
+
fileName?: string | null;
|
17
|
+
timeThresholdSeconds?: number | null;
|
18
|
+
waitForNavigation?: boolean | null;
|
19
|
+
}
|
20
|
+
}
|
package/dist/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js
ADDED
@@ -0,0 +1,51 @@
|
|
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.SessionFileInputHandlerRequestBody = void 0;
|
40
|
+
const core = __importStar(require("../../../../../core"));
|
41
|
+
const MicroInteractionConfigWithExperimental_1 = require("../../../../types/MicroInteractionConfigWithExperimental");
|
42
|
+
exports.SessionFileInputHandlerRequestBody = core.serialization.object({
|
43
|
+
clientRequestId: core.serialization.string().optional(),
|
44
|
+
configuration: MicroInteractionConfigWithExperimental_1.MicroInteractionConfigWithExperimental.optional(),
|
45
|
+
costThresholdCredits: core.serialization.number().optional(),
|
46
|
+
elementDescription: core.serialization.string(),
|
47
|
+
fileId: core.serialization.string().optional(),
|
48
|
+
fileName: core.serialization.string().optional(),
|
49
|
+
timeThresholdSeconds: core.serialization.number().optional(),
|
50
|
+
waitForNavigation: core.serialization.boolean().optional(),
|
51
|
+
});
|
@@ -2,6 +2,7 @@ export { AsyncClickRequest } from "./AsyncClickRequest";
|
|
2
2
|
export { AsyncCreateAutomationRequest } from "./AsyncCreateAutomationRequest";
|
3
3
|
export { AsyncCreateFormFillerRequest } from "./AsyncCreateFormFillerRequest";
|
4
4
|
export { AsyncExecuteAutomationRequest } from "./AsyncExecuteAutomationRequest";
|
5
|
+
export { AsyncFileInputRequest } from "./AsyncFileInputRequest";
|
5
6
|
export { AsyncFillFormRequest } from "./AsyncFillFormRequest";
|
6
7
|
export { AsyncHoverRequest } from "./AsyncHoverRequest";
|
7
8
|
export { AsyncMonitorRequest } from "./AsyncMonitorRequest";
|
@@ -15,6 +16,7 @@ export { CreateWindowInputV1Body } from "./CreateWindowInputV1Body";
|
|
15
16
|
export { WindowLoadUrlV1Body } from "./WindowLoadUrlV1Body";
|
16
17
|
export { SessionClickHandlerRequestBody } from "./SessionClickHandlerRequestBody";
|
17
18
|
export { CreateFormFillerRequest } from "./CreateFormFillerRequest";
|
19
|
+
export { SessionFileInputHandlerRequestBody } from "./SessionFileInputHandlerRequestBody";
|
18
20
|
export { FillFormRequest } from "./FillFormRequest";
|
19
21
|
export { SessionHoverHandlerRequestBody } from "./SessionHoverHandlerRequestBody";
|
20
22
|
export { SessionMonitorHandlerRequestBody } from "./SessionMonitorHandlerRequestBody";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.LlmRequest = exports.FindOneRequest = exports.FindManyRequest = exports.ExtractRequest = exports.ActRequest = exports.SessionTypeHandlerRequestBody = exports.SessionSummaryHandlerRequestBody = exports.SessionScrollHandlerRequestBody = exports.SessionScreenshotHandlerRequestBody = exports.ScrapeContentRequest = exports.SessionPaginatedExtractionHandlerRequestBody = exports.OperatorPromptV1Body = exports.SessionMonitorHandlerRequestBody = exports.SessionHoverHandlerRequestBody = exports.FillFormRequest = exports.CreateFormFillerRequest = exports.SessionClickHandlerRequestBody = exports.WindowLoadUrlV1Body = exports.CreateWindowInputV1Body = exports.AsyncTypeRequest = exports.AsyncSummarizeContentRequest = exports.AsyncScreenshotRequest = exports.AsyncPromptContentRequest = exports.AsyncPaginatedExtractionRequest = exports.AsyncPageQueryRequest = exports.AsyncMonitorRequest = exports.AsyncHoverRequest = exports.AsyncFillFormRequest = exports.AsyncExecuteAutomationRequest = exports.AsyncCreateFormFillerRequest = exports.AsyncCreateAutomationRequest = exports.AsyncClickRequest = void 0;
|
3
|
+
exports.LlmRequest = exports.FindOneRequest = exports.FindManyRequest = exports.ExtractRequest = exports.ActRequest = exports.SessionTypeHandlerRequestBody = exports.SessionSummaryHandlerRequestBody = exports.SessionScrollHandlerRequestBody = exports.SessionScreenshotHandlerRequestBody = exports.ScrapeContentRequest = exports.SessionPaginatedExtractionHandlerRequestBody = exports.OperatorPromptV1Body = exports.SessionMonitorHandlerRequestBody = exports.SessionHoverHandlerRequestBody = exports.FillFormRequest = exports.SessionFileInputHandlerRequestBody = exports.CreateFormFillerRequest = exports.SessionClickHandlerRequestBody = exports.WindowLoadUrlV1Body = exports.CreateWindowInputV1Body = exports.AsyncTypeRequest = exports.AsyncSummarizeContentRequest = exports.AsyncScreenshotRequest = exports.AsyncPromptContentRequest = exports.AsyncPaginatedExtractionRequest = exports.AsyncPageQueryRequest = exports.AsyncMonitorRequest = exports.AsyncHoverRequest = exports.AsyncFillFormRequest = exports.AsyncFileInputRequest = exports.AsyncExecuteAutomationRequest = exports.AsyncCreateFormFillerRequest = exports.AsyncCreateAutomationRequest = exports.AsyncClickRequest = void 0;
|
4
4
|
var AsyncClickRequest_1 = require("./AsyncClickRequest");
|
5
5
|
Object.defineProperty(exports, "AsyncClickRequest", { enumerable: true, get: function () { return AsyncClickRequest_1.AsyncClickRequest; } });
|
6
6
|
var AsyncCreateAutomationRequest_1 = require("./AsyncCreateAutomationRequest");
|
@@ -9,6 +9,8 @@ var AsyncCreateFormFillerRequest_1 = require("./AsyncCreateFormFillerRequest");
|
|
9
9
|
Object.defineProperty(exports, "AsyncCreateFormFillerRequest", { enumerable: true, get: function () { return AsyncCreateFormFillerRequest_1.AsyncCreateFormFillerRequest; } });
|
10
10
|
var AsyncExecuteAutomationRequest_1 = require("./AsyncExecuteAutomationRequest");
|
11
11
|
Object.defineProperty(exports, "AsyncExecuteAutomationRequest", { enumerable: true, get: function () { return AsyncExecuteAutomationRequest_1.AsyncExecuteAutomationRequest; } });
|
12
|
+
var AsyncFileInputRequest_1 = require("./AsyncFileInputRequest");
|
13
|
+
Object.defineProperty(exports, "AsyncFileInputRequest", { enumerable: true, get: function () { return AsyncFileInputRequest_1.AsyncFileInputRequest; } });
|
12
14
|
var AsyncFillFormRequest_1 = require("./AsyncFillFormRequest");
|
13
15
|
Object.defineProperty(exports, "AsyncFillFormRequest", { enumerable: true, get: function () { return AsyncFillFormRequest_1.AsyncFillFormRequest; } });
|
14
16
|
var AsyncHoverRequest_1 = require("./AsyncHoverRequest");
|
@@ -35,6 +37,8 @@ var SessionClickHandlerRequestBody_1 = require("./SessionClickHandlerRequestBody
|
|
35
37
|
Object.defineProperty(exports, "SessionClickHandlerRequestBody", { enumerable: true, get: function () { return SessionClickHandlerRequestBody_1.SessionClickHandlerRequestBody; } });
|
36
38
|
var CreateFormFillerRequest_1 = require("./CreateFormFillerRequest");
|
37
39
|
Object.defineProperty(exports, "CreateFormFillerRequest", { enumerable: true, get: function () { return CreateFormFillerRequest_1.CreateFormFillerRequest; } });
|
40
|
+
var SessionFileInputHandlerRequestBody_1 = require("./SessionFileInputHandlerRequestBody");
|
41
|
+
Object.defineProperty(exports, "SessionFileInputHandlerRequestBody", { enumerable: true, get: function () { return SessionFileInputHandlerRequestBody_1.SessionFileInputHandlerRequestBody; } });
|
38
42
|
var FillFormRequest_1 = require("./FillFormRequest");
|
39
43
|
Object.defineProperty(exports, "FillFormRequest", { enumerable: true, get: function () { return FillFormRequest_1.FillFormRequest; } });
|
40
44
|
var SessionHoverHandlerRequestBody_1 = require("./SessionHoverHandlerRequestBody");
|
@@ -42,6 +42,7 @@ const FileEventMessageStatus_1 = require("./FileEventMessageStatus");
|
|
42
42
|
exports.FileEventMessage = core.serialization.object({
|
43
43
|
downloadUrl: core.serialization.string(),
|
44
44
|
event: core.serialization.string(),
|
45
|
+
eventData: core.serialization.unknown().optional(),
|
45
46
|
eventTime: core.serialization.date(),
|
46
47
|
fileId: core.serialization.string(),
|
47
48
|
status: FileEventMessageStatus_1.FileEventMessageStatus,
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./batch-operate/batch-util"), exports);
|
18
18
|
__exportStar(require("./batch-operate/types"), exports);
|
19
19
|
__exportStar(require("./process-screenshots"), exports);
|
20
|
+
__exportStar(require("./upload"), exports);
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { AirtopClient } from '../wrapper/AirtopClient';
|
2
|
+
import type * as Airtop from '../api';
|
3
|
+
export declare function uploadFileAndSelectInput({ client, sessionId, windowId, configuration, }: {
|
4
|
+
client: AirtopClient;
|
5
|
+
sessionId: string;
|
6
|
+
windowId: string;
|
7
|
+
configuration: Airtop.SessionFileInputHandlerRequestBody & {
|
8
|
+
uploadFilePath: string;
|
9
|
+
};
|
10
|
+
}): Promise<{
|
11
|
+
fileId: string;
|
12
|
+
aiResponse: Airtop.AiPromptResponse;
|
13
|
+
}>;
|
@@ -0,0 +1,55 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
exports.uploadFileAndSelectInput = uploadFileAndSelectInput;
|
13
|
+
function uploadFileAndSelectInput(_a) {
|
14
|
+
return __awaiter(this, arguments, void 0, function* ({ client, sessionId, windowId, configuration, }) {
|
15
|
+
const windowInfo = yield client.windows.getWindowInfo(sessionId, windowId);
|
16
|
+
if (!windowInfo) {
|
17
|
+
throw new Error('window not found');
|
18
|
+
}
|
19
|
+
client.log(`starting file upload: sessionId: ${sessionId}, windowId: ${windowId}, uploadFilePath: ${configuration.uploadFilePath}`);
|
20
|
+
const fileUploadResponse = yield client.files.upload(configuration.uploadFilePath);
|
21
|
+
if (fileUploadResponse.errors && fileUploadResponse.errors.length > 0) {
|
22
|
+
client.log(`file upload failed: ${JSON.stringify(fileUploadResponse.errors)}`);
|
23
|
+
throw new Error('file upload failed');
|
24
|
+
}
|
25
|
+
const fileId = fileUploadResponse.data.id;
|
26
|
+
client.log(`file upload to cloud complete: file id: ${fileId}`);
|
27
|
+
yield client.files.push(fileId, {
|
28
|
+
sessionIds: [sessionId],
|
29
|
+
});
|
30
|
+
client.log('file pushed to session');
|
31
|
+
client.log('waiting for file upload to become available');
|
32
|
+
const waitResult = yield client.sessions.waitForUploadAvailable(sessionId, fileId);
|
33
|
+
if (waitResult) {
|
34
|
+
client.log('file upload available');
|
35
|
+
}
|
36
|
+
else {
|
37
|
+
client.log('file upload not available within timeout');
|
38
|
+
throw new Error('file upload not available within timeout');
|
39
|
+
}
|
40
|
+
client.log('executing file input interaction');
|
41
|
+
const fileInputResponse = yield client.windows.fileInput(sessionId, windowId, {
|
42
|
+
fileId: fileId,
|
43
|
+
elementDescription: configuration.elementDescription,
|
44
|
+
});
|
45
|
+
if (fileInputResponse.errors && fileInputResponse.errors.length > 0) {
|
46
|
+
throw new Error('file input failed');
|
47
|
+
}
|
48
|
+
client.log('file upload and file input interaction complete');
|
49
|
+
client.log(JSON.stringify(fileInputResponse, null, 2));
|
50
|
+
return {
|
51
|
+
fileId,
|
52
|
+
aiResponse: fileInputResponse,
|
53
|
+
};
|
54
|
+
});
|
55
|
+
}
|
package/dist/version.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export declare const SDK_VERSION = "0.1.
|
1
|
+
export declare const SDK_VERSION = "0.1.41-beta0";
|
package/dist/version.js
CHANGED
@@ -78,7 +78,7 @@ class AirtopClient {
|
|
78
78
|
}
|
79
79
|
get windows() {
|
80
80
|
var _a;
|
81
|
-
return ((_a = this._windows) !== null && _a !== void 0 ? _a : (this._windows = new AirtopWindows_1.AirtopWindows(this._options, this._options.apiKey)));
|
81
|
+
return ((_a = this._windows) !== null && _a !== void 0 ? _a : (this._windows = new AirtopWindows_1.AirtopWindows(this, this._options, this._options.apiKey)));
|
82
82
|
}
|
83
83
|
get requests() {
|
84
84
|
var _a;
|
@@ -113,9 +113,9 @@ class AirtopFiles extends Client_1.Files {
|
|
113
113
|
var _a;
|
114
114
|
// Get the file entry to get the download URL
|
115
115
|
const fileEntry = yield this.get(fileId, options);
|
116
|
-
|
117
|
-
|
118
|
-
|
116
|
+
if (fileEntry.data.status !== 'available') {
|
117
|
+
throw new Error(`File ${fileId} is not ready for download`);
|
118
|
+
}
|
119
119
|
// Download the file content
|
120
120
|
const downloadResponse = yield (0, node_fetch_1.default)(fileEntry.data.downloadUrl);
|
121
121
|
if (!downloadResponse.ok) {
|
@@ -79,4 +79,28 @@ export declare class AirtopSessions extends SessionsClass {
|
|
79
79
|
lookbackSeconds?: number;
|
80
80
|
timeoutSeconds?: number;
|
81
81
|
}, requestOptions?: SessionsNamespace.RequestOptions): Promise<void>;
|
82
|
+
/**
|
83
|
+
* Waits for a file upload to become available to a session.
|
84
|
+
*
|
85
|
+
* @param sessionId - The session id for the file upload.
|
86
|
+
* @param fileId - The file id for the file upload.
|
87
|
+
* @param timeoutSeconds - The timeout in seconds.
|
88
|
+
* @returns The event for the file upload.
|
89
|
+
*/
|
90
|
+
waitForUploadAvailable(sessionId: string, fileId: string, timeoutSeconds?: number): Promise<Airtop.SessionsEventsResponse | null>;
|
91
|
+
/**
|
92
|
+
* Captcha event listener
|
93
|
+
* Defaults to looking back 5 seconds in the event stream for the captcha event to be available.
|
94
|
+
* Use `lookbackSeconds` to control this behavior.
|
95
|
+
*
|
96
|
+
* @param {string} sessionId - The ID of the session to monitor
|
97
|
+
* @param {function} callback - The callback function to be called when a captcha event is received
|
98
|
+
* @param {Object} configuration - The optional configuration parameters for the function
|
99
|
+
* @param {number} [configuration.lookbackSeconds=5] - The number of seconds to look back for prior events. Default `5`. 0 means no lookback.
|
100
|
+
* @param {Sessions.RequestOptions} [requestOptions] - Optional request configuration including timeout
|
101
|
+
* @returns {function} - A function to stop listening for captcha events
|
102
|
+
*/
|
103
|
+
onCaptchaEvent(sessionId: string, callback: (data: Airtop.CaptchaEventMessage) => void | Promise<void>, configuration?: {
|
104
|
+
lookbackSeconds?: number;
|
105
|
+
}, requestOptions?: SessionsNamespace.RequestOptions): () => void;
|
82
106
|
}
|