@airtop/sdk 0.0.7 → 0.0.10-a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +4 -4
- package/Client.js +5 -0
- package/README.md +6 -6
- package/api/errors/InternalServerError.d.ts +1 -1
- package/api/errors/NotFoundError.d.ts +1 -1
- package/api/errors/UnprocessableEntityError.d.ts +1 -1
- package/api/resources/index.d.ts +2 -0
- package/api/resources/index.js +3 -1
- package/api/resources/profiles/client/Client.d.ts +7 -27
- package/api/resources/profiles/client/Client.js +26 -125
- package/api/resources/profiles/client/requests/ProfilesDeleteRequest.d.ts +3 -9
- package/api/resources/profiles/client/requests/ProfilesGetRequest.d.ts +3 -9
- package/api/resources/sessions/client/Client.d.ts +16 -66
- package/api/resources/sessions/client/Client.js +55 -359
- package/api/resources/sessions/client/requests/SessionRestInputV1.d.ts +0 -2
- package/api/resources/sessions/client/requests/SessionsListRequest.d.ts +18 -2
- package/api/resources/sessions/client/requests/index.d.ts +0 -2
- package/api/resources/sessions/types/SessionsListRequestStatus.d.ts +13 -0
- package/api/resources/sessions/types/SessionsListRequestStatus.js +12 -0
- package/api/resources/sessions/types/index.d.ts +1 -0
- package/api/resources/sessions/types/index.js +1 -0
- package/api/resources/windows/client/Client.d.ts +70 -0
- package/api/resources/windows/client/Client.js +320 -0
- package/api/resources/windows/client/index.d.ts +1 -0
- package/api/resources/windows/client/index.js +17 -0
- package/api/resources/windows/client/requests/GetWindowInfoRequest.d.ts +23 -0
- package/api/resources/{sessions/client/requests/SessionPromptContentRequest.d.ts → windows/client/requests/PromptContentRequest.d.ts} +5 -5
- package/api/resources/windows/client/requests/ScrapeContentRequest.d.ts +12 -0
- package/api/resources/windows/client/requests/SummarizeContentRequest.d.ts +14 -0
- package/api/resources/windows/client/requests/index.d.ts +4 -0
- package/api/resources/windows/client/requests/index.js +2 -0
- package/api/resources/windows/index.d.ts +1 -0
- package/api/resources/windows/index.js +17 -0
- package/api/types/AiResponseEnvelope.d.ts +9 -0
- package/api/types/AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.d.ts +10 -0
- package/api/types/ClientProvidedResponseMetadata.d.ts +1 -1
- package/api/types/DefaultMetaWrapper.d.ts +6 -0
- package/api/types/ErrorEnvelope.d.ts +12 -0
- package/api/types/ExternalProfileV1.d.ts +9 -0
- package/api/types/ExternalSessionAiResponseMetadata.d.ts +10 -0
- package/api/types/ExternalSessionAiResponseMetadataStatus.d.ts +9 -0
- package/api/types/{CleanScrapeResponseDataStatus.js → ExternalSessionAiResponseMetadataStatus.js} +3 -3
- package/api/types/ExternalSessionAiResponseMetadataUsage.d.ts +9 -0
- package/api/types/ExternalSessionConfig.d.ts +11 -0
- package/api/types/ExternalSessionWithConnectionInfo.d.ts +24 -0
- package/api/types/ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +10 -0
- package/{dist/api/types/SessionAiResponseIssue.d.ts → api/types/Issue.d.ts} +1 -1
- package/api/types/ListExternalProfileV1EnvelopeDefaultMetaWrapper.d.ts +10 -0
- package/api/types/Pagination.d.ts +13 -0
- package/api/types/ScrapeResponseEnvelope.d.ts +9 -0
- package/api/types/ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.d.ts +10 -0
- package/api/types/{CleanScrapeResponseOutput.d.ts → ScrapeResponseOutput.d.ts} +2 -2
- package/api/types/SessionConfigV1.d.ts +1 -5
- package/api/types/SessionsWithPagination.d.ts +10 -0
- package/api/types/SessionsWithPaginationEnvelopeDefaultMetaWrapper.d.ts +10 -0
- package/api/types/StatusMessageStatus.d.ts +2 -2
- package/api/types/StatusMessageStatus.js +1 -1
- package/api/types/Window.d.ts +9 -0
- package/api/types/WindowEnvelopeDefaultMetaWrapper.d.ts +10 -0
- package/api/types/index.d.ts +21 -24
- package/api/types/index.js +21 -24
- package/core/auth/BasicAuth.d.ts +8 -0
- package/core/auth/BasicAuth.js +26 -0
- package/core/auth/BearerToken.d.ts +5 -0
- package/core/auth/BearerToken.js +15 -0
- package/core/auth/index.d.ts +2 -0
- package/core/auth/index.js +7 -0
- package/core/index.d.ts +1 -0
- package/core/index.js +1 -0
- package/dist/Client.d.ts +4 -4
- package/dist/Client.js +5 -0
- package/dist/api/errors/InternalServerError.d.ts +1 -1
- package/dist/api/errors/NotFoundError.d.ts +1 -1
- package/dist/api/errors/UnprocessableEntityError.d.ts +1 -1
- package/dist/api/resources/index.d.ts +2 -0
- package/dist/api/resources/index.js +3 -1
- package/dist/api/resources/profiles/client/Client.d.ts +7 -27
- package/dist/api/resources/profiles/client/Client.js +26 -125
- package/dist/api/resources/profiles/client/requests/ProfilesDeleteRequest.d.ts +3 -9
- package/dist/api/resources/profiles/client/requests/ProfilesGetRequest.d.ts +3 -9
- package/dist/api/resources/sessions/client/Client.d.ts +16 -66
- package/dist/api/resources/sessions/client/Client.js +55 -359
- package/dist/api/resources/sessions/client/requests/SessionRestInputV1.d.ts +0 -2
- package/dist/api/resources/sessions/client/requests/SessionsListRequest.d.ts +18 -2
- package/dist/api/resources/sessions/client/requests/index.d.ts +0 -2
- package/dist/api/resources/sessions/types/SessionsListRequestStatus.d.ts +13 -0
- package/dist/api/resources/sessions/types/SessionsListRequestStatus.js +12 -0
- package/dist/api/resources/sessions/types/index.d.ts +1 -0
- package/dist/api/resources/sessions/types/index.js +1 -0
- package/dist/api/resources/windows/client/Client.d.ts +70 -0
- package/dist/api/resources/windows/client/Client.js +320 -0
- package/dist/api/resources/windows/client/index.d.ts +1 -0
- package/dist/api/resources/windows/client/index.js +17 -0
- package/dist/api/resources/windows/client/requests/GetWindowInfoRequest.d.ts +23 -0
- package/dist/api/resources/{sessions/client/requests/SessionPromptContentRequest.d.ts → windows/client/requests/PromptContentRequest.d.ts} +5 -5
- package/dist/api/resources/windows/client/requests/ScrapeContentRequest.d.ts +12 -0
- package/dist/api/resources/windows/client/requests/SummarizeContentRequest.d.ts +14 -0
- package/dist/api/resources/windows/client/requests/index.d.ts +4 -0
- package/dist/api/resources/windows/client/requests/index.js +2 -0
- package/dist/api/resources/windows/index.d.ts +1 -0
- package/dist/api/resources/windows/index.js +17 -0
- package/dist/api/types/AiResponseEnvelope.d.ts +9 -0
- package/dist/api/types/AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.d.ts +10 -0
- package/dist/api/types/ClientProvidedResponseMetadata.d.ts +1 -1
- package/dist/api/types/DefaultMetaWrapper.d.ts +6 -0
- package/dist/api/types/ErrorEnvelope.d.ts +12 -0
- package/dist/api/types/ExternalProfileV1.d.ts +9 -0
- package/dist/api/types/ExternalSessionAiResponseMetadata.d.ts +10 -0
- package/dist/api/types/ExternalSessionAiResponseMetadataStatus.d.ts +9 -0
- package/{api/types/SessionAiResponseDataStatus.js → dist/api/types/ExternalSessionAiResponseMetadataStatus.js} +3 -3
- package/dist/api/types/ExternalSessionAiResponseMetadataUsage.d.ts +9 -0
- package/dist/api/types/ExternalSessionConfig.d.ts +11 -0
- package/dist/api/types/ExternalSessionWithConnectionInfo.d.ts +24 -0
- package/dist/api/types/ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +10 -0
- package/{api/types/SessionAiResponseIssue.d.ts → dist/api/types/Issue.d.ts} +1 -1
- package/dist/api/types/ListExternalProfileV1EnvelopeDefaultMetaWrapper.d.ts +10 -0
- package/dist/api/types/Pagination.d.ts +13 -0
- package/dist/api/types/ScrapeResponseEnvelope.d.ts +9 -0
- package/dist/api/types/ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.d.ts +10 -0
- package/dist/api/types/{CleanScrapeResponseOutput.d.ts → ScrapeResponseOutput.d.ts} +2 -2
- package/dist/api/types/SessionConfigV1.d.ts +1 -5
- package/dist/api/types/SessionsWithPagination.d.ts +10 -0
- package/dist/api/types/SessionsWithPaginationEnvelopeDefaultMetaWrapper.d.ts +10 -0
- package/dist/api/types/StatusMessageStatus.d.ts +2 -2
- package/dist/api/types/StatusMessageStatus.js +1 -1
- package/dist/api/types/Window.d.ts +9 -0
- package/dist/api/types/WindowEnvelopeDefaultMetaWrapper.d.ts +10 -0
- package/dist/api/types/index.d.ts +21 -24
- package/dist/api/types/index.js +21 -24
- package/dist/core/auth/BasicAuth.d.ts +8 -0
- package/dist/core/auth/BasicAuth.js +26 -0
- package/dist/core/auth/BearerToken.d.ts +5 -0
- package/dist/core/auth/BearerToken.js +15 -0
- package/dist/core/auth/index.d.ts +2 -0
- package/dist/core/auth/index.js +7 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -3
- package/dist/serialization/resources/index.d.ts +2 -0
- package/dist/serialization/resources/index.js +3 -1
- package/dist/serialization/resources/sessions/client/requests/SessionRestInputV1.d.ts +0 -1
- package/dist/serialization/resources/sessions/client/requests/SessionRestInputV1.js +0 -1
- package/dist/serialization/resources/sessions/client/requests/index.d.ts +0 -2
- package/dist/serialization/resources/sessions/client/requests/index.js +1 -5
- package/dist/serialization/resources/sessions/types/SessionsListRequestStatus.d.ts +10 -0
- package/dist/serialization/resources/sessions/types/SessionsListRequestStatus.js +31 -0
- package/dist/serialization/resources/sessions/types/index.d.ts +1 -0
- package/dist/serialization/resources/sessions/types/index.js +1 -0
- package/dist/serialization/resources/windows/client/index.d.ts +1 -0
- package/dist/serialization/resources/windows/client/index.js +17 -0
- package/dist/serialization/resources/windows/client/requests/PromptContentRequest.d.ts +16 -0
- package/dist/serialization/resources/{sessions/client/requests/SessionPromptContentRequest.js → windows/client/requests/PromptContentRequest.js} +5 -5
- package/dist/serialization/resources/windows/client/requests/ScrapeContentRequest.d.ts +14 -0
- package/dist/serialization/resources/windows/client/requests/ScrapeContentRequest.js +35 -0
- package/dist/serialization/resources/windows/client/requests/SummarizeContentRequest.d.ts +15 -0
- package/{serialization/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.js → dist/serialization/resources/windows/client/requests/SummarizeContentRequest.js} +5 -6
- package/dist/serialization/resources/windows/client/requests/index.d.ts +3 -0
- package/dist/serialization/resources/windows/client/requests/index.js +9 -0
- package/dist/serialization/resources/windows/index.d.ts +1 -0
- package/dist/serialization/resources/windows/index.js +17 -0
- package/dist/serialization/types/AiResponseEnvelope.d.ts +15 -0
- package/dist/serialization/types/{ProfileOutputV1Body.js → AiResponseEnvelope.js} +6 -5
- package/dist/serialization/types/AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.d.ts +18 -0
- package/dist/serialization/types/AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.js +39 -0
- package/dist/serialization/types/ClientProvidedResponseMetadata.d.ts +1 -1
- package/dist/serialization/types/ClientProvidedResponseMetadata.js +1 -1
- package/dist/serialization/types/DefaultMetaWrapper.d.ts +12 -0
- package/dist/serialization/types/{SessionAiResponseDataStatus.js → DefaultMetaWrapper.js} +4 -2
- package/dist/serialization/types/ErrorEnvelope.d.ts +18 -0
- package/dist/serialization/types/ErrorEnvelope.js +39 -0
- package/{serialization/types/ProfileV1.d.ts → dist/serialization/types/ExternalProfileV1.d.ts} +3 -5
- package/dist/serialization/types/ExternalProfileV1.js +34 -0
- package/dist/serialization/types/ExternalSessionAiResponseMetadata.d.ts +18 -0
- package/dist/serialization/types/{SessionAiResponseMetadata.js → ExternalSessionAiResponseMetadata.js} +7 -4
- package/dist/serialization/types/ExternalSessionAiResponseMetadataStatus.d.ts +10 -0
- package/dist/serialization/types/ExternalSessionAiResponseMetadataStatus.js +31 -0
- package/dist/serialization/types/ExternalSessionAiResponseMetadataUsage.d.ts +13 -0
- package/dist/serialization/types/ExternalSessionAiResponseMetadataUsage.js +34 -0
- package/dist/serialization/types/ExternalSessionConfig.d.ts +14 -0
- package/dist/serialization/types/{ErrorDetail.js → ExternalSessionConfig.js} +5 -5
- package/dist/serialization/types/ExternalSessionWithConnectionInfo.d.ts +21 -0
- package/dist/serialization/types/{Session.js → ExternalSessionWithConnectionInfo.js} +10 -8
- package/dist/serialization/types/ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +18 -0
- package/dist/serialization/types/ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js +39 -0
- package/{serialization/types/SessionAiResponseIssue.d.ts → dist/serialization/types/Issue.d.ts} +2 -2
- package/{serialization/types/SessionAiResponseIssue.js → dist/serialization/types/Issue.js} +2 -2
- package/dist/serialization/types/ListExternalProfileV1EnvelopeDefaultMetaWrapper.d.ts +18 -0
- package/dist/serialization/types/ListExternalProfileV1EnvelopeDefaultMetaWrapper.js +39 -0
- package/dist/serialization/types/Pagination.d.ts +19 -0
- package/dist/serialization/types/{CleanScrapeResponseData.js → Pagination.js} +10 -6
- package/dist/serialization/types/ScrapeResponseEnvelope.d.ts +16 -0
- package/dist/serialization/types/{LiveViewUrlOutputV1Body.js → ScrapeResponseEnvelope.js} +7 -6
- package/dist/serialization/types/ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.d.ts +18 -0
- package/dist/serialization/types/ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.js +39 -0
- package/dist/serialization/types/{CleanScrapeResponseOutput.d.ts → ScrapeResponseOutput.d.ts} +3 -3
- package/{serialization/types/CleanScrapeResponseOutput.js → dist/serialization/types/ScrapeResponseOutput.js} +3 -3
- package/dist/serialization/types/SessionConfigV1.d.ts +3 -5
- package/dist/serialization/types/SessionConfigV1.js +3 -5
- package/dist/serialization/types/SessionsWithPagination.d.ts +15 -0
- package/dist/serialization/types/SessionsWithPagination.js +36 -0
- package/dist/serialization/types/SessionsWithPaginationEnvelopeDefaultMetaWrapper.d.ts +18 -0
- package/dist/serialization/types/SessionsWithPaginationEnvelopeDefaultMetaWrapper.js +39 -0
- package/dist/serialization/types/StatusMessageStatus.d.ts +1 -1
- package/dist/serialization/types/StatusMessageStatus.js +1 -1
- package/dist/serialization/types/Window.d.ts +13 -0
- package/{serialization/types/CleanScrapeResponseDataStatus.js → dist/serialization/types/Window.js} +5 -2
- package/dist/serialization/types/WindowEnvelopeDefaultMetaWrapper.d.ts +18 -0
- package/{serialization/types/CleanScrapeResponse.js → dist/serialization/types/WindowEnvelopeDefaultMetaWrapper.js} +9 -7
- package/dist/serialization/types/index.d.ts +21 -24
- package/dist/serialization/types/index.js +21 -24
- package/dist/wrapper/AirtopClient.d.ts +19 -0
- package/dist/wrapper/AirtopClient.js +32 -0
- package/dist/wrapper/AirtopSessions.d.ts +24 -0
- package/dist/wrapper/AirtopSessions.js +93 -0
- package/dist/wrapper/AirtopWindows.d.ts +18 -0
- package/dist/wrapper/AirtopWindows.js +65 -0
- package/index.d.ts +2 -1
- package/index.js +4 -3
- package/package.json +25 -4
- package/reference.md +53 -166
- package/serialization/resources/index.d.ts +2 -0
- package/serialization/resources/index.js +3 -1
- package/serialization/resources/sessions/client/requests/SessionRestInputV1.d.ts +0 -1
- package/serialization/resources/sessions/client/requests/SessionRestInputV1.js +0 -1
- package/serialization/resources/sessions/client/requests/index.d.ts +0 -2
- package/serialization/resources/sessions/client/requests/index.js +1 -5
- package/serialization/resources/sessions/types/SessionsListRequestStatus.d.ts +10 -0
- package/serialization/resources/sessions/types/SessionsListRequestStatus.js +31 -0
- package/serialization/resources/sessions/types/index.d.ts +1 -0
- package/serialization/resources/sessions/types/index.js +1 -0
- package/serialization/resources/windows/client/index.d.ts +1 -0
- package/serialization/resources/windows/client/index.js +17 -0
- package/serialization/resources/windows/client/requests/PromptContentRequest.d.ts +16 -0
- package/serialization/resources/{sessions/client/requests/SessionPromptContentRequest.js → windows/client/requests/PromptContentRequest.js} +5 -5
- package/serialization/resources/windows/client/requests/ScrapeContentRequest.d.ts +14 -0
- package/serialization/resources/windows/client/requests/ScrapeContentRequest.js +35 -0
- package/serialization/resources/windows/client/requests/SummarizeContentRequest.d.ts +15 -0
- package/{dist/serialization/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.js → serialization/resources/windows/client/requests/SummarizeContentRequest.js} +5 -6
- package/serialization/resources/windows/client/requests/index.d.ts +3 -0
- package/serialization/resources/windows/client/requests/index.js +9 -0
- package/serialization/resources/windows/index.d.ts +1 -0
- package/serialization/resources/windows/index.js +17 -0
- package/serialization/types/AiResponseEnvelope.d.ts +15 -0
- package/{dist/serialization/types/SessionAiResponseData.js → serialization/types/AiResponseEnvelope.js} +6 -5
- package/serialization/types/AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.d.ts +18 -0
- package/serialization/types/AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.js +39 -0
- package/serialization/types/ClientProvidedResponseMetadata.d.ts +1 -1
- package/serialization/types/ClientProvidedResponseMetadata.js +1 -1
- package/serialization/types/DefaultMetaWrapper.d.ts +12 -0
- package/serialization/types/{SessionAiResponseDataStatus.js → DefaultMetaWrapper.js} +4 -2
- package/serialization/types/ErrorEnvelope.d.ts +18 -0
- package/serialization/types/ErrorEnvelope.js +39 -0
- package/{dist/serialization/types/ProfileV1.d.ts → serialization/types/ExternalProfileV1.d.ts} +3 -5
- package/serialization/types/ExternalProfileV1.js +34 -0
- package/serialization/types/ExternalSessionAiResponseMetadata.d.ts +18 -0
- package/serialization/types/{SessionAiResponseMetadata.js → ExternalSessionAiResponseMetadata.js} +7 -4
- package/serialization/types/ExternalSessionAiResponseMetadataStatus.d.ts +10 -0
- package/serialization/types/ExternalSessionAiResponseMetadataStatus.js +31 -0
- package/serialization/types/ExternalSessionAiResponseMetadataUsage.d.ts +13 -0
- package/serialization/types/ExternalSessionAiResponseMetadataUsage.js +34 -0
- package/serialization/types/ExternalSessionConfig.d.ts +14 -0
- package/{dist/serialization/types/LiveViewConnectionInfo.js → serialization/types/ExternalSessionConfig.js} +5 -4
- package/serialization/types/ExternalSessionWithConnectionInfo.d.ts +21 -0
- package/serialization/types/{Session.js → ExternalSessionWithConnectionInfo.js} +10 -8
- package/serialization/types/ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +18 -0
- package/serialization/types/ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js +39 -0
- package/{dist/serialization/types/SessionAiResponseIssue.d.ts → serialization/types/Issue.d.ts} +2 -2
- package/{dist/serialization/types/SessionAiResponseIssue.js → serialization/types/Issue.js} +2 -2
- package/serialization/types/ListExternalProfileV1EnvelopeDefaultMetaWrapper.d.ts +18 -0
- package/serialization/types/ListExternalProfileV1EnvelopeDefaultMetaWrapper.js +39 -0
- package/serialization/types/Pagination.d.ts +19 -0
- package/serialization/types/Pagination.js +40 -0
- package/serialization/types/ScrapeResponseEnvelope.d.ts +16 -0
- package/serialization/types/ScrapeResponseEnvelope.js +37 -0
- package/serialization/types/ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.d.ts +18 -0
- package/serialization/types/ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.js +39 -0
- package/serialization/types/{CleanScrapeResponseOutput.d.ts → ScrapeResponseOutput.d.ts} +3 -3
- package/{dist/serialization/types/CleanScrapeResponseOutput.js → serialization/types/ScrapeResponseOutput.js} +3 -3
- package/serialization/types/SessionConfigV1.d.ts +3 -5
- package/serialization/types/SessionConfigV1.js +3 -5
- package/serialization/types/SessionsWithPagination.d.ts +15 -0
- package/serialization/types/SessionsWithPagination.js +36 -0
- package/serialization/types/SessionsWithPaginationEnvelopeDefaultMetaWrapper.d.ts +18 -0
- package/serialization/types/SessionsWithPaginationEnvelopeDefaultMetaWrapper.js +39 -0
- package/serialization/types/StatusMessageStatus.d.ts +1 -1
- package/serialization/types/StatusMessageStatus.js +1 -1
- package/serialization/types/Window.d.ts +13 -0
- package/{dist/serialization/types/CleanScrapeResponseDataStatus.js → serialization/types/Window.js} +5 -2
- package/serialization/types/WindowEnvelopeDefaultMetaWrapper.d.ts +18 -0
- package/{dist/serialization/types/CleanScrapeResponse.js → serialization/types/WindowEnvelopeDefaultMetaWrapper.js} +9 -7
- package/serialization/types/index.d.ts +21 -24
- package/serialization/types/index.js +21 -24
- package/wrapper/AirtopClient.d.ts +19 -0
- package/wrapper/AirtopClient.js +32 -0
- package/wrapper/AirtopSessions.d.ts +24 -0
- package/wrapper/AirtopSessions.js +93 -0
- package/wrapper/AirtopWindows.d.ts +18 -0
- package/wrapper/AirtopWindows.js +65 -0
- package/api/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.d.ts +0 -18
- package/api/types/CleanScrapeResponse.d.ts +0 -12
- package/api/types/CleanScrapeResponseData.d.ts +0 -10
- package/api/types/CleanScrapeResponseDataStatus.d.ts +0 -12
- package/api/types/ConnectionInfo.d.ts +0 -14
- package/api/types/ErrorDetail.d.ts +0 -10
- package/api/types/ErrorModel.d.ts +0 -20
- package/api/types/LiveViewConnectionInfo.d.ts +0 -9
- package/api/types/LiveViewUrlOutputV1Body.d.ts +0 -13
- package/api/types/ProfileOutputV1Body.d.ts +0 -10
- package/api/types/ProfileV1.d.ts +0 -13
- package/api/types/ProfilesOutputV1Body.d.ts +0 -9
- package/api/types/Session.d.ts +0 -20
- package/api/types/SessionAiResponse.d.ts +0 -16
- package/api/types/SessionAiResponseData.d.ts +0 -10
- package/api/types/SessionAiResponseDataStatus.d.ts +0 -12
- package/api/types/SessionAiResponseMetadata.d.ts +0 -10
- package/api/types/SessionAiResponseMetadataUsage.d.ts +0 -14
- package/api/types/SessionAiResponseResponseMetadataModelUsage.d.ts +0 -10
- package/api/types/SessionConfig.d.ts +0 -15
- package/api/types/SessionOutputV1Body.d.ts +0 -12
- package/api/types/SessionWithConnectionInfo.d.ts +0 -10
- package/api/types/SessionsOutputV1Body.d.ts +0 -10
- package/dist/api/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.d.ts +0 -18
- package/dist/api/types/CleanScrapeResponse.d.ts +0 -12
- package/dist/api/types/CleanScrapeResponseData.d.ts +0 -10
- package/dist/api/types/CleanScrapeResponseDataStatus.d.ts +0 -12
- package/dist/api/types/CleanScrapeResponseDataStatus.js +0 -11
- package/dist/api/types/ConnectionInfo.d.ts +0 -14
- package/dist/api/types/ErrorDetail.d.ts +0 -10
- package/dist/api/types/ErrorModel.d.ts +0 -20
- package/dist/api/types/LiveViewConnectionInfo.d.ts +0 -9
- package/dist/api/types/LiveViewUrlOutputV1Body.d.ts +0 -13
- package/dist/api/types/ProfileOutputV1Body.d.ts +0 -10
- package/dist/api/types/ProfileV1.d.ts +0 -13
- package/dist/api/types/ProfilesOutputV1Body.d.ts +0 -9
- package/dist/api/types/Session.d.ts +0 -20
- package/dist/api/types/SessionAiResponse.d.ts +0 -16
- package/dist/api/types/SessionAiResponseData.d.ts +0 -10
- package/dist/api/types/SessionAiResponseDataStatus.d.ts +0 -12
- package/dist/api/types/SessionAiResponseDataStatus.js +0 -11
- package/dist/api/types/SessionAiResponseMetadata.d.ts +0 -10
- package/dist/api/types/SessionAiResponseMetadataUsage.d.ts +0 -14
- package/dist/api/types/SessionAiResponseResponseMetadataModelUsage.d.ts +0 -10
- package/dist/api/types/SessionConfig.d.ts +0 -15
- package/dist/api/types/SessionOutputV1Body.d.ts +0 -12
- package/dist/api/types/SessionWithConnectionInfo.d.ts +0 -10
- package/dist/api/types/SessionsOutputV1Body.d.ts +0 -10
- package/dist/serialization/resources/sessions/client/requests/SessionPromptContentRequest.d.ts +0 -16
- package/dist/serialization/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.d.ts +0 -16
- package/dist/serialization/types/CleanScrapeResponse.d.ts +0 -16
- package/dist/serialization/types/CleanScrapeResponseData.d.ts +0 -15
- package/dist/serialization/types/CleanScrapeResponseDataStatus.d.ts +0 -10
- package/dist/serialization/types/ConnectionInfo.d.ts +0 -16
- package/dist/serialization/types/ConnectionInfo.js +0 -37
- package/dist/serialization/types/ErrorDetail.d.ts +0 -14
- package/dist/serialization/types/ErrorModel.d.ts +0 -19
- package/dist/serialization/types/ErrorModel.js +0 -40
- package/dist/serialization/types/LiveViewConnectionInfo.d.ts +0 -13
- package/dist/serialization/types/LiveViewUrlOutputV1Body.d.ts +0 -15
- package/dist/serialization/types/ProfileOutputV1Body.d.ts +0 -14
- package/dist/serialization/types/ProfileV1.js +0 -36
- package/dist/serialization/types/ProfilesOutputV1Body.d.ts +0 -14
- package/dist/serialization/types/ProfilesOutputV1Body.js +0 -35
- package/dist/serialization/types/Session.d.ts +0 -19
- package/dist/serialization/types/SessionAiResponse.d.ts +0 -19
- package/dist/serialization/types/SessionAiResponse.js +0 -40
- package/dist/serialization/types/SessionAiResponseData.d.ts +0 -14
- package/dist/serialization/types/SessionAiResponseDataStatus.d.ts +0 -10
- package/dist/serialization/types/SessionAiResponseMetadata.d.ts +0 -15
- package/dist/serialization/types/SessionAiResponseMetadataUsage.d.ts +0 -16
- package/dist/serialization/types/SessionAiResponseMetadataUsage.js +0 -37
- package/dist/serialization/types/SessionAiResponseResponseMetadataModelUsage.d.ts +0 -16
- package/dist/serialization/types/SessionAiResponseResponseMetadataModelUsage.js +0 -37
- package/dist/serialization/types/SessionConfig.d.ts +0 -16
- package/dist/serialization/types/SessionConfig.js +0 -37
- package/dist/serialization/types/SessionOutputV1Body.d.ts +0 -16
- package/dist/serialization/types/SessionOutputV1Body.js +0 -37
- package/dist/serialization/types/SessionWithConnectionInfo.d.ts +0 -15
- package/dist/serialization/types/SessionWithConnectionInfo.js +0 -36
- package/dist/serialization/types/SessionsOutputV1Body.d.ts +0 -14
- package/dist/serialization/types/SessionsOutputV1Body.js +0 -35
- package/serialization/resources/sessions/client/requests/SessionPromptContentRequest.d.ts +0 -16
- package/serialization/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.d.ts +0 -16
- package/serialization/types/CleanScrapeResponse.d.ts +0 -16
- package/serialization/types/CleanScrapeResponseData.d.ts +0 -15
- package/serialization/types/CleanScrapeResponseData.js +0 -36
- package/serialization/types/CleanScrapeResponseDataStatus.d.ts +0 -10
- package/serialization/types/ConnectionInfo.d.ts +0 -16
- package/serialization/types/ConnectionInfo.js +0 -37
- package/serialization/types/ErrorDetail.d.ts +0 -14
- package/serialization/types/ErrorDetail.js +0 -35
- package/serialization/types/ErrorModel.d.ts +0 -19
- package/serialization/types/ErrorModel.js +0 -40
- package/serialization/types/LiveViewConnectionInfo.d.ts +0 -13
- package/serialization/types/LiveViewConnectionInfo.js +0 -34
- package/serialization/types/LiveViewUrlOutputV1Body.d.ts +0 -15
- package/serialization/types/LiveViewUrlOutputV1Body.js +0 -36
- package/serialization/types/ProfileOutputV1Body.d.ts +0 -14
- package/serialization/types/ProfileOutputV1Body.js +0 -35
- package/serialization/types/ProfileV1.js +0 -36
- package/serialization/types/ProfilesOutputV1Body.d.ts +0 -14
- package/serialization/types/ProfilesOutputV1Body.js +0 -35
- package/serialization/types/Session.d.ts +0 -19
- package/serialization/types/SessionAiResponse.d.ts +0 -19
- package/serialization/types/SessionAiResponse.js +0 -40
- package/serialization/types/SessionAiResponseData.d.ts +0 -14
- package/serialization/types/SessionAiResponseData.js +0 -35
- package/serialization/types/SessionAiResponseDataStatus.d.ts +0 -10
- package/serialization/types/SessionAiResponseMetadata.d.ts +0 -15
- package/serialization/types/SessionAiResponseMetadataUsage.d.ts +0 -16
- package/serialization/types/SessionAiResponseMetadataUsage.js +0 -37
- package/serialization/types/SessionAiResponseResponseMetadataModelUsage.d.ts +0 -16
- package/serialization/types/SessionAiResponseResponseMetadataModelUsage.js +0 -37
- package/serialization/types/SessionConfig.d.ts +0 -16
- package/serialization/types/SessionConfig.js +0 -37
- package/serialization/types/SessionOutputV1Body.d.ts +0 -16
- package/serialization/types/SessionOutputV1Body.js +0 -37
- package/serialization/types/SessionWithConnectionInfo.d.ts +0 -15
- package/serialization/types/SessionWithConnectionInfo.js +0 -36
- package/serialization/types/SessionsOutputV1Body.d.ts +0 -14
- package/serialization/types/SessionsOutputV1Body.js +0 -35
- /package/api/resources/{sessions/client/requests/SessionPromptContentRequest.js → windows/client/requests/GetWindowInfoRequest.js} +0 -0
- /package/api/resources/{sessions/client/requests/SessionPromptPaginatedExtractionRequest.js → windows/client/requests/PromptContentRequest.js} +0 -0
- /package/api/{types/CleanScrapeResponse.js → resources/windows/client/requests/ScrapeContentRequest.js} +0 -0
- /package/api/{types/CleanScrapeResponseData.js → resources/windows/client/requests/SummarizeContentRequest.js} +0 -0
- /package/api/types/{CleanScrapeResponseOutput.js → AiResponseEnvelope.js} +0 -0
- /package/api/types/{ConnectionInfo.js → AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.js} +0 -0
- /package/api/types/{ErrorDetail.js → DefaultMetaWrapper.js} +0 -0
- /package/api/types/{ErrorModel.js → ErrorEnvelope.js} +0 -0
- /package/api/types/{LiveViewConnectionInfo.js → ExternalProfileV1.js} +0 -0
- /package/api/types/{LiveViewUrlOutputV1Body.js → ExternalSessionAiResponseMetadata.js} +0 -0
- /package/api/types/{ProfileOutputV1Body.js → ExternalSessionAiResponseMetadataUsage.js} +0 -0
- /package/api/types/{ProfileV1.js → ExternalSessionConfig.js} +0 -0
- /package/api/types/{ProfilesOutputV1Body.js → ExternalSessionWithConnectionInfo.js} +0 -0
- /package/api/types/{Session.js → ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js} +0 -0
- /package/api/types/{SessionAiResponse.js → Issue.js} +0 -0
- /package/api/types/{SessionAiResponseData.js → ListExternalProfileV1EnvelopeDefaultMetaWrapper.js} +0 -0
- /package/api/types/{SessionAiResponseIssue.js → Pagination.js} +0 -0
- /package/api/types/{SessionAiResponseMetadata.js → ScrapeResponseEnvelope.js} +0 -0
- /package/api/types/{SessionAiResponseMetadataUsage.js → ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.js} +0 -0
- /package/api/types/{SessionAiResponseResponseMetadataModelUsage.js → ScrapeResponseOutput.js} +0 -0
- /package/api/types/{SessionConfig.js → SessionsWithPagination.js} +0 -0
- /package/api/types/{SessionOutputV1Body.js → SessionsWithPaginationEnvelopeDefaultMetaWrapper.js} +0 -0
- /package/api/types/{SessionWithConnectionInfo.js → Window.js} +0 -0
- /package/api/types/{SessionsOutputV1Body.js → WindowEnvelopeDefaultMetaWrapper.js} +0 -0
- /package/dist/api/resources/{sessions/client/requests/SessionPromptContentRequest.js → windows/client/requests/GetWindowInfoRequest.js} +0 -0
- /package/dist/api/resources/{sessions/client/requests/SessionPromptPaginatedExtractionRequest.js → windows/client/requests/PromptContentRequest.js} +0 -0
- /package/dist/api/{types/CleanScrapeResponse.js → resources/windows/client/requests/ScrapeContentRequest.js} +0 -0
- /package/dist/api/{types/CleanScrapeResponseData.js → resources/windows/client/requests/SummarizeContentRequest.js} +0 -0
- /package/dist/api/types/{CleanScrapeResponseOutput.js → AiResponseEnvelope.js} +0 -0
- /package/dist/api/types/{ConnectionInfo.js → AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.js} +0 -0
- /package/dist/api/types/{ErrorDetail.js → DefaultMetaWrapper.js} +0 -0
- /package/dist/api/types/{ErrorModel.js → ErrorEnvelope.js} +0 -0
- /package/dist/api/types/{LiveViewConnectionInfo.js → ExternalProfileV1.js} +0 -0
- /package/dist/api/types/{LiveViewUrlOutputV1Body.js → ExternalSessionAiResponseMetadata.js} +0 -0
- /package/dist/api/types/{ProfileOutputV1Body.js → ExternalSessionAiResponseMetadataUsage.js} +0 -0
- /package/dist/api/types/{ProfileV1.js → ExternalSessionConfig.js} +0 -0
- /package/dist/api/types/{ProfilesOutputV1Body.js → ExternalSessionWithConnectionInfo.js} +0 -0
- /package/dist/api/types/{Session.js → ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js} +0 -0
- /package/dist/api/types/{SessionAiResponse.js → Issue.js} +0 -0
- /package/dist/api/types/{SessionAiResponseData.js → ListExternalProfileV1EnvelopeDefaultMetaWrapper.js} +0 -0
- /package/dist/api/types/{SessionAiResponseIssue.js → Pagination.js} +0 -0
- /package/dist/api/types/{SessionAiResponseMetadata.js → ScrapeResponseEnvelope.js} +0 -0
- /package/dist/api/types/{SessionAiResponseMetadataUsage.js → ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.js} +0 -0
- /package/dist/api/types/{SessionAiResponseResponseMetadataModelUsage.js → ScrapeResponseOutput.js} +0 -0
- /package/dist/api/types/{SessionConfig.js → SessionsWithPagination.js} +0 -0
- /package/dist/api/types/{SessionOutputV1Body.js → SessionsWithPaginationEnvelopeDefaultMetaWrapper.js} +0 -0
- /package/dist/api/types/{SessionWithConnectionInfo.js → Window.js} +0 -0
- /package/dist/api/types/{SessionsOutputV1Body.js → WindowEnvelopeDefaultMetaWrapper.js} +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AirtopClient = void 0;
|
|
4
|
+
const Client_1 = require("../Client"); // alias the Fern generated client
|
|
5
|
+
const AirtopWindows_1 = require("./AirtopWindows");
|
|
6
|
+
const AirtopSessions_1 = require("./AirtopSessions");
|
|
7
|
+
class AirtopClient {
|
|
8
|
+
constructor(options) {
|
|
9
|
+
this._client = new Client_1.AirtopClient(options);
|
|
10
|
+
this.debug = (options === null || options === void 0 ? void 0 : options.debug) || false;
|
|
11
|
+
this._windowsWrapper = new AirtopWindows_1.AirtopWindows(this._client);
|
|
12
|
+
this._sessionsWrapper = new AirtopSessions_1.AirtopSessions(this._client, options === null || options === void 0 ? void 0 : options.debug);
|
|
13
|
+
}
|
|
14
|
+
get windows() {
|
|
15
|
+
return this._windowsWrapper;
|
|
16
|
+
}
|
|
17
|
+
get sessions() {
|
|
18
|
+
return this._sessionsWrapper;
|
|
19
|
+
}
|
|
20
|
+
get profiles() {
|
|
21
|
+
return this._client.profiles;
|
|
22
|
+
}
|
|
23
|
+
log(message) {
|
|
24
|
+
if (this.debug) {
|
|
25
|
+
console.log(message);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
error(err) {
|
|
29
|
+
console.error(err);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.AirtopClient = AirtopClient;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AirtopClient as FernClient } from '../Client';
|
|
2
|
+
import * as Airtop from '../api';
|
|
3
|
+
import * as core from '../core';
|
|
4
|
+
import { Sessions as SessionsNamespace } from '../api/resources/sessions/client/Client';
|
|
5
|
+
export interface AirtopSessionConfigV1 extends Airtop.SessionConfigV1 {
|
|
6
|
+
skipWaitSessionReady?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface AirtopSessionRestInputV1 {
|
|
9
|
+
/** Session configuration */
|
|
10
|
+
configuration?: AirtopSessionConfigV1;
|
|
11
|
+
}
|
|
12
|
+
export declare class AirtopSessions {
|
|
13
|
+
private airtopClient;
|
|
14
|
+
private debug;
|
|
15
|
+
private _sessions;
|
|
16
|
+
constructor(airtopClient: FernClient, debug?: boolean);
|
|
17
|
+
log(message: any): void;
|
|
18
|
+
list(request?: Airtop.SessionsListRequest, requestOptions?: SessionsNamespace.RequestOptions): Promise<Airtop.SessionsWithPaginationEnvelopeDefaultMetaWrapper>;
|
|
19
|
+
create(request?: AirtopSessionRestInputV1, requestOptions?: SessionsNamespace.RequestOptions): Promise<Airtop.ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper>;
|
|
20
|
+
waitForSessionReady(id: string, requestOptions?: SessionsNamespace.RequestOptions): Promise<Airtop.SessionsEventsResponse | null>;
|
|
21
|
+
getInfo(id: string, requestOptions?: SessionsNamespace.RequestOptions): Promise<Airtop.ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper>;
|
|
22
|
+
terminate(id: string, requestOptions?: SessionsNamespace.RequestOptions): Promise<void>;
|
|
23
|
+
events(id: string, requestOptions?: SessionsNamespace.RequestOptions): Promise<core.Stream<Airtop.SessionsEventsResponse>>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
12
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
13
|
+
var m = o[Symbol.asyncIterator], i;
|
|
14
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
15
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
16
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.AirtopSessions = void 0;
|
|
20
|
+
class AirtopSessions {
|
|
21
|
+
constructor(airtopClient, debug = false) {
|
|
22
|
+
this.airtopClient = airtopClient;
|
|
23
|
+
this.debug = debug;
|
|
24
|
+
this._sessions = airtopClient.sessions;
|
|
25
|
+
}
|
|
26
|
+
log(message) {
|
|
27
|
+
if (this.debug) {
|
|
28
|
+
console.log(message);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
list(request, requestOptions) {
|
|
32
|
+
return this._sessions.list(request, requestOptions);
|
|
33
|
+
}
|
|
34
|
+
create(request, requestOptions) {
|
|
35
|
+
var _a;
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
const createSessionResponse = yield this._sessions.create(request, requestOptions);
|
|
38
|
+
if (!createSessionResponse.data) {
|
|
39
|
+
throw new Error(`Error creating browser session`);
|
|
40
|
+
}
|
|
41
|
+
if ((_a = request === null || request === void 0 ? void 0 : request.configuration) === null || _a === void 0 ? void 0 : _a.skipWaitSessionReady) {
|
|
42
|
+
return createSessionResponse;
|
|
43
|
+
}
|
|
44
|
+
this.log('session created:\n' + JSON.stringify(createSessionResponse, null, 2));
|
|
45
|
+
try {
|
|
46
|
+
const event = yield this.waitForSessionReady(createSessionResponse.data.id, requestOptions);
|
|
47
|
+
if (!event) {
|
|
48
|
+
this.log('No browser created, timed out?');
|
|
49
|
+
throw new Error(`Waiting for session ready timed out`);
|
|
50
|
+
}
|
|
51
|
+
return this.getInfo(createSessionResponse.data.id, requestOptions);
|
|
52
|
+
}
|
|
53
|
+
catch (e) {
|
|
54
|
+
this.log(e);
|
|
55
|
+
throw new Error(`Error creating a new browser ${e}`);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
waitForSessionReady(id, requestOptions) {
|
|
60
|
+
var e_1, _a;
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
const sessionEvents = yield this.events(id, Object.assign({ timeoutInSeconds: 60 }, (requestOptions || {})));
|
|
63
|
+
try {
|
|
64
|
+
for (var sessionEvents_1 = __asyncValues(sessionEvents), sessionEvents_1_1; sessionEvents_1_1 = yield sessionEvents_1.next(), !sessionEvents_1_1.done;) {
|
|
65
|
+
const event = sessionEvents_1_1.value;
|
|
66
|
+
this.log('status message received:\n' + JSON.stringify(event, null, 2));
|
|
67
|
+
const e = event;
|
|
68
|
+
if (e.event === 'status' && e.status === 'running') {
|
|
69
|
+
return event;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
74
|
+
finally {
|
|
75
|
+
try {
|
|
76
|
+
if (sessionEvents_1_1 && !sessionEvents_1_1.done && (_a = sessionEvents_1.return)) yield _a.call(sessionEvents_1);
|
|
77
|
+
}
|
|
78
|
+
finally { if (e_1) throw e_1.error; }
|
|
79
|
+
}
|
|
80
|
+
return null;
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
getInfo(id, requestOptions) {
|
|
84
|
+
return this._sessions.getinfo(id, requestOptions);
|
|
85
|
+
}
|
|
86
|
+
terminate(id, requestOptions) {
|
|
87
|
+
return this._sessions.terminate(id, requestOptions);
|
|
88
|
+
}
|
|
89
|
+
events(id, requestOptions) {
|
|
90
|
+
return this._sessions.events(id, requestOptions);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.AirtopSessions = AirtopSessions;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Page as PuppeteerPage } from 'puppeteer';
|
|
2
|
+
import { Page as PlaywrightPage } from 'playwright';
|
|
3
|
+
import { WebDriver } from 'selenium-webdriver';
|
|
4
|
+
import { AirtopClient as FernClient } from '../Client';
|
|
5
|
+
import * as Airtop from '../api';
|
|
6
|
+
import { Windows as WindowsNamespace } from '../api/resources/windows/client/Client';
|
|
7
|
+
export declare class AirtopWindows {
|
|
8
|
+
private airtopClient;
|
|
9
|
+
private _windows;
|
|
10
|
+
constructor(airtopClient: FernClient);
|
|
11
|
+
getWindowInfo(sessionId: string, windowId: string, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowEnvelopeDefaultMetaWrapper>;
|
|
12
|
+
promptContent(sessionId: string, windowId: string, request: Airtop.PromptContentRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper>;
|
|
13
|
+
scrapeContent(sessionId: string, windowId: string, requestOptions?: Airtop.ScrapeContentRequest): Promise<Airtop.ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper>;
|
|
14
|
+
summarizeContent(sessionId: string, windowId: string, request?: Airtop.SummarizeContentRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper>;
|
|
15
|
+
getWindowInfoForPuppeteerPage(sessionId: string, page: PuppeteerPage, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowEnvelopeDefaultMetaWrapper>;
|
|
16
|
+
getWindowInfoForPlaywrightPage(sessionId: string, page: PlaywrightPage, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowEnvelopeDefaultMetaWrapper>;
|
|
17
|
+
getWindowInfoForSeleniumDriver(sessionId: string, driver: WebDriver, request?: Airtop.GetWindowInfoRequest, requestOptions?: WindowsNamespace.RequestOptions): Promise<Airtop.WindowEnvelopeDefaultMetaWrapper>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AirtopWindows = void 0;
|
|
13
|
+
class AirtopWindows {
|
|
14
|
+
constructor(airtopClient) {
|
|
15
|
+
this.airtopClient = airtopClient;
|
|
16
|
+
this._windows = airtopClient.windows;
|
|
17
|
+
}
|
|
18
|
+
getWindowInfo(sessionId, windowId, request, requestOptions) {
|
|
19
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
+
return this._windows.getWindowInfo(sessionId, windowId, request, requestOptions);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
promptContent(sessionId, windowId, request, requestOptions) {
|
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
return this._windows.promptContent(sessionId, windowId, request, requestOptions);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
scrapeContent(sessionId, windowId, requestOptions) {
|
|
29
|
+
return this._windows.scrapeContent(sessionId, windowId, requestOptions);
|
|
30
|
+
}
|
|
31
|
+
summarizeContent(sessionId, windowId, request, requestOptions) {
|
|
32
|
+
return this._windows.summarizeContent(sessionId, windowId, request, requestOptions);
|
|
33
|
+
}
|
|
34
|
+
getWindowInfoForPuppeteerPage(sessionId, page, request, requestOptions) {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
const targetId = yield page.mainFrame()._id;
|
|
37
|
+
return yield this.getWindowInfo(sessionId, targetId, request, requestOptions);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
getWindowInfoForPlaywrightPage(sessionId, page, request, requestOptions) {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
// Retrieve target information
|
|
43
|
+
const cdpSession = yield page.context().newCDPSession(page);
|
|
44
|
+
const { targetInfo } = yield cdpSession.send('Target.getTargetInfo');
|
|
45
|
+
const targetId = targetInfo.targetId;
|
|
46
|
+
if (!targetId) {
|
|
47
|
+
throw new Error('TargetId not found');
|
|
48
|
+
}
|
|
49
|
+
return yield this.getWindowInfo(sessionId, targetId, request, requestOptions);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
getWindowInfoForSeleniumDriver(sessionId, driver, request, requestOptions) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
const cdpSession = yield driver.createCDPConnection('page');
|
|
55
|
+
// Fetch the available targets using the Target domain
|
|
56
|
+
const { targetInfo } = yield cdpSession.send('Target.getTargetInfo');
|
|
57
|
+
const targetId = targetInfo.targetId;
|
|
58
|
+
if (!targetId) {
|
|
59
|
+
throw new Error('TargetId not found');
|
|
60
|
+
}
|
|
61
|
+
return yield this.getWindowInfo(sessionId, targetId, request, requestOptions);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.AirtopWindows = AirtopWindows;
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * as Airtop from "./api";
|
|
2
|
-
export
|
|
2
|
+
export * as Resources from './api/resources';
|
|
3
3
|
export { AirtopEnvironment } from "./environments";
|
|
4
4
|
export { AirtopError, AirtopTimeoutError } from "./errors";
|
|
5
|
+
export { AirtopClient } from './wrapper/AirtopClient';
|
package/index.js
CHANGED
|
@@ -23,12 +23,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.AirtopTimeoutError = exports.AirtopError = exports.AirtopEnvironment = exports.
|
|
26
|
+
exports.AirtopClient = exports.AirtopTimeoutError = exports.AirtopError = exports.AirtopEnvironment = exports.Resources = exports.Airtop = void 0;
|
|
27
27
|
exports.Airtop = __importStar(require("./api"));
|
|
28
|
-
|
|
29
|
-
Object.defineProperty(exports, "AirtopClient", { enumerable: true, get: function () { return Client_1.AirtopClient; } });
|
|
28
|
+
exports.Resources = __importStar(require("./api/resources"));
|
|
30
29
|
var environments_1 = require("./environments");
|
|
31
30
|
Object.defineProperty(exports, "AirtopEnvironment", { enumerable: true, get: function () { return environments_1.AirtopEnvironment; } });
|
|
32
31
|
var errors_1 = require("./errors");
|
|
33
32
|
Object.defineProperty(exports, "AirtopError", { enumerable: true, get: function () { return errors_1.AirtopError; } });
|
|
34
33
|
Object.defineProperty(exports, "AirtopTimeoutError", { enumerable: true, get: function () { return errors_1.AirtopTimeoutError; } });
|
|
34
|
+
var AirtopClient_1 = require("./wrapper/AirtopClient");
|
|
35
|
+
Object.defineProperty(exports, "AirtopClient", { enumerable: true, get: function () { return AirtopClient_1.AirtopClient; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@airtop/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10-a",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": "https://github.com/airtop-ai/airtop-node-sdk",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -16,7 +16,11 @@
|
|
|
16
16
|
"form-data": "^4.0.0",
|
|
17
17
|
"formdata-node": "^6.0.3",
|
|
18
18
|
"node-fetch": "2.7.0",
|
|
19
|
-
"qs": "6.11.2"
|
|
19
|
+
"qs": "6.11.2",
|
|
20
|
+
"js-base64": "3.7.2",
|
|
21
|
+
"playwright": "1.47.2",
|
|
22
|
+
"puppeteer": "22.14.0",
|
|
23
|
+
"selenium-webdriver": "4.25.0"
|
|
20
24
|
},
|
|
21
25
|
"devDependencies": {
|
|
22
26
|
"@types/url-join": "4.0.1",
|
|
@@ -29,11 +33,28 @@
|
|
|
29
33
|
"jest-environment-jsdom": "29.7.0",
|
|
30
34
|
"@types/node": "17.0.33",
|
|
31
35
|
"prettier": "2.7.1",
|
|
32
|
-
"typescript": "4.6.4"
|
|
36
|
+
"typescript": "4.6.4",
|
|
37
|
+
"@types/selenium-webdriver": "4.1.26"
|
|
33
38
|
},
|
|
34
39
|
"browser": {
|
|
35
40
|
"fs": false,
|
|
36
41
|
"os": false,
|
|
37
42
|
"path": false
|
|
38
|
-
}
|
|
43
|
+
},
|
|
44
|
+
"author": {
|
|
45
|
+
"name": "airtop.ai",
|
|
46
|
+
"url": "https://www.airtop.ai/"
|
|
47
|
+
},
|
|
48
|
+
"description": "SDK for Airtop cloud browsers",
|
|
49
|
+
"keywords": [
|
|
50
|
+
"airtop",
|
|
51
|
+
"ai",
|
|
52
|
+
"cloud",
|
|
53
|
+
"browser",
|
|
54
|
+
"automation",
|
|
55
|
+
"agent",
|
|
56
|
+
"node",
|
|
57
|
+
"typescript"
|
|
58
|
+
],
|
|
59
|
+
"license": "MIT"
|
|
39
60
|
}
|