@airtop/sdk 0.1.38-beta0 → 0.1.39
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 +10 -9
- package/api/errors/index.d.ts +2 -2
- package/api/errors/index.js +2 -2
- package/api/resources/automations/client/Client.js +12 -12
- package/api/resources/files/client/Client.js +12 -12
- package/api/resources/profiles/client/Client.js +3 -3
- package/api/resources/requests/client/Client.js +3 -3
- package/api/resources/sessions/client/Client.js +18 -18
- package/api/resources/sessions/types/SessionsEventsResponse.d.ts +7 -7
- package/api/resources/sessions/types/index.d.ts +2 -2
- package/api/resources/sessions/types/index.js +2 -2
- package/api/resources/windows/client/Client.d.ts +0 -126
- package/api/resources/windows/client/Client.js +63 -619
- package/api/resources/windows/client/requests/index.d.ts +0 -10
- package/api/types/RequestStatusResponse.d.ts +2 -0
- package/api/types/SessionConfigV1.d.ts +0 -2
- package/api/types/index.d.ts +0 -1
- package/api/types/index.js +0 -1
- package/dist/api/errors/index.d.ts +2 -2
- package/dist/api/errors/index.js +2 -2
- package/dist/api/resources/automations/client/Client.js +12 -12
- package/dist/api/resources/files/client/Client.js +12 -12
- package/dist/api/resources/profiles/client/Client.js +3 -3
- package/dist/api/resources/requests/client/Client.js +3 -3
- package/dist/api/resources/sessions/client/Client.js +18 -18
- package/dist/api/resources/sessions/types/SessionsEventsResponse.d.ts +7 -7
- package/dist/api/resources/sessions/types/index.d.ts +2 -2
- package/dist/api/resources/sessions/types/index.js +2 -2
- package/dist/api/resources/windows/client/Client.d.ts +0 -126
- package/dist/api/resources/windows/client/Client.js +63 -619
- package/dist/api/resources/windows/client/requests/index.d.ts +0 -10
- package/dist/api/types/RequestStatusResponse.d.ts +2 -0
- package/dist/api/types/SessionConfigV1.d.ts +0 -2
- package/dist/api/types/index.d.ts +0 -1
- package/dist/api/types/index.js +0 -1
- package/dist/environments.d.ts +1 -1
- package/dist/environments.js +1 -1
- package/dist/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +9 -9
- package/dist/serialization/resources/sessions/types/SessionsEventsResponse.js +4 -4
- package/dist/serialization/resources/sessions/types/index.d.ts +2 -2
- package/dist/serialization/resources/sessions/types/index.js +2 -2
- package/dist/serialization/resources/windows/client/requests/index.d.ts +0 -10
- package/dist/serialization/resources/windows/client/requests/index.js +1 -21
- package/dist/serialization/types/RequestStatusResponse.d.ts +1 -0
- package/dist/serialization/types/RequestStatusResponse.js +1 -0
- package/dist/serialization/types/SessionConfigV1.d.ts +0 -1
- package/dist/serialization/types/SessionConfigV1.js +0 -1
- package/dist/serialization/types/index.d.ts +0 -1
- package/dist/serialization/types/index.js +0 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/environments.d.ts +1 -1
- package/environments.js +1 -1
- package/package.json +1 -1
- package/reference.md +24 -766
- package/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +9 -9
- package/serialization/resources/sessions/types/SessionsEventsResponse.js +4 -4
- package/serialization/resources/sessions/types/index.d.ts +2 -2
- package/serialization/resources/sessions/types/index.js +2 -2
- package/serialization/resources/windows/client/requests/index.d.ts +0 -10
- package/serialization/resources/windows/client/requests/index.js +1 -21
- package/serialization/types/RequestStatusResponse.d.ts +1 -0
- package/serialization/types/RequestStatusResponse.js +1 -0
- package/serialization/types/SessionConfigV1.d.ts +0 -1
- package/serialization/types/SessionConfigV1.js +0 -1
- package/serialization/types/index.d.ts +0 -1
- package/serialization/types/index.js +0 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -29
- package/api/resources/windows/client/requests/AsyncClickRequest.js +0 -5
- package/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -27
- package/api/resources/windows/client/requests/AsyncHoverRequest.js +0 -5
- package/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -27
- package/api/resources/windows/client/requests/AsyncMonitorRequest.js +0 -5
- package/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -29
- package/api/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -5
- package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -27
- package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -5
- package/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -29
- package/api/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -5
- package/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -23
- package/api/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -5
- package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -25
- package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -5
- package/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -37
- package/api/resources/windows/client/requests/AsyncTypeRequest.js +0 -5
- package/api/resources/windows/client/requests/OperatorPromptV1Body.d.ts +0 -25
- package/api/resources/windows/client/requests/OperatorPromptV1Body.js +0 -5
- package/api/types/AsyncOperatorPromptResponseEnvelope.d.ts +0 -9
- package/api/types/AsyncOperatorPromptResponseEnvelope.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -29
- package/dist/api/resources/windows/client/requests/AsyncClickRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -27
- package/dist/api/resources/windows/client/requests/AsyncHoverRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -27
- package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -29
- package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -27
- package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -29
- package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -23
- package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -25
- package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -37
- package/dist/api/resources/windows/client/requests/AsyncTypeRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/OperatorPromptV1Body.d.ts +0 -25
- package/dist/api/resources/windows/client/requests/OperatorPromptV1Body.js +0 -5
- package/dist/api/types/AsyncOperatorPromptResponseEnvelope.d.ts +0 -9
- package/dist/api/types/AsyncOperatorPromptResponseEnvelope.js +0 -5
- package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -20
- package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.js +0 -51
- package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -19
- package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.js +0 -50
- package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -19
- package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +0 -50
- package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -20
- package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -51
- package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -19
- package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -50
- package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -20
- package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -51
- package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -18
- package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -49
- package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -19
- package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -50
- package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -24
- package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.js +0 -55
- package/dist/serialization/resources/windows/client/requests/OperatorPromptV1Body.d.ts +0 -17
- package/dist/serialization/resources/windows/client/requests/OperatorPromptV1Body.js +0 -48
- package/dist/serialization/types/AsyncOperatorPromptResponseEnvelope.d.ts +0 -15
- package/dist/serialization/types/AsyncOperatorPromptResponseEnvelope.js +0 -46
- package/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -20
- package/serialization/resources/windows/client/requests/AsyncClickRequest.js +0 -51
- package/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -19
- package/serialization/resources/windows/client/requests/AsyncHoverRequest.js +0 -50
- package/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -19
- package/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +0 -50
- package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -20
- package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -51
- package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -19
- package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -50
- package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -20
- package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -51
- package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +0 -18
- package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -49
- package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -19
- package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -50
- package/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -24
- package/serialization/resources/windows/client/requests/AsyncTypeRequest.js +0 -55
- package/serialization/resources/windows/client/requests/OperatorPromptV1Body.d.ts +0 -17
- package/serialization/resources/windows/client/requests/OperatorPromptV1Body.js +0 -48
- package/serialization/types/AsyncOperatorPromptResponseEnvelope.d.ts +0 -15
- package/serialization/types/AsyncOperatorPromptResponseEnvelope.js +0 -46
package/README.md
CHANGED
@@ -23,9 +23,10 @@ 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
|
-
|
26
|
+
await client.windows.asyncCreateAutomation(
|
27
|
+
"6aac6f73-bd89-4a76-ab32-5a6c422e8b0b",
|
28
|
+
"0334da2a-91b0-42c5-6156-76a5eba87430",
|
29
|
+
);
|
29
30
|
```
|
30
31
|
|
31
32
|
## Request And Response Types
|
@@ -36,7 +37,7 @@ following namespace:
|
|
36
37
|
```typescript
|
37
38
|
import { Airtop } from "@airtop/sdk";
|
38
39
|
|
39
|
-
const request: Airtop.
|
40
|
+
const request: Airtop.AsyncCreateAutomationRequest = {
|
40
41
|
...
|
41
42
|
};
|
42
43
|
```
|
@@ -50,7 +51,7 @@ will be thrown.
|
|
50
51
|
import { AirtopError } from "@airtop/sdk";
|
51
52
|
|
52
53
|
try {
|
53
|
-
await client.windows.
|
54
|
+
await client.windows.asyncCreateAutomation(...);
|
54
55
|
} catch (err) {
|
55
56
|
if (err instanceof AirtopError) {
|
56
57
|
console.log(err.statusCode);
|
@@ -67,7 +68,7 @@ try {
|
|
67
68
|
If you would like to send additional headers as part of the request, use the `headers` request option.
|
68
69
|
|
69
70
|
```typescript
|
70
|
-
const response = await client.windows.
|
71
|
+
const response = await client.windows.asyncCreateAutomation(..., {
|
71
72
|
headers: {
|
72
73
|
'X-Custom-Header': 'custom value'
|
73
74
|
}
|
@@ -89,7 +90,7 @@ A request is deemed retryable when any of the following HTTP status codes is ret
|
|
89
90
|
Use the `maxRetries` request option to configure this behavior.
|
90
91
|
|
91
92
|
```typescript
|
92
|
-
const response = await client.windows.
|
93
|
+
const response = await client.windows.asyncCreateAutomation(..., {
|
93
94
|
maxRetries: 0 // override maxRetries at the request level
|
94
95
|
});
|
95
96
|
```
|
@@ -99,7 +100,7 @@ const response = await client.windows.asyncClick(..., {
|
|
99
100
|
The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
|
100
101
|
|
101
102
|
```typescript
|
102
|
-
const response = await client.windows.
|
103
|
+
const response = await client.windows.asyncCreateAutomation(..., {
|
103
104
|
timeoutInSeconds: 30 // override timeout to 30s
|
104
105
|
});
|
105
106
|
```
|
@@ -110,7 +111,7 @@ The SDK allows users to abort requests at any point by passing in an abort signa
|
|
110
111
|
|
111
112
|
```typescript
|
112
113
|
const controller = new AbortController();
|
113
|
-
const response = await client.windows.
|
114
|
+
const response = await client.windows.asyncCreateAutomation(..., {
|
114
115
|
abortSignal: controller.signal
|
115
116
|
});
|
116
117
|
controller.abort(); // aborts the request
|
package/api/errors/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
+
export * from "./UnauthorizedError";
|
2
|
+
export * from "./ForbiddenError";
|
1
3
|
export * from "./NotFoundError";
|
2
4
|
export * from "./UnprocessableEntityError";
|
3
5
|
export * from "./InternalServerError";
|
4
|
-
export * from "./UnauthorizedError";
|
5
|
-
export * from "./ForbiddenError";
|
package/api/errors/index.js
CHANGED
@@ -14,8 +14,8 @@ 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("./UnauthorizedError"), exports);
|
18
|
+
__exportStar(require("./ForbiddenError"), exports);
|
17
19
|
__exportStar(require("./NotFoundError"), exports);
|
18
20
|
__exportStar(require("./UnprocessableEntityError"), exports);
|
19
21
|
__exportStar(require("./InternalServerError"), exports);
|
20
|
-
__exportStar(require("./UnauthorizedError"), exports);
|
21
|
-
__exportStar(require("./ForbiddenError"), exports);
|
@@ -71,9 +71,9 @@ class Automations {
|
|
71
71
|
return __awaiter(this, void 0, void 0, function* () {
|
72
72
|
var _a, _b, _c;
|
73
73
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, "automations"),
|
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.39", "User-Agent": "@airtop/sdk/0.1.39", "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,
|
@@ -102,7 +102,7 @@ class Automations {
|
|
102
102
|
body: _response.error.rawBody,
|
103
103
|
});
|
104
104
|
case "timeout":
|
105
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling GET /automations.");
|
105
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling GET /v1/automations.");
|
106
106
|
case "unknown":
|
107
107
|
throw new errors.AirtopError({
|
108
108
|
message: _response.error.errorMessage,
|
@@ -133,9 +133,9 @@ class Automations {
|
|
133
133
|
return __awaiter(this, void 0, void 0, function* () {
|
134
134
|
var _a, _b, _c;
|
135
135
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, "automations/description"),
|
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.39", "User-Agent": "@airtop/sdk/0.1.39", "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, {
|
@@ -210,7 +210,7 @@ class Automations {
|
|
210
210
|
body: _response.error.rawBody,
|
211
211
|
});
|
212
212
|
case "timeout":
|
213
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling PUT /automations/description.");
|
213
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling PUT /v1/automations/description.");
|
214
214
|
case "unknown":
|
215
215
|
throw new errors.AirtopError({
|
216
216
|
message: _response.error.errorMessage,
|
@@ -237,9 +237,9 @@ class Automations {
|
|
237
237
|
return __awaiter(this, void 0, void 0, function* () {
|
238
238
|
var _a, _b, _c;
|
239
239
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `automations/${encodeURIComponent(automationId)}`),
|
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.39", "User-Agent": "@airtop/sdk/0.1.39", "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,
|
@@ -311,7 +311,7 @@ class Automations {
|
|
311
311
|
body: _response.error.rawBody,
|
312
312
|
});
|
313
313
|
case "timeout":
|
314
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling GET /automations/{automationId}.");
|
314
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling GET /v1/automations/{automationId}.");
|
315
315
|
case "unknown":
|
316
316
|
throw new errors.AirtopError({
|
317
317
|
message: _response.error.errorMessage,
|
@@ -338,9 +338,9 @@ class Automations {
|
|
338
338
|
return __awaiter(this, void 0, void 0, function* () {
|
339
339
|
var _a, _b, _c;
|
340
340
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `automations/${encodeURIComponent(automationId)}`),
|
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.39", "User-Agent": "@airtop/sdk/0.1.39", "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,
|
@@ -412,7 +412,7 @@ class Automations {
|
|
412
412
|
body: _response.error.rawBody,
|
413
413
|
});
|
414
414
|
case "timeout":
|
415
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling DELETE /automations/{automationId}.");
|
415
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling DELETE /v1/automations/{automationId}.");
|
416
416
|
case "unknown":
|
417
417
|
throw new errors.AirtopError({
|
418
418
|
message: _response.error.errorMessage,
|
@@ -90,9 +90,9 @@ class Files {
|
|
90
90
|
_queryParams["limit"] = limit.toString();
|
91
91
|
}
|
92
92
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, "files"),
|
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.39", "User-Agent": "@airtop/sdk/0.1.39", "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",
|
@@ -122,7 +122,7 @@ class Files {
|
|
122
122
|
body: _response.error.rawBody,
|
123
123
|
});
|
124
124
|
case "timeout":
|
125
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling GET /files.");
|
125
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling GET /v1/files.");
|
126
126
|
case "unknown":
|
127
127
|
throw new errors.AirtopError({
|
128
128
|
message: _response.error.errorMessage,
|
@@ -143,9 +143,9 @@ class Files {
|
|
143
143
|
return __awaiter(this, void 0, void 0, function* () {
|
144
144
|
var _a, _b, _c;
|
145
145
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, "files"),
|
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.39", "User-Agent": "@airtop/sdk/0.1.39", "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" }),
|
@@ -175,7 +175,7 @@ class Files {
|
|
175
175
|
body: _response.error.rawBody,
|
176
176
|
});
|
177
177
|
case "timeout":
|
178
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /files.");
|
178
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/files.");
|
179
179
|
case "unknown":
|
180
180
|
throw new errors.AirtopError({
|
181
181
|
message: _response.error.errorMessage,
|
@@ -194,9 +194,9 @@ class Files {
|
|
194
194
|
return __awaiter(this, void 0, void 0, function* () {
|
195
195
|
var _a, _b, _c;
|
196
196
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `files/${encodeURIComponent(id)}`),
|
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.39", "User-Agent": "@airtop/sdk/0.1.39", "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,
|
@@ -225,7 +225,7 @@ class Files {
|
|
225
225
|
body: _response.error.rawBody,
|
226
226
|
});
|
227
227
|
case "timeout":
|
228
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling GET /files/{id}.");
|
228
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling GET /v1/files/{id}.");
|
229
229
|
case "unknown":
|
230
230
|
throw new errors.AirtopError({
|
231
231
|
message: _response.error.errorMessage,
|
@@ -244,9 +244,9 @@ class Files {
|
|
244
244
|
return __awaiter(this, void 0, void 0, function* () {
|
245
245
|
var _a, _b, _c;
|
246
246
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `files/${encodeURIComponent(id)}`),
|
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.39", "User-Agent": "@airtop/sdk/0.1.39", "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,
|
@@ -269,7 +269,7 @@ class Files {
|
|
269
269
|
body: _response.error.rawBody,
|
270
270
|
});
|
271
271
|
case "timeout":
|
272
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling DELETE /files/{id}.");
|
272
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling DELETE /v1/files/{id}.");
|
273
273
|
case "unknown":
|
274
274
|
throw new errors.AirtopError({
|
275
275
|
message: _response.error.errorMessage,
|
@@ -88,9 +88,9 @@ class Profiles {
|
|
88
88
|
}
|
89
89
|
}
|
90
90
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, "profiles"),
|
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.39", "User-Agent": "@airtop/sdk/0.1.39", "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",
|
@@ -114,7 +114,7 @@ class Profiles {
|
|
114
114
|
body: _response.error.rawBody,
|
115
115
|
});
|
116
116
|
case "timeout":
|
117
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling DELETE /profiles.");
|
117
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling DELETE /v1/profiles.");
|
118
118
|
case "unknown":
|
119
119
|
throw new errors.AirtopError({
|
120
120
|
message: _response.error.errorMessage,
|
@@ -69,9 +69,9 @@ class Requests {
|
|
69
69
|
return __awaiter(this, void 0, void 0, function* () {
|
70
70
|
var _a, _b, _c;
|
71
71
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `requests/${encodeURIComponent(requestId)}/status`),
|
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.39", "User-Agent": "@airtop/sdk/0.1.39", "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,
|
@@ -100,7 +100,7 @@ class Requests {
|
|
100
100
|
body: _response.error.rawBody,
|
101
101
|
});
|
102
102
|
case "timeout":
|
103
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling GET /requests/{requestId}/status.");
|
103
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling GET /v1/requests/{requestId}/status.");
|
104
104
|
case "unknown":
|
105
105
|
throw new errors.AirtopError({
|
106
106
|
message: _response.error.errorMessage,
|
@@ -100,9 +100,9 @@ class Sessions {
|
|
100
100
|
_queryParams["limit"] = limit.toString();
|
101
101
|
}
|
102
102
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, "sessions"),
|
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.39", "User-Agent": "@airtop/sdk/0.1.39", "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",
|
@@ -159,7 +159,7 @@ class Sessions {
|
|
159
159
|
body: _response.error.rawBody,
|
160
160
|
});
|
161
161
|
case "timeout":
|
162
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling GET /sessions.");
|
162
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling GET /v1/sessions.");
|
163
163
|
case "unknown":
|
164
164
|
throw new errors.AirtopError({
|
165
165
|
message: _response.error.errorMessage,
|
@@ -178,9 +178,9 @@ class Sessions {
|
|
178
178
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
179
179
|
var _a, _b, _c;
|
180
180
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, "sessions"),
|
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.39", "User-Agent": "@airtop/sdk/0.1.39", "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" }),
|
@@ -210,7 +210,7 @@ class Sessions {
|
|
210
210
|
body: _response.error.rawBody,
|
211
211
|
});
|
212
212
|
case "timeout":
|
213
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions.");
|
213
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/sessions.");
|
214
214
|
case "unknown":
|
215
215
|
throw new errors.AirtopError({
|
216
216
|
message: _response.error.errorMessage,
|
@@ -235,9 +235,9 @@ class Sessions {
|
|
235
235
|
return __awaiter(this, void 0, void 0, function* () {
|
236
236
|
var _a, _b, _c;
|
237
237
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `sessions/${encodeURIComponent(id)}`),
|
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.39", "User-Agent": "@airtop/sdk/0.1.39", "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,
|
@@ -293,7 +293,7 @@ class Sessions {
|
|
293
293
|
body: _response.error.rawBody,
|
294
294
|
});
|
295
295
|
case "timeout":
|
296
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling GET /sessions/{id}.");
|
296
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling GET /v1/sessions/{id}.");
|
297
297
|
case "unknown":
|
298
298
|
throw new errors.AirtopError({
|
299
299
|
message: _response.error.errorMessage,
|
@@ -314,9 +314,9 @@ class Sessions {
|
|
314
314
|
return __awaiter(this, void 0, void 0, function* () {
|
315
315
|
var _a, _b, _c;
|
316
316
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `sessions/${encodeURIComponent(id)}`),
|
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.39", "User-Agent": "@airtop/sdk/0.1.39", "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,
|
@@ -339,7 +339,7 @@ class Sessions {
|
|
339
339
|
body: _response.error.rawBody,
|
340
340
|
});
|
341
341
|
case "timeout":
|
342
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling DELETE /sessions/{id}.");
|
342
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling DELETE /v1/sessions/{id}.");
|
343
343
|
case "unknown":
|
344
344
|
throw new errors.AirtopError({
|
345
345
|
message: _response.error.errorMessage,
|
@@ -362,9 +362,9 @@ class Sessions {
|
|
362
362
|
_queryParams["all"] = all.toString();
|
363
363
|
}
|
364
364
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `sessions/${encodeURIComponent(id)}/events`),
|
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.39", "User-Agent": "@airtop/sdk/0.1.39", "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",
|
@@ -432,7 +432,7 @@ class Sessions {
|
|
432
432
|
body: _response.error.rawBody,
|
433
433
|
});
|
434
434
|
case "timeout":
|
435
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling GET /sessions/{id}/events.");
|
435
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling GET /v1/sessions/{id}/events.");
|
436
436
|
case "unknown":
|
437
437
|
throw new errors.AirtopError({
|
438
438
|
message: _response.error.errorMessage,
|
@@ -452,9 +452,9 @@ class Sessions {
|
|
452
452
|
return __awaiter(this, void 0, void 0, function* () {
|
453
453
|
var _a, _b, _c;
|
454
454
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `sessions/${encodeURIComponent(sessionId)}/save-profile-on-termination/${encodeURIComponent(profileName)}`),
|
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.39", "User-Agent": "@airtop/sdk/0.1.39", "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,
|
@@ -477,7 +477,7 @@ class Sessions {
|
|
477
477
|
body: _response.error.rawBody,
|
478
478
|
});
|
479
479
|
case "timeout":
|
480
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling PUT /sessions/{sessionId}/save-profile-on-termination/{profileName}.");
|
480
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling PUT /v1/sessions/{sessionId}/save-profile-on-termination/{profileName}.");
|
481
481
|
case "unknown":
|
482
482
|
throw new errors.AirtopError({
|
483
483
|
message: _response.error.errorMessage,
|
@@ -5,14 +5,8 @@ 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.SessionEvent | Airtop.SessionsEventsResponse.FileEvent | Airtop.SessionsEventsResponse.CaptchaEvent | Airtop.SessionsEventsResponse.Status | Airtop.SessionsEventsResponse.Error_ | Airtop.SessionsEventsResponse.WindowEvent;
|
9
9
|
export declare namespace SessionsEventsResponse {
|
10
|
-
interface Error_ extends Airtop.SessionsEventsResponseError {
|
11
|
-
event: "error";
|
12
|
-
}
|
13
|
-
interface WindowEvent extends Airtop.SessionsEventsResponseWindowEvent {
|
14
|
-
event: "windowEvent";
|
15
|
-
}
|
16
10
|
interface SessionEvent extends Airtop.SessionsEventsResponseSessionEvent {
|
17
11
|
event: "sessionEvent";
|
18
12
|
}
|
@@ -25,4 +19,10 @@ export declare namespace SessionsEventsResponse {
|
|
25
19
|
interface Status extends Airtop.SessionsEventsResponseStatus {
|
26
20
|
event: "status";
|
27
21
|
}
|
22
|
+
interface Error_ extends Airtop.SessionsEventsResponseError {
|
23
|
+
event: "error";
|
24
|
+
}
|
25
|
+
interface WindowEvent extends Airtop.SessionsEventsResponseWindowEvent {
|
26
|
+
event: "windowEvent";
|
27
|
+
}
|
28
28
|
}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
export * from "./SessionsListRequestStatus";
|
2
|
-
export * from "./SessionsEventsResponseError";
|
3
|
-
export * from "./SessionsEventsResponseWindowEvent";
|
4
2
|
export * from "./SessionsEventsResponseSessionEvent";
|
5
3
|
export * from "./SessionsEventsResponseFileEvent";
|
6
4
|
export * from "./SessionsEventsResponseCaptchaEvent";
|
7
5
|
export * from "./SessionsEventsResponseStatus";
|
6
|
+
export * from "./SessionsEventsResponseError";
|
7
|
+
export * from "./SessionsEventsResponseWindowEvent";
|
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("./SessionsEventsResponseError"), exports);
|
19
|
-
__exportStar(require("./SessionsEventsResponseWindowEvent"), exports);
|
20
18
|
__exportStar(require("./SessionsEventsResponseSessionEvent"), exports);
|
21
19
|
__exportStar(require("./SessionsEventsResponseFileEvent"), exports);
|
22
20
|
__exportStar(require("./SessionsEventsResponseCaptchaEvent"), exports);
|
23
21
|
__exportStar(require("./SessionsEventsResponseStatus"), exports);
|
22
|
+
__exportStar(require("./SessionsEventsResponseError"), exports);
|
23
|
+
__exportStar(require("./SessionsEventsResponseWindowEvent"), exports);
|
24
24
|
__exportStar(require("./SessionsEventsResponse"), exports);
|