@airtop/sdk 0.1.34-beta0 → 0.1.34

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 (269) hide show
  1. package/Client.d.ts +0 -6
  2. package/Client.js +6 -16
  3. package/README.md +6 -8
  4. package/api/errors/index.d.ts +0 -2
  5. package/api/errors/index.js +0 -2
  6. package/api/resources/index.d.ts +0 -3
  7. package/api/resources/index.js +1 -4
  8. package/api/resources/profiles/client/Client.js +2 -2
  9. package/api/resources/requests/client/Client.js +2 -2
  10. package/api/resources/sessions/client/Client.d.ts +0 -9
  11. package/api/resources/sessions/client/Client.js +12 -65
  12. package/api/resources/sessions/types/SessionsEventsResponse.d.ts +4 -4
  13. package/api/resources/sessions/types/index.d.ts +1 -1
  14. package/api/resources/sessions/types/index.js +1 -1
  15. package/api/resources/windows/client/Client.d.ts +0 -138
  16. package/api/resources/windows/client/Client.js +30 -729
  17. package/api/resources/windows/client/requests/index.d.ts +0 -11
  18. package/api/types/index.d.ts +0 -7
  19. package/api/types/index.js +0 -7
  20. package/dist/Client.d.ts +0 -6
  21. package/dist/Client.js +6 -16
  22. package/dist/api/errors/index.d.ts +0 -2
  23. package/dist/api/errors/index.js +0 -2
  24. package/dist/api/resources/index.d.ts +0 -3
  25. package/dist/api/resources/index.js +1 -4
  26. package/dist/api/resources/profiles/client/Client.js +2 -2
  27. package/dist/api/resources/requests/client/Client.js +2 -2
  28. package/dist/api/resources/sessions/client/Client.d.ts +0 -9
  29. package/dist/api/resources/sessions/client/Client.js +12 -65
  30. package/dist/api/resources/sessions/types/SessionsEventsResponse.d.ts +4 -4
  31. package/dist/api/resources/sessions/types/index.d.ts +1 -1
  32. package/dist/api/resources/sessions/types/index.js +1 -1
  33. package/dist/api/resources/windows/client/Client.d.ts +0 -138
  34. package/dist/api/resources/windows/client/Client.js +30 -729
  35. package/dist/api/resources/windows/client/requests/index.d.ts +0 -11
  36. package/dist/api/types/index.d.ts +0 -7
  37. package/dist/api/types/index.js +0 -7
  38. package/dist/serialization/resources/index.d.ts +0 -2
  39. package/dist/serialization/resources/index.js +1 -3
  40. package/dist/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +5 -5
  41. package/dist/serialization/resources/sessions/types/SessionsEventsResponse.js +2 -2
  42. package/dist/serialization/resources/sessions/types/index.d.ts +1 -1
  43. package/dist/serialization/resources/sessions/types/index.js +1 -1
  44. package/dist/serialization/resources/windows/client/requests/index.d.ts +0 -11
  45. package/dist/serialization/resources/windows/client/requests/index.js +1 -23
  46. package/dist/serialization/types/index.d.ts +0 -7
  47. package/dist/serialization/types/index.js +0 -7
  48. package/dist/wrapper/AirtopWindows.d.ts +1 -1
  49. package/package.json +2 -3
  50. package/reference.md +155 -1298
  51. package/serialization/resources/index.d.ts +0 -2
  52. package/serialization/resources/index.js +1 -3
  53. package/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +5 -5
  54. package/serialization/resources/sessions/types/SessionsEventsResponse.js +2 -2
  55. package/serialization/resources/sessions/types/index.d.ts +1 -1
  56. package/serialization/resources/sessions/types/index.js +1 -1
  57. package/serialization/resources/windows/client/requests/index.d.ts +0 -11
  58. package/serialization/resources/windows/client/requests/index.js +1 -23
  59. package/serialization/types/index.d.ts +0 -7
  60. package/serialization/types/index.js +0 -7
  61. package/wrapper/AirtopWindows.d.ts +1 -1
  62. package/api/errors/ForbiddenError.d.ts +0 -8
  63. package/api/errors/ForbiddenError.js +0 -41
  64. package/api/errors/UnauthorizedError.d.ts +0 -8
  65. package/api/errors/UnauthorizedError.js +0 -41
  66. package/api/resources/automations/client/Client.d.ts +0 -87
  67. package/api/resources/automations/client/Client.js +0 -451
  68. package/api/resources/automations/client/index.d.ts +0 -1
  69. package/api/resources/automations/client/index.js +0 -17
  70. package/api/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.d.ts +0 -19
  71. package/api/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.js +0 -5
  72. package/api/resources/automations/client/requests/index.d.ts +0 -1
  73. package/api/resources/automations/client/requests/index.js +0 -2
  74. package/api/resources/automations/index.d.ts +0 -1
  75. package/api/resources/automations/index.js +0 -17
  76. package/api/resources/extensionConfigurations/client/Client.d.ts +0 -40
  77. package/api/resources/extensionConfigurations/client/Client.js +0 -149
  78. package/api/resources/extensionConfigurations/client/index.d.ts +0 -1
  79. package/api/resources/extensionConfigurations/client/index.js +0 -2
  80. package/api/resources/extensionConfigurations/client/requests/ExtensionConfigurationDeleteRequest.d.ts +0 -13
  81. package/api/resources/extensionConfigurations/client/requests/ExtensionConfigurationDeleteRequest.js +0 -5
  82. package/api/resources/extensionConfigurations/client/requests/index.d.ts +0 -1
  83. package/api/resources/extensionConfigurations/client/requests/index.js +0 -2
  84. package/api/resources/extensionConfigurations/index.d.ts +0 -1
  85. package/api/resources/extensionConfigurations/index.js +0 -17
  86. package/api/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -29
  87. package/api/resources/windows/client/requests/AsyncClickRequest.js +0 -5
  88. package/api/resources/windows/client/requests/AsyncCreateAutomationRequest.d.ts +0 -23
  89. package/api/resources/windows/client/requests/AsyncCreateAutomationRequest.js +0 -5
  90. package/api/resources/windows/client/requests/AsyncExecuteAutomationRequest.d.ts +0 -27
  91. package/api/resources/windows/client/requests/AsyncExecuteAutomationRequest.js +0 -5
  92. package/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -27
  93. package/api/resources/windows/client/requests/AsyncHoverRequest.js +0 -5
  94. package/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -27
  95. package/api/resources/windows/client/requests/AsyncMonitorRequest.js +0 -5
  96. package/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -29
  97. package/api/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -5
  98. package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -27
  99. package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -5
  100. package/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -29
  101. package/api/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -5
  102. package/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -23
  103. package/api/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -5
  104. package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -25
  105. package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -5
  106. package/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -37
  107. package/api/resources/windows/client/requests/AsyncTypeRequest.js +0 -5
  108. package/api/types/AsyncConfig.d.ts +0 -7
  109. package/api/types/AsyncConfig.js +0 -5
  110. package/api/types/AsyncSessionAiResponseEnvelope.d.ts +0 -9
  111. package/api/types/AsyncSessionAiResponseEnvelope.js +0 -5
  112. package/api/types/AutomationOutput.d.ts +0 -10
  113. package/api/types/AutomationOutput.js +0 -5
  114. package/api/types/CreateAutomationRequestBodyConfiguration.d.ts +0 -4
  115. package/api/types/CreateAutomationRequestBodyConfiguration.js +0 -5
  116. package/api/types/DeleteAutomationOutputWrapperBody.d.ts +0 -4
  117. package/api/types/DeleteAutomationOutputWrapperBody.js +0 -5
  118. package/api/types/ExtensionConfigurationOutput.d.ts +0 -13
  119. package/api/types/ExtensionConfigurationOutput.js +0 -5
  120. package/api/types/ListAutomationsOutput.d.ts +0 -7
  121. package/api/types/ListAutomationsOutput.js +0 -5
  122. package/dist/api/errors/ForbiddenError.d.ts +0 -8
  123. package/dist/api/errors/ForbiddenError.js +0 -41
  124. package/dist/api/errors/UnauthorizedError.d.ts +0 -8
  125. package/dist/api/errors/UnauthorizedError.js +0 -41
  126. package/dist/api/resources/automations/client/Client.d.ts +0 -87
  127. package/dist/api/resources/automations/client/Client.js +0 -451
  128. package/dist/api/resources/automations/client/index.d.ts +0 -1
  129. package/dist/api/resources/automations/client/index.js +0 -17
  130. package/dist/api/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.d.ts +0 -19
  131. package/dist/api/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.js +0 -5
  132. package/dist/api/resources/automations/client/requests/index.d.ts +0 -1
  133. package/dist/api/resources/automations/client/requests/index.js +0 -2
  134. package/dist/api/resources/automations/index.d.ts +0 -1
  135. package/dist/api/resources/automations/index.js +0 -17
  136. package/dist/api/resources/extensionConfigurations/client/Client.d.ts +0 -40
  137. package/dist/api/resources/extensionConfigurations/client/Client.js +0 -149
  138. package/dist/api/resources/extensionConfigurations/client/index.d.ts +0 -1
  139. package/dist/api/resources/extensionConfigurations/client/index.js +0 -2
  140. package/dist/api/resources/extensionConfigurations/client/requests/ExtensionConfigurationDeleteRequest.d.ts +0 -13
  141. package/dist/api/resources/extensionConfigurations/client/requests/ExtensionConfigurationDeleteRequest.js +0 -5
  142. package/dist/api/resources/extensionConfigurations/client/requests/index.d.ts +0 -1
  143. package/dist/api/resources/extensionConfigurations/client/requests/index.js +0 -2
  144. package/dist/api/resources/extensionConfigurations/index.d.ts +0 -1
  145. package/dist/api/resources/extensionConfigurations/index.js +0 -17
  146. package/dist/api/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -29
  147. package/dist/api/resources/windows/client/requests/AsyncClickRequest.js +0 -5
  148. package/dist/api/resources/windows/client/requests/AsyncCreateAutomationRequest.d.ts +0 -23
  149. package/dist/api/resources/windows/client/requests/AsyncCreateAutomationRequest.js +0 -5
  150. package/dist/api/resources/windows/client/requests/AsyncExecuteAutomationRequest.d.ts +0 -27
  151. package/dist/api/resources/windows/client/requests/AsyncExecuteAutomationRequest.js +0 -5
  152. package/dist/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -27
  153. package/dist/api/resources/windows/client/requests/AsyncHoverRequest.js +0 -5
  154. package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -27
  155. package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.js +0 -5
  156. package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -29
  157. package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -5
  158. package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -27
  159. package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -5
  160. package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -29
  161. package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -5
  162. package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -23
  163. package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -5
  164. package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -25
  165. package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -5
  166. package/dist/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -37
  167. package/dist/api/resources/windows/client/requests/AsyncTypeRequest.js +0 -5
  168. package/dist/api/types/AsyncConfig.d.ts +0 -7
  169. package/dist/api/types/AsyncConfig.js +0 -5
  170. package/dist/api/types/AsyncSessionAiResponseEnvelope.d.ts +0 -9
  171. package/dist/api/types/AsyncSessionAiResponseEnvelope.js +0 -5
  172. package/dist/api/types/AutomationOutput.d.ts +0 -10
  173. package/dist/api/types/AutomationOutput.js +0 -5
  174. package/dist/api/types/CreateAutomationRequestBodyConfiguration.d.ts +0 -4
  175. package/dist/api/types/CreateAutomationRequestBodyConfiguration.js +0 -5
  176. package/dist/api/types/DeleteAutomationOutputWrapperBody.d.ts +0 -4
  177. package/dist/api/types/DeleteAutomationOutputWrapperBody.js +0 -5
  178. package/dist/api/types/ExtensionConfigurationOutput.d.ts +0 -13
  179. package/dist/api/types/ExtensionConfigurationOutput.js +0 -5
  180. package/dist/api/types/ListAutomationsOutput.d.ts +0 -7
  181. package/dist/api/types/ListAutomationsOutput.js +0 -5
  182. package/dist/serialization/resources/automations/client/index.d.ts +0 -1
  183. package/dist/serialization/resources/automations/client/index.js +0 -17
  184. package/dist/serialization/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.d.ts +0 -14
  185. package/dist/serialization/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.js +0 -35
  186. package/dist/serialization/resources/automations/client/requests/index.d.ts +0 -1
  187. package/dist/serialization/resources/automations/client/requests/index.js +0 -5
  188. package/dist/serialization/resources/automations/index.d.ts +0 -1
  189. package/dist/serialization/resources/automations/index.js +0 -17
  190. package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -20
  191. package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.js +0 -41
  192. package/dist/serialization/resources/windows/client/requests/AsyncCreateAutomationRequest.d.ts +0 -18
  193. package/dist/serialization/resources/windows/client/requests/AsyncCreateAutomationRequest.js +0 -39
  194. package/dist/serialization/resources/windows/client/requests/AsyncExecuteAutomationRequest.d.ts +0 -18
  195. package/dist/serialization/resources/windows/client/requests/AsyncExecuteAutomationRequest.js +0 -39
  196. package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -19
  197. package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.js +0 -40
  198. package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -19
  199. package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +0 -40
  200. package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -20
  201. package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -41
  202. package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -19
  203. package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -40
  204. package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -20
  205. package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -41
  206. package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -18
  207. package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -39
  208. package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -19
  209. package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -40
  210. package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -24
  211. package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.js +0 -45
  212. package/dist/serialization/types/AsyncConfig.d.ts +0 -12
  213. package/dist/serialization/types/AsyncConfig.js +0 -33
  214. package/dist/serialization/types/AsyncSessionAiResponseEnvelope.d.ts +0 -15
  215. package/dist/serialization/types/AsyncSessionAiResponseEnvelope.js +0 -36
  216. package/dist/serialization/types/AutomationOutput.d.ts +0 -16
  217. package/dist/serialization/types/AutomationOutput.js +0 -37
  218. package/dist/serialization/types/CreateAutomationRequestBodyConfiguration.d.ts +0 -10
  219. package/dist/serialization/types/CreateAutomationRequestBodyConfiguration.js +0 -31
  220. package/dist/serialization/types/DeleteAutomationOutputWrapperBody.d.ts +0 -10
  221. package/dist/serialization/types/DeleteAutomationOutputWrapperBody.js +0 -31
  222. package/dist/serialization/types/ExtensionConfigurationOutput.d.ts +0 -15
  223. package/dist/serialization/types/ExtensionConfigurationOutput.js +0 -36
  224. package/dist/serialization/types/ListAutomationsOutput.d.ts +0 -13
  225. package/dist/serialization/types/ListAutomationsOutput.js +0 -34
  226. package/serialization/resources/automations/client/index.d.ts +0 -1
  227. package/serialization/resources/automations/client/index.js +0 -17
  228. package/serialization/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.d.ts +0 -14
  229. package/serialization/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.js +0 -35
  230. package/serialization/resources/automations/client/requests/index.d.ts +0 -1
  231. package/serialization/resources/automations/client/requests/index.js +0 -5
  232. package/serialization/resources/automations/index.d.ts +0 -1
  233. package/serialization/resources/automations/index.js +0 -17
  234. package/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -20
  235. package/serialization/resources/windows/client/requests/AsyncClickRequest.js +0 -41
  236. package/serialization/resources/windows/client/requests/AsyncCreateAutomationRequest.d.ts +0 -18
  237. package/serialization/resources/windows/client/requests/AsyncCreateAutomationRequest.js +0 -39
  238. package/serialization/resources/windows/client/requests/AsyncExecuteAutomationRequest.d.ts +0 -18
  239. package/serialization/resources/windows/client/requests/AsyncExecuteAutomationRequest.js +0 -39
  240. package/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -19
  241. package/serialization/resources/windows/client/requests/AsyncHoverRequest.js +0 -40
  242. package/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -19
  243. package/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +0 -40
  244. package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -20
  245. package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -41
  246. package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -19
  247. package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -40
  248. package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -20
  249. package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -41
  250. package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -18
  251. package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -39
  252. package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -19
  253. package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -40
  254. package/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -24
  255. package/serialization/resources/windows/client/requests/AsyncTypeRequest.js +0 -45
  256. package/serialization/types/AsyncConfig.d.ts +0 -12
  257. package/serialization/types/AsyncConfig.js +0 -33
  258. package/serialization/types/AsyncSessionAiResponseEnvelope.d.ts +0 -15
  259. package/serialization/types/AsyncSessionAiResponseEnvelope.js +0 -36
  260. package/serialization/types/AutomationOutput.d.ts +0 -16
  261. package/serialization/types/AutomationOutput.js +0 -37
  262. package/serialization/types/CreateAutomationRequestBodyConfiguration.d.ts +0 -10
  263. package/serialization/types/CreateAutomationRequestBodyConfiguration.js +0 -31
  264. package/serialization/types/DeleteAutomationOutputWrapperBody.d.ts +0 -10
  265. package/serialization/types/DeleteAutomationOutputWrapperBody.js +0 -31
  266. package/serialization/types/ExtensionConfigurationOutput.d.ts +0 -15
  267. package/serialization/types/ExtensionConfigurationOutput.js +0 -36
  268. package/serialization/types/ListAutomationsOutput.d.ts +0 -13
  269. package/serialization/types/ListAutomationsOutput.js +0 -34
@@ -48,705 +48,6 @@ class Windows {
48
48
  constructor(_options) {
49
49
  this._options = _options;
50
50
  }
51
- /**
52
- * Execute a click interaction in a specific browser window asynchronously
53
- *
54
- * @param {string} sessionId - The session id for the window.
55
- * @param {string} windowId - The Airtop window id of the browser window.
56
- * @param {Airtop.AsyncClickRequest} request
57
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
58
- *
59
- * @example
60
- * await client.windows.asyncClick("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
61
- * elementDescription: "The login button"
62
- * })
63
- */
64
- asyncClick(sessionId, windowId, request, requestOptions) {
65
- var _a, _b;
66
- return __awaiter(this, void 0, void 0, function* () {
67
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
68
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/click`),
69
- method: "POST",
70
- headers: {
71
- Authorization: yield this._getAuthorizationHeader(),
72
- "X-Fern-Language": "JavaScript",
73
- "X-Fern-SDK-Name": "@airtop/sdk",
74
- "X-Fern-SDK-Version": "0.1.34-beta0",
75
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
76
- "X-Fern-Runtime": core.RUNTIME.type,
77
- "X-Fern-Runtime-Version": core.RUNTIME.version,
78
- },
79
- contentType: "application/json",
80
- requestType: "json",
81
- body: serializers.AsyncClickRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
82
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
83
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
84
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
85
- });
86
- if (_response.ok) {
87
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
88
- unrecognizedObjectKeys: "passthrough",
89
- allowUnrecognizedUnionMembers: true,
90
- allowUnrecognizedEnumValues: true,
91
- skipValidation: true,
92
- breadcrumbsPrefix: ["response"],
93
- });
94
- }
95
- if (_response.error.reason === "status-code") {
96
- throw new errors.AirtopError({
97
- statusCode: _response.error.statusCode,
98
- body: _response.error.body,
99
- });
100
- }
101
- switch (_response.error.reason) {
102
- case "non-json":
103
- throw new errors.AirtopError({
104
- statusCode: _response.error.statusCode,
105
- body: _response.error.rawBody,
106
- });
107
- case "timeout":
108
- throw new errors.AirtopTimeoutError();
109
- case "unknown":
110
- throw new errors.AirtopError({
111
- message: _response.error.errorMessage,
112
- });
113
- }
114
- });
115
- }
116
- /**
117
- * Create an automation of a browser window asynchronously
118
- *
119
- * @param {string} sessionId - The session id for the window.
120
- * @param {string} windowId - The Airtop window id of the browser window.
121
- * @param {Airtop.AsyncCreateAutomationRequest} request
122
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
123
- *
124
- * @example
125
- * await client.windows.asyncCreateAutomation("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
126
- */
127
- asyncCreateAutomation(sessionId, windowId, request = {}, requestOptions) {
128
- var _a, _b;
129
- return __awaiter(this, void 0, void 0, function* () {
130
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
131
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/create-automation`),
132
- method: "POST",
133
- headers: {
134
- Authorization: yield this._getAuthorizationHeader(),
135
- "X-Fern-Language": "JavaScript",
136
- "X-Fern-SDK-Name": "@airtop/sdk",
137
- "X-Fern-SDK-Version": "0.1.34-beta0",
138
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
139
- "X-Fern-Runtime": core.RUNTIME.type,
140
- "X-Fern-Runtime-Version": core.RUNTIME.version,
141
- },
142
- contentType: "application/json",
143
- requestType: "json",
144
- body: serializers.AsyncCreateAutomationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
145
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
146
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
147
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
148
- });
149
- if (_response.ok) {
150
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
151
- unrecognizedObjectKeys: "passthrough",
152
- allowUnrecognizedUnionMembers: true,
153
- allowUnrecognizedEnumValues: true,
154
- skipValidation: true,
155
- breadcrumbsPrefix: ["response"],
156
- });
157
- }
158
- if (_response.error.reason === "status-code") {
159
- throw new errors.AirtopError({
160
- statusCode: _response.error.statusCode,
161
- body: _response.error.body,
162
- });
163
- }
164
- switch (_response.error.reason) {
165
- case "non-json":
166
- throw new errors.AirtopError({
167
- statusCode: _response.error.statusCode,
168
- body: _response.error.rawBody,
169
- });
170
- case "timeout":
171
- throw new errors.AirtopTimeoutError();
172
- case "unknown":
173
- throw new errors.AirtopError({
174
- message: _response.error.errorMessage,
175
- });
176
- }
177
- });
178
- }
179
- /**
180
- * Execute an automation of a browser window asynchronously
181
- *
182
- * @param {string} sessionId - The session id for the window.
183
- * @param {string} windowId - The Airtop window id of the browser window.
184
- * @param {Airtop.AsyncExecuteAutomationRequest} request
185
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
186
- *
187
- * @example
188
- * await client.windows.asyncExecuteAutomation("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
189
- * automationId: "automationId"
190
- * })
191
- */
192
- asyncExecuteAutomation(sessionId, windowId, request, requestOptions) {
193
- var _a, _b;
194
- return __awaiter(this, void 0, void 0, function* () {
195
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
196
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/execute-automation`),
197
- method: "POST",
198
- headers: {
199
- Authorization: yield this._getAuthorizationHeader(),
200
- "X-Fern-Language": "JavaScript",
201
- "X-Fern-SDK-Name": "@airtop/sdk",
202
- "X-Fern-SDK-Version": "0.1.34-beta0",
203
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
204
- "X-Fern-Runtime": core.RUNTIME.type,
205
- "X-Fern-Runtime-Version": core.RUNTIME.version,
206
- },
207
- contentType: "application/json",
208
- requestType: "json",
209
- body: serializers.AsyncExecuteAutomationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
210
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
211
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
212
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
213
- });
214
- if (_response.ok) {
215
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
216
- unrecognizedObjectKeys: "passthrough",
217
- allowUnrecognizedUnionMembers: true,
218
- allowUnrecognizedEnumValues: true,
219
- skipValidation: true,
220
- breadcrumbsPrefix: ["response"],
221
- });
222
- }
223
- if (_response.error.reason === "status-code") {
224
- throw new errors.AirtopError({
225
- statusCode: _response.error.statusCode,
226
- body: _response.error.body,
227
- });
228
- }
229
- switch (_response.error.reason) {
230
- case "non-json":
231
- throw new errors.AirtopError({
232
- statusCode: _response.error.statusCode,
233
- body: _response.error.rawBody,
234
- });
235
- case "timeout":
236
- throw new errors.AirtopTimeoutError();
237
- case "unknown":
238
- throw new errors.AirtopError({
239
- message: _response.error.errorMessage,
240
- });
241
- }
242
- });
243
- }
244
- /**
245
- * @param {string} sessionId - The session id for the window.
246
- * @param {string} windowId - The Airtop window id of the browser window.
247
- * @param {Airtop.AsyncHoverRequest} request
248
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
249
- *
250
- * @example
251
- * await client.windows.asyncHover("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
252
- * elementDescription: "The search box input in the top right corner"
253
- * })
254
- */
255
- asyncHover(sessionId, windowId, request, requestOptions) {
256
- var _a, _b;
257
- return __awaiter(this, void 0, void 0, function* () {
258
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
259
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/hover`),
260
- method: "POST",
261
- headers: {
262
- Authorization: yield this._getAuthorizationHeader(),
263
- "X-Fern-Language": "JavaScript",
264
- "X-Fern-SDK-Name": "@airtop/sdk",
265
- "X-Fern-SDK-Version": "0.1.34-beta0",
266
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
267
- "X-Fern-Runtime": core.RUNTIME.type,
268
- "X-Fern-Runtime-Version": core.RUNTIME.version,
269
- },
270
- contentType: "application/json",
271
- requestType: "json",
272
- body: serializers.AsyncHoverRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
273
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
274
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
275
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
276
- });
277
- if (_response.ok) {
278
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
279
- unrecognizedObjectKeys: "passthrough",
280
- allowUnrecognizedUnionMembers: true,
281
- allowUnrecognizedEnumValues: true,
282
- skipValidation: true,
283
- breadcrumbsPrefix: ["response"],
284
- });
285
- }
286
- if (_response.error.reason === "status-code") {
287
- throw new errors.AirtopError({
288
- statusCode: _response.error.statusCode,
289
- body: _response.error.body,
290
- });
291
- }
292
- switch (_response.error.reason) {
293
- case "non-json":
294
- throw new errors.AirtopError({
295
- statusCode: _response.error.statusCode,
296
- body: _response.error.rawBody,
297
- });
298
- case "timeout":
299
- throw new errors.AirtopTimeoutError();
300
- case "unknown":
301
- throw new errors.AirtopError({
302
- message: _response.error.errorMessage,
303
- });
304
- }
305
- });
306
- }
307
- /**
308
- * @param {string} sessionId - The session id for the window.
309
- * @param {string} windowId - The Airtop window id of the browser window.
310
- * @param {Airtop.AsyncMonitorRequest} request
311
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
312
- *
313
- * @example
314
- * await client.windows.asyncMonitor("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
315
- * condition: "Determine if the user appears to be signed in to the website"
316
- * })
317
- */
318
- asyncMonitor(sessionId, windowId, request, requestOptions) {
319
- var _a, _b;
320
- return __awaiter(this, void 0, void 0, function* () {
321
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
322
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/monitor`),
323
- method: "POST",
324
- headers: {
325
- Authorization: yield this._getAuthorizationHeader(),
326
- "X-Fern-Language": "JavaScript",
327
- "X-Fern-SDK-Name": "@airtop/sdk",
328
- "X-Fern-SDK-Version": "0.1.34-beta0",
329
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
330
- "X-Fern-Runtime": core.RUNTIME.type,
331
- "X-Fern-Runtime-Version": core.RUNTIME.version,
332
- },
333
- contentType: "application/json",
334
- requestType: "json",
335
- body: serializers.AsyncMonitorRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
336
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
337
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
338
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
339
- });
340
- if (_response.ok) {
341
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
342
- unrecognizedObjectKeys: "passthrough",
343
- allowUnrecognizedUnionMembers: true,
344
- allowUnrecognizedEnumValues: true,
345
- skipValidation: true,
346
- breadcrumbsPrefix: ["response"],
347
- });
348
- }
349
- if (_response.error.reason === "status-code") {
350
- throw new errors.AirtopError({
351
- statusCode: _response.error.statusCode,
352
- body: _response.error.body,
353
- });
354
- }
355
- switch (_response.error.reason) {
356
- case "non-json":
357
- throw new errors.AirtopError({
358
- statusCode: _response.error.statusCode,
359
- body: _response.error.rawBody,
360
- });
361
- case "timeout":
362
- throw new errors.AirtopTimeoutError();
363
- case "unknown":
364
- throw new errors.AirtopError({
365
- message: _response.error.errorMessage,
366
- });
367
- }
368
- });
369
- }
370
- /**
371
- * @param {string} sessionId - The session id for the window.
372
- * @param {string} windowId - The Airtop window id of the browser window.
373
- * @param {Airtop.AsyncPageQueryRequest} request
374
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
375
- *
376
- * @example
377
- * await client.windows.asyncPageQuery("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
378
- * prompt: "What is the main idea of this page?"
379
- * })
380
- */
381
- asyncPageQuery(sessionId, windowId, request, requestOptions) {
382
- var _a, _b;
383
- return __awaiter(this, void 0, void 0, function* () {
384
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
385
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/page-query`),
386
- method: "POST",
387
- headers: {
388
- Authorization: yield this._getAuthorizationHeader(),
389
- "X-Fern-Language": "JavaScript",
390
- "X-Fern-SDK-Name": "@airtop/sdk",
391
- "X-Fern-SDK-Version": "0.1.34-beta0",
392
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
393
- "X-Fern-Runtime": core.RUNTIME.type,
394
- "X-Fern-Runtime-Version": core.RUNTIME.version,
395
- },
396
- contentType: "application/json",
397
- requestType: "json",
398
- body: serializers.AsyncPageQueryRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
399
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
400
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
401
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
402
- });
403
- if (_response.ok) {
404
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
405
- unrecognizedObjectKeys: "passthrough",
406
- allowUnrecognizedUnionMembers: true,
407
- allowUnrecognizedEnumValues: true,
408
- skipValidation: true,
409
- breadcrumbsPrefix: ["response"],
410
- });
411
- }
412
- if (_response.error.reason === "status-code") {
413
- throw new errors.AirtopError({
414
- statusCode: _response.error.statusCode,
415
- body: _response.error.body,
416
- });
417
- }
418
- switch (_response.error.reason) {
419
- case "non-json":
420
- throw new errors.AirtopError({
421
- statusCode: _response.error.statusCode,
422
- body: _response.error.rawBody,
423
- });
424
- case "timeout":
425
- throw new errors.AirtopTimeoutError();
426
- case "unknown":
427
- throw new errors.AirtopError({
428
- message: _response.error.errorMessage,
429
- });
430
- }
431
- });
432
- }
433
- /**
434
- * @param {string} sessionId - The session id for the window.
435
- * @param {string} windowId - The Airtop window id of the browser window.
436
- * @param {Airtop.AsyncPaginatedExtractionRequest} request
437
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
438
- *
439
- * @example
440
- * await client.windows.asyncPaginatedExtraction("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
441
- * 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."
442
- * })
443
- */
444
- asyncPaginatedExtraction(sessionId, windowId, request, requestOptions) {
445
- var _a, _b;
446
- return __awaiter(this, void 0, void 0, function* () {
447
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
448
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/paginated-extraction`),
449
- method: "POST",
450
- headers: {
451
- Authorization: yield this._getAuthorizationHeader(),
452
- "X-Fern-Language": "JavaScript",
453
- "X-Fern-SDK-Name": "@airtop/sdk",
454
- "X-Fern-SDK-Version": "0.1.34-beta0",
455
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
456
- "X-Fern-Runtime": core.RUNTIME.type,
457
- "X-Fern-Runtime-Version": core.RUNTIME.version,
458
- },
459
- contentType: "application/json",
460
- requestType: "json",
461
- body: serializers.AsyncPaginatedExtractionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
462
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
463
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
464
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
465
- });
466
- if (_response.ok) {
467
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
468
- unrecognizedObjectKeys: "passthrough",
469
- allowUnrecognizedUnionMembers: true,
470
- allowUnrecognizedEnumValues: true,
471
- skipValidation: true,
472
- breadcrumbsPrefix: ["response"],
473
- });
474
- }
475
- if (_response.error.reason === "status-code") {
476
- throw new errors.AirtopError({
477
- statusCode: _response.error.statusCode,
478
- body: _response.error.body,
479
- });
480
- }
481
- switch (_response.error.reason) {
482
- case "non-json":
483
- throw new errors.AirtopError({
484
- statusCode: _response.error.statusCode,
485
- body: _response.error.rawBody,
486
- });
487
- case "timeout":
488
- throw new errors.AirtopTimeoutError();
489
- case "unknown":
490
- throw new errors.AirtopError({
491
- message: _response.error.errorMessage,
492
- });
493
- }
494
- });
495
- }
496
- /**
497
- * This endpoint is deprecated. Please use the `pageQuery` endpoint instead.
498
- *
499
- * @param {string} sessionId - The session id for the window.
500
- * @param {string} windowId - The Airtop window id of the browser window.
501
- * @param {Airtop.AsyncPromptContentRequest} request
502
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
503
- *
504
- * @example
505
- * await client.windows.asyncPromptContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
506
- * prompt: "What is the main idea of this page?"
507
- * })
508
- */
509
- asyncPromptContent(sessionId, windowId, request, requestOptions) {
510
- var _a, _b;
511
- return __awaiter(this, void 0, void 0, function* () {
512
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
513
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/prompt-content`),
514
- method: "POST",
515
- headers: {
516
- Authorization: yield this._getAuthorizationHeader(),
517
- "X-Fern-Language": "JavaScript",
518
- "X-Fern-SDK-Name": "@airtop/sdk",
519
- "X-Fern-SDK-Version": "0.1.34-beta0",
520
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
521
- "X-Fern-Runtime": core.RUNTIME.type,
522
- "X-Fern-Runtime-Version": core.RUNTIME.version,
523
- },
524
- contentType: "application/json",
525
- requestType: "json",
526
- body: serializers.AsyncPromptContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
527
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
528
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
529
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
530
- });
531
- if (_response.ok) {
532
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
533
- unrecognizedObjectKeys: "passthrough",
534
- allowUnrecognizedUnionMembers: true,
535
- allowUnrecognizedEnumValues: true,
536
- skipValidation: true,
537
- breadcrumbsPrefix: ["response"],
538
- });
539
- }
540
- if (_response.error.reason === "status-code") {
541
- throw new errors.AirtopError({
542
- statusCode: _response.error.statusCode,
543
- body: _response.error.body,
544
- });
545
- }
546
- switch (_response.error.reason) {
547
- case "non-json":
548
- throw new errors.AirtopError({
549
- statusCode: _response.error.statusCode,
550
- body: _response.error.rawBody,
551
- });
552
- case "timeout":
553
- throw new errors.AirtopTimeoutError();
554
- case "unknown":
555
- throw new errors.AirtopError({
556
- message: _response.error.errorMessage,
557
- });
558
- }
559
- });
560
- }
561
- /**
562
- * Take a screenshot of the current viewport of a browser window asynchronously
563
- *
564
- * @param {string} sessionId - The session id for the window.
565
- * @param {string} windowId - The Airtop window id of the browser window.
566
- * @param {Airtop.AsyncScreenshotRequest} request
567
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
568
- *
569
- * @example
570
- * await client.windows.asyncScreenshot("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
571
- */
572
- asyncScreenshot(sessionId, windowId, request = {}, requestOptions) {
573
- var _a, _b;
574
- return __awaiter(this, void 0, void 0, function* () {
575
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
576
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/screenshot`),
577
- method: "POST",
578
- headers: {
579
- Authorization: yield this._getAuthorizationHeader(),
580
- "X-Fern-Language": "JavaScript",
581
- "X-Fern-SDK-Name": "@airtop/sdk",
582
- "X-Fern-SDK-Version": "0.1.34-beta0",
583
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
584
- "X-Fern-Runtime": core.RUNTIME.type,
585
- "X-Fern-Runtime-Version": core.RUNTIME.version,
586
- },
587
- contentType: "application/json",
588
- requestType: "json",
589
- body: serializers.AsyncScreenshotRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
590
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
591
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
592
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
593
- });
594
- if (_response.ok) {
595
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
596
- unrecognizedObjectKeys: "passthrough",
597
- allowUnrecognizedUnionMembers: true,
598
- allowUnrecognizedEnumValues: true,
599
- skipValidation: true,
600
- breadcrumbsPrefix: ["response"],
601
- });
602
- }
603
- if (_response.error.reason === "status-code") {
604
- throw new errors.AirtopError({
605
- statusCode: _response.error.statusCode,
606
- body: _response.error.body,
607
- });
608
- }
609
- switch (_response.error.reason) {
610
- case "non-json":
611
- throw new errors.AirtopError({
612
- statusCode: _response.error.statusCode,
613
- body: _response.error.rawBody,
614
- });
615
- case "timeout":
616
- throw new errors.AirtopTimeoutError();
617
- case "unknown":
618
- throw new errors.AirtopError({
619
- message: _response.error.errorMessage,
620
- });
621
- }
622
- });
623
- }
624
- /**
625
- * This endpoint is deprecated. Please use the `pageQuery` endpoint and ask for a summary in the prompt instead.
626
- *
627
- * @param {string} sessionId - The session id for the window.
628
- * @param {string} windowId - The Airtop window id of the browser window to summarize.
629
- * @param {Airtop.AsyncSummarizeContentRequest} request
630
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
631
- *
632
- * @example
633
- * await client.windows.asyncSummarizeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
634
- */
635
- asyncSummarizeContent(sessionId, windowId, request = {}, requestOptions) {
636
- var _a, _b;
637
- return __awaiter(this, void 0, void 0, function* () {
638
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
639
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/summarize-content`),
640
- method: "POST",
641
- headers: {
642
- Authorization: yield this._getAuthorizationHeader(),
643
- "X-Fern-Language": "JavaScript",
644
- "X-Fern-SDK-Name": "@airtop/sdk",
645
- "X-Fern-SDK-Version": "0.1.34-beta0",
646
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
647
- "X-Fern-Runtime": core.RUNTIME.type,
648
- "X-Fern-Runtime-Version": core.RUNTIME.version,
649
- },
650
- contentType: "application/json",
651
- requestType: "json",
652
- body: serializers.AsyncSummarizeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
653
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
654
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
655
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
656
- });
657
- if (_response.ok) {
658
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
659
- unrecognizedObjectKeys: "passthrough",
660
- allowUnrecognizedUnionMembers: true,
661
- allowUnrecognizedEnumValues: true,
662
- skipValidation: true,
663
- breadcrumbsPrefix: ["response"],
664
- });
665
- }
666
- if (_response.error.reason === "status-code") {
667
- throw new errors.AirtopError({
668
- statusCode: _response.error.statusCode,
669
- body: _response.error.body,
670
- });
671
- }
672
- switch (_response.error.reason) {
673
- case "non-json":
674
- throw new errors.AirtopError({
675
- statusCode: _response.error.statusCode,
676
- body: _response.error.rawBody,
677
- });
678
- case "timeout":
679
- throw new errors.AirtopTimeoutError();
680
- case "unknown":
681
- throw new errors.AirtopError({
682
- message: _response.error.errorMessage,
683
- });
684
- }
685
- });
686
- }
687
- /**
688
- * @param {string} sessionId - The session id for the window.
689
- * @param {string} windowId - The Airtop window id of the browser window.
690
- * @param {Airtop.AsyncTypeRequest} request
691
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
692
- *
693
- * @example
694
- * await client.windows.asyncType("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
695
- * text: "Example text"
696
- * })
697
- */
698
- asyncType(sessionId, windowId, request, requestOptions) {
699
- var _a, _b;
700
- return __awaiter(this, void 0, void 0, function* () {
701
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
702
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/type`),
703
- method: "POST",
704
- headers: {
705
- Authorization: yield this._getAuthorizationHeader(),
706
- "X-Fern-Language": "JavaScript",
707
- "X-Fern-SDK-Name": "@airtop/sdk",
708
- "X-Fern-SDK-Version": "0.1.34-beta0",
709
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
710
- "X-Fern-Runtime": core.RUNTIME.type,
711
- "X-Fern-Runtime-Version": core.RUNTIME.version,
712
- },
713
- contentType: "application/json",
714
- requestType: "json",
715
- body: serializers.AsyncTypeRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
716
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
717
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
718
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
719
- });
720
- if (_response.ok) {
721
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
722
- unrecognizedObjectKeys: "passthrough",
723
- allowUnrecognizedUnionMembers: true,
724
- allowUnrecognizedEnumValues: true,
725
- skipValidation: true,
726
- breadcrumbsPrefix: ["response"],
727
- });
728
- }
729
- if (_response.error.reason === "status-code") {
730
- throw new errors.AirtopError({
731
- statusCode: _response.error.statusCode,
732
- body: _response.error.body,
733
- });
734
- }
735
- switch (_response.error.reason) {
736
- case "non-json":
737
- throw new errors.AirtopError({
738
- statusCode: _response.error.statusCode,
739
- body: _response.error.rawBody,
740
- });
741
- case "timeout":
742
- throw new errors.AirtopTimeoutError();
743
- case "unknown":
744
- throw new errors.AirtopError({
745
- message: _response.error.errorMessage,
746
- });
747
- }
748
- });
749
- }
750
51
  /**
751
52
  * Creates a new browser window in a session. Optionally, you can specify a url to load on the window upon creation.
752
53
  *
@@ -767,8 +68,8 @@ class Windows {
767
68
  Authorization: yield this._getAuthorizationHeader(),
768
69
  "X-Fern-Language": "JavaScript",
769
70
  "X-Fern-SDK-Name": "@airtop/sdk",
770
- "X-Fern-SDK-Version": "0.1.34-beta0",
771
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
71
+ "X-Fern-SDK-Version": "0.1.34",
72
+ "User-Agent": "@airtop/sdk/0.1.34",
772
73
  "X-Fern-Runtime": core.RUNTIME.type,
773
74
  "X-Fern-Runtime-Version": core.RUNTIME.version,
774
75
  },
@@ -843,8 +144,8 @@ class Windows {
843
144
  Authorization: yield this._getAuthorizationHeader(),
844
145
  "X-Fern-Language": "JavaScript",
845
146
  "X-Fern-SDK-Name": "@airtop/sdk",
846
- "X-Fern-SDK-Version": "0.1.34-beta0",
847
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
147
+ "X-Fern-SDK-Version": "0.1.34",
148
+ "User-Agent": "@airtop/sdk/0.1.34",
848
149
  "X-Fern-Runtime": core.RUNTIME.type,
849
150
  "X-Fern-Runtime-Version": core.RUNTIME.version,
850
151
  },
@@ -908,8 +209,8 @@ class Windows {
908
209
  Authorization: yield this._getAuthorizationHeader(),
909
210
  "X-Fern-Language": "JavaScript",
910
211
  "X-Fern-SDK-Name": "@airtop/sdk",
911
- "X-Fern-SDK-Version": "0.1.34-beta0",
912
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
212
+ "X-Fern-SDK-Version": "0.1.34",
213
+ "User-Agent": "@airtop/sdk/0.1.34",
913
214
  "X-Fern-Runtime": core.RUNTIME.type,
914
215
  "X-Fern-Runtime-Version": core.RUNTIME.version,
915
216
  },
@@ -970,8 +271,8 @@ class Windows {
970
271
  Authorization: yield this._getAuthorizationHeader(),
971
272
  "X-Fern-Language": "JavaScript",
972
273
  "X-Fern-SDK-Name": "@airtop/sdk",
973
- "X-Fern-SDK-Version": "0.1.34-beta0",
974
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
274
+ "X-Fern-SDK-Version": "0.1.34",
275
+ "User-Agent": "@airtop/sdk/0.1.34",
975
276
  "X-Fern-Runtime": core.RUNTIME.type,
976
277
  "X-Fern-Runtime-Version": core.RUNTIME.version,
977
278
  },
@@ -1034,8 +335,8 @@ class Windows {
1034
335
  Authorization: yield this._getAuthorizationHeader(),
1035
336
  "X-Fern-Language": "JavaScript",
1036
337
  "X-Fern-SDK-Name": "@airtop/sdk",
1037
- "X-Fern-SDK-Version": "0.1.34-beta0",
1038
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
338
+ "X-Fern-SDK-Version": "0.1.34",
339
+ "User-Agent": "@airtop/sdk/0.1.34",
1039
340
  "X-Fern-Runtime": core.RUNTIME.type,
1040
341
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1041
342
  },
@@ -1099,8 +400,8 @@ class Windows {
1099
400
  Authorization: yield this._getAuthorizationHeader(),
1100
401
  "X-Fern-Language": "JavaScript",
1101
402
  "X-Fern-SDK-Name": "@airtop/sdk",
1102
- "X-Fern-SDK-Version": "0.1.34-beta0",
1103
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
403
+ "X-Fern-SDK-Version": "0.1.34",
404
+ "User-Agent": "@airtop/sdk/0.1.34",
1104
405
  "X-Fern-Runtime": core.RUNTIME.type,
1105
406
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1106
407
  },
@@ -1162,8 +463,8 @@ class Windows {
1162
463
  Authorization: yield this._getAuthorizationHeader(),
1163
464
  "X-Fern-Language": "JavaScript",
1164
465
  "X-Fern-SDK-Name": "@airtop/sdk",
1165
- "X-Fern-SDK-Version": "0.1.34-beta0",
1166
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
466
+ "X-Fern-SDK-Version": "0.1.34",
467
+ "User-Agent": "@airtop/sdk/0.1.34",
1167
468
  "X-Fern-Runtime": core.RUNTIME.type,
1168
469
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1169
470
  },
@@ -1229,8 +530,8 @@ class Windows {
1229
530
  Authorization: yield this._getAuthorizationHeader(),
1230
531
  "X-Fern-Language": "JavaScript",
1231
532
  "X-Fern-SDK-Name": "@airtop/sdk",
1232
- "X-Fern-SDK-Version": "0.1.34-beta0",
1233
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
533
+ "X-Fern-SDK-Version": "0.1.34",
534
+ "User-Agent": "@airtop/sdk/0.1.34",
1234
535
  "X-Fern-Runtime": core.RUNTIME.type,
1235
536
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1236
537
  },
@@ -1296,8 +597,8 @@ class Windows {
1296
597
  Authorization: yield this._getAuthorizationHeader(),
1297
598
  "X-Fern-Language": "JavaScript",
1298
599
  "X-Fern-SDK-Name": "@airtop/sdk",
1299
- "X-Fern-SDK-Version": "0.1.34-beta0",
1300
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
600
+ "X-Fern-SDK-Version": "0.1.34",
601
+ "User-Agent": "@airtop/sdk/0.1.34",
1301
602
  "X-Fern-Runtime": core.RUNTIME.type,
1302
603
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1303
604
  },
@@ -1363,8 +664,8 @@ class Windows {
1363
664
  Authorization: yield this._getAuthorizationHeader(),
1364
665
  "X-Fern-Language": "JavaScript",
1365
666
  "X-Fern-SDK-Name": "@airtop/sdk",
1366
- "X-Fern-SDK-Version": "0.1.34-beta0",
1367
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
667
+ "X-Fern-SDK-Version": "0.1.34",
668
+ "User-Agent": "@airtop/sdk/0.1.34",
1368
669
  "X-Fern-Runtime": core.RUNTIME.type,
1369
670
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1370
671
  },
@@ -1428,8 +729,8 @@ class Windows {
1428
729
  Authorization: yield this._getAuthorizationHeader(),
1429
730
  "X-Fern-Language": "JavaScript",
1430
731
  "X-Fern-SDK-Name": "@airtop/sdk",
1431
- "X-Fern-SDK-Version": "0.1.34-beta0",
1432
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
732
+ "X-Fern-SDK-Version": "0.1.34",
733
+ "User-Agent": "@airtop/sdk/0.1.34",
1433
734
  "X-Fern-Runtime": core.RUNTIME.type,
1434
735
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1435
736
  },
@@ -1491,8 +792,8 @@ class Windows {
1491
792
  Authorization: yield this._getAuthorizationHeader(),
1492
793
  "X-Fern-Language": "JavaScript",
1493
794
  "X-Fern-SDK-Name": "@airtop/sdk",
1494
- "X-Fern-SDK-Version": "0.1.34-beta0",
1495
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
795
+ "X-Fern-SDK-Version": "0.1.34",
796
+ "User-Agent": "@airtop/sdk/0.1.34",
1496
797
  "X-Fern-Runtime": core.RUNTIME.type,
1497
798
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1498
799
  },
@@ -1556,8 +857,8 @@ class Windows {
1556
857
  Authorization: yield this._getAuthorizationHeader(),
1557
858
  "X-Fern-Language": "JavaScript",
1558
859
  "X-Fern-SDK-Name": "@airtop/sdk",
1559
- "X-Fern-SDK-Version": "0.1.34-beta0",
1560
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
860
+ "X-Fern-SDK-Version": "0.1.34",
861
+ "User-Agent": "@airtop/sdk/0.1.34",
1561
862
  "X-Fern-Runtime": core.RUNTIME.type,
1562
863
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1563
864
  },
@@ -1619,8 +920,8 @@ class Windows {
1619
920
  Authorization: yield this._getAuthorizationHeader(),
1620
921
  "X-Fern-Language": "JavaScript",
1621
922
  "X-Fern-SDK-Name": "@airtop/sdk",
1622
- "X-Fern-SDK-Version": "0.1.34-beta0",
1623
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
923
+ "X-Fern-SDK-Version": "0.1.34",
924
+ "User-Agent": "@airtop/sdk/0.1.34",
1624
925
  "X-Fern-Runtime": core.RUNTIME.type,
1625
926
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1626
927
  },
@@ -1686,8 +987,8 @@ class Windows {
1686
987
  Authorization: yield this._getAuthorizationHeader(),
1687
988
  "X-Fern-Language": "JavaScript",
1688
989
  "X-Fern-SDK-Name": "@airtop/sdk",
1689
- "X-Fern-SDK-Version": "0.1.34-beta0",
1690
- "User-Agent": "@airtop/sdk/0.1.34-beta0",
990
+ "X-Fern-SDK-Version": "0.1.34",
991
+ "User-Agent": "@airtop/sdk/0.1.34",
1691
992
  "X-Fern-Runtime": core.RUNTIME.type,
1692
993
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1693
994
  },