@airtop/sdk 0.1.40-beta0 → 0.1.41

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 (201) hide show
  1. package/README.md +10 -9
  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/index.d.ts +1 -0
  7. package/api/resources/profiles/client/Client.js +1 -1
  8. package/api/resources/requests/client/Client.js +1 -1
  9. package/api/resources/sessions/client/Client.js +6 -6
  10. package/api/resources/windows/client/Client.d.ts +14 -200
  11. package/api/resources/windows/client/Client.js +215 -1001
  12. package/api/resources/windows/client/requests/{AsyncClickRequest.d.ts → SessionFileInputHandlerRequestBody.d.ts} +8 -6
  13. package/api/resources/windows/client/requests/index.d.ts +1 -15
  14. package/api/types/FileEventMessage.d.ts +1 -0
  15. package/api/types/index.d.ts +0 -1
  16. package/api/types/index.js +0 -1
  17. package/dist/api/resources/automations/client/Client.js +4 -4
  18. package/dist/api/resources/files/client/Client.d.ts +11 -0
  19. package/dist/api/resources/files/client/Client.js +52 -4
  20. package/dist/api/resources/files/client/requests/PushFileBodyV1.d.ts +11 -0
  21. package/dist/api/resources/files/client/requests/index.d.ts +1 -0
  22. package/dist/api/resources/profiles/client/Client.js +1 -1
  23. package/dist/api/resources/requests/client/Client.js +1 -1
  24. package/dist/api/resources/sessions/client/Client.js +6 -6
  25. package/dist/api/resources/windows/client/Client.d.ts +14 -200
  26. package/dist/api/resources/windows/client/Client.js +215 -1001
  27. package/dist/api/resources/windows/client/requests/{AsyncClickRequest.d.ts → SessionFileInputHandlerRequestBody.d.ts} +8 -6
  28. package/dist/api/resources/windows/client/requests/index.d.ts +1 -15
  29. package/dist/api/types/FileEventMessage.d.ts +1 -0
  30. package/dist/api/types/index.d.ts +0 -1
  31. package/dist/api/types/index.js +0 -1
  32. package/dist/serialization/resources/files/client/requests/PushFileBodyV1.d.ts +12 -0
  33. package/{serialization/types/AsyncOperatorPromptResponseEnvelope.js → dist/serialization/resources/files/client/requests/PushFileBodyV1.js} +4 -7
  34. package/dist/serialization/resources/files/client/requests/index.d.ts +1 -0
  35. package/dist/serialization/resources/files/client/requests/index.js +3 -1
  36. package/dist/serialization/resources/windows/client/requests/{AsyncHoverRequest.d.ts → SessionFileInputHandlerRequestBody.d.ts} +5 -4
  37. package/{serialization/resources/windows/client/requests/AsyncHoverRequest.js → dist/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js} +5 -4
  38. package/dist/serialization/resources/windows/client/requests/index.d.ts +1 -15
  39. package/dist/serialization/resources/windows/client/requests/index.js +3 -31
  40. package/dist/serialization/types/FileEventMessage.d.ts +1 -0
  41. package/dist/serialization/types/FileEventMessage.js +1 -0
  42. package/dist/serialization/types/index.d.ts +0 -1
  43. package/dist/serialization/types/index.js +0 -1
  44. package/dist/utils/index.d.ts +1 -0
  45. package/dist/utils/index.js +1 -0
  46. package/dist/utils/upload.d.ts +13 -0
  47. package/dist/utils/upload.js +55 -0
  48. package/dist/version.d.ts +1 -1
  49. package/dist/version.js +1 -1
  50. package/dist/wrapper/AirtopClient.js +1 -1
  51. package/dist/wrapper/AirtopFiles.js +3 -3
  52. package/dist/wrapper/AirtopSessions.d.ts +24 -0
  53. package/dist/wrapper/AirtopSessions.js +103 -0
  54. package/dist/wrapper/AirtopWindows.d.ts +25 -1
  55. package/dist/wrapper/AirtopWindows.js +23 -1
  56. package/package.json +1 -1
  57. package/reference.md +187 -1186
  58. package/serialization/resources/files/client/requests/PushFileBodyV1.d.ts +12 -0
  59. package/{dist/serialization/types/AsyncOperatorPromptResponseEnvelope.js → serialization/resources/files/client/requests/PushFileBodyV1.js} +4 -7
  60. package/serialization/resources/files/client/requests/index.d.ts +1 -0
  61. package/serialization/resources/files/client/requests/index.js +3 -1
  62. package/serialization/resources/windows/client/requests/{AsyncHoverRequest.d.ts → SessionFileInputHandlerRequestBody.d.ts} +5 -4
  63. package/{dist/serialization/resources/windows/client/requests/AsyncHoverRequest.js → serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js} +5 -4
  64. package/serialization/resources/windows/client/requests/index.d.ts +1 -15
  65. package/serialization/resources/windows/client/requests/index.js +3 -31
  66. package/serialization/types/FileEventMessage.d.ts +1 -0
  67. package/serialization/types/FileEventMessage.js +1 -0
  68. package/serialization/types/index.d.ts +0 -1
  69. package/serialization/types/index.js +0 -1
  70. package/utils/index.d.ts +1 -0
  71. package/utils/index.js +1 -0
  72. package/utils/upload.d.ts +13 -0
  73. package/utils/upload.js +55 -0
  74. package/version.d.ts +1 -1
  75. package/version.js +1 -1
  76. package/wrapper/AirtopClient.js +1 -1
  77. package/wrapper/AirtopFiles.js +3 -3
  78. package/wrapper/AirtopSessions.d.ts +24 -0
  79. package/wrapper/AirtopSessions.js +103 -0
  80. package/wrapper/AirtopWindows.d.ts +25 -1
  81. package/wrapper/AirtopWindows.js +23 -1
  82. package/api/resources/windows/client/requests/ActRequest.d.ts +0 -30
  83. package/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -27
  84. package/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -27
  85. package/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -29
  86. package/api/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -5
  87. package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -27
  88. package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -5
  89. package/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -29
  90. package/api/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -5
  91. package/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -23
  92. package/api/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -5
  93. package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -25
  94. package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -5
  95. package/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -37
  96. package/api/resources/windows/client/requests/AsyncTypeRequest.js +0 -5
  97. package/api/resources/windows/client/requests/ExtractRequest.d.ts +0 -30
  98. package/api/resources/windows/client/requests/ExtractRequest.js +0 -5
  99. package/api/resources/windows/client/requests/FindManyRequest.d.ts +0 -30
  100. package/api/resources/windows/client/requests/FindManyRequest.js +0 -5
  101. package/api/resources/windows/client/requests/FindOneRequest.d.ts +0 -30
  102. package/api/resources/windows/client/requests/FindOneRequest.js +0 -5
  103. package/api/resources/windows/client/requests/LlmRequest.d.ts +0 -25
  104. package/api/resources/windows/client/requests/LlmRequest.js +0 -5
  105. package/api/resources/windows/client/requests/OperatorPromptV1Body.d.ts +0 -25
  106. package/api/resources/windows/client/requests/OperatorPromptV1Body.js +0 -5
  107. package/api/types/AsyncOperatorPromptResponseEnvelope.d.ts +0 -9
  108. package/api/types/AsyncOperatorPromptResponseEnvelope.js +0 -5
  109. package/dist/api/resources/windows/client/requests/ActRequest.d.ts +0 -30
  110. package/dist/api/resources/windows/client/requests/ActRequest.js +0 -5
  111. package/dist/api/resources/windows/client/requests/AsyncClickRequest.js +0 -5
  112. package/dist/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -27
  113. package/dist/api/resources/windows/client/requests/AsyncHoverRequest.js +0 -5
  114. package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -27
  115. package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.js +0 -5
  116. package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -29
  117. package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -5
  118. package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -27
  119. package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -5
  120. package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -29
  121. package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -5
  122. package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -23
  123. package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -5
  124. package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -25
  125. package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -5
  126. package/dist/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -37
  127. package/dist/api/resources/windows/client/requests/AsyncTypeRequest.js +0 -5
  128. package/dist/api/resources/windows/client/requests/ExtractRequest.d.ts +0 -30
  129. package/dist/api/resources/windows/client/requests/ExtractRequest.js +0 -5
  130. package/dist/api/resources/windows/client/requests/FindManyRequest.d.ts +0 -30
  131. package/dist/api/resources/windows/client/requests/FindManyRequest.js +0 -5
  132. package/dist/api/resources/windows/client/requests/FindOneRequest.d.ts +0 -30
  133. package/dist/api/resources/windows/client/requests/FindOneRequest.js +0 -5
  134. package/dist/api/resources/windows/client/requests/LlmRequest.d.ts +0 -25
  135. package/dist/api/resources/windows/client/requests/LlmRequest.js +0 -5
  136. package/dist/api/resources/windows/client/requests/OperatorPromptV1Body.d.ts +0 -25
  137. package/dist/api/resources/windows/client/requests/OperatorPromptV1Body.js +0 -5
  138. package/dist/api/types/AsyncOperatorPromptResponseEnvelope.d.ts +0 -9
  139. package/dist/api/types/AsyncOperatorPromptResponseEnvelope.js +0 -5
  140. package/dist/serialization/resources/windows/client/requests/ActRequest.d.ts +0 -19
  141. package/dist/serialization/resources/windows/client/requests/ActRequest.js +0 -50
  142. package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -20
  143. package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.js +0 -51
  144. package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -19
  145. package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +0 -50
  146. package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -20
  147. package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -51
  148. package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -19
  149. package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -50
  150. package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -20
  151. package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -51
  152. package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -18
  153. package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -49
  154. package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -19
  155. package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -50
  156. package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -24
  157. package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.js +0 -55
  158. package/dist/serialization/resources/windows/client/requests/ExtractRequest.d.ts +0 -19
  159. package/dist/serialization/resources/windows/client/requests/ExtractRequest.js +0 -50
  160. package/dist/serialization/resources/windows/client/requests/FindManyRequest.d.ts +0 -19
  161. package/dist/serialization/resources/windows/client/requests/FindManyRequest.js +0 -50
  162. package/dist/serialization/resources/windows/client/requests/FindOneRequest.d.ts +0 -19
  163. package/dist/serialization/resources/windows/client/requests/FindOneRequest.js +0 -50
  164. package/dist/serialization/resources/windows/client/requests/LlmRequest.d.ts +0 -17
  165. package/dist/serialization/resources/windows/client/requests/LlmRequest.js +0 -48
  166. package/dist/serialization/resources/windows/client/requests/OperatorPromptV1Body.d.ts +0 -17
  167. package/dist/serialization/resources/windows/client/requests/OperatorPromptV1Body.js +0 -48
  168. package/dist/serialization/types/AsyncOperatorPromptResponseEnvelope.d.ts +0 -15
  169. package/serialization/resources/windows/client/requests/ActRequest.d.ts +0 -19
  170. package/serialization/resources/windows/client/requests/ActRequest.js +0 -50
  171. package/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -20
  172. package/serialization/resources/windows/client/requests/AsyncClickRequest.js +0 -51
  173. package/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -19
  174. package/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +0 -50
  175. package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -20
  176. package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -51
  177. package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -19
  178. package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -50
  179. package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -20
  180. package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -51
  181. package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -18
  182. package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -49
  183. package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -19
  184. package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -50
  185. package/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -24
  186. package/serialization/resources/windows/client/requests/AsyncTypeRequest.js +0 -55
  187. package/serialization/resources/windows/client/requests/ExtractRequest.d.ts +0 -19
  188. package/serialization/resources/windows/client/requests/ExtractRequest.js +0 -50
  189. package/serialization/resources/windows/client/requests/FindManyRequest.d.ts +0 -19
  190. package/serialization/resources/windows/client/requests/FindManyRequest.js +0 -50
  191. package/serialization/resources/windows/client/requests/FindOneRequest.d.ts +0 -19
  192. package/serialization/resources/windows/client/requests/FindOneRequest.js +0 -50
  193. package/serialization/resources/windows/client/requests/LlmRequest.d.ts +0 -17
  194. package/serialization/resources/windows/client/requests/LlmRequest.js +0 -48
  195. package/serialization/resources/windows/client/requests/OperatorPromptV1Body.d.ts +0 -17
  196. package/serialization/resources/windows/client/requests/OperatorPromptV1Body.js +0 -48
  197. package/serialization/types/AsyncOperatorPromptResponseEnvelope.d.ts +0 -15
  198. /package/api/resources/{windows/client/requests/ActRequest.js → files/client/requests/PushFileBodyV1.js} +0 -0
  199. /package/api/resources/windows/client/requests/{AsyncClickRequest.js → SessionFileInputHandlerRequestBody.js} +0 -0
  200. /package/{api/resources/windows/client/requests/AsyncHoverRequest.js → dist/api/resources/files/client/requests/PushFileBodyV1.js} +0 -0
  201. /package/{api/resources/windows/client/requests/AsyncMonitorRequest.js → dist/api/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js} +0 -0
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airtop/sdk",
3
- "version": "0.1.40-beta0",
3
+ "version": "0.1.41",
4
4
  "private": false,
5
5
  "repository": "https://github.com/airtop-ai/airtop-node-sdk",
6
6
  "main": "./index.js",