@airtop/sdk 0.1.40 → 0.1.41-beta0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -10
- package/api/resources/automations/client/Client.js +4 -4
- package/api/resources/files/client/Client.d.ts +11 -0
- package/api/resources/files/client/Client.js +52 -4
- package/api/resources/files/client/requests/PushFileBodyV1.d.ts +11 -0
- package/api/resources/files/client/requests/PushFileBodyV1.js +5 -0
- package/api/resources/files/client/requests/index.d.ts +1 -0
- package/api/resources/profiles/client/Client.js +1 -1
- package/api/resources/requests/client/Client.js +1 -1
- package/api/resources/sessions/client/Client.js +6 -6
- 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 +228 -0
- package/api/resources/windows/client/Client.js +1162 -201
- package/api/resources/windows/client/requests/ActRequest.d.ts +30 -0
- package/api/resources/windows/client/requests/ActRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncClickRequest.d.ts +29 -0
- package/api/resources/windows/client/requests/AsyncClickRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncFileInputRequest.d.ts +33 -0
- package/api/resources/windows/client/requests/AsyncFileInputRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +27 -0
- package/api/resources/windows/client/requests/AsyncHoverRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +27 -0
- package/api/resources/windows/client/requests/AsyncMonitorRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +29 -0
- package/api/resources/windows/client/requests/AsyncPageQueryRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +27 -0
- package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +29 -0
- package/api/resources/windows/client/requests/AsyncPromptContentRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +23 -0
- package/api/resources/windows/client/requests/AsyncScreenshotRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +25 -0
- package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +37 -0
- package/api/resources/windows/client/requests/AsyncTypeRequest.js +5 -0
- package/api/resources/windows/client/requests/ExtractRequest.d.ts +30 -0
- package/api/resources/windows/client/requests/ExtractRequest.js +5 -0
- package/api/resources/windows/client/requests/FindManyRequest.d.ts +30 -0
- package/api/resources/windows/client/requests/FindManyRequest.js +5 -0
- package/api/resources/windows/client/requests/FindOneRequest.d.ts +30 -0
- package/api/resources/windows/client/requests/FindOneRequest.js +5 -0
- package/api/resources/windows/client/requests/LlmRequest.d.ts +25 -0
- package/api/resources/windows/client/requests/LlmRequest.js +5 -0
- package/api/resources/windows/client/requests/OperatorPromptV1Body.d.ts +25 -0
- package/api/resources/windows/client/requests/OperatorPromptV1Body.js +5 -0
- package/api/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts +31 -0
- package/api/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js +5 -0
- package/api/resources/windows/client/requests/index.d.ts +17 -0
- package/api/types/AsyncOperatorPromptResponseEnvelope.d.ts +9 -0
- package/api/types/AsyncOperatorPromptResponseEnvelope.js +5 -0
- package/api/types/FileEventMessage.d.ts +1 -0
- package/api/types/index.d.ts +1 -0
- package/api/types/index.js +1 -0
- package/dist/api/resources/automations/client/Client.js +4 -4
- package/dist/api/resources/files/client/Client.d.ts +11 -0
- package/dist/api/resources/files/client/Client.js +52 -4
- package/dist/api/resources/files/client/requests/PushFileBodyV1.d.ts +11 -0
- package/dist/api/resources/files/client/requests/PushFileBodyV1.js +5 -0
- package/dist/api/resources/files/client/requests/index.d.ts +1 -0
- package/dist/api/resources/profiles/client/Client.js +1 -1
- package/dist/api/resources/requests/client/Client.js +1 -1
- package/dist/api/resources/sessions/client/Client.js +6 -6
- 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 +228 -0
- package/dist/api/resources/windows/client/Client.js +1162 -201
- package/dist/api/resources/windows/client/requests/ActRequest.d.ts +30 -0
- package/dist/api/resources/windows/client/requests/ActRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncClickRequest.d.ts +29 -0
- package/dist/api/resources/windows/client/requests/AsyncClickRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncFileInputRequest.d.ts +33 -0
- package/dist/api/resources/windows/client/requests/AsyncFileInputRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +27 -0
- package/dist/api/resources/windows/client/requests/AsyncHoverRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +27 -0
- package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +29 -0
- package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +27 -0
- package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +29 -0
- package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +23 -0
- package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +25 -0
- package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +37 -0
- package/dist/api/resources/windows/client/requests/AsyncTypeRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/ExtractRequest.d.ts +30 -0
- package/dist/api/resources/windows/client/requests/ExtractRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/FindManyRequest.d.ts +30 -0
- package/dist/api/resources/windows/client/requests/FindManyRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/FindOneRequest.d.ts +30 -0
- package/dist/api/resources/windows/client/requests/FindOneRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/LlmRequest.d.ts +25 -0
- package/dist/api/resources/windows/client/requests/LlmRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/OperatorPromptV1Body.d.ts +25 -0
- package/dist/api/resources/windows/client/requests/OperatorPromptV1Body.js +5 -0
- package/dist/api/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts +31 -0
- package/dist/api/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js +5 -0
- package/dist/api/resources/windows/client/requests/index.d.ts +17 -0
- package/dist/api/types/AsyncOperatorPromptResponseEnvelope.d.ts +9 -0
- package/dist/api/types/AsyncOperatorPromptResponseEnvelope.js +5 -0
- package/dist/api/types/FileEventMessage.d.ts +1 -0
- package/dist/api/types/index.d.ts +1 -0
- package/dist/api/types/index.js +1 -0
- package/dist/serialization/resources/files/client/requests/PushFileBodyV1.d.ts +12 -0
- package/dist/serialization/resources/files/client/requests/PushFileBodyV1.js +43 -0
- package/dist/serialization/resources/files/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/files/client/requests/index.js +3 -1
- 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/requests/ActRequest.d.ts +19 -0
- package/dist/serialization/resources/windows/client/requests/ActRequest.js +50 -0
- package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +20 -0
- package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.js +51 -0
- package/dist/serialization/resources/windows/client/requests/AsyncFileInputRequest.d.ts +22 -0
- package/dist/serialization/resources/windows/client/requests/AsyncFileInputRequest.js +53 -0
- package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +19 -0
- package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.js +50 -0
- package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +19 -0
- package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +50 -0
- package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +20 -0
- package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +51 -0
- package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +19 -0
- package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +50 -0
- package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +20 -0
- package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +51 -0
- package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +18 -0
- package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +49 -0
- package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +19 -0
- package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +50 -0
- package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +24 -0
- package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.js +55 -0
- package/dist/serialization/resources/windows/client/requests/ExtractRequest.d.ts +19 -0
- package/dist/serialization/resources/windows/client/requests/ExtractRequest.js +50 -0
- package/dist/serialization/resources/windows/client/requests/FindManyRequest.d.ts +19 -0
- package/dist/serialization/resources/windows/client/requests/FindManyRequest.js +50 -0
- package/dist/serialization/resources/windows/client/requests/FindOneRequest.d.ts +19 -0
- package/dist/serialization/resources/windows/client/requests/FindOneRequest.js +50 -0
- package/dist/serialization/resources/windows/client/requests/LlmRequest.d.ts +17 -0
- package/dist/serialization/resources/windows/client/requests/LlmRequest.js +48 -0
- package/dist/serialization/resources/windows/client/requests/OperatorPromptV1Body.d.ts +17 -0
- package/dist/serialization/resources/windows/client/requests/OperatorPromptV1Body.js +48 -0
- package/dist/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts +20 -0
- package/dist/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js +51 -0
- package/dist/serialization/resources/windows/client/requests/index.d.ts +17 -0
- package/dist/serialization/resources/windows/client/requests/index.js +35 -1
- package/dist/serialization/types/AsyncOperatorPromptResponseEnvelope.d.ts +15 -0
- package/dist/serialization/types/AsyncOperatorPromptResponseEnvelope.js +46 -0
- package/dist/serialization/types/FileEventMessage.d.ts +1 -0
- package/dist/serialization/types/FileEventMessage.js +1 -0
- package/dist/serialization/types/index.d.ts +1 -0
- package/dist/serialization/types/index.js +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/upload.d.ts +13 -0
- package/dist/utils/upload.js +55 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/AirtopClient.js +1 -1
- package/dist/wrapper/AirtopFiles.js +3 -3
- package/dist/wrapper/AirtopSessions.d.ts +24 -0
- package/dist/wrapper/AirtopSessions.js +103 -0
- package/dist/wrapper/AirtopWindows.d.ts +25 -1
- package/dist/wrapper/AirtopWindows.js +23 -1
- package/package.json +1 -1
- package/reference.md +1492 -108
- package/serialization/resources/files/client/requests/PushFileBodyV1.d.ts +12 -0
- package/serialization/resources/files/client/requests/PushFileBodyV1.js +43 -0
- package/serialization/resources/files/client/requests/index.d.ts +1 -0
- package/serialization/resources/files/client/requests/index.js +3 -1
- 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/requests/ActRequest.d.ts +19 -0
- package/serialization/resources/windows/client/requests/ActRequest.js +50 -0
- package/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +20 -0
- package/serialization/resources/windows/client/requests/AsyncClickRequest.js +51 -0
- package/serialization/resources/windows/client/requests/AsyncFileInputRequest.d.ts +22 -0
- package/serialization/resources/windows/client/requests/AsyncFileInputRequest.js +53 -0
- package/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +19 -0
- package/serialization/resources/windows/client/requests/AsyncHoverRequest.js +50 -0
- package/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +19 -0
- package/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +50 -0
- package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +20 -0
- package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +51 -0
- package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +19 -0
- package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +50 -0
- package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +20 -0
- package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +51 -0
- package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +18 -0
- package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +49 -0
- package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +19 -0
- package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +50 -0
- package/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +24 -0
- package/serialization/resources/windows/client/requests/AsyncTypeRequest.js +55 -0
- package/serialization/resources/windows/client/requests/ExtractRequest.d.ts +19 -0
- package/serialization/resources/windows/client/requests/ExtractRequest.js +50 -0
- package/serialization/resources/windows/client/requests/FindManyRequest.d.ts +19 -0
- package/serialization/resources/windows/client/requests/FindManyRequest.js +50 -0
- package/serialization/resources/windows/client/requests/FindOneRequest.d.ts +19 -0
- package/serialization/resources/windows/client/requests/FindOneRequest.js +50 -0
- package/serialization/resources/windows/client/requests/LlmRequest.d.ts +17 -0
- package/serialization/resources/windows/client/requests/LlmRequest.js +48 -0
- package/serialization/resources/windows/client/requests/OperatorPromptV1Body.d.ts +17 -0
- package/serialization/resources/windows/client/requests/OperatorPromptV1Body.js +48 -0
- package/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.d.ts +20 -0
- package/serialization/resources/windows/client/requests/SessionFileInputHandlerRequestBody.js +51 -0
- package/serialization/resources/windows/client/requests/index.d.ts +17 -0
- package/serialization/resources/windows/client/requests/index.js +35 -1
- package/serialization/types/AsyncOperatorPromptResponseEnvelope.d.ts +15 -0
- package/serialization/types/AsyncOperatorPromptResponseEnvelope.js +46 -0
- package/serialization/types/FileEventMessage.d.ts +1 -0
- package/serialization/types/FileEventMessage.js +1 -0
- package/serialization/types/index.d.ts +1 -0
- package/serialization/types/index.js +1 -0
- package/utils/index.d.ts +1 -0
- package/utils/index.js +1 -0
- package/utils/upload.d.ts +13 -0
- package/utils/upload.js +55 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/AirtopClient.js +1 -1
- package/wrapper/AirtopFiles.js +3 -3
- package/wrapper/AirtopSessions.d.ts +24 -0
- package/wrapper/AirtopSessions.js +103 -0
- package/wrapper/AirtopWindows.d.ts +25 -1
- package/wrapper/AirtopWindows.js +23 -1
package/README.md
CHANGED
@@ -23,10 +23,9 @@ Instantiate and use the client with the following:
|
|
23
23
|
import { AirtopClient } from "@airtop/sdk";
|
24
24
|
|
25
25
|
const client = new AirtopClient({ apiKey: "YOUR_API_KEY" });
|
26
|
-
await client.windows.
|
27
|
-
"
|
28
|
-
|
29
|
-
);
|
26
|
+
await client.windows.asyncClick("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
27
|
+
elementDescription: "The login button",
|
28
|
+
});
|
30
29
|
```
|
31
30
|
|
32
31
|
## Request And Response Types
|
@@ -37,7 +36,7 @@ following namespace:
|
|
37
36
|
```typescript
|
38
37
|
import { Airtop } from "@airtop/sdk";
|
39
38
|
|
40
|
-
const request: Airtop.
|
39
|
+
const request: Airtop.AsyncClickRequest = {
|
41
40
|
...
|
42
41
|
};
|
43
42
|
```
|
@@ -51,7 +50,7 @@ will be thrown.
|
|
51
50
|
import { AirtopError } from "@airtop/sdk";
|
52
51
|
|
53
52
|
try {
|
54
|
-
await client.windows.
|
53
|
+
await client.windows.asyncClick(...);
|
55
54
|
} catch (err) {
|
56
55
|
if (err instanceof AirtopError) {
|
57
56
|
console.log(err.statusCode);
|
@@ -68,7 +67,7 @@ try {
|
|
68
67
|
If you would like to send additional headers as part of the request, use the `headers` request option.
|
69
68
|
|
70
69
|
```typescript
|
71
|
-
const response = await client.windows.
|
70
|
+
const response = await client.windows.asyncClick(..., {
|
72
71
|
headers: {
|
73
72
|
'X-Custom-Header': 'custom value'
|
74
73
|
}
|
@@ -90,7 +89,7 @@ A request is deemed retryable when any of the following HTTP status codes is ret
|
|
90
89
|
Use the `maxRetries` request option to configure this behavior.
|
91
90
|
|
92
91
|
```typescript
|
93
|
-
const response = await client.windows.
|
92
|
+
const response = await client.windows.asyncClick(..., {
|
94
93
|
maxRetries: 0 // override maxRetries at the request level
|
95
94
|
});
|
96
95
|
```
|
@@ -100,7 +99,7 @@ const response = await client.windows.asyncCreateAutomation(..., {
|
|
100
99
|
The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
|
101
100
|
|
102
101
|
```typescript
|
103
|
-
const response = await client.windows.
|
102
|
+
const response = await client.windows.asyncClick(..., {
|
104
103
|
timeoutInSeconds: 30 // override timeout to 30s
|
105
104
|
});
|
106
105
|
```
|
@@ -111,7 +110,7 @@ The SDK allows users to abort requests at any point by passing in an abort signa
|
|
111
110
|
|
112
111
|
```typescript
|
113
112
|
const controller = new AbortController();
|
114
|
-
const response = await client.windows.
|
113
|
+
const response = await client.windows.asyncClick(..., {
|
115
114
|
abortSignal: controller.signal
|
116
115
|
});
|
117
116
|
controller.abort(); // aborts the request
|
@@ -73,7 +73,7 @@ class Automations {
|
|
73
73
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
74
74
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, "v1/automations"),
|
75
75
|
method: "GET",
|
76
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
76
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
77
77
|
contentType: "application/json",
|
78
78
|
requestType: "json",
|
79
79
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -135,7 +135,7 @@ class Automations {
|
|
135
135
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
136
136
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, "v1/automations/description"),
|
137
137
|
method: "PUT",
|
138
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
138
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
139
139
|
contentType: "application/json",
|
140
140
|
requestType: "json",
|
141
141
|
body: serializers.UpdateAutomationDescriptionInputBody.jsonOrThrow(request, {
|
@@ -239,7 +239,7 @@ class Automations {
|
|
239
239
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
240
240
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/automations/${encodeURIComponent(automationId)}`),
|
241
241
|
method: "GET",
|
242
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
242
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
243
243
|
contentType: "application/json",
|
244
244
|
requestType: "json",
|
245
245
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -340,7 +340,7 @@ class Automations {
|
|
340
340
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
341
341
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/automations/${encodeURIComponent(automationId)}`),
|
342
342
|
method: "DELETE",
|
343
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
343
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
344
344
|
contentType: "application/json",
|
345
345
|
requestType: "json",
|
346
346
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -65,5 +65,16 @@ export declare class Files {
|
|
65
65
|
* await client.files.delete("id")
|
66
66
|
*/
|
67
67
|
delete(id: string, requestOptions?: Files.RequestOptions): Promise<void>;
|
68
|
+
/**
|
69
|
+
* Push a file to one or more sessions, making it available for the sessions to use
|
70
|
+
*
|
71
|
+
* @param {string} id - ID of the file
|
72
|
+
* @param {Airtop.PushFileBodyV1} request
|
73
|
+
* @param {Files.RequestOptions} requestOptions - Request-specific configuration.
|
74
|
+
*
|
75
|
+
* @example
|
76
|
+
* await client.files.push("id")
|
77
|
+
*/
|
78
|
+
push(id: string, request?: Airtop.PushFileBodyV1, requestOptions?: Files.RequestOptions): Promise<void>;
|
68
79
|
protected _getAuthorizationHeader(): Promise<string>;
|
69
80
|
}
|
@@ -92,7 +92,7 @@ class Files {
|
|
92
92
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
93
93
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, "v1/files"),
|
94
94
|
method: "GET",
|
95
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
95
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
96
96
|
contentType: "application/json",
|
97
97
|
queryParameters: _queryParams,
|
98
98
|
requestType: "json",
|
@@ -145,7 +145,7 @@ class Files {
|
|
145
145
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
146
146
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, "v1/files"),
|
147
147
|
method: "POST",
|
148
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
148
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
149
149
|
contentType: "application/json",
|
150
150
|
requestType: "json",
|
151
151
|
body: serializers.CreateFileRestInputV1.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -196,7 +196,7 @@ class Files {
|
|
196
196
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
197
197
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/files/${encodeURIComponent(id)}`),
|
198
198
|
method: "GET",
|
199
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
199
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
200
200
|
contentType: "application/json",
|
201
201
|
requestType: "json",
|
202
202
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -246,7 +246,7 @@ class Files {
|
|
246
246
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
247
247
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/files/${encodeURIComponent(id)}`),
|
248
248
|
method: "DELETE",
|
249
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
249
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
250
250
|
contentType: "application/json",
|
251
251
|
requestType: "json",
|
252
252
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -277,6 +277,54 @@ class Files {
|
|
277
277
|
}
|
278
278
|
});
|
279
279
|
}
|
280
|
+
/**
|
281
|
+
* Push a file to one or more sessions, making it available for the sessions to use
|
282
|
+
*
|
283
|
+
* @param {string} id - ID of the file
|
284
|
+
* @param {Airtop.PushFileBodyV1} request
|
285
|
+
* @param {Files.RequestOptions} requestOptions - Request-specific configuration.
|
286
|
+
*
|
287
|
+
* @example
|
288
|
+
* await client.files.push("id")
|
289
|
+
*/
|
290
|
+
push(id_1) {
|
291
|
+
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
292
|
+
var _a, _b, _c;
|
293
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
294
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/files/${encodeURIComponent(id)}/push`),
|
295
|
+
method: "POST",
|
296
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
297
|
+
contentType: "application/json",
|
298
|
+
requestType: "json",
|
299
|
+
body: serializers.PushFileBodyV1.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
300
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
301
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
302
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
303
|
+
});
|
304
|
+
if (_response.ok) {
|
305
|
+
return;
|
306
|
+
}
|
307
|
+
if (_response.error.reason === "status-code") {
|
308
|
+
throw new errors.AirtopError({
|
309
|
+
statusCode: _response.error.statusCode,
|
310
|
+
body: _response.error.body,
|
311
|
+
});
|
312
|
+
}
|
313
|
+
switch (_response.error.reason) {
|
314
|
+
case "non-json":
|
315
|
+
throw new errors.AirtopError({
|
316
|
+
statusCode: _response.error.statusCode,
|
317
|
+
body: _response.error.rawBody,
|
318
|
+
});
|
319
|
+
case "timeout":
|
320
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/files/{id}/push.");
|
321
|
+
case "unknown":
|
322
|
+
throw new errors.AirtopError({
|
323
|
+
message: _response.error.errorMessage,
|
324
|
+
});
|
325
|
+
}
|
326
|
+
});
|
327
|
+
}
|
280
328
|
_getAuthorizationHeader() {
|
281
329
|
return __awaiter(this, void 0, void 0, function* () {
|
282
330
|
return `Bearer ${yield core.Supplier.get(this._options.apiKey)}`;
|
@@ -90,7 +90,7 @@ class Profiles {
|
|
90
90
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
91
91
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, "v1/profiles"),
|
92
92
|
method: "DELETE",
|
93
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
93
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
94
94
|
contentType: "application/json",
|
95
95
|
queryParameters: _queryParams,
|
96
96
|
requestType: "json",
|
@@ -71,7 +71,7 @@ class Requests {
|
|
71
71
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
72
72
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/requests/${encodeURIComponent(requestId)}/status`),
|
73
73
|
method: "GET",
|
74
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
74
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
75
75
|
contentType: "application/json",
|
76
76
|
requestType: "json",
|
77
77
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -102,7 +102,7 @@ class Sessions {
|
|
102
102
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
103
103
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, "v1/sessions"),
|
104
104
|
method: "GET",
|
105
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
105
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
106
106
|
contentType: "application/json",
|
107
107
|
queryParameters: _queryParams,
|
108
108
|
requestType: "json",
|
@@ -180,7 +180,7 @@ class Sessions {
|
|
180
180
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
181
181
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, "v1/sessions"),
|
182
182
|
method: "POST",
|
183
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
183
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
184
184
|
contentType: "application/json",
|
185
185
|
requestType: "json",
|
186
186
|
body: serializers.SessionRestInputV1.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -237,7 +237,7 @@ class Sessions {
|
|
237
237
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
238
238
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(id)}`),
|
239
239
|
method: "GET",
|
240
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
240
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
241
241
|
contentType: "application/json",
|
242
242
|
requestType: "json",
|
243
243
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -316,7 +316,7 @@ class Sessions {
|
|
316
316
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
317
317
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(id)}`),
|
318
318
|
method: "DELETE",
|
319
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
319
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
320
320
|
contentType: "application/json",
|
321
321
|
requestType: "json",
|
322
322
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -364,7 +364,7 @@ class Sessions {
|
|
364
364
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
365
365
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(id)}/events`),
|
366
366
|
method: "GET",
|
367
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
367
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
368
368
|
contentType: "application/json",
|
369
369
|
queryParameters: _queryParams,
|
370
370
|
requestType: "json",
|
@@ -454,7 +454,7 @@ class Sessions {
|
|
454
454
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
455
455
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `v1/sessions/${encodeURIComponent(sessionId)}/save-profile-on-termination/${encodeURIComponent(profileName)}`),
|
456
456
|
method: "PUT",
|
457
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
457
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.41-beta0", "User-Agent": "@airtop/sdk/0.1.41-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
458
458
|
contentType: "application/json",
|
459
459
|
requestType: "json",
|
460
460
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -5,8 +5,11 @@ import * as Airtop from "../../../index";
|
|
5
5
|
/**
|
6
6
|
* Each oneOf object in the array represents one possible Server Sent Events (SSE) message, serialized as UTF-8 text according to the SSE specification.
|
7
7
|
*/
|
8
|
-
export type SessionsEventsResponse = Airtop.SessionsEventsResponse.
|
8
|
+
export type SessionsEventsResponse = Airtop.SessionsEventsResponse.CaptchaEvent | Airtop.SessionsEventsResponse.Status | Airtop.SessionsEventsResponse.Error_ | Airtop.SessionsEventsResponse.WindowEvent | Airtop.SessionsEventsResponse.SessionEvent | Airtop.SessionsEventsResponse.FileEvent;
|
9
9
|
export declare namespace SessionsEventsResponse {
|
10
|
+
interface CaptchaEvent extends Airtop.SessionsEventsResponseCaptchaEvent {
|
11
|
+
event: "captchaEvent";
|
12
|
+
}
|
10
13
|
interface Status extends Airtop.SessionsEventsResponseStatus {
|
11
14
|
event: "status";
|
12
15
|
}
|
@@ -22,7 +25,4 @@ export declare namespace SessionsEventsResponse {
|
|
22
25
|
interface FileEvent extends Airtop.SessionsEventsResponseFileEvent {
|
23
26
|
event: "fileEvent";
|
24
27
|
}
|
25
|
-
interface CaptchaEvent extends Airtop.SessionsEventsResponseCaptchaEvent {
|
26
|
-
event: "captchaEvent";
|
27
|
-
}
|
28
28
|
}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
export * from "./SessionsListRequestStatus";
|
2
|
+
export * from "./SessionsEventsResponseCaptchaEvent";
|
2
3
|
export * from "./SessionsEventsResponseStatus";
|
3
4
|
export * from "./SessionsEventsResponseError";
|
4
5
|
export * from "./SessionsEventsResponseWindowEvent";
|
5
6
|
export * from "./SessionsEventsResponseSessionEvent";
|
6
7
|
export * from "./SessionsEventsResponseFileEvent";
|
7
|
-
export * from "./SessionsEventsResponseCaptchaEvent";
|
8
8
|
export * from "./SessionsEventsResponse";
|
@@ -15,10 +15,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
17
|
__exportStar(require("./SessionsListRequestStatus"), exports);
|
18
|
+
__exportStar(require("./SessionsEventsResponseCaptchaEvent"), exports);
|
18
19
|
__exportStar(require("./SessionsEventsResponseStatus"), exports);
|
19
20
|
__exportStar(require("./SessionsEventsResponseError"), exports);
|
20
21
|
__exportStar(require("./SessionsEventsResponseWindowEvent"), exports);
|
21
22
|
__exportStar(require("./SessionsEventsResponseSessionEvent"), exports);
|
22
23
|
__exportStar(require("./SessionsEventsResponseFileEvent"), exports);
|
23
|
-
__exportStar(require("./SessionsEventsResponseCaptchaEvent"), exports);
|
24
24
|
__exportStar(require("./SessionsEventsResponse"), exports);
|