@airtop/sdk 0.0.7 → 0.0.10-a

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 (469) hide show
  1. package/Client.d.ts +4 -4
  2. package/Client.js +5 -0
  3. package/README.md +6 -6
  4. package/api/errors/InternalServerError.d.ts +1 -1
  5. package/api/errors/NotFoundError.d.ts +1 -1
  6. package/api/errors/UnprocessableEntityError.d.ts +1 -1
  7. package/api/resources/index.d.ts +2 -0
  8. package/api/resources/index.js +3 -1
  9. package/api/resources/profiles/client/Client.d.ts +7 -27
  10. package/api/resources/profiles/client/Client.js +26 -125
  11. package/api/resources/profiles/client/requests/ProfilesDeleteRequest.d.ts +3 -9
  12. package/api/resources/profiles/client/requests/ProfilesGetRequest.d.ts +3 -9
  13. package/api/resources/sessions/client/Client.d.ts +16 -66
  14. package/api/resources/sessions/client/Client.js +55 -359
  15. package/api/resources/sessions/client/requests/SessionRestInputV1.d.ts +0 -2
  16. package/api/resources/sessions/client/requests/SessionsListRequest.d.ts +18 -2
  17. package/api/resources/sessions/client/requests/index.d.ts +0 -2
  18. package/api/resources/sessions/types/SessionsListRequestStatus.d.ts +13 -0
  19. package/api/resources/sessions/types/SessionsListRequestStatus.js +12 -0
  20. package/api/resources/sessions/types/index.d.ts +1 -0
  21. package/api/resources/sessions/types/index.js +1 -0
  22. package/api/resources/windows/client/Client.d.ts +70 -0
  23. package/api/resources/windows/client/Client.js +320 -0
  24. package/api/resources/windows/client/index.d.ts +1 -0
  25. package/api/resources/windows/client/index.js +17 -0
  26. package/api/resources/windows/client/requests/GetWindowInfoRequest.d.ts +23 -0
  27. package/api/resources/{sessions/client/requests/SessionPromptContentRequest.d.ts → windows/client/requests/PromptContentRequest.d.ts} +5 -5
  28. package/api/resources/windows/client/requests/ScrapeContentRequest.d.ts +12 -0
  29. package/api/resources/windows/client/requests/SummarizeContentRequest.d.ts +14 -0
  30. package/api/resources/windows/client/requests/index.d.ts +4 -0
  31. package/api/resources/windows/client/requests/index.js +2 -0
  32. package/api/resources/windows/index.d.ts +1 -0
  33. package/api/resources/windows/index.js +17 -0
  34. package/api/types/AiResponseEnvelope.d.ts +9 -0
  35. package/api/types/AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.d.ts +10 -0
  36. package/api/types/ClientProvidedResponseMetadata.d.ts +1 -1
  37. package/api/types/DefaultMetaWrapper.d.ts +6 -0
  38. package/api/types/ErrorEnvelope.d.ts +12 -0
  39. package/api/types/ExternalProfileV1.d.ts +9 -0
  40. package/api/types/ExternalSessionAiResponseMetadata.d.ts +10 -0
  41. package/api/types/ExternalSessionAiResponseMetadataStatus.d.ts +9 -0
  42. package/api/types/{CleanScrapeResponseDataStatus.js → ExternalSessionAiResponseMetadataStatus.js} +3 -3
  43. package/api/types/ExternalSessionAiResponseMetadataUsage.d.ts +9 -0
  44. package/api/types/ExternalSessionConfig.d.ts +11 -0
  45. package/api/types/ExternalSessionWithConnectionInfo.d.ts +24 -0
  46. package/api/types/ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +10 -0
  47. package/{dist/api/types/SessionAiResponseIssue.d.ts → api/types/Issue.d.ts} +1 -1
  48. package/api/types/ListExternalProfileV1EnvelopeDefaultMetaWrapper.d.ts +10 -0
  49. package/api/types/Pagination.d.ts +13 -0
  50. package/api/types/ScrapeResponseEnvelope.d.ts +9 -0
  51. package/api/types/ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.d.ts +10 -0
  52. package/api/types/{CleanScrapeResponseOutput.d.ts → ScrapeResponseOutput.d.ts} +2 -2
  53. package/api/types/SessionConfigV1.d.ts +1 -5
  54. package/api/types/SessionsWithPagination.d.ts +10 -0
  55. package/api/types/SessionsWithPaginationEnvelopeDefaultMetaWrapper.d.ts +10 -0
  56. package/api/types/StatusMessageStatus.d.ts +2 -2
  57. package/api/types/StatusMessageStatus.js +1 -1
  58. package/api/types/Window.d.ts +9 -0
  59. package/api/types/WindowEnvelopeDefaultMetaWrapper.d.ts +10 -0
  60. package/api/types/index.d.ts +21 -24
  61. package/api/types/index.js +21 -24
  62. package/core/auth/BasicAuth.d.ts +8 -0
  63. package/core/auth/BasicAuth.js +26 -0
  64. package/core/auth/BearerToken.d.ts +5 -0
  65. package/core/auth/BearerToken.js +15 -0
  66. package/core/auth/index.d.ts +2 -0
  67. package/core/auth/index.js +7 -0
  68. package/core/index.d.ts +1 -0
  69. package/core/index.js +1 -0
  70. package/dist/Client.d.ts +4 -4
  71. package/dist/Client.js +5 -0
  72. package/dist/api/errors/InternalServerError.d.ts +1 -1
  73. package/dist/api/errors/NotFoundError.d.ts +1 -1
  74. package/dist/api/errors/UnprocessableEntityError.d.ts +1 -1
  75. package/dist/api/resources/index.d.ts +2 -0
  76. package/dist/api/resources/index.js +3 -1
  77. package/dist/api/resources/profiles/client/Client.d.ts +7 -27
  78. package/dist/api/resources/profiles/client/Client.js +26 -125
  79. package/dist/api/resources/profiles/client/requests/ProfilesDeleteRequest.d.ts +3 -9
  80. package/dist/api/resources/profiles/client/requests/ProfilesGetRequest.d.ts +3 -9
  81. package/dist/api/resources/sessions/client/Client.d.ts +16 -66
  82. package/dist/api/resources/sessions/client/Client.js +55 -359
  83. package/dist/api/resources/sessions/client/requests/SessionRestInputV1.d.ts +0 -2
  84. package/dist/api/resources/sessions/client/requests/SessionsListRequest.d.ts +18 -2
  85. package/dist/api/resources/sessions/client/requests/index.d.ts +0 -2
  86. package/dist/api/resources/sessions/types/SessionsListRequestStatus.d.ts +13 -0
  87. package/dist/api/resources/sessions/types/SessionsListRequestStatus.js +12 -0
  88. package/dist/api/resources/sessions/types/index.d.ts +1 -0
  89. package/dist/api/resources/sessions/types/index.js +1 -0
  90. package/dist/api/resources/windows/client/Client.d.ts +70 -0
  91. package/dist/api/resources/windows/client/Client.js +320 -0
  92. package/dist/api/resources/windows/client/index.d.ts +1 -0
  93. package/dist/api/resources/windows/client/index.js +17 -0
  94. package/dist/api/resources/windows/client/requests/GetWindowInfoRequest.d.ts +23 -0
  95. package/dist/api/resources/{sessions/client/requests/SessionPromptContentRequest.d.ts → windows/client/requests/PromptContentRequest.d.ts} +5 -5
  96. package/dist/api/resources/windows/client/requests/ScrapeContentRequest.d.ts +12 -0
  97. package/dist/api/resources/windows/client/requests/SummarizeContentRequest.d.ts +14 -0
  98. package/dist/api/resources/windows/client/requests/index.d.ts +4 -0
  99. package/dist/api/resources/windows/client/requests/index.js +2 -0
  100. package/dist/api/resources/windows/index.d.ts +1 -0
  101. package/dist/api/resources/windows/index.js +17 -0
  102. package/dist/api/types/AiResponseEnvelope.d.ts +9 -0
  103. package/dist/api/types/AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.d.ts +10 -0
  104. package/dist/api/types/ClientProvidedResponseMetadata.d.ts +1 -1
  105. package/dist/api/types/DefaultMetaWrapper.d.ts +6 -0
  106. package/dist/api/types/ErrorEnvelope.d.ts +12 -0
  107. package/dist/api/types/ExternalProfileV1.d.ts +9 -0
  108. package/dist/api/types/ExternalSessionAiResponseMetadata.d.ts +10 -0
  109. package/dist/api/types/ExternalSessionAiResponseMetadataStatus.d.ts +9 -0
  110. package/{api/types/SessionAiResponseDataStatus.js → dist/api/types/ExternalSessionAiResponseMetadataStatus.js} +3 -3
  111. package/dist/api/types/ExternalSessionAiResponseMetadataUsage.d.ts +9 -0
  112. package/dist/api/types/ExternalSessionConfig.d.ts +11 -0
  113. package/dist/api/types/ExternalSessionWithConnectionInfo.d.ts +24 -0
  114. package/dist/api/types/ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +10 -0
  115. package/{api/types/SessionAiResponseIssue.d.ts → dist/api/types/Issue.d.ts} +1 -1
  116. package/dist/api/types/ListExternalProfileV1EnvelopeDefaultMetaWrapper.d.ts +10 -0
  117. package/dist/api/types/Pagination.d.ts +13 -0
  118. package/dist/api/types/ScrapeResponseEnvelope.d.ts +9 -0
  119. package/dist/api/types/ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.d.ts +10 -0
  120. package/dist/api/types/{CleanScrapeResponseOutput.d.ts → ScrapeResponseOutput.d.ts} +2 -2
  121. package/dist/api/types/SessionConfigV1.d.ts +1 -5
  122. package/dist/api/types/SessionsWithPagination.d.ts +10 -0
  123. package/dist/api/types/SessionsWithPaginationEnvelopeDefaultMetaWrapper.d.ts +10 -0
  124. package/dist/api/types/StatusMessageStatus.d.ts +2 -2
  125. package/dist/api/types/StatusMessageStatus.js +1 -1
  126. package/dist/api/types/Window.d.ts +9 -0
  127. package/dist/api/types/WindowEnvelopeDefaultMetaWrapper.d.ts +10 -0
  128. package/dist/api/types/index.d.ts +21 -24
  129. package/dist/api/types/index.js +21 -24
  130. package/dist/core/auth/BasicAuth.d.ts +8 -0
  131. package/dist/core/auth/BasicAuth.js +26 -0
  132. package/dist/core/auth/BearerToken.d.ts +5 -0
  133. package/dist/core/auth/BearerToken.js +15 -0
  134. package/dist/core/auth/index.d.ts +2 -0
  135. package/dist/core/auth/index.js +7 -0
  136. package/dist/core/index.d.ts +1 -0
  137. package/dist/core/index.js +1 -0
  138. package/dist/index.d.ts +2 -1
  139. package/dist/index.js +4 -3
  140. package/dist/serialization/resources/index.d.ts +2 -0
  141. package/dist/serialization/resources/index.js +3 -1
  142. package/dist/serialization/resources/sessions/client/requests/SessionRestInputV1.d.ts +0 -1
  143. package/dist/serialization/resources/sessions/client/requests/SessionRestInputV1.js +0 -1
  144. package/dist/serialization/resources/sessions/client/requests/index.d.ts +0 -2
  145. package/dist/serialization/resources/sessions/client/requests/index.js +1 -5
  146. package/dist/serialization/resources/sessions/types/SessionsListRequestStatus.d.ts +10 -0
  147. package/dist/serialization/resources/sessions/types/SessionsListRequestStatus.js +31 -0
  148. package/dist/serialization/resources/sessions/types/index.d.ts +1 -0
  149. package/dist/serialization/resources/sessions/types/index.js +1 -0
  150. package/dist/serialization/resources/windows/client/index.d.ts +1 -0
  151. package/dist/serialization/resources/windows/client/index.js +17 -0
  152. package/dist/serialization/resources/windows/client/requests/PromptContentRequest.d.ts +16 -0
  153. package/dist/serialization/resources/{sessions/client/requests/SessionPromptContentRequest.js → windows/client/requests/PromptContentRequest.js} +5 -5
  154. package/dist/serialization/resources/windows/client/requests/ScrapeContentRequest.d.ts +14 -0
  155. package/dist/serialization/resources/windows/client/requests/ScrapeContentRequest.js +35 -0
  156. package/dist/serialization/resources/windows/client/requests/SummarizeContentRequest.d.ts +15 -0
  157. package/{serialization/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.js → dist/serialization/resources/windows/client/requests/SummarizeContentRequest.js} +5 -6
  158. package/dist/serialization/resources/windows/client/requests/index.d.ts +3 -0
  159. package/dist/serialization/resources/windows/client/requests/index.js +9 -0
  160. package/dist/serialization/resources/windows/index.d.ts +1 -0
  161. package/dist/serialization/resources/windows/index.js +17 -0
  162. package/dist/serialization/types/AiResponseEnvelope.d.ts +15 -0
  163. package/dist/serialization/types/{ProfileOutputV1Body.js → AiResponseEnvelope.js} +6 -5
  164. package/dist/serialization/types/AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.d.ts +18 -0
  165. package/dist/serialization/types/AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.js +39 -0
  166. package/dist/serialization/types/ClientProvidedResponseMetadata.d.ts +1 -1
  167. package/dist/serialization/types/ClientProvidedResponseMetadata.js +1 -1
  168. package/dist/serialization/types/DefaultMetaWrapper.d.ts +12 -0
  169. package/dist/serialization/types/{SessionAiResponseDataStatus.js → DefaultMetaWrapper.js} +4 -2
  170. package/dist/serialization/types/ErrorEnvelope.d.ts +18 -0
  171. package/dist/serialization/types/ErrorEnvelope.js +39 -0
  172. package/{serialization/types/ProfileV1.d.ts → dist/serialization/types/ExternalProfileV1.d.ts} +3 -5
  173. package/dist/serialization/types/ExternalProfileV1.js +34 -0
  174. package/dist/serialization/types/ExternalSessionAiResponseMetadata.d.ts +18 -0
  175. package/dist/serialization/types/{SessionAiResponseMetadata.js → ExternalSessionAiResponseMetadata.js} +7 -4
  176. package/dist/serialization/types/ExternalSessionAiResponseMetadataStatus.d.ts +10 -0
  177. package/dist/serialization/types/ExternalSessionAiResponseMetadataStatus.js +31 -0
  178. package/dist/serialization/types/ExternalSessionAiResponseMetadataUsage.d.ts +13 -0
  179. package/dist/serialization/types/ExternalSessionAiResponseMetadataUsage.js +34 -0
  180. package/dist/serialization/types/ExternalSessionConfig.d.ts +14 -0
  181. package/dist/serialization/types/{ErrorDetail.js → ExternalSessionConfig.js} +5 -5
  182. package/dist/serialization/types/ExternalSessionWithConnectionInfo.d.ts +21 -0
  183. package/dist/serialization/types/{Session.js → ExternalSessionWithConnectionInfo.js} +10 -8
  184. package/dist/serialization/types/ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +18 -0
  185. package/dist/serialization/types/ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js +39 -0
  186. package/{serialization/types/SessionAiResponseIssue.d.ts → dist/serialization/types/Issue.d.ts} +2 -2
  187. package/{serialization/types/SessionAiResponseIssue.js → dist/serialization/types/Issue.js} +2 -2
  188. package/dist/serialization/types/ListExternalProfileV1EnvelopeDefaultMetaWrapper.d.ts +18 -0
  189. package/dist/serialization/types/ListExternalProfileV1EnvelopeDefaultMetaWrapper.js +39 -0
  190. package/dist/serialization/types/Pagination.d.ts +19 -0
  191. package/dist/serialization/types/{CleanScrapeResponseData.js → Pagination.js} +10 -6
  192. package/dist/serialization/types/ScrapeResponseEnvelope.d.ts +16 -0
  193. package/dist/serialization/types/{LiveViewUrlOutputV1Body.js → ScrapeResponseEnvelope.js} +7 -6
  194. package/dist/serialization/types/ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.d.ts +18 -0
  195. package/dist/serialization/types/ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.js +39 -0
  196. package/dist/serialization/types/{CleanScrapeResponseOutput.d.ts → ScrapeResponseOutput.d.ts} +3 -3
  197. package/{serialization/types/CleanScrapeResponseOutput.js → dist/serialization/types/ScrapeResponseOutput.js} +3 -3
  198. package/dist/serialization/types/SessionConfigV1.d.ts +3 -5
  199. package/dist/serialization/types/SessionConfigV1.js +3 -5
  200. package/dist/serialization/types/SessionsWithPagination.d.ts +15 -0
  201. package/dist/serialization/types/SessionsWithPagination.js +36 -0
  202. package/dist/serialization/types/SessionsWithPaginationEnvelopeDefaultMetaWrapper.d.ts +18 -0
  203. package/dist/serialization/types/SessionsWithPaginationEnvelopeDefaultMetaWrapper.js +39 -0
  204. package/dist/serialization/types/StatusMessageStatus.d.ts +1 -1
  205. package/dist/serialization/types/StatusMessageStatus.js +1 -1
  206. package/dist/serialization/types/Window.d.ts +13 -0
  207. package/{serialization/types/CleanScrapeResponseDataStatus.js → dist/serialization/types/Window.js} +5 -2
  208. package/dist/serialization/types/WindowEnvelopeDefaultMetaWrapper.d.ts +18 -0
  209. package/{serialization/types/CleanScrapeResponse.js → dist/serialization/types/WindowEnvelopeDefaultMetaWrapper.js} +9 -7
  210. package/dist/serialization/types/index.d.ts +21 -24
  211. package/dist/serialization/types/index.js +21 -24
  212. package/dist/wrapper/AirtopClient.d.ts +19 -0
  213. package/dist/wrapper/AirtopClient.js +32 -0
  214. package/dist/wrapper/AirtopSessions.d.ts +24 -0
  215. package/dist/wrapper/AirtopSessions.js +93 -0
  216. package/dist/wrapper/AirtopWindows.d.ts +18 -0
  217. package/dist/wrapper/AirtopWindows.js +65 -0
  218. package/index.d.ts +2 -1
  219. package/index.js +4 -3
  220. package/package.json +25 -4
  221. package/reference.md +53 -166
  222. package/serialization/resources/index.d.ts +2 -0
  223. package/serialization/resources/index.js +3 -1
  224. package/serialization/resources/sessions/client/requests/SessionRestInputV1.d.ts +0 -1
  225. package/serialization/resources/sessions/client/requests/SessionRestInputV1.js +0 -1
  226. package/serialization/resources/sessions/client/requests/index.d.ts +0 -2
  227. package/serialization/resources/sessions/client/requests/index.js +1 -5
  228. package/serialization/resources/sessions/types/SessionsListRequestStatus.d.ts +10 -0
  229. package/serialization/resources/sessions/types/SessionsListRequestStatus.js +31 -0
  230. package/serialization/resources/sessions/types/index.d.ts +1 -0
  231. package/serialization/resources/sessions/types/index.js +1 -0
  232. package/serialization/resources/windows/client/index.d.ts +1 -0
  233. package/serialization/resources/windows/client/index.js +17 -0
  234. package/serialization/resources/windows/client/requests/PromptContentRequest.d.ts +16 -0
  235. package/serialization/resources/{sessions/client/requests/SessionPromptContentRequest.js → windows/client/requests/PromptContentRequest.js} +5 -5
  236. package/serialization/resources/windows/client/requests/ScrapeContentRequest.d.ts +14 -0
  237. package/serialization/resources/windows/client/requests/ScrapeContentRequest.js +35 -0
  238. package/serialization/resources/windows/client/requests/SummarizeContentRequest.d.ts +15 -0
  239. package/{dist/serialization/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.js → serialization/resources/windows/client/requests/SummarizeContentRequest.js} +5 -6
  240. package/serialization/resources/windows/client/requests/index.d.ts +3 -0
  241. package/serialization/resources/windows/client/requests/index.js +9 -0
  242. package/serialization/resources/windows/index.d.ts +1 -0
  243. package/serialization/resources/windows/index.js +17 -0
  244. package/serialization/types/AiResponseEnvelope.d.ts +15 -0
  245. package/{dist/serialization/types/SessionAiResponseData.js → serialization/types/AiResponseEnvelope.js} +6 -5
  246. package/serialization/types/AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.d.ts +18 -0
  247. package/serialization/types/AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.js +39 -0
  248. package/serialization/types/ClientProvidedResponseMetadata.d.ts +1 -1
  249. package/serialization/types/ClientProvidedResponseMetadata.js +1 -1
  250. package/serialization/types/DefaultMetaWrapper.d.ts +12 -0
  251. package/serialization/types/{SessionAiResponseDataStatus.js → DefaultMetaWrapper.js} +4 -2
  252. package/serialization/types/ErrorEnvelope.d.ts +18 -0
  253. package/serialization/types/ErrorEnvelope.js +39 -0
  254. package/{dist/serialization/types/ProfileV1.d.ts → serialization/types/ExternalProfileV1.d.ts} +3 -5
  255. package/serialization/types/ExternalProfileV1.js +34 -0
  256. package/serialization/types/ExternalSessionAiResponseMetadata.d.ts +18 -0
  257. package/serialization/types/{SessionAiResponseMetadata.js → ExternalSessionAiResponseMetadata.js} +7 -4
  258. package/serialization/types/ExternalSessionAiResponseMetadataStatus.d.ts +10 -0
  259. package/serialization/types/ExternalSessionAiResponseMetadataStatus.js +31 -0
  260. package/serialization/types/ExternalSessionAiResponseMetadataUsage.d.ts +13 -0
  261. package/serialization/types/ExternalSessionAiResponseMetadataUsage.js +34 -0
  262. package/serialization/types/ExternalSessionConfig.d.ts +14 -0
  263. package/{dist/serialization/types/LiveViewConnectionInfo.js → serialization/types/ExternalSessionConfig.js} +5 -4
  264. package/serialization/types/ExternalSessionWithConnectionInfo.d.ts +21 -0
  265. package/serialization/types/{Session.js → ExternalSessionWithConnectionInfo.js} +10 -8
  266. package/serialization/types/ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +18 -0
  267. package/serialization/types/ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js +39 -0
  268. package/{dist/serialization/types/SessionAiResponseIssue.d.ts → serialization/types/Issue.d.ts} +2 -2
  269. package/{dist/serialization/types/SessionAiResponseIssue.js → serialization/types/Issue.js} +2 -2
  270. package/serialization/types/ListExternalProfileV1EnvelopeDefaultMetaWrapper.d.ts +18 -0
  271. package/serialization/types/ListExternalProfileV1EnvelopeDefaultMetaWrapper.js +39 -0
  272. package/serialization/types/Pagination.d.ts +19 -0
  273. package/serialization/types/Pagination.js +40 -0
  274. package/serialization/types/ScrapeResponseEnvelope.d.ts +16 -0
  275. package/serialization/types/ScrapeResponseEnvelope.js +37 -0
  276. package/serialization/types/ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.d.ts +18 -0
  277. package/serialization/types/ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.js +39 -0
  278. package/serialization/types/{CleanScrapeResponseOutput.d.ts → ScrapeResponseOutput.d.ts} +3 -3
  279. package/{dist/serialization/types/CleanScrapeResponseOutput.js → serialization/types/ScrapeResponseOutput.js} +3 -3
  280. package/serialization/types/SessionConfigV1.d.ts +3 -5
  281. package/serialization/types/SessionConfigV1.js +3 -5
  282. package/serialization/types/SessionsWithPagination.d.ts +15 -0
  283. package/serialization/types/SessionsWithPagination.js +36 -0
  284. package/serialization/types/SessionsWithPaginationEnvelopeDefaultMetaWrapper.d.ts +18 -0
  285. package/serialization/types/SessionsWithPaginationEnvelopeDefaultMetaWrapper.js +39 -0
  286. package/serialization/types/StatusMessageStatus.d.ts +1 -1
  287. package/serialization/types/StatusMessageStatus.js +1 -1
  288. package/serialization/types/Window.d.ts +13 -0
  289. package/{dist/serialization/types/CleanScrapeResponseDataStatus.js → serialization/types/Window.js} +5 -2
  290. package/serialization/types/WindowEnvelopeDefaultMetaWrapper.d.ts +18 -0
  291. package/{dist/serialization/types/CleanScrapeResponse.js → serialization/types/WindowEnvelopeDefaultMetaWrapper.js} +9 -7
  292. package/serialization/types/index.d.ts +21 -24
  293. package/serialization/types/index.js +21 -24
  294. package/wrapper/AirtopClient.d.ts +19 -0
  295. package/wrapper/AirtopClient.js +32 -0
  296. package/wrapper/AirtopSessions.d.ts +24 -0
  297. package/wrapper/AirtopSessions.js +93 -0
  298. package/wrapper/AirtopWindows.d.ts +18 -0
  299. package/wrapper/AirtopWindows.js +65 -0
  300. package/api/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.d.ts +0 -18
  301. package/api/types/CleanScrapeResponse.d.ts +0 -12
  302. package/api/types/CleanScrapeResponseData.d.ts +0 -10
  303. package/api/types/CleanScrapeResponseDataStatus.d.ts +0 -12
  304. package/api/types/ConnectionInfo.d.ts +0 -14
  305. package/api/types/ErrorDetail.d.ts +0 -10
  306. package/api/types/ErrorModel.d.ts +0 -20
  307. package/api/types/LiveViewConnectionInfo.d.ts +0 -9
  308. package/api/types/LiveViewUrlOutputV1Body.d.ts +0 -13
  309. package/api/types/ProfileOutputV1Body.d.ts +0 -10
  310. package/api/types/ProfileV1.d.ts +0 -13
  311. package/api/types/ProfilesOutputV1Body.d.ts +0 -9
  312. package/api/types/Session.d.ts +0 -20
  313. package/api/types/SessionAiResponse.d.ts +0 -16
  314. package/api/types/SessionAiResponseData.d.ts +0 -10
  315. package/api/types/SessionAiResponseDataStatus.d.ts +0 -12
  316. package/api/types/SessionAiResponseMetadata.d.ts +0 -10
  317. package/api/types/SessionAiResponseMetadataUsage.d.ts +0 -14
  318. package/api/types/SessionAiResponseResponseMetadataModelUsage.d.ts +0 -10
  319. package/api/types/SessionConfig.d.ts +0 -15
  320. package/api/types/SessionOutputV1Body.d.ts +0 -12
  321. package/api/types/SessionWithConnectionInfo.d.ts +0 -10
  322. package/api/types/SessionsOutputV1Body.d.ts +0 -10
  323. package/dist/api/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.d.ts +0 -18
  324. package/dist/api/types/CleanScrapeResponse.d.ts +0 -12
  325. package/dist/api/types/CleanScrapeResponseData.d.ts +0 -10
  326. package/dist/api/types/CleanScrapeResponseDataStatus.d.ts +0 -12
  327. package/dist/api/types/CleanScrapeResponseDataStatus.js +0 -11
  328. package/dist/api/types/ConnectionInfo.d.ts +0 -14
  329. package/dist/api/types/ErrorDetail.d.ts +0 -10
  330. package/dist/api/types/ErrorModel.d.ts +0 -20
  331. package/dist/api/types/LiveViewConnectionInfo.d.ts +0 -9
  332. package/dist/api/types/LiveViewUrlOutputV1Body.d.ts +0 -13
  333. package/dist/api/types/ProfileOutputV1Body.d.ts +0 -10
  334. package/dist/api/types/ProfileV1.d.ts +0 -13
  335. package/dist/api/types/ProfilesOutputV1Body.d.ts +0 -9
  336. package/dist/api/types/Session.d.ts +0 -20
  337. package/dist/api/types/SessionAiResponse.d.ts +0 -16
  338. package/dist/api/types/SessionAiResponseData.d.ts +0 -10
  339. package/dist/api/types/SessionAiResponseDataStatus.d.ts +0 -12
  340. package/dist/api/types/SessionAiResponseDataStatus.js +0 -11
  341. package/dist/api/types/SessionAiResponseMetadata.d.ts +0 -10
  342. package/dist/api/types/SessionAiResponseMetadataUsage.d.ts +0 -14
  343. package/dist/api/types/SessionAiResponseResponseMetadataModelUsage.d.ts +0 -10
  344. package/dist/api/types/SessionConfig.d.ts +0 -15
  345. package/dist/api/types/SessionOutputV1Body.d.ts +0 -12
  346. package/dist/api/types/SessionWithConnectionInfo.d.ts +0 -10
  347. package/dist/api/types/SessionsOutputV1Body.d.ts +0 -10
  348. package/dist/serialization/resources/sessions/client/requests/SessionPromptContentRequest.d.ts +0 -16
  349. package/dist/serialization/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.d.ts +0 -16
  350. package/dist/serialization/types/CleanScrapeResponse.d.ts +0 -16
  351. package/dist/serialization/types/CleanScrapeResponseData.d.ts +0 -15
  352. package/dist/serialization/types/CleanScrapeResponseDataStatus.d.ts +0 -10
  353. package/dist/serialization/types/ConnectionInfo.d.ts +0 -16
  354. package/dist/serialization/types/ConnectionInfo.js +0 -37
  355. package/dist/serialization/types/ErrorDetail.d.ts +0 -14
  356. package/dist/serialization/types/ErrorModel.d.ts +0 -19
  357. package/dist/serialization/types/ErrorModel.js +0 -40
  358. package/dist/serialization/types/LiveViewConnectionInfo.d.ts +0 -13
  359. package/dist/serialization/types/LiveViewUrlOutputV1Body.d.ts +0 -15
  360. package/dist/serialization/types/ProfileOutputV1Body.d.ts +0 -14
  361. package/dist/serialization/types/ProfileV1.js +0 -36
  362. package/dist/serialization/types/ProfilesOutputV1Body.d.ts +0 -14
  363. package/dist/serialization/types/ProfilesOutputV1Body.js +0 -35
  364. package/dist/serialization/types/Session.d.ts +0 -19
  365. package/dist/serialization/types/SessionAiResponse.d.ts +0 -19
  366. package/dist/serialization/types/SessionAiResponse.js +0 -40
  367. package/dist/serialization/types/SessionAiResponseData.d.ts +0 -14
  368. package/dist/serialization/types/SessionAiResponseDataStatus.d.ts +0 -10
  369. package/dist/serialization/types/SessionAiResponseMetadata.d.ts +0 -15
  370. package/dist/serialization/types/SessionAiResponseMetadataUsage.d.ts +0 -16
  371. package/dist/serialization/types/SessionAiResponseMetadataUsage.js +0 -37
  372. package/dist/serialization/types/SessionAiResponseResponseMetadataModelUsage.d.ts +0 -16
  373. package/dist/serialization/types/SessionAiResponseResponseMetadataModelUsage.js +0 -37
  374. package/dist/serialization/types/SessionConfig.d.ts +0 -16
  375. package/dist/serialization/types/SessionConfig.js +0 -37
  376. package/dist/serialization/types/SessionOutputV1Body.d.ts +0 -16
  377. package/dist/serialization/types/SessionOutputV1Body.js +0 -37
  378. package/dist/serialization/types/SessionWithConnectionInfo.d.ts +0 -15
  379. package/dist/serialization/types/SessionWithConnectionInfo.js +0 -36
  380. package/dist/serialization/types/SessionsOutputV1Body.d.ts +0 -14
  381. package/dist/serialization/types/SessionsOutputV1Body.js +0 -35
  382. package/serialization/resources/sessions/client/requests/SessionPromptContentRequest.d.ts +0 -16
  383. package/serialization/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.d.ts +0 -16
  384. package/serialization/types/CleanScrapeResponse.d.ts +0 -16
  385. package/serialization/types/CleanScrapeResponseData.d.ts +0 -15
  386. package/serialization/types/CleanScrapeResponseData.js +0 -36
  387. package/serialization/types/CleanScrapeResponseDataStatus.d.ts +0 -10
  388. package/serialization/types/ConnectionInfo.d.ts +0 -16
  389. package/serialization/types/ConnectionInfo.js +0 -37
  390. package/serialization/types/ErrorDetail.d.ts +0 -14
  391. package/serialization/types/ErrorDetail.js +0 -35
  392. package/serialization/types/ErrorModel.d.ts +0 -19
  393. package/serialization/types/ErrorModel.js +0 -40
  394. package/serialization/types/LiveViewConnectionInfo.d.ts +0 -13
  395. package/serialization/types/LiveViewConnectionInfo.js +0 -34
  396. package/serialization/types/LiveViewUrlOutputV1Body.d.ts +0 -15
  397. package/serialization/types/LiveViewUrlOutputV1Body.js +0 -36
  398. package/serialization/types/ProfileOutputV1Body.d.ts +0 -14
  399. package/serialization/types/ProfileOutputV1Body.js +0 -35
  400. package/serialization/types/ProfileV1.js +0 -36
  401. package/serialization/types/ProfilesOutputV1Body.d.ts +0 -14
  402. package/serialization/types/ProfilesOutputV1Body.js +0 -35
  403. package/serialization/types/Session.d.ts +0 -19
  404. package/serialization/types/SessionAiResponse.d.ts +0 -19
  405. package/serialization/types/SessionAiResponse.js +0 -40
  406. package/serialization/types/SessionAiResponseData.d.ts +0 -14
  407. package/serialization/types/SessionAiResponseData.js +0 -35
  408. package/serialization/types/SessionAiResponseDataStatus.d.ts +0 -10
  409. package/serialization/types/SessionAiResponseMetadata.d.ts +0 -15
  410. package/serialization/types/SessionAiResponseMetadataUsage.d.ts +0 -16
  411. package/serialization/types/SessionAiResponseMetadataUsage.js +0 -37
  412. package/serialization/types/SessionAiResponseResponseMetadataModelUsage.d.ts +0 -16
  413. package/serialization/types/SessionAiResponseResponseMetadataModelUsage.js +0 -37
  414. package/serialization/types/SessionConfig.d.ts +0 -16
  415. package/serialization/types/SessionConfig.js +0 -37
  416. package/serialization/types/SessionOutputV1Body.d.ts +0 -16
  417. package/serialization/types/SessionOutputV1Body.js +0 -37
  418. package/serialization/types/SessionWithConnectionInfo.d.ts +0 -15
  419. package/serialization/types/SessionWithConnectionInfo.js +0 -36
  420. package/serialization/types/SessionsOutputV1Body.d.ts +0 -14
  421. package/serialization/types/SessionsOutputV1Body.js +0 -35
  422. /package/api/resources/{sessions/client/requests/SessionPromptContentRequest.js → windows/client/requests/GetWindowInfoRequest.js} +0 -0
  423. /package/api/resources/{sessions/client/requests/SessionPromptPaginatedExtractionRequest.js → windows/client/requests/PromptContentRequest.js} +0 -0
  424. /package/api/{types/CleanScrapeResponse.js → resources/windows/client/requests/ScrapeContentRequest.js} +0 -0
  425. /package/api/{types/CleanScrapeResponseData.js → resources/windows/client/requests/SummarizeContentRequest.js} +0 -0
  426. /package/api/types/{CleanScrapeResponseOutput.js → AiResponseEnvelope.js} +0 -0
  427. /package/api/types/{ConnectionInfo.js → AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.js} +0 -0
  428. /package/api/types/{ErrorDetail.js → DefaultMetaWrapper.js} +0 -0
  429. /package/api/types/{ErrorModel.js → ErrorEnvelope.js} +0 -0
  430. /package/api/types/{LiveViewConnectionInfo.js → ExternalProfileV1.js} +0 -0
  431. /package/api/types/{LiveViewUrlOutputV1Body.js → ExternalSessionAiResponseMetadata.js} +0 -0
  432. /package/api/types/{ProfileOutputV1Body.js → ExternalSessionAiResponseMetadataUsage.js} +0 -0
  433. /package/api/types/{ProfileV1.js → ExternalSessionConfig.js} +0 -0
  434. /package/api/types/{ProfilesOutputV1Body.js → ExternalSessionWithConnectionInfo.js} +0 -0
  435. /package/api/types/{Session.js → ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js} +0 -0
  436. /package/api/types/{SessionAiResponse.js → Issue.js} +0 -0
  437. /package/api/types/{SessionAiResponseData.js → ListExternalProfileV1EnvelopeDefaultMetaWrapper.js} +0 -0
  438. /package/api/types/{SessionAiResponseIssue.js → Pagination.js} +0 -0
  439. /package/api/types/{SessionAiResponseMetadata.js → ScrapeResponseEnvelope.js} +0 -0
  440. /package/api/types/{SessionAiResponseMetadataUsage.js → ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.js} +0 -0
  441. /package/api/types/{SessionAiResponseResponseMetadataModelUsage.js → ScrapeResponseOutput.js} +0 -0
  442. /package/api/types/{SessionConfig.js → SessionsWithPagination.js} +0 -0
  443. /package/api/types/{SessionOutputV1Body.js → SessionsWithPaginationEnvelopeDefaultMetaWrapper.js} +0 -0
  444. /package/api/types/{SessionWithConnectionInfo.js → Window.js} +0 -0
  445. /package/api/types/{SessionsOutputV1Body.js → WindowEnvelopeDefaultMetaWrapper.js} +0 -0
  446. /package/dist/api/resources/{sessions/client/requests/SessionPromptContentRequest.js → windows/client/requests/GetWindowInfoRequest.js} +0 -0
  447. /package/dist/api/resources/{sessions/client/requests/SessionPromptPaginatedExtractionRequest.js → windows/client/requests/PromptContentRequest.js} +0 -0
  448. /package/dist/api/{types/CleanScrapeResponse.js → resources/windows/client/requests/ScrapeContentRequest.js} +0 -0
  449. /package/dist/api/{types/CleanScrapeResponseData.js → resources/windows/client/requests/SummarizeContentRequest.js} +0 -0
  450. /package/dist/api/types/{CleanScrapeResponseOutput.js → AiResponseEnvelope.js} +0 -0
  451. /package/dist/api/types/{ConnectionInfo.js → AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.js} +0 -0
  452. /package/dist/api/types/{ErrorDetail.js → DefaultMetaWrapper.js} +0 -0
  453. /package/dist/api/types/{ErrorModel.js → ErrorEnvelope.js} +0 -0
  454. /package/dist/api/types/{LiveViewConnectionInfo.js → ExternalProfileV1.js} +0 -0
  455. /package/dist/api/types/{LiveViewUrlOutputV1Body.js → ExternalSessionAiResponseMetadata.js} +0 -0
  456. /package/dist/api/types/{ProfileOutputV1Body.js → ExternalSessionAiResponseMetadataUsage.js} +0 -0
  457. /package/dist/api/types/{ProfileV1.js → ExternalSessionConfig.js} +0 -0
  458. /package/dist/api/types/{ProfilesOutputV1Body.js → ExternalSessionWithConnectionInfo.js} +0 -0
  459. /package/dist/api/types/{Session.js → ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js} +0 -0
  460. /package/dist/api/types/{SessionAiResponse.js → Issue.js} +0 -0
  461. /package/dist/api/types/{SessionAiResponseData.js → ListExternalProfileV1EnvelopeDefaultMetaWrapper.js} +0 -0
  462. /package/dist/api/types/{SessionAiResponseIssue.js → Pagination.js} +0 -0
  463. /package/dist/api/types/{SessionAiResponseMetadata.js → ScrapeResponseEnvelope.js} +0 -0
  464. /package/dist/api/types/{SessionAiResponseMetadataUsage.js → ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.js} +0 -0
  465. /package/dist/api/types/{SessionAiResponseResponseMetadataModelUsage.js → ScrapeResponseOutput.js} +0 -0
  466. /package/dist/api/types/{SessionConfig.js → SessionsWithPagination.js} +0 -0
  467. /package/dist/api/types/{SessionOutputV1Body.js → SessionsWithPaginationEnvelopeDefaultMetaWrapper.js} +0 -0
  468. /package/dist/api/types/{SessionWithConnectionInfo.js → Window.js} +0 -0
  469. /package/dist/api/types/{SessionsOutputV1Body.js → WindowEnvelopeDefaultMetaWrapper.js} +0 -0
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SessionsListRequestStatus = void 0;
7
+ exports.SessionsListRequestStatus = {
8
+ AwaitingCapacity: "awaiting_capacity",
9
+ Initializing: "initializing",
10
+ Running: "running",
11
+ Ended: "ended",
12
+ };
@@ -1,3 +1,4 @@
1
+ export * from "./SessionsListRequestStatus";
1
2
  export * from "./SessionsEventsResponseStatus";
2
3
  export * from "./SessionsEventsResponseError";
3
4
  export * from "./SessionsEventsResponse";
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./SessionsListRequestStatus"), exports);
17
18
  __exportStar(require("./SessionsEventsResponseStatus"), exports);
18
19
  __exportStar(require("./SessionsEventsResponseError"), exports);
19
20
  __exportStar(require("./SessionsEventsResponse"), exports);
@@ -0,0 +1,70 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../environments";
5
+ import * as core from "../../../../core";
6
+ import * as Airtop from "../../../index";
7
+ export declare namespace Windows {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.AirtopEnvironment | string>;
10
+ apiKey?: core.Supplier<core.BearerToken | undefined>;
11
+ fetcher?: core.FetchFunction;
12
+ }
13
+ interface RequestOptions {
14
+ /** The maximum time to wait for a response in seconds. */
15
+ timeoutInSeconds?: number;
16
+ /** The number of times to retry the request. Defaults to 2. */
17
+ maxRetries?: number;
18
+ /** A hook to abort the request. */
19
+ abortSignal?: AbortSignal;
20
+ }
21
+ }
22
+ export declare class Windows {
23
+ protected readonly _options: Windows.Options;
24
+ constructor(_options?: Windows.Options);
25
+ /**
26
+ * @param {string} sessionId - ID of the session that owns the window
27
+ * @param {string} windowId - id of the browser window, either the windowId (uuid) or targetId (simple string)
28
+ * @param {Airtop.GetWindowInfoRequest} request
29
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
30
+ *
31
+ * @example
32
+ * await client.windows.getWindowInfo("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "7334da2a-91b0-42c5-6156-76a5eba87430", {
33
+ * screenResolution: "1920x1080"
34
+ * })
35
+ */
36
+ getWindowInfo(sessionId: string, windowId: string, request?: Airtop.GetWindowInfoRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.WindowEnvelopeDefaultMetaWrapper>;
37
+ /**
38
+ * @param {string} sessionId - The session id to submit a prompt about
39
+ * @param {string} windowId - The window id to submit a prompt about
40
+ * @param {Airtop.PromptContentRequest} request
41
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
42
+ *
43
+ * @example
44
+ * await client.windows.promptContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
45
+ * prompt: "What is the main idea of this page?"
46
+ * })
47
+ */
48
+ promptContent(sessionId: string, windowId: string, request: Airtop.PromptContentRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper>;
49
+ /**
50
+ * @param {string} sessionId - The session id to scrape
51
+ * @param {string} windowId - The window id to scrape
52
+ * @param {Airtop.ScrapeContentRequest} request
53
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
54
+ *
55
+ * @example
56
+ * await client.windows.scrapeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
57
+ */
58
+ scrapeContent(sessionId: string, windowId: string, request?: Airtop.ScrapeContentRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper>;
59
+ /**
60
+ * @param {string} sessionId - The session id to summarize
61
+ * @param {string} windowId - The window id to summarize
62
+ * @param {Airtop.SummarizeContentRequest} request
63
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
64
+ *
65
+ * @example
66
+ * await client.windows.summarizeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
67
+ */
68
+ summarizeContent(sessionId: string, windowId: string, request?: Airtop.SummarizeContentRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper>;
69
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
70
+ }
@@ -0,0 +1,320 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ var __importDefault = (this && this.__importDefault) || function (mod) {
38
+ return (mod && mod.__esModule) ? mod : { "default": mod };
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.Windows = void 0;
42
+ const environments = __importStar(require("../../../../environments"));
43
+ const core = __importStar(require("../../../../core"));
44
+ const url_join_1 = __importDefault(require("url-join"));
45
+ const serializers = __importStar(require("../../../../serialization/index"));
46
+ const errors = __importStar(require("../../../../errors/index"));
47
+ class Windows {
48
+ constructor(_options = {}) {
49
+ this._options = _options;
50
+ }
51
+ /**
52
+ * @param {string} sessionId - ID of the session that owns the window
53
+ * @param {string} windowId - id of the browser window, either the windowId (uuid) or targetId (simple string)
54
+ * @param {Airtop.GetWindowInfoRequest} request
55
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
56
+ *
57
+ * @example
58
+ * await client.windows.getWindowInfo("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "7334da2a-91b0-42c5-6156-76a5eba87430", {
59
+ * screenResolution: "1920x1080"
60
+ * })
61
+ */
62
+ getWindowInfo(sessionId, windowId, request = {}, requestOptions) {
63
+ var _a, _b;
64
+ return __awaiter(this, void 0, void 0, function* () {
65
+ const { includeNavigationBar, disableResize, screenResolution } = request;
66
+ const _queryParams = {};
67
+ if (includeNavigationBar != null) {
68
+ _queryParams["includeNavigationBar"] = includeNavigationBar.toString();
69
+ }
70
+ if (disableResize != null) {
71
+ _queryParams["disableResize"] = disableResize.toString();
72
+ }
73
+ if (screenResolution != null) {
74
+ _queryParams["Screen resolution"] = screenResolution;
75
+ }
76
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
77
+ 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)}`),
78
+ method: "GET",
79
+ headers: {
80
+ Authorization: yield this._getAuthorizationHeader(),
81
+ "X-Fern-Language": "JavaScript",
82
+ "X-Fern-SDK-Name": "@airtop/sdk",
83
+ "X-Fern-SDK-Version": "0.0.10-a",
84
+ "User-Agent": "@airtop/sdk/0.0.10-a",
85
+ "X-Fern-Runtime": core.RUNTIME.type,
86
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
87
+ },
88
+ contentType: "application/json",
89
+ queryParameters: _queryParams,
90
+ requestType: "json",
91
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
92
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
93
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
94
+ });
95
+ if (_response.ok) {
96
+ return serializers.WindowEnvelopeDefaultMetaWrapper.parseOrThrow(_response.body, {
97
+ unrecognizedObjectKeys: "passthrough",
98
+ allowUnrecognizedUnionMembers: true,
99
+ allowUnrecognizedEnumValues: true,
100
+ skipValidation: true,
101
+ breadcrumbsPrefix: ["response"],
102
+ });
103
+ }
104
+ if (_response.error.reason === "status-code") {
105
+ throw new errors.AirtopError({
106
+ statusCode: _response.error.statusCode,
107
+ body: _response.error.body,
108
+ });
109
+ }
110
+ switch (_response.error.reason) {
111
+ case "non-json":
112
+ throw new errors.AirtopError({
113
+ statusCode: _response.error.statusCode,
114
+ body: _response.error.rawBody,
115
+ });
116
+ case "timeout":
117
+ throw new errors.AirtopTimeoutError();
118
+ case "unknown":
119
+ throw new errors.AirtopError({
120
+ message: _response.error.errorMessage,
121
+ });
122
+ }
123
+ });
124
+ }
125
+ /**
126
+ * @param {string} sessionId - The session id to submit a prompt about
127
+ * @param {string} windowId - The window id to submit a prompt about
128
+ * @param {Airtop.PromptContentRequest} request
129
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
130
+ *
131
+ * @example
132
+ * await client.windows.promptContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
133
+ * prompt: "What is the main idea of this page?"
134
+ * })
135
+ */
136
+ promptContent(sessionId, windowId, request, requestOptions) {
137
+ var _a, _b;
138
+ return __awaiter(this, void 0, void 0, function* () {
139
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
140
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/prompt-content`),
141
+ method: "POST",
142
+ headers: {
143
+ Authorization: yield this._getAuthorizationHeader(),
144
+ "X-Fern-Language": "JavaScript",
145
+ "X-Fern-SDK-Name": "@airtop/sdk",
146
+ "X-Fern-SDK-Version": "0.0.10-a",
147
+ "User-Agent": "@airtop/sdk/0.0.10-a",
148
+ "X-Fern-Runtime": core.RUNTIME.type,
149
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
150
+ },
151
+ contentType: "application/json",
152
+ requestType: "json",
153
+ body: serializers.PromptContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
154
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
155
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
156
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
157
+ });
158
+ if (_response.ok) {
159
+ return serializers.AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.parseOrThrow(_response.body, {
160
+ unrecognizedObjectKeys: "passthrough",
161
+ allowUnrecognizedUnionMembers: true,
162
+ allowUnrecognizedEnumValues: true,
163
+ skipValidation: true,
164
+ breadcrumbsPrefix: ["response"],
165
+ });
166
+ }
167
+ if (_response.error.reason === "status-code") {
168
+ throw new errors.AirtopError({
169
+ statusCode: _response.error.statusCode,
170
+ body: _response.error.body,
171
+ });
172
+ }
173
+ switch (_response.error.reason) {
174
+ case "non-json":
175
+ throw new errors.AirtopError({
176
+ statusCode: _response.error.statusCode,
177
+ body: _response.error.rawBody,
178
+ });
179
+ case "timeout":
180
+ throw new errors.AirtopTimeoutError();
181
+ case "unknown":
182
+ throw new errors.AirtopError({
183
+ message: _response.error.errorMessage,
184
+ });
185
+ }
186
+ });
187
+ }
188
+ /**
189
+ * @param {string} sessionId - The session id to scrape
190
+ * @param {string} windowId - The window id to scrape
191
+ * @param {Airtop.ScrapeContentRequest} request
192
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
193
+ *
194
+ * @example
195
+ * await client.windows.scrapeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
196
+ */
197
+ scrapeContent(sessionId, windowId, request = {}, requestOptions) {
198
+ var _a, _b;
199
+ return __awaiter(this, void 0, void 0, function* () {
200
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
201
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/scrape-content`),
202
+ method: "POST",
203
+ headers: {
204
+ Authorization: yield this._getAuthorizationHeader(),
205
+ "X-Fern-Language": "JavaScript",
206
+ "X-Fern-SDK-Name": "@airtop/sdk",
207
+ "X-Fern-SDK-Version": "0.0.10-a",
208
+ "User-Agent": "@airtop/sdk/0.0.10-a",
209
+ "X-Fern-Runtime": core.RUNTIME.type,
210
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
211
+ },
212
+ contentType: "application/json",
213
+ requestType: "json",
214
+ body: serializers.ScrapeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
215
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
216
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
217
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
218
+ });
219
+ if (_response.ok) {
220
+ return serializers.ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.parseOrThrow(_response.body, {
221
+ unrecognizedObjectKeys: "passthrough",
222
+ allowUnrecognizedUnionMembers: true,
223
+ allowUnrecognizedEnumValues: true,
224
+ skipValidation: true,
225
+ breadcrumbsPrefix: ["response"],
226
+ });
227
+ }
228
+ if (_response.error.reason === "status-code") {
229
+ throw new errors.AirtopError({
230
+ statusCode: _response.error.statusCode,
231
+ body: _response.error.body,
232
+ });
233
+ }
234
+ switch (_response.error.reason) {
235
+ case "non-json":
236
+ throw new errors.AirtopError({
237
+ statusCode: _response.error.statusCode,
238
+ body: _response.error.rawBody,
239
+ });
240
+ case "timeout":
241
+ throw new errors.AirtopTimeoutError();
242
+ case "unknown":
243
+ throw new errors.AirtopError({
244
+ message: _response.error.errorMessage,
245
+ });
246
+ }
247
+ });
248
+ }
249
+ /**
250
+ * @param {string} sessionId - The session id to summarize
251
+ * @param {string} windowId - The window id to summarize
252
+ * @param {Airtop.SummarizeContentRequest} request
253
+ * @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
254
+ *
255
+ * @example
256
+ * await client.windows.summarizeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
257
+ */
258
+ summarizeContent(sessionId, windowId, request = {}, requestOptions) {
259
+ var _a, _b;
260
+ return __awaiter(this, void 0, void 0, function* () {
261
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
262
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/summarize-content`),
263
+ method: "POST",
264
+ headers: {
265
+ Authorization: yield this._getAuthorizationHeader(),
266
+ "X-Fern-Language": "JavaScript",
267
+ "X-Fern-SDK-Name": "@airtop/sdk",
268
+ "X-Fern-SDK-Version": "0.0.10-a",
269
+ "User-Agent": "@airtop/sdk/0.0.10-a",
270
+ "X-Fern-Runtime": core.RUNTIME.type,
271
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
272
+ },
273
+ contentType: "application/json",
274
+ requestType: "json",
275
+ body: serializers.SummarizeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
276
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
277
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
278
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
279
+ });
280
+ if (_response.ok) {
281
+ return serializers.AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.parseOrThrow(_response.body, {
282
+ unrecognizedObjectKeys: "passthrough",
283
+ allowUnrecognizedUnionMembers: true,
284
+ allowUnrecognizedEnumValues: true,
285
+ skipValidation: true,
286
+ breadcrumbsPrefix: ["response"],
287
+ });
288
+ }
289
+ if (_response.error.reason === "status-code") {
290
+ throw new errors.AirtopError({
291
+ statusCode: _response.error.statusCode,
292
+ body: _response.error.body,
293
+ });
294
+ }
295
+ switch (_response.error.reason) {
296
+ case "non-json":
297
+ throw new errors.AirtopError({
298
+ statusCode: _response.error.statusCode,
299
+ body: _response.error.rawBody,
300
+ });
301
+ case "timeout":
302
+ throw new errors.AirtopTimeoutError();
303
+ case "unknown":
304
+ throw new errors.AirtopError({
305
+ message: _response.error.errorMessage,
306
+ });
307
+ }
308
+ });
309
+ }
310
+ _getAuthorizationHeader() {
311
+ return __awaiter(this, void 0, void 0, function* () {
312
+ const bearer = yield core.Supplier.get(this._options.apiKey);
313
+ if (bearer != null) {
314
+ return `Bearer ${bearer}`;
315
+ }
316
+ return undefined;
317
+ });
318
+ }
319
+ }
320
+ exports.Windows = Windows;
@@ -0,0 +1 @@
1
+ export * from "./requests";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests"), exports);
@@ -0,0 +1,23 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * screenResolution: "1920x1080"
8
+ * }
9
+ */
10
+ export interface GetWindowInfoRequest {
11
+ /**
12
+ * Renders a navigation bar as part of the live view session
13
+ */
14
+ includeNavigationBar?: boolean;
15
+ /**
16
+ * By default browsers will adapt its resolution to the live view window size. This flag disables that behavior
17
+ */
18
+ disableResize?: boolean;
19
+ /**
20
+ * Ex: Screen resolution of the live view in format wxh, e.g. 1920x1080. When this value is provided the live view won't adapt it's resolution to the live view window size
21
+ */
22
+ screenResolution?: string;
23
+ }
@@ -7,12 +7,12 @@
7
7
  * prompt: "What is the main idea of this page?"
8
8
  * }
9
9
  */
10
- export interface SessionPromptContentRequest {
11
- /** A URL to the JSON Schema for this object. */
12
- schema?: string;
10
+ export interface PromptContentRequest {
11
+ clientRequestId?: string;
13
12
  costThresholdCredits?: number;
14
- customerRequestId?: string;
13
+ /** Whether to follow pagination links in the content and load additional results */
14
+ followPaginationLinks?: boolean;
15
15
  /** The prompt to submit about the content in the browser window */
16
16
  prompt: string;
17
- timeThresholdMs?: number;
17
+ timeThresholdSeconds?: number;
18
18
  }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface ScrapeContentRequest {
9
+ clientRequestId?: string;
10
+ costThresholdCredits?: number;
11
+ timeThresholdSeconds?: number;
12
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface SummarizeContentRequest {
9
+ clientRequestId?: string;
10
+ costThresholdCredits?: number;
11
+ /** The prompt to submit about the content in the browser window */
12
+ prompt?: string;
13
+ timeThresholdSeconds?: number;
14
+ }
@@ -0,0 +1,4 @@
1
+ export { type GetWindowInfoRequest } from "./GetWindowInfoRequest";
2
+ export { type PromptContentRequest } from "./PromptContentRequest";
3
+ export { type ScrapeContentRequest } from "./ScrapeContentRequest";
4
+ export { type SummarizeContentRequest } from "./SummarizeContentRequest";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./client";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client"), exports);
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Airtop from "../index";
5
+ export interface AiResponseEnvelope {
6
+ errors?: Airtop.Issue[];
7
+ modelResponse: string;
8
+ warnings?: Airtop.Issue[];
9
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Airtop from "../index";
5
+ export interface AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper {
6
+ data: Airtop.AiResponseEnvelope;
7
+ errors?: Airtop.Issue[];
8
+ meta: Airtop.ExternalSessionAiResponseMetadata;
9
+ warnings?: Airtop.Issue[];
10
+ }
@@ -2,5 +2,5 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface ClientProvidedResponseMetadata {
5
- customerRequestId?: string;
5
+ clientRequestId?: string;
6
6
  }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface DefaultMetaWrapper {
5
+ requestId?: string;
6
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Airtop from "../index";
5
+ export interface ErrorEnvelope {
6
+ httpStatus: number;
7
+ message: string;
8
+ data?: unknown;
9
+ errors?: Airtop.Issue[];
10
+ meta?: unknown;
11
+ warnings?: Airtop.Issue[];
12
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface ExternalProfileV1 {
5
+ /** Id of the profile */
6
+ profileId: string;
7
+ /** Status of the profile */
8
+ status?: string;
9
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Airtop from "../index";
5
+ export interface ExternalSessionAiResponseMetadata {
6
+ clientProvided?: Airtop.ClientProvidedResponseMetadata;
7
+ requestId?: string;
8
+ status: Airtop.ExternalSessionAiResponseMetadataStatus;
9
+ usage: Airtop.ExternalSessionAiResponseMetadataUsage;
10
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type ExternalSessionAiResponseMetadataStatus = "success" | "partial" | "failure";
5
+ export declare const ExternalSessionAiResponseMetadataStatus: {
6
+ readonly Success: "success";
7
+ readonly Partial: "partial";
8
+ readonly Failure: "failure";
9
+ };
@@ -3,9 +3,9 @@
3
3
  * This file was auto-generated by Fern from our API Definition.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.SessionAiResponseDataStatus = void 0;
7
- exports.SessionAiResponseDataStatus = {
6
+ exports.ExternalSessionAiResponseMetadataStatus = void 0;
7
+ exports.ExternalSessionAiResponseMetadataStatus = {
8
8
  Success: "success",
9
- PartialSuccess: "partial_success",
9
+ Partial: "partial",
10
10
  Failure: "failure",
11
11
  };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface ExternalSessionAiResponseMetadataUsage {
5
+ /** The credit usage for this request */
6
+ credits: number;
7
+ /** The id of the request */
8
+ id: string;
9
+ }