@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
package/Client.d.ts CHANGED
@@ -5,11 +5,11 @@ import * as environments from "./environments";
5
5
  import * as core from "./core";
6
6
  import { Profiles } from "./api/resources/profiles/client/Client";
7
7
  import { Sessions } from "./api/resources/sessions/client/Client";
8
+ import { Windows } from "./api/resources/windows/client/Client";
8
9
  export declare namespace AirtopClient {
9
10
  interface Options {
10
11
  environment?: core.Supplier<environments.AirtopEnvironment | string>;
11
- /** Override the x-airtop-token header */
12
- airtopToken?: core.Supplier<string | undefined>;
12
+ apiKey?: core.Supplier<core.BearerToken | undefined>;
13
13
  fetcher?: core.FetchFunction;
14
14
  }
15
15
  interface RequestOptions {
@@ -19,8 +19,6 @@ export declare namespace AirtopClient {
19
19
  maxRetries?: number;
20
20
  /** A hook to abort the request. */
21
21
  abortSignal?: AbortSignal;
22
- /** Override the x-airtop-token header */
23
- airtopToken?: string | undefined;
24
22
  }
25
23
  }
26
24
  export declare class AirtopClient {
@@ -30,4 +28,6 @@ export declare class AirtopClient {
30
28
  get profiles(): Profiles;
31
29
  protected _sessions: Sessions | undefined;
32
30
  get sessions(): Sessions;
31
+ protected _windows: Windows | undefined;
32
+ get windows(): Windows;
33
33
  }
package/Client.js CHANGED
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.AirtopClient = void 0;
7
7
  const Client_1 = require("./api/resources/profiles/client/Client");
8
8
  const Client_2 = require("./api/resources/sessions/client/Client");
9
+ const Client_3 = require("./api/resources/windows/client/Client");
9
10
  class AirtopClient {
10
11
  constructor(_options = {}) {
11
12
  this._options = _options;
@@ -18,5 +19,9 @@ class AirtopClient {
18
19
  var _a;
19
20
  return ((_a = this._sessions) !== null && _a !== void 0 ? _a : (this._sessions = new Client_2.Sessions(this._options)));
20
21
  }
22
+ get windows() {
23
+ var _a;
24
+ return ((_a = this._windows) !== null && _a !== void 0 ? _a : (this._windows = new Client_3.Windows(this._options)));
25
+ }
21
26
  }
22
27
  exports.AirtopClient = AirtopClient;
package/README.md CHANGED
@@ -18,8 +18,8 @@ Instantiate and use the client with the following:
18
18
  ```typescript
19
19
  import { AirtopClient } from "@airtop/sdk";
20
20
 
21
- const client = new AirtopClient({ airtopToken: "YOUR_AIRTOP_TOKEN" });
22
- await client.sessions.post();
21
+ const client = new AirtopClient({ apiKey: "YOUR_API_KEY" });
22
+ await client.sessions.create();
23
23
  ```
24
24
 
25
25
  ## Request And Response Types
@@ -44,7 +44,7 @@ will be thrown.
44
44
  import { AirtopError } from "@airtop/sdk";
45
45
 
46
46
  try {
47
- await client.sessions.post(...);
47
+ await client.sessions.create(...);
48
48
  } catch (err) {
49
49
  if (err instanceof AirtopError) {
50
50
  console.log(err.statusCode);
@@ -71,7 +71,7 @@ A request is deemed retriable when any of the following HTTP status codes is ret
71
71
  Use the `maxRetries` request option to configure this behavior.
72
72
 
73
73
  ```typescript
74
- const response = await client.sessions.post(..., {
74
+ const response = await client.sessions.create(..., {
75
75
  maxRetries: 0 // override maxRetries at the request level
76
76
  });
77
77
  ```
@@ -81,7 +81,7 @@ const response = await client.sessions.post(..., {
81
81
  The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
82
82
 
83
83
  ```typescript
84
- const response = await client.sessions.post(..., {
84
+ const response = await client.sessions.create(..., {
85
85
  timeoutInSeconds: 30 // override timeout to 30s
86
86
  });
87
87
  ```
@@ -92,7 +92,7 @@ The SDK allows users to abort requests at any point by passing in an abort signa
92
92
 
93
93
  ```typescript
94
94
  const controller = new AbortController();
95
- const response = await client.sessions.post(..., {
95
+ const response = await client.sessions.create(..., {
96
96
  abortSignal: controller.signal
97
97
  });
98
98
  controller.abort(); // aborts the request
@@ -4,5 +4,5 @@
4
4
  import * as errors from "../../errors/index";
5
5
  import * as Airtop from "../index";
6
6
  export declare class InternalServerError extends errors.AirtopError {
7
- constructor(body: Airtop.ErrorModel);
7
+ constructor(body: Airtop.ErrorEnvelope);
8
8
  }
@@ -4,5 +4,5 @@
4
4
  import * as errors from "../../errors/index";
5
5
  import * as Airtop from "../index";
6
6
  export declare class NotFoundError extends errors.AirtopError {
7
- constructor(body: Airtop.ErrorModel);
7
+ constructor(body: Airtop.ErrorEnvelope);
8
8
  }
@@ -4,5 +4,5 @@
4
4
  import * as errors from "../../errors/index";
5
5
  import * as Airtop from "../index";
6
6
  export declare class UnprocessableEntityError extends errors.AirtopError {
7
- constructor(body: Airtop.ErrorModel);
7
+ constructor(body: Airtop.ErrorEnvelope);
8
8
  }
@@ -1,5 +1,7 @@
1
1
  export * as sessions from "./sessions";
2
2
  export * from "./sessions/types";
3
3
  export * as profiles from "./profiles";
4
+ export * as windows from "./windows";
4
5
  export * from "./profiles/client/requests";
5
6
  export * from "./sessions/client/requests";
7
+ export * from "./windows/client/requests";
@@ -26,9 +26,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
26
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.profiles = exports.sessions = void 0;
29
+ exports.windows = exports.profiles = exports.sessions = void 0;
30
30
  exports.sessions = __importStar(require("./sessions"));
31
31
  __exportStar(require("./sessions/types"), exports);
32
32
  exports.profiles = __importStar(require("./profiles"));
33
+ exports.windows = __importStar(require("./windows"));
33
34
  __exportStar(require("./profiles/client/requests"), exports);
34
35
  __exportStar(require("./sessions/client/requests"), exports);
36
+ __exportStar(require("./windows/client/requests"), exports);
@@ -7,8 +7,7 @@ import * as Airtop from "../../../index";
7
7
  export declare namespace Profiles {
8
8
  interface Options {
9
9
  environment?: core.Supplier<environments.AirtopEnvironment | string>;
10
- /** Override the x-airtop-token header */
11
- airtopToken?: core.Supplier<string | undefined>;
10
+ apiKey?: core.Supplier<core.BearerToken | undefined>;
12
11
  fetcher?: core.FetchFunction;
13
12
  }
14
13
  interface RequestOptions {
@@ -18,49 +17,30 @@ export declare namespace Profiles {
18
17
  maxRetries?: number;
19
18
  /** A hook to abort the request. */
20
19
  abortSignal?: AbortSignal;
21
- /** Override the x-airtop-token header */
22
- airtopToken?: string | undefined;
23
20
  }
24
21
  }
25
22
  export declare class Profiles {
26
23
  protected readonly _options: Profiles.Options;
27
24
  constructor(_options?: Profiles.Options);
28
25
  /**
29
- * Get profiles, searching by name or tags
26
+ * Get profiles matching by id
30
27
  *
31
28
  * @param {Airtop.ProfilesGetRequest} request
32
29
  * @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
33
30
  *
34
31
  * @example
35
- * await client.profiles.get({
36
- * name: "^Acme.*"
37
- * })
32
+ * await client.profiles.get()
38
33
  */
39
- get(request?: Airtop.ProfilesGetRequest, requestOptions?: Profiles.RequestOptions): Promise<Airtop.ProfilesOutputV1Body>;
34
+ get(request?: Airtop.ProfilesGetRequest, requestOptions?: Profiles.RequestOptions): Promise<Airtop.ListExternalProfileV1EnvelopeDefaultMetaWrapper>;
40
35
  /**
41
- * Delete profiles matching query
36
+ * Delete profiles matching by id
42
37
  *
43
38
  * @param {Airtop.ProfilesDeleteRequest} request
44
39
  * @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
45
40
  *
46
41
  * @example
47
- * await client.profiles.delete({
48
- * name: "^Acme.*"
49
- * })
42
+ * await client.profiles.delete()
50
43
  */
51
44
  delete(request?: Airtop.ProfilesDeleteRequest, requestOptions?: Profiles.RequestOptions): Promise<void>;
52
- /**
53
- * Get a profile by ID
54
- *
55
- * @param {string} id - name of the profile to get
56
- * @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
57
- *
58
- * @throws {@link Airtop.NotFoundError}
59
- * @throws {@link Airtop.UnprocessableEntityError}
60
- * @throws {@link Airtop.InternalServerError}
61
- *
62
- * @example
63
- * await client.profiles.getById("4a61a55c-391b-4f73-957e-ffbd29ac7cba")
64
- */
65
- getById(id: string, requestOptions?: Profiles.RequestOptions): Promise<Airtop.ProfileOutputV1Body>;
45
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
66
46
  }
@@ -41,7 +41,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
41
41
  exports.Profiles = void 0;
42
42
  const environments = __importStar(require("../../../../environments"));
43
43
  const core = __importStar(require("../../../../core"));
44
- const Airtop = __importStar(require("../../../index"));
45
44
  const url_join_1 = __importDefault(require("url-join"));
46
45
  const serializers = __importStar(require("../../../../serialization/index"));
47
46
  const errors = __importStar(require("../../../../errors/index"));
@@ -50,43 +49,36 @@ class Profiles {
50
49
  this._options = _options;
51
50
  }
52
51
  /**
53
- * Get profiles, searching by name or tags
52
+ * Get profiles matching by id
54
53
  *
55
54
  * @param {Airtop.ProfilesGetRequest} request
56
55
  * @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
57
56
  *
58
57
  * @example
59
- * await client.profiles.get({
60
- * name: "^Acme.*"
61
- * })
58
+ * await client.profiles.get()
62
59
  */
63
60
  get(request = {}, requestOptions) {
64
61
  var _a, _b;
65
62
  return __awaiter(this, void 0, void 0, function* () {
66
- const { name, tags } = request;
63
+ const { profileIds } = request;
67
64
  const _queryParams = {};
68
- if (name != null) {
69
- _queryParams["name"] = name;
70
- }
71
- if (tags != null) {
72
- if (Array.isArray(tags)) {
73
- _queryParams["tags"] = tags.map((item) => item);
65
+ if (profileIds != null) {
66
+ if (Array.isArray(profileIds)) {
67
+ _queryParams["profileIds"] = profileIds.map((item) => item);
74
68
  }
75
69
  else {
76
- _queryParams["tags"] = tags;
70
+ _queryParams["profileIds"] = profileIds;
77
71
  }
78
72
  }
79
73
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
80
74
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, "profiles"),
81
75
  method: "GET",
82
76
  headers: {
83
- "x-airtop-token": (yield core.Supplier.get(this._options.airtopToken)) != null
84
- ? yield core.Supplier.get(this._options.airtopToken)
85
- : undefined,
77
+ Authorization: yield this._getAuthorizationHeader(),
86
78
  "X-Fern-Language": "JavaScript",
87
79
  "X-Fern-SDK-Name": "@airtop/sdk",
88
- "X-Fern-SDK-Version": "0.0.7",
89
- "User-Agent": "@airtop/sdk/0.0.7",
80
+ "X-Fern-SDK-Version": "0.0.10-a",
81
+ "User-Agent": "@airtop/sdk/0.0.10-a",
90
82
  "X-Fern-Runtime": core.RUNTIME.type,
91
83
  "X-Fern-Runtime-Version": core.RUNTIME.version,
92
84
  },
@@ -98,7 +90,7 @@ class Profiles {
98
90
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
99
91
  });
100
92
  if (_response.ok) {
101
- return serializers.ProfilesOutputV1Body.parseOrThrow(_response.body, {
93
+ return serializers.ListExternalProfileV1EnvelopeDefaultMetaWrapper.parseOrThrow(_response.body, {
102
94
  unrecognizedObjectKeys: "passthrough",
103
95
  allowUnrecognizedUnionMembers: true,
104
96
  allowUnrecognizedEnumValues: true,
@@ -128,43 +120,36 @@ class Profiles {
128
120
  });
129
121
  }
130
122
  /**
131
- * Delete profiles matching query
123
+ * Delete profiles matching by id
132
124
  *
133
125
  * @param {Airtop.ProfilesDeleteRequest} request
134
126
  * @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
135
127
  *
136
128
  * @example
137
- * await client.profiles.delete({
138
- * name: "^Acme.*"
139
- * })
129
+ * await client.profiles.delete()
140
130
  */
141
131
  delete(request = {}, requestOptions) {
142
132
  var _a, _b;
143
133
  return __awaiter(this, void 0, void 0, function* () {
144
- const { name, tags } = request;
134
+ const { profileIds } = request;
145
135
  const _queryParams = {};
146
- if (name != null) {
147
- _queryParams["name"] = name;
148
- }
149
- if (tags != null) {
150
- if (Array.isArray(tags)) {
151
- _queryParams["tags"] = tags.map((item) => item);
136
+ if (profileIds != null) {
137
+ if (Array.isArray(profileIds)) {
138
+ _queryParams["profileIds"] = profileIds.map((item) => item);
152
139
  }
153
140
  else {
154
- _queryParams["tags"] = tags;
141
+ _queryParams["profileIds"] = profileIds;
155
142
  }
156
143
  }
157
144
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
158
145
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, "profiles"),
159
146
  method: "DELETE",
160
147
  headers: {
161
- "x-airtop-token": (yield core.Supplier.get(this._options.airtopToken)) != null
162
- ? yield core.Supplier.get(this._options.airtopToken)
163
- : undefined,
148
+ Authorization: yield this._getAuthorizationHeader(),
164
149
  "X-Fern-Language": "JavaScript",
165
150
  "X-Fern-SDK-Name": "@airtop/sdk",
166
- "X-Fern-SDK-Version": "0.0.7",
167
- "User-Agent": "@airtop/sdk/0.0.7",
151
+ "X-Fern-SDK-Version": "0.0.10-a",
152
+ "User-Agent": "@airtop/sdk/0.0.10-a",
168
153
  "X-Fern-Runtime": core.RUNTIME.type,
169
154
  "X-Fern-Runtime-Version": core.RUNTIME.version,
170
155
  },
@@ -199,97 +184,13 @@ class Profiles {
199
184
  }
200
185
  });
201
186
  }
202
- /**
203
- * Get a profile by ID
204
- *
205
- * @param {string} id - name of the profile to get
206
- * @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
207
- *
208
- * @throws {@link Airtop.NotFoundError}
209
- * @throws {@link Airtop.UnprocessableEntityError}
210
- * @throws {@link Airtop.InternalServerError}
211
- *
212
- * @example
213
- * await client.profiles.getById("4a61a55c-391b-4f73-957e-ffbd29ac7cba")
214
- */
215
- getById(id, requestOptions) {
216
- var _a, _b;
187
+ _getAuthorizationHeader() {
217
188
  return __awaiter(this, void 0, void 0, function* () {
218
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
219
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `profiles/${encodeURIComponent(id)}`),
220
- method: "GET",
221
- headers: {
222
- "x-airtop-token": (yield core.Supplier.get(this._options.airtopToken)) != null
223
- ? yield core.Supplier.get(this._options.airtopToken)
224
- : undefined,
225
- "X-Fern-Language": "JavaScript",
226
- "X-Fern-SDK-Name": "@airtop/sdk",
227
- "X-Fern-SDK-Version": "0.0.7",
228
- "User-Agent": "@airtop/sdk/0.0.7",
229
- "X-Fern-Runtime": core.RUNTIME.type,
230
- "X-Fern-Runtime-Version": core.RUNTIME.version,
231
- },
232
- contentType: "application/json",
233
- requestType: "json",
234
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
235
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
236
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
237
- });
238
- if (_response.ok) {
239
- return serializers.ProfileOutputV1Body.parseOrThrow(_response.body, {
240
- unrecognizedObjectKeys: "passthrough",
241
- allowUnrecognizedUnionMembers: true,
242
- allowUnrecognizedEnumValues: true,
243
- skipValidation: true,
244
- breadcrumbsPrefix: ["response"],
245
- });
246
- }
247
- if (_response.error.reason === "status-code") {
248
- switch (_response.error.statusCode) {
249
- case 404:
250
- throw new Airtop.NotFoundError(serializers.ErrorModel.parseOrThrow(_response.error.body, {
251
- unrecognizedObjectKeys: "passthrough",
252
- allowUnrecognizedUnionMembers: true,
253
- allowUnrecognizedEnumValues: true,
254
- skipValidation: true,
255
- breadcrumbsPrefix: ["response"],
256
- }));
257
- case 422:
258
- throw new Airtop.UnprocessableEntityError(serializers.ErrorModel.parseOrThrow(_response.error.body, {
259
- unrecognizedObjectKeys: "passthrough",
260
- allowUnrecognizedUnionMembers: true,
261
- allowUnrecognizedEnumValues: true,
262
- skipValidation: true,
263
- breadcrumbsPrefix: ["response"],
264
- }));
265
- case 500:
266
- throw new Airtop.InternalServerError(serializers.ErrorModel.parseOrThrow(_response.error.body, {
267
- unrecognizedObjectKeys: "passthrough",
268
- allowUnrecognizedUnionMembers: true,
269
- allowUnrecognizedEnumValues: true,
270
- skipValidation: true,
271
- breadcrumbsPrefix: ["response"],
272
- }));
273
- default:
274
- throw new errors.AirtopError({
275
- statusCode: _response.error.statusCode,
276
- body: _response.error.body,
277
- });
278
- }
279
- }
280
- switch (_response.error.reason) {
281
- case "non-json":
282
- throw new errors.AirtopError({
283
- statusCode: _response.error.statusCode,
284
- body: _response.error.rawBody,
285
- });
286
- case "timeout":
287
- throw new errors.AirtopTimeoutError();
288
- case "unknown":
289
- throw new errors.AirtopError({
290
- message: _response.error.errorMessage,
291
- });
189
+ const bearer = yield core.Supplier.get(this._options.apiKey);
190
+ if (bearer != null) {
191
+ return `Bearer ${bearer}`;
292
192
  }
193
+ return undefined;
293
194
  });
294
195
  }
295
196
  }
@@ -3,17 +3,11 @@
3
3
  */
4
4
  /**
5
5
  * @example
6
- * {
7
- * name: "^Acme.*"
8
- * }
6
+ * {}
9
7
  */
10
8
  export interface ProfilesDeleteRequest {
11
9
  /**
12
- * Name to search for, supports regex, case insensitive
10
+ * A comma separated list of profile ids to search for
13
11
  */
14
- name?: string;
15
- /**
16
- * a comma separated list of tags to filter by (joined by OR, e.g. tag is red OR blue)
17
- */
18
- tags?: string | string[];
12
+ profileIds?: string | string[];
19
13
  }
@@ -3,17 +3,11 @@
3
3
  */
4
4
  /**
5
5
  * @example
6
- * {
7
- * name: "^Acme.*"
8
- * }
6
+ * {}
9
7
  */
10
8
  export interface ProfilesGetRequest {
11
9
  /**
12
- * Name to search for, supports regex, case insensitive
10
+ * A comma separated list of profile ids to search for
13
11
  */
14
- name?: string;
15
- /**
16
- * a comma separated list of tags to filter by (joined by OR, e.g. tag is red OR blue)
17
- */
18
- tags?: string | string[];
12
+ profileIds?: string | string[];
19
13
  }
@@ -7,8 +7,7 @@ import * as Airtop from "../../../index";
7
7
  export declare namespace Sessions {
8
8
  interface Options {
9
9
  environment?: core.Supplier<environments.AirtopEnvironment | string>;
10
- /** Override the x-airtop-token header */
11
- airtopToken?: core.Supplier<string | undefined>;
10
+ apiKey?: core.Supplier<core.BearerToken | undefined>;
12
11
  fetcher?: core.FetchFunction;
13
12
  }
14
13
  interface RequestOptions {
@@ -18,8 +17,6 @@ export declare namespace Sessions {
18
17
  maxRetries?: number;
19
18
  /** A hook to abort the request. */
20
19
  abortSignal?: AbortSignal;
21
- /** Override the x-airtop-token header */
22
- airtopToken?: string | undefined;
23
20
  }
24
21
  }
25
22
  export declare class Sessions {
@@ -36,21 +33,24 @@ export declare class Sessions {
36
33
  * @throws {@link Airtop.InternalServerError}
37
34
  *
38
35
  * @example
39
- * await client.sessions.list()
36
+ * await client.sessions.list({
37
+ * offset: 1,
38
+ * limit: 10
39
+ * })
40
40
  */
41
- list(request?: Airtop.SessionsListRequest, requestOptions?: Sessions.RequestOptions): Promise<Airtop.SessionsOutputV1Body>;
41
+ list(request?: Airtop.SessionsListRequest, requestOptions?: Sessions.RequestOptions): Promise<Airtop.SessionsWithPaginationEnvelopeDefaultMetaWrapper>;
42
42
  /**
43
43
  * @param {Airtop.SessionRestInputV1} request
44
44
  * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
45
45
  *
46
46
  * @example
47
- * await client.sessions.post()
47
+ * await client.sessions.create()
48
48
  */
49
- post(request?: Airtop.SessionRestInputV1, requestOptions?: Sessions.RequestOptions): Promise<Airtop.SessionOutputV1Body>;
49
+ create(request?: Airtop.SessionRestInputV1, requestOptions?: Sessions.RequestOptions): Promise<Airtop.ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper>;
50
50
  /**
51
51
  * Get a session by ID
52
52
  *
53
- * @param {string} id - UUID of the session to get
53
+ * @param {string} id - Id of the session to get
54
54
  * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
55
55
  *
56
56
  * @throws {@link Airtop.NotFoundError}
@@ -58,72 +58,22 @@ export declare class Sessions {
58
58
  * @throws {@link Airtop.InternalServerError}
59
59
  *
60
60
  * @example
61
- * await client.sessions.get("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b")
61
+ * await client.sessions.getinfo("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b")
62
62
  */
63
- get(id: string, requestOptions?: Sessions.RequestOptions): Promise<Airtop.SessionOutputV1Body>;
63
+ getinfo(id: string, requestOptions?: Sessions.RequestOptions): Promise<Airtop.ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper>;
64
64
  /**
65
- * Ends a session by ID
65
+ * Ends a session by ID. If a given session id does not exist within the organization, it is ignored.
66
66
  *
67
- * @param {string} id - UUID of the session to delete
67
+ * @param {string} id - ID of the session to delete
68
68
  * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
69
69
  *
70
70
  * @example
71
- * await client.sessions.delete("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b")
71
+ * await client.sessions.terminate("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b")
72
72
  */
73
- delete(id: string, requestOptions?: Sessions.RequestOptions): Promise<void>;
73
+ terminate(id: string, requestOptions?: Sessions.RequestOptions): Promise<void>;
74
74
  /**
75
75
  * Get a session event stream for a given session ID
76
76
  */
77
77
  events(id: string, requestOptions?: Sessions.RequestOptions): Promise<core.Stream<Airtop.SessionsEventsResponse>>;
78
- /**
79
- * @param {string} id - UUID of the session to create a url for
80
- * @param {string} windowId - id of the browser window, either the browserId (uuid) or targetId (simple string)
81
- * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
82
- *
83
- * @example
84
- * await client.sessions.window("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "7334da2a-91b0-42c5-6156-76a5eba87430")
85
- */
86
- window(id: string, windowId: string, requestOptions?: Sessions.RequestOptions): Promise<Airtop.LiveViewUrlOutputV1Body>;
87
- /**
88
- * @param {string} sessionId - The session id to scrape
89
- * @param {string} windowId - The window id to scrape
90
- * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
91
- *
92
- * @example
93
- * await client.sessions.cleanScrapeSession("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
94
- */
95
- cleanScrapeSession(sessionId: string, windowId: string, requestOptions?: Sessions.RequestOptions): Promise<Airtop.CleanScrapeResponse>;
96
- /**
97
- * @param {string} sessionId - The session id to submit a prompt about
98
- * @param {string} windowId - The window id to submit a prompt about
99
- * @param {Airtop.SessionPromptContentRequest} request
100
- * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
101
- *
102
- * @example
103
- * await client.sessions.sessionPromptContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
104
- * prompt: "What is the main idea of this page?"
105
- * })
106
- */
107
- sessionPromptContent(sessionId: string, windowId: string, request: Airtop.SessionPromptContentRequest, requestOptions?: Sessions.RequestOptions): Promise<Airtop.SessionAiResponse>;
108
- /**
109
- * @param {string} sessionId - The session id to perform a paginated extraction on
110
- * @param {string} windowId - The window id to perform a paginated extraction on
111
- * @param {Airtop.SessionPromptPaginatedExtractionRequest} request
112
- * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
113
- *
114
- * @example
115
- * await client.sessions.sessionPromptPaginatedExtraction("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
116
- * prompt: "For each page on return all the items listed including a subfield"
117
- * })
118
- */
119
- sessionPromptPaginatedExtraction(sessionId: string, windowId: string, request: Airtop.SessionPromptPaginatedExtractionRequest, requestOptions?: Sessions.RequestOptions): Promise<Airtop.SessionAiResponse>;
120
- /**
121
- * @param {string} sessionId - The session id to summarize
122
- * @param {string} windowId - The window id to summarize
123
- * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
124
- *
125
- * @example
126
- * await client.sessions.summary("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
127
- */
128
- summary(sessionId: string, windowId: string, requestOptions?: Sessions.RequestOptions): Promise<Airtop.SessionAiResponse>;
78
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
129
79
  }