@airtop/sdk 0.1.30 → 0.1.31-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.
- package/Client.d.ts +9 -0
- package/Client.js +19 -4
- package/README.md +8 -6
- package/api/errors/ForbiddenError.d.ts +8 -0
- package/api/errors/ForbiddenError.js +41 -0
- package/api/errors/UnauthorizedError.d.ts +8 -0
- package/api/errors/UnauthorizedError.js +41 -0
- package/api/errors/index.d.ts +2 -0
- package/api/errors/index.js +2 -0
- package/api/resources/automations/client/Client.d.ts +87 -0
- package/api/resources/automations/client/Client.js +451 -0
- package/api/resources/automations/client/index.d.ts +1 -0
- package/api/resources/automations/client/index.js +17 -0
- package/api/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.d.ts +19 -0
- package/api/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.js +5 -0
- package/api/resources/automations/client/requests/index.d.ts +1 -0
- package/api/resources/automations/client/requests/index.js +2 -0
- package/api/resources/automations/index.d.ts +1 -0
- package/api/resources/automations/index.js +17 -0
- package/api/resources/extensionConfigurations/client/Client.d.ts +40 -0
- package/api/resources/extensionConfigurations/client/Client.js +149 -0
- package/api/resources/extensionConfigurations/client/index.d.ts +1 -0
- package/api/resources/extensionConfigurations/client/index.js +2 -0
- package/api/resources/extensionConfigurations/client/requests/ExtensionConfigurationDeleteRequest.d.ts +13 -0
- package/api/resources/extensionConfigurations/client/requests/ExtensionConfigurationDeleteRequest.js +5 -0
- package/api/resources/extensionConfigurations/client/requests/index.d.ts +1 -0
- package/api/resources/extensionConfigurations/client/requests/index.js +2 -0
- package/api/resources/extensionConfigurations/index.d.ts +1 -0
- package/api/resources/extensionConfigurations/index.js +17 -0
- package/api/resources/index.d.ts +4 -0
- package/api/resources/index.js +5 -1
- package/api/resources/profiles/client/Client.js +2 -2
- package/api/resources/requests/client/Client.d.ts +34 -0
- package/api/resources/requests/client/Client.js +115 -0
- package/api/resources/requests/client/index.d.ts +1 -0
- package/api/resources/requests/client/index.js +2 -0
- package/api/resources/requests/index.d.ts +1 -0
- package/api/resources/requests/index.js +17 -0
- package/api/resources/sessions/client/Client.d.ts +9 -0
- package/api/resources/sessions/client/Client.js +65 -12
- package/api/resources/sessions/types/SessionsListRequestStatus.d.ts +4 -1
- package/api/resources/sessions/types/SessionsListRequestStatus.js +3 -0
- package/api/resources/windows/client/Client.d.ts +146 -0
- package/api/resources/windows/client/Client.js +788 -28
- package/api/resources/windows/client/requests/AsyncClickRequest.d.ts +29 -0
- package/api/resources/windows/client/requests/AsyncClickRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncCreateAutomationRequest.d.ts +23 -0
- package/api/resources/windows/client/requests/AsyncCreateAutomationRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncExecuteAutomationRequest.d.ts +27 -0
- package/api/resources/windows/client/requests/AsyncExecuteAutomationRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +27 -0
- package/api/resources/windows/client/requests/AsyncHoverRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +27 -0
- package/api/resources/windows/client/requests/AsyncMonitorRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +29 -0
- package/api/resources/windows/client/requests/AsyncPageQueryRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +27 -0
- package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +29 -0
- package/api/resources/windows/client/requests/AsyncPromptContentRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +23 -0
- package/api/resources/windows/client/requests/AsyncScreenshotRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +25 -0
- package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +37 -0
- package/api/resources/windows/client/requests/AsyncTypeRequest.js +5 -0
- package/api/resources/windows/client/requests/SessionMonitorHandlerRequestBody.d.ts +25 -0
- package/api/resources/windows/client/requests/SessionMonitorHandlerRequestBody.js +5 -0
- package/api/resources/windows/client/requests/index.d.ts +12 -0
- package/api/types/AsyncConfig.d.ts +7 -0
- package/api/types/AsyncConfig.js +5 -0
- package/api/types/AsyncSessionAiResponseEnvelope.d.ts +9 -0
- package/api/types/AsyncSessionAiResponseEnvelope.js +5 -0
- package/api/types/AutomationOutput.d.ts +10 -0
- package/api/types/AutomationOutput.js +5 -0
- package/api/types/BrowserWaitSelectorConfig.d.ts +11 -0
- package/api/types/BrowserWaitSelectorConfig.js +5 -0
- package/api/types/CreateAutomationRequestBodyConfiguration.d.ts +4 -0
- package/api/types/CreateAutomationRequestBodyConfiguration.js +5 -0
- package/api/types/DeleteAutomationOutputWrapperBody.d.ts +4 -0
- package/api/types/DeleteAutomationOutputWrapperBody.js +5 -0
- package/api/types/ExtensionConfigurationOutput.d.ts +13 -0
- package/api/types/ExtensionConfigurationOutput.js +5 -0
- package/api/types/IntervalMonitorConfig.d.ts +9 -0
- package/api/types/IntervalMonitorConfig.js +5 -0
- package/api/types/ListAutomationsOutput.d.ts +7 -0
- package/api/types/ListAutomationsOutput.js +5 -0
- package/api/types/MonitorConfig.d.ts +14 -0
- package/api/types/MonitorConfig.js +5 -0
- package/api/types/MonitorConfigIncludeVisualAnalysis.d.ts +12 -0
- package/api/types/MonitorConfigIncludeVisualAnalysis.js +11 -0
- package/api/types/MonitorConfigMonitorType.d.ts +11 -0
- package/api/types/MonitorConfigMonitorType.js +10 -0
- package/api/types/Pagination.d.ts +8 -0
- package/api/types/RequestStatusResponse.d.ts +8 -0
- package/api/types/RequestStatusResponse.js +5 -0
- package/api/types/SessionConfigV1.d.ts +2 -0
- package/api/types/index.d.ts +13 -0
- package/api/types/index.js +13 -0
- package/dist/Client.d.ts +9 -0
- package/dist/Client.js +19 -4
- package/dist/api/errors/ForbiddenError.d.ts +8 -0
- package/dist/api/errors/ForbiddenError.js +41 -0
- package/dist/api/errors/UnauthorizedError.d.ts +8 -0
- package/dist/api/errors/UnauthorizedError.js +41 -0
- package/dist/api/errors/index.d.ts +2 -0
- package/dist/api/errors/index.js +2 -0
- package/dist/api/resources/automations/client/Client.d.ts +87 -0
- package/dist/api/resources/automations/client/Client.js +451 -0
- package/dist/api/resources/automations/client/index.d.ts +1 -0
- package/dist/api/resources/automations/client/index.js +17 -0
- package/dist/api/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.d.ts +19 -0
- package/dist/api/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.js +5 -0
- package/dist/api/resources/automations/client/requests/index.d.ts +1 -0
- package/dist/api/resources/automations/client/requests/index.js +2 -0
- package/dist/api/resources/automations/index.d.ts +1 -0
- package/dist/api/resources/automations/index.js +17 -0
- package/dist/api/resources/extensionConfigurations/client/Client.d.ts +40 -0
- package/dist/api/resources/extensionConfigurations/client/Client.js +149 -0
- package/dist/api/resources/extensionConfigurations/client/index.d.ts +1 -0
- package/dist/api/resources/extensionConfigurations/client/index.js +2 -0
- package/dist/api/resources/extensionConfigurations/client/requests/ExtensionConfigurationDeleteRequest.d.ts +13 -0
- package/dist/api/resources/extensionConfigurations/client/requests/ExtensionConfigurationDeleteRequest.js +5 -0
- package/dist/api/resources/extensionConfigurations/client/requests/index.d.ts +1 -0
- package/dist/api/resources/extensionConfigurations/client/requests/index.js +2 -0
- package/dist/api/resources/extensionConfigurations/index.d.ts +1 -0
- package/dist/api/resources/extensionConfigurations/index.js +17 -0
- package/dist/api/resources/index.d.ts +4 -0
- package/dist/api/resources/index.js +5 -1
- package/dist/api/resources/profiles/client/Client.js +2 -2
- package/dist/api/resources/requests/client/Client.d.ts +34 -0
- package/dist/api/resources/requests/client/Client.js +115 -0
- package/dist/api/resources/requests/client/index.d.ts +1 -0
- package/dist/api/resources/requests/client/index.js +2 -0
- package/dist/api/resources/requests/index.d.ts +1 -0
- package/dist/api/resources/requests/index.js +17 -0
- package/dist/api/resources/sessions/client/Client.d.ts +9 -0
- package/dist/api/resources/sessions/client/Client.js +65 -12
- package/dist/api/resources/sessions/types/SessionsListRequestStatus.d.ts +4 -1
- package/dist/api/resources/sessions/types/SessionsListRequestStatus.js +3 -0
- package/dist/api/resources/windows/client/Client.d.ts +146 -0
- package/dist/api/resources/windows/client/Client.js +788 -28
- package/dist/api/resources/windows/client/requests/AsyncClickRequest.d.ts +29 -0
- package/dist/api/resources/windows/client/requests/AsyncClickRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncCreateAutomationRequest.d.ts +23 -0
- package/dist/api/resources/windows/client/requests/AsyncCreateAutomationRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncExecuteAutomationRequest.d.ts +27 -0
- package/dist/api/resources/windows/client/requests/AsyncExecuteAutomationRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +27 -0
- package/dist/api/resources/windows/client/requests/AsyncHoverRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +27 -0
- package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +29 -0
- package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +27 -0
- package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +29 -0
- package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +23 -0
- package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +25 -0
- package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +37 -0
- package/dist/api/resources/windows/client/requests/AsyncTypeRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/SessionMonitorHandlerRequestBody.d.ts +25 -0
- package/dist/api/resources/windows/client/requests/SessionMonitorHandlerRequestBody.js +5 -0
- package/dist/api/resources/windows/client/requests/index.d.ts +12 -0
- package/dist/api/types/AsyncConfig.d.ts +7 -0
- package/dist/api/types/AsyncConfig.js +5 -0
- package/dist/api/types/AsyncSessionAiResponseEnvelope.d.ts +9 -0
- package/dist/api/types/AsyncSessionAiResponseEnvelope.js +5 -0
- package/dist/api/types/AutomationOutput.d.ts +10 -0
- package/dist/api/types/AutomationOutput.js +5 -0
- package/dist/api/types/BrowserWaitSelectorConfig.d.ts +11 -0
- package/dist/api/types/BrowserWaitSelectorConfig.js +5 -0
- package/dist/api/types/CreateAutomationRequestBodyConfiguration.d.ts +4 -0
- package/dist/api/types/CreateAutomationRequestBodyConfiguration.js +5 -0
- package/dist/api/types/DeleteAutomationOutputWrapperBody.d.ts +4 -0
- package/dist/api/types/DeleteAutomationOutputWrapperBody.js +5 -0
- package/dist/api/types/ExtensionConfigurationOutput.d.ts +13 -0
- package/dist/api/types/ExtensionConfigurationOutput.js +5 -0
- package/dist/api/types/IntervalMonitorConfig.d.ts +9 -0
- package/dist/api/types/IntervalMonitorConfig.js +5 -0
- package/dist/api/types/ListAutomationsOutput.d.ts +7 -0
- package/dist/api/types/ListAutomationsOutput.js +5 -0
- package/dist/api/types/MonitorConfig.d.ts +14 -0
- package/dist/api/types/MonitorConfig.js +5 -0
- package/dist/api/types/MonitorConfigIncludeVisualAnalysis.d.ts +12 -0
- package/dist/api/types/MonitorConfigIncludeVisualAnalysis.js +11 -0
- package/dist/api/types/MonitorConfigMonitorType.d.ts +11 -0
- package/dist/api/types/MonitorConfigMonitorType.js +10 -0
- package/dist/api/types/Pagination.d.ts +8 -0
- package/dist/api/types/RequestStatusResponse.d.ts +8 -0
- package/dist/api/types/RequestStatusResponse.js +5 -0
- package/dist/api/types/SessionConfigV1.d.ts +2 -0
- package/dist/api/types/index.d.ts +13 -0
- package/dist/api/types/index.js +13 -0
- package/dist/serialization/resources/automations/client/index.d.ts +1 -0
- package/dist/serialization/resources/automations/client/index.js +17 -0
- package/dist/serialization/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.d.ts +14 -0
- package/dist/serialization/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.js +35 -0
- package/dist/serialization/resources/automations/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/automations/client/requests/index.js +5 -0
- package/dist/serialization/resources/automations/index.d.ts +1 -0
- package/dist/serialization/resources/automations/index.js +17 -0
- package/dist/serialization/resources/index.d.ts +2 -0
- package/dist/serialization/resources/index.js +3 -1
- package/dist/serialization/resources/sessions/types/SessionsListRequestStatus.d.ts +1 -1
- package/dist/serialization/resources/sessions/types/SessionsListRequestStatus.js +1 -1
- package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +20 -0
- package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.js +41 -0
- package/dist/serialization/resources/windows/client/requests/AsyncCreateAutomationRequest.d.ts +18 -0
- package/dist/serialization/resources/windows/client/requests/AsyncCreateAutomationRequest.js +39 -0
- package/dist/serialization/resources/windows/client/requests/AsyncExecuteAutomationRequest.d.ts +18 -0
- package/dist/serialization/resources/windows/client/requests/AsyncExecuteAutomationRequest.js +39 -0
- package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +19 -0
- package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.js +40 -0
- package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +20 -0
- package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +41 -0
- package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +20 -0
- package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +41 -0
- package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +19 -0
- package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +40 -0
- package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +20 -0
- package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +41 -0
- package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +18 -0
- package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +39 -0
- package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +19 -0
- package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +40 -0
- package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +24 -0
- package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.js +45 -0
- package/dist/serialization/resources/windows/client/requests/SessionMonitorHandlerRequestBody.d.ts +18 -0
- package/dist/serialization/resources/windows/client/requests/SessionMonitorHandlerRequestBody.js +39 -0
- package/dist/serialization/resources/windows/client/requests/index.d.ts +12 -0
- package/dist/serialization/resources/windows/client/requests/index.js +25 -1
- package/dist/serialization/types/AsyncConfig.d.ts +12 -0
- package/dist/serialization/types/AsyncConfig.js +33 -0
- package/dist/serialization/types/AsyncSessionAiResponseEnvelope.d.ts +15 -0
- package/dist/serialization/types/AsyncSessionAiResponseEnvelope.js +36 -0
- package/dist/serialization/types/AutomationOutput.d.ts +16 -0
- package/dist/serialization/types/AutomationOutput.js +37 -0
- package/dist/serialization/types/BrowserWaitSelectorConfig.d.ts +14 -0
- package/dist/serialization/types/BrowserWaitSelectorConfig.js +35 -0
- package/dist/serialization/types/CreateAutomationRequestBodyConfiguration.d.ts +10 -0
- package/dist/serialization/types/CreateAutomationRequestBodyConfiguration.js +31 -0
- package/dist/serialization/types/DeleteAutomationOutputWrapperBody.d.ts +10 -0
- package/dist/serialization/types/DeleteAutomationOutputWrapperBody.js +31 -0
- package/dist/serialization/types/ExtensionConfigurationOutput.d.ts +15 -0
- package/dist/serialization/types/ExtensionConfigurationOutput.js +36 -0
- package/dist/serialization/types/IntervalMonitorConfig.d.ts +13 -0
- package/dist/serialization/types/IntervalMonitorConfig.js +34 -0
- package/dist/serialization/types/ListAutomationsOutput.d.ts +13 -0
- package/dist/serialization/types/ListAutomationsOutput.js +34 -0
- package/dist/serialization/types/MonitorConfig.d.ts +19 -0
- package/dist/serialization/types/MonitorConfig.js +40 -0
- package/dist/serialization/types/MonitorConfigIncludeVisualAnalysis.d.ts +10 -0
- package/dist/serialization/types/MonitorConfigIncludeVisualAnalysis.js +31 -0
- package/dist/serialization/types/MonitorConfigMonitorType.d.ts +10 -0
- package/dist/serialization/types/MonitorConfigMonitorType.js +31 -0
- package/dist/serialization/types/RequestStatusResponse.d.ts +13 -0
- package/dist/serialization/types/RequestStatusResponse.js +34 -0
- package/dist/serialization/types/SessionConfigV1.d.ts +1 -0
- package/dist/serialization/types/SessionConfigV1.js +1 -0
- package/dist/serialization/types/index.d.ts +13 -0
- package/dist/serialization/types/index.js +13 -0
- package/dist/wrapper/AirtopClient.d.ts +1 -0
- package/dist/wrapper/AirtopClient.js +3 -0
- package/dist/wrapper/AirtopWindows.d.ts +11 -1
- package/dist/wrapper/AirtopWindows.js +17 -0
- package/package.json +1 -1
- package/reference.md +1418 -163
- package/serialization/resources/automations/client/index.d.ts +1 -0
- package/serialization/resources/automations/client/index.js +17 -0
- package/serialization/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.d.ts +14 -0
- package/serialization/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.js +35 -0
- package/serialization/resources/automations/client/requests/index.d.ts +1 -0
- package/serialization/resources/automations/client/requests/index.js +5 -0
- package/serialization/resources/automations/index.d.ts +1 -0
- package/serialization/resources/automations/index.js +17 -0
- package/serialization/resources/index.d.ts +2 -0
- package/serialization/resources/index.js +3 -1
- package/serialization/resources/sessions/types/SessionsListRequestStatus.d.ts +1 -1
- package/serialization/resources/sessions/types/SessionsListRequestStatus.js +1 -1
- package/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +20 -0
- package/serialization/resources/windows/client/requests/AsyncClickRequest.js +41 -0
- package/serialization/resources/windows/client/requests/AsyncCreateAutomationRequest.d.ts +18 -0
- package/serialization/resources/windows/client/requests/AsyncCreateAutomationRequest.js +39 -0
- package/serialization/resources/windows/client/requests/AsyncExecuteAutomationRequest.d.ts +18 -0
- package/serialization/resources/windows/client/requests/AsyncExecuteAutomationRequest.js +39 -0
- package/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +19 -0
- package/serialization/resources/windows/client/requests/AsyncHoverRequest.js +40 -0
- package/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +20 -0
- package/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +41 -0
- package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +20 -0
- package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +41 -0
- package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +19 -0
- package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +40 -0
- package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +20 -0
- package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +41 -0
- package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +18 -0
- package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +39 -0
- package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +19 -0
- package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +40 -0
- package/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +24 -0
- package/serialization/resources/windows/client/requests/AsyncTypeRequest.js +45 -0
- package/serialization/resources/windows/client/requests/SessionMonitorHandlerRequestBody.d.ts +18 -0
- package/serialization/resources/windows/client/requests/SessionMonitorHandlerRequestBody.js +39 -0
- package/serialization/resources/windows/client/requests/index.d.ts +12 -0
- package/serialization/resources/windows/client/requests/index.js +25 -1
- package/serialization/types/AsyncConfig.d.ts +12 -0
- package/serialization/types/AsyncConfig.js +33 -0
- package/serialization/types/AsyncSessionAiResponseEnvelope.d.ts +15 -0
- package/serialization/types/AsyncSessionAiResponseEnvelope.js +36 -0
- package/serialization/types/AutomationOutput.d.ts +16 -0
- package/serialization/types/AutomationOutput.js +37 -0
- package/serialization/types/BrowserWaitSelectorConfig.d.ts +14 -0
- package/serialization/types/BrowserWaitSelectorConfig.js +35 -0
- package/serialization/types/CreateAutomationRequestBodyConfiguration.d.ts +10 -0
- package/serialization/types/CreateAutomationRequestBodyConfiguration.js +31 -0
- package/serialization/types/DeleteAutomationOutputWrapperBody.d.ts +10 -0
- package/serialization/types/DeleteAutomationOutputWrapperBody.js +31 -0
- package/serialization/types/ExtensionConfigurationOutput.d.ts +15 -0
- package/serialization/types/ExtensionConfigurationOutput.js +36 -0
- package/serialization/types/IntervalMonitorConfig.d.ts +13 -0
- package/serialization/types/IntervalMonitorConfig.js +34 -0
- package/serialization/types/ListAutomationsOutput.d.ts +13 -0
- package/serialization/types/ListAutomationsOutput.js +34 -0
- package/serialization/types/MonitorConfig.d.ts +19 -0
- package/serialization/types/MonitorConfig.js +40 -0
- package/serialization/types/MonitorConfigIncludeVisualAnalysis.d.ts +10 -0
- package/serialization/types/MonitorConfigIncludeVisualAnalysis.js +31 -0
- package/serialization/types/MonitorConfigMonitorType.d.ts +10 -0
- package/serialization/types/MonitorConfigMonitorType.js +31 -0
- package/serialization/types/RequestStatusResponse.d.ts +13 -0
- package/serialization/types/RequestStatusResponse.js +34 -0
- package/serialization/types/SessionConfigV1.d.ts +1 -0
- package/serialization/types/SessionConfigV1.js +1 -0
- package/serialization/types/index.d.ts +13 -0
- package/serialization/types/index.js +13 -0
- package/wrapper/AirtopClient.d.ts +1 -0
- package/wrapper/AirtopClient.js +3 -0
- package/wrapper/AirtopWindows.d.ts +11 -1
- package/wrapper/AirtopWindows.js +17 -0
@@ -48,6 +48,703 @@ class Windows {
|
|
48
48
|
constructor(_options) {
|
49
49
|
this._options = _options;
|
50
50
|
}
|
51
|
+
/**
|
52
|
+
* Execute a click interaction in a specific browser window asynchronously
|
53
|
+
*
|
54
|
+
* @param {string} sessionId - The session id for the window.
|
55
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
56
|
+
* @param {Airtop.AsyncClickRequest} request
|
57
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
58
|
+
*
|
59
|
+
* @example
|
60
|
+
* await client.windows.asyncClick("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
61
|
+
* elementDescription: "The login button"
|
62
|
+
* })
|
63
|
+
*/
|
64
|
+
asyncClick(sessionId, windowId, request, requestOptions) {
|
65
|
+
var _a, _b;
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
67
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
68
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/click`),
|
69
|
+
method: "POST",
|
70
|
+
headers: {
|
71
|
+
Authorization: yield this._getAuthorizationHeader(),
|
72
|
+
"X-Fern-Language": "JavaScript",
|
73
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
74
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
75
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
76
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
77
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
78
|
+
},
|
79
|
+
contentType: "application/json",
|
80
|
+
requestType: "json",
|
81
|
+
body: serializers.AsyncClickRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
82
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
83
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
84
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
85
|
+
});
|
86
|
+
if (_response.ok) {
|
87
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
88
|
+
unrecognizedObjectKeys: "passthrough",
|
89
|
+
allowUnrecognizedUnionMembers: true,
|
90
|
+
allowUnrecognizedEnumValues: true,
|
91
|
+
skipValidation: true,
|
92
|
+
breadcrumbsPrefix: ["response"],
|
93
|
+
});
|
94
|
+
}
|
95
|
+
if (_response.error.reason === "status-code") {
|
96
|
+
throw new errors.AirtopError({
|
97
|
+
statusCode: _response.error.statusCode,
|
98
|
+
body: _response.error.body,
|
99
|
+
});
|
100
|
+
}
|
101
|
+
switch (_response.error.reason) {
|
102
|
+
case "non-json":
|
103
|
+
throw new errors.AirtopError({
|
104
|
+
statusCode: _response.error.statusCode,
|
105
|
+
body: _response.error.rawBody,
|
106
|
+
});
|
107
|
+
case "timeout":
|
108
|
+
throw new errors.AirtopTimeoutError();
|
109
|
+
case "unknown":
|
110
|
+
throw new errors.AirtopError({
|
111
|
+
message: _response.error.errorMessage,
|
112
|
+
});
|
113
|
+
}
|
114
|
+
});
|
115
|
+
}
|
116
|
+
/**
|
117
|
+
* Create an automation of a browser window asynchronously
|
118
|
+
*
|
119
|
+
* @param {string} sessionId - The session id for the window.
|
120
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
121
|
+
* @param {Airtop.AsyncCreateAutomationRequest} request
|
122
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
123
|
+
*
|
124
|
+
* @example
|
125
|
+
* await client.windows.asyncCreateAutomation("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
126
|
+
*/
|
127
|
+
asyncCreateAutomation(sessionId, windowId, request = {}, requestOptions) {
|
128
|
+
var _a, _b;
|
129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
130
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
131
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/create-automation`),
|
132
|
+
method: "POST",
|
133
|
+
headers: {
|
134
|
+
Authorization: yield this._getAuthorizationHeader(),
|
135
|
+
"X-Fern-Language": "JavaScript",
|
136
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
137
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
138
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
139
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
140
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
141
|
+
},
|
142
|
+
contentType: "application/json",
|
143
|
+
requestType: "json",
|
144
|
+
body: serializers.AsyncCreateAutomationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
145
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
146
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
147
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
148
|
+
});
|
149
|
+
if (_response.ok) {
|
150
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
151
|
+
unrecognizedObjectKeys: "passthrough",
|
152
|
+
allowUnrecognizedUnionMembers: true,
|
153
|
+
allowUnrecognizedEnumValues: true,
|
154
|
+
skipValidation: true,
|
155
|
+
breadcrumbsPrefix: ["response"],
|
156
|
+
});
|
157
|
+
}
|
158
|
+
if (_response.error.reason === "status-code") {
|
159
|
+
throw new errors.AirtopError({
|
160
|
+
statusCode: _response.error.statusCode,
|
161
|
+
body: _response.error.body,
|
162
|
+
});
|
163
|
+
}
|
164
|
+
switch (_response.error.reason) {
|
165
|
+
case "non-json":
|
166
|
+
throw new errors.AirtopError({
|
167
|
+
statusCode: _response.error.statusCode,
|
168
|
+
body: _response.error.rawBody,
|
169
|
+
});
|
170
|
+
case "timeout":
|
171
|
+
throw new errors.AirtopTimeoutError();
|
172
|
+
case "unknown":
|
173
|
+
throw new errors.AirtopError({
|
174
|
+
message: _response.error.errorMessage,
|
175
|
+
});
|
176
|
+
}
|
177
|
+
});
|
178
|
+
}
|
179
|
+
/**
|
180
|
+
* Execute an automation of a browser window asynchronously
|
181
|
+
*
|
182
|
+
* @param {string} sessionId - The session id for the window.
|
183
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
184
|
+
* @param {Airtop.AsyncExecuteAutomationRequest} request
|
185
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
186
|
+
*
|
187
|
+
* @example
|
188
|
+
* await client.windows.asyncExecuteAutomation("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
189
|
+
* automationId: "automationId"
|
190
|
+
* })
|
191
|
+
*/
|
192
|
+
asyncExecuteAutomation(sessionId, windowId, request, requestOptions) {
|
193
|
+
var _a, _b;
|
194
|
+
return __awaiter(this, void 0, void 0, function* () {
|
195
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
196
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/execute-automation`),
|
197
|
+
method: "POST",
|
198
|
+
headers: {
|
199
|
+
Authorization: yield this._getAuthorizationHeader(),
|
200
|
+
"X-Fern-Language": "JavaScript",
|
201
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
202
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
203
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
204
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
205
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
206
|
+
},
|
207
|
+
contentType: "application/json",
|
208
|
+
requestType: "json",
|
209
|
+
body: serializers.AsyncExecuteAutomationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
210
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
211
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
212
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
213
|
+
});
|
214
|
+
if (_response.ok) {
|
215
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
216
|
+
unrecognizedObjectKeys: "passthrough",
|
217
|
+
allowUnrecognizedUnionMembers: true,
|
218
|
+
allowUnrecognizedEnumValues: true,
|
219
|
+
skipValidation: true,
|
220
|
+
breadcrumbsPrefix: ["response"],
|
221
|
+
});
|
222
|
+
}
|
223
|
+
if (_response.error.reason === "status-code") {
|
224
|
+
throw new errors.AirtopError({
|
225
|
+
statusCode: _response.error.statusCode,
|
226
|
+
body: _response.error.body,
|
227
|
+
});
|
228
|
+
}
|
229
|
+
switch (_response.error.reason) {
|
230
|
+
case "non-json":
|
231
|
+
throw new errors.AirtopError({
|
232
|
+
statusCode: _response.error.statusCode,
|
233
|
+
body: _response.error.rawBody,
|
234
|
+
});
|
235
|
+
case "timeout":
|
236
|
+
throw new errors.AirtopTimeoutError();
|
237
|
+
case "unknown":
|
238
|
+
throw new errors.AirtopError({
|
239
|
+
message: _response.error.errorMessage,
|
240
|
+
});
|
241
|
+
}
|
242
|
+
});
|
243
|
+
}
|
244
|
+
/**
|
245
|
+
* @param {string} sessionId - The session id for the window.
|
246
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
247
|
+
* @param {Airtop.AsyncHoverRequest} request
|
248
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
249
|
+
*
|
250
|
+
* @example
|
251
|
+
* await client.windows.asyncHover("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
252
|
+
* elementDescription: "The search box input in the top right corner"
|
253
|
+
* })
|
254
|
+
*/
|
255
|
+
asyncHover(sessionId, windowId, request, requestOptions) {
|
256
|
+
var _a, _b;
|
257
|
+
return __awaiter(this, void 0, void 0, function* () {
|
258
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
259
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/hover`),
|
260
|
+
method: "POST",
|
261
|
+
headers: {
|
262
|
+
Authorization: yield this._getAuthorizationHeader(),
|
263
|
+
"X-Fern-Language": "JavaScript",
|
264
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
265
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
266
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
267
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
268
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
269
|
+
},
|
270
|
+
contentType: "application/json",
|
271
|
+
requestType: "json",
|
272
|
+
body: serializers.AsyncHoverRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
273
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
274
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
275
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
276
|
+
});
|
277
|
+
if (_response.ok) {
|
278
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
279
|
+
unrecognizedObjectKeys: "passthrough",
|
280
|
+
allowUnrecognizedUnionMembers: true,
|
281
|
+
allowUnrecognizedEnumValues: true,
|
282
|
+
skipValidation: true,
|
283
|
+
breadcrumbsPrefix: ["response"],
|
284
|
+
});
|
285
|
+
}
|
286
|
+
if (_response.error.reason === "status-code") {
|
287
|
+
throw new errors.AirtopError({
|
288
|
+
statusCode: _response.error.statusCode,
|
289
|
+
body: _response.error.body,
|
290
|
+
});
|
291
|
+
}
|
292
|
+
switch (_response.error.reason) {
|
293
|
+
case "non-json":
|
294
|
+
throw new errors.AirtopError({
|
295
|
+
statusCode: _response.error.statusCode,
|
296
|
+
body: _response.error.rawBody,
|
297
|
+
});
|
298
|
+
case "timeout":
|
299
|
+
throw new errors.AirtopTimeoutError();
|
300
|
+
case "unknown":
|
301
|
+
throw new errors.AirtopError({
|
302
|
+
message: _response.error.errorMessage,
|
303
|
+
});
|
304
|
+
}
|
305
|
+
});
|
306
|
+
}
|
307
|
+
/**
|
308
|
+
* @param {string} sessionId - The session id for the window.
|
309
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
310
|
+
* @param {Airtop.AsyncMonitorRequest} request
|
311
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
312
|
+
*
|
313
|
+
* @example
|
314
|
+
* await client.windows.asyncMonitor("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
315
|
+
*/
|
316
|
+
asyncMonitor(sessionId, windowId, request = {}, requestOptions) {
|
317
|
+
var _a, _b;
|
318
|
+
return __awaiter(this, void 0, void 0, function* () {
|
319
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
320
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/monitor`),
|
321
|
+
method: "POST",
|
322
|
+
headers: {
|
323
|
+
Authorization: yield this._getAuthorizationHeader(),
|
324
|
+
"X-Fern-Language": "JavaScript",
|
325
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
326
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
327
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
328
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
329
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
330
|
+
},
|
331
|
+
contentType: "application/json",
|
332
|
+
requestType: "json",
|
333
|
+
body: serializers.AsyncMonitorRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
334
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
335
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
336
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
337
|
+
});
|
338
|
+
if (_response.ok) {
|
339
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
340
|
+
unrecognizedObjectKeys: "passthrough",
|
341
|
+
allowUnrecognizedUnionMembers: true,
|
342
|
+
allowUnrecognizedEnumValues: true,
|
343
|
+
skipValidation: true,
|
344
|
+
breadcrumbsPrefix: ["response"],
|
345
|
+
});
|
346
|
+
}
|
347
|
+
if (_response.error.reason === "status-code") {
|
348
|
+
throw new errors.AirtopError({
|
349
|
+
statusCode: _response.error.statusCode,
|
350
|
+
body: _response.error.body,
|
351
|
+
});
|
352
|
+
}
|
353
|
+
switch (_response.error.reason) {
|
354
|
+
case "non-json":
|
355
|
+
throw new errors.AirtopError({
|
356
|
+
statusCode: _response.error.statusCode,
|
357
|
+
body: _response.error.rawBody,
|
358
|
+
});
|
359
|
+
case "timeout":
|
360
|
+
throw new errors.AirtopTimeoutError();
|
361
|
+
case "unknown":
|
362
|
+
throw new errors.AirtopError({
|
363
|
+
message: _response.error.errorMessage,
|
364
|
+
});
|
365
|
+
}
|
366
|
+
});
|
367
|
+
}
|
368
|
+
/**
|
369
|
+
* @param {string} sessionId - The session id for the window.
|
370
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
371
|
+
* @param {Airtop.AsyncPageQueryRequest} request
|
372
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
373
|
+
*
|
374
|
+
* @example
|
375
|
+
* await client.windows.asyncPageQuery("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
376
|
+
* prompt: "What is the main idea of this page?"
|
377
|
+
* })
|
378
|
+
*/
|
379
|
+
asyncPageQuery(sessionId, windowId, request, requestOptions) {
|
380
|
+
var _a, _b;
|
381
|
+
return __awaiter(this, void 0, void 0, function* () {
|
382
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
383
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/page-query`),
|
384
|
+
method: "POST",
|
385
|
+
headers: {
|
386
|
+
Authorization: yield this._getAuthorizationHeader(),
|
387
|
+
"X-Fern-Language": "JavaScript",
|
388
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
389
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
390
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
391
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
392
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
393
|
+
},
|
394
|
+
contentType: "application/json",
|
395
|
+
requestType: "json",
|
396
|
+
body: serializers.AsyncPageQueryRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
397
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
398
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
399
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
400
|
+
});
|
401
|
+
if (_response.ok) {
|
402
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
403
|
+
unrecognizedObjectKeys: "passthrough",
|
404
|
+
allowUnrecognizedUnionMembers: true,
|
405
|
+
allowUnrecognizedEnumValues: true,
|
406
|
+
skipValidation: true,
|
407
|
+
breadcrumbsPrefix: ["response"],
|
408
|
+
});
|
409
|
+
}
|
410
|
+
if (_response.error.reason === "status-code") {
|
411
|
+
throw new errors.AirtopError({
|
412
|
+
statusCode: _response.error.statusCode,
|
413
|
+
body: _response.error.body,
|
414
|
+
});
|
415
|
+
}
|
416
|
+
switch (_response.error.reason) {
|
417
|
+
case "non-json":
|
418
|
+
throw new errors.AirtopError({
|
419
|
+
statusCode: _response.error.statusCode,
|
420
|
+
body: _response.error.rawBody,
|
421
|
+
});
|
422
|
+
case "timeout":
|
423
|
+
throw new errors.AirtopTimeoutError();
|
424
|
+
case "unknown":
|
425
|
+
throw new errors.AirtopError({
|
426
|
+
message: _response.error.errorMessage,
|
427
|
+
});
|
428
|
+
}
|
429
|
+
});
|
430
|
+
}
|
431
|
+
/**
|
432
|
+
* @param {string} sessionId - The session id for the window.
|
433
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
434
|
+
* @param {Airtop.AsyncPaginatedExtractionRequest} request
|
435
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
436
|
+
*
|
437
|
+
* @example
|
438
|
+
* await client.windows.asyncPaginatedExtraction("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
439
|
+
* prompt: "This site contains a list of results about <provide details about the list>. Navigate through 3 pages of results and return the title and <provide details about the data you want to extract> about each result in this list."
|
440
|
+
* })
|
441
|
+
*/
|
442
|
+
asyncPaginatedExtraction(sessionId, windowId, request, requestOptions) {
|
443
|
+
var _a, _b;
|
444
|
+
return __awaiter(this, void 0, void 0, function* () {
|
445
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
446
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/paginated-extraction`),
|
447
|
+
method: "POST",
|
448
|
+
headers: {
|
449
|
+
Authorization: yield this._getAuthorizationHeader(),
|
450
|
+
"X-Fern-Language": "JavaScript",
|
451
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
452
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
453
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
454
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
455
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
456
|
+
},
|
457
|
+
contentType: "application/json",
|
458
|
+
requestType: "json",
|
459
|
+
body: serializers.AsyncPaginatedExtractionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
460
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
461
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
462
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
463
|
+
});
|
464
|
+
if (_response.ok) {
|
465
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
466
|
+
unrecognizedObjectKeys: "passthrough",
|
467
|
+
allowUnrecognizedUnionMembers: true,
|
468
|
+
allowUnrecognizedEnumValues: true,
|
469
|
+
skipValidation: true,
|
470
|
+
breadcrumbsPrefix: ["response"],
|
471
|
+
});
|
472
|
+
}
|
473
|
+
if (_response.error.reason === "status-code") {
|
474
|
+
throw new errors.AirtopError({
|
475
|
+
statusCode: _response.error.statusCode,
|
476
|
+
body: _response.error.body,
|
477
|
+
});
|
478
|
+
}
|
479
|
+
switch (_response.error.reason) {
|
480
|
+
case "non-json":
|
481
|
+
throw new errors.AirtopError({
|
482
|
+
statusCode: _response.error.statusCode,
|
483
|
+
body: _response.error.rawBody,
|
484
|
+
});
|
485
|
+
case "timeout":
|
486
|
+
throw new errors.AirtopTimeoutError();
|
487
|
+
case "unknown":
|
488
|
+
throw new errors.AirtopError({
|
489
|
+
message: _response.error.errorMessage,
|
490
|
+
});
|
491
|
+
}
|
492
|
+
});
|
493
|
+
}
|
494
|
+
/**
|
495
|
+
* This endpoint is deprecated. Please use the `pageQuery` endpoint instead.
|
496
|
+
*
|
497
|
+
* @param {string} sessionId - The session id for the window.
|
498
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
499
|
+
* @param {Airtop.AsyncPromptContentRequest} request
|
500
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
501
|
+
*
|
502
|
+
* @example
|
503
|
+
* await client.windows.asyncPromptContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
504
|
+
* prompt: "What is the main idea of this page?"
|
505
|
+
* })
|
506
|
+
*/
|
507
|
+
asyncPromptContent(sessionId, windowId, request, requestOptions) {
|
508
|
+
var _a, _b;
|
509
|
+
return __awaiter(this, void 0, void 0, function* () {
|
510
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
511
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/prompt-content`),
|
512
|
+
method: "POST",
|
513
|
+
headers: {
|
514
|
+
Authorization: yield this._getAuthorizationHeader(),
|
515
|
+
"X-Fern-Language": "JavaScript",
|
516
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
517
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
518
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
519
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
520
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
521
|
+
},
|
522
|
+
contentType: "application/json",
|
523
|
+
requestType: "json",
|
524
|
+
body: serializers.AsyncPromptContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
525
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
526
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
527
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
528
|
+
});
|
529
|
+
if (_response.ok) {
|
530
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
531
|
+
unrecognizedObjectKeys: "passthrough",
|
532
|
+
allowUnrecognizedUnionMembers: true,
|
533
|
+
allowUnrecognizedEnumValues: true,
|
534
|
+
skipValidation: true,
|
535
|
+
breadcrumbsPrefix: ["response"],
|
536
|
+
});
|
537
|
+
}
|
538
|
+
if (_response.error.reason === "status-code") {
|
539
|
+
throw new errors.AirtopError({
|
540
|
+
statusCode: _response.error.statusCode,
|
541
|
+
body: _response.error.body,
|
542
|
+
});
|
543
|
+
}
|
544
|
+
switch (_response.error.reason) {
|
545
|
+
case "non-json":
|
546
|
+
throw new errors.AirtopError({
|
547
|
+
statusCode: _response.error.statusCode,
|
548
|
+
body: _response.error.rawBody,
|
549
|
+
});
|
550
|
+
case "timeout":
|
551
|
+
throw new errors.AirtopTimeoutError();
|
552
|
+
case "unknown":
|
553
|
+
throw new errors.AirtopError({
|
554
|
+
message: _response.error.errorMessage,
|
555
|
+
});
|
556
|
+
}
|
557
|
+
});
|
558
|
+
}
|
559
|
+
/**
|
560
|
+
* Take a screenshot of the current viewport of a browser window asynchronously
|
561
|
+
*
|
562
|
+
* @param {string} sessionId - The session id for the window.
|
563
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
564
|
+
* @param {Airtop.AsyncScreenshotRequest} request
|
565
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
566
|
+
*
|
567
|
+
* @example
|
568
|
+
* await client.windows.asyncScreenshot("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
569
|
+
*/
|
570
|
+
asyncScreenshot(sessionId, windowId, request = {}, requestOptions) {
|
571
|
+
var _a, _b;
|
572
|
+
return __awaiter(this, void 0, void 0, function* () {
|
573
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
574
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/screenshot`),
|
575
|
+
method: "POST",
|
576
|
+
headers: {
|
577
|
+
Authorization: yield this._getAuthorizationHeader(),
|
578
|
+
"X-Fern-Language": "JavaScript",
|
579
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
580
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
581
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
582
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
583
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
584
|
+
},
|
585
|
+
contentType: "application/json",
|
586
|
+
requestType: "json",
|
587
|
+
body: serializers.AsyncScreenshotRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
588
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
589
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
590
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
591
|
+
});
|
592
|
+
if (_response.ok) {
|
593
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
594
|
+
unrecognizedObjectKeys: "passthrough",
|
595
|
+
allowUnrecognizedUnionMembers: true,
|
596
|
+
allowUnrecognizedEnumValues: true,
|
597
|
+
skipValidation: true,
|
598
|
+
breadcrumbsPrefix: ["response"],
|
599
|
+
});
|
600
|
+
}
|
601
|
+
if (_response.error.reason === "status-code") {
|
602
|
+
throw new errors.AirtopError({
|
603
|
+
statusCode: _response.error.statusCode,
|
604
|
+
body: _response.error.body,
|
605
|
+
});
|
606
|
+
}
|
607
|
+
switch (_response.error.reason) {
|
608
|
+
case "non-json":
|
609
|
+
throw new errors.AirtopError({
|
610
|
+
statusCode: _response.error.statusCode,
|
611
|
+
body: _response.error.rawBody,
|
612
|
+
});
|
613
|
+
case "timeout":
|
614
|
+
throw new errors.AirtopTimeoutError();
|
615
|
+
case "unknown":
|
616
|
+
throw new errors.AirtopError({
|
617
|
+
message: _response.error.errorMessage,
|
618
|
+
});
|
619
|
+
}
|
620
|
+
});
|
621
|
+
}
|
622
|
+
/**
|
623
|
+
* This endpoint is deprecated. Please use the `pageQuery` endpoint and ask for a summary in the prompt instead.
|
624
|
+
*
|
625
|
+
* @param {string} sessionId - The session id for the window.
|
626
|
+
* @param {string} windowId - The Airtop window id of the browser window to summarize.
|
627
|
+
* @param {Airtop.AsyncSummarizeContentRequest} request
|
628
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
629
|
+
*
|
630
|
+
* @example
|
631
|
+
* await client.windows.asyncSummarizeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
632
|
+
*/
|
633
|
+
asyncSummarizeContent(sessionId, windowId, request = {}, requestOptions) {
|
634
|
+
var _a, _b;
|
635
|
+
return __awaiter(this, void 0, void 0, function* () {
|
636
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
637
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/summarize-content`),
|
638
|
+
method: "POST",
|
639
|
+
headers: {
|
640
|
+
Authorization: yield this._getAuthorizationHeader(),
|
641
|
+
"X-Fern-Language": "JavaScript",
|
642
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
643
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
644
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
645
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
646
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
647
|
+
},
|
648
|
+
contentType: "application/json",
|
649
|
+
requestType: "json",
|
650
|
+
body: serializers.AsyncSummarizeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
651
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
652
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
653
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
654
|
+
});
|
655
|
+
if (_response.ok) {
|
656
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
657
|
+
unrecognizedObjectKeys: "passthrough",
|
658
|
+
allowUnrecognizedUnionMembers: true,
|
659
|
+
allowUnrecognizedEnumValues: true,
|
660
|
+
skipValidation: true,
|
661
|
+
breadcrumbsPrefix: ["response"],
|
662
|
+
});
|
663
|
+
}
|
664
|
+
if (_response.error.reason === "status-code") {
|
665
|
+
throw new errors.AirtopError({
|
666
|
+
statusCode: _response.error.statusCode,
|
667
|
+
body: _response.error.body,
|
668
|
+
});
|
669
|
+
}
|
670
|
+
switch (_response.error.reason) {
|
671
|
+
case "non-json":
|
672
|
+
throw new errors.AirtopError({
|
673
|
+
statusCode: _response.error.statusCode,
|
674
|
+
body: _response.error.rawBody,
|
675
|
+
});
|
676
|
+
case "timeout":
|
677
|
+
throw new errors.AirtopTimeoutError();
|
678
|
+
case "unknown":
|
679
|
+
throw new errors.AirtopError({
|
680
|
+
message: _response.error.errorMessage,
|
681
|
+
});
|
682
|
+
}
|
683
|
+
});
|
684
|
+
}
|
685
|
+
/**
|
686
|
+
* @param {string} sessionId - The session id for the window.
|
687
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
688
|
+
* @param {Airtop.AsyncTypeRequest} request
|
689
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
690
|
+
*
|
691
|
+
* @example
|
692
|
+
* await client.windows.asyncType("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
693
|
+
* text: "Example text"
|
694
|
+
* })
|
695
|
+
*/
|
696
|
+
asyncType(sessionId, windowId, request, requestOptions) {
|
697
|
+
var _a, _b;
|
698
|
+
return __awaiter(this, void 0, void 0, function* () {
|
699
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
700
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/type`),
|
701
|
+
method: "POST",
|
702
|
+
headers: {
|
703
|
+
Authorization: yield this._getAuthorizationHeader(),
|
704
|
+
"X-Fern-Language": "JavaScript",
|
705
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
706
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
707
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
708
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
709
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
710
|
+
},
|
711
|
+
contentType: "application/json",
|
712
|
+
requestType: "json",
|
713
|
+
body: serializers.AsyncTypeRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
714
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
715
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
716
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
717
|
+
});
|
718
|
+
if (_response.ok) {
|
719
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
720
|
+
unrecognizedObjectKeys: "passthrough",
|
721
|
+
allowUnrecognizedUnionMembers: true,
|
722
|
+
allowUnrecognizedEnumValues: true,
|
723
|
+
skipValidation: true,
|
724
|
+
breadcrumbsPrefix: ["response"],
|
725
|
+
});
|
726
|
+
}
|
727
|
+
if (_response.error.reason === "status-code") {
|
728
|
+
throw new errors.AirtopError({
|
729
|
+
statusCode: _response.error.statusCode,
|
730
|
+
body: _response.error.body,
|
731
|
+
});
|
732
|
+
}
|
733
|
+
switch (_response.error.reason) {
|
734
|
+
case "non-json":
|
735
|
+
throw new errors.AirtopError({
|
736
|
+
statusCode: _response.error.statusCode,
|
737
|
+
body: _response.error.rawBody,
|
738
|
+
});
|
739
|
+
case "timeout":
|
740
|
+
throw new errors.AirtopTimeoutError();
|
741
|
+
case "unknown":
|
742
|
+
throw new errors.AirtopError({
|
743
|
+
message: _response.error.errorMessage,
|
744
|
+
});
|
745
|
+
}
|
746
|
+
});
|
747
|
+
}
|
51
748
|
/**
|
52
749
|
* Creates a new browser window in a session. Optionally, you can specify a url to load on the window upon creation.
|
53
750
|
*
|
@@ -68,8 +765,8 @@ class Windows {
|
|
68
765
|
Authorization: yield this._getAuthorizationHeader(),
|
69
766
|
"X-Fern-Language": "JavaScript",
|
70
767
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
71
|
-
"X-Fern-SDK-Version": "0.1.
|
72
|
-
"User-Agent": "@airtop/sdk/0.1.
|
768
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
769
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
73
770
|
"X-Fern-Runtime": core.RUNTIME.type,
|
74
771
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
75
772
|
},
|
@@ -144,8 +841,8 @@ class Windows {
|
|
144
841
|
Authorization: yield this._getAuthorizationHeader(),
|
145
842
|
"X-Fern-Language": "JavaScript",
|
146
843
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
147
|
-
"X-Fern-SDK-Version": "0.1.
|
148
|
-
"User-Agent": "@airtop/sdk/0.1.
|
844
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
845
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
149
846
|
"X-Fern-Runtime": core.RUNTIME.type,
|
150
847
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
151
848
|
},
|
@@ -209,8 +906,8 @@ class Windows {
|
|
209
906
|
Authorization: yield this._getAuthorizationHeader(),
|
210
907
|
"X-Fern-Language": "JavaScript",
|
211
908
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
212
|
-
"X-Fern-SDK-Version": "0.1.
|
213
|
-
"User-Agent": "@airtop/sdk/0.1.
|
909
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
910
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
214
911
|
"X-Fern-Runtime": core.RUNTIME.type,
|
215
912
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
216
913
|
},
|
@@ -271,8 +968,8 @@ class Windows {
|
|
271
968
|
Authorization: yield this._getAuthorizationHeader(),
|
272
969
|
"X-Fern-Language": "JavaScript",
|
273
970
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
274
|
-
"X-Fern-SDK-Version": "0.1.
|
275
|
-
"User-Agent": "@airtop/sdk/0.1.
|
971
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
972
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
276
973
|
"X-Fern-Runtime": core.RUNTIME.type,
|
277
974
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
278
975
|
},
|
@@ -335,8 +1032,8 @@ class Windows {
|
|
335
1032
|
Authorization: yield this._getAuthorizationHeader(),
|
336
1033
|
"X-Fern-Language": "JavaScript",
|
337
1034
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
338
|
-
"X-Fern-SDK-Version": "0.1.
|
339
|
-
"User-Agent": "@airtop/sdk/0.1.
|
1035
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
1036
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
340
1037
|
"X-Fern-Runtime": core.RUNTIME.type,
|
341
1038
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
342
1039
|
},
|
@@ -400,8 +1097,8 @@ class Windows {
|
|
400
1097
|
Authorization: yield this._getAuthorizationHeader(),
|
401
1098
|
"X-Fern-Language": "JavaScript",
|
402
1099
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
403
|
-
"X-Fern-SDK-Version": "0.1.
|
404
|
-
"User-Agent": "@airtop/sdk/0.1.
|
1100
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
1101
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
405
1102
|
"X-Fern-Runtime": core.RUNTIME.type,
|
406
1103
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
407
1104
|
},
|
@@ -442,6 +1139,69 @@ class Windows {
|
|
442
1139
|
}
|
443
1140
|
});
|
444
1141
|
}
|
1142
|
+
/**
|
1143
|
+
* @param {string} sessionId - The session id for the window.
|
1144
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
1145
|
+
* @param {Airtop.SessionMonitorHandlerRequestBody} request
|
1146
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
1147
|
+
*
|
1148
|
+
* @example
|
1149
|
+
* await client.windows.monitor("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
1150
|
+
*/
|
1151
|
+
monitor(sessionId, windowId, request = {}, requestOptions) {
|
1152
|
+
var _a, _b;
|
1153
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1154
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1155
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/monitor`),
|
1156
|
+
method: "POST",
|
1157
|
+
headers: {
|
1158
|
+
Authorization: yield this._getAuthorizationHeader(),
|
1159
|
+
"X-Fern-Language": "JavaScript",
|
1160
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
1161
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
1162
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
1163
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
1164
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
1165
|
+
},
|
1166
|
+
contentType: "application/json",
|
1167
|
+
requestType: "json",
|
1168
|
+
body: serializers.SessionMonitorHandlerRequestBody.jsonOrThrow(request, {
|
1169
|
+
unrecognizedObjectKeys: "strip",
|
1170
|
+
}),
|
1171
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
1172
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
1173
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
1174
|
+
});
|
1175
|
+
if (_response.ok) {
|
1176
|
+
return serializers.AiPromptResponse.parseOrThrow(_response.body, {
|
1177
|
+
unrecognizedObjectKeys: "passthrough",
|
1178
|
+
allowUnrecognizedUnionMembers: true,
|
1179
|
+
allowUnrecognizedEnumValues: true,
|
1180
|
+
skipValidation: true,
|
1181
|
+
breadcrumbsPrefix: ["response"],
|
1182
|
+
});
|
1183
|
+
}
|
1184
|
+
if (_response.error.reason === "status-code") {
|
1185
|
+
throw new errors.AirtopError({
|
1186
|
+
statusCode: _response.error.statusCode,
|
1187
|
+
body: _response.error.body,
|
1188
|
+
});
|
1189
|
+
}
|
1190
|
+
switch (_response.error.reason) {
|
1191
|
+
case "non-json":
|
1192
|
+
throw new errors.AirtopError({
|
1193
|
+
statusCode: _response.error.statusCode,
|
1194
|
+
body: _response.error.rawBody,
|
1195
|
+
});
|
1196
|
+
case "timeout":
|
1197
|
+
throw new errors.AirtopTimeoutError();
|
1198
|
+
case "unknown":
|
1199
|
+
throw new errors.AirtopError({
|
1200
|
+
message: _response.error.errorMessage,
|
1201
|
+
});
|
1202
|
+
}
|
1203
|
+
});
|
1204
|
+
}
|
445
1205
|
/**
|
446
1206
|
* Submit a prompt that queries the content of a specific browser window. You may extract content from the page, or ask a question about the page and allow the AI to answer it (ex. Is the user logged in?).
|
447
1207
|
*
|
@@ -465,8 +1225,8 @@ class Windows {
|
|
465
1225
|
Authorization: yield this._getAuthorizationHeader(),
|
466
1226
|
"X-Fern-Language": "JavaScript",
|
467
1227
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
468
|
-
"X-Fern-SDK-Version": "0.1.
|
469
|
-
"User-Agent": "@airtop/sdk/0.1.
|
1228
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
1229
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
470
1230
|
"X-Fern-Runtime": core.RUNTIME.type,
|
471
1231
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
472
1232
|
},
|
@@ -532,8 +1292,8 @@ class Windows {
|
|
532
1292
|
Authorization: yield this._getAuthorizationHeader(),
|
533
1293
|
"X-Fern-Language": "JavaScript",
|
534
1294
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
535
|
-
"X-Fern-SDK-Version": "0.1.
|
536
|
-
"User-Agent": "@airtop/sdk/0.1.
|
1295
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
1296
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
537
1297
|
"X-Fern-Runtime": core.RUNTIME.type,
|
538
1298
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
539
1299
|
},
|
@@ -599,8 +1359,8 @@ class Windows {
|
|
599
1359
|
Authorization: yield this._getAuthorizationHeader(),
|
600
1360
|
"X-Fern-Language": "JavaScript",
|
601
1361
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
602
|
-
"X-Fern-SDK-Version": "0.1.
|
603
|
-
"User-Agent": "@airtop/sdk/0.1.
|
1362
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
1363
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
604
1364
|
"X-Fern-Runtime": core.RUNTIME.type,
|
605
1365
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
606
1366
|
},
|
@@ -664,8 +1424,8 @@ class Windows {
|
|
664
1424
|
Authorization: yield this._getAuthorizationHeader(),
|
665
1425
|
"X-Fern-Language": "JavaScript",
|
666
1426
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
667
|
-
"X-Fern-SDK-Version": "0.1.
|
668
|
-
"User-Agent": "@airtop/sdk/0.1.
|
1427
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
1428
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
669
1429
|
"X-Fern-Runtime": core.RUNTIME.type,
|
670
1430
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
671
1431
|
},
|
@@ -727,8 +1487,8 @@ class Windows {
|
|
727
1487
|
Authorization: yield this._getAuthorizationHeader(),
|
728
1488
|
"X-Fern-Language": "JavaScript",
|
729
1489
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
730
|
-
"X-Fern-SDK-Version": "0.1.
|
731
|
-
"User-Agent": "@airtop/sdk/0.1.
|
1490
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
1491
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
732
1492
|
"X-Fern-Runtime": core.RUNTIME.type,
|
733
1493
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
734
1494
|
},
|
@@ -792,8 +1552,8 @@ class Windows {
|
|
792
1552
|
Authorization: yield this._getAuthorizationHeader(),
|
793
1553
|
"X-Fern-Language": "JavaScript",
|
794
1554
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
795
|
-
"X-Fern-SDK-Version": "0.1.
|
796
|
-
"User-Agent": "@airtop/sdk/0.1.
|
1555
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
1556
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
797
1557
|
"X-Fern-Runtime": core.RUNTIME.type,
|
798
1558
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
799
1559
|
},
|
@@ -855,8 +1615,8 @@ class Windows {
|
|
855
1615
|
Authorization: yield this._getAuthorizationHeader(),
|
856
1616
|
"X-Fern-Language": "JavaScript",
|
857
1617
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
858
|
-
"X-Fern-SDK-Version": "0.1.
|
859
|
-
"User-Agent": "@airtop/sdk/0.1.
|
1618
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
1619
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
860
1620
|
"X-Fern-Runtime": core.RUNTIME.type,
|
861
1621
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
862
1622
|
},
|
@@ -922,8 +1682,8 @@ class Windows {
|
|
922
1682
|
Authorization: yield this._getAuthorizationHeader(),
|
923
1683
|
"X-Fern-Language": "JavaScript",
|
924
1684
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
925
|
-
"X-Fern-SDK-Version": "0.1.
|
926
|
-
"User-Agent": "@airtop/sdk/0.1.
|
1685
|
+
"X-Fern-SDK-Version": "0.1.31-beta0",
|
1686
|
+
"User-Agent": "@airtop/sdk/0.1.31-beta0",
|
927
1687
|
"X-Fern-Runtime": core.RUNTIME.type,
|
928
1688
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
929
1689
|
},
|