@airtop/sdk 0.1.40 → 0.1.41

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