@airtop/sdk 0.1.34 → 0.1.36-beta0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (812) hide show
  1. package/Client.d.ts +14 -4
  2. package/Client.js +16 -6
  3. package/README.md +35 -17
  4. package/api/errors/ForbiddenError.d.ts +8 -0
  5. package/api/errors/ForbiddenError.js +51 -0
  6. package/api/errors/InternalServerError.js +17 -7
  7. package/api/errors/NotFoundError.js +17 -7
  8. package/api/errors/UnauthorizedError.d.ts +8 -0
  9. package/api/errors/UnauthorizedError.js +51 -0
  10. package/api/errors/UnprocessableEntityError.js +17 -7
  11. package/api/errors/index.d.ts +2 -0
  12. package/api/errors/index.js +2 -0
  13. package/api/resources/automations/client/Client.d.ts +91 -0
  14. package/api/resources/automations/client/Client.js +429 -0
  15. package/api/resources/automations/client/index.d.ts +1 -0
  16. package/api/resources/automations/client/index.js +17 -0
  17. package/api/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.d.ts +19 -0
  18. package/api/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.js +5 -0
  19. package/api/resources/automations/client/requests/index.d.ts +1 -0
  20. package/api/resources/automations/client/requests/index.js +2 -0
  21. package/api/resources/automations/index.d.ts +1 -0
  22. package/api/resources/automations/index.js +17 -0
  23. package/api/resources/files/client/Client.d.ts +69 -0
  24. package/api/resources/files/client/Client.js +286 -0
  25. package/api/resources/files/client/index.d.ts +1 -0
  26. package/api/resources/files/client/index.js +17 -0
  27. package/api/resources/files/client/requests/CreateFileRestInputV1.d.ts +22 -0
  28. package/api/resources/files/client/requests/CreateFileRestInputV1.js +5 -0
  29. package/api/resources/files/client/requests/FilesListRequest.d.ts +24 -0
  30. package/api/resources/files/client/requests/FilesListRequest.js +5 -0
  31. package/api/resources/files/client/requests/index.d.ts +2 -0
  32. package/api/resources/files/client/requests/index.js +2 -0
  33. package/api/resources/files/index.d.ts +2 -0
  34. package/api/resources/files/index.js +18 -0
  35. package/api/resources/files/types/CreateFileRestInputV1FileType.d.ts +13 -0
  36. package/api/resources/files/types/CreateFileRestInputV1FileType.js +12 -0
  37. package/api/resources/files/types/index.d.ts +1 -0
  38. package/api/resources/files/types/index.js +17 -0
  39. package/api/resources/index.d.ts +5 -0
  40. package/api/resources/index.js +23 -8
  41. package/api/resources/profiles/client/Client.d.ts +4 -0
  42. package/api/resources/profiles/client/Client.js +23 -21
  43. package/api/resources/requests/client/Client.d.ts +4 -0
  44. package/api/resources/requests/client/Client.js +21 -19
  45. package/api/resources/sessions/client/Client.d.ts +5 -1
  46. package/api/resources/sessions/client/Client.js +52 -88
  47. package/api/resources/sessions/client/requests/SessionsEventsRequest.d.ts +7 -0
  48. package/api/resources/sessions/types/SessionsEventsResponse.d.ts +7 -7
  49. package/api/resources/sessions/types/SessionsListRequestStatus.d.ts +1 -1
  50. package/api/resources/sessions/types/index.d.ts +2 -2
  51. package/api/resources/sessions/types/index.js +2 -2
  52. package/api/resources/windows/client/Client.d.ts +194 -0
  53. package/api/resources/windows/client/Client.js +924 -199
  54. package/api/resources/windows/client/requests/AsyncClickRequest.d.ts +29 -0
  55. package/api/resources/windows/client/requests/AsyncClickRequest.js +5 -0
  56. package/api/resources/windows/client/requests/AsyncCreateAutomationRequest.d.ts +23 -0
  57. package/api/resources/windows/client/requests/AsyncCreateAutomationRequest.js +5 -0
  58. package/api/resources/windows/client/requests/AsyncCreateFormFillerRequest.d.ts +23 -0
  59. package/api/resources/windows/client/requests/AsyncCreateFormFillerRequest.js +5 -0
  60. package/api/resources/windows/client/requests/AsyncExecuteAutomationRequest.d.ts +27 -0
  61. package/api/resources/windows/client/requests/AsyncExecuteAutomationRequest.js +5 -0
  62. package/api/resources/windows/client/requests/AsyncFillFormRequest.d.ts +27 -0
  63. package/api/resources/windows/client/requests/AsyncFillFormRequest.js +5 -0
  64. package/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +27 -0
  65. package/api/resources/windows/client/requests/AsyncHoverRequest.js +5 -0
  66. package/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +27 -0
  67. package/api/resources/windows/client/requests/AsyncMonitorRequest.js +5 -0
  68. package/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +29 -0
  69. package/api/resources/windows/client/requests/AsyncPageQueryRequest.js +5 -0
  70. package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +27 -0
  71. package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +5 -0
  72. package/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +29 -0
  73. package/api/resources/windows/client/requests/AsyncPromptContentRequest.js +5 -0
  74. package/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +23 -0
  75. package/api/resources/windows/client/requests/AsyncScreenshotRequest.js +5 -0
  76. package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +25 -0
  77. package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +5 -0
  78. package/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +37 -0
  79. package/api/resources/windows/client/requests/AsyncTypeRequest.js +5 -0
  80. package/api/resources/windows/client/requests/CreateFormFillerRequest.d.ts +23 -0
  81. package/api/resources/windows/client/requests/CreateFormFillerRequest.js +5 -0
  82. package/api/resources/windows/client/requests/FillFormRequest.d.ts +27 -0
  83. package/api/resources/windows/client/requests/FillFormRequest.js +5 -0
  84. package/api/resources/windows/client/requests/index.d.ts +15 -0
  85. package/api/resources/windows/types/CreateWindowInputV1BodyWaitUntil.d.ts +1 -1
  86. package/api/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.d.ts +1 -1
  87. package/api/types/AsyncConfig.d.ts +7 -0
  88. package/api/types/AsyncConfig.js +5 -0
  89. package/api/types/AsyncSessionAiResponseEnvelope.d.ts +9 -0
  90. package/api/types/AsyncSessionAiResponseEnvelope.js +5 -0
  91. package/api/types/AutomationOutput.d.ts +10 -0
  92. package/api/types/AutomationOutput.js +5 -0
  93. package/api/types/BrowserWaitNavigationConfigWaitUntil.d.ts +1 -1
  94. package/api/types/ClickConfigClickType.d.ts +1 -1
  95. package/api/types/CreateAutomationRequestBodyConfiguration.d.ts +4 -0
  96. package/api/types/CreateAutomationRequestBodyConfiguration.js +5 -0
  97. package/api/types/CreateFileV1.d.ts +24 -0
  98. package/api/types/CreateFileV1.js +5 -0
  99. package/api/types/CreateFileV1FileType.d.ts +13 -0
  100. package/api/types/CreateFileV1FileType.js +12 -0
  101. package/api/types/DeleteAutomationOutputWrapperBody.d.ts +4 -0
  102. package/api/types/DeleteAutomationOutputWrapperBody.js +5 -0
  103. package/api/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.d.ts +10 -0
  104. package/api/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.js +5 -0
  105. package/api/types/EnvelopeGetFileV1EnvelopeDefaultMeta.d.ts +10 -0
  106. package/api/types/EnvelopeGetFileV1EnvelopeDefaultMeta.js +5 -0
  107. package/api/types/ExternalFile.d.ts +33 -0
  108. package/api/types/ExternalFile.js +5 -0
  109. package/api/types/ExternalSessionAiResponseMetadataStatus.d.ts +1 -1
  110. package/api/types/FilesResponse.d.ts +10 -0
  111. package/api/types/FilesResponse.js +5 -0
  112. package/api/types/FilesWithPagination.d.ts +10 -0
  113. package/api/types/FilesWithPagination.js +5 -0
  114. package/api/types/GetFileV1.d.ts +24 -0
  115. package/api/types/GetFileV1.js +5 -0
  116. package/api/types/GetFileV1FileType.d.ts +13 -0
  117. package/api/types/GetFileV1FileType.js +12 -0
  118. package/api/types/ListAutomationsOutput.d.ts +7 -0
  119. package/api/types/ListAutomationsOutput.js +5 -0
  120. package/api/types/MonitorConfigIncludeVisualAnalysis.d.ts +1 -1
  121. package/api/types/Proxy.d.ts +1 -1
  122. package/api/types/SessionConfigV1Proxy.d.ts +1 -1
  123. package/api/types/StatusMessageStatus.d.ts +1 -1
  124. package/api/types/VisualAnalysisConfigPartitionDirection.d.ts +1 -1
  125. package/api/types/VisualAnalysisConfigResultSelectionStrategy.d.ts +1 -1
  126. package/api/types/VisualAnalysisConfigScope.d.ts +1 -1
  127. package/api/types/index.d.ts +15 -0
  128. package/api/types/index.js +15 -0
  129. package/biome.json +3 -0
  130. package/core/auth/BearerToken.d.ts +1 -1
  131. package/core/fetcher/APIResponse.d.ts +1 -1
  132. package/core/fetcher/Fetcher.d.ts +3 -3
  133. package/core/fetcher/Fetcher.js +6 -5
  134. package/core/fetcher/Supplier.d.ts +1 -1
  135. package/core/fetcher/createRequestUrl.d.ts +1 -1
  136. package/core/fetcher/createRequestUrl.js +1 -2
  137. package/core/fetcher/getFetchFn.js +18 -9
  138. package/core/fetcher/getHeader.js +1 -2
  139. package/core/fetcher/getRequestBody.js +5 -5
  140. package/core/fetcher/getResponseBody.js +4 -2
  141. package/core/fetcher/makeRequest.d.ts +1 -1
  142. package/core/fetcher/requestWithRetries.js +17 -9
  143. package/core/fetcher/signals.d.ts +0 -1
  144. package/core/fetcher/signals.js +2 -3
  145. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +1 -2
  146. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +4 -2
  147. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +1 -2
  148. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
  149. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +2 -2
  150. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +4 -2
  151. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
  152. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +19 -10
  153. package/core/index.js +17 -7
  154. package/core/json.d.ts +15 -0
  155. package/core/json.js +24 -0
  156. package/core/runtime/runtime.d.ts +1 -1
  157. package/core/runtime/runtime.js +51 -41
  158. package/core/schemas/Schema.d.ts +8 -5
  159. package/core/schemas/Schema.js +3 -0
  160. package/core/schemas/builders/bigint/bigint.d.ts +2 -0
  161. package/core/schemas/builders/bigint/bigint.js +53 -0
  162. package/core/schemas/builders/bigint/index.d.ts +1 -0
  163. package/core/schemas/builders/bigint/index.js +5 -0
  164. package/core/schemas/builders/date/date.js +1 -2
  165. package/core/schemas/builders/enum/enum.js +1 -2
  166. package/core/schemas/builders/index.d.ts +1 -0
  167. package/core/schemas/builders/index.js +1 -0
  168. package/core/schemas/builders/lazy/lazy.d.ts +1 -1
  169. package/core/schemas/builders/lazy/lazy.js +3 -4
  170. package/core/schemas/builders/lazy/lazyObject.js +1 -2
  171. package/core/schemas/builders/list/list.js +1 -2
  172. package/core/schemas/builders/literals/booleanLiteral.js +1 -2
  173. package/core/schemas/builders/literals/stringLiteral.js +1 -2
  174. package/core/schemas/builders/object/object.d.ts +1 -1
  175. package/core/schemas/builders/object/object.js +31 -3
  176. package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
  177. package/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
  178. package/core/schemas/builders/object/property.js +2 -3
  179. package/core/schemas/builders/object/types.d.ts +16 -11
  180. package/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
  181. package/core/schemas/builders/object-like/types.d.ts +1 -1
  182. package/core/schemas/builders/record/record.js +2 -4
  183. package/core/schemas/builders/record/types.d.ts +2 -2
  184. package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
  185. package/core/schemas/builders/schema-utils/getSchemaUtils.js +67 -4
  186. package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
  187. package/core/schemas/builders/set/set.js +1 -2
  188. package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
  189. package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
  190. package/core/schemas/builders/union/discriminant.js +1 -2
  191. package/core/schemas/builders/union/types.d.ts +6 -6
  192. package/core/schemas/builders/union/union.d.ts +1 -1
  193. package/core/schemas/builders/union/union.js +1 -2
  194. package/core/schemas/utils/MaybePromise.d.ts +1 -1
  195. package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +4 -4
  196. package/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
  197. package/core/schemas/utils/entries.d.ts +1 -1
  198. package/core/schemas/utils/entries.js +1 -2
  199. package/core/schemas/utils/filterObject.d.ts +1 -1
  200. package/core/schemas/utils/filterObject.js +1 -2
  201. package/core/schemas/utils/getErrorMessageForIncorrectType.js +5 -2
  202. package/core/schemas/utils/isPlainObject.js +1 -2
  203. package/core/schemas/utils/keys.d.ts +1 -1
  204. package/core/schemas/utils/keys.js +1 -2
  205. package/core/schemas/utils/maybeSkipValidation.js +1 -2
  206. package/core/schemas/utils/partition.js +1 -2
  207. package/core/streaming-fetcher/Stream.d.ts +0 -1
  208. package/core/streaming-fetcher/Stream.js +20 -21
  209. package/dist/Client.d.ts +14 -4
  210. package/dist/Client.js +16 -6
  211. package/dist/api/errors/ForbiddenError.d.ts +8 -0
  212. package/dist/api/errors/ForbiddenError.js +51 -0
  213. package/dist/api/errors/InternalServerError.js +17 -7
  214. package/dist/api/errors/NotFoundError.js +17 -7
  215. package/dist/api/errors/UnauthorizedError.d.ts +8 -0
  216. package/dist/api/errors/UnauthorizedError.js +51 -0
  217. package/dist/api/errors/UnprocessableEntityError.js +17 -7
  218. package/dist/api/errors/index.d.ts +2 -0
  219. package/dist/api/errors/index.js +2 -0
  220. package/dist/api/resources/automations/client/Client.d.ts +91 -0
  221. package/dist/api/resources/automations/client/Client.js +429 -0
  222. package/dist/api/resources/automations/client/index.d.ts +1 -0
  223. package/dist/api/resources/automations/client/index.js +17 -0
  224. package/dist/api/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.d.ts +19 -0
  225. package/dist/api/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.js +5 -0
  226. package/dist/api/resources/automations/client/requests/index.d.ts +1 -0
  227. package/dist/api/resources/automations/client/requests/index.js +2 -0
  228. package/dist/api/resources/automations/index.d.ts +1 -0
  229. package/dist/api/resources/automations/index.js +17 -0
  230. package/dist/api/resources/files/client/Client.d.ts +69 -0
  231. package/dist/api/resources/files/client/Client.js +286 -0
  232. package/dist/api/resources/files/client/index.d.ts +1 -0
  233. package/dist/api/resources/files/client/index.js +17 -0
  234. package/dist/api/resources/files/client/requests/CreateFileRestInputV1.d.ts +22 -0
  235. package/dist/api/resources/files/client/requests/CreateFileRestInputV1.js +5 -0
  236. package/dist/api/resources/files/client/requests/FilesListRequest.d.ts +24 -0
  237. package/dist/api/resources/files/client/requests/FilesListRequest.js +5 -0
  238. package/dist/api/resources/files/client/requests/index.d.ts +2 -0
  239. package/dist/api/resources/files/client/requests/index.js +2 -0
  240. package/dist/api/resources/files/index.d.ts +2 -0
  241. package/dist/api/resources/files/index.js +18 -0
  242. package/dist/api/resources/files/types/CreateFileRestInputV1FileType.d.ts +13 -0
  243. package/dist/api/resources/files/types/CreateFileRestInputV1FileType.js +12 -0
  244. package/dist/api/resources/files/types/index.d.ts +1 -0
  245. package/dist/api/resources/files/types/index.js +17 -0
  246. package/dist/api/resources/index.d.ts +5 -0
  247. package/dist/api/resources/index.js +23 -8
  248. package/dist/api/resources/profiles/client/Client.d.ts +4 -0
  249. package/dist/api/resources/profiles/client/Client.js +23 -21
  250. package/dist/api/resources/requests/client/Client.d.ts +4 -0
  251. package/dist/api/resources/requests/client/Client.js +21 -19
  252. package/dist/api/resources/sessions/client/Client.d.ts +5 -1
  253. package/dist/api/resources/sessions/client/Client.js +52 -88
  254. package/dist/api/resources/sessions/client/requests/SessionsEventsRequest.d.ts +7 -0
  255. package/dist/api/resources/sessions/types/SessionsEventsResponse.d.ts +7 -7
  256. package/dist/api/resources/sessions/types/SessionsListRequestStatus.d.ts +1 -1
  257. package/dist/api/resources/sessions/types/index.d.ts +2 -2
  258. package/dist/api/resources/sessions/types/index.js +2 -2
  259. package/dist/api/resources/windows/client/Client.d.ts +194 -0
  260. package/dist/api/resources/windows/client/Client.js +924 -199
  261. package/dist/api/resources/windows/client/requests/AsyncClickRequest.d.ts +29 -0
  262. package/dist/api/resources/windows/client/requests/AsyncClickRequest.js +5 -0
  263. package/dist/api/resources/windows/client/requests/AsyncCreateAutomationRequest.d.ts +23 -0
  264. package/dist/api/resources/windows/client/requests/AsyncCreateAutomationRequest.js +5 -0
  265. package/dist/api/resources/windows/client/requests/AsyncCreateFormFillerRequest.d.ts +23 -0
  266. package/dist/api/resources/windows/client/requests/AsyncCreateFormFillerRequest.js +5 -0
  267. package/dist/api/resources/windows/client/requests/AsyncExecuteAutomationRequest.d.ts +27 -0
  268. package/dist/api/resources/windows/client/requests/AsyncExecuteAutomationRequest.js +5 -0
  269. package/dist/api/resources/windows/client/requests/AsyncFillFormRequest.d.ts +27 -0
  270. package/dist/api/resources/windows/client/requests/AsyncFillFormRequest.js +5 -0
  271. package/dist/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +27 -0
  272. package/dist/api/resources/windows/client/requests/AsyncHoverRequest.js +5 -0
  273. package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +27 -0
  274. package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.js +5 -0
  275. package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +29 -0
  276. package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.js +5 -0
  277. package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +27 -0
  278. package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +5 -0
  279. package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +29 -0
  280. package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.js +5 -0
  281. package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +23 -0
  282. package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.js +5 -0
  283. package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +25 -0
  284. package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +5 -0
  285. package/dist/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +37 -0
  286. package/dist/api/resources/windows/client/requests/AsyncTypeRequest.js +5 -0
  287. package/dist/api/resources/windows/client/requests/CreateFormFillerRequest.d.ts +23 -0
  288. package/dist/api/resources/windows/client/requests/CreateFormFillerRequest.js +5 -0
  289. package/dist/api/resources/windows/client/requests/FillFormRequest.d.ts +27 -0
  290. package/dist/api/resources/windows/client/requests/FillFormRequest.js +5 -0
  291. package/dist/api/resources/windows/client/requests/index.d.ts +15 -0
  292. package/dist/api/resources/windows/types/CreateWindowInputV1BodyWaitUntil.d.ts +1 -1
  293. package/dist/api/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.d.ts +1 -1
  294. package/dist/api/types/AsyncConfig.d.ts +7 -0
  295. package/dist/api/types/AsyncConfig.js +5 -0
  296. package/dist/api/types/AsyncSessionAiResponseEnvelope.d.ts +9 -0
  297. package/dist/api/types/AsyncSessionAiResponseEnvelope.js +5 -0
  298. package/dist/api/types/AutomationOutput.d.ts +10 -0
  299. package/dist/api/types/AutomationOutput.js +5 -0
  300. package/dist/api/types/BrowserWaitNavigationConfigWaitUntil.d.ts +1 -1
  301. package/dist/api/types/ClickConfigClickType.d.ts +1 -1
  302. package/dist/api/types/CreateAutomationRequestBodyConfiguration.d.ts +4 -0
  303. package/dist/api/types/CreateAutomationRequestBodyConfiguration.js +5 -0
  304. package/dist/api/types/CreateFileV1.d.ts +24 -0
  305. package/dist/api/types/CreateFileV1.js +5 -0
  306. package/dist/api/types/CreateFileV1FileType.d.ts +13 -0
  307. package/dist/api/types/CreateFileV1FileType.js +12 -0
  308. package/dist/api/types/DeleteAutomationOutputWrapperBody.d.ts +4 -0
  309. package/dist/api/types/DeleteAutomationOutputWrapperBody.js +5 -0
  310. package/dist/api/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.d.ts +10 -0
  311. package/dist/api/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.js +5 -0
  312. package/dist/api/types/EnvelopeGetFileV1EnvelopeDefaultMeta.d.ts +10 -0
  313. package/dist/api/types/EnvelopeGetFileV1EnvelopeDefaultMeta.js +5 -0
  314. package/dist/api/types/ExternalFile.d.ts +33 -0
  315. package/dist/api/types/ExternalFile.js +5 -0
  316. package/dist/api/types/ExternalSessionAiResponseMetadataStatus.d.ts +1 -1
  317. package/dist/api/types/FilesResponse.d.ts +10 -0
  318. package/dist/api/types/FilesResponse.js +5 -0
  319. package/dist/api/types/FilesWithPagination.d.ts +10 -0
  320. package/dist/api/types/FilesWithPagination.js +5 -0
  321. package/dist/api/types/GetFileV1.d.ts +24 -0
  322. package/dist/api/types/GetFileV1.js +5 -0
  323. package/dist/api/types/GetFileV1FileType.d.ts +13 -0
  324. package/dist/api/types/GetFileV1FileType.js +12 -0
  325. package/dist/api/types/ListAutomationsOutput.d.ts +7 -0
  326. package/dist/api/types/ListAutomationsOutput.js +5 -0
  327. package/dist/api/types/MonitorConfigIncludeVisualAnalysis.d.ts +1 -1
  328. package/dist/api/types/Proxy.d.ts +1 -1
  329. package/dist/api/types/SessionConfigV1Proxy.d.ts +1 -1
  330. package/dist/api/types/StatusMessageStatus.d.ts +1 -1
  331. package/dist/api/types/VisualAnalysisConfigPartitionDirection.d.ts +1 -1
  332. package/dist/api/types/VisualAnalysisConfigResultSelectionStrategy.d.ts +1 -1
  333. package/dist/api/types/VisualAnalysisConfigScope.d.ts +1 -1
  334. package/dist/api/types/index.d.ts +15 -0
  335. package/dist/api/types/index.js +15 -0
  336. package/dist/core/auth/BearerToken.d.ts +1 -1
  337. package/dist/core/fetcher/APIResponse.d.ts +1 -1
  338. package/dist/core/fetcher/Fetcher.d.ts +3 -3
  339. package/dist/core/fetcher/Fetcher.js +6 -5
  340. package/dist/core/fetcher/Supplier.d.ts +1 -1
  341. package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
  342. package/dist/core/fetcher/createRequestUrl.js +1 -2
  343. package/dist/core/fetcher/getFetchFn.js +18 -9
  344. package/dist/core/fetcher/getHeader.js +1 -2
  345. package/dist/core/fetcher/getRequestBody.js +5 -5
  346. package/dist/core/fetcher/getResponseBody.js +4 -2
  347. package/dist/core/fetcher/makeRequest.d.ts +1 -1
  348. package/dist/core/fetcher/requestWithRetries.js +17 -9
  349. package/dist/core/fetcher/signals.d.ts +0 -1
  350. package/dist/core/fetcher/signals.js +2 -3
  351. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +1 -2
  352. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +4 -2
  353. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +1 -2
  354. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
  355. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +2 -2
  356. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +4 -2
  357. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
  358. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +19 -10
  359. package/dist/core/index.js +17 -7
  360. package/dist/core/json.d.ts +15 -0
  361. package/dist/core/json.js +24 -0
  362. package/dist/core/runtime/runtime.d.ts +1 -1
  363. package/dist/core/runtime/runtime.js +51 -41
  364. package/dist/core/schemas/Schema.d.ts +8 -5
  365. package/dist/core/schemas/Schema.js +3 -0
  366. package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
  367. package/dist/core/schemas/builders/bigint/bigint.js +53 -0
  368. package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
  369. package/dist/core/schemas/builders/bigint/index.js +5 -0
  370. package/dist/core/schemas/builders/date/date.js +1 -2
  371. package/dist/core/schemas/builders/enum/enum.js +1 -2
  372. package/dist/core/schemas/builders/index.d.ts +1 -0
  373. package/dist/core/schemas/builders/index.js +1 -0
  374. package/dist/core/schemas/builders/lazy/lazy.d.ts +1 -1
  375. package/dist/core/schemas/builders/lazy/lazy.js +3 -4
  376. package/dist/core/schemas/builders/lazy/lazyObject.js +1 -2
  377. package/dist/core/schemas/builders/list/list.js +1 -2
  378. package/dist/core/schemas/builders/literals/booleanLiteral.js +1 -2
  379. package/dist/core/schemas/builders/literals/stringLiteral.js +1 -2
  380. package/dist/core/schemas/builders/object/object.d.ts +1 -1
  381. package/dist/core/schemas/builders/object/object.js +31 -3
  382. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
  383. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
  384. package/dist/core/schemas/builders/object/property.js +2 -3
  385. package/dist/core/schemas/builders/object/types.d.ts +16 -11
  386. package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
  387. package/dist/core/schemas/builders/object-like/types.d.ts +1 -1
  388. package/dist/core/schemas/builders/record/record.js +2 -4
  389. package/dist/core/schemas/builders/record/types.d.ts +2 -2
  390. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
  391. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +67 -4
  392. package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
  393. package/dist/core/schemas/builders/set/set.js +1 -2
  394. package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
  395. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
  396. package/dist/core/schemas/builders/union/discriminant.js +1 -2
  397. package/dist/core/schemas/builders/union/types.d.ts +6 -6
  398. package/dist/core/schemas/builders/union/union.d.ts +1 -1
  399. package/dist/core/schemas/builders/union/union.js +1 -2
  400. package/dist/core/schemas/utils/MaybePromise.d.ts +1 -1
  401. package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +4 -4
  402. package/dist/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
  403. package/dist/core/schemas/utils/entries.d.ts +1 -1
  404. package/dist/core/schemas/utils/entries.js +1 -2
  405. package/dist/core/schemas/utils/filterObject.d.ts +1 -1
  406. package/dist/core/schemas/utils/filterObject.js +1 -2
  407. package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +5 -2
  408. package/dist/core/schemas/utils/isPlainObject.js +1 -2
  409. package/dist/core/schemas/utils/keys.d.ts +1 -1
  410. package/dist/core/schemas/utils/keys.js +1 -2
  411. package/dist/core/schemas/utils/maybeSkipValidation.js +1 -2
  412. package/dist/core/schemas/utils/partition.js +1 -2
  413. package/dist/core/streaming-fetcher/Stream.d.ts +0 -1
  414. package/dist/core/streaming-fetcher/Stream.js +20 -21
  415. package/dist/environments.d.ts +1 -1
  416. package/dist/errors/AirtopError.js +2 -1
  417. package/dist/errors/AirtopTimeoutError.d.ts +1 -1
  418. package/dist/errors/AirtopTimeoutError.js +2 -2
  419. package/dist/index.js +17 -7
  420. package/dist/live-view/types.d.ts +1 -1
  421. package/dist/live-view/types.js +1 -1
  422. package/dist/serialization/resources/automations/client/index.d.ts +1 -0
  423. package/dist/serialization/resources/automations/client/index.js +17 -0
  424. package/dist/serialization/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.d.ts +14 -0
  425. package/dist/serialization/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.js +45 -0
  426. package/dist/serialization/resources/automations/client/requests/index.d.ts +1 -0
  427. package/dist/serialization/resources/automations/client/requests/index.js +5 -0
  428. package/dist/serialization/resources/automations/index.d.ts +1 -0
  429. package/dist/serialization/resources/automations/index.js +17 -0
  430. package/dist/serialization/resources/files/client/index.d.ts +1 -0
  431. package/dist/serialization/resources/files/client/index.js +17 -0
  432. package/dist/serialization/resources/files/client/requests/CreateFileRestInputV1.d.ts +17 -0
  433. package/dist/serialization/resources/files/client/requests/CreateFileRestInputV1.js +48 -0
  434. package/dist/serialization/resources/files/client/requests/index.d.ts +1 -0
  435. package/dist/serialization/resources/files/client/requests/index.js +5 -0
  436. package/dist/serialization/resources/files/index.d.ts +2 -0
  437. package/dist/serialization/resources/files/index.js +18 -0
  438. package/dist/serialization/resources/files/types/CreateFileRestInputV1FileType.d.ts +10 -0
  439. package/dist/serialization/resources/files/types/CreateFileRestInputV1FileType.js +41 -0
  440. package/dist/serialization/resources/files/types/index.d.ts +1 -0
  441. package/dist/serialization/resources/files/types/index.js +17 -0
  442. package/dist/serialization/resources/index.d.ts +5 -0
  443. package/dist/serialization/resources/index.js +23 -8
  444. package/dist/serialization/resources/sessions/client/requests/SessionRestInputV1.js +17 -7
  445. package/dist/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +9 -9
  446. package/dist/serialization/resources/sessions/types/SessionsEventsResponse.js +21 -11
  447. package/dist/serialization/resources/sessions/types/SessionsEventsResponseError.js +17 -7
  448. package/dist/serialization/resources/sessions/types/SessionsEventsResponseSessionEvent.js +17 -7
  449. package/dist/serialization/resources/sessions/types/SessionsEventsResponseStatus.js +17 -7
  450. package/dist/serialization/resources/sessions/types/SessionsEventsResponseWindowEvent.js +17 -7
  451. package/dist/serialization/resources/sessions/types/SessionsListRequestStatus.js +17 -7
  452. package/dist/serialization/resources/sessions/types/index.d.ts +2 -2
  453. package/dist/serialization/resources/sessions/types/index.js +2 -2
  454. package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +20 -0
  455. package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.js +51 -0
  456. package/dist/serialization/resources/windows/client/requests/AsyncCreateAutomationRequest.d.ts +18 -0
  457. package/dist/serialization/resources/windows/client/requests/AsyncCreateAutomationRequest.js +49 -0
  458. package/dist/serialization/resources/windows/client/requests/AsyncCreateFormFillerRequest.d.ts +18 -0
  459. package/dist/serialization/resources/windows/client/requests/AsyncCreateFormFillerRequest.js +49 -0
  460. package/dist/serialization/resources/windows/client/requests/AsyncExecuteAutomationRequest.d.ts +18 -0
  461. package/dist/serialization/resources/windows/client/requests/AsyncExecuteAutomationRequest.js +49 -0
  462. package/dist/serialization/resources/windows/client/requests/AsyncFillFormRequest.d.ts +18 -0
  463. package/dist/serialization/resources/windows/client/requests/AsyncFillFormRequest.js +49 -0
  464. package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +19 -0
  465. package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.js +50 -0
  466. package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +19 -0
  467. package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +50 -0
  468. package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +20 -0
  469. package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +51 -0
  470. package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +19 -0
  471. package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +50 -0
  472. package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +20 -0
  473. package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +51 -0
  474. package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +18 -0
  475. package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +49 -0
  476. package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +19 -0
  477. package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +50 -0
  478. package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +24 -0
  479. package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.js +55 -0
  480. package/dist/serialization/resources/windows/client/requests/CreateFormFillerRequest.d.ts +18 -0
  481. package/dist/serialization/resources/windows/client/requests/CreateFormFillerRequest.js +49 -0
  482. package/dist/serialization/resources/windows/client/requests/CreateWindowInputV1Body.js +17 -7
  483. package/dist/serialization/resources/windows/client/requests/FillFormRequest.d.ts +18 -0
  484. package/dist/serialization/resources/windows/client/requests/FillFormRequest.js +49 -0
  485. package/dist/serialization/resources/windows/client/requests/ScrapeContentRequest.js +17 -7
  486. package/dist/serialization/resources/windows/client/requests/SessionClickHandlerRequestBody.js +17 -7
  487. package/dist/serialization/resources/windows/client/requests/SessionHoverHandlerRequestBody.js +17 -7
  488. package/dist/serialization/resources/windows/client/requests/SessionMonitorHandlerRequestBody.js +17 -7
  489. package/dist/serialization/resources/windows/client/requests/SessionPaginatedExtractionHandlerRequestBody.js +17 -7
  490. package/dist/serialization/resources/windows/client/requests/SessionScreenshotHandlerRequestBody.js +17 -7
  491. package/dist/serialization/resources/windows/client/requests/SessionScrollHandlerRequestBody.js +17 -7
  492. package/dist/serialization/resources/windows/client/requests/SessionSummaryHandlerRequestBody.js +17 -7
  493. package/dist/serialization/resources/windows/client/requests/SessionTypeHandlerRequestBody.js +17 -7
  494. package/dist/serialization/resources/windows/client/requests/WindowLoadUrlV1Body.js +17 -7
  495. package/dist/serialization/resources/windows/client/requests/index.d.ts +15 -0
  496. package/dist/serialization/resources/windows/client/requests/index.js +31 -1
  497. package/dist/serialization/resources/windows/types/CreateWindowInputV1BodyWaitUntil.js +17 -7
  498. package/dist/serialization/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.js +17 -7
  499. package/dist/serialization/types/AiPromptResponse.js +17 -7
  500. package/dist/serialization/types/AiResponseEnvelope.js +17 -7
  501. package/dist/serialization/types/AirtopProxyConfiguration.js +17 -7
  502. package/dist/serialization/types/AsyncConfig.d.ts +12 -0
  503. package/dist/serialization/types/AsyncConfig.js +43 -0
  504. package/dist/serialization/types/AsyncSessionAiResponseEnvelope.d.ts +15 -0
  505. package/dist/serialization/types/AsyncSessionAiResponseEnvelope.js +46 -0
  506. package/dist/serialization/types/AutomationOutput.d.ts +16 -0
  507. package/dist/serialization/types/AutomationOutput.js +47 -0
  508. package/dist/serialization/types/BrowserWaitNavigationConfig.js +17 -7
  509. package/dist/serialization/types/BrowserWaitNavigationConfigWaitUntil.js +17 -7
  510. package/dist/serialization/types/ClickConfig.js +17 -7
  511. package/dist/serialization/types/ClickConfigClickType.js +17 -7
  512. package/dist/serialization/types/ClientProvidedResponseMetadata.js +17 -7
  513. package/dist/serialization/types/CreateAutomationRequestBodyConfiguration.d.ts +10 -0
  514. package/dist/serialization/types/CreateAutomationRequestBodyConfiguration.js +41 -0
  515. package/dist/serialization/types/CreateFileV1.d.ts +21 -0
  516. package/dist/serialization/types/CreateFileV1.js +52 -0
  517. package/dist/serialization/types/CreateFileV1FileType.d.ts +10 -0
  518. package/dist/serialization/types/CreateFileV1FileType.js +41 -0
  519. package/dist/serialization/types/DeleteAutomationOutputWrapperBody.d.ts +10 -0
  520. package/dist/serialization/types/DeleteAutomationOutputWrapperBody.js +41 -0
  521. package/dist/serialization/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.d.ts +18 -0
  522. package/dist/serialization/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.js +49 -0
  523. package/dist/serialization/types/EnvelopeDefaultMeta.js +17 -7
  524. package/dist/serialization/types/EnvelopeGetFileV1EnvelopeDefaultMeta.d.ts +18 -0
  525. package/dist/serialization/types/EnvelopeGetFileV1EnvelopeDefaultMeta.js +49 -0
  526. package/dist/serialization/types/ErrorBody.js +17 -7
  527. package/dist/serialization/types/ErrorDetail.js +17 -7
  528. package/dist/serialization/types/ErrorMessage.js +17 -7
  529. package/dist/serialization/types/ErrorModel.js +17 -7
  530. package/dist/serialization/types/ExternalFile.d.ts +25 -0
  531. package/dist/serialization/types/ExternalFile.js +56 -0
  532. package/dist/serialization/types/ExternalSessionAiResponseMetadata.js +17 -7
  533. package/dist/serialization/types/ExternalSessionAiResponseMetadataStatus.js +17 -7
  534. package/dist/serialization/types/ExternalSessionAiResponseMetadataUsage.js +17 -7
  535. package/dist/serialization/types/ExternalSessionConfig.js +17 -7
  536. package/dist/serialization/types/ExternalSessionWithConnectionInfo.js +17 -7
  537. package/dist/serialization/types/FilesResponse.d.ts +18 -0
  538. package/dist/serialization/types/FilesResponse.js +49 -0
  539. package/dist/serialization/types/FilesWithPagination.d.ts +15 -0
  540. package/dist/serialization/types/FilesWithPagination.js +46 -0
  541. package/dist/serialization/types/GetFileV1.d.ts +21 -0
  542. package/dist/serialization/types/GetFileV1.js +52 -0
  543. package/dist/serialization/types/GetFileV1FileType.d.ts +10 -0
  544. package/dist/serialization/types/GetFileV1FileType.js +41 -0
  545. package/dist/serialization/types/IntervalMonitorConfig.js +17 -7
  546. package/dist/serialization/types/Issue.js +17 -7
  547. package/dist/serialization/types/ListAutomationsOutput.d.ts +13 -0
  548. package/dist/serialization/types/ListAutomationsOutput.js +44 -0
  549. package/dist/serialization/types/MicroInteractionConfig.js +17 -7
  550. package/dist/serialization/types/MicroInteractionConfigWithExperimental.js +17 -7
  551. package/dist/serialization/types/MicroInteractionExperimentalConfig.js +17 -7
  552. package/dist/serialization/types/MonitorConfig.js +17 -7
  553. package/dist/serialization/types/MonitorConfigIncludeVisualAnalysis.js +17 -7
  554. package/dist/serialization/types/OperationOutcome.js +17 -7
  555. package/dist/serialization/types/OperationOutcomeResponse.js +17 -7
  556. package/dist/serialization/types/PageQueryConfig.js +17 -7
  557. package/dist/serialization/types/PageQueryExperimentalConfig.js +17 -7
  558. package/dist/serialization/types/PaginatedExtractionConfig.js +17 -7
  559. package/dist/serialization/types/PaginatedExtractionExperimentalConfig.js +17 -7
  560. package/dist/serialization/types/Pagination.js +17 -7
  561. package/dist/serialization/types/Proxy.js +17 -7
  562. package/dist/serialization/types/ProxyConfigurationKind.js +17 -7
  563. package/dist/serialization/types/ProxyCredentials.js +17 -7
  564. package/dist/serialization/types/RequestStatusResponse.js +17 -7
  565. package/dist/serialization/types/ScrapeConfig.js +17 -7
  566. package/dist/serialization/types/ScrapeResponse.js +17 -7
  567. package/dist/serialization/types/ScrapeResponseContent.js +17 -7
  568. package/dist/serialization/types/ScrapeResponseEnvelope.js +17 -7
  569. package/dist/serialization/types/ScrapeResponseOutput.js +17 -7
  570. package/dist/serialization/types/ScreenshotConfig.js +17 -7
  571. package/dist/serialization/types/ScreenshotMetadata.js +17 -7
  572. package/dist/serialization/types/ScreenshotRequestConfig.js +17 -7
  573. package/dist/serialization/types/ScrollByConfig.js +17 -7
  574. package/dist/serialization/types/ScrollToEdgeConfig.js +17 -7
  575. package/dist/serialization/types/SessionConfigV1.js +17 -7
  576. package/dist/serialization/types/SessionConfigV1Proxy.js +17 -7
  577. package/dist/serialization/types/SessionEventMessage.js +17 -7
  578. package/dist/serialization/types/SessionPageQueryHandlerRequestBody.js +17 -7
  579. package/dist/serialization/types/SessionResponse.js +17 -7
  580. package/dist/serialization/types/SessionsResponse.js +17 -7
  581. package/dist/serialization/types/SessionsWithPagination.js +17 -7
  582. package/dist/serialization/types/StatusMessage.js +17 -7
  583. package/dist/serialization/types/StatusMessageStatus.js +17 -7
  584. package/dist/serialization/types/SummaryConfig.js +17 -7
  585. package/dist/serialization/types/SummaryExperimentalConfig.js +17 -7
  586. package/dist/serialization/types/VisualAnalysisConfig.js +17 -7
  587. package/dist/serialization/types/VisualAnalysisConfigPartitionDirection.js +17 -7
  588. package/dist/serialization/types/VisualAnalysisConfigResultSelectionStrategy.js +17 -7
  589. package/dist/serialization/types/VisualAnalysisConfigScope.js +17 -7
  590. package/dist/serialization/types/Window.js +17 -7
  591. package/dist/serialization/types/WindowEventMessage.js +17 -7
  592. package/dist/serialization/types/WindowId.js +17 -7
  593. package/dist/serialization/types/WindowIdResponse.js +17 -7
  594. package/dist/serialization/types/WindowResponse.js +17 -7
  595. package/dist/serialization/types/index.d.ts +15 -0
  596. package/dist/serialization/types/index.js +15 -0
  597. package/dist/utils/batch-operate/SessionQueue.js +2 -2
  598. package/dist/utils/batch-operate/WindowQueue.js +2 -2
  599. package/dist/utils/batch-operate/batch-util.d.ts +1 -1
  600. package/dist/utils/batch-operate/types.d.ts +5 -5
  601. package/dist/utils/process-screenshots.d.ts +1 -2
  602. package/dist/utils/process-screenshots.js +1 -2
  603. package/dist/version.d.ts +1 -0
  604. package/dist/version.js +4 -0
  605. package/dist/wrapper/AirtopClient.d.ts +6 -2
  606. package/dist/wrapper/AirtopClient.js +27 -8
  607. package/dist/wrapper/AirtopFiles.d.ts +38 -0
  608. package/dist/wrapper/AirtopFiles.js +151 -0
  609. package/dist/wrapper/AirtopRequests.js +2 -2
  610. package/dist/wrapper/AirtopSessions.js +7 -5
  611. package/dist/wrapper/AirtopWindows.js +22 -12
  612. package/environments.d.ts +1 -1
  613. package/errors/AirtopError.js +2 -1
  614. package/errors/AirtopTimeoutError.d.ts +1 -1
  615. package/errors/AirtopTimeoutError.js +2 -2
  616. package/index.js +17 -7
  617. package/{jest.config.js → jest.config.mjs} +4 -1
  618. package/live-view/types.d.ts +1 -1
  619. package/live-view/types.js +1 -1
  620. package/package.json +16 -13
  621. package/reference.md +1881 -189
  622. package/scripts/rename-to-esm-files.js +115 -0
  623. package/serialization/resources/automations/client/index.d.ts +1 -0
  624. package/serialization/resources/automations/client/index.js +17 -0
  625. package/serialization/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.d.ts +14 -0
  626. package/serialization/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.js +45 -0
  627. package/serialization/resources/automations/client/requests/index.d.ts +1 -0
  628. package/serialization/resources/automations/client/requests/index.js +5 -0
  629. package/serialization/resources/automations/index.d.ts +1 -0
  630. package/serialization/resources/automations/index.js +17 -0
  631. package/serialization/resources/files/client/index.d.ts +1 -0
  632. package/serialization/resources/files/client/index.js +17 -0
  633. package/serialization/resources/files/client/requests/CreateFileRestInputV1.d.ts +17 -0
  634. package/serialization/resources/files/client/requests/CreateFileRestInputV1.js +48 -0
  635. package/serialization/resources/files/client/requests/index.d.ts +1 -0
  636. package/serialization/resources/files/client/requests/index.js +5 -0
  637. package/serialization/resources/files/index.d.ts +2 -0
  638. package/serialization/resources/files/index.js +18 -0
  639. package/serialization/resources/files/types/CreateFileRestInputV1FileType.d.ts +10 -0
  640. package/serialization/resources/files/types/CreateFileRestInputV1FileType.js +41 -0
  641. package/serialization/resources/files/types/index.d.ts +1 -0
  642. package/serialization/resources/files/types/index.js +17 -0
  643. package/serialization/resources/index.d.ts +5 -0
  644. package/serialization/resources/index.js +23 -8
  645. package/serialization/resources/sessions/client/requests/SessionRestInputV1.js +17 -7
  646. package/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +9 -9
  647. package/serialization/resources/sessions/types/SessionsEventsResponse.js +21 -11
  648. package/serialization/resources/sessions/types/SessionsEventsResponseError.js +17 -7
  649. package/serialization/resources/sessions/types/SessionsEventsResponseSessionEvent.js +17 -7
  650. package/serialization/resources/sessions/types/SessionsEventsResponseStatus.js +17 -7
  651. package/serialization/resources/sessions/types/SessionsEventsResponseWindowEvent.js +17 -7
  652. package/serialization/resources/sessions/types/SessionsListRequestStatus.js +17 -7
  653. package/serialization/resources/sessions/types/index.d.ts +2 -2
  654. package/serialization/resources/sessions/types/index.js +2 -2
  655. package/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +20 -0
  656. package/serialization/resources/windows/client/requests/AsyncClickRequest.js +51 -0
  657. package/serialization/resources/windows/client/requests/AsyncCreateAutomationRequest.d.ts +18 -0
  658. package/serialization/resources/windows/client/requests/AsyncCreateAutomationRequest.js +49 -0
  659. package/serialization/resources/windows/client/requests/AsyncCreateFormFillerRequest.d.ts +18 -0
  660. package/serialization/resources/windows/client/requests/AsyncCreateFormFillerRequest.js +49 -0
  661. package/serialization/resources/windows/client/requests/AsyncExecuteAutomationRequest.d.ts +18 -0
  662. package/serialization/resources/windows/client/requests/AsyncExecuteAutomationRequest.js +49 -0
  663. package/serialization/resources/windows/client/requests/AsyncFillFormRequest.d.ts +18 -0
  664. package/serialization/resources/windows/client/requests/AsyncFillFormRequest.js +49 -0
  665. package/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +19 -0
  666. package/serialization/resources/windows/client/requests/AsyncHoverRequest.js +50 -0
  667. package/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +19 -0
  668. package/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +50 -0
  669. package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +20 -0
  670. package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +51 -0
  671. package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +19 -0
  672. package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +50 -0
  673. package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +20 -0
  674. package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +51 -0
  675. package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +18 -0
  676. package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +49 -0
  677. package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +19 -0
  678. package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +50 -0
  679. package/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +24 -0
  680. package/serialization/resources/windows/client/requests/AsyncTypeRequest.js +55 -0
  681. package/serialization/resources/windows/client/requests/CreateFormFillerRequest.d.ts +18 -0
  682. package/serialization/resources/windows/client/requests/CreateFormFillerRequest.js +49 -0
  683. package/serialization/resources/windows/client/requests/CreateWindowInputV1Body.js +17 -7
  684. package/serialization/resources/windows/client/requests/FillFormRequest.d.ts +18 -0
  685. package/serialization/resources/windows/client/requests/FillFormRequest.js +49 -0
  686. package/serialization/resources/windows/client/requests/ScrapeContentRequest.js +17 -7
  687. package/serialization/resources/windows/client/requests/SessionClickHandlerRequestBody.js +17 -7
  688. package/serialization/resources/windows/client/requests/SessionHoverHandlerRequestBody.js +17 -7
  689. package/serialization/resources/windows/client/requests/SessionMonitorHandlerRequestBody.js +17 -7
  690. package/serialization/resources/windows/client/requests/SessionPaginatedExtractionHandlerRequestBody.js +17 -7
  691. package/serialization/resources/windows/client/requests/SessionScreenshotHandlerRequestBody.js +17 -7
  692. package/serialization/resources/windows/client/requests/SessionScrollHandlerRequestBody.js +17 -7
  693. package/serialization/resources/windows/client/requests/SessionSummaryHandlerRequestBody.js +17 -7
  694. package/serialization/resources/windows/client/requests/SessionTypeHandlerRequestBody.js +17 -7
  695. package/serialization/resources/windows/client/requests/WindowLoadUrlV1Body.js +17 -7
  696. package/serialization/resources/windows/client/requests/index.d.ts +15 -0
  697. package/serialization/resources/windows/client/requests/index.js +31 -1
  698. package/serialization/resources/windows/types/CreateWindowInputV1BodyWaitUntil.js +17 -7
  699. package/serialization/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.js +17 -7
  700. package/serialization/types/AiPromptResponse.js +17 -7
  701. package/serialization/types/AiResponseEnvelope.js +17 -7
  702. package/serialization/types/AirtopProxyConfiguration.js +17 -7
  703. package/serialization/types/AsyncConfig.d.ts +12 -0
  704. package/serialization/types/AsyncConfig.js +43 -0
  705. package/serialization/types/AsyncSessionAiResponseEnvelope.d.ts +15 -0
  706. package/serialization/types/AsyncSessionAiResponseEnvelope.js +46 -0
  707. package/serialization/types/AutomationOutput.d.ts +16 -0
  708. package/serialization/types/AutomationOutput.js +47 -0
  709. package/serialization/types/BrowserWaitNavigationConfig.js +17 -7
  710. package/serialization/types/BrowserWaitNavigationConfigWaitUntil.js +17 -7
  711. package/serialization/types/ClickConfig.js +17 -7
  712. package/serialization/types/ClickConfigClickType.js +17 -7
  713. package/serialization/types/ClientProvidedResponseMetadata.js +17 -7
  714. package/serialization/types/CreateAutomationRequestBodyConfiguration.d.ts +10 -0
  715. package/serialization/types/CreateAutomationRequestBodyConfiguration.js +41 -0
  716. package/serialization/types/CreateFileV1.d.ts +21 -0
  717. package/serialization/types/CreateFileV1.js +52 -0
  718. package/serialization/types/CreateFileV1FileType.d.ts +10 -0
  719. package/serialization/types/CreateFileV1FileType.js +41 -0
  720. package/serialization/types/DeleteAutomationOutputWrapperBody.d.ts +10 -0
  721. package/serialization/types/DeleteAutomationOutputWrapperBody.js +41 -0
  722. package/serialization/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.d.ts +18 -0
  723. package/serialization/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.js +49 -0
  724. package/serialization/types/EnvelopeDefaultMeta.js +17 -7
  725. package/serialization/types/EnvelopeGetFileV1EnvelopeDefaultMeta.d.ts +18 -0
  726. package/serialization/types/EnvelopeGetFileV1EnvelopeDefaultMeta.js +49 -0
  727. package/serialization/types/ErrorBody.js +17 -7
  728. package/serialization/types/ErrorDetail.js +17 -7
  729. package/serialization/types/ErrorMessage.js +17 -7
  730. package/serialization/types/ErrorModel.js +17 -7
  731. package/serialization/types/ExternalFile.d.ts +25 -0
  732. package/serialization/types/ExternalFile.js +56 -0
  733. package/serialization/types/ExternalSessionAiResponseMetadata.js +17 -7
  734. package/serialization/types/ExternalSessionAiResponseMetadataStatus.js +17 -7
  735. package/serialization/types/ExternalSessionAiResponseMetadataUsage.js +17 -7
  736. package/serialization/types/ExternalSessionConfig.js +17 -7
  737. package/serialization/types/ExternalSessionWithConnectionInfo.js +17 -7
  738. package/serialization/types/FilesResponse.d.ts +18 -0
  739. package/serialization/types/FilesResponse.js +49 -0
  740. package/serialization/types/FilesWithPagination.d.ts +15 -0
  741. package/serialization/types/FilesWithPagination.js +46 -0
  742. package/serialization/types/GetFileV1.d.ts +21 -0
  743. package/serialization/types/GetFileV1.js +52 -0
  744. package/serialization/types/GetFileV1FileType.d.ts +10 -0
  745. package/serialization/types/GetFileV1FileType.js +41 -0
  746. package/serialization/types/IntervalMonitorConfig.js +17 -7
  747. package/serialization/types/Issue.js +17 -7
  748. package/serialization/types/ListAutomationsOutput.d.ts +13 -0
  749. package/serialization/types/ListAutomationsOutput.js +44 -0
  750. package/serialization/types/MicroInteractionConfig.js +17 -7
  751. package/serialization/types/MicroInteractionConfigWithExperimental.js +17 -7
  752. package/serialization/types/MicroInteractionExperimentalConfig.js +17 -7
  753. package/serialization/types/MonitorConfig.js +17 -7
  754. package/serialization/types/MonitorConfigIncludeVisualAnalysis.js +17 -7
  755. package/serialization/types/OperationOutcome.js +17 -7
  756. package/serialization/types/OperationOutcomeResponse.js +17 -7
  757. package/serialization/types/PageQueryConfig.js +17 -7
  758. package/serialization/types/PageQueryExperimentalConfig.js +17 -7
  759. package/serialization/types/PaginatedExtractionConfig.js +17 -7
  760. package/serialization/types/PaginatedExtractionExperimentalConfig.js +17 -7
  761. package/serialization/types/Pagination.js +17 -7
  762. package/serialization/types/Proxy.js +17 -7
  763. package/serialization/types/ProxyConfigurationKind.js +17 -7
  764. package/serialization/types/ProxyCredentials.js +17 -7
  765. package/serialization/types/RequestStatusResponse.js +17 -7
  766. package/serialization/types/ScrapeConfig.js +17 -7
  767. package/serialization/types/ScrapeResponse.js +17 -7
  768. package/serialization/types/ScrapeResponseContent.js +17 -7
  769. package/serialization/types/ScrapeResponseEnvelope.js +17 -7
  770. package/serialization/types/ScrapeResponseOutput.js +17 -7
  771. package/serialization/types/ScreenshotConfig.js +17 -7
  772. package/serialization/types/ScreenshotMetadata.js +17 -7
  773. package/serialization/types/ScreenshotRequestConfig.js +17 -7
  774. package/serialization/types/ScrollByConfig.js +17 -7
  775. package/serialization/types/ScrollToEdgeConfig.js +17 -7
  776. package/serialization/types/SessionConfigV1.js +17 -7
  777. package/serialization/types/SessionConfigV1Proxy.js +17 -7
  778. package/serialization/types/SessionEventMessage.js +17 -7
  779. package/serialization/types/SessionPageQueryHandlerRequestBody.js +17 -7
  780. package/serialization/types/SessionResponse.js +17 -7
  781. package/serialization/types/SessionsResponse.js +17 -7
  782. package/serialization/types/SessionsWithPagination.js +17 -7
  783. package/serialization/types/StatusMessage.js +17 -7
  784. package/serialization/types/StatusMessageStatus.js +17 -7
  785. package/serialization/types/SummaryConfig.js +17 -7
  786. package/serialization/types/SummaryExperimentalConfig.js +17 -7
  787. package/serialization/types/VisualAnalysisConfig.js +17 -7
  788. package/serialization/types/VisualAnalysisConfigPartitionDirection.js +17 -7
  789. package/serialization/types/VisualAnalysisConfigResultSelectionStrategy.js +17 -7
  790. package/serialization/types/VisualAnalysisConfigScope.js +17 -7
  791. package/serialization/types/Window.js +17 -7
  792. package/serialization/types/WindowEventMessage.js +17 -7
  793. package/serialization/types/WindowId.js +17 -7
  794. package/serialization/types/WindowIdResponse.js +17 -7
  795. package/serialization/types/WindowResponse.js +17 -7
  796. package/serialization/types/index.d.ts +15 -0
  797. package/serialization/types/index.js +15 -0
  798. package/utils/batch-operate/SessionQueue.js +2 -2
  799. package/utils/batch-operate/WindowQueue.js +2 -2
  800. package/utils/batch-operate/batch-util.d.ts +1 -1
  801. package/utils/batch-operate/types.d.ts +5 -5
  802. package/utils/process-screenshots.d.ts +1 -2
  803. package/utils/process-screenshots.js +1 -2
  804. package/version.d.ts +1 -0
  805. package/version.js +4 -0
  806. package/wrapper/AirtopClient.d.ts +6 -2
  807. package/wrapper/AirtopClient.js +27 -8
  808. package/wrapper/AirtopFiles.d.ts +38 -0
  809. package/wrapper/AirtopFiles.js +151 -0
  810. package/wrapper/AirtopRequests.js +2 -2
  811. package/wrapper/AirtopSessions.js +7 -5
  812. package/wrapper/AirtopWindows.js +22 -12
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
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
+ })();
28
38
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
39
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
40
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -48,6 +58,729 @@ class Windows {
48
58
  constructor(_options) {
49
59
  this._options = _options;
50
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
+ /**
119
+ * Create an automation of a browser window asynchronously
120
+ *
121
+ * @param {string} sessionId - The session id for the window.
122
+ * @param {string} windowId - The Airtop window id of the browser window.
123
+ * @param {Airtop.AsyncCreateAutomationRequest} request
124
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
125
+ *
126
+ * @example
127
+ * await client.windows.asyncCreateAutomation("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
128
+ */
129
+ asyncCreateAutomation(sessionId_1, windowId_1) {
130
+ return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
131
+ var _a, _b, _c;
132
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
133
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/create-automation`),
134
+ method: "POST",
135
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.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),
136
+ contentType: "application/json",
137
+ requestType: "json",
138
+ body: serializers.AsyncCreateAutomationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
139
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
140
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
141
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
142
+ });
143
+ if (_response.ok) {
144
+ return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
145
+ unrecognizedObjectKeys: "passthrough",
146
+ allowUnrecognizedUnionMembers: true,
147
+ allowUnrecognizedEnumValues: true,
148
+ skipValidation: true,
149
+ breadcrumbsPrefix: ["response"],
150
+ });
151
+ }
152
+ if (_response.error.reason === "status-code") {
153
+ throw new errors.AirtopError({
154
+ statusCode: _response.error.statusCode,
155
+ body: _response.error.body,
156
+ });
157
+ }
158
+ switch (_response.error.reason) {
159
+ case "non-json":
160
+ throw new errors.AirtopError({
161
+ statusCode: _response.error.statusCode,
162
+ body: _response.error.rawBody,
163
+ });
164
+ case "timeout":
165
+ throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/create-automation.");
166
+ case "unknown":
167
+ throw new errors.AirtopError({
168
+ message: _response.error.errorMessage,
169
+ });
170
+ }
171
+ });
172
+ }
173
+ /**
174
+ * Create a form filler automation asynchronously
175
+ *
176
+ * @param {string} sessionId - The session id for the window.
177
+ * @param {string} windowId - The Airtop window id of the browser window.
178
+ * @param {Airtop.AsyncCreateFormFillerRequest} request
179
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
180
+ *
181
+ * @example
182
+ * await client.windows.asyncCreateFormFiller("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
183
+ */
184
+ asyncCreateFormFiller(sessionId_1, windowId_1) {
185
+ return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
186
+ var _a, _b, _c;
187
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
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)}/create-form-filler`),
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.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),
191
+ contentType: "application/json",
192
+ requestType: "json",
193
+ body: serializers.AsyncCreateFormFillerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
194
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
195
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
196
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
197
+ });
198
+ if (_response.ok) {
199
+ return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
200
+ unrecognizedObjectKeys: "passthrough",
201
+ allowUnrecognizedUnionMembers: true,
202
+ allowUnrecognizedEnumValues: true,
203
+ skipValidation: true,
204
+ breadcrumbsPrefix: ["response"],
205
+ });
206
+ }
207
+ if (_response.error.reason === "status-code") {
208
+ throw new errors.AirtopError({
209
+ statusCode: _response.error.statusCode,
210
+ body: _response.error.body,
211
+ });
212
+ }
213
+ switch (_response.error.reason) {
214
+ case "non-json":
215
+ throw new errors.AirtopError({
216
+ statusCode: _response.error.statusCode,
217
+ body: _response.error.rawBody,
218
+ });
219
+ case "timeout":
220
+ throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/create-form-filler.");
221
+ case "unknown":
222
+ throw new errors.AirtopError({
223
+ message: _response.error.errorMessage,
224
+ });
225
+ }
226
+ });
227
+ }
228
+ /**
229
+ * Execute an automation of a browser window asynchronously
230
+ *
231
+ * @param {string} sessionId - The session id for the window.
232
+ * @param {string} windowId - The Airtop window id of the browser window.
233
+ * @param {Airtop.AsyncExecuteAutomationRequest} request
234
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
235
+ *
236
+ * @example
237
+ * await client.windows.asyncExecuteAutomation("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
238
+ * automationId: "automationId"
239
+ * })
240
+ */
241
+ asyncExecuteAutomation(sessionId, windowId, request, requestOptions) {
242
+ return __awaiter(this, void 0, void 0, function* () {
243
+ var _a, _b, _c;
244
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
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)}/execute-automation`),
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.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),
248
+ contentType: "application/json",
249
+ requestType: "json",
250
+ body: serializers.AsyncExecuteAutomationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
251
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
252
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
253
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
254
+ });
255
+ if (_response.ok) {
256
+ return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
257
+ unrecognizedObjectKeys: "passthrough",
258
+ allowUnrecognizedUnionMembers: true,
259
+ allowUnrecognizedEnumValues: true,
260
+ skipValidation: true,
261
+ breadcrumbsPrefix: ["response"],
262
+ });
263
+ }
264
+ if (_response.error.reason === "status-code") {
265
+ throw new errors.AirtopError({
266
+ statusCode: _response.error.statusCode,
267
+ body: _response.error.body,
268
+ });
269
+ }
270
+ switch (_response.error.reason) {
271
+ case "non-json":
272
+ throw new errors.AirtopError({
273
+ statusCode: _response.error.statusCode,
274
+ body: _response.error.rawBody,
275
+ });
276
+ case "timeout":
277
+ throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/execute-automation.");
278
+ case "unknown":
279
+ throw new errors.AirtopError({
280
+ message: _response.error.errorMessage,
281
+ });
282
+ }
283
+ });
284
+ }
285
+ /**
286
+ * Fill a form of a browser window asynchronously using a form-filler automation
287
+ *
288
+ * @param {string} sessionId - The session id for the window.
289
+ * @param {string} windowId - The Airtop window id of the browser window.
290
+ * @param {Airtop.AsyncFillFormRequest} request
291
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
292
+ *
293
+ * @example
294
+ * await client.windows.asyncFillForm("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
295
+ * automationId: "automationId"
296
+ * })
297
+ */
298
+ asyncFillForm(sessionId, windowId, request, requestOptions) {
299
+ return __awaiter(this, void 0, void 0, function* () {
300
+ var _a, _b, _c;
301
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
302
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/fill-form`),
303
+ method: "POST",
304
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.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),
305
+ contentType: "application/json",
306
+ requestType: "json",
307
+ body: serializers.AsyncFillFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
308
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
309
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
310
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
311
+ });
312
+ if (_response.ok) {
313
+ return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
314
+ unrecognizedObjectKeys: "passthrough",
315
+ allowUnrecognizedUnionMembers: true,
316
+ allowUnrecognizedEnumValues: true,
317
+ skipValidation: true,
318
+ breadcrumbsPrefix: ["response"],
319
+ });
320
+ }
321
+ if (_response.error.reason === "status-code") {
322
+ throw new errors.AirtopError({
323
+ statusCode: _response.error.statusCode,
324
+ body: _response.error.body,
325
+ });
326
+ }
327
+ switch (_response.error.reason) {
328
+ case "non-json":
329
+ throw new errors.AirtopError({
330
+ statusCode: _response.error.statusCode,
331
+ body: _response.error.rawBody,
332
+ });
333
+ case "timeout":
334
+ throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/fill-form.");
335
+ case "unknown":
336
+ throw new errors.AirtopError({
337
+ message: _response.error.errorMessage,
338
+ });
339
+ }
340
+ });
341
+ }
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
+ }
51
784
  /**
52
785
  * Creates a new browser window in a session. Optionally, you can specify a url to load on the window upon creation.
53
786
  *
@@ -58,21 +791,13 @@ class Windows {
58
791
  * @example
59
792
  * await client.windows.create("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b")
60
793
  */
61
- create(sessionId, request = {}, requestOptions) {
62
- var _a, _b;
63
- return __awaiter(this, void 0, void 0, function* () {
794
+ create(sessionId_1) {
795
+ return __awaiter(this, arguments, void 0, function* (sessionId, request = {}, requestOptions) {
796
+ var _a, _b, _c;
64
797
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
65
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows`),
798
+ 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`),
66
799
  method: "POST",
67
- headers: {
68
- Authorization: yield this._getAuthorizationHeader(),
69
- "X-Fern-Language": "JavaScript",
70
- "X-Fern-SDK-Name": "@airtop/sdk",
71
- "X-Fern-SDK-Version": "0.1.34",
72
- "User-Agent": "@airtop/sdk/0.1.34",
73
- "X-Fern-Runtime": core.RUNTIME.type,
74
- "X-Fern-Runtime-Version": core.RUNTIME.version,
75
- },
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),
76
801
  contentType: "application/json",
77
802
  requestType: "json",
78
803
  body: serializers.CreateWindowInputV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -102,7 +827,7 @@ class Windows {
102
827
  body: _response.error.rawBody,
103
828
  });
104
829
  case "timeout":
105
- throw new errors.AirtopTimeoutError();
830
+ throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows.");
106
831
  case "unknown":
107
832
  throw new errors.AirtopError({
108
833
  message: _response.error.errorMessage,
@@ -123,9 +848,9 @@ class Windows {
123
848
  * screenResolution: "1280x720"
124
849
  * })
125
850
  */
126
- getWindowInfo(sessionId, windowId, request = {}, requestOptions) {
127
- var _a, _b;
128
- return __awaiter(this, void 0, void 0, function* () {
851
+ getWindowInfo(sessionId_1, windowId_1) {
852
+ return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
853
+ var _a, _b, _c;
129
854
  const { includeNavigationBar, disableResize, screenResolution } = request;
130
855
  const _queryParams = {};
131
856
  if (includeNavigationBar != null) {
@@ -138,17 +863,9 @@ class Windows {
138
863
  _queryParams["screenResolution"] = screenResolution;
139
864
  }
140
865
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
141
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}`),
866
+ 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)}`),
142
867
  method: "GET",
143
- headers: {
144
- Authorization: yield this._getAuthorizationHeader(),
145
- "X-Fern-Language": "JavaScript",
146
- "X-Fern-SDK-Name": "@airtop/sdk",
147
- "X-Fern-SDK-Version": "0.1.34",
148
- "User-Agent": "@airtop/sdk/0.1.34",
149
- "X-Fern-Runtime": core.RUNTIME.type,
150
- "X-Fern-Runtime-Version": core.RUNTIME.version,
151
- },
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),
152
869
  contentType: "application/json",
153
870
  queryParameters: _queryParams,
154
871
  requestType: "json",
@@ -178,7 +895,7 @@ class Windows {
178
895
  body: _response.error.rawBody,
179
896
  });
180
897
  case "timeout":
181
- throw new errors.AirtopTimeoutError();
898
+ throw new errors.AirtopTimeoutError("Timeout exceeded when calling GET /sessions/{sessionId}/windows/{windowId}.");
182
899
  case "unknown":
183
900
  throw new errors.AirtopError({
184
901
  message: _response.error.errorMessage,
@@ -200,20 +917,12 @@ class Windows {
200
917
  * })
201
918
  */
202
919
  loadUrl(sessionId, windowId, request, requestOptions) {
203
- var _a, _b;
204
920
  return __awaiter(this, void 0, void 0, function* () {
921
+ var _a, _b, _c;
205
922
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
206
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}`),
923
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}`),
207
924
  method: "POST",
208
- headers: {
209
- Authorization: yield this._getAuthorizationHeader(),
210
- "X-Fern-Language": "JavaScript",
211
- "X-Fern-SDK-Name": "@airtop/sdk",
212
- "X-Fern-SDK-Version": "0.1.34",
213
- "User-Agent": "@airtop/sdk/0.1.34",
214
- "X-Fern-Runtime": core.RUNTIME.type,
215
- "X-Fern-Runtime-Version": core.RUNTIME.version,
216
- },
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),
217
926
  contentType: "application/json",
218
927
  requestType: "json",
219
928
  body: serializers.WindowLoadUrlV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -243,7 +952,7 @@ class Windows {
243
952
  body: _response.error.rawBody,
244
953
  });
245
954
  case "timeout":
246
- throw new errors.AirtopTimeoutError();
955
+ throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}.");
247
956
  case "unknown":
248
957
  throw new errors.AirtopError({
249
958
  message: _response.error.errorMessage,
@@ -262,20 +971,12 @@ class Windows {
262
971
  * await client.windows.close("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "7334da2a-91b0-42c5-6156-76a5eba87430")
263
972
  */
264
973
  close(sessionId, windowId, requestOptions) {
265
- var _a, _b;
266
974
  return __awaiter(this, void 0, void 0, function* () {
975
+ var _a, _b, _c;
267
976
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
268
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}`),
977
+ 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)}`),
269
978
  method: "DELETE",
270
- headers: {
271
- Authorization: yield this._getAuthorizationHeader(),
272
- "X-Fern-Language": "JavaScript",
273
- "X-Fern-SDK-Name": "@airtop/sdk",
274
- "X-Fern-SDK-Version": "0.1.34",
275
- "User-Agent": "@airtop/sdk/0.1.34",
276
- "X-Fern-Runtime": core.RUNTIME.type,
277
- "X-Fern-Runtime-Version": core.RUNTIME.version,
278
- },
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),
279
980
  contentType: "application/json",
280
981
  requestType: "json",
281
982
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -304,7 +1005,7 @@ class Windows {
304
1005
  body: _response.error.rawBody,
305
1006
  });
306
1007
  case "timeout":
307
- throw new errors.AirtopTimeoutError();
1008
+ throw new errors.AirtopTimeoutError("Timeout exceeded when calling DELETE /sessions/{sessionId}/windows/{windowId}.");
308
1009
  case "unknown":
309
1010
  throw new errors.AirtopError({
310
1011
  message: _response.error.errorMessage,
@@ -326,20 +1027,12 @@ class Windows {
326
1027
  * })
327
1028
  */
328
1029
  click(sessionId, windowId, request, requestOptions) {
329
- var _a, _b;
330
1030
  return __awaiter(this, void 0, void 0, function* () {
1031
+ var _a, _b, _c;
331
1032
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
332
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/click`),
1033
+ 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`),
333
1034
  method: "POST",
334
- headers: {
335
- Authorization: yield this._getAuthorizationHeader(),
336
- "X-Fern-Language": "JavaScript",
337
- "X-Fern-SDK-Name": "@airtop/sdk",
338
- "X-Fern-SDK-Version": "0.1.34",
339
- "User-Agent": "@airtop/sdk/0.1.34",
340
- "X-Fern-Runtime": core.RUNTIME.type,
341
- "X-Fern-Runtime-Version": core.RUNTIME.version,
342
- },
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),
343
1036
  contentType: "application/json",
344
1037
  requestType: "json",
345
1038
  body: serializers.SessionClickHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -369,7 +1062,119 @@ class Windows {
369
1062
  body: _response.error.rawBody,
370
1063
  });
371
1064
  case "timeout":
372
- throw new errors.AirtopTimeoutError();
1065
+ throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/click.");
1066
+ case "unknown":
1067
+ throw new errors.AirtopError({
1068
+ message: _response.error.errorMessage,
1069
+ });
1070
+ }
1071
+ });
1072
+ }
1073
+ /**
1074
+ * Create a form-filler automation synchronously for the form loaded in the browser window
1075
+ *
1076
+ * @param {string} sessionId - The session id for the window.
1077
+ * @param {string} windowId - The Airtop window id of the browser window.
1078
+ * @param {Airtop.CreateFormFillerRequest} request
1079
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
1080
+ *
1081
+ * @example
1082
+ * await client.windows.createFormFiller("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
1083
+ */
1084
+ createFormFiller(sessionId_1, windowId_1) {
1085
+ return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
1086
+ var _a, _b, _c;
1087
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1088
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/create-form-filler`),
1089
+ 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),
1091
+ contentType: "application/json",
1092
+ requestType: "json",
1093
+ body: serializers.CreateFormFillerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
1094
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1095
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1096
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1097
+ });
1098
+ if (_response.ok) {
1099
+ return serializers.AiPromptResponse.parseOrThrow(_response.body, {
1100
+ unrecognizedObjectKeys: "passthrough",
1101
+ allowUnrecognizedUnionMembers: true,
1102
+ allowUnrecognizedEnumValues: true,
1103
+ skipValidation: true,
1104
+ breadcrumbsPrefix: ["response"],
1105
+ });
1106
+ }
1107
+ if (_response.error.reason === "status-code") {
1108
+ throw new errors.AirtopError({
1109
+ statusCode: _response.error.statusCode,
1110
+ body: _response.error.body,
1111
+ });
1112
+ }
1113
+ switch (_response.error.reason) {
1114
+ case "non-json":
1115
+ throw new errors.AirtopError({
1116
+ statusCode: _response.error.statusCode,
1117
+ body: _response.error.rawBody,
1118
+ });
1119
+ case "timeout":
1120
+ throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/create-form-filler.");
1121
+ case "unknown":
1122
+ throw new errors.AirtopError({
1123
+ message: _response.error.errorMessage,
1124
+ });
1125
+ }
1126
+ });
1127
+ }
1128
+ /**
1129
+ * Fill a form of a browser window synchronously using a form-filler automation
1130
+ *
1131
+ * @param {string} sessionId - The session id for the window.
1132
+ * @param {string} windowId - The Airtop window id of the browser window.
1133
+ * @param {Airtop.FillFormRequest} request
1134
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
1135
+ *
1136
+ * @example
1137
+ * await client.windows.fillForm("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
1138
+ * automationId: "automationId"
1139
+ * })
1140
+ */
1141
+ fillForm(sessionId, windowId, request, requestOptions) {
1142
+ return __awaiter(this, void 0, void 0, function* () {
1143
+ var _a, _b, _c;
1144
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1145
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/fill-form`),
1146
+ 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),
1148
+ contentType: "application/json",
1149
+ requestType: "json",
1150
+ body: serializers.FillFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
1151
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1152
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1153
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1154
+ });
1155
+ if (_response.ok) {
1156
+ return serializers.AiPromptResponse.parseOrThrow(_response.body, {
1157
+ unrecognizedObjectKeys: "passthrough",
1158
+ allowUnrecognizedUnionMembers: true,
1159
+ allowUnrecognizedEnumValues: true,
1160
+ skipValidation: true,
1161
+ breadcrumbsPrefix: ["response"],
1162
+ });
1163
+ }
1164
+ if (_response.error.reason === "status-code") {
1165
+ throw new errors.AirtopError({
1166
+ statusCode: _response.error.statusCode,
1167
+ body: _response.error.body,
1168
+ });
1169
+ }
1170
+ switch (_response.error.reason) {
1171
+ case "non-json":
1172
+ throw new errors.AirtopError({
1173
+ statusCode: _response.error.statusCode,
1174
+ body: _response.error.rawBody,
1175
+ });
1176
+ case "timeout":
1177
+ throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/fill-form.");
373
1178
  case "unknown":
374
1179
  throw new errors.AirtopError({
375
1180
  message: _response.error.errorMessage,
@@ -391,20 +1196,12 @@ class Windows {
391
1196
  * })
392
1197
  */
393
1198
  hover(sessionId, windowId, request, requestOptions) {
394
- var _a, _b;
395
1199
  return __awaiter(this, void 0, void 0, function* () {
1200
+ var _a, _b, _c;
396
1201
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
397
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/hover`),
1202
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/hover`),
398
1203
  method: "POST",
399
- headers: {
400
- Authorization: yield this._getAuthorizationHeader(),
401
- "X-Fern-Language": "JavaScript",
402
- "X-Fern-SDK-Name": "@airtop/sdk",
403
- "X-Fern-SDK-Version": "0.1.34",
404
- "User-Agent": "@airtop/sdk/0.1.34",
405
- "X-Fern-Runtime": core.RUNTIME.type,
406
- "X-Fern-Runtime-Version": core.RUNTIME.version,
407
- },
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),
408
1205
  contentType: "application/json",
409
1206
  requestType: "json",
410
1207
  body: serializers.SessionHoverHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -434,7 +1231,7 @@ class Windows {
434
1231
  body: _response.error.rawBody,
435
1232
  });
436
1233
  case "timeout":
437
- throw new errors.AirtopTimeoutError();
1234
+ throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/hover.");
438
1235
  case "unknown":
439
1236
  throw new errors.AirtopError({
440
1237
  message: _response.error.errorMessage,
@@ -454,20 +1251,12 @@ class Windows {
454
1251
  * })
455
1252
  */
456
1253
  monitor(sessionId, windowId, request, requestOptions) {
457
- var _a, _b;
458
1254
  return __awaiter(this, void 0, void 0, function* () {
1255
+ var _a, _b, _c;
459
1256
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
460
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/monitor`),
1257
+ 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`),
461
1258
  method: "POST",
462
- headers: {
463
- Authorization: yield this._getAuthorizationHeader(),
464
- "X-Fern-Language": "JavaScript",
465
- "X-Fern-SDK-Name": "@airtop/sdk",
466
- "X-Fern-SDK-Version": "0.1.34",
467
- "User-Agent": "@airtop/sdk/0.1.34",
468
- "X-Fern-Runtime": core.RUNTIME.type,
469
- "X-Fern-Runtime-Version": core.RUNTIME.version,
470
- },
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),
471
1260
  contentType: "application/json",
472
1261
  requestType: "json",
473
1262
  body: serializers.SessionMonitorHandlerRequestBody.jsonOrThrow(request, {
@@ -499,7 +1288,7 @@ class Windows {
499
1288
  body: _response.error.rawBody,
500
1289
  });
501
1290
  case "timeout":
502
- throw new errors.AirtopTimeoutError();
1291
+ throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/monitor.");
503
1292
  case "unknown":
504
1293
  throw new errors.AirtopError({
505
1294
  message: _response.error.errorMessage,
@@ -521,20 +1310,12 @@ class Windows {
521
1310
  * })
522
1311
  */
523
1312
  pageQuery(sessionId, windowId, request, requestOptions) {
524
- var _a, _b;
525
1313
  return __awaiter(this, void 0, void 0, function* () {
1314
+ var _a, _b, _c;
526
1315
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
527
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/page-query`),
1316
+ 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`),
528
1317
  method: "POST",
529
- headers: {
530
- Authorization: yield this._getAuthorizationHeader(),
531
- "X-Fern-Language": "JavaScript",
532
- "X-Fern-SDK-Name": "@airtop/sdk",
533
- "X-Fern-SDK-Version": "0.1.34",
534
- "User-Agent": "@airtop/sdk/0.1.34",
535
- "X-Fern-Runtime": core.RUNTIME.type,
536
- "X-Fern-Runtime-Version": core.RUNTIME.version,
537
- },
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),
538
1319
  contentType: "application/json",
539
1320
  requestType: "json",
540
1321
  body: serializers.SessionPageQueryHandlerRequestBody.jsonOrThrow(request, {
@@ -566,7 +1347,7 @@ class Windows {
566
1347
  body: _response.error.rawBody,
567
1348
  });
568
1349
  case "timeout":
569
- throw new errors.AirtopTimeoutError();
1350
+ throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/page-query.");
570
1351
  case "unknown":
571
1352
  throw new errors.AirtopError({
572
1353
  message: _response.error.errorMessage,
@@ -588,20 +1369,12 @@ class Windows {
588
1369
  * })
589
1370
  */
590
1371
  paginatedExtraction(sessionId, windowId, request, requestOptions) {
591
- var _a, _b;
592
1372
  return __awaiter(this, void 0, void 0, function* () {
1373
+ var _a, _b, _c;
593
1374
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
594
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/paginated-extraction`),
1375
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/paginated-extraction`),
595
1376
  method: "POST",
596
- headers: {
597
- Authorization: yield this._getAuthorizationHeader(),
598
- "X-Fern-Language": "JavaScript",
599
- "X-Fern-SDK-Name": "@airtop/sdk",
600
- "X-Fern-SDK-Version": "0.1.34",
601
- "User-Agent": "@airtop/sdk/0.1.34",
602
- "X-Fern-Runtime": core.RUNTIME.type,
603
- "X-Fern-Runtime-Version": core.RUNTIME.version,
604
- },
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),
605
1378
  contentType: "application/json",
606
1379
  requestType: "json",
607
1380
  body: serializers.SessionPaginatedExtractionHandlerRequestBody.jsonOrThrow(request, {
@@ -633,7 +1406,7 @@ class Windows {
633
1406
  body: _response.error.rawBody,
634
1407
  });
635
1408
  case "timeout":
636
- throw new errors.AirtopTimeoutError();
1409
+ throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/paginated-extraction.");
637
1410
  case "unknown":
638
1411
  throw new errors.AirtopError({
639
1412
  message: _response.error.errorMessage,
@@ -655,20 +1428,12 @@ class Windows {
655
1428
  * })
656
1429
  */
657
1430
  promptContent(sessionId, windowId, request, requestOptions) {
658
- var _a, _b;
659
1431
  return __awaiter(this, void 0, void 0, function* () {
1432
+ var _a, _b, _c;
660
1433
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
661
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/prompt-content`),
1434
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/prompt-content`),
662
1435
  method: "POST",
663
- headers: {
664
- Authorization: yield this._getAuthorizationHeader(),
665
- "X-Fern-Language": "JavaScript",
666
- "X-Fern-SDK-Name": "@airtop/sdk",
667
- "X-Fern-SDK-Version": "0.1.34",
668
- "User-Agent": "@airtop/sdk/0.1.34",
669
- "X-Fern-Runtime": core.RUNTIME.type,
670
- "X-Fern-Runtime-Version": core.RUNTIME.version,
671
- },
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),
672
1437
  contentType: "application/json",
673
1438
  requestType: "json",
674
1439
  body: serializers.SessionPageQueryHandlerRequestBody.jsonOrThrow(request, {
@@ -700,7 +1465,7 @@ class Windows {
700
1465
  body: _response.error.rawBody,
701
1466
  });
702
1467
  case "timeout":
703
- throw new errors.AirtopTimeoutError();
1468
+ throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/prompt-content.");
704
1469
  case "unknown":
705
1470
  throw new errors.AirtopError({
706
1471
  message: _response.error.errorMessage,
@@ -719,21 +1484,13 @@ class Windows {
719
1484
  * @example
720
1485
  * await client.windows.scrapeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
721
1486
  */
722
- scrapeContent(sessionId, windowId, request = {}, requestOptions) {
723
- var _a, _b;
724
- return __awaiter(this, void 0, void 0, function* () {
1487
+ scrapeContent(sessionId_1, windowId_1) {
1488
+ return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
1489
+ var _a, _b, _c;
725
1490
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
726
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/scrape-content`),
1491
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/scrape-content`),
727
1492
  method: "POST",
728
- headers: {
729
- Authorization: yield this._getAuthorizationHeader(),
730
- "X-Fern-Language": "JavaScript",
731
- "X-Fern-SDK-Name": "@airtop/sdk",
732
- "X-Fern-SDK-Version": "0.1.34",
733
- "User-Agent": "@airtop/sdk/0.1.34",
734
- "X-Fern-Runtime": core.RUNTIME.type,
735
- "X-Fern-Runtime-Version": core.RUNTIME.version,
736
- },
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),
737
1494
  contentType: "application/json",
738
1495
  requestType: "json",
739
1496
  body: serializers.ScrapeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -763,7 +1520,7 @@ class Windows {
763
1520
  body: _response.error.rawBody,
764
1521
  });
765
1522
  case "timeout":
766
- throw new errors.AirtopTimeoutError();
1523
+ throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/scrape-content.");
767
1524
  case "unknown":
768
1525
  throw new errors.AirtopError({
769
1526
  message: _response.error.errorMessage,
@@ -782,21 +1539,13 @@ class Windows {
782
1539
  * @example
783
1540
  * await client.windows.screenshot("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
784
1541
  */
785
- screenshot(sessionId, windowId, request = {}, requestOptions) {
786
- var _a, _b;
787
- return __awaiter(this, void 0, void 0, function* () {
1542
+ screenshot(sessionId_1, windowId_1) {
1543
+ return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
1544
+ var _a, _b, _c;
788
1545
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
789
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/screenshot`),
1546
+ 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`),
790
1547
  method: "POST",
791
- headers: {
792
- Authorization: yield this._getAuthorizationHeader(),
793
- "X-Fern-Language": "JavaScript",
794
- "X-Fern-SDK-Name": "@airtop/sdk",
795
- "X-Fern-SDK-Version": "0.1.34",
796
- "User-Agent": "@airtop/sdk/0.1.34",
797
- "X-Fern-Runtime": core.RUNTIME.type,
798
- "X-Fern-Runtime-Version": core.RUNTIME.version,
799
- },
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),
800
1549
  contentType: "application/json",
801
1550
  requestType: "json",
802
1551
  body: serializers.SessionScreenshotHandlerRequestBody.jsonOrThrow(request, {
@@ -828,7 +1577,7 @@ class Windows {
828
1577
  body: _response.error.rawBody,
829
1578
  });
830
1579
  case "timeout":
831
- throw new errors.AirtopTimeoutError();
1580
+ throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/screenshot.");
832
1581
  case "unknown":
833
1582
  throw new errors.AirtopError({
834
1583
  message: _response.error.errorMessage,
@@ -847,21 +1596,13 @@ class Windows {
847
1596
  * @example
848
1597
  * await client.windows.scroll("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
849
1598
  */
850
- scroll(sessionId, windowId, request = {}, requestOptions) {
851
- var _a, _b;
852
- return __awaiter(this, void 0, void 0, function* () {
1599
+ scroll(sessionId_1, windowId_1) {
1600
+ return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
1601
+ var _a, _b, _c;
853
1602
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
854
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/scroll`),
1603
+ 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`),
855
1604
  method: "POST",
856
- headers: {
857
- Authorization: yield this._getAuthorizationHeader(),
858
- "X-Fern-Language": "JavaScript",
859
- "X-Fern-SDK-Name": "@airtop/sdk",
860
- "X-Fern-SDK-Version": "0.1.34",
861
- "User-Agent": "@airtop/sdk/0.1.34",
862
- "X-Fern-Runtime": core.RUNTIME.type,
863
- "X-Fern-Runtime-Version": core.RUNTIME.version,
864
- },
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),
865
1606
  contentType: "application/json",
866
1607
  requestType: "json",
867
1608
  body: serializers.SessionScrollHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -891,7 +1632,7 @@ class Windows {
891
1632
  body: _response.error.rawBody,
892
1633
  });
893
1634
  case "timeout":
894
- throw new errors.AirtopTimeoutError();
1635
+ throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/scroll.");
895
1636
  case "unknown":
896
1637
  throw new errors.AirtopError({
897
1638
  message: _response.error.errorMessage,
@@ -910,21 +1651,13 @@ class Windows {
910
1651
  * @example
911
1652
  * await client.windows.summarizeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
912
1653
  */
913
- summarizeContent(sessionId, windowId, request = {}, requestOptions) {
914
- var _a, _b;
915
- return __awaiter(this, void 0, void 0, function* () {
1654
+ summarizeContent(sessionId_1, windowId_1) {
1655
+ return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
1656
+ var _a, _b, _c;
916
1657
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
917
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/summarize-content`),
1658
+ 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`),
918
1659
  method: "POST",
919
- headers: {
920
- Authorization: yield this._getAuthorizationHeader(),
921
- "X-Fern-Language": "JavaScript",
922
- "X-Fern-SDK-Name": "@airtop/sdk",
923
- "X-Fern-SDK-Version": "0.1.34",
924
- "User-Agent": "@airtop/sdk/0.1.34",
925
- "X-Fern-Runtime": core.RUNTIME.type,
926
- "X-Fern-Runtime-Version": core.RUNTIME.version,
927
- },
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),
928
1661
  contentType: "application/json",
929
1662
  requestType: "json",
930
1663
  body: serializers.SessionSummaryHandlerRequestBody.jsonOrThrow(request, {
@@ -956,7 +1689,7 @@ class Windows {
956
1689
  body: _response.error.rawBody,
957
1690
  });
958
1691
  case "timeout":
959
- throw new errors.AirtopTimeoutError();
1692
+ throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/summarize-content.");
960
1693
  case "unknown":
961
1694
  throw new errors.AirtopError({
962
1695
  message: _response.error.errorMessage,
@@ -978,20 +1711,12 @@ class Windows {
978
1711
  * })
979
1712
  */
980
1713
  type(sessionId, windowId, request, requestOptions) {
981
- var _a, _b;
982
1714
  return __awaiter(this, void 0, void 0, function* () {
1715
+ var _a, _b, _c;
983
1716
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
984
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/type`),
1717
+ 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`),
985
1718
  method: "POST",
986
- headers: {
987
- Authorization: yield this._getAuthorizationHeader(),
988
- "X-Fern-Language": "JavaScript",
989
- "X-Fern-SDK-Name": "@airtop/sdk",
990
- "X-Fern-SDK-Version": "0.1.34",
991
- "User-Agent": "@airtop/sdk/0.1.34",
992
- "X-Fern-Runtime": core.RUNTIME.type,
993
- "X-Fern-Runtime-Version": core.RUNTIME.version,
994
- },
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),
995
1720
  contentType: "application/json",
996
1721
  requestType: "json",
997
1722
  body: serializers.SessionTypeHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1021,7 +1746,7 @@ class Windows {
1021
1746
  body: _response.error.rawBody,
1022
1747
  });
1023
1748
  case "timeout":
1024
- throw new errors.AirtopTimeoutError();
1749
+ throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/type.");
1025
1750
  case "unknown":
1026
1751
  throw new errors.AirtopError({
1027
1752
  message: _response.error.errorMessage,