@airtop/sdk 0.1.27-beta0 → 0.1.27

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 +4 -14
  3. package/README.md +6 -8
  4. package/api/resources/index.d.ts +0 -3
  5. package/api/resources/index.js +1 -4
  6. package/api/resources/profiles/client/Client.js +2 -2
  7. package/api/resources/sessions/client/Client.js +14 -14
  8. package/api/resources/sessions/types/SessionsEventsResponse.d.ts +4 -4
  9. package/api/resources/sessions/types/index.d.ts +1 -1
  10. package/api/resources/sessions/types/index.js +1 -1
  11. package/api/resources/windows/client/Client.d.ts +0 -146
  12. package/api/resources/windows/client/Client.js +28 -788
  13. package/api/resources/windows/client/requests/index.d.ts +0 -12
  14. package/api/types/SessionConfigV1.d.ts +0 -4
  15. package/api/types/index.d.ts +0 -10
  16. package/api/types/index.js +0 -10
  17. package/dist/Client.d.ts +0 -6
  18. package/dist/Client.js +4 -14
  19. package/dist/api/resources/index.d.ts +0 -3
  20. package/dist/api/resources/index.js +1 -4
  21. package/dist/api/resources/profiles/client/Client.js +2 -2
  22. package/dist/api/resources/sessions/client/Client.js +14 -14
  23. package/dist/api/resources/sessions/types/SessionsEventsResponse.d.ts +4 -4
  24. package/dist/api/resources/sessions/types/index.d.ts +1 -1
  25. package/dist/api/resources/sessions/types/index.js +1 -1
  26. package/dist/api/resources/windows/client/Client.d.ts +0 -146
  27. package/dist/api/resources/windows/client/Client.js +28 -788
  28. package/dist/api/resources/windows/client/requests/index.d.ts +0 -12
  29. package/dist/api/types/SessionConfigV1.d.ts +0 -4
  30. package/dist/api/types/index.d.ts +0 -10
  31. package/dist/api/types/index.js +0 -10
  32. package/dist/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +5 -5
  33. package/dist/serialization/resources/sessions/types/SessionsEventsResponse.js +2 -2
  34. package/dist/serialization/resources/sessions/types/index.d.ts +1 -1
  35. package/dist/serialization/resources/sessions/types/index.js +1 -1
  36. package/dist/serialization/resources/windows/client/requests/index.d.ts +0 -12
  37. package/dist/serialization/resources/windows/client/requests/index.js +1 -25
  38. package/dist/serialization/types/SessionConfigV1.d.ts +0 -2
  39. package/dist/serialization/types/SessionConfigV1.js +0 -2
  40. package/dist/serialization/types/index.d.ts +0 -10
  41. package/dist/serialization/types/index.js +0 -10
  42. package/dist/wrapper/AirtopClient.d.ts +0 -1
  43. package/dist/wrapper/AirtopClient.js +0 -3
  44. package/dist/wrapper/AirtopWindows.d.ts +2 -24
  45. package/dist/wrapper/AirtopWindows.js +0 -36
  46. package/package.json +1 -1
  47. package/reference.md +0 -1068
  48. package/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +5 -5
  49. package/serialization/resources/sessions/types/SessionsEventsResponse.js +2 -2
  50. package/serialization/resources/sessions/types/index.d.ts +1 -1
  51. package/serialization/resources/sessions/types/index.js +1 -1
  52. package/serialization/resources/windows/client/requests/index.d.ts +0 -12
  53. package/serialization/resources/windows/client/requests/index.js +1 -25
  54. package/serialization/types/SessionConfigV1.d.ts +0 -2
  55. package/serialization/types/SessionConfigV1.js +0 -2
  56. package/serialization/types/index.d.ts +0 -10
  57. package/serialization/types/index.js +0 -10
  58. package/wrapper/AirtopClient.d.ts +0 -1
  59. package/wrapper/AirtopClient.js +0 -3
  60. package/wrapper/AirtopWindows.d.ts +2 -24
  61. package/wrapper/AirtopWindows.js +0 -36
  62. package/api/resources/extensionConfigurations/client/Client.d.ts +0 -50
  63. package/api/resources/extensionConfigurations/client/Client.js +0 -214
  64. package/api/resources/extensionConfigurations/client/index.d.ts +0 -1
  65. package/api/resources/extensionConfigurations/client/index.js +0 -17
  66. package/api/resources/extensionConfigurations/client/requests/ExtensionConfigurationDeleteRequest.d.ts +0 -13
  67. package/api/resources/extensionConfigurations/client/requests/ExtensionConfigurationDeleteRequest.js +0 -5
  68. package/api/resources/extensionConfigurations/client/requests/index.d.ts +0 -1
  69. package/api/resources/extensionConfigurations/client/requests/index.js +0 -2
  70. package/api/resources/extensionConfigurations/index.d.ts +0 -1
  71. package/api/resources/extensionConfigurations/index.js +0 -17
  72. package/api/resources/requests/client/Client.d.ts +0 -34
  73. package/api/resources/requests/client/Client.js +0 -115
  74. package/api/resources/requests/client/index.d.ts +0 -1
  75. package/api/resources/requests/client/index.js +0 -2
  76. package/api/resources/requests/index.d.ts +0 -1
  77. package/api/resources/requests/index.js +0 -17
  78. package/api/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -29
  79. package/api/resources/windows/client/requests/AsyncClickRequest.js +0 -5
  80. package/api/resources/windows/client/requests/AsyncCreateAutomationRequest.d.ts +0 -23
  81. package/api/resources/windows/client/requests/AsyncCreateAutomationRequest.js +0 -5
  82. package/api/resources/windows/client/requests/AsyncExecuteAutomationRequest.d.ts +0 -27
  83. package/api/resources/windows/client/requests/AsyncExecuteAutomationRequest.js +0 -5
  84. package/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -27
  85. package/api/resources/windows/client/requests/AsyncHoverRequest.js +0 -5
  86. package/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -27
  87. package/api/resources/windows/client/requests/AsyncMonitorRequest.js +0 -5
  88. package/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -29
  89. package/api/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -5
  90. package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -27
  91. package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -5
  92. package/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -29
  93. package/api/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -5
  94. package/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -23
  95. package/api/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -5
  96. package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -25
  97. package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -5
  98. package/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -37
  99. package/api/resources/windows/client/requests/AsyncTypeRequest.js +0 -5
  100. package/api/resources/windows/client/requests/SessionMonitorHandlerRequestBody.d.ts +0 -25
  101. package/api/resources/windows/client/requests/SessionMonitorHandlerRequestBody.js +0 -5
  102. package/api/types/AsyncConfig.d.ts +0 -7
  103. package/api/types/AsyncConfig.js +0 -5
  104. package/api/types/AsyncSessionAiResponseEnvelope.d.ts +0 -9
  105. package/api/types/AsyncSessionAiResponseEnvelope.js +0 -5
  106. package/api/types/BrowserWaitSelectorConfig.d.ts +0 -11
  107. package/api/types/BrowserWaitSelectorConfig.js +0 -5
  108. package/api/types/CreateAutomationRequestBodyConfiguration.d.ts +0 -4
  109. package/api/types/CreateAutomationRequestBodyConfiguration.js +0 -5
  110. package/api/types/ExtensionConfigurationOutput.d.ts +0 -13
  111. package/api/types/ExtensionConfigurationOutput.js +0 -5
  112. package/api/types/IntervalMonitorConfig.d.ts +0 -9
  113. package/api/types/IntervalMonitorConfig.js +0 -5
  114. package/api/types/MonitorConfig.d.ts +0 -14
  115. package/api/types/MonitorConfig.js +0 -5
  116. package/api/types/MonitorConfigIncludeVisualAnalysis.d.ts +0 -12
  117. package/api/types/MonitorConfigIncludeVisualAnalysis.js +0 -11
  118. package/api/types/MonitorConfigMonitorType.d.ts +0 -11
  119. package/api/types/MonitorConfigMonitorType.js +0 -10
  120. package/api/types/RequestStatusResponse.d.ts +0 -8
  121. package/api/types/RequestStatusResponse.js +0 -5
  122. package/dist/api/resources/extensionConfigurations/client/Client.d.ts +0 -50
  123. package/dist/api/resources/extensionConfigurations/client/Client.js +0 -214
  124. package/dist/api/resources/extensionConfigurations/client/index.d.ts +0 -1
  125. package/dist/api/resources/extensionConfigurations/client/index.js +0 -17
  126. package/dist/api/resources/extensionConfigurations/client/requests/ExtensionConfigurationDeleteRequest.d.ts +0 -13
  127. package/dist/api/resources/extensionConfigurations/client/requests/ExtensionConfigurationDeleteRequest.js +0 -5
  128. package/dist/api/resources/extensionConfigurations/client/requests/index.d.ts +0 -1
  129. package/dist/api/resources/extensionConfigurations/client/requests/index.js +0 -2
  130. package/dist/api/resources/extensionConfigurations/index.d.ts +0 -1
  131. package/dist/api/resources/extensionConfigurations/index.js +0 -17
  132. package/dist/api/resources/requests/client/Client.d.ts +0 -34
  133. package/dist/api/resources/requests/client/Client.js +0 -115
  134. package/dist/api/resources/requests/client/index.d.ts +0 -1
  135. package/dist/api/resources/requests/client/index.js +0 -2
  136. package/dist/api/resources/requests/index.d.ts +0 -1
  137. package/dist/api/resources/requests/index.js +0 -17
  138. package/dist/api/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -29
  139. package/dist/api/resources/windows/client/requests/AsyncClickRequest.js +0 -5
  140. package/dist/api/resources/windows/client/requests/AsyncCreateAutomationRequest.d.ts +0 -23
  141. package/dist/api/resources/windows/client/requests/AsyncCreateAutomationRequest.js +0 -5
  142. package/dist/api/resources/windows/client/requests/AsyncExecuteAutomationRequest.d.ts +0 -27
  143. package/dist/api/resources/windows/client/requests/AsyncExecuteAutomationRequest.js +0 -5
  144. package/dist/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -27
  145. package/dist/api/resources/windows/client/requests/AsyncHoverRequest.js +0 -5
  146. package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -27
  147. package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.js +0 -5
  148. package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -29
  149. package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -5
  150. package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -27
  151. package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -5
  152. package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -29
  153. package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -5
  154. package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -23
  155. package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -5
  156. package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -25
  157. package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -5
  158. package/dist/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -37
  159. package/dist/api/resources/windows/client/requests/AsyncTypeRequest.js +0 -5
  160. package/dist/api/resources/windows/client/requests/SessionMonitorHandlerRequestBody.d.ts +0 -25
  161. package/dist/api/resources/windows/client/requests/SessionMonitorHandlerRequestBody.js +0 -5
  162. package/dist/api/types/AsyncConfig.d.ts +0 -7
  163. package/dist/api/types/AsyncConfig.js +0 -5
  164. package/dist/api/types/AsyncSessionAiResponseEnvelope.d.ts +0 -9
  165. package/dist/api/types/AsyncSessionAiResponseEnvelope.js +0 -5
  166. package/dist/api/types/BrowserWaitSelectorConfig.d.ts +0 -11
  167. package/dist/api/types/BrowserWaitSelectorConfig.js +0 -5
  168. package/dist/api/types/CreateAutomationRequestBodyConfiguration.d.ts +0 -4
  169. package/dist/api/types/CreateAutomationRequestBodyConfiguration.js +0 -5
  170. package/dist/api/types/ExtensionConfigurationOutput.d.ts +0 -13
  171. package/dist/api/types/ExtensionConfigurationOutput.js +0 -5
  172. package/dist/api/types/IntervalMonitorConfig.d.ts +0 -9
  173. package/dist/api/types/IntervalMonitorConfig.js +0 -5
  174. package/dist/api/types/MonitorConfig.d.ts +0 -14
  175. package/dist/api/types/MonitorConfig.js +0 -5
  176. package/dist/api/types/MonitorConfigIncludeVisualAnalysis.d.ts +0 -12
  177. package/dist/api/types/MonitorConfigIncludeVisualAnalysis.js +0 -11
  178. package/dist/api/types/MonitorConfigMonitorType.d.ts +0 -11
  179. package/dist/api/types/MonitorConfigMonitorType.js +0 -10
  180. package/dist/api/types/RequestStatusResponse.d.ts +0 -8
  181. package/dist/api/types/RequestStatusResponse.js +0 -5
  182. package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -20
  183. package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.js +0 -41
  184. package/dist/serialization/resources/windows/client/requests/AsyncCreateAutomationRequest.d.ts +0 -18
  185. package/dist/serialization/resources/windows/client/requests/AsyncCreateAutomationRequest.js +0 -39
  186. package/dist/serialization/resources/windows/client/requests/AsyncExecuteAutomationRequest.d.ts +0 -18
  187. package/dist/serialization/resources/windows/client/requests/AsyncExecuteAutomationRequest.js +0 -39
  188. package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -19
  189. package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.js +0 -40
  190. package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -20
  191. package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +0 -41
  192. package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -20
  193. package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -41
  194. package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -19
  195. package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -40
  196. package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -20
  197. package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -41
  198. package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -18
  199. package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -39
  200. package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -19
  201. package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -40
  202. package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -24
  203. package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.js +0 -45
  204. package/dist/serialization/resources/windows/client/requests/SessionMonitorHandlerRequestBody.d.ts +0 -18
  205. package/dist/serialization/resources/windows/client/requests/SessionMonitorHandlerRequestBody.js +0 -39
  206. package/dist/serialization/types/AsyncConfig.d.ts +0 -12
  207. package/dist/serialization/types/AsyncConfig.js +0 -33
  208. package/dist/serialization/types/AsyncSessionAiResponseEnvelope.d.ts +0 -15
  209. package/dist/serialization/types/AsyncSessionAiResponseEnvelope.js +0 -36
  210. package/dist/serialization/types/BrowserWaitSelectorConfig.d.ts +0 -14
  211. package/dist/serialization/types/BrowserWaitSelectorConfig.js +0 -35
  212. package/dist/serialization/types/CreateAutomationRequestBodyConfiguration.d.ts +0 -10
  213. package/dist/serialization/types/CreateAutomationRequestBodyConfiguration.js +0 -31
  214. package/dist/serialization/types/ExtensionConfigurationOutput.d.ts +0 -15
  215. package/dist/serialization/types/ExtensionConfigurationOutput.js +0 -36
  216. package/dist/serialization/types/IntervalMonitorConfig.d.ts +0 -13
  217. package/dist/serialization/types/IntervalMonitorConfig.js +0 -34
  218. package/dist/serialization/types/MonitorConfig.d.ts +0 -19
  219. package/dist/serialization/types/MonitorConfig.js +0 -40
  220. package/dist/serialization/types/MonitorConfigIncludeVisualAnalysis.d.ts +0 -10
  221. package/dist/serialization/types/MonitorConfigIncludeVisualAnalysis.js +0 -31
  222. package/dist/serialization/types/MonitorConfigMonitorType.d.ts +0 -10
  223. package/dist/serialization/types/MonitorConfigMonitorType.js +0 -31
  224. package/dist/serialization/types/RequestStatusResponse.d.ts +0 -13
  225. package/dist/serialization/types/RequestStatusResponse.js +0 -34
  226. package/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -20
  227. package/serialization/resources/windows/client/requests/AsyncClickRequest.js +0 -41
  228. package/serialization/resources/windows/client/requests/AsyncCreateAutomationRequest.d.ts +0 -18
  229. package/serialization/resources/windows/client/requests/AsyncCreateAutomationRequest.js +0 -39
  230. package/serialization/resources/windows/client/requests/AsyncExecuteAutomationRequest.d.ts +0 -18
  231. package/serialization/resources/windows/client/requests/AsyncExecuteAutomationRequest.js +0 -39
  232. package/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -19
  233. package/serialization/resources/windows/client/requests/AsyncHoverRequest.js +0 -40
  234. package/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -20
  235. package/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +0 -41
  236. package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -20
  237. package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -41
  238. package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -19
  239. package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -40
  240. package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -20
  241. package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -41
  242. package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -18
  243. package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -39
  244. package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -19
  245. package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -40
  246. package/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -24
  247. package/serialization/resources/windows/client/requests/AsyncTypeRequest.js +0 -45
  248. package/serialization/resources/windows/client/requests/SessionMonitorHandlerRequestBody.d.ts +0 -18
  249. package/serialization/resources/windows/client/requests/SessionMonitorHandlerRequestBody.js +0 -39
  250. package/serialization/types/AsyncConfig.d.ts +0 -12
  251. package/serialization/types/AsyncConfig.js +0 -33
  252. package/serialization/types/AsyncSessionAiResponseEnvelope.d.ts +0 -15
  253. package/serialization/types/AsyncSessionAiResponseEnvelope.js +0 -36
  254. package/serialization/types/BrowserWaitSelectorConfig.d.ts +0 -14
  255. package/serialization/types/BrowserWaitSelectorConfig.js +0 -35
  256. package/serialization/types/CreateAutomationRequestBodyConfiguration.d.ts +0 -10
  257. package/serialization/types/CreateAutomationRequestBodyConfiguration.js +0 -31
  258. package/serialization/types/ExtensionConfigurationOutput.d.ts +0 -15
  259. package/serialization/types/ExtensionConfigurationOutput.js +0 -36
  260. package/serialization/types/IntervalMonitorConfig.d.ts +0 -13
  261. package/serialization/types/IntervalMonitorConfig.js +0 -34
  262. package/serialization/types/MonitorConfig.d.ts +0 -19
  263. package/serialization/types/MonitorConfig.js +0 -40
  264. package/serialization/types/MonitorConfigIncludeVisualAnalysis.d.ts +0 -10
  265. package/serialization/types/MonitorConfigIncludeVisualAnalysis.js +0 -31
  266. package/serialization/types/MonitorConfigMonitorType.d.ts +0 -10
  267. package/serialization/types/MonitorConfigMonitorType.js +0 -31
  268. package/serialization/types/RequestStatusResponse.d.ts +0 -13
  269. package/serialization/types/RequestStatusResponse.js +0 -34
@@ -48,703 +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.27-beta0",
75
- "User-Agent": "@airtop/sdk/0.1.27-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.27-beta0",
138
- "User-Agent": "@airtop/sdk/0.1.27-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.27-beta0",
203
- "User-Agent": "@airtop/sdk/0.1.27-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.27-beta0",
266
- "User-Agent": "@airtop/sdk/0.1.27-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
- */
316
- asyncMonitor(sessionId, windowId, request = {}, requestOptions) {
317
- var _a, _b;
318
- return __awaiter(this, void 0, void 0, function* () {
319
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
320
- 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`),
321
- method: "POST",
322
- headers: {
323
- Authorization: yield this._getAuthorizationHeader(),
324
- "X-Fern-Language": "JavaScript",
325
- "X-Fern-SDK-Name": "@airtop/sdk",
326
- "X-Fern-SDK-Version": "0.1.27-beta0",
327
- "User-Agent": "@airtop/sdk/0.1.27-beta0",
328
- "X-Fern-Runtime": core.RUNTIME.type,
329
- "X-Fern-Runtime-Version": core.RUNTIME.version,
330
- },
331
- contentType: "application/json",
332
- requestType: "json",
333
- body: serializers.AsyncMonitorRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
334
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
335
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
336
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
337
- });
338
- if (_response.ok) {
339
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
340
- unrecognizedObjectKeys: "passthrough",
341
- allowUnrecognizedUnionMembers: true,
342
- allowUnrecognizedEnumValues: true,
343
- skipValidation: true,
344
- breadcrumbsPrefix: ["response"],
345
- });
346
- }
347
- if (_response.error.reason === "status-code") {
348
- throw new errors.AirtopError({
349
- statusCode: _response.error.statusCode,
350
- body: _response.error.body,
351
- });
352
- }
353
- switch (_response.error.reason) {
354
- case "non-json":
355
- throw new errors.AirtopError({
356
- statusCode: _response.error.statusCode,
357
- body: _response.error.rawBody,
358
- });
359
- case "timeout":
360
- throw new errors.AirtopTimeoutError();
361
- case "unknown":
362
- throw new errors.AirtopError({
363
- message: _response.error.errorMessage,
364
- });
365
- }
366
- });
367
- }
368
- /**
369
- * @param {string} sessionId - The session id for the window.
370
- * @param {string} windowId - The Airtop window id of the browser window.
371
- * @param {Airtop.AsyncPageQueryRequest} request
372
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
373
- *
374
- * @example
375
- * await client.windows.asyncPageQuery("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
376
- * prompt: "What is the main idea of this page?"
377
- * })
378
- */
379
- asyncPageQuery(sessionId, windowId, request, requestOptions) {
380
- var _a, _b;
381
- return __awaiter(this, void 0, void 0, function* () {
382
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
383
- 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`),
384
- method: "POST",
385
- headers: {
386
- Authorization: yield this._getAuthorizationHeader(),
387
- "X-Fern-Language": "JavaScript",
388
- "X-Fern-SDK-Name": "@airtop/sdk",
389
- "X-Fern-SDK-Version": "0.1.27-beta0",
390
- "User-Agent": "@airtop/sdk/0.1.27-beta0",
391
- "X-Fern-Runtime": core.RUNTIME.type,
392
- "X-Fern-Runtime-Version": core.RUNTIME.version,
393
- },
394
- contentType: "application/json",
395
- requestType: "json",
396
- body: serializers.AsyncPageQueryRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
397
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
398
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
399
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
400
- });
401
- if (_response.ok) {
402
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
403
- unrecognizedObjectKeys: "passthrough",
404
- allowUnrecognizedUnionMembers: true,
405
- allowUnrecognizedEnumValues: true,
406
- skipValidation: true,
407
- breadcrumbsPrefix: ["response"],
408
- });
409
- }
410
- if (_response.error.reason === "status-code") {
411
- throw new errors.AirtopError({
412
- statusCode: _response.error.statusCode,
413
- body: _response.error.body,
414
- });
415
- }
416
- switch (_response.error.reason) {
417
- case "non-json":
418
- throw new errors.AirtopError({
419
- statusCode: _response.error.statusCode,
420
- body: _response.error.rawBody,
421
- });
422
- case "timeout":
423
- throw new errors.AirtopTimeoutError();
424
- case "unknown":
425
- throw new errors.AirtopError({
426
- message: _response.error.errorMessage,
427
- });
428
- }
429
- });
430
- }
431
- /**
432
- * @param {string} sessionId - The session id for the window.
433
- * @param {string} windowId - The Airtop window id of the browser window.
434
- * @param {Airtop.AsyncPaginatedExtractionRequest} request
435
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
436
- *
437
- * @example
438
- * await client.windows.asyncPaginatedExtraction("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
439
- * 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."
440
- * })
441
- */
442
- asyncPaginatedExtraction(sessionId, windowId, request, requestOptions) {
443
- var _a, _b;
444
- return __awaiter(this, void 0, void 0, function* () {
445
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
446
- 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`),
447
- method: "POST",
448
- headers: {
449
- Authorization: yield this._getAuthorizationHeader(),
450
- "X-Fern-Language": "JavaScript",
451
- "X-Fern-SDK-Name": "@airtop/sdk",
452
- "X-Fern-SDK-Version": "0.1.27-beta0",
453
- "User-Agent": "@airtop/sdk/0.1.27-beta0",
454
- "X-Fern-Runtime": core.RUNTIME.type,
455
- "X-Fern-Runtime-Version": core.RUNTIME.version,
456
- },
457
- contentType: "application/json",
458
- requestType: "json",
459
- body: serializers.AsyncPaginatedExtractionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
460
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
461
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
462
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
463
- });
464
- if (_response.ok) {
465
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
466
- unrecognizedObjectKeys: "passthrough",
467
- allowUnrecognizedUnionMembers: true,
468
- allowUnrecognizedEnumValues: true,
469
- skipValidation: true,
470
- breadcrumbsPrefix: ["response"],
471
- });
472
- }
473
- if (_response.error.reason === "status-code") {
474
- throw new errors.AirtopError({
475
- statusCode: _response.error.statusCode,
476
- body: _response.error.body,
477
- });
478
- }
479
- switch (_response.error.reason) {
480
- case "non-json":
481
- throw new errors.AirtopError({
482
- statusCode: _response.error.statusCode,
483
- body: _response.error.rawBody,
484
- });
485
- case "timeout":
486
- throw new errors.AirtopTimeoutError();
487
- case "unknown":
488
- throw new errors.AirtopError({
489
- message: _response.error.errorMessage,
490
- });
491
- }
492
- });
493
- }
494
- /**
495
- * This endpoint is deprecated. Please use the `pageQuery` endpoint instead.
496
- *
497
- * @param {string} sessionId - The session id for the window.
498
- * @param {string} windowId - The Airtop window id of the browser window.
499
- * @param {Airtop.AsyncPromptContentRequest} request
500
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
501
- *
502
- * @example
503
- * await client.windows.asyncPromptContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
504
- * prompt: "What is the main idea of this page?"
505
- * })
506
- */
507
- asyncPromptContent(sessionId, windowId, request, requestOptions) {
508
- var _a, _b;
509
- return __awaiter(this, void 0, void 0, function* () {
510
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
511
- 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`),
512
- method: "POST",
513
- headers: {
514
- Authorization: yield this._getAuthorizationHeader(),
515
- "X-Fern-Language": "JavaScript",
516
- "X-Fern-SDK-Name": "@airtop/sdk",
517
- "X-Fern-SDK-Version": "0.1.27-beta0",
518
- "User-Agent": "@airtop/sdk/0.1.27-beta0",
519
- "X-Fern-Runtime": core.RUNTIME.type,
520
- "X-Fern-Runtime-Version": core.RUNTIME.version,
521
- },
522
- contentType: "application/json",
523
- requestType: "json",
524
- body: serializers.AsyncPromptContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
525
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
526
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
527
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
528
- });
529
- if (_response.ok) {
530
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
531
- unrecognizedObjectKeys: "passthrough",
532
- allowUnrecognizedUnionMembers: true,
533
- allowUnrecognizedEnumValues: true,
534
- skipValidation: true,
535
- breadcrumbsPrefix: ["response"],
536
- });
537
- }
538
- if (_response.error.reason === "status-code") {
539
- throw new errors.AirtopError({
540
- statusCode: _response.error.statusCode,
541
- body: _response.error.body,
542
- });
543
- }
544
- switch (_response.error.reason) {
545
- case "non-json":
546
- throw new errors.AirtopError({
547
- statusCode: _response.error.statusCode,
548
- body: _response.error.rawBody,
549
- });
550
- case "timeout":
551
- throw new errors.AirtopTimeoutError();
552
- case "unknown":
553
- throw new errors.AirtopError({
554
- message: _response.error.errorMessage,
555
- });
556
- }
557
- });
558
- }
559
- /**
560
- * Take a screenshot of the current viewport of a browser window asynchronously
561
- *
562
- * @param {string} sessionId - The session id for the window.
563
- * @param {string} windowId - The Airtop window id of the browser window.
564
- * @param {Airtop.AsyncScreenshotRequest} request
565
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
566
- *
567
- * @example
568
- * await client.windows.asyncScreenshot("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
569
- */
570
- asyncScreenshot(sessionId, windowId, request = {}, requestOptions) {
571
- var _a, _b;
572
- return __awaiter(this, void 0, void 0, function* () {
573
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
574
- 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`),
575
- method: "POST",
576
- headers: {
577
- Authorization: yield this._getAuthorizationHeader(),
578
- "X-Fern-Language": "JavaScript",
579
- "X-Fern-SDK-Name": "@airtop/sdk",
580
- "X-Fern-SDK-Version": "0.1.27-beta0",
581
- "User-Agent": "@airtop/sdk/0.1.27-beta0",
582
- "X-Fern-Runtime": core.RUNTIME.type,
583
- "X-Fern-Runtime-Version": core.RUNTIME.version,
584
- },
585
- contentType: "application/json",
586
- requestType: "json",
587
- body: serializers.AsyncScreenshotRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
588
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
589
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
590
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
591
- });
592
- if (_response.ok) {
593
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
594
- unrecognizedObjectKeys: "passthrough",
595
- allowUnrecognizedUnionMembers: true,
596
- allowUnrecognizedEnumValues: true,
597
- skipValidation: true,
598
- breadcrumbsPrefix: ["response"],
599
- });
600
- }
601
- if (_response.error.reason === "status-code") {
602
- throw new errors.AirtopError({
603
- statusCode: _response.error.statusCode,
604
- body: _response.error.body,
605
- });
606
- }
607
- switch (_response.error.reason) {
608
- case "non-json":
609
- throw new errors.AirtopError({
610
- statusCode: _response.error.statusCode,
611
- body: _response.error.rawBody,
612
- });
613
- case "timeout":
614
- throw new errors.AirtopTimeoutError();
615
- case "unknown":
616
- throw new errors.AirtopError({
617
- message: _response.error.errorMessage,
618
- });
619
- }
620
- });
621
- }
622
- /**
623
- * This endpoint is deprecated. Please use the `pageQuery` endpoint and ask for a summary in the prompt instead.
624
- *
625
- * @param {string} sessionId - The session id for the window.
626
- * @param {string} windowId - The Airtop window id of the browser window to summarize.
627
- * @param {Airtop.AsyncSummarizeContentRequest} request
628
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
629
- *
630
- * @example
631
- * await client.windows.asyncSummarizeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
632
- */
633
- asyncSummarizeContent(sessionId, windowId, request = {}, requestOptions) {
634
- var _a, _b;
635
- return __awaiter(this, void 0, void 0, function* () {
636
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
637
- 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`),
638
- method: "POST",
639
- headers: {
640
- Authorization: yield this._getAuthorizationHeader(),
641
- "X-Fern-Language": "JavaScript",
642
- "X-Fern-SDK-Name": "@airtop/sdk",
643
- "X-Fern-SDK-Version": "0.1.27-beta0",
644
- "User-Agent": "@airtop/sdk/0.1.27-beta0",
645
- "X-Fern-Runtime": core.RUNTIME.type,
646
- "X-Fern-Runtime-Version": core.RUNTIME.version,
647
- },
648
- contentType: "application/json",
649
- requestType: "json",
650
- body: serializers.AsyncSummarizeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
651
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
652
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
653
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
654
- });
655
- if (_response.ok) {
656
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
657
- unrecognizedObjectKeys: "passthrough",
658
- allowUnrecognizedUnionMembers: true,
659
- allowUnrecognizedEnumValues: true,
660
- skipValidation: true,
661
- breadcrumbsPrefix: ["response"],
662
- });
663
- }
664
- if (_response.error.reason === "status-code") {
665
- throw new errors.AirtopError({
666
- statusCode: _response.error.statusCode,
667
- body: _response.error.body,
668
- });
669
- }
670
- switch (_response.error.reason) {
671
- case "non-json":
672
- throw new errors.AirtopError({
673
- statusCode: _response.error.statusCode,
674
- body: _response.error.rawBody,
675
- });
676
- case "timeout":
677
- throw new errors.AirtopTimeoutError();
678
- case "unknown":
679
- throw new errors.AirtopError({
680
- message: _response.error.errorMessage,
681
- });
682
- }
683
- });
684
- }
685
- /**
686
- * @param {string} sessionId - The session id for the window.
687
- * @param {string} windowId - The Airtop window id of the browser window.
688
- * @param {Airtop.AsyncTypeRequest} request
689
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
690
- *
691
- * @example
692
- * await client.windows.asyncType("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
693
- * text: "Example text"
694
- * })
695
- */
696
- asyncType(sessionId, windowId, request, requestOptions) {
697
- var _a, _b;
698
- return __awaiter(this, void 0, void 0, function* () {
699
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
700
- 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`),
701
- method: "POST",
702
- headers: {
703
- Authorization: yield this._getAuthorizationHeader(),
704
- "X-Fern-Language": "JavaScript",
705
- "X-Fern-SDK-Name": "@airtop/sdk",
706
- "X-Fern-SDK-Version": "0.1.27-beta0",
707
- "User-Agent": "@airtop/sdk/0.1.27-beta0",
708
- "X-Fern-Runtime": core.RUNTIME.type,
709
- "X-Fern-Runtime-Version": core.RUNTIME.version,
710
- },
711
- contentType: "application/json",
712
- requestType: "json",
713
- body: serializers.AsyncTypeRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
714
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
715
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
716
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
717
- });
718
- if (_response.ok) {
719
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
720
- unrecognizedObjectKeys: "passthrough",
721
- allowUnrecognizedUnionMembers: true,
722
- allowUnrecognizedEnumValues: true,
723
- skipValidation: true,
724
- breadcrumbsPrefix: ["response"],
725
- });
726
- }
727
- if (_response.error.reason === "status-code") {
728
- throw new errors.AirtopError({
729
- statusCode: _response.error.statusCode,
730
- body: _response.error.body,
731
- });
732
- }
733
- switch (_response.error.reason) {
734
- case "non-json":
735
- throw new errors.AirtopError({
736
- statusCode: _response.error.statusCode,
737
- body: _response.error.rawBody,
738
- });
739
- case "timeout":
740
- throw new errors.AirtopTimeoutError();
741
- case "unknown":
742
- throw new errors.AirtopError({
743
- message: _response.error.errorMessage,
744
- });
745
- }
746
- });
747
- }
748
51
  /**
749
52
  * Creates a new browser window in a session. Optionally, you can specify a url to load on the window upon creation.
750
53
  *
@@ -765,8 +68,8 @@ class Windows {
765
68
  Authorization: yield this._getAuthorizationHeader(),
766
69
  "X-Fern-Language": "JavaScript",
767
70
  "X-Fern-SDK-Name": "@airtop/sdk",
768
- "X-Fern-SDK-Version": "0.1.27-beta0",
769
- "User-Agent": "@airtop/sdk/0.1.27-beta0",
71
+ "X-Fern-SDK-Version": "0.1.27",
72
+ "User-Agent": "@airtop/sdk/0.1.27",
770
73
  "X-Fern-Runtime": core.RUNTIME.type,
771
74
  "X-Fern-Runtime-Version": core.RUNTIME.version,
772
75
  },
@@ -841,8 +144,8 @@ class Windows {
841
144
  Authorization: yield this._getAuthorizationHeader(),
842
145
  "X-Fern-Language": "JavaScript",
843
146
  "X-Fern-SDK-Name": "@airtop/sdk",
844
- "X-Fern-SDK-Version": "0.1.27-beta0",
845
- "User-Agent": "@airtop/sdk/0.1.27-beta0",
147
+ "X-Fern-SDK-Version": "0.1.27",
148
+ "User-Agent": "@airtop/sdk/0.1.27",
846
149
  "X-Fern-Runtime": core.RUNTIME.type,
847
150
  "X-Fern-Runtime-Version": core.RUNTIME.version,
848
151
  },
@@ -906,8 +209,8 @@ class Windows {
906
209
  Authorization: yield this._getAuthorizationHeader(),
907
210
  "X-Fern-Language": "JavaScript",
908
211
  "X-Fern-SDK-Name": "@airtop/sdk",
909
- "X-Fern-SDK-Version": "0.1.27-beta0",
910
- "User-Agent": "@airtop/sdk/0.1.27-beta0",
212
+ "X-Fern-SDK-Version": "0.1.27",
213
+ "User-Agent": "@airtop/sdk/0.1.27",
911
214
  "X-Fern-Runtime": core.RUNTIME.type,
912
215
  "X-Fern-Runtime-Version": core.RUNTIME.version,
913
216
  },
@@ -968,8 +271,8 @@ class Windows {
968
271
  Authorization: yield this._getAuthorizationHeader(),
969
272
  "X-Fern-Language": "JavaScript",
970
273
  "X-Fern-SDK-Name": "@airtop/sdk",
971
- "X-Fern-SDK-Version": "0.1.27-beta0",
972
- "User-Agent": "@airtop/sdk/0.1.27-beta0",
274
+ "X-Fern-SDK-Version": "0.1.27",
275
+ "User-Agent": "@airtop/sdk/0.1.27",
973
276
  "X-Fern-Runtime": core.RUNTIME.type,
974
277
  "X-Fern-Runtime-Version": core.RUNTIME.version,
975
278
  },
@@ -1032,8 +335,8 @@ class Windows {
1032
335
  Authorization: yield this._getAuthorizationHeader(),
1033
336
  "X-Fern-Language": "JavaScript",
1034
337
  "X-Fern-SDK-Name": "@airtop/sdk",
1035
- "X-Fern-SDK-Version": "0.1.27-beta0",
1036
- "User-Agent": "@airtop/sdk/0.1.27-beta0",
338
+ "X-Fern-SDK-Version": "0.1.27",
339
+ "User-Agent": "@airtop/sdk/0.1.27",
1037
340
  "X-Fern-Runtime": core.RUNTIME.type,
1038
341
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1039
342
  },
@@ -1097,8 +400,8 @@ class Windows {
1097
400
  Authorization: yield this._getAuthorizationHeader(),
1098
401
  "X-Fern-Language": "JavaScript",
1099
402
  "X-Fern-SDK-Name": "@airtop/sdk",
1100
- "X-Fern-SDK-Version": "0.1.27-beta0",
1101
- "User-Agent": "@airtop/sdk/0.1.27-beta0",
403
+ "X-Fern-SDK-Version": "0.1.27",
404
+ "User-Agent": "@airtop/sdk/0.1.27",
1102
405
  "X-Fern-Runtime": core.RUNTIME.type,
1103
406
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1104
407
  },
@@ -1139,69 +442,6 @@ class Windows {
1139
442
  }
1140
443
  });
1141
444
  }
1142
- /**
1143
- * @param {string} sessionId - The session id for the window.
1144
- * @param {string} windowId - The Airtop window id of the browser window.
1145
- * @param {Airtop.SessionMonitorHandlerRequestBody} request
1146
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
1147
- *
1148
- * @example
1149
- * await client.windows.monitor("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
1150
- */
1151
- monitor(sessionId, windowId, request = {}, requestOptions) {
1152
- var _a, _b;
1153
- return __awaiter(this, void 0, void 0, function* () {
1154
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1155
- 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`),
1156
- method: "POST",
1157
- headers: {
1158
- Authorization: yield this._getAuthorizationHeader(),
1159
- "X-Fern-Language": "JavaScript",
1160
- "X-Fern-SDK-Name": "@airtop/sdk",
1161
- "X-Fern-SDK-Version": "0.1.27-beta0",
1162
- "User-Agent": "@airtop/sdk/0.1.27-beta0",
1163
- "X-Fern-Runtime": core.RUNTIME.type,
1164
- "X-Fern-Runtime-Version": core.RUNTIME.version,
1165
- },
1166
- contentType: "application/json",
1167
- requestType: "json",
1168
- body: serializers.SessionMonitorHandlerRequestBody.jsonOrThrow(request, {
1169
- unrecognizedObjectKeys: "strip",
1170
- }),
1171
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1172
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1173
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1174
- });
1175
- if (_response.ok) {
1176
- return serializers.AiPromptResponse.parseOrThrow(_response.body, {
1177
- unrecognizedObjectKeys: "passthrough",
1178
- allowUnrecognizedUnionMembers: true,
1179
- allowUnrecognizedEnumValues: true,
1180
- skipValidation: true,
1181
- breadcrumbsPrefix: ["response"],
1182
- });
1183
- }
1184
- if (_response.error.reason === "status-code") {
1185
- throw new errors.AirtopError({
1186
- statusCode: _response.error.statusCode,
1187
- body: _response.error.body,
1188
- });
1189
- }
1190
- switch (_response.error.reason) {
1191
- case "non-json":
1192
- throw new errors.AirtopError({
1193
- statusCode: _response.error.statusCode,
1194
- body: _response.error.rawBody,
1195
- });
1196
- case "timeout":
1197
- throw new errors.AirtopTimeoutError();
1198
- case "unknown":
1199
- throw new errors.AirtopError({
1200
- message: _response.error.errorMessage,
1201
- });
1202
- }
1203
- });
1204
- }
1205
445
  /**
1206
446
  * Submit a prompt that queries the content of a specific browser window. You may extract content from the page, or ask a question about the page and allow the AI to answer it (ex. Is the user logged in?).
1207
447
  *
@@ -1225,8 +465,8 @@ class Windows {
1225
465
  Authorization: yield this._getAuthorizationHeader(),
1226
466
  "X-Fern-Language": "JavaScript",
1227
467
  "X-Fern-SDK-Name": "@airtop/sdk",
1228
- "X-Fern-SDK-Version": "0.1.27-beta0",
1229
- "User-Agent": "@airtop/sdk/0.1.27-beta0",
468
+ "X-Fern-SDK-Version": "0.1.27",
469
+ "User-Agent": "@airtop/sdk/0.1.27",
1230
470
  "X-Fern-Runtime": core.RUNTIME.type,
1231
471
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1232
472
  },
@@ -1292,8 +532,8 @@ class Windows {
1292
532
  Authorization: yield this._getAuthorizationHeader(),
1293
533
  "X-Fern-Language": "JavaScript",
1294
534
  "X-Fern-SDK-Name": "@airtop/sdk",
1295
- "X-Fern-SDK-Version": "0.1.27-beta0",
1296
- "User-Agent": "@airtop/sdk/0.1.27-beta0",
535
+ "X-Fern-SDK-Version": "0.1.27",
536
+ "User-Agent": "@airtop/sdk/0.1.27",
1297
537
  "X-Fern-Runtime": core.RUNTIME.type,
1298
538
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1299
539
  },
@@ -1359,8 +599,8 @@ class Windows {
1359
599
  Authorization: yield this._getAuthorizationHeader(),
1360
600
  "X-Fern-Language": "JavaScript",
1361
601
  "X-Fern-SDK-Name": "@airtop/sdk",
1362
- "X-Fern-SDK-Version": "0.1.27-beta0",
1363
- "User-Agent": "@airtop/sdk/0.1.27-beta0",
602
+ "X-Fern-SDK-Version": "0.1.27",
603
+ "User-Agent": "@airtop/sdk/0.1.27",
1364
604
  "X-Fern-Runtime": core.RUNTIME.type,
1365
605
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1366
606
  },
@@ -1424,8 +664,8 @@ class Windows {
1424
664
  Authorization: yield this._getAuthorizationHeader(),
1425
665
  "X-Fern-Language": "JavaScript",
1426
666
  "X-Fern-SDK-Name": "@airtop/sdk",
1427
- "X-Fern-SDK-Version": "0.1.27-beta0",
1428
- "User-Agent": "@airtop/sdk/0.1.27-beta0",
667
+ "X-Fern-SDK-Version": "0.1.27",
668
+ "User-Agent": "@airtop/sdk/0.1.27",
1429
669
  "X-Fern-Runtime": core.RUNTIME.type,
1430
670
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1431
671
  },
@@ -1487,8 +727,8 @@ class Windows {
1487
727
  Authorization: yield this._getAuthorizationHeader(),
1488
728
  "X-Fern-Language": "JavaScript",
1489
729
  "X-Fern-SDK-Name": "@airtop/sdk",
1490
- "X-Fern-SDK-Version": "0.1.27-beta0",
1491
- "User-Agent": "@airtop/sdk/0.1.27-beta0",
730
+ "X-Fern-SDK-Version": "0.1.27",
731
+ "User-Agent": "@airtop/sdk/0.1.27",
1492
732
  "X-Fern-Runtime": core.RUNTIME.type,
1493
733
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1494
734
  },
@@ -1552,8 +792,8 @@ class Windows {
1552
792
  Authorization: yield this._getAuthorizationHeader(),
1553
793
  "X-Fern-Language": "JavaScript",
1554
794
  "X-Fern-SDK-Name": "@airtop/sdk",
1555
- "X-Fern-SDK-Version": "0.1.27-beta0",
1556
- "User-Agent": "@airtop/sdk/0.1.27-beta0",
795
+ "X-Fern-SDK-Version": "0.1.27",
796
+ "User-Agent": "@airtop/sdk/0.1.27",
1557
797
  "X-Fern-Runtime": core.RUNTIME.type,
1558
798
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1559
799
  },
@@ -1615,8 +855,8 @@ class Windows {
1615
855
  Authorization: yield this._getAuthorizationHeader(),
1616
856
  "X-Fern-Language": "JavaScript",
1617
857
  "X-Fern-SDK-Name": "@airtop/sdk",
1618
- "X-Fern-SDK-Version": "0.1.27-beta0",
1619
- "User-Agent": "@airtop/sdk/0.1.27-beta0",
858
+ "X-Fern-SDK-Version": "0.1.27",
859
+ "User-Agent": "@airtop/sdk/0.1.27",
1620
860
  "X-Fern-Runtime": core.RUNTIME.type,
1621
861
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1622
862
  },
@@ -1682,8 +922,8 @@ class Windows {
1682
922
  Authorization: yield this._getAuthorizationHeader(),
1683
923
  "X-Fern-Language": "JavaScript",
1684
924
  "X-Fern-SDK-Name": "@airtop/sdk",
1685
- "X-Fern-SDK-Version": "0.1.27-beta0",
1686
- "User-Agent": "@airtop/sdk/0.1.27-beta0",
925
+ "X-Fern-SDK-Version": "0.1.27",
926
+ "User-Agent": "@airtop/sdk/0.1.27",
1687
927
  "X-Fern-Runtime": core.RUNTIME.type,
1688
928
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1689
929
  },