@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
@@ -58,63 +58,6 @@ class Windows {
|
|
58
58
|
constructor(_options) {
|
59
59
|
this._options = _options;
|
60
60
|
}
|
61
|
-
/**
|
62
|
-
* Execute a click interaction in a specific browser window asynchronously
|
63
|
-
*
|
64
|
-
* @param {string} sessionId - The session id for the window.
|
65
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
66
|
-
* @param {Airtop.AsyncClickRequest} request
|
67
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
68
|
-
*
|
69
|
-
* @example
|
70
|
-
* await client.windows.asyncClick("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
71
|
-
* elementDescription: "The login button"
|
72
|
-
* })
|
73
|
-
*/
|
74
|
-
asyncClick(sessionId, windowId, request, requestOptions) {
|
75
|
-
return __awaiter(this, void 0, void 0, function* () {
|
76
|
-
var _a, _b, _c;
|
77
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
78
|
-
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, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/click`),
|
79
|
-
method: "POST",
|
80
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.38-beta0", "User-Agent": "@airtop/sdk/0.1.38-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
81
|
-
contentType: "application/json",
|
82
|
-
requestType: "json",
|
83
|
-
body: serializers.AsyncClickRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
84
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
85
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
86
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
87
|
-
});
|
88
|
-
if (_response.ok) {
|
89
|
-
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
90
|
-
unrecognizedObjectKeys: "passthrough",
|
91
|
-
allowUnrecognizedUnionMembers: true,
|
92
|
-
allowUnrecognizedEnumValues: true,
|
93
|
-
skipValidation: true,
|
94
|
-
breadcrumbsPrefix: ["response"],
|
95
|
-
});
|
96
|
-
}
|
97
|
-
if (_response.error.reason === "status-code") {
|
98
|
-
throw new errors.AirtopError({
|
99
|
-
statusCode: _response.error.statusCode,
|
100
|
-
body: _response.error.body,
|
101
|
-
});
|
102
|
-
}
|
103
|
-
switch (_response.error.reason) {
|
104
|
-
case "non-json":
|
105
|
-
throw new errors.AirtopError({
|
106
|
-
statusCode: _response.error.statusCode,
|
107
|
-
body: _response.error.rawBody,
|
108
|
-
});
|
109
|
-
case "timeout":
|
110
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/click.");
|
111
|
-
case "unknown":
|
112
|
-
throw new errors.AirtopError({
|
113
|
-
message: _response.error.errorMessage,
|
114
|
-
});
|
115
|
-
}
|
116
|
-
});
|
117
|
-
}
|
118
61
|
/**
|
119
62
|
* Create an automation of a browser window asynchronously
|
120
63
|
*
|
@@ -130,9 +73,9 @@ class Windows {
|
|
130
73
|
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
131
74
|
var _a, _b, _c;
|
132
75
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
133
|
-
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, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/create-automation`),
|
76
|
+
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/async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/create-automation`),
|
134
77
|
method: "POST",
|
135
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
78
|
+
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),
|
136
79
|
contentType: "application/json",
|
137
80
|
requestType: "json",
|
138
81
|
body: serializers.AsyncCreateAutomationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -162,7 +105,7 @@ class Windows {
|
|
162
105
|
body: _response.error.rawBody,
|
163
106
|
});
|
164
107
|
case "timeout":
|
165
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/create-automation.");
|
108
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/async/sessions/{sessionId}/windows/{windowId}/create-automation.");
|
166
109
|
case "unknown":
|
167
110
|
throw new errors.AirtopError({
|
168
111
|
message: _response.error.errorMessage,
|
@@ -185,9 +128,9 @@ class Windows {
|
|
185
128
|
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
186
129
|
var _a, _b, _c;
|
187
130
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
188
|
-
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, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/create-form-filler`),
|
131
|
+
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/async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/create-form-filler`),
|
189
132
|
method: "POST",
|
190
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
133
|
+
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),
|
191
134
|
contentType: "application/json",
|
192
135
|
requestType: "json",
|
193
136
|
body: serializers.AsyncCreateFormFillerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -217,7 +160,7 @@ class Windows {
|
|
217
160
|
body: _response.error.rawBody,
|
218
161
|
});
|
219
162
|
case "timeout":
|
220
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/create-form-filler.");
|
163
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/async/sessions/{sessionId}/windows/{windowId}/create-form-filler.");
|
221
164
|
case "unknown":
|
222
165
|
throw new errors.AirtopError({
|
223
166
|
message: _response.error.errorMessage,
|
@@ -242,9 +185,9 @@ class Windows {
|
|
242
185
|
return __awaiter(this, void 0, void 0, function* () {
|
243
186
|
var _a, _b, _c;
|
244
187
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
245
|
-
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, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/execute-automation`),
|
188
|
+
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/async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/execute-automation`),
|
246
189
|
method: "POST",
|
247
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
190
|
+
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),
|
248
191
|
contentType: "application/json",
|
249
192
|
requestType: "json",
|
250
193
|
body: serializers.AsyncExecuteAutomationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -274,7 +217,7 @@ class Windows {
|
|
274
217
|
body: _response.error.rawBody,
|
275
218
|
});
|
276
219
|
case "timeout":
|
277
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/execute-automation.");
|
220
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/async/sessions/{sessionId}/windows/{windowId}/execute-automation.");
|
278
221
|
case "unknown":
|
279
222
|
throw new errors.AirtopError({
|
280
223
|
message: _response.error.errorMessage,
|
@@ -299,9 +242,9 @@ class Windows {
|
|
299
242
|
return __awaiter(this, void 0, void 0, function* () {
|
300
243
|
var _a, _b, _c;
|
301
244
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
302
|
-
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, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/fill-form`),
|
245
|
+
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/async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/fill-form`),
|
303
246
|
method: "POST",
|
304
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
247
|
+
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),
|
305
248
|
contentType: "application/json",
|
306
249
|
requestType: "json",
|
307
250
|
body: serializers.AsyncFillFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -331,449 +274,7 @@ class Windows {
|
|
331
274
|
body: _response.error.rawBody,
|
332
275
|
});
|
333
276
|
case "timeout":
|
334
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/fill-form.");
|
335
|
-
case "unknown":
|
336
|
-
throw new errors.AirtopError({
|
337
|
-
message: _response.error.errorMessage,
|
338
|
-
});
|
339
|
-
}
|
340
|
-
});
|
341
|
-
}
|
342
|
-
/**
|
343
|
-
* @param {string} sessionId - The session id for the window.
|
344
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
345
|
-
* @param {Airtop.AsyncHoverRequest} request
|
346
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
347
|
-
*
|
348
|
-
* @example
|
349
|
-
* await client.windows.asyncHover("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
350
|
-
* elementDescription: "The search box input in the top right corner"
|
351
|
-
* })
|
352
|
-
*/
|
353
|
-
asyncHover(sessionId, windowId, request, requestOptions) {
|
354
|
-
return __awaiter(this, void 0, void 0, function* () {
|
355
|
-
var _a, _b, _c;
|
356
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
357
|
-
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, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/hover`),
|
358
|
-
method: "POST",
|
359
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.38-beta0", "User-Agent": "@airtop/sdk/0.1.38-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
360
|
-
contentType: "application/json",
|
361
|
-
requestType: "json",
|
362
|
-
body: serializers.AsyncHoverRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
363
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
364
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
365
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
366
|
-
});
|
367
|
-
if (_response.ok) {
|
368
|
-
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
369
|
-
unrecognizedObjectKeys: "passthrough",
|
370
|
-
allowUnrecognizedUnionMembers: true,
|
371
|
-
allowUnrecognizedEnumValues: true,
|
372
|
-
skipValidation: true,
|
373
|
-
breadcrumbsPrefix: ["response"],
|
374
|
-
});
|
375
|
-
}
|
376
|
-
if (_response.error.reason === "status-code") {
|
377
|
-
throw new errors.AirtopError({
|
378
|
-
statusCode: _response.error.statusCode,
|
379
|
-
body: _response.error.body,
|
380
|
-
});
|
381
|
-
}
|
382
|
-
switch (_response.error.reason) {
|
383
|
-
case "non-json":
|
384
|
-
throw new errors.AirtopError({
|
385
|
-
statusCode: _response.error.statusCode,
|
386
|
-
body: _response.error.rawBody,
|
387
|
-
});
|
388
|
-
case "timeout":
|
389
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/hover.");
|
390
|
-
case "unknown":
|
391
|
-
throw new errors.AirtopError({
|
392
|
-
message: _response.error.errorMessage,
|
393
|
-
});
|
394
|
-
}
|
395
|
-
});
|
396
|
-
}
|
397
|
-
/**
|
398
|
-
* @param {string} sessionId - The session id for the window.
|
399
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
400
|
-
* @param {Airtop.AsyncMonitorRequest} request
|
401
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
402
|
-
*
|
403
|
-
* @example
|
404
|
-
* await client.windows.asyncMonitor("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
405
|
-
* condition: "Determine if the user appears to be signed in to the website"
|
406
|
-
* })
|
407
|
-
*/
|
408
|
-
asyncMonitor(sessionId, windowId, request, requestOptions) {
|
409
|
-
return __awaiter(this, void 0, void 0, function* () {
|
410
|
-
var _a, _b, _c;
|
411
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
412
|
-
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, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/monitor`),
|
413
|
-
method: "POST",
|
414
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.38-beta0", "User-Agent": "@airtop/sdk/0.1.38-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
415
|
-
contentType: "application/json",
|
416
|
-
requestType: "json",
|
417
|
-
body: serializers.AsyncMonitorRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
418
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
419
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
420
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
421
|
-
});
|
422
|
-
if (_response.ok) {
|
423
|
-
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
424
|
-
unrecognizedObjectKeys: "passthrough",
|
425
|
-
allowUnrecognizedUnionMembers: true,
|
426
|
-
allowUnrecognizedEnumValues: true,
|
427
|
-
skipValidation: true,
|
428
|
-
breadcrumbsPrefix: ["response"],
|
429
|
-
});
|
430
|
-
}
|
431
|
-
if (_response.error.reason === "status-code") {
|
432
|
-
throw new errors.AirtopError({
|
433
|
-
statusCode: _response.error.statusCode,
|
434
|
-
body: _response.error.body,
|
435
|
-
});
|
436
|
-
}
|
437
|
-
switch (_response.error.reason) {
|
438
|
-
case "non-json":
|
439
|
-
throw new errors.AirtopError({
|
440
|
-
statusCode: _response.error.statusCode,
|
441
|
-
body: _response.error.rawBody,
|
442
|
-
});
|
443
|
-
case "timeout":
|
444
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/monitor.");
|
445
|
-
case "unknown":
|
446
|
-
throw new errors.AirtopError({
|
447
|
-
message: _response.error.errorMessage,
|
448
|
-
});
|
449
|
-
}
|
450
|
-
});
|
451
|
-
}
|
452
|
-
/**
|
453
|
-
* @param {string} sessionId - The session id for the window.
|
454
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
455
|
-
* @param {Airtop.AsyncPageQueryRequest} request
|
456
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
457
|
-
*
|
458
|
-
* @example
|
459
|
-
* await client.windows.asyncPageQuery("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
460
|
-
* prompt: "What is the main idea of this page?"
|
461
|
-
* })
|
462
|
-
*/
|
463
|
-
asyncPageQuery(sessionId, windowId, request, requestOptions) {
|
464
|
-
return __awaiter(this, void 0, void 0, function* () {
|
465
|
-
var _a, _b, _c;
|
466
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
467
|
-
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, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/page-query`),
|
468
|
-
method: "POST",
|
469
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.38-beta0", "User-Agent": "@airtop/sdk/0.1.38-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
470
|
-
contentType: "application/json",
|
471
|
-
requestType: "json",
|
472
|
-
body: serializers.AsyncPageQueryRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
473
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
474
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
475
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
476
|
-
});
|
477
|
-
if (_response.ok) {
|
478
|
-
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
479
|
-
unrecognizedObjectKeys: "passthrough",
|
480
|
-
allowUnrecognizedUnionMembers: true,
|
481
|
-
allowUnrecognizedEnumValues: true,
|
482
|
-
skipValidation: true,
|
483
|
-
breadcrumbsPrefix: ["response"],
|
484
|
-
});
|
485
|
-
}
|
486
|
-
if (_response.error.reason === "status-code") {
|
487
|
-
throw new errors.AirtopError({
|
488
|
-
statusCode: _response.error.statusCode,
|
489
|
-
body: _response.error.body,
|
490
|
-
});
|
491
|
-
}
|
492
|
-
switch (_response.error.reason) {
|
493
|
-
case "non-json":
|
494
|
-
throw new errors.AirtopError({
|
495
|
-
statusCode: _response.error.statusCode,
|
496
|
-
body: _response.error.rawBody,
|
497
|
-
});
|
498
|
-
case "timeout":
|
499
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/page-query.");
|
500
|
-
case "unknown":
|
501
|
-
throw new errors.AirtopError({
|
502
|
-
message: _response.error.errorMessage,
|
503
|
-
});
|
504
|
-
}
|
505
|
-
});
|
506
|
-
}
|
507
|
-
/**
|
508
|
-
* @param {string} sessionId - The session id for the window.
|
509
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
510
|
-
* @param {Airtop.AsyncPaginatedExtractionRequest} request
|
511
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
512
|
-
*
|
513
|
-
* @example
|
514
|
-
* await client.windows.asyncPaginatedExtraction("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
515
|
-
* prompt: "This site contains a list of results about <provide details about the list>. Navigate through 3 pages of results and return the title and <provide details about the data you want to extract> about each result in this list."
|
516
|
-
* })
|
517
|
-
*/
|
518
|
-
asyncPaginatedExtraction(sessionId, windowId, request, requestOptions) {
|
519
|
-
return __awaiter(this, void 0, void 0, function* () {
|
520
|
-
var _a, _b, _c;
|
521
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
522
|
-
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, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/paginated-extraction`),
|
523
|
-
method: "POST",
|
524
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.38-beta0", "User-Agent": "@airtop/sdk/0.1.38-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
525
|
-
contentType: "application/json",
|
526
|
-
requestType: "json",
|
527
|
-
body: serializers.AsyncPaginatedExtractionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
528
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
529
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
530
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
531
|
-
});
|
532
|
-
if (_response.ok) {
|
533
|
-
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
534
|
-
unrecognizedObjectKeys: "passthrough",
|
535
|
-
allowUnrecognizedUnionMembers: true,
|
536
|
-
allowUnrecognizedEnumValues: true,
|
537
|
-
skipValidation: true,
|
538
|
-
breadcrumbsPrefix: ["response"],
|
539
|
-
});
|
540
|
-
}
|
541
|
-
if (_response.error.reason === "status-code") {
|
542
|
-
throw new errors.AirtopError({
|
543
|
-
statusCode: _response.error.statusCode,
|
544
|
-
body: _response.error.body,
|
545
|
-
});
|
546
|
-
}
|
547
|
-
switch (_response.error.reason) {
|
548
|
-
case "non-json":
|
549
|
-
throw new errors.AirtopError({
|
550
|
-
statusCode: _response.error.statusCode,
|
551
|
-
body: _response.error.rawBody,
|
552
|
-
});
|
553
|
-
case "timeout":
|
554
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/paginated-extraction.");
|
555
|
-
case "unknown":
|
556
|
-
throw new errors.AirtopError({
|
557
|
-
message: _response.error.errorMessage,
|
558
|
-
});
|
559
|
-
}
|
560
|
-
});
|
561
|
-
}
|
562
|
-
/**
|
563
|
-
* This endpoint is deprecated. Please use the `pageQuery` endpoint instead.
|
564
|
-
*
|
565
|
-
* @param {string} sessionId - The session id for the window.
|
566
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
567
|
-
* @param {Airtop.AsyncPromptContentRequest} request
|
568
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
569
|
-
*
|
570
|
-
* @example
|
571
|
-
* await client.windows.asyncPromptContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
572
|
-
* prompt: "What is the main idea of this page?"
|
573
|
-
* })
|
574
|
-
*/
|
575
|
-
asyncPromptContent(sessionId, windowId, request, requestOptions) {
|
576
|
-
return __awaiter(this, void 0, void 0, function* () {
|
577
|
-
var _a, _b, _c;
|
578
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
579
|
-
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, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/prompt-content`),
|
580
|
-
method: "POST",
|
581
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.38-beta0", "User-Agent": "@airtop/sdk/0.1.38-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
582
|
-
contentType: "application/json",
|
583
|
-
requestType: "json",
|
584
|
-
body: serializers.AsyncPromptContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
585
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
586
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
587
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
588
|
-
});
|
589
|
-
if (_response.ok) {
|
590
|
-
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
591
|
-
unrecognizedObjectKeys: "passthrough",
|
592
|
-
allowUnrecognizedUnionMembers: true,
|
593
|
-
allowUnrecognizedEnumValues: true,
|
594
|
-
skipValidation: true,
|
595
|
-
breadcrumbsPrefix: ["response"],
|
596
|
-
});
|
597
|
-
}
|
598
|
-
if (_response.error.reason === "status-code") {
|
599
|
-
throw new errors.AirtopError({
|
600
|
-
statusCode: _response.error.statusCode,
|
601
|
-
body: _response.error.body,
|
602
|
-
});
|
603
|
-
}
|
604
|
-
switch (_response.error.reason) {
|
605
|
-
case "non-json":
|
606
|
-
throw new errors.AirtopError({
|
607
|
-
statusCode: _response.error.statusCode,
|
608
|
-
body: _response.error.rawBody,
|
609
|
-
});
|
610
|
-
case "timeout":
|
611
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/prompt-content.");
|
612
|
-
case "unknown":
|
613
|
-
throw new errors.AirtopError({
|
614
|
-
message: _response.error.errorMessage,
|
615
|
-
});
|
616
|
-
}
|
617
|
-
});
|
618
|
-
}
|
619
|
-
/**
|
620
|
-
* Take a screenshot of the current viewport of a browser window asynchronously
|
621
|
-
*
|
622
|
-
* @param {string} sessionId - The session id for the window.
|
623
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
624
|
-
* @param {Airtop.AsyncScreenshotRequest} request
|
625
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
626
|
-
*
|
627
|
-
* @example
|
628
|
-
* await client.windows.asyncScreenshot("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
629
|
-
*/
|
630
|
-
asyncScreenshot(sessionId_1, windowId_1) {
|
631
|
-
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
632
|
-
var _a, _b, _c;
|
633
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
634
|
-
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, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/screenshot`),
|
635
|
-
method: "POST",
|
636
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.38-beta0", "User-Agent": "@airtop/sdk/0.1.38-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
637
|
-
contentType: "application/json",
|
638
|
-
requestType: "json",
|
639
|
-
body: serializers.AsyncScreenshotRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
640
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
641
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
642
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
643
|
-
});
|
644
|
-
if (_response.ok) {
|
645
|
-
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
646
|
-
unrecognizedObjectKeys: "passthrough",
|
647
|
-
allowUnrecognizedUnionMembers: true,
|
648
|
-
allowUnrecognizedEnumValues: true,
|
649
|
-
skipValidation: true,
|
650
|
-
breadcrumbsPrefix: ["response"],
|
651
|
-
});
|
652
|
-
}
|
653
|
-
if (_response.error.reason === "status-code") {
|
654
|
-
throw new errors.AirtopError({
|
655
|
-
statusCode: _response.error.statusCode,
|
656
|
-
body: _response.error.body,
|
657
|
-
});
|
658
|
-
}
|
659
|
-
switch (_response.error.reason) {
|
660
|
-
case "non-json":
|
661
|
-
throw new errors.AirtopError({
|
662
|
-
statusCode: _response.error.statusCode,
|
663
|
-
body: _response.error.rawBody,
|
664
|
-
});
|
665
|
-
case "timeout":
|
666
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/screenshot.");
|
667
|
-
case "unknown":
|
668
|
-
throw new errors.AirtopError({
|
669
|
-
message: _response.error.errorMessage,
|
670
|
-
});
|
671
|
-
}
|
672
|
-
});
|
673
|
-
}
|
674
|
-
/**
|
675
|
-
* This endpoint is deprecated. Please use the `pageQuery` endpoint and ask for a summary in the prompt instead.
|
676
|
-
*
|
677
|
-
* @param {string} sessionId - The session id for the window.
|
678
|
-
* @param {string} windowId - The Airtop window id of the browser window to summarize.
|
679
|
-
* @param {Airtop.AsyncSummarizeContentRequest} request
|
680
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
681
|
-
*
|
682
|
-
* @example
|
683
|
-
* await client.windows.asyncSummarizeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
684
|
-
*/
|
685
|
-
asyncSummarizeContent(sessionId_1, windowId_1) {
|
686
|
-
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
687
|
-
var _a, _b, _c;
|
688
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
689
|
-
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, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/summarize-content`),
|
690
|
-
method: "POST",
|
691
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.38-beta0", "User-Agent": "@airtop/sdk/0.1.38-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
692
|
-
contentType: "application/json",
|
693
|
-
requestType: "json",
|
694
|
-
body: serializers.AsyncSummarizeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
695
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
696
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
697
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
698
|
-
});
|
699
|
-
if (_response.ok) {
|
700
|
-
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
701
|
-
unrecognizedObjectKeys: "passthrough",
|
702
|
-
allowUnrecognizedUnionMembers: true,
|
703
|
-
allowUnrecognizedEnumValues: true,
|
704
|
-
skipValidation: true,
|
705
|
-
breadcrumbsPrefix: ["response"],
|
706
|
-
});
|
707
|
-
}
|
708
|
-
if (_response.error.reason === "status-code") {
|
709
|
-
throw new errors.AirtopError({
|
710
|
-
statusCode: _response.error.statusCode,
|
711
|
-
body: _response.error.body,
|
712
|
-
});
|
713
|
-
}
|
714
|
-
switch (_response.error.reason) {
|
715
|
-
case "non-json":
|
716
|
-
throw new errors.AirtopError({
|
717
|
-
statusCode: _response.error.statusCode,
|
718
|
-
body: _response.error.rawBody,
|
719
|
-
});
|
720
|
-
case "timeout":
|
721
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/summarize-content.");
|
722
|
-
case "unknown":
|
723
|
-
throw new errors.AirtopError({
|
724
|
-
message: _response.error.errorMessage,
|
725
|
-
});
|
726
|
-
}
|
727
|
-
});
|
728
|
-
}
|
729
|
-
/**
|
730
|
-
* @param {string} sessionId - The session id for the window.
|
731
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
732
|
-
* @param {Airtop.AsyncTypeRequest} request
|
733
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
734
|
-
*
|
735
|
-
* @example
|
736
|
-
* await client.windows.asyncType("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
737
|
-
* text: "Example text"
|
738
|
-
* })
|
739
|
-
*/
|
740
|
-
asyncType(sessionId, windowId, request, requestOptions) {
|
741
|
-
return __awaiter(this, void 0, void 0, function* () {
|
742
|
-
var _a, _b, _c;
|
743
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
744
|
-
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, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/type`),
|
745
|
-
method: "POST",
|
746
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.38-beta0", "User-Agent": "@airtop/sdk/0.1.38-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
747
|
-
contentType: "application/json",
|
748
|
-
requestType: "json",
|
749
|
-
body: serializers.AsyncTypeRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
750
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
751
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
752
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
753
|
-
});
|
754
|
-
if (_response.ok) {
|
755
|
-
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
756
|
-
unrecognizedObjectKeys: "passthrough",
|
757
|
-
allowUnrecognizedUnionMembers: true,
|
758
|
-
allowUnrecognizedEnumValues: true,
|
759
|
-
skipValidation: true,
|
760
|
-
breadcrumbsPrefix: ["response"],
|
761
|
-
});
|
762
|
-
}
|
763
|
-
if (_response.error.reason === "status-code") {
|
764
|
-
throw new errors.AirtopError({
|
765
|
-
statusCode: _response.error.statusCode,
|
766
|
-
body: _response.error.body,
|
767
|
-
});
|
768
|
-
}
|
769
|
-
switch (_response.error.reason) {
|
770
|
-
case "non-json":
|
771
|
-
throw new errors.AirtopError({
|
772
|
-
statusCode: _response.error.statusCode,
|
773
|
-
body: _response.error.rawBody,
|
774
|
-
});
|
775
|
-
case "timeout":
|
776
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/type.");
|
277
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/async/sessions/{sessionId}/windows/{windowId}/fill-form.");
|
777
278
|
case "unknown":
|
778
279
|
throw new errors.AirtopError({
|
779
280
|
message: _response.error.errorMessage,
|
@@ -795,9 +296,9 @@ class Windows {
|
|
795
296
|
return __awaiter(this, arguments, void 0, function* (sessionId, request = {}, requestOptions) {
|
796
297
|
var _a, _b, _c;
|
797
298
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
798
|
-
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)}/windows`),
|
299
|
+
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)}/windows`),
|
799
300
|
method: "POST",
|
800
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
301
|
+
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),
|
801
302
|
contentType: "application/json",
|
802
303
|
requestType: "json",
|
803
304
|
body: serializers.CreateWindowInputV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -827,7 +328,7 @@ class Windows {
|
|
827
328
|
body: _response.error.rawBody,
|
828
329
|
});
|
829
330
|
case "timeout":
|
830
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows.");
|
331
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/sessions/{sessionId}/windows.");
|
831
332
|
case "unknown":
|
832
333
|
throw new errors.AirtopError({
|
833
334
|
message: _response.error.errorMessage,
|
@@ -863,9 +364,9 @@ class Windows {
|
|
863
364
|
_queryParams["screenResolution"] = screenResolution;
|
864
365
|
}
|
865
366
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
866
|
-
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)}/windows/${encodeURIComponent(windowId)}`),
|
367
|
+
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)}/windows/${encodeURIComponent(windowId)}`),
|
867
368
|
method: "GET",
|
868
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
369
|
+
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),
|
869
370
|
contentType: "application/json",
|
870
371
|
queryParameters: _queryParams,
|
871
372
|
requestType: "json",
|
@@ -895,7 +396,7 @@ class Windows {
|
|
895
396
|
body: _response.error.rawBody,
|
896
397
|
});
|
897
398
|
case "timeout":
|
898
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling GET /sessions/{sessionId}/windows/{windowId}.");
|
399
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling GET /v1/sessions/{sessionId}/windows/{windowId}.");
|
899
400
|
case "unknown":
|
900
401
|
throw new errors.AirtopError({
|
901
402
|
message: _response.error.errorMessage,
|
@@ -920,9 +421,9 @@ class Windows {
|
|
920
421
|
return __awaiter(this, void 0, void 0, function* () {
|
921
422
|
var _a, _b, _c;
|
922
423
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
923
|
-
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)}/windows/${encodeURIComponent(windowId)}`),
|
424
|
+
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)}/windows/${encodeURIComponent(windowId)}`),
|
924
425
|
method: "POST",
|
925
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
426
|
+
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),
|
926
427
|
contentType: "application/json",
|
927
428
|
requestType: "json",
|
928
429
|
body: serializers.WindowLoadUrlV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -952,7 +453,7 @@ class Windows {
|
|
952
453
|
body: _response.error.rawBody,
|
953
454
|
});
|
954
455
|
case "timeout":
|
955
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}.");
|
456
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/sessions/{sessionId}/windows/{windowId}.");
|
956
457
|
case "unknown":
|
957
458
|
throw new errors.AirtopError({
|
958
459
|
message: _response.error.errorMessage,
|
@@ -974,9 +475,9 @@ class Windows {
|
|
974
475
|
return __awaiter(this, void 0, void 0, function* () {
|
975
476
|
var _a, _b, _c;
|
976
477
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
977
|
-
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)}/windows/${encodeURIComponent(windowId)}`),
|
478
|
+
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)}/windows/${encodeURIComponent(windowId)}`),
|
978
479
|
method: "DELETE",
|
979
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
480
|
+
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),
|
980
481
|
contentType: "application/json",
|
981
482
|
requestType: "json",
|
982
483
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -1005,7 +506,7 @@ class Windows {
|
|
1005
506
|
body: _response.error.rawBody,
|
1006
507
|
});
|
1007
508
|
case "timeout":
|
1008
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling DELETE /sessions/{sessionId}/windows/{windowId}.");
|
509
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling DELETE /v1/sessions/{sessionId}/windows/{windowId}.");
|
1009
510
|
case "unknown":
|
1010
511
|
throw new errors.AirtopError({
|
1011
512
|
message: _response.error.errorMessage,
|
@@ -1030,9 +531,9 @@ class Windows {
|
|
1030
531
|
return __awaiter(this, void 0, void 0, function* () {
|
1031
532
|
var _a, _b, _c;
|
1032
533
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1033
|
-
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)}/windows/${encodeURIComponent(windowId)}/click`),
|
534
|
+
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)}/windows/${encodeURIComponent(windowId)}/click`),
|
1034
535
|
method: "POST",
|
1035
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
536
|
+
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),
|
1036
537
|
contentType: "application/json",
|
1037
538
|
requestType: "json",
|
1038
539
|
body: serializers.SessionClickHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1062,7 +563,7 @@ class Windows {
|
|
1062
563
|
body: _response.error.rawBody,
|
1063
564
|
});
|
1064
565
|
case "timeout":
|
1065
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/click.");
|
566
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/sessions/{sessionId}/windows/{windowId}/click.");
|
1066
567
|
case "unknown":
|
1067
568
|
throw new errors.AirtopError({
|
1068
569
|
message: _response.error.errorMessage,
|
@@ -1085,9 +586,9 @@ class Windows {
|
|
1085
586
|
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
1086
587
|
var _a, _b, _c;
|
1087
588
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1088
|
-
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)}/windows/${encodeURIComponent(windowId)}/create-form-filler`),
|
589
|
+
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)}/windows/${encodeURIComponent(windowId)}/create-form-filler`),
|
1089
590
|
method: "POST",
|
1090
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
591
|
+
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),
|
1091
592
|
contentType: "application/json",
|
1092
593
|
requestType: "json",
|
1093
594
|
body: serializers.CreateFormFillerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1117,7 +618,7 @@ class Windows {
|
|
1117
618
|
body: _response.error.rawBody,
|
1118
619
|
});
|
1119
620
|
case "timeout":
|
1120
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/create-form-filler.");
|
621
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/sessions/{sessionId}/windows/{windowId}/create-form-filler.");
|
1121
622
|
case "unknown":
|
1122
623
|
throw new errors.AirtopError({
|
1123
624
|
message: _response.error.errorMessage,
|
@@ -1142,9 +643,9 @@ class Windows {
|
|
1142
643
|
return __awaiter(this, void 0, void 0, function* () {
|
1143
644
|
var _a, _b, _c;
|
1144
645
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1145
|
-
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)}/windows/${encodeURIComponent(windowId)}/fill-form`),
|
646
|
+
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)}/windows/${encodeURIComponent(windowId)}/fill-form`),
|
1146
647
|
method: "POST",
|
1147
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
648
|
+
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),
|
1148
649
|
contentType: "application/json",
|
1149
650
|
requestType: "json",
|
1150
651
|
body: serializers.FillFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1174,7 +675,7 @@ class Windows {
|
|
1174
675
|
body: _response.error.rawBody,
|
1175
676
|
});
|
1176
677
|
case "timeout":
|
1177
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/fill-form.");
|
678
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/sessions/{sessionId}/windows/{windowId}/fill-form.");
|
1178
679
|
case "unknown":
|
1179
680
|
throw new errors.AirtopError({
|
1180
681
|
message: _response.error.errorMessage,
|
@@ -1199,9 +700,9 @@ class Windows {
|
|
1199
700
|
return __awaiter(this, void 0, void 0, function* () {
|
1200
701
|
var _a, _b, _c;
|
1201
702
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1202
|
-
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)}/windows/${encodeURIComponent(windowId)}/hover`),
|
703
|
+
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)}/windows/${encodeURIComponent(windowId)}/hover`),
|
1203
704
|
method: "POST",
|
1204
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
705
|
+
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),
|
1205
706
|
contentType: "application/json",
|
1206
707
|
requestType: "json",
|
1207
708
|
body: serializers.SessionHoverHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1231,7 +732,7 @@ class Windows {
|
|
1231
732
|
body: _response.error.rawBody,
|
1232
733
|
});
|
1233
734
|
case "timeout":
|
1234
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/hover.");
|
735
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/sessions/{sessionId}/windows/{windowId}/hover.");
|
1235
736
|
case "unknown":
|
1236
737
|
throw new errors.AirtopError({
|
1237
738
|
message: _response.error.errorMessage,
|
@@ -1254,9 +755,9 @@ class Windows {
|
|
1254
755
|
return __awaiter(this, void 0, void 0, function* () {
|
1255
756
|
var _a, _b, _c;
|
1256
757
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1257
|
-
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)}/windows/${encodeURIComponent(windowId)}/monitor`),
|
758
|
+
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)}/windows/${encodeURIComponent(windowId)}/monitor`),
|
1258
759
|
method: "POST",
|
1259
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
760
|
+
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),
|
1260
761
|
contentType: "application/json",
|
1261
762
|
requestType: "json",
|
1262
763
|
body: serializers.SessionMonitorHandlerRequestBody.jsonOrThrow(request, {
|
@@ -1288,64 +789,7 @@ class Windows {
|
|
1288
789
|
body: _response.error.rawBody,
|
1289
790
|
});
|
1290
791
|
case "timeout":
|
1291
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/monitor.");
|
1292
|
-
case "unknown":
|
1293
|
-
throw new errors.AirtopError({
|
1294
|
-
message: _response.error.errorMessage,
|
1295
|
-
});
|
1296
|
-
}
|
1297
|
-
});
|
1298
|
-
}
|
1299
|
-
/**
|
1300
|
-
* Prompt OpenAI Operator
|
1301
|
-
*
|
1302
|
-
* @param {string} sessionId - ID of the session that owns the window.
|
1303
|
-
* @param {string} windowId - Airtop window ID of the browser window.
|
1304
|
-
* @param {Airtop.OperatorPromptV1Body} request
|
1305
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
1306
|
-
*
|
1307
|
-
* @example
|
1308
|
-
* await client.windows.operatorPrompt("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "7334da2a-91b0-42c5-6156-76a5eba87430", {
|
1309
|
-
* prompt: "What is the latest news about OpenAI?"
|
1310
|
-
* })
|
1311
|
-
*/
|
1312
|
-
operatorPrompt(sessionId, windowId, request, requestOptions) {
|
1313
|
-
return __awaiter(this, void 0, void 0, function* () {
|
1314
|
-
var _a, _b, _c;
|
1315
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1316
|
-
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)}/windows/${encodeURIComponent(windowId)}/operator`),
|
1317
|
-
method: "POST",
|
1318
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.38-beta0", "User-Agent": "@airtop/sdk/0.1.38-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1319
|
-
contentType: "application/json",
|
1320
|
-
requestType: "json",
|
1321
|
-
body: serializers.OperatorPromptV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
1322
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
1323
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
1324
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
1325
|
-
});
|
1326
|
-
if (_response.ok) {
|
1327
|
-
return serializers.AsyncOperatorPromptResponseEnvelope.parseOrThrow(_response.body, {
|
1328
|
-
unrecognizedObjectKeys: "passthrough",
|
1329
|
-
allowUnrecognizedUnionMembers: true,
|
1330
|
-
allowUnrecognizedEnumValues: true,
|
1331
|
-
skipValidation: true,
|
1332
|
-
breadcrumbsPrefix: ["response"],
|
1333
|
-
});
|
1334
|
-
}
|
1335
|
-
if (_response.error.reason === "status-code") {
|
1336
|
-
throw new errors.AirtopError({
|
1337
|
-
statusCode: _response.error.statusCode,
|
1338
|
-
body: _response.error.body,
|
1339
|
-
});
|
1340
|
-
}
|
1341
|
-
switch (_response.error.reason) {
|
1342
|
-
case "non-json":
|
1343
|
-
throw new errors.AirtopError({
|
1344
|
-
statusCode: _response.error.statusCode,
|
1345
|
-
body: _response.error.rawBody,
|
1346
|
-
});
|
1347
|
-
case "timeout":
|
1348
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/operator.");
|
792
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/sessions/{sessionId}/windows/{windowId}/monitor.");
|
1349
793
|
case "unknown":
|
1350
794
|
throw new errors.AirtopError({
|
1351
795
|
message: _response.error.errorMessage,
|
@@ -1370,9 +814,9 @@ class Windows {
|
|
1370
814
|
return __awaiter(this, void 0, void 0, function* () {
|
1371
815
|
var _a, _b, _c;
|
1372
816
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1373
|
-
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)}/windows/${encodeURIComponent(windowId)}/page-query`),
|
817
|
+
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)}/windows/${encodeURIComponent(windowId)}/page-query`),
|
1374
818
|
method: "POST",
|
1375
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
819
|
+
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),
|
1376
820
|
contentType: "application/json",
|
1377
821
|
requestType: "json",
|
1378
822
|
body: serializers.SessionPageQueryHandlerRequestBody.jsonOrThrow(request, {
|
@@ -1404,7 +848,7 @@ class Windows {
|
|
1404
848
|
body: _response.error.rawBody,
|
1405
849
|
});
|
1406
850
|
case "timeout":
|
1407
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/page-query.");
|
851
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/sessions/{sessionId}/windows/{windowId}/page-query.");
|
1408
852
|
case "unknown":
|
1409
853
|
throw new errors.AirtopError({
|
1410
854
|
message: _response.error.errorMessage,
|
@@ -1429,9 +873,9 @@ class Windows {
|
|
1429
873
|
return __awaiter(this, void 0, void 0, function* () {
|
1430
874
|
var _a, _b, _c;
|
1431
875
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1432
|
-
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)}/windows/${encodeURIComponent(windowId)}/paginated-extraction`),
|
876
|
+
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)}/windows/${encodeURIComponent(windowId)}/paginated-extraction`),
|
1433
877
|
method: "POST",
|
1434
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
878
|
+
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),
|
1435
879
|
contentType: "application/json",
|
1436
880
|
requestType: "json",
|
1437
881
|
body: serializers.SessionPaginatedExtractionHandlerRequestBody.jsonOrThrow(request, {
|
@@ -1463,7 +907,7 @@ class Windows {
|
|
1463
907
|
body: _response.error.rawBody,
|
1464
908
|
});
|
1465
909
|
case "timeout":
|
1466
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/paginated-extraction.");
|
910
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/sessions/{sessionId}/windows/{windowId}/paginated-extraction.");
|
1467
911
|
case "unknown":
|
1468
912
|
throw new errors.AirtopError({
|
1469
913
|
message: _response.error.errorMessage,
|
@@ -1488,9 +932,9 @@ class Windows {
|
|
1488
932
|
return __awaiter(this, void 0, void 0, function* () {
|
1489
933
|
var _a, _b, _c;
|
1490
934
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1491
|
-
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)}/windows/${encodeURIComponent(windowId)}/prompt-content`),
|
935
|
+
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)}/windows/${encodeURIComponent(windowId)}/prompt-content`),
|
1492
936
|
method: "POST",
|
1493
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
937
|
+
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),
|
1494
938
|
contentType: "application/json",
|
1495
939
|
requestType: "json",
|
1496
940
|
body: serializers.SessionPageQueryHandlerRequestBody.jsonOrThrow(request, {
|
@@ -1522,7 +966,7 @@ class Windows {
|
|
1522
966
|
body: _response.error.rawBody,
|
1523
967
|
});
|
1524
968
|
case "timeout":
|
1525
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/prompt-content.");
|
969
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/sessions/{sessionId}/windows/{windowId}/prompt-content.");
|
1526
970
|
case "unknown":
|
1527
971
|
throw new errors.AirtopError({
|
1528
972
|
message: _response.error.errorMessage,
|
@@ -1545,9 +989,9 @@ class Windows {
|
|
1545
989
|
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
1546
990
|
var _a, _b, _c;
|
1547
991
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1548
|
-
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)}/windows/${encodeURIComponent(windowId)}/scrape-content`),
|
992
|
+
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)}/windows/${encodeURIComponent(windowId)}/scrape-content`),
|
1549
993
|
method: "POST",
|
1550
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
994
|
+
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),
|
1551
995
|
contentType: "application/json",
|
1552
996
|
requestType: "json",
|
1553
997
|
body: serializers.ScrapeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1577,7 +1021,7 @@ class Windows {
|
|
1577
1021
|
body: _response.error.rawBody,
|
1578
1022
|
});
|
1579
1023
|
case "timeout":
|
1580
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/scrape-content.");
|
1024
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/sessions/{sessionId}/windows/{windowId}/scrape-content.");
|
1581
1025
|
case "unknown":
|
1582
1026
|
throw new errors.AirtopError({
|
1583
1027
|
message: _response.error.errorMessage,
|
@@ -1600,9 +1044,9 @@ class Windows {
|
|
1600
1044
|
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
1601
1045
|
var _a, _b, _c;
|
1602
1046
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1603
|
-
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)}/windows/${encodeURIComponent(windowId)}/screenshot`),
|
1047
|
+
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)}/windows/${encodeURIComponent(windowId)}/screenshot`),
|
1604
1048
|
method: "POST",
|
1605
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1049
|
+
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),
|
1606
1050
|
contentType: "application/json",
|
1607
1051
|
requestType: "json",
|
1608
1052
|
body: serializers.SessionScreenshotHandlerRequestBody.jsonOrThrow(request, {
|
@@ -1634,7 +1078,7 @@ class Windows {
|
|
1634
1078
|
body: _response.error.rawBody,
|
1635
1079
|
});
|
1636
1080
|
case "timeout":
|
1637
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/screenshot.");
|
1081
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/sessions/{sessionId}/windows/{windowId}/screenshot.");
|
1638
1082
|
case "unknown":
|
1639
1083
|
throw new errors.AirtopError({
|
1640
1084
|
message: _response.error.errorMessage,
|
@@ -1657,9 +1101,9 @@ class Windows {
|
|
1657
1101
|
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
1658
1102
|
var _a, _b, _c;
|
1659
1103
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1660
|
-
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)}/windows/${encodeURIComponent(windowId)}/scroll`),
|
1104
|
+
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)}/windows/${encodeURIComponent(windowId)}/scroll`),
|
1661
1105
|
method: "POST",
|
1662
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1106
|
+
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),
|
1663
1107
|
contentType: "application/json",
|
1664
1108
|
requestType: "json",
|
1665
1109
|
body: serializers.SessionScrollHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1689,7 +1133,7 @@ class Windows {
|
|
1689
1133
|
body: _response.error.rawBody,
|
1690
1134
|
});
|
1691
1135
|
case "timeout":
|
1692
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/scroll.");
|
1136
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/sessions/{sessionId}/windows/{windowId}/scroll.");
|
1693
1137
|
case "unknown":
|
1694
1138
|
throw new errors.AirtopError({
|
1695
1139
|
message: _response.error.errorMessage,
|
@@ -1712,9 +1156,9 @@ class Windows {
|
|
1712
1156
|
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
1713
1157
|
var _a, _b, _c;
|
1714
1158
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1715
|
-
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)}/windows/${encodeURIComponent(windowId)}/summarize-content`),
|
1159
|
+
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)}/windows/${encodeURIComponent(windowId)}/summarize-content`),
|
1716
1160
|
method: "POST",
|
1717
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1161
|
+
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),
|
1718
1162
|
contentType: "application/json",
|
1719
1163
|
requestType: "json",
|
1720
1164
|
body: serializers.SessionSummaryHandlerRequestBody.jsonOrThrow(request, {
|
@@ -1746,7 +1190,7 @@ class Windows {
|
|
1746
1190
|
body: _response.error.rawBody,
|
1747
1191
|
});
|
1748
1192
|
case "timeout":
|
1749
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/summarize-content.");
|
1193
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/sessions/{sessionId}/windows/{windowId}/summarize-content.");
|
1750
1194
|
case "unknown":
|
1751
1195
|
throw new errors.AirtopError({
|
1752
1196
|
message: _response.error.errorMessage,
|
@@ -1771,9 +1215,9 @@ class Windows {
|
|
1771
1215
|
return __awaiter(this, void 0, void 0, function* () {
|
1772
1216
|
var _a, _b, _c;
|
1773
1217
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1774
|
-
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)}/windows/${encodeURIComponent(windowId)}/type`),
|
1218
|
+
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)}/windows/${encodeURIComponent(windowId)}/type`),
|
1775
1219
|
method: "POST",
|
1776
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
1220
|
+
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),
|
1777
1221
|
contentType: "application/json",
|
1778
1222
|
requestType: "json",
|
1779
1223
|
body: serializers.SessionTypeHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1803,7 +1247,7 @@ class Windows {
|
|
1803
1247
|
body: _response.error.rawBody,
|
1804
1248
|
});
|
1805
1249
|
case "timeout":
|
1806
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/type.");
|
1250
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/sessions/{sessionId}/windows/{windowId}/type.");
|
1807
1251
|
case "unknown":
|
1808
1252
|
throw new errors.AirtopError({
|
1809
1253
|
message: _response.error.errorMessage,
|