@airtop/sdk 0.1.40 → 0.1.41-beta0

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 (235) hide show
  1. package/README.md +9 -10
  2. package/api/resources/automations/client/Client.js +4 -4
  3. package/api/resources/files/client/Client.d.ts +11 -0
  4. package/api/resources/files/client/Client.js +52 -4
  5. package/api/resources/files/client/requests/PushFileBodyV1.d.ts +11 -0
  6. package/api/resources/files/client/requests/PushFileBodyV1.js +5 -0
  7. package/api/resources/files/client/requests/index.d.ts +1 -0
  8. package/api/resources/profiles/client/Client.js +1 -1
  9. package/api/resources/requests/client/Client.js +1 -1
  10. package/api/resources/sessions/client/Client.js +6 -6
  11. package/api/resources/sessions/types/SessionsEventsResponse.d.ts +4 -4
  12. package/api/resources/sessions/types/index.d.ts +1 -1
  13. package/api/resources/sessions/types/index.js +1 -1
  14. package/api/resources/windows/client/Client.d.ts +228 -0
  15. package/api/resources/windows/client/Client.js +1162 -201
  16. package/api/resources/windows/client/requests/ActRequest.d.ts +30 -0
  17. package/api/resources/windows/client/requests/ActRequest.js +5 -0
  18. package/api/resources/windows/client/requests/AsyncClickRequest.d.ts +29 -0
  19. package/api/resources/windows/client/requests/AsyncClickRequest.js +5 -0
  20. package/api/resources/windows/client/requests/AsyncFileInputRequest.d.ts +33 -0
  21. package/api/resources/windows/client/requests/AsyncFileInputRequest.js +5 -0
  22. package/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +27 -0
  23. package/api/resources/windows/client/requests/AsyncHoverRequest.js +5 -0
  24. package/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +27 -0
  25. package/api/resources/windows/client/requests/AsyncMonitorRequest.js +5 -0
  26. package/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +29 -0
  27. package/api/resources/windows/client/requests/AsyncPageQueryRequest.js +5 -0
  28. package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +27 -0
  29. package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +5 -0
  30. package/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +29 -0
  31. package/api/resources/windows/client/requests/AsyncPromptContentRequest.js +5 -0
  32. package/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +23 -0
  33. package/api/resources/windows/client/requests/AsyncScreenshotRequest.js +5 -0
  34. package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +25 -0
  35. package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +5 -0
  36. package/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +37 -0
  37. package/api/resources/windows/client/requests/AsyncTypeRequest.js +5 -0
  38. package/api/resources/windows/client/requests/ExtractRequest.d.ts +30 -0
  39. package/api/resources/windows/client/requests/ExtractRequest.js +5 -0
  40. package/api/resources/windows/client/requests/FindManyRequest.d.ts +30 -0
  41. package/api/resources/windows/client/requests/FindManyRequest.js +5 -0
  42. package/api/resources/windows/client/requests/FindOneRequest.d.ts +30 -0
  43. package/api/resources/windows/client/requests/FindOneRequest.js +5 -0
  44. package/api/resources/windows/client/requests/LlmRequest.d.ts +25 -0
  45. package/api/resources/windows/client/requests/LlmRequest.js +5 -0
  46. package/api/resources/windows/client/requests/OperatorPromptV1Body.d.ts +25 -0
  47. package/api/resources/windows/client/requests/OperatorPromptV1Body.js +5 -0
  48. package/api/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts +31 -0
  49. package/api/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js +5 -0
  50. package/api/resources/windows/client/requests/index.d.ts +17 -0
  51. package/api/types/AsyncOperatorPromptResponseEnvelope.d.ts +9 -0
  52. package/api/types/AsyncOperatorPromptResponseEnvelope.js +5 -0
  53. package/api/types/FileEventMessage.d.ts +1 -0
  54. package/api/types/index.d.ts +1 -0
  55. package/api/types/index.js +1 -0
  56. package/dist/api/resources/automations/client/Client.js +4 -4
  57. package/dist/api/resources/files/client/Client.d.ts +11 -0
  58. package/dist/api/resources/files/client/Client.js +52 -4
  59. package/dist/api/resources/files/client/requests/PushFileBodyV1.d.ts +11 -0
  60. package/dist/api/resources/files/client/requests/PushFileBodyV1.js +5 -0
  61. package/dist/api/resources/files/client/requests/index.d.ts +1 -0
  62. package/dist/api/resources/profiles/client/Client.js +1 -1
  63. package/dist/api/resources/requests/client/Client.js +1 -1
  64. package/dist/api/resources/sessions/client/Client.js +6 -6
  65. package/dist/api/resources/sessions/types/SessionsEventsResponse.d.ts +4 -4
  66. package/dist/api/resources/sessions/types/index.d.ts +1 -1
  67. package/dist/api/resources/sessions/types/index.js +1 -1
  68. package/dist/api/resources/windows/client/Client.d.ts +228 -0
  69. package/dist/api/resources/windows/client/Client.js +1162 -201
  70. package/dist/api/resources/windows/client/requests/ActRequest.d.ts +30 -0
  71. package/dist/api/resources/windows/client/requests/ActRequest.js +5 -0
  72. package/dist/api/resources/windows/client/requests/AsyncClickRequest.d.ts +29 -0
  73. package/dist/api/resources/windows/client/requests/AsyncClickRequest.js +5 -0
  74. package/dist/api/resources/windows/client/requests/AsyncFileInputRequest.d.ts +33 -0
  75. package/dist/api/resources/windows/client/requests/AsyncFileInputRequest.js +5 -0
  76. package/dist/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +27 -0
  77. package/dist/api/resources/windows/client/requests/AsyncHoverRequest.js +5 -0
  78. package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +27 -0
  79. package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.js +5 -0
  80. package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +29 -0
  81. package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.js +5 -0
  82. package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +27 -0
  83. package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +5 -0
  84. package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +29 -0
  85. package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.js +5 -0
  86. package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +23 -0
  87. package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.js +5 -0
  88. package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +25 -0
  89. package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +5 -0
  90. package/dist/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +37 -0
  91. package/dist/api/resources/windows/client/requests/AsyncTypeRequest.js +5 -0
  92. package/dist/api/resources/windows/client/requests/ExtractRequest.d.ts +30 -0
  93. package/dist/api/resources/windows/client/requests/ExtractRequest.js +5 -0
  94. package/dist/api/resources/windows/client/requests/FindManyRequest.d.ts +30 -0
  95. package/dist/api/resources/windows/client/requests/FindManyRequest.js +5 -0
  96. package/dist/api/resources/windows/client/requests/FindOneRequest.d.ts +30 -0
  97. package/dist/api/resources/windows/client/requests/FindOneRequest.js +5 -0
  98. package/dist/api/resources/windows/client/requests/LlmRequest.d.ts +25 -0
  99. package/dist/api/resources/windows/client/requests/LlmRequest.js +5 -0
  100. package/dist/api/resources/windows/client/requests/OperatorPromptV1Body.d.ts +25 -0
  101. package/dist/api/resources/windows/client/requests/OperatorPromptV1Body.js +5 -0
  102. package/dist/api/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts +31 -0
  103. package/dist/api/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js +5 -0
  104. package/dist/api/resources/windows/client/requests/index.d.ts +17 -0
  105. package/dist/api/types/AsyncOperatorPromptResponseEnvelope.d.ts +9 -0
  106. package/dist/api/types/AsyncOperatorPromptResponseEnvelope.js +5 -0
  107. package/dist/api/types/FileEventMessage.d.ts +1 -0
  108. package/dist/api/types/index.d.ts +1 -0
  109. package/dist/api/types/index.js +1 -0
  110. package/dist/serialization/resources/files/client/requests/PushFileBodyV1.d.ts +12 -0
  111. package/dist/serialization/resources/files/client/requests/PushFileBodyV1.js +43 -0
  112. package/dist/serialization/resources/files/client/requests/index.d.ts +1 -0
  113. package/dist/serialization/resources/files/client/requests/index.js +3 -1
  114. package/dist/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +5 -5
  115. package/dist/serialization/resources/sessions/types/SessionsEventsResponse.js +2 -2
  116. package/dist/serialization/resources/sessions/types/index.d.ts +1 -1
  117. package/dist/serialization/resources/sessions/types/index.js +1 -1
  118. package/dist/serialization/resources/windows/client/requests/ActRequest.d.ts +19 -0
  119. package/dist/serialization/resources/windows/client/requests/ActRequest.js +50 -0
  120. package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +20 -0
  121. package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.js +51 -0
  122. package/dist/serialization/resources/windows/client/requests/AsyncFileInputRequest.d.ts +22 -0
  123. package/dist/serialization/resources/windows/client/requests/AsyncFileInputRequest.js +53 -0
  124. package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +19 -0
  125. package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.js +50 -0
  126. package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +19 -0
  127. package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +50 -0
  128. package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +20 -0
  129. package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +51 -0
  130. package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +19 -0
  131. package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +50 -0
  132. package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +20 -0
  133. package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +51 -0
  134. package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +18 -0
  135. package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +49 -0
  136. package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +19 -0
  137. package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +50 -0
  138. package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +24 -0
  139. package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.js +55 -0
  140. package/dist/serialization/resources/windows/client/requests/ExtractRequest.d.ts +19 -0
  141. package/dist/serialization/resources/windows/client/requests/ExtractRequest.js +50 -0
  142. package/dist/serialization/resources/windows/client/requests/FindManyRequest.d.ts +19 -0
  143. package/dist/serialization/resources/windows/client/requests/FindManyRequest.js +50 -0
  144. package/dist/serialization/resources/windows/client/requests/FindOneRequest.d.ts +19 -0
  145. package/dist/serialization/resources/windows/client/requests/FindOneRequest.js +50 -0
  146. package/dist/serialization/resources/windows/client/requests/LlmRequest.d.ts +17 -0
  147. package/dist/serialization/resources/windows/client/requests/LlmRequest.js +48 -0
  148. package/dist/serialization/resources/windows/client/requests/OperatorPromptV1Body.d.ts +17 -0
  149. package/dist/serialization/resources/windows/client/requests/OperatorPromptV1Body.js +48 -0
  150. package/dist/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts +20 -0
  151. package/dist/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js +51 -0
  152. package/dist/serialization/resources/windows/client/requests/index.d.ts +17 -0
  153. package/dist/serialization/resources/windows/client/requests/index.js +35 -1
  154. package/dist/serialization/types/AsyncOperatorPromptResponseEnvelope.d.ts +15 -0
  155. package/dist/serialization/types/AsyncOperatorPromptResponseEnvelope.js +46 -0
  156. package/dist/serialization/types/FileEventMessage.d.ts +1 -0
  157. package/dist/serialization/types/FileEventMessage.js +1 -0
  158. package/dist/serialization/types/index.d.ts +1 -0
  159. package/dist/serialization/types/index.js +1 -0
  160. package/dist/utils/index.d.ts +1 -0
  161. package/dist/utils/index.js +1 -0
  162. package/dist/utils/upload.d.ts +13 -0
  163. package/dist/utils/upload.js +55 -0
  164. package/dist/version.d.ts +1 -1
  165. package/dist/version.js +1 -1
  166. package/dist/wrapper/AirtopClient.js +1 -1
  167. package/dist/wrapper/AirtopFiles.js +3 -3
  168. package/dist/wrapper/AirtopSessions.d.ts +24 -0
  169. package/dist/wrapper/AirtopSessions.js +103 -0
  170. package/dist/wrapper/AirtopWindows.d.ts +25 -1
  171. package/dist/wrapper/AirtopWindows.js +23 -1
  172. package/package.json +1 -1
  173. package/reference.md +1492 -108
  174. package/serialization/resources/files/client/requests/PushFileBodyV1.d.ts +12 -0
  175. package/serialization/resources/files/client/requests/PushFileBodyV1.js +43 -0
  176. package/serialization/resources/files/client/requests/index.d.ts +1 -0
  177. package/serialization/resources/files/client/requests/index.js +3 -1
  178. package/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +5 -5
  179. package/serialization/resources/sessions/types/SessionsEventsResponse.js +2 -2
  180. package/serialization/resources/sessions/types/index.d.ts +1 -1
  181. package/serialization/resources/sessions/types/index.js +1 -1
  182. package/serialization/resources/windows/client/requests/ActRequest.d.ts +19 -0
  183. package/serialization/resources/windows/client/requests/ActRequest.js +50 -0
  184. package/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +20 -0
  185. package/serialization/resources/windows/client/requests/AsyncClickRequest.js +51 -0
  186. package/serialization/resources/windows/client/requests/AsyncFileInputRequest.d.ts +22 -0
  187. package/serialization/resources/windows/client/requests/AsyncFileInputRequest.js +53 -0
  188. package/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +19 -0
  189. package/serialization/resources/windows/client/requests/AsyncHoverRequest.js +50 -0
  190. package/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +19 -0
  191. package/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +50 -0
  192. package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +20 -0
  193. package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +51 -0
  194. package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +19 -0
  195. package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +50 -0
  196. package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +20 -0
  197. package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +51 -0
  198. package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +18 -0
  199. package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +49 -0
  200. package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +19 -0
  201. package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +50 -0
  202. package/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +24 -0
  203. package/serialization/resources/windows/client/requests/AsyncTypeRequest.js +55 -0
  204. package/serialization/resources/windows/client/requests/ExtractRequest.d.ts +19 -0
  205. package/serialization/resources/windows/client/requests/ExtractRequest.js +50 -0
  206. package/serialization/resources/windows/client/requests/FindManyRequest.d.ts +19 -0
  207. package/serialization/resources/windows/client/requests/FindManyRequest.js +50 -0
  208. package/serialization/resources/windows/client/requests/FindOneRequest.d.ts +19 -0
  209. package/serialization/resources/windows/client/requests/FindOneRequest.js +50 -0
  210. package/serialization/resources/windows/client/requests/LlmRequest.d.ts +17 -0
  211. package/serialization/resources/windows/client/requests/LlmRequest.js +48 -0
  212. package/serialization/resources/windows/client/requests/OperatorPromptV1Body.d.ts +17 -0
  213. package/serialization/resources/windows/client/requests/OperatorPromptV1Body.js +48 -0
  214. package/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts +20 -0
  215. package/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js +51 -0
  216. package/serialization/resources/windows/client/requests/index.d.ts +17 -0
  217. package/serialization/resources/windows/client/requests/index.js +35 -1
  218. package/serialization/types/AsyncOperatorPromptResponseEnvelope.d.ts +15 -0
  219. package/serialization/types/AsyncOperatorPromptResponseEnvelope.js +46 -0
  220. package/serialization/types/FileEventMessage.d.ts +1 -0
  221. package/serialization/types/FileEventMessage.js +1 -0
  222. package/serialization/types/index.d.ts +1 -0
  223. package/serialization/types/index.js +1 -0
  224. package/utils/index.d.ts +1 -0
  225. package/utils/index.js +1 -0
  226. package/utils/upload.d.ts +13 -0
  227. package/utils/upload.js +55 -0
  228. package/version.d.ts +1 -1
  229. package/version.js +1 -1
  230. package/wrapper/AirtopClient.js +1 -1
  231. package/wrapper/AirtopFiles.js +3 -3
  232. package/wrapper/AirtopSessions.d.ts +24 -0
  233. package/wrapper/AirtopSessions.js +103 -0
  234. package/wrapper/AirtopWindows.d.ts +25 -1
  235. package/wrapper/AirtopWindows.js +23 -1
@@ -49,11 +49,14 @@ exports.AirtopWindows = void 0;
49
49
  const node_fetch_1 = __importDefault(require("node-fetch"));
50
50
  const Client_1 = require("../api/resources/windows/client/Client");
51
51
  const core = __importStar(require("../core"));
52
+ const utils_1 = require("../utils");
52
53
  class AirtopWindows extends Client_1.Windows {
53
- constructor(_options, apiKeySupplier) {
54
+ constructor(_client, _options, apiKeySupplier) {
54
55
  super(_options);
56
+ this._client = _client;
55
57
  this._options = _options;
56
58
  this.apiKeySupplier = apiKeySupplier;
59
+ this.mainClient = _client;
57
60
  }
58
61
  /**
59
62
  * @param {string} sessionId - The session id for the window.
@@ -329,5 +332,24 @@ class AirtopWindows extends Client_1.Windows {
329
332
  return yield this.getWindowInfo(session.id, targetId, request, requestOptions);
330
333
  });
331
334
  }
335
+ /**
336
+ * Upload a file, push the file to a session, and fill a file input field in a window.
337
+ * After this operation, the file input will be ready to be submitted.
338
+ *
339
+ * @param sessionId - The session id for the window.
340
+ * @param windowId - The window id of the browser window.
341
+ * @param {UploadAndFillFileInputConfiguration} configuration
342
+ * @param configuration.uploadFilePath - The path to the local file to upload.
343
+ * @param configuration.elementDescription - A natural language description of the file input to
344
+ * interact with (e.g. 'the file input', 'file upload selection box'). The interaction will be
345
+ * aborted if the target element cannot be found.
346
+ * @see Airtop.SessionFileInputHandlerRequestBody - For additional micro-interaction configuration options.
347
+ * @returns The file id and the ai response.
348
+ */
349
+ uploadFileAndSelectInput(sessionId, windowId, configuration) {
350
+ return __awaiter(this, void 0, void 0, function* () {
351
+ return (0, utils_1.uploadFileAndSelectInput)({ client: this.mainClient, sessionId, windowId, configuration });
352
+ });
353
+ }
332
354
  }
333
355
  exports.AirtopWindows = AirtopWindows;