@airtop/sdk 0.1.41-beta0 → 0.1.42-beta0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/resources/automations/client/Client.js +4 -4
- package/api/resources/files/client/Client.js +5 -5
- package/api/resources/files/client/requests/CreateFileRestInputV1.d.ts +1 -1
- package/api/resources/profiles/client/Client.js +1 -1
- package/api/resources/requests/client/Client.js +1 -1
- package/api/resources/sessions/client/Client.js +6 -6
- package/api/resources/windows/client/Client.d.ts +23 -9
- package/api/resources/windows/client/Client.js +106 -49
- package/api/resources/windows/client/requests/AsyncFileInputRequest.d.ts +4 -4
- package/api/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts +4 -4
- package/api/resources/windows/client/requests/WaitForPageRequest.d.ts +23 -0
- package/api/resources/windows/client/requests/WaitForPageRequest.js +5 -0
- package/api/resources/windows/client/requests/index.d.ts +1 -0
- package/api/resources/windows/types/WaitForPageRequestTargetStatus.d.ts +11 -0
- package/api/resources/windows/types/WaitForPageRequestTargetStatus.js +10 -0
- package/api/resources/windows/types/index.d.ts +1 -0
- package/api/resources/windows/types/index.js +1 -0
- package/api/types/FileEventData.d.ts +7 -0
- package/api/types/FileEventData.js +5 -0
- package/api/types/FileEventMessage.d.ts +2 -1
- package/api/types/index.d.ts +1 -0
- package/api/types/index.js +1 -0
- package/dist/api/resources/automations/client/Client.js +4 -4
- package/dist/api/resources/files/client/Client.js +5 -5
- package/dist/api/resources/files/client/requests/CreateFileRestInputV1.d.ts +1 -1
- package/dist/api/resources/profiles/client/Client.js +1 -1
- package/dist/api/resources/requests/client/Client.js +1 -1
- package/dist/api/resources/sessions/client/Client.js +6 -6
- package/dist/api/resources/windows/client/Client.d.ts +23 -9
- package/dist/api/resources/windows/client/Client.js +106 -49
- package/dist/api/resources/windows/client/requests/AsyncFileInputRequest.d.ts +4 -4
- package/dist/api/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts +4 -4
- package/dist/api/resources/windows/client/requests/WaitForPageRequest.d.ts +23 -0
- package/dist/api/resources/windows/client/requests/WaitForPageRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/index.d.ts +1 -0
- package/dist/api/resources/windows/types/WaitForPageRequestTargetStatus.d.ts +11 -0
- package/dist/api/resources/windows/types/WaitForPageRequestTargetStatus.js +10 -0
- package/dist/api/resources/windows/types/index.d.ts +1 -0
- package/dist/api/resources/windows/types/index.js +1 -0
- package/dist/api/types/FileEventData.d.ts +7 -0
- package/dist/api/types/FileEventData.js +5 -0
- package/dist/api/types/FileEventMessage.d.ts +2 -1
- package/dist/api/types/index.d.ts +1 -0
- package/dist/api/types/index.js +1 -0
- package/dist/serialization/resources/windows/client/requests/AsyncFileInputRequest.d.ts +2 -1
- package/dist/serialization/resources/windows/client/requests/AsyncFileInputRequest.js +2 -1
- package/dist/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts +2 -1
- package/dist/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js +2 -1
- package/dist/serialization/resources/windows/client/requests/WaitForPageRequest.d.ts +18 -0
- package/dist/serialization/resources/windows/client/requests/WaitForPageRequest.js +49 -0
- package/dist/serialization/resources/windows/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/windows/client/requests/index.js +3 -1
- package/dist/serialization/resources/windows/types/WaitForPageRequestTargetStatus.d.ts +10 -0
- package/dist/serialization/resources/windows/types/WaitForPageRequestTargetStatus.js +41 -0
- package/dist/serialization/resources/windows/types/index.d.ts +1 -0
- package/dist/serialization/resources/windows/types/index.js +1 -0
- package/dist/serialization/types/FileEventData.d.ts +13 -0
- package/dist/serialization/types/FileEventData.js +44 -0
- package/dist/serialization/types/FileEventMessage.d.ts +2 -1
- package/dist/serialization/types/FileEventMessage.js +2 -1
- package/dist/serialization/types/index.d.ts +1 -0
- package/dist/serialization/types/index.js +1 -0
- package/dist/utils/upload.js +12 -7
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/AirtopSessions.js +12 -5
- package/package.json +1 -1
- package/reference.md +88 -7
- package/serialization/resources/windows/client/requests/AsyncFileInputRequest.d.ts +2 -1
- package/serialization/resources/windows/client/requests/AsyncFileInputRequest.js +2 -1
- package/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts +2 -1
- package/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js +2 -1
- package/serialization/resources/windows/client/requests/WaitForPageRequest.d.ts +18 -0
- package/serialization/resources/windows/client/requests/WaitForPageRequest.js +49 -0
- package/serialization/resources/windows/client/requests/index.d.ts +1 -0
- package/serialization/resources/windows/client/requests/index.js +3 -1
- package/serialization/resources/windows/types/WaitForPageRequestTargetStatus.d.ts +10 -0
- package/serialization/resources/windows/types/WaitForPageRequestTargetStatus.js +41 -0
- package/serialization/resources/windows/types/index.d.ts +1 -0
- package/serialization/resources/windows/types/index.js +1 -0
- package/serialization/types/FileEventData.d.ts +13 -0
- package/serialization/types/FileEventData.js +44 -0
- package/serialization/types/FileEventMessage.d.ts +2 -1
- package/serialization/types/FileEventMessage.js +2 -1
- package/serialization/types/index.d.ts +1 -0
- package/serialization/types/index.js +1 -0
- package/utils/upload.js +12 -7
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/AirtopSessions.js +12 -5
@@ -77,7 +77,7 @@ class Windows {
|
|
77
77
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
78
78
|
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)}/click`),
|
79
79
|
method: "POST",
|
80
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
80
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
81
81
|
contentType: "application/json",
|
82
82
|
requestType: "json",
|
83
83
|
body: serializers.AsyncClickRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -132,7 +132,7 @@ class Windows {
|
|
132
132
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
133
133
|
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`),
|
134
134
|
method: "POST",
|
135
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
135
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
136
136
|
contentType: "application/json",
|
137
137
|
requestType: "json",
|
138
138
|
body: serializers.AsyncCreateAutomationRequest.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)}/create-form-filler`),
|
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.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "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.AsyncCreateFormFillerRequest.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)}/execute-automation`),
|
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.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "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.AsyncExecuteAutomationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -291,17 +291,15 @@ class Windows {
|
|
291
291
|
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
292
292
|
*
|
293
293
|
* @example
|
294
|
-
* await client.windows.asyncFileInput("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430"
|
295
|
-
* elementDescription: "The file input in the bottom left corner"
|
296
|
-
* })
|
294
|
+
* await client.windows.asyncFileInput("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
297
295
|
*/
|
298
|
-
asyncFileInput(
|
299
|
-
return __awaiter(this,
|
296
|
+
asyncFileInput(sessionId_1, windowId_1) {
|
297
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
300
298
|
var _a, _b, _c;
|
301
299
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
302
300
|
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)}/file-input`),
|
303
301
|
method: "POST",
|
304
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
302
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
305
303
|
contentType: "application/json",
|
306
304
|
requestType: "json",
|
307
305
|
body: serializers.AsyncFileInputRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -358,7 +356,7 @@ class Windows {
|
|
358
356
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
359
357
|
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`),
|
360
358
|
method: "POST",
|
361
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
359
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
362
360
|
contentType: "application/json",
|
363
361
|
requestType: "json",
|
364
362
|
body: serializers.AsyncFillFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -413,7 +411,7 @@ class Windows {
|
|
413
411
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
414
412
|
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)}/hover`),
|
415
413
|
method: "POST",
|
416
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
414
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
417
415
|
contentType: "application/json",
|
418
416
|
requestType: "json",
|
419
417
|
body: serializers.AsyncHoverRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -468,7 +466,7 @@ class Windows {
|
|
468
466
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
469
467
|
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)}/monitor`),
|
470
468
|
method: "POST",
|
471
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
469
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
472
470
|
contentType: "application/json",
|
473
471
|
requestType: "json",
|
474
472
|
body: serializers.AsyncMonitorRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -523,7 +521,7 @@ class Windows {
|
|
523
521
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
524
522
|
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)}/page-query`),
|
525
523
|
method: "POST",
|
526
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
524
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
527
525
|
contentType: "application/json",
|
528
526
|
requestType: "json",
|
529
527
|
body: serializers.AsyncPageQueryRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -578,7 +576,7 @@ class Windows {
|
|
578
576
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
579
577
|
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)}/paginated-extraction`),
|
580
578
|
method: "POST",
|
581
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
579
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
582
580
|
contentType: "application/json",
|
583
581
|
requestType: "json",
|
584
582
|
body: serializers.AsyncPaginatedExtractionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -635,7 +633,7 @@ class Windows {
|
|
635
633
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
636
634
|
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)}/prompt-content`),
|
637
635
|
method: "POST",
|
638
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
636
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
639
637
|
contentType: "application/json",
|
640
638
|
requestType: "json",
|
641
639
|
body: serializers.AsyncPromptContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -690,7 +688,7 @@ class Windows {
|
|
690
688
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
691
689
|
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)}/screenshot`),
|
692
690
|
method: "POST",
|
693
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
691
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
694
692
|
contentType: "application/json",
|
695
693
|
requestType: "json",
|
696
694
|
body: serializers.AsyncScreenshotRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -745,7 +743,7 @@ class Windows {
|
|
745
743
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
746
744
|
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)}/summarize-content`),
|
747
745
|
method: "POST",
|
748
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
746
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
749
747
|
contentType: "application/json",
|
750
748
|
requestType: "json",
|
751
749
|
body: serializers.AsyncSummarizeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -800,7 +798,7 @@ class Windows {
|
|
800
798
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
801
799
|
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)}/type`),
|
802
800
|
method: "POST",
|
803
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
801
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
804
802
|
contentType: "application/json",
|
805
803
|
requestType: "json",
|
806
804
|
body: serializers.AsyncTypeRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -854,7 +852,7 @@ class Windows {
|
|
854
852
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
855
853
|
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`),
|
856
854
|
method: "POST",
|
857
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
855
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
858
856
|
contentType: "application/json",
|
859
857
|
requestType: "json",
|
860
858
|
body: serializers.CreateWindowInputV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -922,7 +920,7 @@ class Windows {
|
|
922
920
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
923
921
|
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)}`),
|
924
922
|
method: "GET",
|
925
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
923
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
926
924
|
contentType: "application/json",
|
927
925
|
queryParameters: _queryParams,
|
928
926
|
requestType: "json",
|
@@ -979,7 +977,7 @@ class Windows {
|
|
979
977
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
980
978
|
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)}`),
|
981
979
|
method: "POST",
|
982
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
980
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
983
981
|
contentType: "application/json",
|
984
982
|
requestType: "json",
|
985
983
|
body: serializers.WindowLoadUrlV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1033,7 +1031,7 @@ class Windows {
|
|
1033
1031
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1034
1032
|
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)}`),
|
1035
1033
|
method: "DELETE",
|
1036
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1034
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1037
1035
|
contentType: "application/json",
|
1038
1036
|
requestType: "json",
|
1039
1037
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1089,7 +1087,7 @@ class Windows {
|
|
1089
1087
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1090
1088
|
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`),
|
1091
1089
|
method: "POST",
|
1092
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1090
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1093
1091
|
contentType: "application/json",
|
1094
1092
|
requestType: "json",
|
1095
1093
|
body: serializers.SessionClickHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1144,7 +1142,7 @@ class Windows {
|
|
1144
1142
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1145
1143
|
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`),
|
1146
1144
|
method: "POST",
|
1147
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1145
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1148
1146
|
contentType: "application/json",
|
1149
1147
|
requestType: "json",
|
1150
1148
|
body: serializers.CreateFormFillerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1183,7 +1181,13 @@ class Windows {
|
|
1183
1181
|
});
|
1184
1182
|
}
|
1185
1183
|
/**
|
1186
|
-
* Execute a file input interaction in a specific browser window
|
1184
|
+
* Execute a file input interaction in a specific browser window.
|
1185
|
+
* includeHiddenElements defaults to true and considers hidden file input elements.
|
1186
|
+
* If there is only one file input element, it will be used directly.
|
1187
|
+
* If there are multiple file input elements, the elementDescription will be used by AI to
|
1188
|
+
* select among them.
|
1189
|
+
* If no file input elements are found by inspecting the page structure, elementDescription
|
1190
|
+
* will be used by AI to try to find a match visually.
|
1187
1191
|
*
|
1188
1192
|
* @param {string} sessionId - The session id for the window.
|
1189
1193
|
* @param {string} windowId - The Airtop window id of the browser window.
|
@@ -1191,17 +1195,15 @@ class Windows {
|
|
1191
1195
|
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
1192
1196
|
*
|
1193
1197
|
* @example
|
1194
|
-
* await client.windows.fileInput("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430"
|
1195
|
-
* elementDescription: "The file input in the bottom left corner"
|
1196
|
-
* })
|
1198
|
+
* await client.windows.fileInput("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
1197
1199
|
*/
|
1198
|
-
fileInput(
|
1199
|
-
return __awaiter(this,
|
1200
|
+
fileInput(sessionId_1, windowId_1) {
|
1201
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
1200
1202
|
var _a, _b, _c;
|
1201
1203
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1202
1204
|
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`),
|
1203
1205
|
method: "POST",
|
1204
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1206
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1205
1207
|
contentType: "application/json",
|
1206
1208
|
requestType: "json",
|
1207
1209
|
body: serializers.SessionFileInputHandlerRequestBody.jsonOrThrow(request, {
|
@@ -1260,7 +1262,7 @@ class Windows {
|
|
1260
1262
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1261
1263
|
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`),
|
1262
1264
|
method: "POST",
|
1263
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1265
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1264
1266
|
contentType: "application/json",
|
1265
1267
|
requestType: "json",
|
1266
1268
|
body: serializers.FillFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1317,7 +1319,7 @@ class Windows {
|
|
1317
1319
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1318
1320
|
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`),
|
1319
1321
|
method: "POST",
|
1320
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1322
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1321
1323
|
contentType: "application/json",
|
1322
1324
|
requestType: "json",
|
1323
1325
|
body: serializers.SessionHoverHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1372,7 +1374,7 @@ class Windows {
|
|
1372
1374
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1373
1375
|
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`),
|
1374
1376
|
method: "POST",
|
1375
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1377
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1376
1378
|
contentType: "application/json",
|
1377
1379
|
requestType: "json",
|
1378
1380
|
body: serializers.SessionMonitorHandlerRequestBody.jsonOrThrow(request, {
|
@@ -1431,7 +1433,7 @@ class Windows {
|
|
1431
1433
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1432
1434
|
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)}/operator`),
|
1433
1435
|
method: "POST",
|
1434
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1436
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1435
1437
|
contentType: "application/json",
|
1436
1438
|
requestType: "json",
|
1437
1439
|
body: serializers.OperatorPromptV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1488,7 +1490,7 @@ class Windows {
|
|
1488
1490
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1489
1491
|
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`),
|
1490
1492
|
method: "POST",
|
1491
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1493
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1492
1494
|
contentType: "application/json",
|
1493
1495
|
requestType: "json",
|
1494
1496
|
body: serializers.SessionPageQueryHandlerRequestBody.jsonOrThrow(request, {
|
@@ -1547,7 +1549,7 @@ class Windows {
|
|
1547
1549
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1548
1550
|
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`),
|
1549
1551
|
method: "POST",
|
1550
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1552
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1551
1553
|
contentType: "application/json",
|
1552
1554
|
requestType: "json",
|
1553
1555
|
body: serializers.SessionPaginatedExtractionHandlerRequestBody.jsonOrThrow(request, {
|
@@ -1606,7 +1608,7 @@ class Windows {
|
|
1606
1608
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1607
1609
|
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`),
|
1608
1610
|
method: "POST",
|
1609
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1611
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1610
1612
|
contentType: "application/json",
|
1611
1613
|
requestType: "json",
|
1612
1614
|
body: serializers.SessionPageQueryHandlerRequestBody.jsonOrThrow(request, {
|
@@ -1663,7 +1665,7 @@ class Windows {
|
|
1663
1665
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1664
1666
|
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`),
|
1665
1667
|
method: "POST",
|
1666
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1668
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1667
1669
|
contentType: "application/json",
|
1668
1670
|
requestType: "json",
|
1669
1671
|
body: serializers.ScrapeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1718,7 +1720,7 @@ class Windows {
|
|
1718
1720
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1719
1721
|
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`),
|
1720
1722
|
method: "POST",
|
1721
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1723
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1722
1724
|
contentType: "application/json",
|
1723
1725
|
requestType: "json",
|
1724
1726
|
body: serializers.SessionScreenshotHandlerRequestBody.jsonOrThrow(request, {
|
@@ -1775,7 +1777,7 @@ class Windows {
|
|
1775
1777
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1776
1778
|
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`),
|
1777
1779
|
method: "POST",
|
1778
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1780
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1779
1781
|
contentType: "application/json",
|
1780
1782
|
requestType: "json",
|
1781
1783
|
body: serializers.SessionScrollHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1830,7 +1832,7 @@ class Windows {
|
|
1830
1832
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1831
1833
|
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`),
|
1832
1834
|
method: "POST",
|
1833
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1835
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1834
1836
|
contentType: "application/json",
|
1835
1837
|
requestType: "json",
|
1836
1838
|
body: serializers.SessionSummaryHandlerRequestBody.jsonOrThrow(request, {
|
@@ -1889,7 +1891,7 @@ class Windows {
|
|
1889
1891
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1890
1892
|
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`),
|
1891
1893
|
method: "POST",
|
1892
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1894
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1893
1895
|
contentType: "application/json",
|
1894
1896
|
requestType: "json",
|
1895
1897
|
body: serializers.SessionTypeHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1947,7 +1949,7 @@ class Windows {
|
|
1947
1949
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1948
1950
|
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, `v2/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/act`),
|
1949
1951
|
method: "POST",
|
1950
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1952
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1951
1953
|
contentType: "application/json",
|
1952
1954
|
requestType: "json",
|
1953
1955
|
body: serializers.ActRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -2005,7 +2007,7 @@ class Windows {
|
|
2005
2007
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
2006
2008
|
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, `v2/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/extract`),
|
2007
2009
|
method: "POST",
|
2008
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
2010
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
2009
2011
|
contentType: "application/json",
|
2010
2012
|
requestType: "json",
|
2011
2013
|
body: serializers.ExtractRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -2063,7 +2065,7 @@ class Windows {
|
|
2063
2065
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
2064
2066
|
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, `v2/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/find-many`),
|
2065
2067
|
method: "POST",
|
2066
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
2068
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
2067
2069
|
contentType: "application/json",
|
2068
2070
|
requestType: "json",
|
2069
2071
|
body: serializers.FindManyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -2121,7 +2123,7 @@ class Windows {
|
|
2121
2123
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
2122
2124
|
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, `v2/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/find-one`),
|
2123
2125
|
method: "POST",
|
2124
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
2126
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
2125
2127
|
contentType: "application/json",
|
2126
2128
|
requestType: "json",
|
2127
2129
|
body: serializers.FindOneRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -2178,7 +2180,7 @@ class Windows {
|
|
2178
2180
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
2179
2181
|
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, `v2/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/llm`),
|
2180
2182
|
method: "POST",
|
2181
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
2183
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
2182
2184
|
contentType: "application/json",
|
2183
2185
|
requestType: "json",
|
2184
2186
|
body: serializers.LlmRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -2216,6 +2218,61 @@ class Windows {
|
|
2216
2218
|
}
|
2217
2219
|
});
|
2218
2220
|
}
|
2221
|
+
/**
|
2222
|
+
* Wait for a page to load
|
2223
|
+
*
|
2224
|
+
* @param {string} sessionId - The session id for the window.
|
2225
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
2226
|
+
* @param {Airtop.WaitForPageRequest} request
|
2227
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
2228
|
+
*
|
2229
|
+
* @example
|
2230
|
+
* await client.windows.waitForPage("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
2231
|
+
*/
|
2232
|
+
waitForPage(sessionId_1, windowId_1) {
|
2233
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
2234
|
+
var _a, _b, _c;
|
2235
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
2236
|
+
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, `v2/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/wait-for-page`),
|
2237
|
+
method: "POST",
|
2238
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.42-beta0", "User-Agent": "@airtop/sdk/0.1.42-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
2239
|
+
contentType: "application/json",
|
2240
|
+
requestType: "json",
|
2241
|
+
body: serializers.WaitForPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
2242
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
2243
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
2244
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
2245
|
+
});
|
2246
|
+
if (_response.ok) {
|
2247
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
2248
|
+
unrecognizedObjectKeys: "passthrough",
|
2249
|
+
allowUnrecognizedUnionMembers: true,
|
2250
|
+
allowUnrecognizedEnumValues: true,
|
2251
|
+
skipValidation: true,
|
2252
|
+
breadcrumbsPrefix: ["response"],
|
2253
|
+
});
|
2254
|
+
}
|
2255
|
+
if (_response.error.reason === "status-code") {
|
2256
|
+
throw new errors.AirtopError({
|
2257
|
+
statusCode: _response.error.statusCode,
|
2258
|
+
body: _response.error.body,
|
2259
|
+
});
|
2260
|
+
}
|
2261
|
+
switch (_response.error.reason) {
|
2262
|
+
case "non-json":
|
2263
|
+
throw new errors.AirtopError({
|
2264
|
+
statusCode: _response.error.statusCode,
|
2265
|
+
body: _response.error.rawBody,
|
2266
|
+
});
|
2267
|
+
case "timeout":
|
2268
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v2/sessions/{sessionId}/windows/{windowId}/wait-for-page.");
|
2269
|
+
case "unknown":
|
2270
|
+
throw new errors.AirtopError({
|
2271
|
+
message: _response.error.errorMessage,
|
2272
|
+
});
|
2273
|
+
}
|
2274
|
+
});
|
2275
|
+
}
|
2219
2276
|
_getAuthorizationHeader() {
|
2220
2277
|
return __awaiter(this, void 0, void 0, function* () {
|
2221
2278
|
return `Bearer ${yield core.Supplier.get(this._options.apiKey)}`;
|
@@ -4,9 +4,7 @@
|
|
4
4
|
import * as Airtop from "../../../../index";
|
5
5
|
/**
|
6
6
|
* @example
|
7
|
-
* {
|
8
|
-
* elementDescription: "The file input in the bottom left corner"
|
9
|
-
* }
|
7
|
+
* {}
|
10
8
|
*/
|
11
9
|
export interface AsyncFileInputRequest {
|
12
10
|
/** Async configuration options. */
|
@@ -17,11 +15,13 @@ export interface AsyncFileInputRequest {
|
|
17
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). */
|
18
16
|
costThresholdCredits?: number;
|
19
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. */
|
20
|
-
elementDescription
|
18
|
+
elementDescription?: string;
|
21
19
|
/** The id of the file to upload. 'fileId' or 'fileName' is required. */
|
22
20
|
fileId?: string;
|
23
21
|
/** The name of the file to upload, not including the path. 'fileId' or 'fileName' is required. */
|
24
22
|
fileName?: string;
|
23
|
+
/** If true, Airtop AI will find hidden file input elements and interact with them. */
|
24
|
+
includeHiddenElements?: boolean;
|
25
25
|
/**
|
26
26
|
* 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).
|
27
27
|
*
|
@@ -4,9 +4,7 @@
|
|
4
4
|
import * as Airtop from "../../../../index";
|
5
5
|
/**
|
6
6
|
* @example
|
7
|
-
* {
|
8
|
-
* elementDescription: "The file input in the bottom left corner"
|
9
|
-
* }
|
7
|
+
* {}
|
10
8
|
*/
|
11
9
|
export interface SessionFileInputHandlerRequestBody {
|
12
10
|
clientRequestId?: string;
|
@@ -15,11 +13,13 @@ export interface SessionFileInputHandlerRequestBody {
|
|
15
13
|
/** 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
14
|
costThresholdCredits?: number;
|
17
15
|
/** 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
|
16
|
+
elementDescription?: string;
|
19
17
|
/** The id of the file to upload. 'fileId' or 'fileName' is required. */
|
20
18
|
fileId?: string;
|
21
19
|
/** The name of the file to upload, not including the path. 'fileId' or 'fileName' is required. */
|
22
20
|
fileName?: string;
|
21
|
+
/** If true, Airtop AI will find hidden file input elements and interact with them. */
|
22
|
+
includeHiddenElements?: boolean;
|
23
23
|
/**
|
24
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
25
|
*
|
@@ -0,0 +1,23 @@
|
|
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
|
+
*/
|
9
|
+
export interface WaitForPageRequest {
|
10
|
+
/** Async configuration options. */
|
11
|
+
async?: Airtop.AsyncConfig;
|
12
|
+
clientRequestId?: string;
|
13
|
+
/** 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). */
|
14
|
+
costThresholdCredits?: number;
|
15
|
+
/** The target status of the page */
|
16
|
+
targetStatus?: Airtop.WaitForPageRequestTargetStatus;
|
17
|
+
/**
|
18
|
+
* 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).
|
19
|
+
*
|
20
|
+
* This setting does not extend the maximum session duration provided at the time of session creation.
|
21
|
+
*/
|
22
|
+
timeThresholdSeconds?: number;
|
23
|
+
}
|