@airtop/sdk 0.0.7-b → 0.0.7-c
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 +1 -1
- 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 +4 -6
- package/api/resources/profiles/client/Client.js +23 -20
- package/api/resources/sessions/client/Client.d.ts +9 -62
- package/api/resources/sessions/client/Client.js +37 -353
- package/api/resources/sessions/client/requests/SessionRestInputV1.d.ts +0 -2
- package/api/resources/sessions/client/requests/index.d.ts +0 -2
- package/api/resources/sessions/types/SessionsEventsResponse.d.ts +4 -4
- package/api/resources/sessions/types/index.d.ts +1 -1
- package/api/resources/sessions/types/index.js +1 -1
- package/api/resources/windows/client/Client.d.ts +69 -0
- package/api/resources/windows/client/Client.js +318 -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/SummarizeContentRequest.d.ts +14 -0
- package/api/resources/windows/client/requests/index.d.ts +3 -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/ClientProvidedResponseMetadata.d.ts +2 -1
- package/api/types/DefaultMetaWrapper.d.ts +6 -0
- package/api/types/ErrorEnvelope.d.ts +12 -0
- package/api/types/ExternalSessionAiResponseMetadata.d.ts +9 -0
- package/api/types/{SessionAiResponseDataStatus.d.ts → ExternalSessionAiResponseMetadataStatus.d.ts} +2 -5
- package/api/types/{CleanScrapeResponseDataStatus.js → ExternalSessionAiResponseMetadataStatus.js} +2 -2
- package/api/types/ExternalSessionAiResponseMetadataUsage.d.ts +9 -0
- package/{dist/api/types/SessionAiResponseIssue.d.ts → api/types/Issue.d.ts} +1 -1
- package/api/types/ListProfileV1EnvelopeDefaultMetaWrapper.d.ts +10 -0
- package/api/types/ListSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +10 -0
- package/api/types/ModelResponse.d.ts +6 -0
- package/api/types/ModelResponseExternalSessionAiResponseMetadataWrapper.d.ts +10 -0
- package/api/types/ProfileV1EnvelopeDefaultMetaWrapper.d.ts +10 -0
- package/api/types/ScrapeModelResponse.d.ts +7 -0
- package/api/types/ScrapeModelResponseExternalSessionAiResponseMetadataWrapper.d.ts +10 -0
- package/api/types/{CleanScrapeResponseOutput.d.ts → ScrapeResponseOutput.d.ts} +2 -2
- package/api/types/SessionConfig.d.ts +1 -1
- package/api/types/SessionConfigV1.d.ts +1 -1
- package/api/types/SessionWithConnectionInfo.d.ts +22 -4
- package/api/types/SessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +10 -0
- package/api/types/Window.d.ts +11 -0
- package/api/types/WindowEnvelopeDefaultMetaWrapper.d.ts +10 -0
- package/api/types/index.d.ts +17 -20
- package/api/types/index.js +17 -20
- 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 +4 -6
- package/dist/api/resources/profiles/client/Client.js +23 -20
- package/dist/api/resources/sessions/client/Client.d.ts +9 -62
- package/dist/api/resources/sessions/client/Client.js +37 -353
- package/dist/api/resources/sessions/client/requests/SessionRestInputV1.d.ts +0 -2
- package/dist/api/resources/sessions/client/requests/index.d.ts +0 -2
- package/dist/api/resources/sessions/types/SessionsEventsResponse.d.ts +4 -4
- package/dist/api/resources/sessions/types/index.d.ts +1 -1
- package/dist/api/resources/sessions/types/index.js +1 -1
- package/dist/api/resources/windows/client/Client.d.ts +69 -0
- package/dist/api/resources/windows/client/Client.js +318 -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/SummarizeContentRequest.d.ts +14 -0
- package/dist/api/resources/windows/client/requests/index.d.ts +3 -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/ClientProvidedResponseMetadata.d.ts +2 -1
- package/dist/api/types/DefaultMetaWrapper.d.ts +6 -0
- package/dist/api/types/ErrorEnvelope.d.ts +12 -0
- package/dist/api/types/ExternalSessionAiResponseMetadata.d.ts +9 -0
- package/dist/api/types/{SessionAiResponseDataStatus.d.ts → ExternalSessionAiResponseMetadataStatus.d.ts} +2 -5
- package/{api/types/SessionAiResponseDataStatus.js → dist/api/types/ExternalSessionAiResponseMetadataStatus.js} +2 -2
- package/dist/api/types/ExternalSessionAiResponseMetadataUsage.d.ts +9 -0
- package/{api/types/SessionAiResponseIssue.d.ts → dist/api/types/Issue.d.ts} +1 -1
- package/dist/api/types/ListProfileV1EnvelopeDefaultMetaWrapper.d.ts +10 -0
- package/dist/api/types/ListSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +10 -0
- package/dist/api/types/ModelResponse.d.ts +6 -0
- package/dist/api/types/ModelResponseExternalSessionAiResponseMetadataWrapper.d.ts +10 -0
- package/dist/api/types/ProfileV1EnvelopeDefaultMetaWrapper.d.ts +10 -0
- package/dist/api/types/ScrapeModelResponse.d.ts +7 -0
- package/dist/api/types/ScrapeModelResponseExternalSessionAiResponseMetadataWrapper.d.ts +10 -0
- package/dist/api/types/{CleanScrapeResponseOutput.d.ts → ScrapeResponseOutput.d.ts} +2 -2
- package/dist/api/types/SessionConfig.d.ts +1 -1
- package/dist/api/types/SessionConfigV1.d.ts +1 -1
- package/dist/api/types/SessionWithConnectionInfo.d.ts +22 -4
- package/dist/api/types/SessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +10 -0
- package/dist/api/types/Window.d.ts +11 -0
- package/dist/api/types/WindowEnvelopeDefaultMetaWrapper.d.ts +10 -0
- package/dist/api/types/index.d.ts +17 -20
- package/dist/api/types/index.js +17 -20
- 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/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/SessionsEventsResponse.d.ts +5 -5
- package/dist/serialization/resources/sessions/types/SessionsEventsResponse.js +2 -2
- package/dist/serialization/resources/sessions/types/index.d.ts +1 -1
- package/dist/serialization/resources/sessions/types/index.js +1 -1
- 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/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 +2 -0
- package/dist/serialization/resources/windows/client/requests/index.js +7 -0
- package/dist/serialization/resources/windows/index.d.ts +1 -0
- package/dist/serialization/resources/windows/index.js +17 -0
- package/dist/serialization/types/ClientProvidedResponseMetadata.d.ts +2 -1
- package/dist/serialization/types/ClientProvidedResponseMetadata.js +2 -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/{CleanScrapeResponseData.js → ErrorEnvelope.js} +9 -6
- package/dist/serialization/types/ExternalSessionAiResponseMetadata.d.ts +17 -0
- package/dist/serialization/types/{SessionAiResponseMetadata.js → ExternalSessionAiResponseMetadata.js} +6 -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/{SessionAiResponseIssue.d.ts → Issue.d.ts} +2 -2
- package/{serialization/types/SessionAiResponseIssue.js → dist/serialization/types/Issue.js} +2 -2
- package/dist/serialization/types/ListProfileV1EnvelopeDefaultMetaWrapper.d.ts +18 -0
- package/{serialization/types/ProfileOutputV1Body.js → dist/serialization/types/ListProfileV1EnvelopeDefaultMetaWrapper.js} +8 -4
- package/dist/serialization/types/ListSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +18 -0
- package/dist/serialization/types/ListSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js +39 -0
- package/dist/serialization/types/ModelResponse.d.ts +12 -0
- package/{serialization/types/SessionAiResponseDataStatus.js → dist/serialization/types/ModelResponse.js} +4 -2
- package/dist/serialization/types/ModelResponseExternalSessionAiResponseMetadataWrapper.d.ts +18 -0
- package/dist/serialization/types/ModelResponseExternalSessionAiResponseMetadataWrapper.js +39 -0
- package/dist/serialization/types/ProfileV1EnvelopeDefaultMetaWrapper.d.ts +18 -0
- package/dist/serialization/types/{ProfileOutputV1Body.js → ProfileV1EnvelopeDefaultMetaWrapper.js} +8 -4
- package/dist/serialization/types/ScrapeModelResponse.d.ts +13 -0
- package/dist/serialization/types/ScrapeModelResponse.js +34 -0
- package/dist/serialization/types/ScrapeModelResponseExternalSessionAiResponseMetadataWrapper.d.ts +18 -0
- package/dist/serialization/types/ScrapeModelResponseExternalSessionAiResponseMetadataWrapper.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/SessionConfig.d.ts +1 -1
- package/dist/serialization/types/SessionConfig.js +1 -1
- package/dist/serialization/types/SessionConfigV1.d.ts +1 -1
- package/dist/serialization/types/SessionConfigV1.js +1 -1
- package/dist/serialization/types/SessionWithConnectionInfo.d.ts +13 -4
- package/dist/serialization/types/SessionWithConnectionInfo.js +13 -4
- package/dist/serialization/types/SessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +18 -0
- package/dist/serialization/types/{SessionsOutputV1Body.js → SessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js} +8 -4
- package/dist/serialization/types/Window.d.ts +14 -0
- package/dist/serialization/types/Window.js +35 -0
- 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 +17 -20
- package/dist/serialization/types/index.js +17 -20
- package/package.json +20 -3
- package/reference.md +41 -98
- 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/SessionsEventsResponse.d.ts +5 -5
- package/serialization/resources/sessions/types/SessionsEventsResponse.js +2 -2
- package/serialization/resources/sessions/types/index.d.ts +1 -1
- package/serialization/resources/sessions/types/index.js +1 -1
- 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/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 +2 -0
- package/serialization/resources/windows/client/requests/index.js +7 -0
- package/serialization/resources/windows/index.d.ts +1 -0
- package/serialization/resources/windows/index.js +17 -0
- package/serialization/types/ClientProvidedResponseMetadata.d.ts +2 -1
- package/serialization/types/ClientProvidedResponseMetadata.js +2 -1
- package/serialization/types/DefaultMetaWrapper.d.ts +12 -0
- package/serialization/types/{CleanScrapeResponseDataStatus.js → DefaultMetaWrapper.js} +4 -2
- package/serialization/types/ErrorEnvelope.d.ts +18 -0
- package/serialization/types/ErrorEnvelope.js +39 -0
- package/serialization/types/ExternalSessionAiResponseMetadata.d.ts +17 -0
- package/serialization/types/{SessionAiResponseMetadata.js → ExternalSessionAiResponseMetadata.js} +6 -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/{SessionAiResponseIssue.d.ts → Issue.d.ts} +2 -2
- package/{dist/serialization/types/SessionAiResponseIssue.js → serialization/types/Issue.js} +2 -2
- package/serialization/types/ListProfileV1EnvelopeDefaultMetaWrapper.d.ts +18 -0
- package/serialization/types/{ProfilesOutputV1Body.js → ListProfileV1EnvelopeDefaultMetaWrapper.js} +8 -4
- package/serialization/types/ListSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +18 -0
- package/serialization/types/ListSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js +39 -0
- package/serialization/types/ModelResponse.d.ts +12 -0
- package/{dist/serialization/types/CleanScrapeResponseDataStatus.js → serialization/types/ModelResponse.js} +4 -2
- package/serialization/types/ModelResponseExternalSessionAiResponseMetadataWrapper.d.ts +18 -0
- package/serialization/types/ModelResponseExternalSessionAiResponseMetadataWrapper.js +39 -0
- package/serialization/types/ProfileV1EnvelopeDefaultMetaWrapper.d.ts +18 -0
- package/{dist/serialization/types/ProfilesOutputV1Body.js → serialization/types/ProfileV1EnvelopeDefaultMetaWrapper.js} +8 -4
- package/serialization/types/ScrapeModelResponse.d.ts +13 -0
- package/serialization/types/ScrapeModelResponse.js +34 -0
- package/serialization/types/ScrapeModelResponseExternalSessionAiResponseMetadataWrapper.d.ts +18 -0
- package/serialization/types/ScrapeModelResponseExternalSessionAiResponseMetadataWrapper.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/SessionConfig.d.ts +1 -1
- package/serialization/types/SessionConfig.js +1 -1
- package/serialization/types/SessionConfigV1.d.ts +1 -1
- package/serialization/types/SessionConfigV1.js +1 -1
- package/serialization/types/SessionWithConnectionInfo.d.ts +13 -4
- package/serialization/types/SessionWithConnectionInfo.js +13 -4
- package/serialization/types/SessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +18 -0
- package/serialization/types/{SessionsOutputV1Body.js → SessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js} +8 -4
- package/serialization/types/Window.d.ts +14 -0
- package/serialization/types/Window.js +35 -0
- 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 +17 -20
- package/serialization/types/index.js +17 -20
- 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/LiveViewUrlOutputV1Body.d.ts +0 -13
- package/api/types/ProfileOutputV1Body.d.ts +0 -10
- 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/SessionAiResponseMetadata.d.ts +0 -10
- package/api/types/SessionAiResponseMetadataUsage.d.ts +0 -14
- package/api/types/SessionAiResponseResponseMetadataModelUsage.d.ts +0 -10
- package/api/types/SessionOutputV1Body.d.ts +0 -12
- 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/LiveViewUrlOutputV1Body.d.ts +0 -13
- package/dist/api/types/ProfileOutputV1Body.d.ts +0 -10
- 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.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/SessionOutputV1Body.d.ts +0 -12
- package/dist/api/types/SessionOutputV1Body.js +0 -5
- package/dist/api/types/SessionsOutputV1Body.d.ts +0 -10
- package/dist/api/types/SessionsOutputV1Body.js +0 -5
- 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/ErrorDetail.js +0 -35
- package/dist/serialization/types/ErrorModel.d.ts +0 -19
- package/dist/serialization/types/ErrorModel.js +0 -40
- package/dist/serialization/types/LiveViewUrlOutputV1Body.d.ts +0 -15
- package/dist/serialization/types/LiveViewUrlOutputV1Body.js +0 -36
- package/dist/serialization/types/ProfileOutputV1Body.d.ts +0 -14
- package/dist/serialization/types/ProfilesOutputV1Body.d.ts +0 -14
- package/dist/serialization/types/Session.d.ts +0 -19
- package/dist/serialization/types/Session.js +0 -40
- 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/SessionAiResponseData.js +0 -35
- 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/SessionOutputV1Body.d.ts +0 -16
- package/dist/serialization/types/SessionOutputV1Body.js +0 -37
- package/dist/serialization/types/SessionsOutputV1Body.d.ts +0 -14
- 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/LiveViewUrlOutputV1Body.d.ts +0 -15
- package/serialization/types/LiveViewUrlOutputV1Body.js +0 -36
- package/serialization/types/ProfileOutputV1Body.d.ts +0 -14
- package/serialization/types/ProfilesOutputV1Body.d.ts +0 -14
- package/serialization/types/Session.d.ts +0 -19
- package/serialization/types/Session.js +0 -40
- 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/SessionOutputV1Body.d.ts +0 -16
- package/serialization/types/SessionOutputV1Body.js +0 -37
- package/serialization/types/SessionsOutputV1Body.d.ts +0 -14
- /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/SummarizeContentRequest.js} +0 -0
- /package/api/types/{CleanScrapeResponseData.js → DefaultMetaWrapper.js} +0 -0
- /package/api/types/{CleanScrapeResponseOutput.js → ErrorEnvelope.js} +0 -0
- /package/api/types/{ConnectionInfo.js → ExternalSessionAiResponseMetadata.js} +0 -0
- /package/api/types/{ErrorDetail.js → ExternalSessionAiResponseMetadataUsage.js} +0 -0
- /package/api/types/{ErrorModel.js → Issue.js} +0 -0
- /package/api/types/{LiveViewUrlOutputV1Body.js → ListProfileV1EnvelopeDefaultMetaWrapper.js} +0 -0
- /package/api/types/{ProfileOutputV1Body.js → ListSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js} +0 -0
- /package/api/types/{ProfilesOutputV1Body.js → ModelResponse.js} +0 -0
- /package/api/types/{Session.js → ModelResponseExternalSessionAiResponseMetadataWrapper.js} +0 -0
- /package/api/types/{SessionAiResponse.js → ProfileV1EnvelopeDefaultMetaWrapper.js} +0 -0
- /package/api/types/{SessionAiResponseData.js → ScrapeModelResponse.js} +0 -0
- /package/api/types/{SessionAiResponseIssue.js → ScrapeModelResponseExternalSessionAiResponseMetadataWrapper.js} +0 -0
- /package/api/types/{SessionAiResponseMetadata.js → ScrapeResponseOutput.js} +0 -0
- /package/api/types/{SessionAiResponseMetadataUsage.js → SessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js} +0 -0
- /package/api/types/{SessionAiResponseResponseMetadataModelUsage.js → Window.js} +0 -0
- /package/api/types/{SessionOutputV1Body.js → WindowEnvelopeDefaultMetaWrapper.js} +0 -0
- /package/{api/types/SessionsOutputV1Body.js → dist/api/resources/windows/client/requests/GetWindowInfoRequest.js} +0 -0
- /package/dist/api/resources/{sessions/client/requests/SessionPromptContentRequest.js → windows/client/requests/PromptContentRequest.js} +0 -0
- /package/dist/api/resources/{sessions/client/requests/SessionPromptPaginatedExtractionRequest.js → windows/client/requests/SummarizeContentRequest.js} +0 -0
- /package/dist/api/types/{CleanScrapeResponse.js → DefaultMetaWrapper.js} +0 -0
- /package/dist/api/types/{CleanScrapeResponseData.js → ErrorEnvelope.js} +0 -0
- /package/dist/api/types/{CleanScrapeResponseOutput.js → ExternalSessionAiResponseMetadata.js} +0 -0
- /package/dist/api/types/{ConnectionInfo.js → ExternalSessionAiResponseMetadataUsage.js} +0 -0
- /package/dist/api/types/{ErrorDetail.js → Issue.js} +0 -0
- /package/dist/api/types/{ErrorModel.js → ListProfileV1EnvelopeDefaultMetaWrapper.js} +0 -0
- /package/dist/api/types/{LiveViewUrlOutputV1Body.js → ListSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js} +0 -0
- /package/dist/api/types/{ProfileOutputV1Body.js → ModelResponse.js} +0 -0
- /package/dist/api/types/{ProfilesOutputV1Body.js → ModelResponseExternalSessionAiResponseMetadataWrapper.js} +0 -0
- /package/dist/api/types/{Session.js → ProfileV1EnvelopeDefaultMetaWrapper.js} +0 -0
- /package/dist/api/types/{SessionAiResponse.js → ScrapeModelResponse.js} +0 -0
- /package/dist/api/types/{SessionAiResponseData.js → ScrapeModelResponseExternalSessionAiResponseMetadataWrapper.js} +0 -0
- /package/dist/api/types/{SessionAiResponseIssue.js → ScrapeResponseOutput.js} +0 -0
- /package/dist/api/types/{SessionAiResponseMetadata.js → SessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js} +0 -0
- /package/dist/api/types/{SessionAiResponseMetadataUsage.js → Window.js} +0 -0
- /package/dist/api/types/{SessionAiResponseResponseMetadataModelUsage.js → WindowEnvelopeDefaultMetaWrapper.js} +0 -0
@@ -0,0 +1,69 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as environments from "../../../../environments";
|
5
|
+
import * as core from "../../../../core";
|
6
|
+
import * as Airtop from "../../../index";
|
7
|
+
export declare namespace Windows {
|
8
|
+
interface Options {
|
9
|
+
environment?: core.Supplier<environments.AirtopEnvironment | string>;
|
10
|
+
apiKey?: core.Supplier<core.BearerToken | undefined>;
|
11
|
+
fetcher?: core.FetchFunction;
|
12
|
+
}
|
13
|
+
interface RequestOptions {
|
14
|
+
/** The maximum time to wait for a response in seconds. */
|
15
|
+
timeoutInSeconds?: number;
|
16
|
+
/** The number of times to retry the request. Defaults to 2. */
|
17
|
+
maxRetries?: number;
|
18
|
+
/** A hook to abort the request. */
|
19
|
+
abortSignal?: AbortSignal;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
export declare class Windows {
|
23
|
+
protected readonly _options: Windows.Options;
|
24
|
+
constructor(_options?: Windows.Options);
|
25
|
+
/**
|
26
|
+
* @param {string} sessionId - UUID of the session that owns the window
|
27
|
+
* @param {string} windowId - id of the browser window, either the windowId (uuid) or targetId (simple string)
|
28
|
+
* @param {Airtop.GetWindowInfoRequest} request
|
29
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
30
|
+
*
|
31
|
+
* @example
|
32
|
+
* await client.windows.getWindowInfo("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "7334da2a-91b0-42c5-6156-76a5eba87430", {
|
33
|
+
* screenResolution: "1920x1080"
|
34
|
+
* })
|
35
|
+
*/
|
36
|
+
getWindowInfo(sessionId: string, windowId: string, request?: Airtop.GetWindowInfoRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.WindowEnvelopeDefaultMetaWrapper>;
|
37
|
+
/**
|
38
|
+
* @param {string} sessionId - The session id to submit a prompt about
|
39
|
+
* @param {string} windowId - The window id to submit a prompt about
|
40
|
+
* @param {Airtop.PromptContentRequest} request
|
41
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
42
|
+
*
|
43
|
+
* @example
|
44
|
+
* await client.windows.promptContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
45
|
+
* prompt: "What is the main idea of this page?"
|
46
|
+
* })
|
47
|
+
*/
|
48
|
+
promptContent(sessionId: string, windowId: string, request: Airtop.PromptContentRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.ModelResponseExternalSessionAiResponseMetadataWrapper>;
|
49
|
+
/**
|
50
|
+
* @param {string} sessionId - The session id to scrape
|
51
|
+
* @param {string} windowId - The window id to scrape
|
52
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
53
|
+
*
|
54
|
+
* @example
|
55
|
+
* await client.windows.scrapeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
56
|
+
*/
|
57
|
+
scrapeContent(sessionId: string, windowId: string, requestOptions?: Windows.RequestOptions): Promise<Airtop.ScrapeModelResponseExternalSessionAiResponseMetadataWrapper>;
|
58
|
+
/**
|
59
|
+
* @param {string} sessionId - The session id to summarize
|
60
|
+
* @param {string} windowId - The window id to summarize
|
61
|
+
* @param {Airtop.SummarizeContentRequest} request
|
62
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
63
|
+
*
|
64
|
+
* @example
|
65
|
+
* await client.windows.summarizeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
66
|
+
*/
|
67
|
+
summarizeContent(sessionId: string, windowId: string, request?: Airtop.SummarizeContentRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.ModelResponseExternalSessionAiResponseMetadataWrapper>;
|
68
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
69
|
+
}
|
@@ -0,0 +1,318 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
10
|
+
}
|
11
|
+
Object.defineProperty(o, k2, desc);
|
12
|
+
}) : (function(o, m, k, k2) {
|
13
|
+
if (k2 === undefined) k2 = k;
|
14
|
+
o[k2] = m[k];
|
15
|
+
}));
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
18
|
+
}) : function(o, v) {
|
19
|
+
o["default"] = v;
|
20
|
+
});
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
22
|
+
if (mod && mod.__esModule) return mod;
|
23
|
+
var result = {};
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
25
|
+
__setModuleDefault(result, mod);
|
26
|
+
return result;
|
27
|
+
};
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
35
|
+
});
|
36
|
+
};
|
37
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
38
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
39
|
+
};
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
41
|
+
exports.Windows = void 0;
|
42
|
+
const environments = __importStar(require("../../../../environments"));
|
43
|
+
const core = __importStar(require("../../../../core"));
|
44
|
+
const url_join_1 = __importDefault(require("url-join"));
|
45
|
+
const serializers = __importStar(require("../../../../serialization/index"));
|
46
|
+
const errors = __importStar(require("../../../../errors/index"));
|
47
|
+
class Windows {
|
48
|
+
constructor(_options = {}) {
|
49
|
+
this._options = _options;
|
50
|
+
}
|
51
|
+
/**
|
52
|
+
* @param {string} sessionId - UUID of the session that owns the window
|
53
|
+
* @param {string} windowId - id of the browser window, either the windowId (uuid) or targetId (simple string)
|
54
|
+
* @param {Airtop.GetWindowInfoRequest} request
|
55
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
56
|
+
*
|
57
|
+
* @example
|
58
|
+
* await client.windows.getWindowInfo("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "7334da2a-91b0-42c5-6156-76a5eba87430", {
|
59
|
+
* screenResolution: "1920x1080"
|
60
|
+
* })
|
61
|
+
*/
|
62
|
+
getWindowInfo(sessionId, windowId, request = {}, requestOptions) {
|
63
|
+
var _a, _b;
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
65
|
+
const { includeNavigationBar, disableResize, screenResolution } = request;
|
66
|
+
const _queryParams = {};
|
67
|
+
if (includeNavigationBar != null) {
|
68
|
+
_queryParams["includeNavigationBar"] = includeNavigationBar.toString();
|
69
|
+
}
|
70
|
+
if (disableResize != null) {
|
71
|
+
_queryParams["disableResize"] = disableResize.toString();
|
72
|
+
}
|
73
|
+
if (screenResolution != null) {
|
74
|
+
_queryParams["Screen resolution"] = screenResolution;
|
75
|
+
}
|
76
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
77
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/get-window-info`),
|
78
|
+
method: "GET",
|
79
|
+
headers: {
|
80
|
+
Authorization: yield this._getAuthorizationHeader(),
|
81
|
+
"X-Fern-Language": "JavaScript",
|
82
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
83
|
+
"X-Fern-SDK-Version": "0.0.7-c",
|
84
|
+
"User-Agent": "@airtop/sdk/0.0.7-c",
|
85
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
86
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
87
|
+
},
|
88
|
+
contentType: "application/json",
|
89
|
+
queryParameters: _queryParams,
|
90
|
+
requestType: "json",
|
91
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
92
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
93
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
94
|
+
});
|
95
|
+
if (_response.ok) {
|
96
|
+
return serializers.WindowEnvelopeDefaultMetaWrapper.parseOrThrow(_response.body, {
|
97
|
+
unrecognizedObjectKeys: "passthrough",
|
98
|
+
allowUnrecognizedUnionMembers: true,
|
99
|
+
allowUnrecognizedEnumValues: true,
|
100
|
+
skipValidation: true,
|
101
|
+
breadcrumbsPrefix: ["response"],
|
102
|
+
});
|
103
|
+
}
|
104
|
+
if (_response.error.reason === "status-code") {
|
105
|
+
throw new errors.AirtopError({
|
106
|
+
statusCode: _response.error.statusCode,
|
107
|
+
body: _response.error.body,
|
108
|
+
});
|
109
|
+
}
|
110
|
+
switch (_response.error.reason) {
|
111
|
+
case "non-json":
|
112
|
+
throw new errors.AirtopError({
|
113
|
+
statusCode: _response.error.statusCode,
|
114
|
+
body: _response.error.rawBody,
|
115
|
+
});
|
116
|
+
case "timeout":
|
117
|
+
throw new errors.AirtopTimeoutError();
|
118
|
+
case "unknown":
|
119
|
+
throw new errors.AirtopError({
|
120
|
+
message: _response.error.errorMessage,
|
121
|
+
});
|
122
|
+
}
|
123
|
+
});
|
124
|
+
}
|
125
|
+
/**
|
126
|
+
* @param {string} sessionId - The session id to submit a prompt about
|
127
|
+
* @param {string} windowId - The window id to submit a prompt about
|
128
|
+
* @param {Airtop.PromptContentRequest} request
|
129
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
130
|
+
*
|
131
|
+
* @example
|
132
|
+
* await client.windows.promptContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
133
|
+
* prompt: "What is the main idea of this page?"
|
134
|
+
* })
|
135
|
+
*/
|
136
|
+
promptContent(sessionId, windowId, request, requestOptions) {
|
137
|
+
var _a, _b;
|
138
|
+
return __awaiter(this, void 0, void 0, function* () {
|
139
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
140
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/prompt-content`),
|
141
|
+
method: "POST",
|
142
|
+
headers: {
|
143
|
+
Authorization: yield this._getAuthorizationHeader(),
|
144
|
+
"X-Fern-Language": "JavaScript",
|
145
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
146
|
+
"X-Fern-SDK-Version": "0.0.7-c",
|
147
|
+
"User-Agent": "@airtop/sdk/0.0.7-c",
|
148
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
149
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
150
|
+
},
|
151
|
+
contentType: "application/json",
|
152
|
+
requestType: "json",
|
153
|
+
body: serializers.PromptContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
154
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
155
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
156
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
157
|
+
});
|
158
|
+
if (_response.ok) {
|
159
|
+
return serializers.ModelResponseExternalSessionAiResponseMetadataWrapper.parseOrThrow(_response.body, {
|
160
|
+
unrecognizedObjectKeys: "passthrough",
|
161
|
+
allowUnrecognizedUnionMembers: true,
|
162
|
+
allowUnrecognizedEnumValues: true,
|
163
|
+
skipValidation: true,
|
164
|
+
breadcrumbsPrefix: ["response"],
|
165
|
+
});
|
166
|
+
}
|
167
|
+
if (_response.error.reason === "status-code") {
|
168
|
+
throw new errors.AirtopError({
|
169
|
+
statusCode: _response.error.statusCode,
|
170
|
+
body: _response.error.body,
|
171
|
+
});
|
172
|
+
}
|
173
|
+
switch (_response.error.reason) {
|
174
|
+
case "non-json":
|
175
|
+
throw new errors.AirtopError({
|
176
|
+
statusCode: _response.error.statusCode,
|
177
|
+
body: _response.error.rawBody,
|
178
|
+
});
|
179
|
+
case "timeout":
|
180
|
+
throw new errors.AirtopTimeoutError();
|
181
|
+
case "unknown":
|
182
|
+
throw new errors.AirtopError({
|
183
|
+
message: _response.error.errorMessage,
|
184
|
+
});
|
185
|
+
}
|
186
|
+
});
|
187
|
+
}
|
188
|
+
/**
|
189
|
+
* @param {string} sessionId - The session id to scrape
|
190
|
+
* @param {string} windowId - The window id to scrape
|
191
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
192
|
+
*
|
193
|
+
* @example
|
194
|
+
* await client.windows.scrapeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
195
|
+
*/
|
196
|
+
scrapeContent(sessionId, windowId, requestOptions) {
|
197
|
+
var _a, _b;
|
198
|
+
return __awaiter(this, void 0, void 0, function* () {
|
199
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
200
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/scrape-content`),
|
201
|
+
method: "GET",
|
202
|
+
headers: {
|
203
|
+
Authorization: yield this._getAuthorizationHeader(),
|
204
|
+
"X-Fern-Language": "JavaScript",
|
205
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
206
|
+
"X-Fern-SDK-Version": "0.0.7-c",
|
207
|
+
"User-Agent": "@airtop/sdk/0.0.7-c",
|
208
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
209
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
210
|
+
},
|
211
|
+
contentType: "application/json",
|
212
|
+
requestType: "json",
|
213
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
214
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
215
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
216
|
+
});
|
217
|
+
if (_response.ok) {
|
218
|
+
return serializers.ScrapeModelResponseExternalSessionAiResponseMetadataWrapper.parseOrThrow(_response.body, {
|
219
|
+
unrecognizedObjectKeys: "passthrough",
|
220
|
+
allowUnrecognizedUnionMembers: true,
|
221
|
+
allowUnrecognizedEnumValues: true,
|
222
|
+
skipValidation: true,
|
223
|
+
breadcrumbsPrefix: ["response"],
|
224
|
+
});
|
225
|
+
}
|
226
|
+
if (_response.error.reason === "status-code") {
|
227
|
+
throw new errors.AirtopError({
|
228
|
+
statusCode: _response.error.statusCode,
|
229
|
+
body: _response.error.body,
|
230
|
+
});
|
231
|
+
}
|
232
|
+
switch (_response.error.reason) {
|
233
|
+
case "non-json":
|
234
|
+
throw new errors.AirtopError({
|
235
|
+
statusCode: _response.error.statusCode,
|
236
|
+
body: _response.error.rawBody,
|
237
|
+
});
|
238
|
+
case "timeout":
|
239
|
+
throw new errors.AirtopTimeoutError();
|
240
|
+
case "unknown":
|
241
|
+
throw new errors.AirtopError({
|
242
|
+
message: _response.error.errorMessage,
|
243
|
+
});
|
244
|
+
}
|
245
|
+
});
|
246
|
+
}
|
247
|
+
/**
|
248
|
+
* @param {string} sessionId - The session id to summarize
|
249
|
+
* @param {string} windowId - The window id to summarize
|
250
|
+
* @param {Airtop.SummarizeContentRequest} request
|
251
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
252
|
+
*
|
253
|
+
* @example
|
254
|
+
* await client.windows.summarizeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
255
|
+
*/
|
256
|
+
summarizeContent(sessionId, windowId, request = {}, requestOptions) {
|
257
|
+
var _a, _b;
|
258
|
+
return __awaiter(this, void 0, void 0, function* () {
|
259
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
260
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/summarize-content`),
|
261
|
+
method: "POST",
|
262
|
+
headers: {
|
263
|
+
Authorization: yield this._getAuthorizationHeader(),
|
264
|
+
"X-Fern-Language": "JavaScript",
|
265
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
266
|
+
"X-Fern-SDK-Version": "0.0.7-c",
|
267
|
+
"User-Agent": "@airtop/sdk/0.0.7-c",
|
268
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
269
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
270
|
+
},
|
271
|
+
contentType: "application/json",
|
272
|
+
requestType: "json",
|
273
|
+
body: serializers.SummarizeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
274
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
275
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
276
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
277
|
+
});
|
278
|
+
if (_response.ok) {
|
279
|
+
return serializers.ModelResponseExternalSessionAiResponseMetadataWrapper.parseOrThrow(_response.body, {
|
280
|
+
unrecognizedObjectKeys: "passthrough",
|
281
|
+
allowUnrecognizedUnionMembers: true,
|
282
|
+
allowUnrecognizedEnumValues: true,
|
283
|
+
skipValidation: true,
|
284
|
+
breadcrumbsPrefix: ["response"],
|
285
|
+
});
|
286
|
+
}
|
287
|
+
if (_response.error.reason === "status-code") {
|
288
|
+
throw new errors.AirtopError({
|
289
|
+
statusCode: _response.error.statusCode,
|
290
|
+
body: _response.error.body,
|
291
|
+
});
|
292
|
+
}
|
293
|
+
switch (_response.error.reason) {
|
294
|
+
case "non-json":
|
295
|
+
throw new errors.AirtopError({
|
296
|
+
statusCode: _response.error.statusCode,
|
297
|
+
body: _response.error.rawBody,
|
298
|
+
});
|
299
|
+
case "timeout":
|
300
|
+
throw new errors.AirtopTimeoutError();
|
301
|
+
case "unknown":
|
302
|
+
throw new errors.AirtopError({
|
303
|
+
message: _response.error.errorMessage,
|
304
|
+
});
|
305
|
+
}
|
306
|
+
});
|
307
|
+
}
|
308
|
+
_getAuthorizationHeader() {
|
309
|
+
return __awaiter(this, void 0, void 0, function* () {
|
310
|
+
const bearer = yield core.Supplier.get(this._options.apiKey);
|
311
|
+
if (bearer != null) {
|
312
|
+
return `Bearer ${bearer}`;
|
313
|
+
}
|
314
|
+
return undefined;
|
315
|
+
});
|
316
|
+
}
|
317
|
+
}
|
318
|
+
exports.Windows = Windows;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./requests";
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./requests"), exports);
|
@@ -0,0 +1,23 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
/**
|
5
|
+
* @example
|
6
|
+
* {
|
7
|
+
* screenResolution: "1920x1080"
|
8
|
+
* }
|
9
|
+
*/
|
10
|
+
export interface GetWindowInfoRequest {
|
11
|
+
/**
|
12
|
+
* Renders a navigation bar as part of the live view session
|
13
|
+
*/
|
14
|
+
includeNavigationBar?: boolean;
|
15
|
+
/**
|
16
|
+
* By default browsers will adapt its resolution to the live view window size. This flag disables that behavior
|
17
|
+
*/
|
18
|
+
disableResize?: boolean;
|
19
|
+
/**
|
20
|
+
* Ex: Screen resolution of the live view in format wxh, e.g. 1920x1080. When this value is provided the live view won't adapt it's resolution to the live view window size
|
21
|
+
*/
|
22
|
+
screenResolution?: string;
|
23
|
+
}
|
@@ -7,12 +7,12 @@
|
|
7
7
|
* prompt: "What is the main idea of this page?"
|
8
8
|
* }
|
9
9
|
*/
|
10
|
-
export interface
|
11
|
-
|
12
|
-
schema?: string;
|
10
|
+
export interface PromptContentRequest {
|
11
|
+
clientRequestId?: string;
|
13
12
|
costThresholdCredits?: number;
|
14
|
-
|
13
|
+
/** Whether to follow pagination links in the content and load additional results */
|
14
|
+
followPaginationLinks?: boolean;
|
15
15
|
/** The prompt to submit about the content in the browser window */
|
16
16
|
prompt: string;
|
17
|
-
|
17
|
+
timeThresholdSeconds?: number;
|
18
18
|
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
/**
|
5
|
+
* @example
|
6
|
+
* {}
|
7
|
+
*/
|
8
|
+
export interface SummarizeContentRequest {
|
9
|
+
clientRequestId?: string;
|
10
|
+
costThresholdCredits?: number;
|
11
|
+
/** The prompt to submit about the content in the browser window */
|
12
|
+
prompt?: string;
|
13
|
+
timeThresholdSeconds?: number;
|
14
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./client";
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./client"), exports);
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as Airtop from "../index";
|
5
|
+
export interface ErrorEnvelope {
|
6
|
+
httpStatus: number;
|
7
|
+
message: string;
|
8
|
+
data?: unknown;
|
9
|
+
errors?: Airtop.Issue[];
|
10
|
+
meta?: unknown;
|
11
|
+
warnings?: Airtop.Issue[];
|
12
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as Airtop from "../index";
|
5
|
+
export interface ExternalSessionAiResponseMetadata {
|
6
|
+
clientProvided?: Airtop.ClientProvidedResponseMetadata;
|
7
|
+
status: Airtop.ExternalSessionAiResponseMetadataStatus;
|
8
|
+
usage: Airtop.ExternalSessionAiResponseMetadataUsage;
|
9
|
+
}
|
package/api/types/{SessionAiResponseDataStatus.d.ts → ExternalSessionAiResponseMetadataStatus.d.ts}
RENAMED
@@ -1,11 +1,8 @@
|
|
1
1
|
/**
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
3
3
|
*/
|
4
|
-
|
5
|
-
|
6
|
-
*/
|
7
|
-
export declare type SessionAiResponseDataStatus = "success" | "partial_success" | "failure";
|
8
|
-
export declare const SessionAiResponseDataStatus: {
|
4
|
+
export declare type ExternalSessionAiResponseMetadataStatus = "success" | "partial_success" | "failure";
|
5
|
+
export declare const ExternalSessionAiResponseMetadataStatus: {
|
9
6
|
readonly Success: "success";
|
10
7
|
readonly PartialSuccess: "partial_success";
|
11
8
|
readonly Failure: "failure";
|
package/api/types/{CleanScrapeResponseDataStatus.js → ExternalSessionAiResponseMetadataStatus.js}
RENAMED
@@ -3,8 +3,8 @@
|
|
3
3
|
* This file was auto-generated by Fern from our API Definition.
|
4
4
|
*/
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.
|
7
|
-
exports.
|
6
|
+
exports.ExternalSessionAiResponseMetadataStatus = void 0;
|
7
|
+
exports.ExternalSessionAiResponseMetadataStatus = {
|
8
8
|
Success: "success",
|
9
9
|
PartialSuccess: "partial_success",
|
10
10
|
Failure: "failure",
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as Airtop from "../index";
|
5
|
+
export interface ListProfileV1EnvelopeDefaultMetaWrapper {
|
6
|
+
data?: Airtop.ProfileV1[];
|
7
|
+
errors?: Airtop.Issue[];
|
8
|
+
meta: Airtop.DefaultMetaWrapper;
|
9
|
+
warnings?: Airtop.Issue[];
|
10
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as Airtop from "../index";
|
5
|
+
export interface ListSessionWithConnectionInfoEnvelopeDefaultMetaWrapper {
|
6
|
+
data?: Airtop.SessionWithConnectionInfo[];
|
7
|
+
errors?: Airtop.Issue[];
|
8
|
+
meta: Airtop.DefaultMetaWrapper;
|
9
|
+
warnings?: Airtop.Issue[];
|
10
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as Airtop from "../index";
|
5
|
+
export interface ModelResponseExternalSessionAiResponseMetadataWrapper {
|
6
|
+
data: Airtop.ModelResponse;
|
7
|
+
errors?: Airtop.Issue[];
|
8
|
+
meta: Airtop.ExternalSessionAiResponseMetadata;
|
9
|
+
warnings?: Airtop.Issue[];
|
10
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as Airtop from "../index";
|
5
|
+
export interface ProfileV1EnvelopeDefaultMetaWrapper {
|
6
|
+
data: Airtop.ProfileV1;
|
7
|
+
errors?: Airtop.Issue[];
|
8
|
+
meta: Airtop.DefaultMetaWrapper;
|
9
|
+
warnings?: Airtop.Issue[];
|
10
|
+
}
|