@airtop/sdk 0.1.40-beta0 → 0.1.41-beta0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/api/resources/automations/client/Client.js +4 -4
  2. package/api/resources/files/client/Client.d.ts +11 -0
  3. package/api/resources/files/client/Client.js +52 -4
  4. package/api/resources/files/client/requests/PushFileBodyV1.d.ts +11 -0
  5. package/api/resources/files/client/requests/PushFileBodyV1.js +5 -0
  6. package/api/resources/files/client/requests/index.d.ts +1 -0
  7. package/api/resources/profiles/client/Client.js +1 -1
  8. package/api/resources/requests/client/Client.js +1 -1
  9. package/api/resources/sessions/client/Client.js +6 -6
  10. package/api/resources/sessions/types/SessionsEventsResponse.d.ts +4 -4
  11. package/api/resources/sessions/types/index.d.ts +1 -1
  12. package/api/resources/sessions/types/index.js +1 -1
  13. package/api/resources/windows/client/Client.d.ts +28 -0
  14. package/api/resources/windows/client/Client.js +152 -36
  15. package/api/resources/windows/client/requests/AsyncFileInputRequest.d.ts +33 -0
  16. package/api/resources/windows/client/requests/AsyncFileInputRequest.js +5 -0
  17. package/api/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts +31 -0
  18. package/api/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js +5 -0
  19. package/api/resources/windows/client/requests/index.d.ts +2 -0
  20. package/api/types/FileEventMessage.d.ts +1 -0
  21. package/dist/api/resources/automations/client/Client.js +4 -4
  22. package/dist/api/resources/files/client/Client.d.ts +11 -0
  23. package/dist/api/resources/files/client/Client.js +52 -4
  24. package/dist/api/resources/files/client/requests/PushFileBodyV1.d.ts +11 -0
  25. package/dist/api/resources/files/client/requests/PushFileBodyV1.js +5 -0
  26. package/dist/api/resources/files/client/requests/index.d.ts +1 -0
  27. package/dist/api/resources/profiles/client/Client.js +1 -1
  28. package/dist/api/resources/requests/client/Client.js +1 -1
  29. package/dist/api/resources/sessions/client/Client.js +6 -6
  30. package/dist/api/resources/sessions/types/SessionsEventsResponse.d.ts +4 -4
  31. package/dist/api/resources/sessions/types/index.d.ts +1 -1
  32. package/dist/api/resources/sessions/types/index.js +1 -1
  33. package/dist/api/resources/windows/client/Client.d.ts +28 -0
  34. package/dist/api/resources/windows/client/Client.js +152 -36
  35. package/dist/api/resources/windows/client/requests/AsyncFileInputRequest.d.ts +33 -0
  36. package/dist/api/resources/windows/client/requests/AsyncFileInputRequest.js +5 -0
  37. package/dist/api/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts +31 -0
  38. package/dist/api/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js +5 -0
  39. package/dist/api/resources/windows/client/requests/index.d.ts +2 -0
  40. package/dist/api/types/FileEventMessage.d.ts +1 -0
  41. package/dist/serialization/resources/files/client/requests/PushFileBodyV1.d.ts +12 -0
  42. package/dist/serialization/resources/files/client/requests/PushFileBodyV1.js +43 -0
  43. package/dist/serialization/resources/files/client/requests/index.d.ts +1 -0
  44. package/dist/serialization/resources/files/client/requests/index.js +3 -1
  45. package/dist/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +5 -5
  46. package/dist/serialization/resources/sessions/types/SessionsEventsResponse.js +2 -2
  47. package/dist/serialization/resources/sessions/types/index.d.ts +1 -1
  48. package/dist/serialization/resources/sessions/types/index.js +1 -1
  49. package/dist/serialization/resources/windows/client/requests/AsyncFileInputRequest.d.ts +22 -0
  50. package/dist/serialization/resources/windows/client/requests/AsyncFileInputRequest.js +53 -0
  51. package/dist/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts +20 -0
  52. package/dist/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js +51 -0
  53. package/dist/serialization/resources/windows/client/requests/index.d.ts +2 -0
  54. package/dist/serialization/resources/windows/client/requests/index.js +5 -1
  55. package/dist/serialization/types/FileEventMessage.d.ts +1 -0
  56. package/dist/serialization/types/FileEventMessage.js +1 -0
  57. package/dist/utils/index.d.ts +1 -0
  58. package/dist/utils/index.js +1 -0
  59. package/dist/utils/upload.d.ts +13 -0
  60. package/dist/utils/upload.js +55 -0
  61. package/dist/version.d.ts +1 -1
  62. package/dist/version.js +1 -1
  63. package/dist/wrapper/AirtopClient.js +1 -1
  64. package/dist/wrapper/AirtopFiles.js +3 -3
  65. package/dist/wrapper/AirtopSessions.d.ts +24 -0
  66. package/dist/wrapper/AirtopSessions.js +103 -0
  67. package/dist/wrapper/AirtopWindows.d.ts +25 -1
  68. package/dist/wrapper/AirtopWindows.js +23 -1
  69. package/package.json +1 -1
  70. package/reference.md +233 -0
  71. package/serialization/resources/files/client/requests/PushFileBodyV1.d.ts +12 -0
  72. package/serialization/resources/files/client/requests/PushFileBodyV1.js +43 -0
  73. package/serialization/resources/files/client/requests/index.d.ts +1 -0
  74. package/serialization/resources/files/client/requests/index.js +3 -1
  75. package/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +5 -5
  76. package/serialization/resources/sessions/types/SessionsEventsResponse.js +2 -2
  77. package/serialization/resources/sessions/types/index.d.ts +1 -1
  78. package/serialization/resources/sessions/types/index.js +1 -1
  79. package/serialization/resources/windows/client/requests/AsyncFileInputRequest.d.ts +22 -0
  80. package/serialization/resources/windows/client/requests/AsyncFileInputRequest.js +53 -0
  81. package/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts +20 -0
  82. package/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js +51 -0
  83. package/serialization/resources/windows/client/requests/index.d.ts +2 -0
  84. package/serialization/resources/windows/client/requests/index.js +5 -1
  85. package/serialization/types/FileEventMessage.d.ts +1 -0
  86. package/serialization/types/FileEventMessage.js +1 -0
  87. package/utils/index.d.ts +1 -0
  88. package/utils/index.js +1 -0
  89. package/utils/upload.d.ts +13 -0
  90. package/utils/upload.js +55 -0
  91. package/version.d.ts +1 -1
  92. package/version.js +1 -1
  93. package/wrapper/AirtopClient.js +1 -1
  94. package/wrapper/AirtopFiles.js +3 -3
  95. package/wrapper/AirtopSessions.d.ts +24 -0
  96. package/wrapper/AirtopSessions.js +103 -0
  97. package/wrapper/AirtopWindows.d.ts +25 -1
  98. package/wrapper/AirtopWindows.js +23 -1
@@ -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.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
80
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-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.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
135
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-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.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
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-beta0", "User-Agent": "@airtop/sdk/0.1.41-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.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
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-beta0", "User-Agent": "@airtop/sdk/0.1.41-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" }),
@@ -282,6 +282,63 @@ class Windows {
282
282
  }
283
283
  });
284
284
  }
285
+ /**
286
+ * Execute a file input interaction in a specific browser window asynchronously
287
+ *
288
+ * @param {string} sessionId - The session id for the window.
289
+ * @param {string} windowId - The Airtop window id of the browser window.
290
+ * @param {Airtop.AsyncFileInputRequest} request
291
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
292
+ *
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
+ * })
297
+ */
298
+ asyncFileInput(sessionId, windowId, request, requestOptions) {
299
+ return __awaiter(this, void 0, void 0, function* () {
300
+ var _a, _b, _c;
301
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
302
+ 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
+ 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.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
305
+ contentType: "application/json",
306
+ requestType: "json",
307
+ body: serializers.AsyncFileInputRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
308
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
309
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
310
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
311
+ });
312
+ if (_response.ok) {
313
+ return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
314
+ unrecognizedObjectKeys: "passthrough",
315
+ allowUnrecognizedUnionMembers: true,
316
+ allowUnrecognizedEnumValues: true,
317
+ skipValidation: true,
318
+ breadcrumbsPrefix: ["response"],
319
+ });
320
+ }
321
+ if (_response.error.reason === "status-code") {
322
+ throw new errors.AirtopError({
323
+ statusCode: _response.error.statusCode,
324
+ body: _response.error.body,
325
+ });
326
+ }
327
+ switch (_response.error.reason) {
328
+ case "non-json":
329
+ throw new errors.AirtopError({
330
+ statusCode: _response.error.statusCode,
331
+ body: _response.error.rawBody,
332
+ });
333
+ case "timeout":
334
+ throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/async/sessions/{sessionId}/windows/{windowId}/file-input.");
335
+ case "unknown":
336
+ throw new errors.AirtopError({
337
+ message: _response.error.errorMessage,
338
+ });
339
+ }
340
+ });
341
+ }
285
342
  /**
286
343
  * Fill a form of a browser window asynchronously using a form-filler automation
287
344
  *
@@ -301,7 +358,7 @@ class Windows {
301
358
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
302
359
  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`),
303
360
  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.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
361
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
305
362
  contentType: "application/json",
306
363
  requestType: "json",
307
364
  body: serializers.AsyncFillFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -356,7 +413,7 @@ class Windows {
356
413
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
357
414
  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`),
358
415
  method: "POST",
359
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
416
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
360
417
  contentType: "application/json",
361
418
  requestType: "json",
362
419
  body: serializers.AsyncHoverRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -411,7 +468,7 @@ class Windows {
411
468
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
412
469
  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`),
413
470
  method: "POST",
414
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
471
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
415
472
  contentType: "application/json",
416
473
  requestType: "json",
417
474
  body: serializers.AsyncMonitorRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -466,7 +523,7 @@ class Windows {
466
523
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
467
524
  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`),
468
525
  method: "POST",
469
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
526
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
470
527
  contentType: "application/json",
471
528
  requestType: "json",
472
529
  body: serializers.AsyncPageQueryRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -521,7 +578,7 @@ class Windows {
521
578
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
522
579
  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`),
523
580
  method: "POST",
524
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
581
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
525
582
  contentType: "application/json",
526
583
  requestType: "json",
527
584
  body: serializers.AsyncPaginatedExtractionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -578,7 +635,7 @@ class Windows {
578
635
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
579
636
  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`),
580
637
  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.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
638
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
582
639
  contentType: "application/json",
583
640
  requestType: "json",
584
641
  body: serializers.AsyncPromptContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -633,7 +690,7 @@ class Windows {
633
690
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
634
691
  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`),
635
692
  method: "POST",
636
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
693
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
637
694
  contentType: "application/json",
638
695
  requestType: "json",
639
696
  body: serializers.AsyncScreenshotRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -688,7 +745,7 @@ class Windows {
688
745
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
689
746
  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`),
690
747
  method: "POST",
691
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
748
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
692
749
  contentType: "application/json",
693
750
  requestType: "json",
694
751
  body: serializers.AsyncSummarizeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -743,7 +800,7 @@ class Windows {
743
800
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
744
801
  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`),
745
802
  method: "POST",
746
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
803
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
747
804
  contentType: "application/json",
748
805
  requestType: "json",
749
806
  body: serializers.AsyncTypeRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -797,7 +854,7 @@ class Windows {
797
854
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
798
855
  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`),
799
856
  method: "POST",
800
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
857
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
801
858
  contentType: "application/json",
802
859
  requestType: "json",
803
860
  body: serializers.CreateWindowInputV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -865,7 +922,7 @@ class Windows {
865
922
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
866
923
  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)}`),
867
924
  method: "GET",
868
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
925
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
869
926
  contentType: "application/json",
870
927
  queryParameters: _queryParams,
871
928
  requestType: "json",
@@ -922,7 +979,7 @@ class Windows {
922
979
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
923
980
  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
981
  method: "POST",
925
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
982
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
926
983
  contentType: "application/json",
927
984
  requestType: "json",
928
985
  body: serializers.WindowLoadUrlV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -976,7 +1033,7 @@ class Windows {
976
1033
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
977
1034
  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)}`),
978
1035
  method: "DELETE",
979
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1036
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
980
1037
  contentType: "application/json",
981
1038
  requestType: "json",
982
1039
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1032,7 +1089,7 @@ class Windows {
1032
1089
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1033
1090
  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`),
1034
1091
  method: "POST",
1035
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1092
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1036
1093
  contentType: "application/json",
1037
1094
  requestType: "json",
1038
1095
  body: serializers.SessionClickHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1087,7 +1144,7 @@ class Windows {
1087
1144
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1088
1145
  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`),
1089
1146
  method: "POST",
1090
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1147
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1091
1148
  contentType: "application/json",
1092
1149
  requestType: "json",
1093
1150
  body: serializers.CreateFormFillerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1125,6 +1182,65 @@ class Windows {
1125
1182
  }
1126
1183
  });
1127
1184
  }
1185
+ /**
1186
+ * Execute a file input interaction in a specific browser window
1187
+ *
1188
+ * @param {string} sessionId - The session id for the window.
1189
+ * @param {string} windowId - The Airtop window id of the browser window.
1190
+ * @param {Airtop.SessionFileInputHandlerRequestBody} request
1191
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
1192
+ *
1193
+ * @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
+ * })
1197
+ */
1198
+ fileInput(sessionId, windowId, request, requestOptions) {
1199
+ return __awaiter(this, void 0, void 0, function* () {
1200
+ var _a, _b, _c;
1201
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1202
+ 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
+ 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.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1205
+ contentType: "application/json",
1206
+ requestType: "json",
1207
+ body: serializers.SessionFileInputHandlerRequestBody.jsonOrThrow(request, {
1208
+ unrecognizedObjectKeys: "strip",
1209
+ }),
1210
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1211
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1212
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1213
+ });
1214
+ if (_response.ok) {
1215
+ return serializers.AiPromptResponse.parseOrThrow(_response.body, {
1216
+ unrecognizedObjectKeys: "passthrough",
1217
+ allowUnrecognizedUnionMembers: true,
1218
+ allowUnrecognizedEnumValues: true,
1219
+ skipValidation: true,
1220
+ breadcrumbsPrefix: ["response"],
1221
+ });
1222
+ }
1223
+ if (_response.error.reason === "status-code") {
1224
+ throw new errors.AirtopError({
1225
+ statusCode: _response.error.statusCode,
1226
+ body: _response.error.body,
1227
+ });
1228
+ }
1229
+ switch (_response.error.reason) {
1230
+ case "non-json":
1231
+ throw new errors.AirtopError({
1232
+ statusCode: _response.error.statusCode,
1233
+ body: _response.error.rawBody,
1234
+ });
1235
+ case "timeout":
1236
+ throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/sessions/{sessionId}/windows/{windowId}/file-input.");
1237
+ case "unknown":
1238
+ throw new errors.AirtopError({
1239
+ message: _response.error.errorMessage,
1240
+ });
1241
+ }
1242
+ });
1243
+ }
1128
1244
  /**
1129
1245
  * Fill a form of a browser window synchronously using a form-filler automation
1130
1246
  *
@@ -1144,7 +1260,7 @@ class Windows {
1144
1260
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1145
1261
  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`),
1146
1262
  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.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1263
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1148
1264
  contentType: "application/json",
1149
1265
  requestType: "json",
1150
1266
  body: serializers.FillFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1201,7 +1317,7 @@ class Windows {
1201
1317
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1202
1318
  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`),
1203
1319
  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.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1320
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1205
1321
  contentType: "application/json",
1206
1322
  requestType: "json",
1207
1323
  body: serializers.SessionHoverHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1256,7 +1372,7 @@ class Windows {
1256
1372
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1257
1373
  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`),
1258
1374
  method: "POST",
1259
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1375
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1260
1376
  contentType: "application/json",
1261
1377
  requestType: "json",
1262
1378
  body: serializers.SessionMonitorHandlerRequestBody.jsonOrThrow(request, {
@@ -1315,7 +1431,7 @@ class Windows {
1315
1431
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1316
1432
  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`),
1317
1433
  method: "POST",
1318
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1434
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1319
1435
  contentType: "application/json",
1320
1436
  requestType: "json",
1321
1437
  body: serializers.OperatorPromptV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1372,7 +1488,7 @@ class Windows {
1372
1488
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1373
1489
  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`),
1374
1490
  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.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1491
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1376
1492
  contentType: "application/json",
1377
1493
  requestType: "json",
1378
1494
  body: serializers.SessionPageQueryHandlerRequestBody.jsonOrThrow(request, {
@@ -1431,7 +1547,7 @@ class Windows {
1431
1547
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1432
1548
  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`),
1433
1549
  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.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1550
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1435
1551
  contentType: "application/json",
1436
1552
  requestType: "json",
1437
1553
  body: serializers.SessionPaginatedExtractionHandlerRequestBody.jsonOrThrow(request, {
@@ -1490,7 +1606,7 @@ class Windows {
1490
1606
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1491
1607
  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`),
1492
1608
  method: "POST",
1493
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1609
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1494
1610
  contentType: "application/json",
1495
1611
  requestType: "json",
1496
1612
  body: serializers.SessionPageQueryHandlerRequestBody.jsonOrThrow(request, {
@@ -1547,7 +1663,7 @@ class Windows {
1547
1663
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1548
1664
  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`),
1549
1665
  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.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1666
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1551
1667
  contentType: "application/json",
1552
1668
  requestType: "json",
1553
1669
  body: serializers.ScrapeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1602,7 +1718,7 @@ class Windows {
1602
1718
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1603
1719
  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`),
1604
1720
  method: "POST",
1605
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1721
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1606
1722
  contentType: "application/json",
1607
1723
  requestType: "json",
1608
1724
  body: serializers.SessionScreenshotHandlerRequestBody.jsonOrThrow(request, {
@@ -1659,7 +1775,7 @@ class Windows {
1659
1775
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1660
1776
  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`),
1661
1777
  method: "POST",
1662
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1778
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1663
1779
  contentType: "application/json",
1664
1780
  requestType: "json",
1665
1781
  body: serializers.SessionScrollHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1714,7 +1830,7 @@ class Windows {
1714
1830
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1715
1831
  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`),
1716
1832
  method: "POST",
1717
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1833
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1718
1834
  contentType: "application/json",
1719
1835
  requestType: "json",
1720
1836
  body: serializers.SessionSummaryHandlerRequestBody.jsonOrThrow(request, {
@@ -1773,7 +1889,7 @@ class Windows {
1773
1889
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1774
1890
  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`),
1775
1891
  method: "POST",
1776
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1892
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1777
1893
  contentType: "application/json",
1778
1894
  requestType: "json",
1779
1895
  body: serializers.SessionTypeHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1831,7 +1947,7 @@ class Windows {
1831
1947
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1832
1948
  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`),
1833
1949
  method: "POST",
1834
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1950
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1835
1951
  contentType: "application/json",
1836
1952
  requestType: "json",
1837
1953
  body: serializers.ActRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1889,7 +2005,7 @@ class Windows {
1889
2005
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1890
2006
  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`),
1891
2007
  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.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
2008
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1893
2009
  contentType: "application/json",
1894
2010
  requestType: "json",
1895
2011
  body: serializers.ExtractRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1947,7 +2063,7 @@ class Windows {
1947
2063
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1948
2064
  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`),
1949
2065
  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.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
2066
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1951
2067
  contentType: "application/json",
1952
2068
  requestType: "json",
1953
2069
  body: serializers.FindManyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -2005,7 +2121,7 @@ class Windows {
2005
2121
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2006
2122
  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`),
2007
2123
  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.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
2124
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
2009
2125
  contentType: "application/json",
2010
2126
  requestType: "json",
2011
2127
  body: serializers.FindOneRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -2062,7 +2178,7 @@ class Windows {
2062
2178
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
2063
2179
  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`),
2064
2180
  method: "POST",
2065
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.40-beta0", "User-Agent": "@airtop/sdk/0.1.40-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
2181
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
2066
2182
  contentType: "application/json",
2067
2183
  requestType: "json",
2068
2184
  body: serializers.LlmRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -0,0 +1,33 @@
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 AsyncFileInputRequest {
12
+ /** Async configuration options. */
13
+ async?: Airtop.AsyncConfig;
14
+ clientRequestId?: string;
15
+ /** Request configuration */
16
+ configuration?: Airtop.MicroInteractionConfigWithExperimental;
17
+ /** 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
+ costThresholdCredits?: number;
19
+ /** 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: string;
21
+ /** The id of the file to upload. 'fileId' or 'fileName' is required. */
22
+ fileId?: string;
23
+ /** The name of the file to upload, not including the path. 'fileId' or 'fileName' is required. */
24
+ fileName?: string;
25
+ /**
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
+ *
28
+ * This setting does not extend the maximum session duration provided at the time of session creation.
29
+ */
30
+ timeThresholdSeconds?: number;
31
+ /** If true, Airtop AI will wait for the navigation to complete after clicking the element. */
32
+ waitForNavigation?: boolean;
33
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });