@airtop/sdk 0.1.40 → 0.1.41
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/windows/client/Client.d.ts +14 -0
- package/api/resources/windows/client/Client.js +80 -21
- 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 +1 -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/windows/client/Client.d.ts +14 -0
- package/dist/api/resources/windows/client/Client.js +80 -21
- 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 +1 -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/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 +1 -0
- package/dist/serialization/resources/windows/client/requests/index.js +3 -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 +152 -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/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 +1 -0
- package/serialization/resources/windows/client/requests/index.js +3 -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
@@ -75,7 +75,7 @@ class Windows {
|
|
75
75
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
76
76
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/create-automation`),
|
77
77
|
method: "POST",
|
78
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
78
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
79
79
|
contentType: "application/json",
|
80
80
|
requestType: "json",
|
81
81
|
body: serializers.AsyncCreateAutomationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -130,7 +130,7 @@ class Windows {
|
|
130
130
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
131
131
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/create-form-filler`),
|
132
132
|
method: "POST",
|
133
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
133
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
134
134
|
contentType: "application/json",
|
135
135
|
requestType: "json",
|
136
136
|
body: serializers.AsyncCreateFormFillerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -187,7 +187,7 @@ class Windows {
|
|
187
187
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
188
188
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/execute-automation`),
|
189
189
|
method: "POST",
|
190
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
190
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
191
191
|
contentType: "application/json",
|
192
192
|
requestType: "json",
|
193
193
|
body: serializers.AsyncExecuteAutomationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -244,7 +244,7 @@ class Windows {
|
|
244
244
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
245
245
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/fill-form`),
|
246
246
|
method: "POST",
|
247
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
247
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
248
248
|
contentType: "application/json",
|
249
249
|
requestType: "json",
|
250
250
|
body: serializers.AsyncFillFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -298,7 +298,7 @@ class Windows {
|
|
298
298
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
299
299
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(sessionId)}/windows`),
|
300
300
|
method: "POST",
|
301
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
301
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
302
302
|
contentType: "application/json",
|
303
303
|
requestType: "json",
|
304
304
|
body: serializers.CreateWindowInputV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -366,7 +366,7 @@ class Windows {
|
|
366
366
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
367
367
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}`),
|
368
368
|
method: "GET",
|
369
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
369
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
370
370
|
contentType: "application/json",
|
371
371
|
queryParameters: _queryParams,
|
372
372
|
requestType: "json",
|
@@ -423,7 +423,7 @@ class Windows {
|
|
423
423
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
424
424
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}`),
|
425
425
|
method: "POST",
|
426
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
426
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
427
427
|
contentType: "application/json",
|
428
428
|
requestType: "json",
|
429
429
|
body: serializers.WindowLoadUrlV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -477,7 +477,7 @@ class Windows {
|
|
477
477
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
478
478
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}`),
|
479
479
|
method: "DELETE",
|
480
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
480
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
481
481
|
contentType: "application/json",
|
482
482
|
requestType: "json",
|
483
483
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -533,7 +533,7 @@ class Windows {
|
|
533
533
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
534
534
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/click`),
|
535
535
|
method: "POST",
|
536
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
536
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
537
537
|
contentType: "application/json",
|
538
538
|
requestType: "json",
|
539
539
|
body: serializers.SessionClickHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -588,7 +588,7 @@ class Windows {
|
|
588
588
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
589
589
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/create-form-filler`),
|
590
590
|
method: "POST",
|
591
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
591
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
592
592
|
contentType: "application/json",
|
593
593
|
requestType: "json",
|
594
594
|
body: serializers.CreateFormFillerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -626,6 +626,65 @@ class Windows {
|
|
626
626
|
}
|
627
627
|
});
|
628
628
|
}
|
629
|
+
/**
|
630
|
+
* Execute a file input interaction in a specific browser window
|
631
|
+
*
|
632
|
+
* @param {string} sessionId - The session id for the window.
|
633
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
634
|
+
* @param {Airtop.SessionFileInputHandlerRequestBody} request
|
635
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
636
|
+
*
|
637
|
+
* @example
|
638
|
+
* await client.windows.fileInput("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
639
|
+
* elementDescription: "The file input in the bottom left corner"
|
640
|
+
* })
|
641
|
+
*/
|
642
|
+
fileInput(sessionId, windowId, request, requestOptions) {
|
643
|
+
return __awaiter(this, void 0, void 0, function* () {
|
644
|
+
var _a, _b, _c;
|
645
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
646
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/file-input`),
|
647
|
+
method: "POST",
|
648
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
649
|
+
contentType: "application/json",
|
650
|
+
requestType: "json",
|
651
|
+
body: serializers.SessionFileInputHandlerRequestBody.jsonOrThrow(request, {
|
652
|
+
unrecognizedObjectKeys: "strip",
|
653
|
+
}),
|
654
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
655
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
656
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
657
|
+
});
|
658
|
+
if (_response.ok) {
|
659
|
+
return serializers.AiPromptResponse.parseOrThrow(_response.body, {
|
660
|
+
unrecognizedObjectKeys: "passthrough",
|
661
|
+
allowUnrecognizedUnionMembers: true,
|
662
|
+
allowUnrecognizedEnumValues: true,
|
663
|
+
skipValidation: true,
|
664
|
+
breadcrumbsPrefix: ["response"],
|
665
|
+
});
|
666
|
+
}
|
667
|
+
if (_response.error.reason === "status-code") {
|
668
|
+
throw new errors.AirtopError({
|
669
|
+
statusCode: _response.error.statusCode,
|
670
|
+
body: _response.error.body,
|
671
|
+
});
|
672
|
+
}
|
673
|
+
switch (_response.error.reason) {
|
674
|
+
case "non-json":
|
675
|
+
throw new errors.AirtopError({
|
676
|
+
statusCode: _response.error.statusCode,
|
677
|
+
body: _response.error.rawBody,
|
678
|
+
});
|
679
|
+
case "timeout":
|
680
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/sessions/{sessionId}/windows/{windowId}/file-input.");
|
681
|
+
case "unknown":
|
682
|
+
throw new errors.AirtopError({
|
683
|
+
message: _response.error.errorMessage,
|
684
|
+
});
|
685
|
+
}
|
686
|
+
});
|
687
|
+
}
|
629
688
|
/**
|
630
689
|
* Fill a form of a browser window synchronously using a form-filler automation
|
631
690
|
*
|
@@ -645,7 +704,7 @@ class Windows {
|
|
645
704
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
646
705
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/fill-form`),
|
647
706
|
method: "POST",
|
648
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
707
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
649
708
|
contentType: "application/json",
|
650
709
|
requestType: "json",
|
651
710
|
body: serializers.FillFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -702,7 +761,7 @@ class Windows {
|
|
702
761
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
703
762
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/hover`),
|
704
763
|
method: "POST",
|
705
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
764
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
706
765
|
contentType: "application/json",
|
707
766
|
requestType: "json",
|
708
767
|
body: serializers.SessionHoverHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -757,7 +816,7 @@ class Windows {
|
|
757
816
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
758
817
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/monitor`),
|
759
818
|
method: "POST",
|
760
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
819
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
761
820
|
contentType: "application/json",
|
762
821
|
requestType: "json",
|
763
822
|
body: serializers.SessionMonitorHandlerRequestBody.jsonOrThrow(request, {
|
@@ -816,7 +875,7 @@ class Windows {
|
|
816
875
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
817
876
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/page-query`),
|
818
877
|
method: "POST",
|
819
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
878
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
820
879
|
contentType: "application/json",
|
821
880
|
requestType: "json",
|
822
881
|
body: serializers.SessionPageQueryHandlerRequestBody.jsonOrThrow(request, {
|
@@ -875,7 +934,7 @@ class Windows {
|
|
875
934
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
876
935
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/paginated-extraction`),
|
877
936
|
method: "POST",
|
878
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
937
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
879
938
|
contentType: "application/json",
|
880
939
|
requestType: "json",
|
881
940
|
body: serializers.SessionPaginatedExtractionHandlerRequestBody.jsonOrThrow(request, {
|
@@ -934,7 +993,7 @@ class Windows {
|
|
934
993
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
935
994
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/prompt-content`),
|
936
995
|
method: "POST",
|
937
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
996
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
938
997
|
contentType: "application/json",
|
939
998
|
requestType: "json",
|
940
999
|
body: serializers.SessionPageQueryHandlerRequestBody.jsonOrThrow(request, {
|
@@ -991,7 +1050,7 @@ class Windows {
|
|
991
1050
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
992
1051
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/scrape-content`),
|
993
1052
|
method: "POST",
|
994
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1053
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
995
1054
|
contentType: "application/json",
|
996
1055
|
requestType: "json",
|
997
1056
|
body: serializers.ScrapeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1046,7 +1105,7 @@ class Windows {
|
|
1046
1105
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1047
1106
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/screenshot`),
|
1048
1107
|
method: "POST",
|
1049
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1108
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1050
1109
|
contentType: "application/json",
|
1051
1110
|
requestType: "json",
|
1052
1111
|
body: serializers.SessionScreenshotHandlerRequestBody.jsonOrThrow(request, {
|
@@ -1103,7 +1162,7 @@ class Windows {
|
|
1103
1162
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1104
1163
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/scroll`),
|
1105
1164
|
method: "POST",
|
1106
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1165
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1107
1166
|
contentType: "application/json",
|
1108
1167
|
requestType: "json",
|
1109
1168
|
body: serializers.SessionScrollHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1158,7 +1217,7 @@ class Windows {
|
|
1158
1217
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1159
1218
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/summarize-content`),
|
1160
1219
|
method: "POST",
|
1161
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1220
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1162
1221
|
contentType: "application/json",
|
1163
1222
|
requestType: "json",
|
1164
1223
|
body: serializers.SessionSummaryHandlerRequestBody.jsonOrThrow(request, {
|
@@ -1217,7 +1276,7 @@ class Windows {
|
|
1217
1276
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1218
1277
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/type`),
|
1219
1278
|
method: "POST",
|
1220
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1279
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41", "User-Agent": "@airtop/sdk/0.1.41", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1221
1280
|
contentType: "application/json",
|
1222
1281
|
requestType: "json",
|
1223
1282
|
body: serializers.SessionTypeHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -0,0 +1,31 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as Airtop from "../../../../index";
|
5
|
+
/**
|
6
|
+
* @example
|
7
|
+
* {
|
8
|
+
* elementDescription: "The file input in the bottom left corner"
|
9
|
+
* }
|
10
|
+
*/
|
11
|
+
export interface SessionFileInputHandlerRequestBody {
|
12
|
+
clientRequestId?: string;
|
13
|
+
/** Request configuration */
|
14
|
+
configuration?: Airtop.MicroInteractionConfigWithExperimental;
|
15
|
+
/** A credit threshold that, once exceeded, will cause the operation to be cancelled. Note that this is *not* a hard limit, but a threshold that is checked periodically during the course of fulfilling the request. A default threshold is used if not specified, but you can use this option to increase or decrease as needed. Set to 0 to disable this feature entirely (not recommended). */
|
16
|
+
costThresholdCredits?: number;
|
17
|
+
/** A natural language description of the file input to interact with (e.g. 'the file input', 'file upload selection box'). The interaction will be aborted if the target element cannot be found. */
|
18
|
+
elementDescription: string;
|
19
|
+
/** The id of the file to upload. 'fileId' or 'fileName' is required. */
|
20
|
+
fileId?: string;
|
21
|
+
/** The name of the file to upload, not including the path. 'fileId' or 'fileName' is required. */
|
22
|
+
fileName?: string;
|
23
|
+
/**
|
24
|
+
* A time threshold in seconds that, once exceeded, will cause the operation to be cancelled. Note that this is *not* a hard limit, but a threshold that is checked periodically during the course of fulfilling the request. A default threshold is used if not specified, but you can use this option to increase or decrease as needed. Set to 0 to disable this feature entirely (not recommended).
|
25
|
+
*
|
26
|
+
* This setting does not extend the maximum session duration provided at the time of session creation.
|
27
|
+
*/
|
28
|
+
timeThresholdSeconds?: number;
|
29
|
+
/** If true, Airtop AI will wait for the navigation to complete after clicking the element. */
|
30
|
+
waitForNavigation?: boolean;
|
31
|
+
}
|
@@ -7,6 +7,7 @@ export { type GetWindowInfoRequest } from "./GetWindowInfoRequest";
|
|
7
7
|
export { type WindowLoadUrlV1Body } from "./WindowLoadUrlV1Body";
|
8
8
|
export { type SessionClickHandlerRequestBody } from "./SessionClickHandlerRequestBody";
|
9
9
|
export { type CreateFormFillerRequest } from "./CreateFormFillerRequest";
|
10
|
+
export { type SessionFileInputHandlerRequestBody } from "./SessionFileInputHandlerRequestBody";
|
10
11
|
export { type FillFormRequest } from "./FillFormRequest";
|
11
12
|
export { type SessionHoverHandlerRequestBody } from "./SessionHoverHandlerRequestBody";
|
12
13
|
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; } });
|
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
|
+
});
|
@@ -6,6 +6,7 @@ export { CreateWindowInputV1Body } from "./CreateWindowInputV1Body";
|
|
6
6
|
export { WindowLoadUrlV1Body } from "./WindowLoadUrlV1Body";
|
7
7
|
export { SessionClickHandlerRequestBody } from "./SessionClickHandlerRequestBody";
|
8
8
|
export { CreateFormFillerRequest } from "./CreateFormFillerRequest";
|
9
|
+
export { SessionFileInputHandlerRequestBody } from "./SessionFileInputHandlerRequestBody";
|
9
10
|
export { FillFormRequest } from "./FillFormRequest";
|
10
11
|
export { SessionHoverHandlerRequestBody } from "./SessionHoverHandlerRequestBody";
|
11
12
|
export { SessionMonitorHandlerRequestBody } from "./SessionMonitorHandlerRequestBody";
|
@@ -1,6 +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.SessionMonitorHandlerRequestBody = exports.SessionHoverHandlerRequestBody = exports.FillFormRequest = exports.CreateFormFillerRequest = exports.SessionClickHandlerRequestBody = exports.WindowLoadUrlV1Body = exports.CreateWindowInputV1Body = exports.AsyncFillFormRequest = exports.AsyncExecuteAutomationRequest = exports.AsyncCreateFormFillerRequest = exports.AsyncCreateAutomationRequest = void 0;
|
3
|
+
exports.SessionTypeHandlerRequestBody = exports.SessionSummaryHandlerRequestBody = exports.SessionScrollHandlerRequestBody = exports.SessionScreenshotHandlerRequestBody = exports.ScrapeContentRequest = exports.SessionPaginatedExtractionHandlerRequestBody = exports.SessionMonitorHandlerRequestBody = exports.SessionHoverHandlerRequestBody = exports.FillFormRequest = exports.SessionFileInputHandlerRequestBody = exports.CreateFormFillerRequest = exports.SessionClickHandlerRequestBody = exports.WindowLoadUrlV1Body = exports.CreateWindowInputV1Body = exports.AsyncFillFormRequest = exports.AsyncExecuteAutomationRequest = exports.AsyncCreateFormFillerRequest = exports.AsyncCreateAutomationRequest = void 0;
|
4
4
|
var AsyncCreateAutomationRequest_1 = require("./AsyncCreateAutomationRequest");
|
5
5
|
Object.defineProperty(exports, "AsyncCreateAutomationRequest", { enumerable: true, get: function () { return AsyncCreateAutomationRequest_1.AsyncCreateAutomationRequest; } });
|
6
6
|
var AsyncCreateFormFillerRequest_1 = require("./AsyncCreateFormFillerRequest");
|
@@ -17,6 +17,8 @@ var SessionClickHandlerRequestBody_1 = require("./SessionClickHandlerRequestBody
|
|
17
17
|
Object.defineProperty(exports, "SessionClickHandlerRequestBody", { enumerable: true, get: function () { return SessionClickHandlerRequestBody_1.SessionClickHandlerRequestBody; } });
|
18
18
|
var CreateFormFillerRequest_1 = require("./CreateFormFillerRequest");
|
19
19
|
Object.defineProperty(exports, "CreateFormFillerRequest", { enumerable: true, get: function () { return CreateFormFillerRequest_1.CreateFormFillerRequest; } });
|
20
|
+
var SessionFileInputHandlerRequestBody_1 = require("./SessionFileInputHandlerRequestBody");
|
21
|
+
Object.defineProperty(exports, "SessionFileInputHandlerRequestBody", { enumerable: true, get: function () { return SessionFileInputHandlerRequestBody_1.SessionFileInputHandlerRequestBody; } });
|
20
22
|
var FillFormRequest_1 = require("./FillFormRequest");
|
21
23
|
Object.defineProperty(exports, "FillFormRequest", { enumerable: true, get: function () { return FillFormRequest_1.FillFormRequest; } });
|
22
24
|
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
|
+
}>;
|