@airtop/sdk 0.1.38 → 0.1.40
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/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 +10 -10
- package/api/resources/sessions/types/index.d.ts +3 -3
- package/api/resources/sessions/types/index.js +3 -3
- package/api/resources/windows/client/Client.js +63 -63
- package/api/types/RequestStatusResponse.d.ts +2 -0
- package/api/types/SessionConfigV1.d.ts +2 -0
- 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 +10 -10
- package/dist/api/resources/sessions/types/index.d.ts +3 -3
- package/dist/api/resources/sessions/types/index.js +3 -3
- package/dist/api/resources/windows/client/Client.js +63 -63
- package/dist/api/types/RequestStatusResponse.d.ts +2 -0
- package/dist/api/types/SessionConfigV1.d.ts +2 -0
- package/dist/environments.d.ts +1 -1
- package/dist/environments.js +1 -1
- package/dist/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +13 -13
- package/dist/serialization/resources/sessions/types/SessionsEventsResponse.js +6 -6
- package/dist/serialization/resources/sessions/types/index.d.ts +3 -3
- package/dist/serialization/resources/sessions/types/index.js +3 -3
- package/dist/serialization/types/RequestStatusResponse.d.ts +1 -0
- package/dist/serialization/types/RequestStatusResponse.js +1 -0
- package/dist/serialization/types/SessionConfigV1.d.ts +1 -0
- package/dist/serialization/types/SessionConfigV1.js +1 -0
- 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/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +13 -13
- package/serialization/resources/sessions/types/SessionsEventsResponse.js +6 -6
- package/serialization/resources/sessions/types/index.d.ts +3 -3
- package/serialization/resources/sessions/types/index.js +3 -3
- package/serialization/types/RequestStatusResponse.d.ts +1 -0
- package/serialization/types/RequestStatusResponse.js +1 -0
- package/serialization/types/SessionConfigV1.d.ts +1 -0
- package/serialization/types/SessionConfigV1.js +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
@@ -73,9 +73,9 @@ class Windows {
|
|
73
73
|
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
74
74
|
var _a, _b, _c;
|
75
75
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `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`),
|
77
77
|
method: "POST",
|
78
|
-
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.40", "User-Agent": "@airtop/sdk/0.1.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
79
79
|
contentType: "application/json",
|
80
80
|
requestType: "json",
|
81
81
|
body: serializers.AsyncCreateAutomationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -105,7 +105,7 @@ class Windows {
|
|
105
105
|
body: _response.error.rawBody,
|
106
106
|
});
|
107
107
|
case "timeout":
|
108
|
-
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.");
|
109
109
|
case "unknown":
|
110
110
|
throw new errors.AirtopError({
|
111
111
|
message: _response.error.errorMessage,
|
@@ -128,9 +128,9 @@ class Windows {
|
|
128
128
|
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
129
129
|
var _a, _b, _c;
|
130
130
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `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`),
|
132
132
|
method: "POST",
|
133
|
-
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.40", "User-Agent": "@airtop/sdk/0.1.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
134
134
|
contentType: "application/json",
|
135
135
|
requestType: "json",
|
136
136
|
body: serializers.AsyncCreateFormFillerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -160,7 +160,7 @@ class Windows {
|
|
160
160
|
body: _response.error.rawBody,
|
161
161
|
});
|
162
162
|
case "timeout":
|
163
|
-
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.");
|
164
164
|
case "unknown":
|
165
165
|
throw new errors.AirtopError({
|
166
166
|
message: _response.error.errorMessage,
|
@@ -185,9 +185,9 @@ class Windows {
|
|
185
185
|
return __awaiter(this, void 0, void 0, function* () {
|
186
186
|
var _a, _b, _c;
|
187
187
|
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)}/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`),
|
189
189
|
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.
|
190
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.40", "User-Agent": "@airtop/sdk/0.1.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
191
191
|
contentType: "application/json",
|
192
192
|
requestType: "json",
|
193
193
|
body: serializers.AsyncExecuteAutomationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -217,7 +217,7 @@ class Windows {
|
|
217
217
|
body: _response.error.rawBody,
|
218
218
|
});
|
219
219
|
case "timeout":
|
220
|
-
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.");
|
221
221
|
case "unknown":
|
222
222
|
throw new errors.AirtopError({
|
223
223
|
message: _response.error.errorMessage,
|
@@ -242,9 +242,9 @@ class Windows {
|
|
242
242
|
return __awaiter(this, void 0, void 0, function* () {
|
243
243
|
var _a, _b, _c;
|
244
244
|
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)}/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`),
|
246
246
|
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.
|
247
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.40", "User-Agent": "@airtop/sdk/0.1.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
248
248
|
contentType: "application/json",
|
249
249
|
requestType: "json",
|
250
250
|
body: serializers.AsyncFillFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -274,7 +274,7 @@ class Windows {
|
|
274
274
|
body: _response.error.rawBody,
|
275
275
|
});
|
276
276
|
case "timeout":
|
277
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/fill-form.");
|
277
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/async/sessions/{sessionId}/windows/{windowId}/fill-form.");
|
278
278
|
case "unknown":
|
279
279
|
throw new errors.AirtopError({
|
280
280
|
message: _response.error.errorMessage,
|
@@ -296,9 +296,9 @@ class Windows {
|
|
296
296
|
return __awaiter(this, arguments, void 0, function* (sessionId, request = {}, requestOptions) {
|
297
297
|
var _a, _b, _c;
|
298
298
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `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`),
|
300
300
|
method: "POST",
|
301
|
-
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.40", "User-Agent": "@airtop/sdk/0.1.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
302
302
|
contentType: "application/json",
|
303
303
|
requestType: "json",
|
304
304
|
body: serializers.CreateWindowInputV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -328,7 +328,7 @@ class Windows {
|
|
328
328
|
body: _response.error.rawBody,
|
329
329
|
});
|
330
330
|
case "timeout":
|
331
|
-
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.");
|
332
332
|
case "unknown":
|
333
333
|
throw new errors.AirtopError({
|
334
334
|
message: _response.error.errorMessage,
|
@@ -364,9 +364,9 @@ class Windows {
|
|
364
364
|
_queryParams["screenResolution"] = screenResolution;
|
365
365
|
}
|
366
366
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `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)}`),
|
368
368
|
method: "GET",
|
369
|
-
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.40", "User-Agent": "@airtop/sdk/0.1.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
370
370
|
contentType: "application/json",
|
371
371
|
queryParameters: _queryParams,
|
372
372
|
requestType: "json",
|
@@ -396,7 +396,7 @@ class Windows {
|
|
396
396
|
body: _response.error.rawBody,
|
397
397
|
});
|
398
398
|
case "timeout":
|
399
|
-
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}.");
|
400
400
|
case "unknown":
|
401
401
|
throw new errors.AirtopError({
|
402
402
|
message: _response.error.errorMessage,
|
@@ -421,9 +421,9 @@ class Windows {
|
|
421
421
|
return __awaiter(this, void 0, void 0, function* () {
|
422
422
|
var _a, _b, _c;
|
423
423
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `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)}`),
|
425
425
|
method: "POST",
|
426
|
-
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.40", "User-Agent": "@airtop/sdk/0.1.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
427
427
|
contentType: "application/json",
|
428
428
|
requestType: "json",
|
429
429
|
body: serializers.WindowLoadUrlV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -453,7 +453,7 @@ class Windows {
|
|
453
453
|
body: _response.error.rawBody,
|
454
454
|
});
|
455
455
|
case "timeout":
|
456
|
-
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}.");
|
457
457
|
case "unknown":
|
458
458
|
throw new errors.AirtopError({
|
459
459
|
message: _response.error.errorMessage,
|
@@ -475,9 +475,9 @@ class Windows {
|
|
475
475
|
return __awaiter(this, void 0, void 0, function* () {
|
476
476
|
var _a, _b, _c;
|
477
477
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `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)}`),
|
479
479
|
method: "DELETE",
|
480
|
-
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.40", "User-Agent": "@airtop/sdk/0.1.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
481
481
|
contentType: "application/json",
|
482
482
|
requestType: "json",
|
483
483
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -506,7 +506,7 @@ class Windows {
|
|
506
506
|
body: _response.error.rawBody,
|
507
507
|
});
|
508
508
|
case "timeout":
|
509
|
-
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}.");
|
510
510
|
case "unknown":
|
511
511
|
throw new errors.AirtopError({
|
512
512
|
message: _response.error.errorMessage,
|
@@ -531,9 +531,9 @@ class Windows {
|
|
531
531
|
return __awaiter(this, void 0, void 0, function* () {
|
532
532
|
var _a, _b, _c;
|
533
533
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `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`),
|
535
535
|
method: "POST",
|
536
|
-
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.40", "User-Agent": "@airtop/sdk/0.1.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
537
537
|
contentType: "application/json",
|
538
538
|
requestType: "json",
|
539
539
|
body: serializers.SessionClickHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -563,7 +563,7 @@ class Windows {
|
|
563
563
|
body: _response.error.rawBody,
|
564
564
|
});
|
565
565
|
case "timeout":
|
566
|
-
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.");
|
567
567
|
case "unknown":
|
568
568
|
throw new errors.AirtopError({
|
569
569
|
message: _response.error.errorMessage,
|
@@ -586,9 +586,9 @@ class Windows {
|
|
586
586
|
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
587
587
|
var _a, _b, _c;
|
588
588
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `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`),
|
590
590
|
method: "POST",
|
591
|
-
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.40", "User-Agent": "@airtop/sdk/0.1.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
592
592
|
contentType: "application/json",
|
593
593
|
requestType: "json",
|
594
594
|
body: serializers.CreateFormFillerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -618,7 +618,7 @@ class Windows {
|
|
618
618
|
body: _response.error.rawBody,
|
619
619
|
});
|
620
620
|
case "timeout":
|
621
|
-
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.");
|
622
622
|
case "unknown":
|
623
623
|
throw new errors.AirtopError({
|
624
624
|
message: _response.error.errorMessage,
|
@@ -643,9 +643,9 @@ class Windows {
|
|
643
643
|
return __awaiter(this, void 0, void 0, function* () {
|
644
644
|
var _a, _b, _c;
|
645
645
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `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`),
|
647
647
|
method: "POST",
|
648
|
-
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.40", "User-Agent": "@airtop/sdk/0.1.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
649
649
|
contentType: "application/json",
|
650
650
|
requestType: "json",
|
651
651
|
body: serializers.FillFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -675,7 +675,7 @@ class Windows {
|
|
675
675
|
body: _response.error.rawBody,
|
676
676
|
});
|
677
677
|
case "timeout":
|
678
|
-
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.");
|
679
679
|
case "unknown":
|
680
680
|
throw new errors.AirtopError({
|
681
681
|
message: _response.error.errorMessage,
|
@@ -700,9 +700,9 @@ class Windows {
|
|
700
700
|
return __awaiter(this, void 0, void 0, function* () {
|
701
701
|
var _a, _b, _c;
|
702
702
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `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`),
|
704
704
|
method: "POST",
|
705
|
-
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.40", "User-Agent": "@airtop/sdk/0.1.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
706
706
|
contentType: "application/json",
|
707
707
|
requestType: "json",
|
708
708
|
body: serializers.SessionHoverHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -732,7 +732,7 @@ class Windows {
|
|
732
732
|
body: _response.error.rawBody,
|
733
733
|
});
|
734
734
|
case "timeout":
|
735
|
-
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.");
|
736
736
|
case "unknown":
|
737
737
|
throw new errors.AirtopError({
|
738
738
|
message: _response.error.errorMessage,
|
@@ -755,9 +755,9 @@ class Windows {
|
|
755
755
|
return __awaiter(this, void 0, void 0, function* () {
|
756
756
|
var _a, _b, _c;
|
757
757
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `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`),
|
759
759
|
method: "POST",
|
760
|
-
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.40", "User-Agent": "@airtop/sdk/0.1.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
761
761
|
contentType: "application/json",
|
762
762
|
requestType: "json",
|
763
763
|
body: serializers.SessionMonitorHandlerRequestBody.jsonOrThrow(request, {
|
@@ -789,7 +789,7 @@ class Windows {
|
|
789
789
|
body: _response.error.rawBody,
|
790
790
|
});
|
791
791
|
case "timeout":
|
792
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/monitor.");
|
792
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /v1/sessions/{sessionId}/windows/{windowId}/monitor.");
|
793
793
|
case "unknown":
|
794
794
|
throw new errors.AirtopError({
|
795
795
|
message: _response.error.errorMessage,
|
@@ -814,9 +814,9 @@ class Windows {
|
|
814
814
|
return __awaiter(this, void 0, void 0, function* () {
|
815
815
|
var _a, _b, _c;
|
816
816
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `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`),
|
818
818
|
method: "POST",
|
819
|
-
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.40", "User-Agent": "@airtop/sdk/0.1.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
820
820
|
contentType: "application/json",
|
821
821
|
requestType: "json",
|
822
822
|
body: serializers.SessionPageQueryHandlerRequestBody.jsonOrThrow(request, {
|
@@ -848,7 +848,7 @@ class Windows {
|
|
848
848
|
body: _response.error.rawBody,
|
849
849
|
});
|
850
850
|
case "timeout":
|
851
|
-
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.");
|
852
852
|
case "unknown":
|
853
853
|
throw new errors.AirtopError({
|
854
854
|
message: _response.error.errorMessage,
|
@@ -873,9 +873,9 @@ class Windows {
|
|
873
873
|
return __awaiter(this, void 0, void 0, function* () {
|
874
874
|
var _a, _b, _c;
|
875
875
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `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`),
|
877
877
|
method: "POST",
|
878
|
-
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.40", "User-Agent": "@airtop/sdk/0.1.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
879
879
|
contentType: "application/json",
|
880
880
|
requestType: "json",
|
881
881
|
body: serializers.SessionPaginatedExtractionHandlerRequestBody.jsonOrThrow(request, {
|
@@ -907,7 +907,7 @@ class Windows {
|
|
907
907
|
body: _response.error.rawBody,
|
908
908
|
});
|
909
909
|
case "timeout":
|
910
|
-
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.");
|
911
911
|
case "unknown":
|
912
912
|
throw new errors.AirtopError({
|
913
913
|
message: _response.error.errorMessage,
|
@@ -932,9 +932,9 @@ class Windows {
|
|
932
932
|
return __awaiter(this, void 0, void 0, function* () {
|
933
933
|
var _a, _b, _c;
|
934
934
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `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`),
|
936
936
|
method: "POST",
|
937
|
-
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.40", "User-Agent": "@airtop/sdk/0.1.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
938
938
|
contentType: "application/json",
|
939
939
|
requestType: "json",
|
940
940
|
body: serializers.SessionPageQueryHandlerRequestBody.jsonOrThrow(request, {
|
@@ -966,7 +966,7 @@ class Windows {
|
|
966
966
|
body: _response.error.rawBody,
|
967
967
|
});
|
968
968
|
case "timeout":
|
969
|
-
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.");
|
970
970
|
case "unknown":
|
971
971
|
throw new errors.AirtopError({
|
972
972
|
message: _response.error.errorMessage,
|
@@ -989,9 +989,9 @@ class Windows {
|
|
989
989
|
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
990
990
|
var _a, _b, _c;
|
991
991
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `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`),
|
993
993
|
method: "POST",
|
994
|
-
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.40", "User-Agent": "@airtop/sdk/0.1.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
995
995
|
contentType: "application/json",
|
996
996
|
requestType: "json",
|
997
997
|
body: serializers.ScrapeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1021,7 +1021,7 @@ class Windows {
|
|
1021
1021
|
body: _response.error.rawBody,
|
1022
1022
|
});
|
1023
1023
|
case "timeout":
|
1024
|
-
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.");
|
1025
1025
|
case "unknown":
|
1026
1026
|
throw new errors.AirtopError({
|
1027
1027
|
message: _response.error.errorMessage,
|
@@ -1044,9 +1044,9 @@ class Windows {
|
|
1044
1044
|
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
1045
1045
|
var _a, _b, _c;
|
1046
1046
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `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`),
|
1048
1048
|
method: "POST",
|
1049
|
-
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.40", "User-Agent": "@airtop/sdk/0.1.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1050
1050
|
contentType: "application/json",
|
1051
1051
|
requestType: "json",
|
1052
1052
|
body: serializers.SessionScreenshotHandlerRequestBody.jsonOrThrow(request, {
|
@@ -1078,7 +1078,7 @@ class Windows {
|
|
1078
1078
|
body: _response.error.rawBody,
|
1079
1079
|
});
|
1080
1080
|
case "timeout":
|
1081
|
-
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.");
|
1082
1082
|
case "unknown":
|
1083
1083
|
throw new errors.AirtopError({
|
1084
1084
|
message: _response.error.errorMessage,
|
@@ -1101,9 +1101,9 @@ class Windows {
|
|
1101
1101
|
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
1102
1102
|
var _a, _b, _c;
|
1103
1103
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `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`),
|
1105
1105
|
method: "POST",
|
1106
|
-
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.40", "User-Agent": "@airtop/sdk/0.1.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1107
1107
|
contentType: "application/json",
|
1108
1108
|
requestType: "json",
|
1109
1109
|
body: serializers.SessionScrollHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1133,7 +1133,7 @@ class Windows {
|
|
1133
1133
|
body: _response.error.rawBody,
|
1134
1134
|
});
|
1135
1135
|
case "timeout":
|
1136
|
-
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.");
|
1137
1137
|
case "unknown":
|
1138
1138
|
throw new errors.AirtopError({
|
1139
1139
|
message: _response.error.errorMessage,
|
@@ -1156,9 +1156,9 @@ class Windows {
|
|
1156
1156
|
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
1157
1157
|
var _a, _b, _c;
|
1158
1158
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `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`),
|
1160
1160
|
method: "POST",
|
1161
|
-
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.40", "User-Agent": "@airtop/sdk/0.1.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1162
1162
|
contentType: "application/json",
|
1163
1163
|
requestType: "json",
|
1164
1164
|
body: serializers.SessionSummaryHandlerRequestBody.jsonOrThrow(request, {
|
@@ -1190,7 +1190,7 @@ class Windows {
|
|
1190
1190
|
body: _response.error.rawBody,
|
1191
1191
|
});
|
1192
1192
|
case "timeout":
|
1193
|
-
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.");
|
1194
1194
|
case "unknown":
|
1195
1195
|
throw new errors.AirtopError({
|
1196
1196
|
message: _response.error.errorMessage,
|
@@ -1215,9 +1215,9 @@ class Windows {
|
|
1215
1215
|
return __awaiter(this, void 0, void 0, function* () {
|
1216
1216
|
var _a, _b, _c;
|
1217
1217
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
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, `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`),
|
1219
1219
|
method: "POST",
|
1220
|
-
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.40", "User-Agent": "@airtop/sdk/0.1.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1221
1221
|
contentType: "application/json",
|
1222
1222
|
requestType: "json",
|
1223
1223
|
body: serializers.SessionTypeHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1247,7 +1247,7 @@ class Windows {
|
|
1247
1247
|
body: _response.error.rawBody,
|
1248
1248
|
});
|
1249
1249
|
case "timeout":
|
1250
|
-
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.");
|
1251
1251
|
case "unknown":
|
1252
1252
|
throw new errors.AirtopError({
|
1253
1253
|
message: _response.error.errorMessage,
|
@@ -2,6 +2,8 @@
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
3
3
|
*/
|
4
4
|
export interface RequestStatusResponse {
|
5
|
+
/** The error message, if available */
|
6
|
+
error?: string;
|
5
7
|
response?: unknown;
|
6
8
|
/** The current status of the request (pending, completed, error) */
|
7
9
|
status: string;
|
@@ -13,6 +13,8 @@ export interface SessionConfigV1 {
|
|
13
13
|
profileName?: string;
|
14
14
|
/** Proxy configuration. */
|
15
15
|
proxy?: Airtop.SessionConfigV1Proxy;
|
16
|
+
/** Automatically solve captcha challenges. */
|
17
|
+
solveCaptcha?: boolean;
|
16
18
|
/** Number of minutes of inactivity (idle timeout) after which the session will terminate. The idle timeout is reset when a user makes an incoming HTTP request, AI request, or new WebSocket connection to the session. Thus, when using drivers like Puppeteer, Selenium or Playwright, the timeout reset depends on the nature of the driver request. If not specified, defaults to 10 minutes. */
|
17
19
|
timeoutMinutes?: number;
|
18
20
|
}
|
@@ -1,5 +1,5 @@
|
|
1
|
+
export * from "./UnauthorizedError";
|
2
|
+
export * from "./ForbiddenError";
|
1
3
|
export * from "./NotFoundError";
|
2
4
|
export * from "./UnprocessableEntityError";
|
3
5
|
export * from "./InternalServerError";
|
4
|
-
export * from "./UnauthorizedError";
|
5
|
-
export * from "./ForbiddenError";
|
package/dist/api/errors/index.js
CHANGED
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./UnauthorizedError"), exports);
|
18
|
+
__exportStar(require("./ForbiddenError"), exports);
|
17
19
|
__exportStar(require("./NotFoundError"), exports);
|
18
20
|
__exportStar(require("./UnprocessableEntityError"), exports);
|
19
21
|
__exportStar(require("./InternalServerError"), exports);
|
20
|
-
__exportStar(require("./UnauthorizedError"), exports);
|
21
|
-
__exportStar(require("./ForbiddenError"), exports);
|