@airtop/sdk 0.1.36-beta0 → 0.1.36

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 (259) hide show
  1. package/Client.d.ts +0 -3
  2. package/Client.js +6 -11
  3. package/README.md +10 -9
  4. package/api/resources/automations/client/Client.js +4 -4
  5. package/api/resources/index.d.ts +0 -3
  6. package/api/resources/index.js +1 -4
  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 +0 -112
  11. package/api/resources/windows/client/Client.js +21 -520
  12. package/api/resources/windows/client/requests/index.d.ts +0 -9
  13. package/api/types/index.d.ts +0 -9
  14. package/api/types/index.js +0 -9
  15. package/dist/Client.d.ts +0 -3
  16. package/dist/Client.js +6 -11
  17. package/dist/api/resources/automations/client/Client.js +4 -4
  18. package/dist/api/resources/index.d.ts +0 -3
  19. package/dist/api/resources/index.js +1 -4
  20. package/dist/api/resources/profiles/client/Client.js +1 -1
  21. package/dist/api/resources/requests/client/Client.js +1 -1
  22. package/dist/api/resources/sessions/client/Client.js +6 -6
  23. package/dist/api/resources/windows/client/Client.d.ts +0 -112
  24. package/dist/api/resources/windows/client/Client.js +21 -520
  25. package/dist/api/resources/windows/client/requests/index.d.ts +0 -9
  26. package/dist/api/types/index.d.ts +0 -9
  27. package/dist/api/types/index.js +0 -9
  28. package/dist/serialization/resources/index.d.ts +0 -3
  29. package/dist/serialization/resources/index.js +1 -4
  30. package/dist/serialization/resources/windows/client/requests/index.d.ts +0 -9
  31. package/dist/serialization/resources/windows/client/requests/index.js +1 -19
  32. package/dist/serialization/types/index.d.ts +0 -9
  33. package/dist/serialization/types/index.js +0 -9
  34. package/dist/version.d.ts +1 -1
  35. package/dist/version.js +1 -1
  36. package/dist/wrapper/AirtopClient.d.ts +0 -3
  37. package/dist/wrapper/AirtopClient.js +0 -5
  38. package/dist/wrapper/AirtopRequests.js +1 -1
  39. package/dist/wrapper/AirtopWindows.d.ts +26 -0
  40. package/dist/wrapper/AirtopWindows.js +40 -0
  41. package/package.json +1 -1
  42. package/reference.md +38 -913
  43. package/serialization/resources/index.d.ts +0 -3
  44. package/serialization/resources/index.js +1 -4
  45. package/serialization/resources/windows/client/requests/index.d.ts +0 -9
  46. package/serialization/resources/windows/client/requests/index.js +1 -19
  47. package/serialization/types/index.d.ts +0 -9
  48. package/serialization/types/index.js +0 -9
  49. package/version.d.ts +1 -1
  50. package/version.js +1 -1
  51. package/wrapper/AirtopClient.d.ts +0 -3
  52. package/wrapper/AirtopClient.js +0 -5
  53. package/wrapper/AirtopRequests.js +1 -1
  54. package/wrapper/AirtopWindows.d.ts +26 -0
  55. package/wrapper/AirtopWindows.js +40 -0
  56. package/api/resources/files/client/Client.d.ts +0 -69
  57. package/api/resources/files/client/Client.js +0 -286
  58. package/api/resources/files/client/index.d.ts +0 -1
  59. package/api/resources/files/client/index.js +0 -17
  60. package/api/resources/files/client/requests/CreateFileRestInputV1.d.ts +0 -22
  61. package/api/resources/files/client/requests/CreateFileRestInputV1.js +0 -5
  62. package/api/resources/files/client/requests/FilesListRequest.d.ts +0 -24
  63. package/api/resources/files/client/requests/FilesListRequest.js +0 -5
  64. package/api/resources/files/client/requests/index.d.ts +0 -2
  65. package/api/resources/files/client/requests/index.js +0 -2
  66. package/api/resources/files/index.d.ts +0 -2
  67. package/api/resources/files/index.js +0 -18
  68. package/api/resources/files/types/CreateFileRestInputV1FileType.d.ts +0 -13
  69. package/api/resources/files/types/CreateFileRestInputV1FileType.js +0 -12
  70. package/api/resources/files/types/index.d.ts +0 -1
  71. package/api/resources/files/types/index.js +0 -17
  72. package/api/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -29
  73. package/api/resources/windows/client/requests/AsyncClickRequest.js +0 -5
  74. package/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -27
  75. package/api/resources/windows/client/requests/AsyncHoverRequest.js +0 -5
  76. package/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -27
  77. package/api/resources/windows/client/requests/AsyncMonitorRequest.js +0 -5
  78. package/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -29
  79. package/api/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -5
  80. package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -27
  81. package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -5
  82. package/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -29
  83. package/api/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -5
  84. package/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -23
  85. package/api/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -5
  86. package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -25
  87. package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -5
  88. package/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -37
  89. package/api/resources/windows/client/requests/AsyncTypeRequest.js +0 -5
  90. package/api/types/CreateFileV1.d.ts +0 -24
  91. package/api/types/CreateFileV1.js +0 -5
  92. package/api/types/CreateFileV1FileType.d.ts +0 -13
  93. package/api/types/CreateFileV1FileType.js +0 -12
  94. package/api/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.d.ts +0 -10
  95. package/api/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.js +0 -5
  96. package/api/types/EnvelopeGetFileV1EnvelopeDefaultMeta.d.ts +0 -10
  97. package/api/types/EnvelopeGetFileV1EnvelopeDefaultMeta.js +0 -5
  98. package/api/types/ExternalFile.d.ts +0 -33
  99. package/api/types/ExternalFile.js +0 -5
  100. package/api/types/FilesResponse.d.ts +0 -10
  101. package/api/types/FilesResponse.js +0 -5
  102. package/api/types/FilesWithPagination.d.ts +0 -10
  103. package/api/types/FilesWithPagination.js +0 -5
  104. package/api/types/GetFileV1.d.ts +0 -24
  105. package/api/types/GetFileV1.js +0 -5
  106. package/api/types/GetFileV1FileType.d.ts +0 -13
  107. package/api/types/GetFileV1FileType.js +0 -12
  108. package/dist/api/resources/files/client/Client.d.ts +0 -69
  109. package/dist/api/resources/files/client/Client.js +0 -286
  110. package/dist/api/resources/files/client/index.d.ts +0 -1
  111. package/dist/api/resources/files/client/index.js +0 -17
  112. package/dist/api/resources/files/client/requests/CreateFileRestInputV1.d.ts +0 -22
  113. package/dist/api/resources/files/client/requests/CreateFileRestInputV1.js +0 -5
  114. package/dist/api/resources/files/client/requests/FilesListRequest.d.ts +0 -24
  115. package/dist/api/resources/files/client/requests/FilesListRequest.js +0 -5
  116. package/dist/api/resources/files/client/requests/index.d.ts +0 -2
  117. package/dist/api/resources/files/client/requests/index.js +0 -2
  118. package/dist/api/resources/files/index.d.ts +0 -2
  119. package/dist/api/resources/files/index.js +0 -18
  120. package/dist/api/resources/files/types/CreateFileRestInputV1FileType.d.ts +0 -13
  121. package/dist/api/resources/files/types/CreateFileRestInputV1FileType.js +0 -12
  122. package/dist/api/resources/files/types/index.d.ts +0 -1
  123. package/dist/api/resources/files/types/index.js +0 -17
  124. package/dist/api/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -29
  125. package/dist/api/resources/windows/client/requests/AsyncClickRequest.js +0 -5
  126. package/dist/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -27
  127. package/dist/api/resources/windows/client/requests/AsyncHoverRequest.js +0 -5
  128. package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -27
  129. package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.js +0 -5
  130. package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -29
  131. package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -5
  132. package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -27
  133. package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -5
  134. package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -29
  135. package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -5
  136. package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -23
  137. package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -5
  138. package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -25
  139. package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -5
  140. package/dist/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -37
  141. package/dist/api/resources/windows/client/requests/AsyncTypeRequest.js +0 -5
  142. package/dist/api/types/CreateFileV1.d.ts +0 -24
  143. package/dist/api/types/CreateFileV1.js +0 -5
  144. package/dist/api/types/CreateFileV1FileType.d.ts +0 -13
  145. package/dist/api/types/CreateFileV1FileType.js +0 -12
  146. package/dist/api/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.d.ts +0 -10
  147. package/dist/api/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.js +0 -5
  148. package/dist/api/types/EnvelopeGetFileV1EnvelopeDefaultMeta.d.ts +0 -10
  149. package/dist/api/types/EnvelopeGetFileV1EnvelopeDefaultMeta.js +0 -5
  150. package/dist/api/types/ExternalFile.d.ts +0 -33
  151. package/dist/api/types/ExternalFile.js +0 -5
  152. package/dist/api/types/FilesResponse.d.ts +0 -10
  153. package/dist/api/types/FilesResponse.js +0 -5
  154. package/dist/api/types/FilesWithPagination.d.ts +0 -10
  155. package/dist/api/types/FilesWithPagination.js +0 -5
  156. package/dist/api/types/GetFileV1.d.ts +0 -24
  157. package/dist/api/types/GetFileV1.js +0 -5
  158. package/dist/api/types/GetFileV1FileType.d.ts +0 -13
  159. package/dist/api/types/GetFileV1FileType.js +0 -12
  160. package/dist/serialization/resources/files/client/index.d.ts +0 -1
  161. package/dist/serialization/resources/files/client/index.js +0 -17
  162. package/dist/serialization/resources/files/client/requests/CreateFileRestInputV1.d.ts +0 -17
  163. package/dist/serialization/resources/files/client/requests/CreateFileRestInputV1.js +0 -48
  164. package/dist/serialization/resources/files/client/requests/index.d.ts +0 -1
  165. package/dist/serialization/resources/files/client/requests/index.js +0 -5
  166. package/dist/serialization/resources/files/index.d.ts +0 -2
  167. package/dist/serialization/resources/files/index.js +0 -18
  168. package/dist/serialization/resources/files/types/CreateFileRestInputV1FileType.d.ts +0 -10
  169. package/dist/serialization/resources/files/types/CreateFileRestInputV1FileType.js +0 -41
  170. package/dist/serialization/resources/files/types/index.d.ts +0 -1
  171. package/dist/serialization/resources/files/types/index.js +0 -17
  172. package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -20
  173. package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.js +0 -51
  174. package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -19
  175. package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.js +0 -50
  176. package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -19
  177. package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +0 -50
  178. package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -20
  179. package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -51
  180. package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -19
  181. package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -50
  182. package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -20
  183. package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -51
  184. package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -18
  185. package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -49
  186. package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -19
  187. package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -50
  188. package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -24
  189. package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.js +0 -55
  190. package/dist/serialization/types/CreateFileV1.d.ts +0 -21
  191. package/dist/serialization/types/CreateFileV1.js +0 -52
  192. package/dist/serialization/types/CreateFileV1FileType.d.ts +0 -10
  193. package/dist/serialization/types/CreateFileV1FileType.js +0 -41
  194. package/dist/serialization/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.d.ts +0 -18
  195. package/dist/serialization/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.js +0 -49
  196. package/dist/serialization/types/EnvelopeGetFileV1EnvelopeDefaultMeta.d.ts +0 -18
  197. package/dist/serialization/types/EnvelopeGetFileV1EnvelopeDefaultMeta.js +0 -49
  198. package/dist/serialization/types/ExternalFile.d.ts +0 -25
  199. package/dist/serialization/types/ExternalFile.js +0 -56
  200. package/dist/serialization/types/FilesResponse.d.ts +0 -18
  201. package/dist/serialization/types/FilesResponse.js +0 -49
  202. package/dist/serialization/types/FilesWithPagination.d.ts +0 -15
  203. package/dist/serialization/types/FilesWithPagination.js +0 -46
  204. package/dist/serialization/types/GetFileV1.d.ts +0 -21
  205. package/dist/serialization/types/GetFileV1.js +0 -52
  206. package/dist/serialization/types/GetFileV1FileType.d.ts +0 -10
  207. package/dist/serialization/types/GetFileV1FileType.js +0 -41
  208. package/dist/wrapper/AirtopFiles.d.ts +0 -38
  209. package/dist/wrapper/AirtopFiles.js +0 -151
  210. package/serialization/resources/files/client/index.d.ts +0 -1
  211. package/serialization/resources/files/client/index.js +0 -17
  212. package/serialization/resources/files/client/requests/CreateFileRestInputV1.d.ts +0 -17
  213. package/serialization/resources/files/client/requests/CreateFileRestInputV1.js +0 -48
  214. package/serialization/resources/files/client/requests/index.d.ts +0 -1
  215. package/serialization/resources/files/client/requests/index.js +0 -5
  216. package/serialization/resources/files/index.d.ts +0 -2
  217. package/serialization/resources/files/index.js +0 -18
  218. package/serialization/resources/files/types/CreateFileRestInputV1FileType.d.ts +0 -10
  219. package/serialization/resources/files/types/CreateFileRestInputV1FileType.js +0 -41
  220. package/serialization/resources/files/types/index.d.ts +0 -1
  221. package/serialization/resources/files/types/index.js +0 -17
  222. package/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -20
  223. package/serialization/resources/windows/client/requests/AsyncClickRequest.js +0 -51
  224. package/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -19
  225. package/serialization/resources/windows/client/requests/AsyncHoverRequest.js +0 -50
  226. package/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -19
  227. package/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +0 -50
  228. package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -20
  229. package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -51
  230. package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -19
  231. package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -50
  232. package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -20
  233. package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -51
  234. package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -18
  235. package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -49
  236. package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -19
  237. package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -50
  238. package/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -24
  239. package/serialization/resources/windows/client/requests/AsyncTypeRequest.js +0 -55
  240. package/serialization/types/CreateFileV1.d.ts +0 -21
  241. package/serialization/types/CreateFileV1.js +0 -52
  242. package/serialization/types/CreateFileV1FileType.d.ts +0 -10
  243. package/serialization/types/CreateFileV1FileType.js +0 -41
  244. package/serialization/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.d.ts +0 -18
  245. package/serialization/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.js +0 -49
  246. package/serialization/types/EnvelopeGetFileV1EnvelopeDefaultMeta.d.ts +0 -18
  247. package/serialization/types/EnvelopeGetFileV1EnvelopeDefaultMeta.js +0 -49
  248. package/serialization/types/ExternalFile.d.ts +0 -25
  249. package/serialization/types/ExternalFile.js +0 -56
  250. package/serialization/types/FilesResponse.d.ts +0 -18
  251. package/serialization/types/FilesResponse.js +0 -49
  252. package/serialization/types/FilesWithPagination.d.ts +0 -15
  253. package/serialization/types/FilesWithPagination.js +0 -46
  254. package/serialization/types/GetFileV1.d.ts +0 -21
  255. package/serialization/types/GetFileV1.js +0 -52
  256. package/serialization/types/GetFileV1FileType.d.ts +0 -10
  257. package/serialization/types/GetFileV1FileType.js +0 -41
  258. package/wrapper/AirtopFiles.d.ts +0 -38
  259. package/wrapper/AirtopFiles.js +0 -151
@@ -58,63 +58,6 @@ class Windows {
58
58
  constructor(_options) {
59
59
  this._options = _options;
60
60
  }
61
- /**
62
- * Execute a click interaction in a specific browser window asynchronously
63
- *
64
- * @param {string} sessionId - The session id for the window.
65
- * @param {string} windowId - The Airtop window id of the browser window.
66
- * @param {Airtop.AsyncClickRequest} request
67
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
68
- *
69
- * @example
70
- * await client.windows.asyncClick("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
71
- * elementDescription: "The login button"
72
- * })
73
- */
74
- asyncClick(sessionId, windowId, request, requestOptions) {
75
- return __awaiter(this, void 0, void 0, function* () {
76
- var _a, _b, _c;
77
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
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, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/click`),
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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
81
- contentType: "application/json",
82
- requestType: "json",
83
- body: serializers.AsyncClickRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
84
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
85
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
86
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
87
- });
88
- if (_response.ok) {
89
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
90
- unrecognizedObjectKeys: "passthrough",
91
- allowUnrecognizedUnionMembers: true,
92
- allowUnrecognizedEnumValues: true,
93
- skipValidation: true,
94
- breadcrumbsPrefix: ["response"],
95
- });
96
- }
97
- if (_response.error.reason === "status-code") {
98
- throw new errors.AirtopError({
99
- statusCode: _response.error.statusCode,
100
- body: _response.error.body,
101
- });
102
- }
103
- switch (_response.error.reason) {
104
- case "non-json":
105
- throw new errors.AirtopError({
106
- statusCode: _response.error.statusCode,
107
- body: _response.error.rawBody,
108
- });
109
- case "timeout":
110
- throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/click.");
111
- case "unknown":
112
- throw new errors.AirtopError({
113
- message: _response.error.errorMessage,
114
- });
115
- }
116
- });
117
- }
118
61
  /**
119
62
  * Create an automation of a browser window asynchronously
120
63
  *
@@ -132,7 +75,7 @@ class Windows {
132
75
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
133
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, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/create-automation`),
134
77
  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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
136
79
  contentType: "application/json",
137
80
  requestType: "json",
138
81
  body: serializers.AsyncCreateAutomationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -187,7 +130,7 @@ class Windows {
187
130
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
188
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, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/create-form-filler`),
189
132
  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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
191
134
  contentType: "application/json",
192
135
  requestType: "json",
193
136
  body: serializers.AsyncCreateFormFillerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -244,7 +187,7 @@ class Windows {
244
187
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
245
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, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/execute-automation`),
246
189
  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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
248
191
  contentType: "application/json",
249
192
  requestType: "json",
250
193
  body: serializers.AsyncExecuteAutomationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -301,7 +244,7 @@ class Windows {
301
244
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
302
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, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/fill-form`),
303
246
  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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
305
248
  contentType: "application/json",
306
249
  requestType: "json",
307
250
  body: serializers.AsyncFillFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -339,448 +282,6 @@ class Windows {
339
282
  }
340
283
  });
341
284
  }
342
- /**
343
- * @param {string} sessionId - The session id for the window.
344
- * @param {string} windowId - The Airtop window id of the browser window.
345
- * @param {Airtop.AsyncHoverRequest} request
346
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
347
- *
348
- * @example
349
- * await client.windows.asyncHover("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
350
- * elementDescription: "The search box input in the top right corner"
351
- * })
352
- */
353
- asyncHover(sessionId, windowId, request, requestOptions) {
354
- return __awaiter(this, void 0, void 0, function* () {
355
- var _a, _b, _c;
356
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
357
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/hover`),
358
- 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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
360
- contentType: "application/json",
361
- requestType: "json",
362
- body: serializers.AsyncHoverRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
363
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
364
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
365
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
366
- });
367
- if (_response.ok) {
368
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
369
- unrecognizedObjectKeys: "passthrough",
370
- allowUnrecognizedUnionMembers: true,
371
- allowUnrecognizedEnumValues: true,
372
- skipValidation: true,
373
- breadcrumbsPrefix: ["response"],
374
- });
375
- }
376
- if (_response.error.reason === "status-code") {
377
- throw new errors.AirtopError({
378
- statusCode: _response.error.statusCode,
379
- body: _response.error.body,
380
- });
381
- }
382
- switch (_response.error.reason) {
383
- case "non-json":
384
- throw new errors.AirtopError({
385
- statusCode: _response.error.statusCode,
386
- body: _response.error.rawBody,
387
- });
388
- case "timeout":
389
- throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/hover.");
390
- case "unknown":
391
- throw new errors.AirtopError({
392
- message: _response.error.errorMessage,
393
- });
394
- }
395
- });
396
- }
397
- /**
398
- * @param {string} sessionId - The session id for the window.
399
- * @param {string} windowId - The Airtop window id of the browser window.
400
- * @param {Airtop.AsyncMonitorRequest} request
401
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
402
- *
403
- * @example
404
- * await client.windows.asyncMonitor("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
405
- * condition: "Determine if the user appears to be signed in to the website"
406
- * })
407
- */
408
- asyncMonitor(sessionId, windowId, request, requestOptions) {
409
- return __awaiter(this, void 0, void 0, function* () {
410
- var _a, _b, _c;
411
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
412
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/monitor`),
413
- 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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
415
- contentType: "application/json",
416
- requestType: "json",
417
- body: serializers.AsyncMonitorRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
418
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
419
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
420
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
421
- });
422
- if (_response.ok) {
423
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
424
- unrecognizedObjectKeys: "passthrough",
425
- allowUnrecognizedUnionMembers: true,
426
- allowUnrecognizedEnumValues: true,
427
- skipValidation: true,
428
- breadcrumbsPrefix: ["response"],
429
- });
430
- }
431
- if (_response.error.reason === "status-code") {
432
- throw new errors.AirtopError({
433
- statusCode: _response.error.statusCode,
434
- body: _response.error.body,
435
- });
436
- }
437
- switch (_response.error.reason) {
438
- case "non-json":
439
- throw new errors.AirtopError({
440
- statusCode: _response.error.statusCode,
441
- body: _response.error.rawBody,
442
- });
443
- case "timeout":
444
- throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/monitor.");
445
- case "unknown":
446
- throw new errors.AirtopError({
447
- message: _response.error.errorMessage,
448
- });
449
- }
450
- });
451
- }
452
- /**
453
- * @param {string} sessionId - The session id for the window.
454
- * @param {string} windowId - The Airtop window id of the browser window.
455
- * @param {Airtop.AsyncPageQueryRequest} request
456
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
457
- *
458
- * @example
459
- * await client.windows.asyncPageQuery("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
460
- * prompt: "What is the main idea of this page?"
461
- * })
462
- */
463
- asyncPageQuery(sessionId, windowId, request, requestOptions) {
464
- return __awaiter(this, void 0, void 0, function* () {
465
- var _a, _b, _c;
466
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
467
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/page-query`),
468
- 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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
470
- contentType: "application/json",
471
- requestType: "json",
472
- body: serializers.AsyncPageQueryRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
473
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
474
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
475
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
476
- });
477
- if (_response.ok) {
478
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
479
- unrecognizedObjectKeys: "passthrough",
480
- allowUnrecognizedUnionMembers: true,
481
- allowUnrecognizedEnumValues: true,
482
- skipValidation: true,
483
- breadcrumbsPrefix: ["response"],
484
- });
485
- }
486
- if (_response.error.reason === "status-code") {
487
- throw new errors.AirtopError({
488
- statusCode: _response.error.statusCode,
489
- body: _response.error.body,
490
- });
491
- }
492
- switch (_response.error.reason) {
493
- case "non-json":
494
- throw new errors.AirtopError({
495
- statusCode: _response.error.statusCode,
496
- body: _response.error.rawBody,
497
- });
498
- case "timeout":
499
- throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/page-query.");
500
- case "unknown":
501
- throw new errors.AirtopError({
502
- message: _response.error.errorMessage,
503
- });
504
- }
505
- });
506
- }
507
- /**
508
- * @param {string} sessionId - The session id for the window.
509
- * @param {string} windowId - The Airtop window id of the browser window.
510
- * @param {Airtop.AsyncPaginatedExtractionRequest} request
511
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
512
- *
513
- * @example
514
- * await client.windows.asyncPaginatedExtraction("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
515
- * prompt: "This site contains a list of results about <provide details about the list>. Navigate through 3 pages of results and return the title and <provide details about the data you want to extract> about each result in this list."
516
- * })
517
- */
518
- asyncPaginatedExtraction(sessionId, windowId, request, requestOptions) {
519
- return __awaiter(this, void 0, void 0, function* () {
520
- var _a, _b, _c;
521
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
522
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/paginated-extraction`),
523
- 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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
525
- contentType: "application/json",
526
- requestType: "json",
527
- body: serializers.AsyncPaginatedExtractionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
528
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
529
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
530
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
531
- });
532
- if (_response.ok) {
533
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
534
- unrecognizedObjectKeys: "passthrough",
535
- allowUnrecognizedUnionMembers: true,
536
- allowUnrecognizedEnumValues: true,
537
- skipValidation: true,
538
- breadcrumbsPrefix: ["response"],
539
- });
540
- }
541
- if (_response.error.reason === "status-code") {
542
- throw new errors.AirtopError({
543
- statusCode: _response.error.statusCode,
544
- body: _response.error.body,
545
- });
546
- }
547
- switch (_response.error.reason) {
548
- case "non-json":
549
- throw new errors.AirtopError({
550
- statusCode: _response.error.statusCode,
551
- body: _response.error.rawBody,
552
- });
553
- case "timeout":
554
- throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/paginated-extraction.");
555
- case "unknown":
556
- throw new errors.AirtopError({
557
- message: _response.error.errorMessage,
558
- });
559
- }
560
- });
561
- }
562
- /**
563
- * This endpoint is deprecated. Please use the `pageQuery` endpoint instead.
564
- *
565
- * @param {string} sessionId - The session id for the window.
566
- * @param {string} windowId - The Airtop window id of the browser window.
567
- * @param {Airtop.AsyncPromptContentRequest} request
568
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
569
- *
570
- * @example
571
- * await client.windows.asyncPromptContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
572
- * prompt: "What is the main idea of this page?"
573
- * })
574
- */
575
- asyncPromptContent(sessionId, windowId, request, requestOptions) {
576
- return __awaiter(this, void 0, void 0, function* () {
577
- var _a, _b, _c;
578
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
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, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/prompt-content`),
580
- 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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
582
- contentType: "application/json",
583
- requestType: "json",
584
- body: serializers.AsyncPromptContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
585
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
586
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
587
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
588
- });
589
- if (_response.ok) {
590
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
591
- unrecognizedObjectKeys: "passthrough",
592
- allowUnrecognizedUnionMembers: true,
593
- allowUnrecognizedEnumValues: true,
594
- skipValidation: true,
595
- breadcrumbsPrefix: ["response"],
596
- });
597
- }
598
- if (_response.error.reason === "status-code") {
599
- throw new errors.AirtopError({
600
- statusCode: _response.error.statusCode,
601
- body: _response.error.body,
602
- });
603
- }
604
- switch (_response.error.reason) {
605
- case "non-json":
606
- throw new errors.AirtopError({
607
- statusCode: _response.error.statusCode,
608
- body: _response.error.rawBody,
609
- });
610
- case "timeout":
611
- throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/prompt-content.");
612
- case "unknown":
613
- throw new errors.AirtopError({
614
- message: _response.error.errorMessage,
615
- });
616
- }
617
- });
618
- }
619
- /**
620
- * Take a screenshot of the current viewport of a browser window asynchronously
621
- *
622
- * @param {string} sessionId - The session id for the window.
623
- * @param {string} windowId - The Airtop window id of the browser window.
624
- * @param {Airtop.AsyncScreenshotRequest} request
625
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
626
- *
627
- * @example
628
- * await client.windows.asyncScreenshot("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
629
- */
630
- asyncScreenshot(sessionId_1, windowId_1) {
631
- return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
632
- var _a, _b, _c;
633
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
634
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/screenshot`),
635
- 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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
637
- contentType: "application/json",
638
- requestType: "json",
639
- body: serializers.AsyncScreenshotRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
640
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
641
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
642
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
643
- });
644
- if (_response.ok) {
645
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
646
- unrecognizedObjectKeys: "passthrough",
647
- allowUnrecognizedUnionMembers: true,
648
- allowUnrecognizedEnumValues: true,
649
- skipValidation: true,
650
- breadcrumbsPrefix: ["response"],
651
- });
652
- }
653
- if (_response.error.reason === "status-code") {
654
- throw new errors.AirtopError({
655
- statusCode: _response.error.statusCode,
656
- body: _response.error.body,
657
- });
658
- }
659
- switch (_response.error.reason) {
660
- case "non-json":
661
- throw new errors.AirtopError({
662
- statusCode: _response.error.statusCode,
663
- body: _response.error.rawBody,
664
- });
665
- case "timeout":
666
- throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/screenshot.");
667
- case "unknown":
668
- throw new errors.AirtopError({
669
- message: _response.error.errorMessage,
670
- });
671
- }
672
- });
673
- }
674
- /**
675
- * This endpoint is deprecated. Please use the `pageQuery` endpoint and ask for a summary in the prompt instead.
676
- *
677
- * @param {string} sessionId - The session id for the window.
678
- * @param {string} windowId - The Airtop window id of the browser window to summarize.
679
- * @param {Airtop.AsyncSummarizeContentRequest} request
680
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
681
- *
682
- * @example
683
- * await client.windows.asyncSummarizeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
684
- */
685
- asyncSummarizeContent(sessionId_1, windowId_1) {
686
- return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
687
- var _a, _b, _c;
688
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
689
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/summarize-content`),
690
- 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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
692
- contentType: "application/json",
693
- requestType: "json",
694
- body: serializers.AsyncSummarizeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
695
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
696
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
697
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
698
- });
699
- if (_response.ok) {
700
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
701
- unrecognizedObjectKeys: "passthrough",
702
- allowUnrecognizedUnionMembers: true,
703
- allowUnrecognizedEnumValues: true,
704
- skipValidation: true,
705
- breadcrumbsPrefix: ["response"],
706
- });
707
- }
708
- if (_response.error.reason === "status-code") {
709
- throw new errors.AirtopError({
710
- statusCode: _response.error.statusCode,
711
- body: _response.error.body,
712
- });
713
- }
714
- switch (_response.error.reason) {
715
- case "non-json":
716
- throw new errors.AirtopError({
717
- statusCode: _response.error.statusCode,
718
- body: _response.error.rawBody,
719
- });
720
- case "timeout":
721
- throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/summarize-content.");
722
- case "unknown":
723
- throw new errors.AirtopError({
724
- message: _response.error.errorMessage,
725
- });
726
- }
727
- });
728
- }
729
- /**
730
- * @param {string} sessionId - The session id for the window.
731
- * @param {string} windowId - The Airtop window id of the browser window.
732
- * @param {Airtop.AsyncTypeRequest} request
733
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
734
- *
735
- * @example
736
- * await client.windows.asyncType("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
737
- * text: "Example text"
738
- * })
739
- */
740
- asyncType(sessionId, windowId, request, requestOptions) {
741
- return __awaiter(this, void 0, void 0, function* () {
742
- var _a, _b, _c;
743
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
744
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/type`),
745
- 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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
747
- contentType: "application/json",
748
- requestType: "json",
749
- body: serializers.AsyncTypeRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
750
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
751
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
752
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
753
- });
754
- if (_response.ok) {
755
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
756
- unrecognizedObjectKeys: "passthrough",
757
- allowUnrecognizedUnionMembers: true,
758
- allowUnrecognizedEnumValues: true,
759
- skipValidation: true,
760
- breadcrumbsPrefix: ["response"],
761
- });
762
- }
763
- if (_response.error.reason === "status-code") {
764
- throw new errors.AirtopError({
765
- statusCode: _response.error.statusCode,
766
- body: _response.error.body,
767
- });
768
- }
769
- switch (_response.error.reason) {
770
- case "non-json":
771
- throw new errors.AirtopError({
772
- statusCode: _response.error.statusCode,
773
- body: _response.error.rawBody,
774
- });
775
- case "timeout":
776
- throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/type.");
777
- case "unknown":
778
- throw new errors.AirtopError({
779
- message: _response.error.errorMessage,
780
- });
781
- }
782
- });
783
- }
784
285
  /**
785
286
  * Creates a new browser window in a session. Optionally, you can specify a url to load on the window upon creation.
786
287
  *
@@ -797,7 +298,7 @@ class Windows {
797
298
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
798
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, `sessions/${encodeURIComponent(sessionId)}/windows`),
799
300
  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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
801
302
  contentType: "application/json",
802
303
  requestType: "json",
803
304
  body: serializers.CreateWindowInputV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -865,7 +366,7 @@ class Windows {
865
366
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
866
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, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}`),
867
368
  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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
869
370
  contentType: "application/json",
870
371
  queryParameters: _queryParams,
871
372
  requestType: "json",
@@ -922,7 +423,7 @@ class Windows {
922
423
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
923
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, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}`),
924
425
  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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
926
427
  contentType: "application/json",
927
428
  requestType: "json",
928
429
  body: serializers.WindowLoadUrlV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -976,7 +477,7 @@ class Windows {
976
477
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
977
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, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}`),
978
479
  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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
980
481
  contentType: "application/json",
981
482
  requestType: "json",
982
483
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1032,7 +533,7 @@ class Windows {
1032
533
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1033
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, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/click`),
1034
535
  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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1036
537
  contentType: "application/json",
1037
538
  requestType: "json",
1038
539
  body: serializers.SessionClickHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1087,7 +588,7 @@ class Windows {
1087
588
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1088
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, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/create-form-filler`),
1089
590
  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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1091
592
  contentType: "application/json",
1092
593
  requestType: "json",
1093
594
  body: serializers.CreateFormFillerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1144,7 +645,7 @@ class Windows {
1144
645
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1145
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, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/fill-form`),
1146
647
  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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
648
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1148
649
  contentType: "application/json",
1149
650
  requestType: "json",
1150
651
  body: serializers.FillFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1201,7 +702,7 @@ class Windows {
1201
702
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1202
703
  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, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/hover`),
1203
704
  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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
705
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1205
706
  contentType: "application/json",
1206
707
  requestType: "json",
1207
708
  body: serializers.SessionHoverHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1256,7 +757,7 @@ class Windows {
1256
757
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1257
758
  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, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/monitor`),
1258
759
  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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
760
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1260
761
  contentType: "application/json",
1261
762
  requestType: "json",
1262
763
  body: serializers.SessionMonitorHandlerRequestBody.jsonOrThrow(request, {
@@ -1315,7 +816,7 @@ class Windows {
1315
816
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1316
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, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/page-query`),
1317
818
  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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1319
820
  contentType: "application/json",
1320
821
  requestType: "json",
1321
822
  body: serializers.SessionPageQueryHandlerRequestBody.jsonOrThrow(request, {
@@ -1374,7 +875,7 @@ class Windows {
1374
875
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1375
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, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/paginated-extraction`),
1376
877
  method: "POST",
1377
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1378
879
  contentType: "application/json",
1379
880
  requestType: "json",
1380
881
  body: serializers.SessionPaginatedExtractionHandlerRequestBody.jsonOrThrow(request, {
@@ -1433,7 +934,7 @@ class Windows {
1433
934
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1434
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, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/prompt-content`),
1435
936
  method: "POST",
1436
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1437
938
  contentType: "application/json",
1438
939
  requestType: "json",
1439
940
  body: serializers.SessionPageQueryHandlerRequestBody.jsonOrThrow(request, {
@@ -1490,7 +991,7 @@ class Windows {
1490
991
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1491
992
  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, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/scrape-content`),
1492
993
  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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
994
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1494
995
  contentType: "application/json",
1495
996
  requestType: "json",
1496
997
  body: serializers.ScrapeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1545,7 +1046,7 @@ class Windows {
1545
1046
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1546
1047
  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, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/screenshot`),
1547
1048
  method: "POST",
1548
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1049
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1549
1050
  contentType: "application/json",
1550
1051
  requestType: "json",
1551
1052
  body: serializers.SessionScreenshotHandlerRequestBody.jsonOrThrow(request, {
@@ -1602,7 +1103,7 @@ class Windows {
1602
1103
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1603
1104
  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, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/scroll`),
1604
1105
  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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1106
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1606
1107
  contentType: "application/json",
1607
1108
  requestType: "json",
1608
1109
  body: serializers.SessionScrollHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1657,7 +1158,7 @@ class Windows {
1657
1158
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1658
1159
  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, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/summarize-content`),
1659
1160
  method: "POST",
1660
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1161
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1661
1162
  contentType: "application/json",
1662
1163
  requestType: "json",
1663
1164
  body: serializers.SessionSummaryHandlerRequestBody.jsonOrThrow(request, {
@@ -1716,7 +1217,7 @@ class Windows {
1716
1217
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1717
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, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/type`),
1718
1219
  method: "POST",
1719
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1720
1221
  contentType: "application/json",
1721
1222
  requestType: "json",
1722
1223
  body: serializers.SessionTypeHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),