@airtop/sdk 0.1.16-beta0 → 0.1.16

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 (243) 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.d.ts +2 -2
  8. package/api/resources/sessions/client/Client.js +17 -17
  9. package/api/resources/sessions/types/SessionsEventsResponse.d.ts +4 -4
  10. package/api/resources/sessions/types/index.d.ts +1 -1
  11. package/api/resources/sessions/types/index.js +1 -1
  12. package/api/resources/windows/client/Client.d.ts +0 -116
  13. package/api/resources/windows/client/Client.js +26 -654
  14. package/api/resources/windows/client/requests/index.d.ts +0 -10
  15. package/api/types/SessionConfigV1.d.ts +2 -2
  16. package/api/types/index.d.ts +0 -9
  17. package/api/types/index.js +0 -9
  18. package/dist/Client.d.ts +0 -6
  19. package/dist/Client.js +4 -14
  20. package/dist/api/resources/index.d.ts +0 -3
  21. package/dist/api/resources/index.js +1 -4
  22. package/dist/api/resources/profiles/client/Client.js +2 -2
  23. package/dist/api/resources/sessions/client/Client.d.ts +2 -2
  24. package/dist/api/resources/sessions/client/Client.js +17 -17
  25. package/dist/api/resources/sessions/types/SessionsEventsResponse.d.ts +4 -4
  26. package/dist/api/resources/sessions/types/index.d.ts +1 -1
  27. package/dist/api/resources/sessions/types/index.js +1 -1
  28. package/dist/api/resources/windows/client/Client.d.ts +0 -116
  29. package/dist/api/resources/windows/client/Client.js +26 -654
  30. package/dist/api/resources/windows/client/requests/index.d.ts +0 -10
  31. package/dist/api/types/SessionConfigV1.d.ts +2 -2
  32. package/dist/api/types/index.d.ts +0 -9
  33. package/dist/api/types/index.js +0 -9
  34. package/dist/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +5 -5
  35. package/dist/serialization/resources/sessions/types/SessionsEventsResponse.js +2 -2
  36. package/dist/serialization/resources/sessions/types/index.d.ts +1 -1
  37. package/dist/serialization/resources/sessions/types/index.js +1 -1
  38. package/dist/serialization/resources/windows/client/requests/index.d.ts +0 -10
  39. package/dist/serialization/resources/windows/client/requests/index.js +1 -21
  40. package/dist/serialization/types/index.d.ts +0 -9
  41. package/dist/serialization/types/index.js +0 -9
  42. package/dist/wrapper/AirtopClient.d.ts +0 -1
  43. package/dist/wrapper/AirtopClient.js +0 -3
  44. package/dist/wrapper/AirtopWindows.d.ts +0 -10
  45. package/dist/wrapper/AirtopWindows.js +0 -17
  46. package/package.json +1 -1
  47. package/reference.md +2 -898
  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 -10
  53. package/serialization/resources/windows/client/requests/index.js +1 -21
  54. package/serialization/types/index.d.ts +0 -9
  55. package/serialization/types/index.js +0 -9
  56. package/wrapper/AirtopClient.d.ts +0 -1
  57. package/wrapper/AirtopClient.js +0 -3
  58. package/wrapper/AirtopWindows.d.ts +0 -10
  59. package/wrapper/AirtopWindows.js +0 -17
  60. package/api/resources/extensionConfigurations/client/Client.d.ts +0 -50
  61. package/api/resources/extensionConfigurations/client/Client.js +0 -214
  62. package/api/resources/extensionConfigurations/client/index.d.ts +0 -1
  63. package/api/resources/extensionConfigurations/client/index.js +0 -17
  64. package/api/resources/extensionConfigurations/client/requests/ExtensionConfigurationDeleteRequest.d.ts +0 -13
  65. package/api/resources/extensionConfigurations/client/requests/ExtensionConfigurationDeleteRequest.js +0 -5
  66. package/api/resources/extensionConfigurations/client/requests/index.d.ts +0 -1
  67. package/api/resources/extensionConfigurations/client/requests/index.js +0 -2
  68. package/api/resources/extensionConfigurations/index.d.ts +0 -1
  69. package/api/resources/extensionConfigurations/index.js +0 -17
  70. package/api/resources/requests/client/Client.d.ts +0 -34
  71. package/api/resources/requests/client/Client.js +0 -115
  72. package/api/resources/requests/client/index.d.ts +0 -1
  73. package/api/resources/requests/client/index.js +0 -2
  74. package/api/resources/requests/index.d.ts +0 -1
  75. package/api/resources/requests/index.js +0 -17
  76. package/api/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -29
  77. package/api/resources/windows/client/requests/AsyncClickRequest.js +0 -5
  78. package/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -25
  79. package/api/resources/windows/client/requests/AsyncHoverRequest.js +0 -5
  80. package/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -27
  81. package/api/resources/windows/client/requests/AsyncMonitorRequest.js +0 -5
  82. package/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -29
  83. package/api/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -5
  84. package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -25
  85. package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -5
  86. package/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -29
  87. package/api/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -5
  88. package/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -23
  89. package/api/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -5
  90. package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -25
  91. package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -5
  92. package/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -37
  93. package/api/resources/windows/client/requests/AsyncTypeRequest.js +0 -5
  94. package/api/resources/windows/client/requests/SessionMonitorHandlerRequestBody.d.ts +0 -25
  95. package/api/resources/windows/client/requests/SessionMonitorHandlerRequestBody.js +0 -5
  96. package/api/types/AsyncConfig.d.ts +0 -7
  97. package/api/types/AsyncConfig.js +0 -5
  98. package/api/types/AsyncSessionAiResponseEnvelope.d.ts +0 -9
  99. package/api/types/AsyncSessionAiResponseEnvelope.js +0 -5
  100. package/api/types/BrowserWaitSelectorConfig.d.ts +0 -11
  101. package/api/types/BrowserWaitSelectorConfig.js +0 -5
  102. package/api/types/ExtensionConfigurationOutput.d.ts +0 -13
  103. package/api/types/ExtensionConfigurationOutput.js +0 -5
  104. package/api/types/IntervalMonitorConfig.d.ts +0 -9
  105. package/api/types/IntervalMonitorConfig.js +0 -5
  106. package/api/types/MonitorConfig.d.ts +0 -14
  107. package/api/types/MonitorConfig.js +0 -5
  108. package/api/types/MonitorConfigIncludeVisualAnalysis.d.ts +0 -12
  109. package/api/types/MonitorConfigIncludeVisualAnalysis.js +0 -11
  110. package/api/types/MonitorConfigMonitorType.d.ts +0 -11
  111. package/api/types/MonitorConfigMonitorType.js +0 -10
  112. package/api/types/RequestStatusResponse.d.ts +0 -8
  113. package/api/types/RequestStatusResponse.js +0 -5
  114. package/dist/api/resources/extensionConfigurations/client/Client.d.ts +0 -50
  115. package/dist/api/resources/extensionConfigurations/client/Client.js +0 -214
  116. package/dist/api/resources/extensionConfigurations/client/index.d.ts +0 -1
  117. package/dist/api/resources/extensionConfigurations/client/index.js +0 -17
  118. package/dist/api/resources/extensionConfigurations/client/requests/ExtensionConfigurationDeleteRequest.d.ts +0 -13
  119. package/dist/api/resources/extensionConfigurations/client/requests/ExtensionConfigurationDeleteRequest.js +0 -5
  120. package/dist/api/resources/extensionConfigurations/client/requests/index.d.ts +0 -1
  121. package/dist/api/resources/extensionConfigurations/client/requests/index.js +0 -2
  122. package/dist/api/resources/extensionConfigurations/index.d.ts +0 -1
  123. package/dist/api/resources/extensionConfigurations/index.js +0 -17
  124. package/dist/api/resources/requests/client/Client.d.ts +0 -34
  125. package/dist/api/resources/requests/client/Client.js +0 -115
  126. package/dist/api/resources/requests/client/index.d.ts +0 -1
  127. package/dist/api/resources/requests/client/index.js +0 -2
  128. package/dist/api/resources/requests/index.d.ts +0 -1
  129. package/dist/api/resources/requests/index.js +0 -17
  130. package/dist/api/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -29
  131. package/dist/api/resources/windows/client/requests/AsyncClickRequest.js +0 -5
  132. package/dist/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -25
  133. package/dist/api/resources/windows/client/requests/AsyncHoverRequest.js +0 -5
  134. package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -27
  135. package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.js +0 -5
  136. package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -29
  137. package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -5
  138. package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -25
  139. package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -5
  140. package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -29
  141. package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -5
  142. package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -23
  143. package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -5
  144. package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -25
  145. package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -5
  146. package/dist/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -37
  147. package/dist/api/resources/windows/client/requests/AsyncTypeRequest.js +0 -5
  148. package/dist/api/resources/windows/client/requests/SessionMonitorHandlerRequestBody.d.ts +0 -25
  149. package/dist/api/resources/windows/client/requests/SessionMonitorHandlerRequestBody.js +0 -5
  150. package/dist/api/types/AsyncConfig.d.ts +0 -7
  151. package/dist/api/types/AsyncConfig.js +0 -5
  152. package/dist/api/types/AsyncSessionAiResponseEnvelope.d.ts +0 -9
  153. package/dist/api/types/AsyncSessionAiResponseEnvelope.js +0 -5
  154. package/dist/api/types/BrowserWaitSelectorConfig.d.ts +0 -11
  155. package/dist/api/types/BrowserWaitSelectorConfig.js +0 -5
  156. package/dist/api/types/ExtensionConfigurationOutput.d.ts +0 -13
  157. package/dist/api/types/ExtensionConfigurationOutput.js +0 -5
  158. package/dist/api/types/IntervalMonitorConfig.d.ts +0 -9
  159. package/dist/api/types/IntervalMonitorConfig.js +0 -5
  160. package/dist/api/types/MonitorConfig.d.ts +0 -14
  161. package/dist/api/types/MonitorConfig.js +0 -5
  162. package/dist/api/types/MonitorConfigIncludeVisualAnalysis.d.ts +0 -12
  163. package/dist/api/types/MonitorConfigIncludeVisualAnalysis.js +0 -11
  164. package/dist/api/types/MonitorConfigMonitorType.d.ts +0 -11
  165. package/dist/api/types/MonitorConfigMonitorType.js +0 -10
  166. package/dist/api/types/RequestStatusResponse.d.ts +0 -8
  167. package/dist/api/types/RequestStatusResponse.js +0 -5
  168. package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -20
  169. package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.js +0 -41
  170. package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -19
  171. package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.js +0 -40
  172. package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -20
  173. package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +0 -41
  174. package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -20
  175. package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -41
  176. package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -19
  177. package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -40
  178. package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -20
  179. package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -41
  180. package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -18
  181. package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -39
  182. package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -19
  183. package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -40
  184. package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -24
  185. package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.js +0 -45
  186. package/dist/serialization/resources/windows/client/requests/SessionMonitorHandlerRequestBody.d.ts +0 -18
  187. package/dist/serialization/resources/windows/client/requests/SessionMonitorHandlerRequestBody.js +0 -39
  188. package/dist/serialization/types/AsyncConfig.d.ts +0 -12
  189. package/dist/serialization/types/AsyncConfig.js +0 -33
  190. package/dist/serialization/types/AsyncSessionAiResponseEnvelope.d.ts +0 -15
  191. package/dist/serialization/types/AsyncSessionAiResponseEnvelope.js +0 -36
  192. package/dist/serialization/types/BrowserWaitSelectorConfig.d.ts +0 -14
  193. package/dist/serialization/types/BrowserWaitSelectorConfig.js +0 -35
  194. package/dist/serialization/types/ExtensionConfigurationOutput.d.ts +0 -15
  195. package/dist/serialization/types/ExtensionConfigurationOutput.js +0 -36
  196. package/dist/serialization/types/IntervalMonitorConfig.d.ts +0 -13
  197. package/dist/serialization/types/IntervalMonitorConfig.js +0 -34
  198. package/dist/serialization/types/MonitorConfig.d.ts +0 -19
  199. package/dist/serialization/types/MonitorConfig.js +0 -40
  200. package/dist/serialization/types/MonitorConfigIncludeVisualAnalysis.d.ts +0 -10
  201. package/dist/serialization/types/MonitorConfigIncludeVisualAnalysis.js +0 -31
  202. package/dist/serialization/types/MonitorConfigMonitorType.d.ts +0 -10
  203. package/dist/serialization/types/MonitorConfigMonitorType.js +0 -31
  204. package/dist/serialization/types/RequestStatusResponse.d.ts +0 -13
  205. package/dist/serialization/types/RequestStatusResponse.js +0 -34
  206. package/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -20
  207. package/serialization/resources/windows/client/requests/AsyncClickRequest.js +0 -41
  208. package/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -19
  209. package/serialization/resources/windows/client/requests/AsyncHoverRequest.js +0 -40
  210. package/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -20
  211. package/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +0 -41
  212. package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -20
  213. package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -41
  214. package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -19
  215. package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -40
  216. package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -20
  217. package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -41
  218. package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -18
  219. package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -39
  220. package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -19
  221. package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -40
  222. package/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -24
  223. package/serialization/resources/windows/client/requests/AsyncTypeRequest.js +0 -45
  224. package/serialization/resources/windows/client/requests/SessionMonitorHandlerRequestBody.d.ts +0 -18
  225. package/serialization/resources/windows/client/requests/SessionMonitorHandlerRequestBody.js +0 -39
  226. package/serialization/types/AsyncConfig.d.ts +0 -12
  227. package/serialization/types/AsyncConfig.js +0 -33
  228. package/serialization/types/AsyncSessionAiResponseEnvelope.d.ts +0 -15
  229. package/serialization/types/AsyncSessionAiResponseEnvelope.js +0 -36
  230. package/serialization/types/BrowserWaitSelectorConfig.d.ts +0 -14
  231. package/serialization/types/BrowserWaitSelectorConfig.js +0 -35
  232. package/serialization/types/ExtensionConfigurationOutput.d.ts +0 -15
  233. package/serialization/types/ExtensionConfigurationOutput.js +0 -36
  234. package/serialization/types/IntervalMonitorConfig.d.ts +0 -13
  235. package/serialization/types/IntervalMonitorConfig.js +0 -34
  236. package/serialization/types/MonitorConfig.d.ts +0 -19
  237. package/serialization/types/MonitorConfig.js +0 -40
  238. package/serialization/types/MonitorConfigIncludeVisualAnalysis.d.ts +0 -10
  239. package/serialization/types/MonitorConfigIncludeVisualAnalysis.js +0 -31
  240. package/serialization/types/MonitorConfigMonitorType.d.ts +0 -10
  241. package/serialization/types/MonitorConfigMonitorType.js +0 -31
  242. package/serialization/types/RequestStatusResponse.d.ts +0 -13
  243. package/serialization/types/RequestStatusResponse.js +0 -34
@@ -48,571 +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.16-beta0",
75
- "User-Agent": "@airtop/sdk/0.1.16-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
- * @param {string} sessionId - The session id for the window.
118
- * @param {string} windowId - The Airtop window id of the browser window.
119
- * @param {Airtop.AsyncHoverRequest} request
120
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
121
- *
122
- * @example
123
- * await client.windows.asyncHover("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
124
- */
125
- asyncHover(sessionId, windowId, request = {}, requestOptions) {
126
- var _a, _b;
127
- return __awaiter(this, void 0, void 0, function* () {
128
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
129
- 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`),
130
- method: "POST",
131
- headers: {
132
- Authorization: yield this._getAuthorizationHeader(),
133
- "X-Fern-Language": "JavaScript",
134
- "X-Fern-SDK-Name": "@airtop/sdk",
135
- "X-Fern-SDK-Version": "0.1.16-beta0",
136
- "User-Agent": "@airtop/sdk/0.1.16-beta0",
137
- "X-Fern-Runtime": core.RUNTIME.type,
138
- "X-Fern-Runtime-Version": core.RUNTIME.version,
139
- },
140
- contentType: "application/json",
141
- requestType: "json",
142
- body: serializers.AsyncHoverRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
143
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
144
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
145
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
146
- });
147
- if (_response.ok) {
148
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
149
- unrecognizedObjectKeys: "passthrough",
150
- allowUnrecognizedUnionMembers: true,
151
- allowUnrecognizedEnumValues: true,
152
- skipValidation: true,
153
- breadcrumbsPrefix: ["response"],
154
- });
155
- }
156
- if (_response.error.reason === "status-code") {
157
- throw new errors.AirtopError({
158
- statusCode: _response.error.statusCode,
159
- body: _response.error.body,
160
- });
161
- }
162
- switch (_response.error.reason) {
163
- case "non-json":
164
- throw new errors.AirtopError({
165
- statusCode: _response.error.statusCode,
166
- body: _response.error.rawBody,
167
- });
168
- case "timeout":
169
- throw new errors.AirtopTimeoutError();
170
- case "unknown":
171
- throw new errors.AirtopError({
172
- message: _response.error.errorMessage,
173
- });
174
- }
175
- });
176
- }
177
- /**
178
- * @param {string} sessionId - The session id for the window.
179
- * @param {string} windowId - The Airtop window id of the browser window.
180
- * @param {Airtop.AsyncMonitorRequest} request
181
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
182
- *
183
- * @example
184
- * await client.windows.asyncMonitor("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
185
- */
186
- asyncMonitor(sessionId, windowId, request = {}, requestOptions) {
187
- var _a, _b;
188
- return __awaiter(this, void 0, void 0, function* () {
189
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
190
- 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`),
191
- method: "POST",
192
- headers: {
193
- Authorization: yield this._getAuthorizationHeader(),
194
- "X-Fern-Language": "JavaScript",
195
- "X-Fern-SDK-Name": "@airtop/sdk",
196
- "X-Fern-SDK-Version": "0.1.16-beta0",
197
- "User-Agent": "@airtop/sdk/0.1.16-beta0",
198
- "X-Fern-Runtime": core.RUNTIME.type,
199
- "X-Fern-Runtime-Version": core.RUNTIME.version,
200
- },
201
- contentType: "application/json",
202
- requestType: "json",
203
- body: serializers.AsyncMonitorRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
204
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
205
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
206
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
207
- });
208
- if (_response.ok) {
209
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
210
- unrecognizedObjectKeys: "passthrough",
211
- allowUnrecognizedUnionMembers: true,
212
- allowUnrecognizedEnumValues: true,
213
- skipValidation: true,
214
- breadcrumbsPrefix: ["response"],
215
- });
216
- }
217
- if (_response.error.reason === "status-code") {
218
- throw new errors.AirtopError({
219
- statusCode: _response.error.statusCode,
220
- body: _response.error.body,
221
- });
222
- }
223
- switch (_response.error.reason) {
224
- case "non-json":
225
- throw new errors.AirtopError({
226
- statusCode: _response.error.statusCode,
227
- body: _response.error.rawBody,
228
- });
229
- case "timeout":
230
- throw new errors.AirtopTimeoutError();
231
- case "unknown":
232
- throw new errors.AirtopError({
233
- message: _response.error.errorMessage,
234
- });
235
- }
236
- });
237
- }
238
- /**
239
- * @param {string} sessionId - The session id for the window.
240
- * @param {string} windowId - The Airtop window id of the browser window.
241
- * @param {Airtop.AsyncPageQueryRequest} request
242
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
243
- *
244
- * @example
245
- * await client.windows.asyncPageQuery("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
246
- * prompt: "What is the main idea of this page?"
247
- * })
248
- */
249
- asyncPageQuery(sessionId, windowId, request, requestOptions) {
250
- var _a, _b;
251
- return __awaiter(this, void 0, void 0, function* () {
252
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
253
- 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`),
254
- method: "POST",
255
- headers: {
256
- Authorization: yield this._getAuthorizationHeader(),
257
- "X-Fern-Language": "JavaScript",
258
- "X-Fern-SDK-Name": "@airtop/sdk",
259
- "X-Fern-SDK-Version": "0.1.16-beta0",
260
- "User-Agent": "@airtop/sdk/0.1.16-beta0",
261
- "X-Fern-Runtime": core.RUNTIME.type,
262
- "X-Fern-Runtime-Version": core.RUNTIME.version,
263
- },
264
- contentType: "application/json",
265
- requestType: "json",
266
- body: serializers.AsyncPageQueryRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
267
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
268
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
269
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
270
- });
271
- if (_response.ok) {
272
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
273
- unrecognizedObjectKeys: "passthrough",
274
- allowUnrecognizedUnionMembers: true,
275
- allowUnrecognizedEnumValues: true,
276
- skipValidation: true,
277
- breadcrumbsPrefix: ["response"],
278
- });
279
- }
280
- if (_response.error.reason === "status-code") {
281
- throw new errors.AirtopError({
282
- statusCode: _response.error.statusCode,
283
- body: _response.error.body,
284
- });
285
- }
286
- switch (_response.error.reason) {
287
- case "non-json":
288
- throw new errors.AirtopError({
289
- statusCode: _response.error.statusCode,
290
- body: _response.error.rawBody,
291
- });
292
- case "timeout":
293
- throw new errors.AirtopTimeoutError();
294
- case "unknown":
295
- throw new errors.AirtopError({
296
- message: _response.error.errorMessage,
297
- });
298
- }
299
- });
300
- }
301
- /**
302
- * @param {string} sessionId - The session id for the window.
303
- * @param {string} windowId - The Airtop window id of the browser window.
304
- * @param {Airtop.AsyncPaginatedExtractionRequest} request
305
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
306
- *
307
- * @example
308
- * await client.windows.asyncPaginatedExtraction("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
309
- */
310
- asyncPaginatedExtraction(sessionId, windowId, request = {}, requestOptions) {
311
- var _a, _b;
312
- return __awaiter(this, void 0, void 0, function* () {
313
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
314
- 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`),
315
- method: "POST",
316
- headers: {
317
- Authorization: yield this._getAuthorizationHeader(),
318
- "X-Fern-Language": "JavaScript",
319
- "X-Fern-SDK-Name": "@airtop/sdk",
320
- "X-Fern-SDK-Version": "0.1.16-beta0",
321
- "User-Agent": "@airtop/sdk/0.1.16-beta0",
322
- "X-Fern-Runtime": core.RUNTIME.type,
323
- "X-Fern-Runtime-Version": core.RUNTIME.version,
324
- },
325
- contentType: "application/json",
326
- requestType: "json",
327
- body: serializers.AsyncPaginatedExtractionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
328
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
329
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
330
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
331
- });
332
- if (_response.ok) {
333
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
334
- unrecognizedObjectKeys: "passthrough",
335
- allowUnrecognizedUnionMembers: true,
336
- allowUnrecognizedEnumValues: true,
337
- skipValidation: true,
338
- breadcrumbsPrefix: ["response"],
339
- });
340
- }
341
- if (_response.error.reason === "status-code") {
342
- throw new errors.AirtopError({
343
- statusCode: _response.error.statusCode,
344
- body: _response.error.body,
345
- });
346
- }
347
- switch (_response.error.reason) {
348
- case "non-json":
349
- throw new errors.AirtopError({
350
- statusCode: _response.error.statusCode,
351
- body: _response.error.rawBody,
352
- });
353
- case "timeout":
354
- throw new errors.AirtopTimeoutError();
355
- case "unknown":
356
- throw new errors.AirtopError({
357
- message: _response.error.errorMessage,
358
- });
359
- }
360
- });
361
- }
362
- /**
363
- * This endpoint is deprecated. Please use the `pageQuery` endpoint instead.
364
- *
365
- * @param {string} sessionId - The session id for the window.
366
- * @param {string} windowId - The Airtop window id of the browser window.
367
- * @param {Airtop.AsyncPromptContentRequest} request
368
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
369
- *
370
- * @example
371
- * await client.windows.asyncPromptContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
372
- * prompt: "What is the main idea of this page?"
373
- * })
374
- */
375
- asyncPromptContent(sessionId, windowId, request, requestOptions) {
376
- var _a, _b;
377
- return __awaiter(this, void 0, void 0, function* () {
378
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
379
- 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`),
380
- method: "POST",
381
- headers: {
382
- Authorization: yield this._getAuthorizationHeader(),
383
- "X-Fern-Language": "JavaScript",
384
- "X-Fern-SDK-Name": "@airtop/sdk",
385
- "X-Fern-SDK-Version": "0.1.16-beta0",
386
- "User-Agent": "@airtop/sdk/0.1.16-beta0",
387
- "X-Fern-Runtime": core.RUNTIME.type,
388
- "X-Fern-Runtime-Version": core.RUNTIME.version,
389
- },
390
- contentType: "application/json",
391
- requestType: "json",
392
- body: serializers.AsyncPromptContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
393
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
394
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
395
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
396
- });
397
- if (_response.ok) {
398
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
399
- unrecognizedObjectKeys: "passthrough",
400
- allowUnrecognizedUnionMembers: true,
401
- allowUnrecognizedEnumValues: true,
402
- skipValidation: true,
403
- breadcrumbsPrefix: ["response"],
404
- });
405
- }
406
- if (_response.error.reason === "status-code") {
407
- throw new errors.AirtopError({
408
- statusCode: _response.error.statusCode,
409
- body: _response.error.body,
410
- });
411
- }
412
- switch (_response.error.reason) {
413
- case "non-json":
414
- throw new errors.AirtopError({
415
- statusCode: _response.error.statusCode,
416
- body: _response.error.rawBody,
417
- });
418
- case "timeout":
419
- throw new errors.AirtopTimeoutError();
420
- case "unknown":
421
- throw new errors.AirtopError({
422
- message: _response.error.errorMessage,
423
- });
424
- }
425
- });
426
- }
427
- /**
428
- * Take a screenshot of the current viewport of a browser window asynchronously
429
- *
430
- * @param {string} sessionId - The session id for the window.
431
- * @param {string} windowId - The Airtop window id of the browser window.
432
- * @param {Airtop.AsyncScreenshotRequest} request
433
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
434
- *
435
- * @example
436
- * await client.windows.asyncScreenshot("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
437
- */
438
- asyncScreenshot(sessionId, windowId, request = {}, requestOptions) {
439
- var _a, _b;
440
- return __awaiter(this, void 0, void 0, function* () {
441
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
442
- 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`),
443
- method: "POST",
444
- headers: {
445
- Authorization: yield this._getAuthorizationHeader(),
446
- "X-Fern-Language": "JavaScript",
447
- "X-Fern-SDK-Name": "@airtop/sdk",
448
- "X-Fern-SDK-Version": "0.1.16-beta0",
449
- "User-Agent": "@airtop/sdk/0.1.16-beta0",
450
- "X-Fern-Runtime": core.RUNTIME.type,
451
- "X-Fern-Runtime-Version": core.RUNTIME.version,
452
- },
453
- contentType: "application/json",
454
- requestType: "json",
455
- body: serializers.AsyncScreenshotRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
456
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
457
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
458
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
459
- });
460
- if (_response.ok) {
461
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
462
- unrecognizedObjectKeys: "passthrough",
463
- allowUnrecognizedUnionMembers: true,
464
- allowUnrecognizedEnumValues: true,
465
- skipValidation: true,
466
- breadcrumbsPrefix: ["response"],
467
- });
468
- }
469
- if (_response.error.reason === "status-code") {
470
- throw new errors.AirtopError({
471
- statusCode: _response.error.statusCode,
472
- body: _response.error.body,
473
- });
474
- }
475
- switch (_response.error.reason) {
476
- case "non-json":
477
- throw new errors.AirtopError({
478
- statusCode: _response.error.statusCode,
479
- body: _response.error.rawBody,
480
- });
481
- case "timeout":
482
- throw new errors.AirtopTimeoutError();
483
- case "unknown":
484
- throw new errors.AirtopError({
485
- message: _response.error.errorMessage,
486
- });
487
- }
488
- });
489
- }
490
- /**
491
- * This endpoint is deprecated. Please use the `pageQuery` endpoint and ask for a summary in the prompt instead.
492
- *
493
- * @param {string} sessionId - The session id for the window.
494
- * @param {string} windowId - The Airtop window id of the browser window to summarize.
495
- * @param {Airtop.AsyncSummarizeContentRequest} request
496
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
497
- *
498
- * @example
499
- * await client.windows.asyncSummarizeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
500
- */
501
- asyncSummarizeContent(sessionId, windowId, request = {}, requestOptions) {
502
- var _a, _b;
503
- return __awaiter(this, void 0, void 0, function* () {
504
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
505
- 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`),
506
- method: "POST",
507
- headers: {
508
- Authorization: yield this._getAuthorizationHeader(),
509
- "X-Fern-Language": "JavaScript",
510
- "X-Fern-SDK-Name": "@airtop/sdk",
511
- "X-Fern-SDK-Version": "0.1.16-beta0",
512
- "User-Agent": "@airtop/sdk/0.1.16-beta0",
513
- "X-Fern-Runtime": core.RUNTIME.type,
514
- "X-Fern-Runtime-Version": core.RUNTIME.version,
515
- },
516
- contentType: "application/json",
517
- requestType: "json",
518
- body: serializers.AsyncSummarizeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
519
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
520
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
521
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
522
- });
523
- if (_response.ok) {
524
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
525
- unrecognizedObjectKeys: "passthrough",
526
- allowUnrecognizedUnionMembers: true,
527
- allowUnrecognizedEnumValues: true,
528
- skipValidation: true,
529
- breadcrumbsPrefix: ["response"],
530
- });
531
- }
532
- if (_response.error.reason === "status-code") {
533
- throw new errors.AirtopError({
534
- statusCode: _response.error.statusCode,
535
- body: _response.error.body,
536
- });
537
- }
538
- switch (_response.error.reason) {
539
- case "non-json":
540
- throw new errors.AirtopError({
541
- statusCode: _response.error.statusCode,
542
- body: _response.error.rawBody,
543
- });
544
- case "timeout":
545
- throw new errors.AirtopTimeoutError();
546
- case "unknown":
547
- throw new errors.AirtopError({
548
- message: _response.error.errorMessage,
549
- });
550
- }
551
- });
552
- }
553
- /**
554
- * @param {string} sessionId - The session id for the window.
555
- * @param {string} windowId - The Airtop window id of the browser window.
556
- * @param {Airtop.AsyncTypeRequest} request
557
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
558
- *
559
- * @example
560
- * await client.windows.asyncType("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
561
- * text: "Example text"
562
- * })
563
- */
564
- asyncType(sessionId, windowId, request, requestOptions) {
565
- var _a, _b;
566
- return __awaiter(this, void 0, void 0, function* () {
567
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
568
- 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`),
569
- method: "POST",
570
- headers: {
571
- Authorization: yield this._getAuthorizationHeader(),
572
- "X-Fern-Language": "JavaScript",
573
- "X-Fern-SDK-Name": "@airtop/sdk",
574
- "X-Fern-SDK-Version": "0.1.16-beta0",
575
- "User-Agent": "@airtop/sdk/0.1.16-beta0",
576
- "X-Fern-Runtime": core.RUNTIME.type,
577
- "X-Fern-Runtime-Version": core.RUNTIME.version,
578
- },
579
- contentType: "application/json",
580
- requestType: "json",
581
- body: serializers.AsyncTypeRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
582
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
583
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
584
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
585
- });
586
- if (_response.ok) {
587
- return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
588
- unrecognizedObjectKeys: "passthrough",
589
- allowUnrecognizedUnionMembers: true,
590
- allowUnrecognizedEnumValues: true,
591
- skipValidation: true,
592
- breadcrumbsPrefix: ["response"],
593
- });
594
- }
595
- if (_response.error.reason === "status-code") {
596
- throw new errors.AirtopError({
597
- statusCode: _response.error.statusCode,
598
- body: _response.error.body,
599
- });
600
- }
601
- switch (_response.error.reason) {
602
- case "non-json":
603
- throw new errors.AirtopError({
604
- statusCode: _response.error.statusCode,
605
- body: _response.error.rawBody,
606
- });
607
- case "timeout":
608
- throw new errors.AirtopTimeoutError();
609
- case "unknown":
610
- throw new errors.AirtopError({
611
- message: _response.error.errorMessage,
612
- });
613
- }
614
- });
615
- }
616
51
  /**
617
52
  * Creates a new browser window in a session. Optionally, you can specify a url to load on the window upon creation.
618
53
  *
@@ -633,8 +68,8 @@ class Windows {
633
68
  Authorization: yield this._getAuthorizationHeader(),
634
69
  "X-Fern-Language": "JavaScript",
635
70
  "X-Fern-SDK-Name": "@airtop/sdk",
636
- "X-Fern-SDK-Version": "0.1.16-beta0",
637
- "User-Agent": "@airtop/sdk/0.1.16-beta0",
71
+ "X-Fern-SDK-Version": "0.1.16",
72
+ "User-Agent": "@airtop/sdk/0.1.16",
638
73
  "X-Fern-Runtime": core.RUNTIME.type,
639
74
  "X-Fern-Runtime-Version": core.RUNTIME.version,
640
75
  },
@@ -709,8 +144,8 @@ class Windows {
709
144
  Authorization: yield this._getAuthorizationHeader(),
710
145
  "X-Fern-Language": "JavaScript",
711
146
  "X-Fern-SDK-Name": "@airtop/sdk",
712
- "X-Fern-SDK-Version": "0.1.16-beta0",
713
- "User-Agent": "@airtop/sdk/0.1.16-beta0",
147
+ "X-Fern-SDK-Version": "0.1.16",
148
+ "User-Agent": "@airtop/sdk/0.1.16",
714
149
  "X-Fern-Runtime": core.RUNTIME.type,
715
150
  "X-Fern-Runtime-Version": core.RUNTIME.version,
716
151
  },
@@ -774,8 +209,8 @@ class Windows {
774
209
  Authorization: yield this._getAuthorizationHeader(),
775
210
  "X-Fern-Language": "JavaScript",
776
211
  "X-Fern-SDK-Name": "@airtop/sdk",
777
- "X-Fern-SDK-Version": "0.1.16-beta0",
778
- "User-Agent": "@airtop/sdk/0.1.16-beta0",
212
+ "X-Fern-SDK-Version": "0.1.16",
213
+ "User-Agent": "@airtop/sdk/0.1.16",
779
214
  "X-Fern-Runtime": core.RUNTIME.type,
780
215
  "X-Fern-Runtime-Version": core.RUNTIME.version,
781
216
  },
@@ -836,8 +271,8 @@ class Windows {
836
271
  Authorization: yield this._getAuthorizationHeader(),
837
272
  "X-Fern-Language": "JavaScript",
838
273
  "X-Fern-SDK-Name": "@airtop/sdk",
839
- "X-Fern-SDK-Version": "0.1.16-beta0",
840
- "User-Agent": "@airtop/sdk/0.1.16-beta0",
274
+ "X-Fern-SDK-Version": "0.1.16",
275
+ "User-Agent": "@airtop/sdk/0.1.16",
841
276
  "X-Fern-Runtime": core.RUNTIME.type,
842
277
  "X-Fern-Runtime-Version": core.RUNTIME.version,
843
278
  },
@@ -900,8 +335,8 @@ class Windows {
900
335
  Authorization: yield this._getAuthorizationHeader(),
901
336
  "X-Fern-Language": "JavaScript",
902
337
  "X-Fern-SDK-Name": "@airtop/sdk",
903
- "X-Fern-SDK-Version": "0.1.16-beta0",
904
- "User-Agent": "@airtop/sdk/0.1.16-beta0",
338
+ "X-Fern-SDK-Version": "0.1.16",
339
+ "User-Agent": "@airtop/sdk/0.1.16",
905
340
  "X-Fern-Runtime": core.RUNTIME.type,
906
341
  "X-Fern-Runtime-Version": core.RUNTIME.version,
907
342
  },
@@ -963,8 +398,8 @@ class Windows {
963
398
  Authorization: yield this._getAuthorizationHeader(),
964
399
  "X-Fern-Language": "JavaScript",
965
400
  "X-Fern-SDK-Name": "@airtop/sdk",
966
- "X-Fern-SDK-Version": "0.1.16-beta0",
967
- "User-Agent": "@airtop/sdk/0.1.16-beta0",
401
+ "X-Fern-SDK-Version": "0.1.16",
402
+ "User-Agent": "@airtop/sdk/0.1.16",
968
403
  "X-Fern-Runtime": core.RUNTIME.type,
969
404
  "X-Fern-Runtime-Version": core.RUNTIME.version,
970
405
  },
@@ -1005,69 +440,6 @@ class Windows {
1005
440
  }
1006
441
  });
1007
442
  }
1008
- /**
1009
- * @param {string} sessionId - The session id for the window.
1010
- * @param {string} windowId - The Airtop window id of the browser window.
1011
- * @param {Airtop.SessionMonitorHandlerRequestBody} request
1012
- * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
1013
- *
1014
- * @example
1015
- * await client.windows.monitor("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
1016
- */
1017
- monitor(sessionId, windowId, request = {}, requestOptions) {
1018
- var _a, _b;
1019
- return __awaiter(this, void 0, void 0, function* () {
1020
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1021
- 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`),
1022
- method: "POST",
1023
- headers: {
1024
- Authorization: yield this._getAuthorizationHeader(),
1025
- "X-Fern-Language": "JavaScript",
1026
- "X-Fern-SDK-Name": "@airtop/sdk",
1027
- "X-Fern-SDK-Version": "0.1.16-beta0",
1028
- "User-Agent": "@airtop/sdk/0.1.16-beta0",
1029
- "X-Fern-Runtime": core.RUNTIME.type,
1030
- "X-Fern-Runtime-Version": core.RUNTIME.version,
1031
- },
1032
- contentType: "application/json",
1033
- requestType: "json",
1034
- body: serializers.SessionMonitorHandlerRequestBody.jsonOrThrow(request, {
1035
- unrecognizedObjectKeys: "strip",
1036
- }),
1037
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1038
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1039
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1040
- });
1041
- if (_response.ok) {
1042
- return serializers.AiPromptResponse.parseOrThrow(_response.body, {
1043
- unrecognizedObjectKeys: "passthrough",
1044
- allowUnrecognizedUnionMembers: true,
1045
- allowUnrecognizedEnumValues: true,
1046
- skipValidation: true,
1047
- breadcrumbsPrefix: ["response"],
1048
- });
1049
- }
1050
- if (_response.error.reason === "status-code") {
1051
- throw new errors.AirtopError({
1052
- statusCode: _response.error.statusCode,
1053
- body: _response.error.body,
1054
- });
1055
- }
1056
- switch (_response.error.reason) {
1057
- case "non-json":
1058
- throw new errors.AirtopError({
1059
- statusCode: _response.error.statusCode,
1060
- body: _response.error.rawBody,
1061
- });
1062
- case "timeout":
1063
- throw new errors.AirtopTimeoutError();
1064
- case "unknown":
1065
- throw new errors.AirtopError({
1066
- message: _response.error.errorMessage,
1067
- });
1068
- }
1069
- });
1070
- }
1071
443
  /**
1072
444
  * 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?).
1073
445
  *
@@ -1091,8 +463,8 @@ class Windows {
1091
463
  Authorization: yield this._getAuthorizationHeader(),
1092
464
  "X-Fern-Language": "JavaScript",
1093
465
  "X-Fern-SDK-Name": "@airtop/sdk",
1094
- "X-Fern-SDK-Version": "0.1.16-beta0",
1095
- "User-Agent": "@airtop/sdk/0.1.16-beta0",
466
+ "X-Fern-SDK-Version": "0.1.16",
467
+ "User-Agent": "@airtop/sdk/0.1.16",
1096
468
  "X-Fern-Runtime": core.RUNTIME.type,
1097
469
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1098
470
  },
@@ -1156,8 +528,8 @@ class Windows {
1156
528
  Authorization: yield this._getAuthorizationHeader(),
1157
529
  "X-Fern-Language": "JavaScript",
1158
530
  "X-Fern-SDK-Name": "@airtop/sdk",
1159
- "X-Fern-SDK-Version": "0.1.16-beta0",
1160
- "User-Agent": "@airtop/sdk/0.1.16-beta0",
531
+ "X-Fern-SDK-Version": "0.1.16",
532
+ "User-Agent": "@airtop/sdk/0.1.16",
1161
533
  "X-Fern-Runtime": core.RUNTIME.type,
1162
534
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1163
535
  },
@@ -1223,8 +595,8 @@ class Windows {
1223
595
  Authorization: yield this._getAuthorizationHeader(),
1224
596
  "X-Fern-Language": "JavaScript",
1225
597
  "X-Fern-SDK-Name": "@airtop/sdk",
1226
- "X-Fern-SDK-Version": "0.1.16-beta0",
1227
- "User-Agent": "@airtop/sdk/0.1.16-beta0",
598
+ "X-Fern-SDK-Version": "0.1.16",
599
+ "User-Agent": "@airtop/sdk/0.1.16",
1228
600
  "X-Fern-Runtime": core.RUNTIME.type,
1229
601
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1230
602
  },
@@ -1288,8 +660,8 @@ class Windows {
1288
660
  Authorization: yield this._getAuthorizationHeader(),
1289
661
  "X-Fern-Language": "JavaScript",
1290
662
  "X-Fern-SDK-Name": "@airtop/sdk",
1291
- "X-Fern-SDK-Version": "0.1.16-beta0",
1292
- "User-Agent": "@airtop/sdk/0.1.16-beta0",
663
+ "X-Fern-SDK-Version": "0.1.16",
664
+ "User-Agent": "@airtop/sdk/0.1.16",
1293
665
  "X-Fern-Runtime": core.RUNTIME.type,
1294
666
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1295
667
  },
@@ -1351,8 +723,8 @@ class Windows {
1351
723
  Authorization: yield this._getAuthorizationHeader(),
1352
724
  "X-Fern-Language": "JavaScript",
1353
725
  "X-Fern-SDK-Name": "@airtop/sdk",
1354
- "X-Fern-SDK-Version": "0.1.16-beta0",
1355
- "User-Agent": "@airtop/sdk/0.1.16-beta0",
726
+ "X-Fern-SDK-Version": "0.1.16",
727
+ "User-Agent": "@airtop/sdk/0.1.16",
1356
728
  "X-Fern-Runtime": core.RUNTIME.type,
1357
729
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1358
730
  },
@@ -1416,8 +788,8 @@ class Windows {
1416
788
  Authorization: yield this._getAuthorizationHeader(),
1417
789
  "X-Fern-Language": "JavaScript",
1418
790
  "X-Fern-SDK-Name": "@airtop/sdk",
1419
- "X-Fern-SDK-Version": "0.1.16-beta0",
1420
- "User-Agent": "@airtop/sdk/0.1.16-beta0",
791
+ "X-Fern-SDK-Version": "0.1.16",
792
+ "User-Agent": "@airtop/sdk/0.1.16",
1421
793
  "X-Fern-Runtime": core.RUNTIME.type,
1422
794
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1423
795
  },
@@ -1483,8 +855,8 @@ class Windows {
1483
855
  Authorization: yield this._getAuthorizationHeader(),
1484
856
  "X-Fern-Language": "JavaScript",
1485
857
  "X-Fern-SDK-Name": "@airtop/sdk",
1486
- "X-Fern-SDK-Version": "0.1.16-beta0",
1487
- "User-Agent": "@airtop/sdk/0.1.16-beta0",
858
+ "X-Fern-SDK-Version": "0.1.16",
859
+ "User-Agent": "@airtop/sdk/0.1.16",
1488
860
  "X-Fern-Runtime": core.RUNTIME.type,
1489
861
  "X-Fern-Runtime-Version": core.RUNTIME.version,
1490
862
  },