@airtop/sdk 0.0.7-c → 0.0.8
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/README.md +5 -5
- package/api/index.d.ts +1 -1
- package/api/index.js +1 -1
- package/api/resources/index.d.ts +1 -2
- package/api/resources/index.js +2 -3
- package/api/resources/profiles/client/Client.d.ts +5 -23
- package/api/resources/profiles/client/Client.js +19 -121
- 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 +4 -8
- package/api/resources/sessions/client/Client.js +13 -105
- package/api/resources/sessions/index.d.ts +0 -1
- package/api/resources/sessions/index.js +0 -1
- package/api/resources/windows/client/Client.d.ts +4 -3
- package/api/resources/windows/client/Client.js +15 -13
- package/api/resources/windows/client/requests/ScrapeContentRequest.d.ts +12 -0
- package/api/resources/windows/client/requests/index.d.ts +1 -0
- package/api/types/AiResponseEnvelope.d.ts +9 -0
- package/{dist/api/types/ModelResponseExternalSessionAiResponseMetadataWrapper.d.ts → api/types/AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.d.ts} +2 -2
- package/api/types/ClientProvidedResponseMetadata.d.ts +0 -1
- package/api/types/{ProfileV1.d.ts → ExternalProfileV1.d.ts} +3 -5
- package/api/types/ExternalSessionAiResponseMetadata.d.ts +1 -0
- package/api/types/ExternalSessionAiResponseMetadataStatus.d.ts +2 -2
- package/api/types/ExternalSessionAiResponseMetadataStatus.js +1 -1
- package/api/types/{SessionConfig.d.ts → ExternalSessionConfig.d.ts} +3 -7
- package/{dist/api/types/SessionWithConnectionInfo.d.ts → api/types/ExternalSessionWithConnectionInfo.d.ts} +2 -6
- package/api/types/{ListProfileV1EnvelopeDefaultMetaWrapper.d.ts → ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts} +2 -2
- package/{dist/api/types/ListProfileV1EnvelopeDefaultMetaWrapper.d.ts → api/types/ListExternalProfileV1EnvelopeDefaultMetaWrapper.d.ts} +2 -2
- package/api/types/{SessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts → ListExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts} +2 -2
- package/api/types/{ScrapeModelResponse.d.ts → ScrapeResponseEnvelope.d.ts} +3 -1
- package/api/types/{ScrapeModelResponseExternalSessionAiResponseMetadataWrapper.d.ts → ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.d.ts} +2 -2
- package/api/types/SessionConfigV1.d.ts +0 -4
- package/api/types/index.d.ts +10 -15
- package/api/types/index.js +10 -15
- package/core/index.d.ts +0 -1
- package/core/index.js +0 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +1 -1
- package/dist/api/resources/index.d.ts +1 -2
- package/dist/api/resources/index.js +2 -3
- package/dist/api/resources/profiles/client/Client.d.ts +5 -23
- package/dist/api/resources/profiles/client/Client.js +19 -121
- 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 +4 -8
- package/dist/api/resources/sessions/client/Client.js +13 -105
- package/dist/api/resources/sessions/index.d.ts +0 -1
- package/dist/api/resources/sessions/index.js +0 -1
- package/dist/api/resources/windows/client/Client.d.ts +4 -3
- package/dist/api/resources/windows/client/Client.js +15 -13
- package/dist/api/resources/windows/client/requests/ScrapeContentRequest.d.ts +12 -0
- package/dist/api/resources/windows/client/requests/index.d.ts +1 -0
- package/dist/api/types/AiResponseEnvelope.d.ts +9 -0
- package/{api/types/ModelResponseExternalSessionAiResponseMetadataWrapper.d.ts → dist/api/types/AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.d.ts} +2 -2
- package/dist/api/types/ClientProvidedResponseMetadata.d.ts +0 -1
- package/dist/api/types/{ProfileV1.d.ts → ExternalProfileV1.d.ts} +3 -5
- package/dist/api/types/ExternalSessionAiResponseMetadata.d.ts +1 -0
- package/dist/api/types/ExternalSessionAiResponseMetadataStatus.d.ts +2 -2
- package/dist/api/types/ExternalSessionAiResponseMetadataStatus.js +1 -1
- package/dist/api/types/{SessionConfig.d.ts → ExternalSessionConfig.d.ts} +3 -7
- package/{api/types/SessionWithConnectionInfo.d.ts → dist/api/types/ExternalSessionWithConnectionInfo.d.ts} +2 -6
- package/{api/types/ListSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts → dist/api/types/ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts} +2 -2
- package/dist/api/types/{ProfileV1EnvelopeDefaultMetaWrapper.d.ts → ListExternalProfileV1EnvelopeDefaultMetaWrapper.d.ts} +2 -2
- package/{api/types/ProfileV1EnvelopeDefaultMetaWrapper.d.ts → dist/api/types/ListExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts} +2 -2
- package/dist/api/types/{ScrapeModelResponse.d.ts → ScrapeResponseEnvelope.d.ts} +3 -1
- package/dist/api/types/{ScrapeModelResponseExternalSessionAiResponseMetadataWrapper.d.ts → ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.d.ts} +2 -2
- package/dist/api/types/SessionConfigV1.d.ts +0 -4
- package/dist/api/types/index.d.ts +10 -15
- package/dist/api/types/index.js +10 -15
- package/dist/core/index.d.ts +0 -1
- package/dist/core/index.js +0 -1
- package/dist/serialization/index.d.ts +1 -1
- package/dist/serialization/index.js +1 -1
- package/dist/serialization/resources/index.d.ts +0 -1
- package/dist/serialization/resources/index.js +0 -1
- package/dist/serialization/resources/sessions/index.d.ts +0 -1
- package/dist/serialization/resources/sessions/index.js +0 -1
- 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/index.d.ts +1 -0
- package/dist/serialization/resources/windows/client/requests/index.js +3 -1
- package/dist/serialization/types/{ErrorMessage.d.ts → AiResponseEnvelope.d.ts} +6 -5
- package/{serialization/types/ModelResponse.js → dist/serialization/types/AiResponseEnvelope.js} +5 -2
- package/{serialization/types/ModelResponseExternalSessionAiResponseMetadataWrapper.d.ts → dist/serialization/types/AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.d.ts} +4 -4
- package/dist/serialization/types/{ModelResponseExternalSessionAiResponseMetadataWrapper.js → AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.js} +4 -4
- package/dist/serialization/types/ClientProvidedResponseMetadata.d.ts +0 -1
- package/dist/serialization/types/ClientProvidedResponseMetadata.js +0 -1
- package/{serialization/types/ProfileV1.d.ts → dist/serialization/types/ExternalProfileV1.d.ts} +4 -5
- package/dist/serialization/types/{ModelResponse.js → ExternalProfileV1.js} +5 -3
- package/dist/serialization/types/ExternalSessionAiResponseMetadata.d.ts +1 -0
- package/dist/serialization/types/ExternalSessionAiResponseMetadata.js +1 -0
- package/dist/serialization/types/ExternalSessionAiResponseMetadataStatus.d.ts +1 -1
- package/dist/serialization/types/ExternalSessionAiResponseMetadataStatus.js +1 -1
- package/dist/serialization/types/ExternalSessionConfig.d.ts +14 -0
- package/dist/serialization/types/{LiveViewConnectionInfo.js → ExternalSessionConfig.js} +5 -4
- package/dist/serialization/types/ExternalSessionWithConnectionInfo.d.ts +21 -0
- package/dist/serialization/types/{StatusMessage.js → ExternalSessionWithConnectionInfo.js} +11 -6
- package/dist/serialization/types/ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +18 -0
- package/dist/serialization/types/{SessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js → ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js} +4 -4
- package/{serialization/types/ListProfileV1EnvelopeDefaultMetaWrapper.d.ts → dist/serialization/types/ListExternalProfileV1EnvelopeDefaultMetaWrapper.d.ts} +4 -4
- package/{serialization/types/ProfileV1EnvelopeDefaultMetaWrapper.js → dist/serialization/types/ListExternalProfileV1EnvelopeDefaultMetaWrapper.js} +4 -4
- package/dist/serialization/types/ListExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +18 -0
- package/dist/serialization/types/ListExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js +39 -0
- package/{serialization/types/ScrapeModelResponse.d.ts → dist/serialization/types/ScrapeResponseEnvelope.d.ts} +5 -2
- package/{serialization/types/ScrapeModelResponse.js → dist/serialization/types/ScrapeResponseEnvelope.js} +5 -2
- package/dist/serialization/types/{ScrapeModelResponseExternalSessionAiResponseMetadataWrapper.d.ts → ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.d.ts} +4 -4
- package/dist/serialization/types/{ScrapeModelResponseExternalSessionAiResponseMetadataWrapper.js → ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.js} +4 -4
- package/dist/serialization/types/SessionConfigV1.d.ts +2 -4
- package/dist/serialization/types/SessionConfigV1.js +2 -4
- package/dist/serialization/types/index.d.ts +10 -15
- package/dist/serialization/types/index.js +10 -15
- package/package.json +1 -1
- package/reference.md +20 -142
- package/serialization/index.d.ts +1 -1
- package/serialization/index.js +1 -1
- package/serialization/resources/index.d.ts +0 -1
- package/serialization/resources/index.js +0 -1
- package/serialization/resources/sessions/index.d.ts +0 -1
- package/serialization/resources/sessions/index.js +0 -1
- 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/index.d.ts +1 -0
- package/serialization/resources/windows/client/requests/index.js +3 -1
- package/serialization/types/{ErrorMessage.d.ts → AiResponseEnvelope.d.ts} +6 -5
- package/{dist/serialization/types/ProfileV1EnvelopeDefaultMetaWrapper.js → serialization/types/AiResponseEnvelope.js} +3 -6
- package/{dist/serialization/types/ModelResponseExternalSessionAiResponseMetadataWrapper.d.ts → serialization/types/AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.d.ts} +4 -4
- package/serialization/types/{ModelResponseExternalSessionAiResponseMetadataWrapper.js → AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.js} +4 -4
- package/serialization/types/ClientProvidedResponseMetadata.d.ts +0 -1
- package/serialization/types/ClientProvidedResponseMetadata.js +0 -1
- package/{dist/serialization/types/ProfileV1.d.ts → serialization/types/ExternalProfileV1.d.ts} +4 -5
- package/serialization/types/{ErrorMessage.js → ExternalProfileV1.js} +5 -5
- package/serialization/types/ExternalSessionAiResponseMetadata.d.ts +1 -0
- package/serialization/types/ExternalSessionAiResponseMetadata.js +1 -0
- package/serialization/types/ExternalSessionAiResponseMetadataStatus.d.ts +1 -1
- package/serialization/types/ExternalSessionAiResponseMetadataStatus.js +1 -1
- package/serialization/types/ExternalSessionConfig.d.ts +14 -0
- package/{dist/serialization/types/ErrorMessage.js → serialization/types/ExternalSessionConfig.js} +5 -5
- package/serialization/types/ExternalSessionWithConnectionInfo.d.ts +21 -0
- package/serialization/types/{StatusMessage.js → ExternalSessionWithConnectionInfo.js} +11 -6
- package/serialization/types/ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +18 -0
- package/{dist/serialization/types/ListSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js → serialization/types/ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js} +4 -4
- package/serialization/types/{ProfileV1EnvelopeDefaultMetaWrapper.d.ts → ListExternalProfileV1EnvelopeDefaultMetaWrapper.d.ts} +4 -4
- package/{dist/serialization/types/ListProfileV1EnvelopeDefaultMetaWrapper.js → serialization/types/ListExternalProfileV1EnvelopeDefaultMetaWrapper.js} +4 -4
- package/serialization/types/ListExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +18 -0
- package/serialization/types/ListExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js +39 -0
- package/{dist/serialization/types/ScrapeModelResponse.d.ts → serialization/types/ScrapeResponseEnvelope.d.ts} +5 -2
- package/{dist/serialization/types/ScrapeModelResponse.js → serialization/types/ScrapeResponseEnvelope.js} +5 -2
- package/serialization/types/{ScrapeModelResponseExternalSessionAiResponseMetadataWrapper.d.ts → ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.d.ts} +4 -4
- package/serialization/types/{ScrapeModelResponseExternalSessionAiResponseMetadataWrapper.js → ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.js} +4 -4
- package/serialization/types/SessionConfigV1.d.ts +2 -4
- package/serialization/types/SessionConfigV1.js +2 -4
- package/serialization/types/index.d.ts +10 -15
- package/serialization/types/index.js +10 -15
- package/api/resources/sessions/types/SessionsEventsResponse.d.ts +0 -16
- package/api/resources/sessions/types/SessionsEventsResponseError.d.ts +0 -11
- package/api/resources/sessions/types/SessionsEventsResponseStatus.d.ts +0 -11
- package/api/resources/sessions/types/index.d.ts +0 -3
- package/api/resources/sessions/types/index.js +0 -19
- package/api/types/ErrorMessage.d.ts +0 -11
- package/api/types/LiveViewConnectionInfo.d.ts +0 -9
- package/api/types/ModelResponse.d.ts +0 -6
- package/api/types/StatusMessage.d.ts +0 -14
- package/api/types/StatusMessageStatus.d.ts +0 -13
- package/api/types/StatusMessageStatus.js +0 -12
- package/core/streaming-fetcher/Stream.d.ts +0 -48
- package/core/streaming-fetcher/Stream.js +0 -170
- package/core/streaming-fetcher/index.d.ts +0 -1
- package/core/streaming-fetcher/index.js +0 -5
- package/dist/api/resources/sessions/types/SessionsEventsResponse.d.ts +0 -16
- package/dist/api/resources/sessions/types/SessionsEventsResponseError.d.ts +0 -11
- package/dist/api/resources/sessions/types/SessionsEventsResponseStatus.d.ts +0 -11
- package/dist/api/resources/sessions/types/index.d.ts +0 -3
- package/dist/api/resources/sessions/types/index.js +0 -19
- package/dist/api/types/ErrorMessage.d.ts +0 -11
- package/dist/api/types/ListSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +0 -10
- package/dist/api/types/ListSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js +0 -5
- package/dist/api/types/LiveViewConnectionInfo.d.ts +0 -9
- package/dist/api/types/LiveViewConnectionInfo.js +0 -5
- package/dist/api/types/ModelResponse.d.ts +0 -6
- package/dist/api/types/ModelResponse.js +0 -5
- package/dist/api/types/ModelResponseExternalSessionAiResponseMetadataWrapper.js +0 -5
- package/dist/api/types/ProfileV1.js +0 -5
- package/dist/api/types/ProfileV1EnvelopeDefaultMetaWrapper.js +0 -5
- package/dist/api/types/ScrapeModelResponse.js +0 -5
- package/dist/api/types/ScrapeModelResponseExternalSessionAiResponseMetadataWrapper.js +0 -5
- package/dist/api/types/SessionConfig.js +0 -5
- package/dist/api/types/SessionWithConnectionInfo.js +0 -5
- package/dist/api/types/SessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +0 -10
- package/dist/api/types/SessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js +0 -5
- package/dist/api/types/StatusMessage.d.ts +0 -14
- package/dist/api/types/StatusMessage.js +0 -5
- package/dist/api/types/StatusMessageStatus.d.ts +0 -13
- package/dist/api/types/StatusMessageStatus.js +0 -12
- package/dist/core/streaming-fetcher/Stream.d.ts +0 -48
- package/dist/core/streaming-fetcher/Stream.js +0 -170
- package/dist/core/streaming-fetcher/index.d.ts +0 -1
- package/dist/core/streaming-fetcher/index.js +0 -5
- package/dist/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +0 -18
- package/dist/serialization/resources/sessions/types/SessionsEventsResponse.js +0 -41
- package/dist/serialization/resources/sessions/types/SessionsEventsResponseError.d.ts +0 -15
- package/dist/serialization/resources/sessions/types/SessionsEventsResponseError.js +0 -36
- package/dist/serialization/resources/sessions/types/SessionsEventsResponseStatus.d.ts +0 -15
- package/dist/serialization/resources/sessions/types/SessionsEventsResponseStatus.js +0 -36
- package/dist/serialization/resources/sessions/types/index.d.ts +0 -3
- package/dist/serialization/resources/sessions/types/index.js +0 -19
- package/dist/serialization/types/ListProfileV1EnvelopeDefaultMetaWrapper.d.ts +0 -18
- package/dist/serialization/types/ListSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +0 -18
- package/dist/serialization/types/LiveViewConnectionInfo.d.ts +0 -13
- package/dist/serialization/types/ModelResponse.d.ts +0 -12
- package/dist/serialization/types/ProfileV1.js +0 -36
- package/dist/serialization/types/ProfileV1EnvelopeDefaultMetaWrapper.d.ts +0 -18
- package/dist/serialization/types/SessionConfig.d.ts +0 -16
- package/dist/serialization/types/SessionConfig.js +0 -37
- package/dist/serialization/types/SessionWithConnectionInfo.d.ts +0 -24
- package/dist/serialization/types/SessionWithConnectionInfo.js +0 -45
- package/dist/serialization/types/SessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +0 -18
- package/dist/serialization/types/StatusMessage.d.ts +0 -16
- package/dist/serialization/types/StatusMessageStatus.d.ts +0 -10
- package/dist/serialization/types/StatusMessageStatus.js +0 -31
- package/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +0 -18
- package/serialization/resources/sessions/types/SessionsEventsResponse.js +0 -41
- package/serialization/resources/sessions/types/SessionsEventsResponseError.d.ts +0 -15
- package/serialization/resources/sessions/types/SessionsEventsResponseError.js +0 -36
- package/serialization/resources/sessions/types/SessionsEventsResponseStatus.d.ts +0 -15
- package/serialization/resources/sessions/types/SessionsEventsResponseStatus.js +0 -36
- package/serialization/resources/sessions/types/index.d.ts +0 -3
- package/serialization/resources/sessions/types/index.js +0 -19
- package/serialization/types/ListProfileV1EnvelopeDefaultMetaWrapper.js +0 -39
- package/serialization/types/ListSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +0 -18
- package/serialization/types/ListSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js +0 -39
- package/serialization/types/LiveViewConnectionInfo.d.ts +0 -13
- package/serialization/types/LiveViewConnectionInfo.js +0 -34
- package/serialization/types/ModelResponse.d.ts +0 -12
- package/serialization/types/ProfileV1.js +0 -36
- package/serialization/types/SessionConfig.d.ts +0 -16
- package/serialization/types/SessionConfig.js +0 -37
- package/serialization/types/SessionWithConnectionInfo.d.ts +0 -24
- package/serialization/types/SessionWithConnectionInfo.js +0 -45
- package/serialization/types/SessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +0 -18
- package/serialization/types/SessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js +0 -39
- package/serialization/types/StatusMessage.d.ts +0 -16
- package/serialization/types/StatusMessageStatus.d.ts +0 -10
- package/serialization/types/StatusMessageStatus.js +0 -31
- /package/api/resources/{sessions/types/SessionsEventsResponse.js → windows/client/requests/ScrapeContentRequest.js} +0 -0
- /package/api/{resources/sessions/types/SessionsEventsResponseError.js → types/AiResponseEnvelope.js} +0 -0
- /package/api/{resources/sessions/types/SessionsEventsResponseStatus.js → types/AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.js} +0 -0
- /package/api/types/{ErrorMessage.js → ExternalProfileV1.js} +0 -0
- /package/api/types/{ListProfileV1EnvelopeDefaultMetaWrapper.js → ExternalSessionConfig.js} +0 -0
- /package/api/types/{ListSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js → ExternalSessionWithConnectionInfo.js} +0 -0
- /package/api/types/{LiveViewConnectionInfo.js → ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js} +0 -0
- /package/api/types/{ModelResponse.js → ListExternalProfileV1EnvelopeDefaultMetaWrapper.js} +0 -0
- /package/api/types/{ModelResponseExternalSessionAiResponseMetadataWrapper.js → ListExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js} +0 -0
- /package/api/types/{ProfileV1.js → ScrapeResponseEnvelope.js} +0 -0
- /package/api/types/{ProfileV1EnvelopeDefaultMetaWrapper.js → ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.js} +0 -0
- /package/{api/types/ScrapeModelResponse.js → dist/api/resources/windows/client/requests/ScrapeContentRequest.js} +0 -0
- /package/{api/types/ScrapeModelResponseExternalSessionAiResponseMetadataWrapper.js → dist/api/types/AiResponseEnvelope.js} +0 -0
- /package/{api/types/SessionConfig.js → dist/api/types/AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper.js} +0 -0
- /package/{api/types/SessionWithConnectionInfo.js → dist/api/types/ExternalProfileV1.js} +0 -0
- /package/{api/types/SessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js → dist/api/types/ExternalSessionConfig.js} +0 -0
- /package/{api/types/StatusMessage.js → dist/api/types/ExternalSessionWithConnectionInfo.js} +0 -0
- /package/dist/api/{resources/sessions/types/SessionsEventsResponse.js → types/ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js} +0 -0
- /package/dist/api/{resources/sessions/types/SessionsEventsResponseError.js → types/ListExternalProfileV1EnvelopeDefaultMetaWrapper.js} +0 -0
- /package/dist/api/{resources/sessions/types/SessionsEventsResponseStatus.js → types/ListExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js} +0 -0
- /package/dist/api/types/{ErrorMessage.js → ScrapeResponseEnvelope.js} +0 -0
- /package/dist/api/types/{ListProfileV1EnvelopeDefaultMetaWrapper.js → ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper.js} +0 -0
package/README.md
CHANGED
@@ -19,7 +19,7 @@ Instantiate and use the client with the following:
|
|
19
19
|
import { AirtopClient } from "@airtop/sdk";
|
20
20
|
|
21
21
|
const client = new AirtopClient({ apiKey: "YOUR_API_KEY" });
|
22
|
-
await client.sessions.
|
22
|
+
await client.sessions.create();
|
23
23
|
```
|
24
24
|
|
25
25
|
## Request And Response Types
|
@@ -44,7 +44,7 @@ will be thrown.
|
|
44
44
|
import { AirtopError } from "@airtop/sdk";
|
45
45
|
|
46
46
|
try {
|
47
|
-
await client.sessions.
|
47
|
+
await client.sessions.create(...);
|
48
48
|
} catch (err) {
|
49
49
|
if (err instanceof AirtopError) {
|
50
50
|
console.log(err.statusCode);
|
@@ -71,7 +71,7 @@ A request is deemed retriable when any of the following HTTP status codes is ret
|
|
71
71
|
Use the `maxRetries` request option to configure this behavior.
|
72
72
|
|
73
73
|
```typescript
|
74
|
-
const response = await client.sessions.
|
74
|
+
const response = await client.sessions.create(..., {
|
75
75
|
maxRetries: 0 // override maxRetries at the request level
|
76
76
|
});
|
77
77
|
```
|
@@ -81,7 +81,7 @@ const response = await client.sessions.post(..., {
|
|
81
81
|
The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
|
82
82
|
|
83
83
|
```typescript
|
84
|
-
const response = await client.sessions.
|
84
|
+
const response = await client.sessions.create(..., {
|
85
85
|
timeoutInSeconds: 30 // override timeout to 30s
|
86
86
|
});
|
87
87
|
```
|
@@ -92,7 +92,7 @@ The SDK allows users to abort requests at any point by passing in an abort signa
|
|
92
92
|
|
93
93
|
```typescript
|
94
94
|
const controller = new AbortController();
|
95
|
-
const response = await client.sessions.
|
95
|
+
const response = await client.sessions.create(..., {
|
96
96
|
abortSignal: controller.signal
|
97
97
|
});
|
98
98
|
controller.abort(); // aborts the request
|
package/api/index.d.ts
CHANGED
package/api/index.js
CHANGED
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./resources"), exports);
|
18
17
|
__exportStar(require("./types"), exports);
|
19
18
|
__exportStar(require("./errors"), exports);
|
19
|
+
__exportStar(require("./resources"), exports);
|
package/api/resources/index.d.ts
CHANGED
@@ -1,6 +1,5 @@
|
|
1
|
-
export * as sessions from "./sessions";
|
2
|
-
export * from "./sessions/types";
|
3
1
|
export * as profiles from "./profiles";
|
2
|
+
export * as sessions from "./sessions";
|
4
3
|
export * as windows from "./windows";
|
5
4
|
export * from "./profiles/client/requests";
|
6
5
|
export * from "./sessions/client/requests";
|
package/api/resources/index.js
CHANGED
@@ -26,10 +26,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
27
27
|
};
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
-
exports.windows = exports.
|
30
|
-
exports.sessions = __importStar(require("./sessions"));
|
31
|
-
__exportStar(require("./sessions/types"), exports);
|
29
|
+
exports.windows = exports.sessions = exports.profiles = void 0;
|
32
30
|
exports.profiles = __importStar(require("./profiles"));
|
31
|
+
exports.sessions = __importStar(require("./sessions"));
|
33
32
|
exports.windows = __importStar(require("./windows"));
|
34
33
|
__exportStar(require("./profiles/client/requests"), exports);
|
35
34
|
__exportStar(require("./sessions/client/requests"), exports);
|
@@ -23,42 +23,24 @@ export declare class Profiles {
|
|
23
23
|
protected readonly _options: Profiles.Options;
|
24
24
|
constructor(_options?: Profiles.Options);
|
25
25
|
/**
|
26
|
-
* Get profiles
|
26
|
+
* Get profiles matching by id
|
27
27
|
*
|
28
28
|
* @param {Airtop.ProfilesGetRequest} request
|
29
29
|
* @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
|
30
30
|
*
|
31
31
|
* @example
|
32
|
-
* await client.profiles.get(
|
33
|
-
* name: "^Acme.*"
|
34
|
-
* })
|
32
|
+
* await client.profiles.get()
|
35
33
|
*/
|
36
|
-
get(request?: Airtop.ProfilesGetRequest, requestOptions?: Profiles.RequestOptions): Promise<Airtop.
|
34
|
+
get(request?: Airtop.ProfilesGetRequest, requestOptions?: Profiles.RequestOptions): Promise<Airtop.ListExternalProfileV1EnvelopeDefaultMetaWrapper>;
|
37
35
|
/**
|
38
|
-
* Delete profiles matching
|
36
|
+
* Delete profiles matching by id
|
39
37
|
*
|
40
38
|
* @param {Airtop.ProfilesDeleteRequest} request
|
41
39
|
* @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
|
42
40
|
*
|
43
41
|
* @example
|
44
|
-
* await client.profiles.delete(
|
45
|
-
* name: "^Acme.*"
|
46
|
-
* })
|
42
|
+
* await client.profiles.delete()
|
47
43
|
*/
|
48
44
|
delete(request?: Airtop.ProfilesDeleteRequest, requestOptions?: Profiles.RequestOptions): Promise<void>;
|
49
|
-
/**
|
50
|
-
* Get a profile by ID
|
51
|
-
*
|
52
|
-
* @param {string} id - name of the profile to get
|
53
|
-
* @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
|
54
|
-
*
|
55
|
-
* @throws {@link Airtop.NotFoundError}
|
56
|
-
* @throws {@link Airtop.UnprocessableEntityError}
|
57
|
-
* @throws {@link Airtop.InternalServerError}
|
58
|
-
*
|
59
|
-
* @example
|
60
|
-
* await client.profiles.getById("4a61a55c-391b-4f73-957e-ffbd29ac7cba")
|
61
|
-
*/
|
62
|
-
getById(id: string, requestOptions?: Profiles.RequestOptions): Promise<Airtop.ProfileV1EnvelopeDefaultMetaWrapper>;
|
63
45
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
64
46
|
}
|
@@ -41,7 +41,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
41
|
exports.Profiles = void 0;
|
42
42
|
const environments = __importStar(require("../../../../environments"));
|
43
43
|
const core = __importStar(require("../../../../core"));
|
44
|
-
const Airtop = __importStar(require("../../../index"));
|
45
44
|
const url_join_1 = __importDefault(require("url-join"));
|
46
45
|
const serializers = __importStar(require("../../../../serialization/index"));
|
47
46
|
const errors = __importStar(require("../../../../errors/index"));
|
@@ -50,30 +49,25 @@ class Profiles {
|
|
50
49
|
this._options = _options;
|
51
50
|
}
|
52
51
|
/**
|
53
|
-
* Get profiles
|
52
|
+
* Get profiles matching by id
|
54
53
|
*
|
55
54
|
* @param {Airtop.ProfilesGetRequest} request
|
56
55
|
* @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
|
57
56
|
*
|
58
57
|
* @example
|
59
|
-
* await client.profiles.get(
|
60
|
-
* name: "^Acme.*"
|
61
|
-
* })
|
58
|
+
* await client.profiles.get()
|
62
59
|
*/
|
63
60
|
get(request = {}, requestOptions) {
|
64
61
|
var _a, _b;
|
65
62
|
return __awaiter(this, void 0, void 0, function* () {
|
66
|
-
const {
|
63
|
+
const { profileIds } = request;
|
67
64
|
const _queryParams = {};
|
68
|
-
if (
|
69
|
-
|
70
|
-
|
71
|
-
if (tags != null) {
|
72
|
-
if (Array.isArray(tags)) {
|
73
|
-
_queryParams["tags"] = tags.map((item) => item);
|
65
|
+
if (profileIds != null) {
|
66
|
+
if (Array.isArray(profileIds)) {
|
67
|
+
_queryParams["profileIds"] = profileIds.map((item) => item);
|
74
68
|
}
|
75
69
|
else {
|
76
|
-
_queryParams["
|
70
|
+
_queryParams["profileIds"] = profileIds;
|
77
71
|
}
|
78
72
|
}
|
79
73
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
@@ -83,8 +77,8 @@ class Profiles {
|
|
83
77
|
Authorization: yield this._getAuthorizationHeader(),
|
84
78
|
"X-Fern-Language": "JavaScript",
|
85
79
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
86
|
-
"X-Fern-SDK-Version": "0.0.
|
87
|
-
"User-Agent": "@airtop/sdk/0.0.
|
80
|
+
"X-Fern-SDK-Version": "0.0.8",
|
81
|
+
"User-Agent": "@airtop/sdk/0.0.8",
|
88
82
|
"X-Fern-Runtime": core.RUNTIME.type,
|
89
83
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
90
84
|
},
|
@@ -96,7 +90,7 @@ class Profiles {
|
|
96
90
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
97
91
|
});
|
98
92
|
if (_response.ok) {
|
99
|
-
return serializers.
|
93
|
+
return serializers.ListExternalProfileV1EnvelopeDefaultMetaWrapper.parseOrThrow(_response.body, {
|
100
94
|
unrecognizedObjectKeys: "passthrough",
|
101
95
|
allowUnrecognizedUnionMembers: true,
|
102
96
|
allowUnrecognizedEnumValues: true,
|
@@ -126,30 +120,25 @@ class Profiles {
|
|
126
120
|
});
|
127
121
|
}
|
128
122
|
/**
|
129
|
-
* Delete profiles matching
|
123
|
+
* Delete profiles matching by id
|
130
124
|
*
|
131
125
|
* @param {Airtop.ProfilesDeleteRequest} request
|
132
126
|
* @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
|
133
127
|
*
|
134
128
|
* @example
|
135
|
-
* await client.profiles.delete(
|
136
|
-
* name: "^Acme.*"
|
137
|
-
* })
|
129
|
+
* await client.profiles.delete()
|
138
130
|
*/
|
139
131
|
delete(request = {}, requestOptions) {
|
140
132
|
var _a, _b;
|
141
133
|
return __awaiter(this, void 0, void 0, function* () {
|
142
|
-
const {
|
134
|
+
const { profileIds } = request;
|
143
135
|
const _queryParams = {};
|
144
|
-
if (
|
145
|
-
|
146
|
-
|
147
|
-
if (tags != null) {
|
148
|
-
if (Array.isArray(tags)) {
|
149
|
-
_queryParams["tags"] = tags.map((item) => item);
|
136
|
+
if (profileIds != null) {
|
137
|
+
if (Array.isArray(profileIds)) {
|
138
|
+
_queryParams["profileIds"] = profileIds.map((item) => item);
|
150
139
|
}
|
151
140
|
else {
|
152
|
-
_queryParams["
|
141
|
+
_queryParams["profileIds"] = profileIds;
|
153
142
|
}
|
154
143
|
}
|
155
144
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
@@ -159,8 +148,8 @@ class Profiles {
|
|
159
148
|
Authorization: yield this._getAuthorizationHeader(),
|
160
149
|
"X-Fern-Language": "JavaScript",
|
161
150
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
162
|
-
"X-Fern-SDK-Version": "0.0.
|
163
|
-
"User-Agent": "@airtop/sdk/0.0.
|
151
|
+
"X-Fern-SDK-Version": "0.0.8",
|
152
|
+
"User-Agent": "@airtop/sdk/0.0.8",
|
164
153
|
"X-Fern-Runtime": core.RUNTIME.type,
|
165
154
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
166
155
|
},
|
@@ -195,97 +184,6 @@ class Profiles {
|
|
195
184
|
}
|
196
185
|
});
|
197
186
|
}
|
198
|
-
/**
|
199
|
-
* Get a profile by ID
|
200
|
-
*
|
201
|
-
* @param {string} id - name of the profile to get
|
202
|
-
* @param {Profiles.RequestOptions} requestOptions - Request-specific configuration.
|
203
|
-
*
|
204
|
-
* @throws {@link Airtop.NotFoundError}
|
205
|
-
* @throws {@link Airtop.UnprocessableEntityError}
|
206
|
-
* @throws {@link Airtop.InternalServerError}
|
207
|
-
*
|
208
|
-
* @example
|
209
|
-
* await client.profiles.getById("4a61a55c-391b-4f73-957e-ffbd29ac7cba")
|
210
|
-
*/
|
211
|
-
getById(id, requestOptions) {
|
212
|
-
var _a, _b;
|
213
|
-
return __awaiter(this, void 0, void 0, function* () {
|
214
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
215
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `profiles/${encodeURIComponent(id)}`),
|
216
|
-
method: "GET",
|
217
|
-
headers: {
|
218
|
-
Authorization: yield this._getAuthorizationHeader(),
|
219
|
-
"X-Fern-Language": "JavaScript",
|
220
|
-
"X-Fern-SDK-Name": "@airtop/sdk",
|
221
|
-
"X-Fern-SDK-Version": "0.0.7-c",
|
222
|
-
"User-Agent": "@airtop/sdk/0.0.7-c",
|
223
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
224
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
225
|
-
},
|
226
|
-
contentType: "application/json",
|
227
|
-
requestType: "json",
|
228
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
229
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
230
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
231
|
-
});
|
232
|
-
if (_response.ok) {
|
233
|
-
return serializers.ProfileV1EnvelopeDefaultMetaWrapper.parseOrThrow(_response.body, {
|
234
|
-
unrecognizedObjectKeys: "passthrough",
|
235
|
-
allowUnrecognizedUnionMembers: true,
|
236
|
-
allowUnrecognizedEnumValues: true,
|
237
|
-
skipValidation: true,
|
238
|
-
breadcrumbsPrefix: ["response"],
|
239
|
-
});
|
240
|
-
}
|
241
|
-
if (_response.error.reason === "status-code") {
|
242
|
-
switch (_response.error.statusCode) {
|
243
|
-
case 404:
|
244
|
-
throw new Airtop.NotFoundError(serializers.ErrorEnvelope.parseOrThrow(_response.error.body, {
|
245
|
-
unrecognizedObjectKeys: "passthrough",
|
246
|
-
allowUnrecognizedUnionMembers: true,
|
247
|
-
allowUnrecognizedEnumValues: true,
|
248
|
-
skipValidation: true,
|
249
|
-
breadcrumbsPrefix: ["response"],
|
250
|
-
}));
|
251
|
-
case 422:
|
252
|
-
throw new Airtop.UnprocessableEntityError(serializers.ErrorEnvelope.parseOrThrow(_response.error.body, {
|
253
|
-
unrecognizedObjectKeys: "passthrough",
|
254
|
-
allowUnrecognizedUnionMembers: true,
|
255
|
-
allowUnrecognizedEnumValues: true,
|
256
|
-
skipValidation: true,
|
257
|
-
breadcrumbsPrefix: ["response"],
|
258
|
-
}));
|
259
|
-
case 500:
|
260
|
-
throw new Airtop.InternalServerError(serializers.ErrorEnvelope.parseOrThrow(_response.error.body, {
|
261
|
-
unrecognizedObjectKeys: "passthrough",
|
262
|
-
allowUnrecognizedUnionMembers: true,
|
263
|
-
allowUnrecognizedEnumValues: true,
|
264
|
-
skipValidation: true,
|
265
|
-
breadcrumbsPrefix: ["response"],
|
266
|
-
}));
|
267
|
-
default:
|
268
|
-
throw new errors.AirtopError({
|
269
|
-
statusCode: _response.error.statusCode,
|
270
|
-
body: _response.error.body,
|
271
|
-
});
|
272
|
-
}
|
273
|
-
}
|
274
|
-
switch (_response.error.reason) {
|
275
|
-
case "non-json":
|
276
|
-
throw new errors.AirtopError({
|
277
|
-
statusCode: _response.error.statusCode,
|
278
|
-
body: _response.error.rawBody,
|
279
|
-
});
|
280
|
-
case "timeout":
|
281
|
-
throw new errors.AirtopTimeoutError();
|
282
|
-
case "unknown":
|
283
|
-
throw new errors.AirtopError({
|
284
|
-
message: _response.error.errorMessage,
|
285
|
-
});
|
286
|
-
}
|
287
|
-
});
|
288
|
-
}
|
289
187
|
_getAuthorizationHeader() {
|
290
188
|
return __awaiter(this, void 0, void 0, function* () {
|
291
189
|
const bearer = yield core.Supplier.get(this._options.apiKey);
|
@@ -3,17 +3,11 @@
|
|
3
3
|
*/
|
4
4
|
/**
|
5
5
|
* @example
|
6
|
-
* {
|
7
|
-
* name: "^Acme.*"
|
8
|
-
* }
|
6
|
+
* {}
|
9
7
|
*/
|
10
8
|
export interface ProfilesDeleteRequest {
|
11
9
|
/**
|
12
|
-
*
|
10
|
+
* A comma separated list of profile ids to search for
|
13
11
|
*/
|
14
|
-
|
15
|
-
/**
|
16
|
-
* a comma separated list of tags to filter by (joined by OR, e.g. tag is red OR blue)
|
17
|
-
*/
|
18
|
-
tags?: string | string[];
|
12
|
+
profileIds?: string | string[];
|
19
13
|
}
|
@@ -3,17 +3,11 @@
|
|
3
3
|
*/
|
4
4
|
/**
|
5
5
|
* @example
|
6
|
-
* {
|
7
|
-
* name: "^Acme.*"
|
8
|
-
* }
|
6
|
+
* {}
|
9
7
|
*/
|
10
8
|
export interface ProfilesGetRequest {
|
11
9
|
/**
|
12
|
-
*
|
10
|
+
* A comma separated list of profile ids to search for
|
13
11
|
*/
|
14
|
-
|
15
|
-
/**
|
16
|
-
* a comma separated list of tags to filter by (joined by OR, e.g. tag is red OR blue)
|
17
|
-
*/
|
18
|
-
tags?: string | string[];
|
12
|
+
profileIds?: string | string[];
|
19
13
|
}
|
@@ -35,15 +35,15 @@ export declare class Sessions {
|
|
35
35
|
* @example
|
36
36
|
* await client.sessions.list()
|
37
37
|
*/
|
38
|
-
list(request?: Airtop.SessionsListRequest, requestOptions?: Sessions.RequestOptions): Promise<Airtop.
|
38
|
+
list(request?: Airtop.SessionsListRequest, requestOptions?: Sessions.RequestOptions): Promise<Airtop.ListExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper>;
|
39
39
|
/**
|
40
40
|
* @param {Airtop.SessionRestInputV1} request
|
41
41
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
42
42
|
*
|
43
43
|
* @example
|
44
|
-
* await client.sessions.
|
44
|
+
* await client.sessions.create()
|
45
45
|
*/
|
46
|
-
|
46
|
+
create(request?: Airtop.SessionRestInputV1, requestOptions?: Sessions.RequestOptions): Promise<Airtop.ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper>;
|
47
47
|
/**
|
48
48
|
* Get a session by ID
|
49
49
|
*
|
@@ -57,7 +57,7 @@ export declare class Sessions {
|
|
57
57
|
* @example
|
58
58
|
* await client.sessions.getinfo("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b")
|
59
59
|
*/
|
60
|
-
getinfo(id: string, requestOptions?: Sessions.RequestOptions): Promise<Airtop.
|
60
|
+
getinfo(id: string, requestOptions?: Sessions.RequestOptions): Promise<Airtop.ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper>;
|
61
61
|
/**
|
62
62
|
* Ends a session by ID. If a given session id does not exist within the organization, it is ignored.
|
63
63
|
*
|
@@ -68,9 +68,5 @@ export declare class Sessions {
|
|
68
68
|
* await client.sessions.terminate("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b")
|
69
69
|
*/
|
70
70
|
terminate(id: string, requestOptions?: Sessions.RequestOptions): Promise<void>;
|
71
|
-
/**
|
72
|
-
* Get a session event stream for a given session ID
|
73
|
-
*/
|
74
|
-
events(id: string, requestOptions?: Sessions.RequestOptions): Promise<core.Stream<Airtop.SessionsEventsResponse>>;
|
75
71
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
76
72
|
}
|
@@ -82,8 +82,8 @@ class Sessions {
|
|
82
82
|
Authorization: yield this._getAuthorizationHeader(),
|
83
83
|
"X-Fern-Language": "JavaScript",
|
84
84
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
85
|
-
"X-Fern-SDK-Version": "0.0.
|
86
|
-
"User-Agent": "@airtop/sdk/0.0.
|
85
|
+
"X-Fern-SDK-Version": "0.0.8",
|
86
|
+
"User-Agent": "@airtop/sdk/0.0.8",
|
87
87
|
"X-Fern-Runtime": core.RUNTIME.type,
|
88
88
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
89
89
|
},
|
@@ -95,7 +95,7 @@ class Sessions {
|
|
95
95
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
96
96
|
});
|
97
97
|
if (_response.ok) {
|
98
|
-
return serializers.
|
98
|
+
return serializers.ListExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.parseOrThrow(_response.body, {
|
99
99
|
unrecognizedObjectKeys: "passthrough",
|
100
100
|
allowUnrecognizedUnionMembers: true,
|
101
101
|
allowUnrecognizedEnumValues: true,
|
@@ -156,9 +156,9 @@ class Sessions {
|
|
156
156
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
157
157
|
*
|
158
158
|
* @example
|
159
|
-
* await client.sessions.
|
159
|
+
* await client.sessions.create()
|
160
160
|
*/
|
161
|
-
|
161
|
+
create(request = {}, requestOptions) {
|
162
162
|
var _a, _b;
|
163
163
|
return __awaiter(this, void 0, void 0, function* () {
|
164
164
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
@@ -168,8 +168,8 @@ class Sessions {
|
|
168
168
|
Authorization: yield this._getAuthorizationHeader(),
|
169
169
|
"X-Fern-Language": "JavaScript",
|
170
170
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
171
|
-
"X-Fern-SDK-Version": "0.0.
|
172
|
-
"User-Agent": "@airtop/sdk/0.0.
|
171
|
+
"X-Fern-SDK-Version": "0.0.8",
|
172
|
+
"User-Agent": "@airtop/sdk/0.0.8",
|
173
173
|
"X-Fern-Runtime": core.RUNTIME.type,
|
174
174
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
175
175
|
},
|
@@ -181,7 +181,7 @@ class Sessions {
|
|
181
181
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
182
182
|
});
|
183
183
|
if (_response.ok) {
|
184
|
-
return serializers.
|
184
|
+
return serializers.ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.parseOrThrow(_response.body, {
|
185
185
|
unrecognizedObjectKeys: "passthrough",
|
186
186
|
allowUnrecognizedUnionMembers: true,
|
187
187
|
allowUnrecognizedEnumValues: true,
|
@@ -233,8 +233,8 @@ class Sessions {
|
|
233
233
|
Authorization: yield this._getAuthorizationHeader(),
|
234
234
|
"X-Fern-Language": "JavaScript",
|
235
235
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
236
|
-
"X-Fern-SDK-Version": "0.0.
|
237
|
-
"User-Agent": "@airtop/sdk/0.0.
|
236
|
+
"X-Fern-SDK-Version": "0.0.8",
|
237
|
+
"User-Agent": "@airtop/sdk/0.0.8",
|
238
238
|
"X-Fern-Runtime": core.RUNTIME.type,
|
239
239
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
240
240
|
},
|
@@ -245,7 +245,7 @@ class Sessions {
|
|
245
245
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
246
246
|
});
|
247
247
|
if (_response.ok) {
|
248
|
-
return serializers.
|
248
|
+
return serializers.ExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.parseOrThrow(_response.body, {
|
249
249
|
unrecognizedObjectKeys: "passthrough",
|
250
250
|
allowUnrecognizedUnionMembers: true,
|
251
251
|
allowUnrecognizedEnumValues: true,
|
@@ -320,8 +320,8 @@ class Sessions {
|
|
320
320
|
Authorization: yield this._getAuthorizationHeader(),
|
321
321
|
"X-Fern-Language": "JavaScript",
|
322
322
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
323
|
-
"X-Fern-SDK-Version": "0.0.
|
324
|
-
"User-Agent": "@airtop/sdk/0.0.
|
323
|
+
"X-Fern-SDK-Version": "0.0.8",
|
324
|
+
"User-Agent": "@airtop/sdk/0.0.8",
|
325
325
|
"X-Fern-Runtime": core.RUNTIME.type,
|
326
326
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
327
327
|
},
|
@@ -355,98 +355,6 @@ class Sessions {
|
|
355
355
|
}
|
356
356
|
});
|
357
357
|
}
|
358
|
-
/**
|
359
|
-
* Get a session event stream for a given session ID
|
360
|
-
*/
|
361
|
-
events(id, requestOptions) {
|
362
|
-
var _a, _b;
|
363
|
-
return __awaiter(this, void 0, void 0, function* () {
|
364
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
365
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(id)}/events`),
|
366
|
-
method: "GET",
|
367
|
-
headers: {
|
368
|
-
Authorization: yield this._getAuthorizationHeader(),
|
369
|
-
"X-Fern-Language": "JavaScript",
|
370
|
-
"X-Fern-SDK-Name": "@airtop/sdk",
|
371
|
-
"X-Fern-SDK-Version": "0.0.7-c",
|
372
|
-
"User-Agent": "@airtop/sdk/0.0.7-c",
|
373
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
374
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
375
|
-
},
|
376
|
-
contentType: "application/json",
|
377
|
-
requestType: "json",
|
378
|
-
responseType: "sse",
|
379
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
380
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
381
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
382
|
-
});
|
383
|
-
if (_response.ok) {
|
384
|
-
return new core.Stream({
|
385
|
-
stream: _response.body,
|
386
|
-
parse: (data) => __awaiter(this, void 0, void 0, function* () {
|
387
|
-
return serializers.SessionsEventsResponse.parseOrThrow(data, {
|
388
|
-
unrecognizedObjectKeys: "passthrough",
|
389
|
-
allowUnrecognizedUnionMembers: true,
|
390
|
-
allowUnrecognizedEnumValues: true,
|
391
|
-
skipValidation: true,
|
392
|
-
breadcrumbsPrefix: ["response"],
|
393
|
-
});
|
394
|
-
}),
|
395
|
-
signal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
396
|
-
eventShape: {
|
397
|
-
type: "sse",
|
398
|
-
streamTerminator: "[DONE]",
|
399
|
-
},
|
400
|
-
});
|
401
|
-
}
|
402
|
-
if (_response.error.reason === "status-code") {
|
403
|
-
switch (_response.error.statusCode) {
|
404
|
-
case 404:
|
405
|
-
throw new Airtop.NotFoundError(serializers.ErrorEnvelope.parseOrThrow(_response.error.body, {
|
406
|
-
unrecognizedObjectKeys: "passthrough",
|
407
|
-
allowUnrecognizedUnionMembers: true,
|
408
|
-
allowUnrecognizedEnumValues: true,
|
409
|
-
skipValidation: true,
|
410
|
-
breadcrumbsPrefix: ["response"],
|
411
|
-
}));
|
412
|
-
case 422:
|
413
|
-
throw new Airtop.UnprocessableEntityError(serializers.ErrorEnvelope.parseOrThrow(_response.error.body, {
|
414
|
-
unrecognizedObjectKeys: "passthrough",
|
415
|
-
allowUnrecognizedUnionMembers: true,
|
416
|
-
allowUnrecognizedEnumValues: true,
|
417
|
-
skipValidation: true,
|
418
|
-
breadcrumbsPrefix: ["response"],
|
419
|
-
}));
|
420
|
-
case 500:
|
421
|
-
throw new Airtop.InternalServerError(serializers.ErrorEnvelope.parseOrThrow(_response.error.body, {
|
422
|
-
unrecognizedObjectKeys: "passthrough",
|
423
|
-
allowUnrecognizedUnionMembers: true,
|
424
|
-
allowUnrecognizedEnumValues: true,
|
425
|
-
skipValidation: true,
|
426
|
-
breadcrumbsPrefix: ["response"],
|
427
|
-
}));
|
428
|
-
default:
|
429
|
-
throw new errors.AirtopError({
|
430
|
-
statusCode: _response.error.statusCode,
|
431
|
-
body: _response.error.body,
|
432
|
-
});
|
433
|
-
}
|
434
|
-
}
|
435
|
-
switch (_response.error.reason) {
|
436
|
-
case "non-json":
|
437
|
-
throw new errors.AirtopError({
|
438
|
-
statusCode: _response.error.statusCode,
|
439
|
-
body: _response.error.rawBody,
|
440
|
-
});
|
441
|
-
case "timeout":
|
442
|
-
throw new errors.AirtopTimeoutError();
|
443
|
-
case "unknown":
|
444
|
-
throw new errors.AirtopError({
|
445
|
-
message: _response.error.errorMessage,
|
446
|
-
});
|
447
|
-
}
|
448
|
-
});
|
449
|
-
}
|
450
358
|
_getAuthorizationHeader() {
|
451
359
|
return __awaiter(this, void 0, void 0, function* () {
|
452
360
|
const bearer = yield core.Supplier.get(this._options.apiKey);
|
@@ -14,5 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./types"), exports);
|
18
17
|
__exportStar(require("./client"), exports);
|
@@ -45,16 +45,17 @@ export declare class Windows {
|
|
45
45
|
* prompt: "What is the main idea of this page?"
|
46
46
|
* })
|
47
47
|
*/
|
48
|
-
promptContent(sessionId: string, windowId: string, request: Airtop.PromptContentRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.
|
48
|
+
promptContent(sessionId: string, windowId: string, request: Airtop.PromptContentRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper>;
|
49
49
|
/**
|
50
50
|
* @param {string} sessionId - The session id to scrape
|
51
51
|
* @param {string} windowId - The window id to scrape
|
52
|
+
* @param {Airtop.ScrapeContentRequest} request
|
52
53
|
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
53
54
|
*
|
54
55
|
* @example
|
55
56
|
* await client.windows.scrapeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
56
57
|
*/
|
57
|
-
scrapeContent(sessionId: string, windowId: string, requestOptions?: Windows.RequestOptions): Promise<Airtop.
|
58
|
+
scrapeContent(sessionId: string, windowId: string, request?: Airtop.ScrapeContentRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.ScrapeResponseEnvelopeExternalSessionAiResponseMetadataWrapper>;
|
58
59
|
/**
|
59
60
|
* @param {string} sessionId - The session id to summarize
|
60
61
|
* @param {string} windowId - The window id to summarize
|
@@ -64,6 +65,6 @@ export declare class Windows {
|
|
64
65
|
* @example
|
65
66
|
* await client.windows.summarizeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
66
67
|
*/
|
67
|
-
summarizeContent(sessionId: string, windowId: string, request?: Airtop.SummarizeContentRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.
|
68
|
+
summarizeContent(sessionId: string, windowId: string, request?: Airtop.SummarizeContentRequest, requestOptions?: Windows.RequestOptions): Promise<Airtop.AiResponseEnvelopeExternalSessionAiResponseMetadataWrapper>;
|
68
69
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
69
70
|
}
|