@airtop/sdk 0.1.26 → 0.1.27
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/resources/profiles/client/Client.js +2 -2
- package/api/resources/sessions/client/Client.js +14 -14
- package/api/resources/windows/client/Client.d.ts +20 -4
- package/api/resources/windows/client/Client.js +97 -30
- package/api/resources/windows/client/requests/SessionHoverHandlerRequestBody.d.ts +4 -2
- package/api/resources/windows/client/requests/SessionPaginatedExtractionHandlerRequestBody.d.ts +4 -2
- package/api/resources/windows/client/requests/SessionScrollHandlerRequestBody.d.ts +27 -0
- package/api/resources/windows/client/requests/SessionScrollHandlerRequestBody.js +5 -0
- package/api/resources/windows/client/requests/index.d.ts +1 -0
- package/api/types/ScrollByConfig.d.ts +9 -0
- package/api/types/ScrollByConfig.js +5 -0
- package/api/types/ScrollToEdgeConfig.d.ts +9 -0
- package/api/types/ScrollToEdgeConfig.js +5 -0
- package/api/types/index.d.ts +2 -0
- package/api/types/index.js +2 -0
- package/dist/api/resources/profiles/client/Client.js +2 -2
- package/dist/api/resources/sessions/client/Client.js +14 -14
- package/dist/api/resources/windows/client/Client.d.ts +20 -4
- package/dist/api/resources/windows/client/Client.js +97 -30
- package/dist/api/resources/windows/client/requests/SessionHoverHandlerRequestBody.d.ts +4 -2
- package/dist/api/resources/windows/client/requests/SessionPaginatedExtractionHandlerRequestBody.d.ts +4 -2
- package/dist/api/resources/windows/client/requests/SessionScrollHandlerRequestBody.d.ts +27 -0
- package/dist/api/resources/windows/client/requests/SessionScrollHandlerRequestBody.js +5 -0
- package/dist/api/resources/windows/client/requests/index.d.ts +1 -0
- package/dist/api/types/ScrollByConfig.d.ts +9 -0
- package/dist/api/types/ScrollByConfig.js +5 -0
- package/dist/api/types/ScrollToEdgeConfig.d.ts +9 -0
- package/dist/api/types/ScrollToEdgeConfig.js +5 -0
- package/dist/api/types/index.d.ts +2 -0
- package/dist/api/types/index.js +2 -0
- package/dist/serialization/resources/windows/client/requests/SessionHoverHandlerRequestBody.d.ts +1 -1
- package/dist/serialization/resources/windows/client/requests/SessionHoverHandlerRequestBody.js +1 -1
- package/dist/serialization/resources/windows/client/requests/SessionPaginatedExtractionHandlerRequestBody.d.ts +1 -1
- package/dist/serialization/resources/windows/client/requests/SessionPaginatedExtractionHandlerRequestBody.js +1 -1
- package/dist/serialization/resources/windows/client/requests/SessionScrollHandlerRequestBody.d.ts +21 -0
- package/dist/serialization/resources/windows/client/requests/SessionScrollHandlerRequestBody.js +42 -0
- package/dist/serialization/resources/windows/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/windows/client/requests/index.js +3 -1
- package/dist/serialization/types/ScrollByConfig.d.ts +13 -0
- package/dist/serialization/types/ScrollByConfig.js +34 -0
- package/dist/serialization/types/ScrollToEdgeConfig.d.ts +13 -0
- package/dist/serialization/types/ScrollToEdgeConfig.js +34 -0
- package/dist/serialization/types/index.d.ts +2 -0
- package/dist/serialization/types/index.js +2 -0
- package/dist/wrapper/AirtopWindows.d.ts +2 -2
- package/dist/wrapper/AirtopWindows.js +2 -2
- package/package.json +1 -1
- package/reference.md +86 -2
- package/serialization/resources/windows/client/requests/SessionHoverHandlerRequestBody.d.ts +1 -1
- package/serialization/resources/windows/client/requests/SessionHoverHandlerRequestBody.js +1 -1
- package/serialization/resources/windows/client/requests/SessionPaginatedExtractionHandlerRequestBody.d.ts +1 -1
- package/serialization/resources/windows/client/requests/SessionPaginatedExtractionHandlerRequestBody.js +1 -1
- package/serialization/resources/windows/client/requests/SessionScrollHandlerRequestBody.d.ts +21 -0
- package/serialization/resources/windows/client/requests/SessionScrollHandlerRequestBody.js +42 -0
- package/serialization/resources/windows/client/requests/index.d.ts +1 -0
- package/serialization/resources/windows/client/requests/index.js +3 -1
- package/serialization/types/ScrollByConfig.d.ts +13 -0
- package/serialization/types/ScrollByConfig.js +34 -0
- package/serialization/types/ScrollToEdgeConfig.d.ts +13 -0
- package/serialization/types/ScrollToEdgeConfig.js +34 -0
- package/serialization/types/index.d.ts +2 -0
- package/serialization/types/index.js +2 -0
- package/wrapper/AirtopWindows.d.ts +2 -2
- package/wrapper/AirtopWindows.js +2 -2
@@ -95,9 +95,11 @@ export declare class Windows {
|
|
95
95
|
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
96
96
|
*
|
97
97
|
* @example
|
98
|
-
* await client.windows.hover("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430"
|
98
|
+
* await client.windows.hover("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
99
|
+
* elementDescription: "The search box input in the top right corner"
|
100
|
+
* })
|
99
101
|
*/
|
100
|
-
hover(sessionId: string, windowId: string, request
|
102
|
+
hover(sessionId: string, windowId: string, request: Airtop.SessionHoverHandlerRequestBody, requestOptions?: Windows.RequestOptions): Promise<Airtop.AiPromptResponse>;
|
101
103
|
/**
|
102
104
|
* Submit a prompt that queries the content of a specific browser window. You may extract content from the page, or ask a question about the page and allow the AI to answer it (ex. Is the user logged in?).
|
103
105
|
*
|
@@ -121,9 +123,11 @@ export declare class Windows {
|
|
121
123
|
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
122
124
|
*
|
123
125
|
* @example
|
124
|
-
* await client.windows.paginatedExtraction("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430"
|
126
|
+
* await client.windows.paginatedExtraction("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
127
|
+
* 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."
|
128
|
+
* })
|
125
129
|
*/
|
126
|
-
paginatedExtraction(sessionId: string, windowId: string, request
|
130
|
+
paginatedExtraction(sessionId: string, windowId: string, request: Airtop.SessionPaginatedExtractionHandlerRequestBody, requestOptions?: Windows.RequestOptions): Promise<Airtop.AiPromptResponse>;
|
127
131
|
/**
|
128
132
|
* This endpoint is deprecated. Please use the `pageQuery` endpoint instead.
|
129
133
|
*
|
@@ -162,6 +166,18 @@ export declare class Windows {
|
|
162
166
|
* await client.windows.screenshot("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
163
167
|
*/
|
164
168
|
screenshot(sessionId: string, windowId: string, request?: Airtop.SessionScreenshotHandlerRequestBody, requestOptions?: Windows.RequestOptions): Promise<Airtop.AiPromptResponse>;
|
169
|
+
/**
|
170
|
+
* Execute a scroll interaction in a specific browser window
|
171
|
+
*
|
172
|
+
* @param {string} sessionId - The session id for the window.
|
173
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
174
|
+
* @param {Airtop.SessionScrollHandlerRequestBody} request
|
175
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
176
|
+
*
|
177
|
+
* @example
|
178
|
+
* await client.windows.scroll("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
179
|
+
*/
|
180
|
+
scroll(sessionId: string, windowId: string, request?: Airtop.SessionScrollHandlerRequestBody, requestOptions?: Windows.RequestOptions): Promise<Airtop.AiPromptResponse>;
|
165
181
|
/**
|
166
182
|
* This endpoint is deprecated. Please use the `pageQuery` endpoint and ask for a summary in the prompt instead.
|
167
183
|
*
|
@@ -68,8 +68,8 @@ class Windows {
|
|
68
68
|
Authorization: yield this._getAuthorizationHeader(),
|
69
69
|
"X-Fern-Language": "JavaScript",
|
70
70
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
71
|
-
"X-Fern-SDK-Version": "0.1.
|
72
|
-
"User-Agent": "@airtop/sdk/0.1.
|
71
|
+
"X-Fern-SDK-Version": "0.1.27",
|
72
|
+
"User-Agent": "@airtop/sdk/0.1.27",
|
73
73
|
"X-Fern-Runtime": core.RUNTIME.type,
|
74
74
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
75
75
|
},
|
@@ -144,8 +144,8 @@ class Windows {
|
|
144
144
|
Authorization: yield this._getAuthorizationHeader(),
|
145
145
|
"X-Fern-Language": "JavaScript",
|
146
146
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
147
|
-
"X-Fern-SDK-Version": "0.1.
|
148
|
-
"User-Agent": "@airtop/sdk/0.1.
|
147
|
+
"X-Fern-SDK-Version": "0.1.27",
|
148
|
+
"User-Agent": "@airtop/sdk/0.1.27",
|
149
149
|
"X-Fern-Runtime": core.RUNTIME.type,
|
150
150
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
151
151
|
},
|
@@ -209,8 +209,8 @@ class Windows {
|
|
209
209
|
Authorization: yield this._getAuthorizationHeader(),
|
210
210
|
"X-Fern-Language": "JavaScript",
|
211
211
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
212
|
-
"X-Fern-SDK-Version": "0.1.
|
213
|
-
"User-Agent": "@airtop/sdk/0.1.
|
212
|
+
"X-Fern-SDK-Version": "0.1.27",
|
213
|
+
"User-Agent": "@airtop/sdk/0.1.27",
|
214
214
|
"X-Fern-Runtime": core.RUNTIME.type,
|
215
215
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
216
216
|
},
|
@@ -271,8 +271,8 @@ class Windows {
|
|
271
271
|
Authorization: yield this._getAuthorizationHeader(),
|
272
272
|
"X-Fern-Language": "JavaScript",
|
273
273
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
274
|
-
"X-Fern-SDK-Version": "0.1.
|
275
|
-
"User-Agent": "@airtop/sdk/0.1.
|
274
|
+
"X-Fern-SDK-Version": "0.1.27",
|
275
|
+
"User-Agent": "@airtop/sdk/0.1.27",
|
276
276
|
"X-Fern-Runtime": core.RUNTIME.type,
|
277
277
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
278
278
|
},
|
@@ -335,8 +335,8 @@ class Windows {
|
|
335
335
|
Authorization: yield this._getAuthorizationHeader(),
|
336
336
|
"X-Fern-Language": "JavaScript",
|
337
337
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
338
|
-
"X-Fern-SDK-Version": "0.1.
|
339
|
-
"User-Agent": "@airtop/sdk/0.1.
|
338
|
+
"X-Fern-SDK-Version": "0.1.27",
|
339
|
+
"User-Agent": "@airtop/sdk/0.1.27",
|
340
340
|
"X-Fern-Runtime": core.RUNTIME.type,
|
341
341
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
342
342
|
},
|
@@ -386,9 +386,11 @@ class Windows {
|
|
386
386
|
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
387
387
|
*
|
388
388
|
* @example
|
389
|
-
* await client.windows.hover("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430"
|
389
|
+
* await client.windows.hover("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
390
|
+
* elementDescription: "The search box input in the top right corner"
|
391
|
+
* })
|
390
392
|
*/
|
391
|
-
hover(sessionId, windowId, request
|
393
|
+
hover(sessionId, windowId, request, requestOptions) {
|
392
394
|
var _a, _b;
|
393
395
|
return __awaiter(this, void 0, void 0, function* () {
|
394
396
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
@@ -398,8 +400,8 @@ class Windows {
|
|
398
400
|
Authorization: yield this._getAuthorizationHeader(),
|
399
401
|
"X-Fern-Language": "JavaScript",
|
400
402
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
401
|
-
"X-Fern-SDK-Version": "0.1.
|
402
|
-
"User-Agent": "@airtop/sdk/0.1.
|
403
|
+
"X-Fern-SDK-Version": "0.1.27",
|
404
|
+
"User-Agent": "@airtop/sdk/0.1.27",
|
403
405
|
"X-Fern-Runtime": core.RUNTIME.type,
|
404
406
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
405
407
|
},
|
@@ -463,8 +465,8 @@ class Windows {
|
|
463
465
|
Authorization: yield this._getAuthorizationHeader(),
|
464
466
|
"X-Fern-Language": "JavaScript",
|
465
467
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
466
|
-
"X-Fern-SDK-Version": "0.1.
|
467
|
-
"User-Agent": "@airtop/sdk/0.1.
|
468
|
+
"X-Fern-SDK-Version": "0.1.27",
|
469
|
+
"User-Agent": "@airtop/sdk/0.1.27",
|
468
470
|
"X-Fern-Runtime": core.RUNTIME.type,
|
469
471
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
470
472
|
},
|
@@ -516,9 +518,11 @@ class Windows {
|
|
516
518
|
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
517
519
|
*
|
518
520
|
* @example
|
519
|
-
* await client.windows.paginatedExtraction("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430"
|
521
|
+
* await client.windows.paginatedExtraction("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
522
|
+
* 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."
|
523
|
+
* })
|
520
524
|
*/
|
521
|
-
paginatedExtraction(sessionId, windowId, request
|
525
|
+
paginatedExtraction(sessionId, windowId, request, requestOptions) {
|
522
526
|
var _a, _b;
|
523
527
|
return __awaiter(this, void 0, void 0, function* () {
|
524
528
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
@@ -528,8 +532,8 @@ class Windows {
|
|
528
532
|
Authorization: yield this._getAuthorizationHeader(),
|
529
533
|
"X-Fern-Language": "JavaScript",
|
530
534
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
531
|
-
"X-Fern-SDK-Version": "0.1.
|
532
|
-
"User-Agent": "@airtop/sdk/0.1.
|
535
|
+
"X-Fern-SDK-Version": "0.1.27",
|
536
|
+
"User-Agent": "@airtop/sdk/0.1.27",
|
533
537
|
"X-Fern-Runtime": core.RUNTIME.type,
|
534
538
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
535
539
|
},
|
@@ -595,8 +599,8 @@ class Windows {
|
|
595
599
|
Authorization: yield this._getAuthorizationHeader(),
|
596
600
|
"X-Fern-Language": "JavaScript",
|
597
601
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
598
|
-
"X-Fern-SDK-Version": "0.1.
|
599
|
-
"User-Agent": "@airtop/sdk/0.1.
|
602
|
+
"X-Fern-SDK-Version": "0.1.27",
|
603
|
+
"User-Agent": "@airtop/sdk/0.1.27",
|
600
604
|
"X-Fern-Runtime": core.RUNTIME.type,
|
601
605
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
602
606
|
},
|
@@ -660,8 +664,8 @@ class Windows {
|
|
660
664
|
Authorization: yield this._getAuthorizationHeader(),
|
661
665
|
"X-Fern-Language": "JavaScript",
|
662
666
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
663
|
-
"X-Fern-SDK-Version": "0.1.
|
664
|
-
"User-Agent": "@airtop/sdk/0.1.
|
667
|
+
"X-Fern-SDK-Version": "0.1.27",
|
668
|
+
"User-Agent": "@airtop/sdk/0.1.27",
|
665
669
|
"X-Fern-Runtime": core.RUNTIME.type,
|
666
670
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
667
671
|
},
|
@@ -723,8 +727,8 @@ class Windows {
|
|
723
727
|
Authorization: yield this._getAuthorizationHeader(),
|
724
728
|
"X-Fern-Language": "JavaScript",
|
725
729
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
726
|
-
"X-Fern-SDK-Version": "0.1.
|
727
|
-
"User-Agent": "@airtop/sdk/0.1.
|
730
|
+
"X-Fern-SDK-Version": "0.1.27",
|
731
|
+
"User-Agent": "@airtop/sdk/0.1.27",
|
728
732
|
"X-Fern-Runtime": core.RUNTIME.type,
|
729
733
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
730
734
|
},
|
@@ -767,6 +771,69 @@ class Windows {
|
|
767
771
|
}
|
768
772
|
});
|
769
773
|
}
|
774
|
+
/**
|
775
|
+
* Execute a scroll interaction in a specific browser window
|
776
|
+
*
|
777
|
+
* @param {string} sessionId - The session id for the window.
|
778
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
779
|
+
* @param {Airtop.SessionScrollHandlerRequestBody} request
|
780
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
781
|
+
*
|
782
|
+
* @example
|
783
|
+
* await client.windows.scroll("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
784
|
+
*/
|
785
|
+
scroll(sessionId, windowId, request = {}, requestOptions) {
|
786
|
+
var _a, _b;
|
787
|
+
return __awaiter(this, void 0, void 0, function* () {
|
788
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
789
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/scroll`),
|
790
|
+
method: "POST",
|
791
|
+
headers: {
|
792
|
+
Authorization: yield this._getAuthorizationHeader(),
|
793
|
+
"X-Fern-Language": "JavaScript",
|
794
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
795
|
+
"X-Fern-SDK-Version": "0.1.27",
|
796
|
+
"User-Agent": "@airtop/sdk/0.1.27",
|
797
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
798
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
799
|
+
},
|
800
|
+
contentType: "application/json",
|
801
|
+
requestType: "json",
|
802
|
+
body: serializers.SessionScrollHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
803
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
804
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
805
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
806
|
+
});
|
807
|
+
if (_response.ok) {
|
808
|
+
return serializers.AiPromptResponse.parseOrThrow(_response.body, {
|
809
|
+
unrecognizedObjectKeys: "passthrough",
|
810
|
+
allowUnrecognizedUnionMembers: true,
|
811
|
+
allowUnrecognizedEnumValues: true,
|
812
|
+
skipValidation: true,
|
813
|
+
breadcrumbsPrefix: ["response"],
|
814
|
+
});
|
815
|
+
}
|
816
|
+
if (_response.error.reason === "status-code") {
|
817
|
+
throw new errors.AirtopError({
|
818
|
+
statusCode: _response.error.statusCode,
|
819
|
+
body: _response.error.body,
|
820
|
+
});
|
821
|
+
}
|
822
|
+
switch (_response.error.reason) {
|
823
|
+
case "non-json":
|
824
|
+
throw new errors.AirtopError({
|
825
|
+
statusCode: _response.error.statusCode,
|
826
|
+
body: _response.error.rawBody,
|
827
|
+
});
|
828
|
+
case "timeout":
|
829
|
+
throw new errors.AirtopTimeoutError();
|
830
|
+
case "unknown":
|
831
|
+
throw new errors.AirtopError({
|
832
|
+
message: _response.error.errorMessage,
|
833
|
+
});
|
834
|
+
}
|
835
|
+
});
|
836
|
+
}
|
770
837
|
/**
|
771
838
|
* This endpoint is deprecated. Please use the `pageQuery` endpoint and ask for a summary in the prompt instead.
|
772
839
|
*
|
@@ -788,8 +855,8 @@ class Windows {
|
|
788
855
|
Authorization: yield this._getAuthorizationHeader(),
|
789
856
|
"X-Fern-Language": "JavaScript",
|
790
857
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
791
|
-
"X-Fern-SDK-Version": "0.1.
|
792
|
-
"User-Agent": "@airtop/sdk/0.1.
|
858
|
+
"X-Fern-SDK-Version": "0.1.27",
|
859
|
+
"User-Agent": "@airtop/sdk/0.1.27",
|
793
860
|
"X-Fern-Runtime": core.RUNTIME.type,
|
794
861
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
795
862
|
},
|
@@ -855,8 +922,8 @@ class Windows {
|
|
855
922
|
Authorization: yield this._getAuthorizationHeader(),
|
856
923
|
"X-Fern-Language": "JavaScript",
|
857
924
|
"X-Fern-SDK-Name": "@airtop/sdk",
|
858
|
-
"X-Fern-SDK-Version": "0.1.
|
859
|
-
"User-Agent": "@airtop/sdk/0.1.
|
925
|
+
"X-Fern-SDK-Version": "0.1.27",
|
926
|
+
"User-Agent": "@airtop/sdk/0.1.27",
|
860
927
|
"X-Fern-Runtime": core.RUNTIME.type,
|
861
928
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
862
929
|
},
|
@@ -4,7 +4,9 @@
|
|
4
4
|
import * as Airtop from "../../../../index";
|
5
5
|
/**
|
6
6
|
* @example
|
7
|
-
* {
|
7
|
+
* {
|
8
|
+
* elementDescription: "The search box input in the top right corner"
|
9
|
+
* }
|
8
10
|
*/
|
9
11
|
export interface SessionHoverHandlerRequestBody {
|
10
12
|
clientRequestId?: string;
|
@@ -13,7 +15,7 @@ export interface SessionHoverHandlerRequestBody {
|
|
13
15
|
/** A credit threshold that, once exceeded, will cause the operation to be cancelled. Note that this is *not* a hard limit, but a threshold that is checked periodically during the course of fulfilling the request. A default threshold is used if not specified, but you can use this option to increase or decrease as needed. Set to 0 to disable this feature entirely (not recommended). */
|
14
16
|
costThresholdCredits?: number;
|
15
17
|
/** A natural language description of where to hover (e.g. 'the search box', 'username field'). The interaction will be aborted if the target element cannot be found. */
|
16
|
-
elementDescription
|
18
|
+
elementDescription: string;
|
17
19
|
/**
|
18
20
|
* A time threshold in seconds that, once exceeded, will cause the operation to be cancelled. Note that this is *not* a hard limit, but a threshold that is checked periodically during the course of fulfilling the request. A default threshold is used if not specified, but you can use this option to increase or decrease as needed. Set to 0 to disable this feature entirely (not recommended).
|
19
21
|
*
|
package/dist/api/resources/windows/client/requests/SessionPaginatedExtractionHandlerRequestBody.d.ts
CHANGED
@@ -4,7 +4,9 @@
|
|
4
4
|
import * as Airtop from "../../../../index";
|
5
5
|
/**
|
6
6
|
* @example
|
7
|
-
* {
|
7
|
+
* {
|
8
|
+
* 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."
|
9
|
+
* }
|
8
10
|
*/
|
9
11
|
export interface SessionPaginatedExtractionHandlerRequestBody {
|
10
12
|
clientRequestId?: string;
|
@@ -13,7 +15,7 @@ export interface SessionPaginatedExtractionHandlerRequestBody {
|
|
13
15
|
/** A credit threshold that, once exceeded, will cause the operation to be cancelled. Note that this is *not* a hard limit, but a threshold that is checked periodically during the course of fulfilling the request. A default threshold is used if not specified, but you can use this option to increase or decrease as needed. Set to 0 to disable this feature entirely (not recommended). */
|
14
16
|
costThresholdCredits?: number;
|
15
17
|
/** A prompt providing the Airtop AI model with additional direction or constraints about the page and the details you want to extract from the page. */
|
16
|
-
prompt
|
18
|
+
prompt: string;
|
17
19
|
/**
|
18
20
|
* A time threshold in seconds that, once exceeded, will cause the operation to be cancelled. Note that this is *not* a hard limit, but a threshold that is checked periodically during the course of fulfilling the request. A default threshold is used if not specified, but you can use this option to increase or decrease as needed. Set to 0 to disable this feature entirely (not recommended).
|
19
21
|
*
|
@@ -0,0 +1,27 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as Airtop from "../../../../index";
|
5
|
+
/**
|
6
|
+
* @example
|
7
|
+
* {}
|
8
|
+
*/
|
9
|
+
export interface SessionScrollHandlerRequestBody {
|
10
|
+
clientRequestId?: string;
|
11
|
+
/** Request configuration */
|
12
|
+
configuration?: Airtop.MicroInteractionConfig;
|
13
|
+
/** A credit threshold that, once exceeded, will cause the operation to be cancelled. Note that this is *not* a hard limit, but a threshold that is checked periodically during the course of fulfilling the request. A default threshold is used if not specified, but you can use this option to increase or decrease as needed. Set to 0 to disable this feature entirely (not recommended). */
|
14
|
+
costThresholdCredits?: number;
|
15
|
+
/** The amount of pixels/percentage to scroll horizontally or vertically relative to the current scroll position. Positive values scroll right and down, negative values scroll left and up. If a scrollToElement value is provided, scrollBy/scrollToEdge values will be ignored. */
|
16
|
+
scrollBy?: Airtop.ScrollByConfig;
|
17
|
+
/** Scroll to the top or bottom of the page, or to the left or right of the page. ScrollToEdge values will take precedence over the scrollBy values, and scrollToEdge will be executed first. If a scrollToElement value is provided, scrollToEdge/scrollBy values will be ignored. */
|
18
|
+
scrollToEdge?: Airtop.ScrollToEdgeConfig;
|
19
|
+
/** A natural language description of where to scroll (e.g. 'the search box', 'username field'). The interaction will be aborted if the target element cannot be found. If provided, scrollToEdge/scrollBy values will be ignored. */
|
20
|
+
scrollToElement?: string;
|
21
|
+
/**
|
22
|
+
* A time threshold in seconds that, once exceeded, will cause the operation to be cancelled. Note that this is *not* a hard limit, but a threshold that is checked periodically during the course of fulfilling the request. A default threshold is used if not specified, but you can use this option to increase or decrease as needed. Set to 0 to disable this feature entirely (not recommended).
|
23
|
+
*
|
24
|
+
* This setting does not extend the maximum session duration provided at the time of session creation.
|
25
|
+
*/
|
26
|
+
timeThresholdSeconds?: number;
|
27
|
+
}
|
@@ -6,5 +6,6 @@ export { type SessionHoverHandlerRequestBody } from "./SessionHoverHandlerReques
|
|
6
6
|
export { type SessionPaginatedExtractionHandlerRequestBody } from "./SessionPaginatedExtractionHandlerRequestBody";
|
7
7
|
export { type ScrapeContentRequest } from "./ScrapeContentRequest";
|
8
8
|
export { type SessionScreenshotHandlerRequestBody } from "./SessionScreenshotHandlerRequestBody";
|
9
|
+
export { type SessionScrollHandlerRequestBody } from "./SessionScrollHandlerRequestBody";
|
9
10
|
export { type SessionSummaryHandlerRequestBody } from "./SessionSummaryHandlerRequestBody";
|
10
11
|
export { type SessionTypeHandlerRequestBody } from "./SessionTypeHandlerRequestBody";
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
export interface ScrollByConfig {
|
5
|
+
/** The amount of pixels/percentage to scroll horizontally. Percentage values should be between 0 and 100. Positive values scroll right, negative values scroll left. */
|
6
|
+
xAxis?: string;
|
7
|
+
/** The amount of pixels/percentage to scroll vertically. Percentage values should be between 0 and 100. Positive values scroll down, negative values scroll up. */
|
8
|
+
yAxis?: string;
|
9
|
+
}
|
@@ -31,6 +31,8 @@ export * from "./ScrapeResponseOutput";
|
|
31
31
|
export * from "./ScreenshotConfig";
|
32
32
|
export * from "./ScreenshotMetadata";
|
33
33
|
export * from "./ScreenshotRequestConfig";
|
34
|
+
export * from "./ScrollByConfig";
|
35
|
+
export * from "./ScrollToEdgeConfig";
|
34
36
|
export * from "./AirtopProxyConfiguration";
|
35
37
|
export * from "./ProxyCredentials";
|
36
38
|
export * from "./Proxy";
|
package/dist/api/types/index.js
CHANGED
@@ -47,6 +47,8 @@ __exportStar(require("./ScrapeResponseOutput"), exports);
|
|
47
47
|
__exportStar(require("./ScreenshotConfig"), exports);
|
48
48
|
__exportStar(require("./ScreenshotMetadata"), exports);
|
49
49
|
__exportStar(require("./ScreenshotRequestConfig"), exports);
|
50
|
+
__exportStar(require("./ScrollByConfig"), exports);
|
51
|
+
__exportStar(require("./ScrollToEdgeConfig"), exports);
|
50
52
|
__exportStar(require("./AirtopProxyConfiguration"), exports);
|
51
53
|
__exportStar(require("./ProxyCredentials"), exports);
|
52
54
|
__exportStar(require("./Proxy"), exports);
|
package/dist/serialization/resources/windows/client/requests/SessionHoverHandlerRequestBody.d.ts
CHANGED
@@ -11,7 +11,7 @@ export declare namespace SessionHoverHandlerRequestBody {
|
|
11
11
|
clientRequestId?: string | null;
|
12
12
|
configuration?: MicroInteractionConfig.Raw | null;
|
13
13
|
costThresholdCredits?: number | null;
|
14
|
-
elementDescription
|
14
|
+
elementDescription: string;
|
15
15
|
timeThresholdSeconds?: number | null;
|
16
16
|
}
|
17
17
|
}
|
package/dist/serialization/resources/windows/client/requests/SessionHoverHandlerRequestBody.js
CHANGED
@@ -33,6 +33,6 @@ exports.SessionHoverHandlerRequestBody = core.serialization.object({
|
|
33
33
|
clientRequestId: core.serialization.string().optional(),
|
34
34
|
configuration: MicroInteractionConfig_1.MicroInteractionConfig.optional(),
|
35
35
|
costThresholdCredits: core.serialization.number().optional(),
|
36
|
-
elementDescription: core.serialization.string()
|
36
|
+
elementDescription: core.serialization.string(),
|
37
37
|
timeThresholdSeconds: core.serialization.number().optional(),
|
38
38
|
});
|
@@ -11,7 +11,7 @@ export declare namespace SessionPaginatedExtractionHandlerRequestBody {
|
|
11
11
|
clientRequestId?: string | null;
|
12
12
|
configuration?: PaginatedExtractionConfig.Raw | null;
|
13
13
|
costThresholdCredits?: number | null;
|
14
|
-
prompt
|
14
|
+
prompt: string;
|
15
15
|
timeThresholdSeconds?: number | null;
|
16
16
|
}
|
17
17
|
}
|
@@ -33,6 +33,6 @@ exports.SessionPaginatedExtractionHandlerRequestBody = core.serialization.object
|
|
33
33
|
clientRequestId: core.serialization.string().optional(),
|
34
34
|
configuration: PaginatedExtractionConfig_1.PaginatedExtractionConfig.optional(),
|
35
35
|
costThresholdCredits: core.serialization.number().optional(),
|
36
|
-
prompt: core.serialization.string()
|
36
|
+
prompt: core.serialization.string(),
|
37
37
|
timeThresholdSeconds: core.serialization.number().optional(),
|
38
38
|
});
|
package/dist/serialization/resources/windows/client/requests/SessionScrollHandlerRequestBody.d.ts
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as serializers from "../../../../index";
|
5
|
+
import * as Airtop from "../../../../../api/index";
|
6
|
+
import * as core from "../../../../../core";
|
7
|
+
import { MicroInteractionConfig } from "../../../../types/MicroInteractionConfig";
|
8
|
+
import { ScrollByConfig } from "../../../../types/ScrollByConfig";
|
9
|
+
import { ScrollToEdgeConfig } from "../../../../types/ScrollToEdgeConfig";
|
10
|
+
export declare const SessionScrollHandlerRequestBody: core.serialization.Schema<serializers.SessionScrollHandlerRequestBody.Raw, Airtop.SessionScrollHandlerRequestBody>;
|
11
|
+
export declare namespace SessionScrollHandlerRequestBody {
|
12
|
+
interface Raw {
|
13
|
+
clientRequestId?: string | null;
|
14
|
+
configuration?: MicroInteractionConfig.Raw | null;
|
15
|
+
costThresholdCredits?: number | null;
|
16
|
+
scrollBy?: ScrollByConfig.Raw | null;
|
17
|
+
scrollToEdge?: ScrollToEdgeConfig.Raw | null;
|
18
|
+
scrollToElement?: string | null;
|
19
|
+
timeThresholdSeconds?: number | null;
|
20
|
+
}
|
21
|
+
}
|
package/dist/serialization/resources/windows/client/requests/SessionScrollHandlerRequestBody.js
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
10
|
+
}
|
11
|
+
Object.defineProperty(o, k2, desc);
|
12
|
+
}) : (function(o, m, k, k2) {
|
13
|
+
if (k2 === undefined) k2 = k;
|
14
|
+
o[k2] = m[k];
|
15
|
+
}));
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
18
|
+
}) : function(o, v) {
|
19
|
+
o["default"] = v;
|
20
|
+
});
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
22
|
+
if (mod && mod.__esModule) return mod;
|
23
|
+
var result = {};
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
25
|
+
__setModuleDefault(result, mod);
|
26
|
+
return result;
|
27
|
+
};
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
+
exports.SessionScrollHandlerRequestBody = void 0;
|
30
|
+
const core = __importStar(require("../../../../../core"));
|
31
|
+
const MicroInteractionConfig_1 = require("../../../../types/MicroInteractionConfig");
|
32
|
+
const ScrollByConfig_1 = require("../../../../types/ScrollByConfig");
|
33
|
+
const ScrollToEdgeConfig_1 = require("../../../../types/ScrollToEdgeConfig");
|
34
|
+
exports.SessionScrollHandlerRequestBody = core.serialization.object({
|
35
|
+
clientRequestId: core.serialization.string().optional(),
|
36
|
+
configuration: MicroInteractionConfig_1.MicroInteractionConfig.optional(),
|
37
|
+
costThresholdCredits: core.serialization.number().optional(),
|
38
|
+
scrollBy: ScrollByConfig_1.ScrollByConfig.optional(),
|
39
|
+
scrollToEdge: ScrollToEdgeConfig_1.ScrollToEdgeConfig.optional(),
|
40
|
+
scrollToElement: core.serialization.string().optional(),
|
41
|
+
timeThresholdSeconds: core.serialization.number().optional(),
|
42
|
+
});
|
@@ -5,5 +5,6 @@ export { SessionHoverHandlerRequestBody } from "./SessionHoverHandlerRequestBody
|
|
5
5
|
export { SessionPaginatedExtractionHandlerRequestBody } from "./SessionPaginatedExtractionHandlerRequestBody";
|
6
6
|
export { ScrapeContentRequest } from "./ScrapeContentRequest";
|
7
7
|
export { SessionScreenshotHandlerRequestBody } from "./SessionScreenshotHandlerRequestBody";
|
8
|
+
export { SessionScrollHandlerRequestBody } from "./SessionScrollHandlerRequestBody";
|
8
9
|
export { SessionSummaryHandlerRequestBody } from "./SessionSummaryHandlerRequestBody";
|
9
10
|
export { SessionTypeHandlerRequestBody } from "./SessionTypeHandlerRequestBody";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.SessionTypeHandlerRequestBody = exports.SessionSummaryHandlerRequestBody = exports.SessionScreenshotHandlerRequestBody = exports.ScrapeContentRequest = exports.SessionPaginatedExtractionHandlerRequestBody = exports.SessionHoverHandlerRequestBody = exports.SessionClickHandlerRequestBody = exports.WindowLoadUrlV1Body = exports.CreateWindowInputV1Body = void 0;
|
3
|
+
exports.SessionTypeHandlerRequestBody = exports.SessionSummaryHandlerRequestBody = exports.SessionScrollHandlerRequestBody = exports.SessionScreenshotHandlerRequestBody = exports.ScrapeContentRequest = exports.SessionPaginatedExtractionHandlerRequestBody = exports.SessionHoverHandlerRequestBody = exports.SessionClickHandlerRequestBody = exports.WindowLoadUrlV1Body = exports.CreateWindowInputV1Body = void 0;
|
4
4
|
var CreateWindowInputV1Body_1 = require("./CreateWindowInputV1Body");
|
5
5
|
Object.defineProperty(exports, "CreateWindowInputV1Body", { enumerable: true, get: function () { return CreateWindowInputV1Body_1.CreateWindowInputV1Body; } });
|
6
6
|
var WindowLoadUrlV1Body_1 = require("./WindowLoadUrlV1Body");
|
@@ -15,6 +15,8 @@ var ScrapeContentRequest_1 = require("./ScrapeContentRequest");
|
|
15
15
|
Object.defineProperty(exports, "ScrapeContentRequest", { enumerable: true, get: function () { return ScrapeContentRequest_1.ScrapeContentRequest; } });
|
16
16
|
var SessionScreenshotHandlerRequestBody_1 = require("./SessionScreenshotHandlerRequestBody");
|
17
17
|
Object.defineProperty(exports, "SessionScreenshotHandlerRequestBody", { enumerable: true, get: function () { return SessionScreenshotHandlerRequestBody_1.SessionScreenshotHandlerRequestBody; } });
|
18
|
+
var SessionScrollHandlerRequestBody_1 = require("./SessionScrollHandlerRequestBody");
|
19
|
+
Object.defineProperty(exports, "SessionScrollHandlerRequestBody", { enumerable: true, get: function () { return SessionScrollHandlerRequestBody_1.SessionScrollHandlerRequestBody; } });
|
18
20
|
var SessionSummaryHandlerRequestBody_1 = require("./SessionSummaryHandlerRequestBody");
|
19
21
|
Object.defineProperty(exports, "SessionSummaryHandlerRequestBody", { enumerable: true, get: function () { return SessionSummaryHandlerRequestBody_1.SessionSummaryHandlerRequestBody; } });
|
20
22
|
var SessionTypeHandlerRequestBody_1 = require("./SessionTypeHandlerRequestBody");
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as serializers from "../index";
|
5
|
+
import * as Airtop from "../../api/index";
|
6
|
+
import * as core from "../../core";
|
7
|
+
export declare const ScrollByConfig: core.serialization.ObjectSchema<serializers.ScrollByConfig.Raw, Airtop.ScrollByConfig>;
|
8
|
+
export declare namespace ScrollByConfig {
|
9
|
+
interface Raw {
|
10
|
+
xAxis?: string | null;
|
11
|
+
yAxis?: string | null;
|
12
|
+
}
|
13
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
10
|
+
}
|
11
|
+
Object.defineProperty(o, k2, desc);
|
12
|
+
}) : (function(o, m, k, k2) {
|
13
|
+
if (k2 === undefined) k2 = k;
|
14
|
+
o[k2] = m[k];
|
15
|
+
}));
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
18
|
+
}) : function(o, v) {
|
19
|
+
o["default"] = v;
|
20
|
+
});
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
22
|
+
if (mod && mod.__esModule) return mod;
|
23
|
+
var result = {};
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
25
|
+
__setModuleDefault(result, mod);
|
26
|
+
return result;
|
27
|
+
};
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
+
exports.ScrollByConfig = void 0;
|
30
|
+
const core = __importStar(require("../../core"));
|
31
|
+
exports.ScrollByConfig = core.serialization.object({
|
32
|
+
xAxis: core.serialization.string().optional(),
|
33
|
+
yAxis: core.serialization.string().optional(),
|
34
|
+
});
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as serializers from "../index";
|
5
|
+
import * as Airtop from "../../api/index";
|
6
|
+
import * as core from "../../core";
|
7
|
+
export declare const ScrollToEdgeConfig: core.serialization.ObjectSchema<serializers.ScrollToEdgeConfig.Raw, Airtop.ScrollToEdgeConfig>;
|
8
|
+
export declare namespace ScrollToEdgeConfig {
|
9
|
+
interface Raw {
|
10
|
+
xAxis?: string | null;
|
11
|
+
yAxis?: string | null;
|
12
|
+
}
|
13
|
+
}
|