@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,19 @@
|
|
1
|
+
import { AirtopClient as FernClient } from '../Client';
|
2
|
+
import { AirtopWindows } from './AirtopWindows';
|
3
|
+
import { AirtopSessions } from './AirtopSessions';
|
4
|
+
declare type AugmentedOptions = FernClient.Options & {
|
5
|
+
debug?: boolean;
|
6
|
+
};
|
7
|
+
export declare class AirtopClient {
|
8
|
+
debug: boolean;
|
9
|
+
private _client;
|
10
|
+
private _windowsWrapper;
|
11
|
+
private _sessionsWrapper;
|
12
|
+
constructor(options?: AugmentedOptions);
|
13
|
+
get windows(): AirtopWindows;
|
14
|
+
get sessions(): AirtopSessions;
|
15
|
+
get profiles(): import("../api/resources/profiles/client/Client").Profiles;
|
16
|
+
log(message: string): void;
|
17
|
+
error(err: any): void;
|
18
|
+
}
|
19
|
+
export {};
|
@@ -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;
|
@@ -1,18 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
/**
|
5
|
-
* @example
|
6
|
-
* {
|
7
|
-
* prompt: "For each page on return all the items listed including a subfield"
|
8
|
-
* }
|
9
|
-
*/
|
10
|
-
export interface SessionPromptPaginatedExtractionRequest {
|
11
|
-
/** A URL to the JSON Schema for this object. */
|
12
|
-
schema?: string;
|
13
|
-
costThresholdCredits?: number;
|
14
|
-
customerRequestId?: string;
|
15
|
-
/** The prompt to perform a paginated extraction with */
|
16
|
-
prompt: string;
|
17
|
-
timeThresholdMs?: number;
|
18
|
-
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
import * as Airtop from "../index";
|
5
|
-
export interface CleanScrapeResponse {
|
6
|
-
/** A URL to the JSON Schema for this object. */
|
7
|
-
schema?: string;
|
8
|
-
/** The data about the scraped browser window */
|
9
|
-
data: Airtop.CleanScrapeResponseData;
|
10
|
-
/** Metadata about the response */
|
11
|
-
meta: Airtop.SessionAiResponseMetadata;
|
12
|
-
}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
import * as Airtop from "../index";
|
5
|
-
export interface CleanScrapeResponseData {
|
6
|
-
/** The response to the question about this specific browser window */
|
7
|
-
output: Airtop.CleanScrapeResponseOutput;
|
8
|
-
/** outcome of the operation */
|
9
|
-
status: Airtop.CleanScrapeResponseDataStatus;
|
10
|
-
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
/**
|
5
|
-
* outcome of the operation
|
6
|
-
*/
|
7
|
-
export declare type CleanScrapeResponseDataStatus = "success" | "partial_success" | "failure";
|
8
|
-
export declare const CleanScrapeResponseDataStatus: {
|
9
|
-
readonly Success: "success";
|
10
|
-
readonly PartialSuccess: "partial_success";
|
11
|
-
readonly Failure: "failure";
|
12
|
-
};
|
@@ -1,14 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
import * as Airtop from "../index";
|
5
|
-
export interface ConnectionInfo {
|
6
|
-
/** Url to connect to chrome devtools protocol port on the airtop browser. Include the header 'x-airtop-token: <api-key>.' */
|
7
|
-
cdpUrl?: string;
|
8
|
-
/** Websocket url to connect to CDP webSocketDebuggerUrl on the airtop browser. Include the header 'x-airtop-token: <api-key>.' */
|
9
|
-
cdpWsUrl?: string;
|
10
|
-
/** Websocket url to connect to the chromedriver on the airtop browser. Include the header 'x-airtop-token: <api-key>.' */
|
11
|
-
chromedriverUrl?: string;
|
12
|
-
/** Connection info for the live view */
|
13
|
-
liveView?: Airtop.LiveViewConnectionInfo;
|
14
|
-
}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
export interface ErrorDetail {
|
5
|
-
/** Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id' */
|
6
|
-
location?: string;
|
7
|
-
/** Error message text */
|
8
|
-
message?: string;
|
9
|
-
value?: unknown;
|
10
|
-
}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
import * as Airtop from "../index";
|
5
|
-
export interface ErrorModel {
|
6
|
-
/** A URL to the JSON Schema for this object. */
|
7
|
-
schema?: string;
|
8
|
-
/** A human-readable explanation specific to this occurrence of the problem. */
|
9
|
-
detail?: string;
|
10
|
-
/** Optional list of individual error details */
|
11
|
-
errors?: Airtop.ErrorDetail[];
|
12
|
-
/** A URI reference that identifies the specific occurrence of the problem. */
|
13
|
-
instance?: string;
|
14
|
-
/** HTTP status code */
|
15
|
-
status?: number;
|
16
|
-
/** A short, human-readable summary of the problem type. This value should not change between occurrences of the error. */
|
17
|
-
title?: string;
|
18
|
-
/** A URI reference to human-readable documentation for the error. */
|
19
|
-
type?: string;
|
20
|
-
}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
export interface LiveViewConnectionInfo {
|
5
|
-
/** Websocket url to connect to the airtop browser */
|
6
|
-
airtopBrowserUrl: string;
|
7
|
-
/** Token to connect to the airtop browser, use as a header: 'Authorization: Bearer <token>' */
|
8
|
-
token?: string;
|
9
|
-
}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
export interface LiveViewUrlOutputV1Body {
|
5
|
-
/** A URL to the JSON Schema for this object. */
|
6
|
-
schema?: string;
|
7
|
-
/** Browser ID for live view session */
|
8
|
-
browserId: string;
|
9
|
-
/** Token for authenticating to a live view session */
|
10
|
-
token: string;
|
11
|
-
/** Url for live view session */
|
12
|
-
url: string;
|
13
|
-
}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
import * as Airtop from "../index";
|
5
|
-
export interface ProfileOutputV1Body {
|
6
|
-
/** A URL to the JSON Schema for this object. */
|
7
|
-
schema?: string;
|
8
|
-
/** created Profile */
|
9
|
-
profile: Airtop.ProfileV1;
|
10
|
-
}
|
package/api/types/ProfileV1.d.ts
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
export interface ProfileV1 {
|
5
|
-
/** Name of the profile */
|
6
|
-
name: string;
|
7
|
-
/** Status of the profile */
|
8
|
-
status?: string;
|
9
|
-
/** a comma separated list of tags for this profile */
|
10
|
-
tags?: string[];
|
11
|
-
/** URI to upload profile data to */
|
12
|
-
uploadUri?: string;
|
13
|
-
}
|
package/api/types/Session.d.ts
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
import * as Airtop from "../index";
|
5
|
-
export interface Session {
|
6
|
-
/** Session configuration */
|
7
|
-
configuration: Airtop.SessionConfig;
|
8
|
-
/** Current usage in minutes */
|
9
|
-
currentUsage?: number;
|
10
|
-
/** Date the session was created */
|
11
|
-
dateCreated?: Date;
|
12
|
-
/** UUID of the session */
|
13
|
-
id: string;
|
14
|
-
/** Date of the last activity */
|
15
|
-
lastActivity?: Date;
|
16
|
-
/** Session status */
|
17
|
-
status: string;
|
18
|
-
/** URL of the session */
|
19
|
-
url?: string;
|
20
|
-
}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
import * as Airtop from "../index";
|
5
|
-
export interface SessionAiResponse {
|
6
|
-
/** A URL to the JSON Schema for this object. */
|
7
|
-
schema?: string;
|
8
|
-
/** The response data from the prompt about the browser window */
|
9
|
-
data: Airtop.SessionAiResponseData;
|
10
|
-
/** Any errors that occurred while processing the request */
|
11
|
-
errors?: Airtop.SessionAiResponseIssue[];
|
12
|
-
/** Metadata about the response */
|
13
|
-
meta: Airtop.SessionAiResponseMetadata;
|
14
|
-
/** Any warnings that occurred while processing the request */
|
15
|
-
warnings?: Airtop.SessionAiResponseIssue[];
|
16
|
-
}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
import * as Airtop from "../index";
|
5
|
-
export interface SessionAiResponseData {
|
6
|
-
/** The response to the prompt about this specific browser window */
|
7
|
-
output: string;
|
8
|
-
/** outcome of the operation */
|
9
|
-
status: Airtop.SessionAiResponseDataStatus;
|
10
|
-
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
/**
|
5
|
-
* outcome of the operation
|
6
|
-
*/
|
7
|
-
export declare type SessionAiResponseDataStatus = "success" | "partial_success" | "failure";
|
8
|
-
export declare const SessionAiResponseDataStatus: {
|
9
|
-
readonly Success: "success";
|
10
|
-
readonly PartialSuccess: "partial_success";
|
11
|
-
readonly Failure: "failure";
|
12
|
-
};
|
@@ -1,10 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
import * as Airtop from "../index";
|
5
|
-
export interface SessionAiResponseMetadata {
|
6
|
-
/** The customer provided metadata for this request */
|
7
|
-
clientProvided?: Airtop.ClientProvidedResponseMetadata;
|
8
|
-
/** The usage metadata for this request */
|
9
|
-
usage: Airtop.SessionAiResponseMetadataUsage;
|
10
|
-
}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
import * as Airtop from "../index";
|
5
|
-
export interface SessionAiResponseMetadataUsage {
|
6
|
-
/** The credit usage for this request */
|
7
|
-
credits: number;
|
8
|
-
/** The id of the request */
|
9
|
-
id: string;
|
10
|
-
/** The private usage data about specific models for this request */
|
11
|
-
models?: Airtop.SessionAiResponseResponseMetadataModelUsage[];
|
12
|
-
/** The total internal cost of this request */
|
13
|
-
totalCost: number;
|
14
|
-
}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
export interface SessionConfig {
|
5
|
-
/** Persist the profile */
|
6
|
-
persistProfile?: boolean;
|
7
|
-
/** Profile name to persist resulting profile (required when persist_profile is true). Must contain A-Za-z0-9 only */
|
8
|
-
persistProfileName?: string;
|
9
|
-
/** Profile tags */
|
10
|
-
persistProfileTags?: string[];
|
11
|
-
/** Id of a profile to use with this session */
|
12
|
-
profileId?: string;
|
13
|
-
/** Max length of session in minutes, after which it will terminate if not already deleted */
|
14
|
-
timeout?: number;
|
15
|
-
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
import * as Airtop from "../index";
|
5
|
-
export interface SessionOutputV1Body {
|
6
|
-
/** A URL to the JSON Schema for this object. */
|
7
|
-
schema?: string;
|
8
|
-
/** Connection info for the session */
|
9
|
-
connectionInfo?: Airtop.ConnectionInfo;
|
10
|
-
/** Session */
|
11
|
-
session: Airtop.Session;
|
12
|
-
}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
import * as Airtop from "../index";
|
5
|
-
export interface SessionWithConnectionInfo {
|
6
|
-
/** Connection info for the session */
|
7
|
-
connectionInfo?: Airtop.ConnectionInfo;
|
8
|
-
/** Session */
|
9
|
-
session: Airtop.Session;
|
10
|
-
}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
import * as Airtop from "../index";
|
5
|
-
export interface SessionsOutputV1Body {
|
6
|
-
/** A URL to the JSON Schema for this object. */
|
7
|
-
schema?: string;
|
8
|
-
/** List of sessions */
|
9
|
-
sessions?: Airtop.SessionWithConnectionInfo[];
|
10
|
-
}
|
package/dist/api/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.d.ts
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
/**
|
5
|
-
* @example
|
6
|
-
* {
|
7
|
-
* prompt: "For each page on return all the items listed including a subfield"
|
8
|
-
* }
|
9
|
-
*/
|
10
|
-
export interface SessionPromptPaginatedExtractionRequest {
|
11
|
-
/** A URL to the JSON Schema for this object. */
|
12
|
-
schema?: string;
|
13
|
-
costThresholdCredits?: number;
|
14
|
-
customerRequestId?: string;
|
15
|
-
/** The prompt to perform a paginated extraction with */
|
16
|
-
prompt: string;
|
17
|
-
timeThresholdMs?: number;
|
18
|
-
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
import * as Airtop from "../index";
|
5
|
-
export interface CleanScrapeResponse {
|
6
|
-
/** A URL to the JSON Schema for this object. */
|
7
|
-
schema?: string;
|
8
|
-
/** The data about the scraped browser window */
|
9
|
-
data: Airtop.CleanScrapeResponseData;
|
10
|
-
/** Metadata about the response */
|
11
|
-
meta: Airtop.SessionAiResponseMetadata;
|
12
|
-
}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
import * as Airtop from "../index";
|
5
|
-
export interface CleanScrapeResponseData {
|
6
|
-
/** The response to the question about this specific browser window */
|
7
|
-
output: Airtop.CleanScrapeResponseOutput;
|
8
|
-
/** outcome of the operation */
|
9
|
-
status: Airtop.CleanScrapeResponseDataStatus;
|
10
|
-
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
3
|
-
*/
|
4
|
-
/**
|
5
|
-
* outcome of the operation
|
6
|
-
*/
|
7
|
-
export declare type CleanScrapeResponseDataStatus = "success" | "partial_success" | "failure";
|
8
|
-
export declare const CleanScrapeResponseDataStatus: {
|
9
|
-
readonly Success: "success";
|
10
|
-
readonly PartialSuccess: "partial_success";
|
11
|
-
readonly Failure: "failure";
|
12
|
-
};
|