@airtop/sdk 0.1.35-beta0 → 0.1.36
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/Client.d.ts +0 -3
- package/Client.js +6 -11
- package/README.md +10 -9
- package/api/resources/automations/client/Client.d.ts +8 -8
- package/api/resources/automations/client/Client.js +12 -12
- package/api/resources/index.d.ts +0 -3
- package/api/resources/index.js +1 -4
- package/api/resources/profiles/client/Client.js +1 -1
- package/api/resources/requests/client/Client.js +1 -1
- package/api/resources/sessions/client/Client.d.ts +0 -10
- package/api/resources/sessions/client/Client.js +6 -52
- package/api/resources/sessions/types/SessionsEventsResponse.d.ts +4 -4
- package/api/resources/sessions/types/index.d.ts +1 -1
- package/api/resources/sessions/types/index.js +1 -1
- package/api/resources/windows/client/Client.d.ts +39 -99
- package/api/resources/windows/client/Client.js +125 -400
- package/{dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts → api/resources/windows/client/requests/AsyncCreateFormFillerRequest.d.ts} +2 -4
- package/api/resources/windows/client/requests/AsyncFillFormRequest.d.ts +27 -0
- package/api/resources/windows/client/requests/{AsyncScreenshotRequest.d.ts → CreateFormFillerRequest.d.ts} +2 -2
- package/api/resources/windows/client/requests/FillFormRequest.d.ts +27 -0
- package/api/resources/windows/client/requests/index.d.ts +4 -9
- package/api/types/index.d.ts +0 -20
- package/api/types/index.js +0 -20
- package/dist/Client.d.ts +0 -3
- package/dist/Client.js +6 -11
- package/dist/api/resources/automations/client/Client.d.ts +8 -8
- package/dist/api/resources/automations/client/Client.js +12 -12
- package/dist/api/resources/index.d.ts +0 -3
- package/dist/api/resources/index.js +1 -4
- package/dist/api/resources/profiles/client/Client.js +1 -1
- package/dist/api/resources/requests/client/Client.js +1 -1
- package/dist/api/resources/sessions/client/Client.d.ts +0 -10
- package/dist/api/resources/sessions/client/Client.js +6 -52
- package/dist/api/resources/sessions/types/SessionsEventsResponse.d.ts +4 -4
- package/dist/api/resources/sessions/types/index.d.ts +1 -1
- package/dist/api/resources/sessions/types/index.js +1 -1
- package/dist/api/resources/windows/client/Client.d.ts +39 -99
- package/dist/api/resources/windows/client/Client.js +125 -400
- package/{api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts → dist/api/resources/windows/client/requests/AsyncCreateFormFillerRequest.d.ts} +2 -4
- package/dist/api/resources/windows/client/requests/AsyncFillFormRequest.d.ts +27 -0
- package/dist/api/resources/windows/client/requests/{AsyncScreenshotRequest.d.ts → CreateFormFillerRequest.d.ts} +2 -2
- package/dist/api/resources/windows/client/requests/FillFormRequest.d.ts +27 -0
- package/dist/api/resources/windows/client/requests/index.d.ts +4 -9
- package/dist/api/types/index.d.ts +0 -20
- package/dist/api/types/index.js +0 -20
- package/dist/serialization/resources/index.d.ts +0 -3
- package/dist/serialization/resources/index.js +1 -4
- package/dist/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +5 -5
- package/dist/serialization/resources/sessions/types/SessionsEventsResponse.js +2 -2
- package/dist/serialization/resources/sessions/types/index.d.ts +1 -1
- package/dist/serialization/resources/sessions/types/index.js +1 -1
- package/dist/serialization/resources/windows/client/requests/{AsyncHoverRequest.d.ts → AsyncCreateFormFillerRequest.d.ts} +4 -5
- package/dist/serialization/resources/windows/client/requests/{AsyncSummarizeContentRequest.js → AsyncCreateFormFillerRequest.js} +4 -5
- package/{serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts → dist/serialization/resources/windows/client/requests/AsyncFillFormRequest.d.ts} +4 -5
- package/dist/serialization/resources/windows/client/requests/{AsyncMonitorRequest.js → AsyncFillFormRequest.js} +4 -5
- package/dist/serialization/resources/windows/client/requests/{AsyncPageQueryRequest.d.ts → CreateFormFillerRequest.d.ts} +4 -6
- package/dist/serialization/resources/windows/client/requests/{AsyncClickRequest.js → CreateFormFillerRequest.js} +4 -6
- package/dist/serialization/resources/windows/client/requests/{AsyncMonitorRequest.d.ts → FillFormRequest.d.ts} +4 -5
- package/{serialization/resources/windows/client/requests/AsyncMonitorRequest.js → dist/serialization/resources/windows/client/requests/FillFormRequest.js} +4 -5
- package/dist/serialization/resources/windows/client/requests/index.d.ts +4 -9
- package/dist/serialization/resources/windows/client/requests/index.js +9 -19
- package/dist/serialization/types/index.d.ts +0 -20
- package/dist/serialization/types/index.js +0 -20
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/AirtopClient.d.ts +1 -3
- package/dist/wrapper/AirtopClient.js +3 -5
- package/dist/wrapper/AirtopRequests.js +1 -1
- package/dist/wrapper/AirtopWindows.d.ts +27 -1
- package/dist/wrapper/AirtopWindows.js +40 -0
- package/package.json +2 -3
- package/reference.md +257 -1274
- package/serialization/resources/index.d.ts +0 -3
- package/serialization/resources/index.js +1 -4
- package/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +5 -5
- package/serialization/resources/sessions/types/SessionsEventsResponse.js +2 -2
- package/serialization/resources/sessions/types/index.d.ts +1 -1
- package/serialization/resources/sessions/types/index.js +1 -1
- package/serialization/resources/windows/client/requests/AsyncCreateFormFillerRequest.d.ts +18 -0
- package/serialization/resources/windows/client/requests/{AsyncSummarizeContentRequest.js → AsyncCreateFormFillerRequest.js} +4 -5
- package/serialization/resources/windows/client/requests/{AsyncScreenshotRequest.d.ts → AsyncFillFormRequest.d.ts} +4 -4
- package/{dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js → serialization/resources/windows/client/requests/AsyncFillFormRequest.js} +4 -4
- package/{dist/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts → serialization/resources/windows/client/requests/CreateFormFillerRequest.d.ts} +4 -6
- package/{dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js → serialization/resources/windows/client/requests/CreateFormFillerRequest.js} +4 -5
- package/{dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts → serialization/resources/windows/client/requests/FillFormRequest.d.ts} +4 -4
- package/serialization/resources/windows/client/requests/{AsyncScreenshotRequest.js → FillFormRequest.js} +4 -4
- package/serialization/resources/windows/client/requests/index.d.ts +4 -9
- package/serialization/resources/windows/client/requests/index.js +9 -19
- package/serialization/types/index.d.ts +0 -20
- package/serialization/types/index.js +0 -20
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/AirtopClient.d.ts +1 -3
- package/wrapper/AirtopClient.js +3 -5
- package/wrapper/AirtopRequests.js +1 -1
- package/wrapper/AirtopWindows.d.ts +27 -1
- package/wrapper/AirtopWindows.js +40 -0
- package/api/resources/files/client/Client.d.ts +0 -69
- package/api/resources/files/client/Client.js +0 -286
- package/api/resources/files/client/index.d.ts +0 -1
- package/api/resources/files/client/index.js +0 -17
- package/api/resources/files/client/requests/CreateFileRestInputV1.d.ts +0 -20
- package/api/resources/files/client/requests/FilesListRequest.d.ts +0 -24
- package/api/resources/files/client/requests/index.d.ts +0 -2
- package/api/resources/files/client/requests/index.js +0 -2
- package/api/resources/files/index.d.ts +0 -2
- package/api/resources/files/index.js +0 -18
- package/api/resources/files/types/CreateFileRestInputV1FileType.d.ts +0 -13
- package/api/resources/files/types/CreateFileRestInputV1FileType.js +0 -12
- package/api/resources/files/types/index.d.ts +0 -1
- package/api/resources/files/types/index.js +0 -17
- package/api/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -29
- package/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -27
- package/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -27
- package/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -29
- package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -27
- package/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -29
- package/api/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -5
- package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -5
- package/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -37
- package/api/resources/windows/client/requests/AsyncTypeRequest.js +0 -5
- package/api/types/CreateFileV1.d.ts +0 -24
- package/api/types/CreateFileV1.js +0 -5
- package/api/types/CreateFileV1FileType.d.ts +0 -13
- package/api/types/CreateFileV1FileType.js +0 -12
- package/api/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.d.ts +0 -10
- package/api/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.js +0 -5
- package/api/types/EnvelopeGetFileV1EnvelopeDefaultMeta.d.ts +0 -10
- package/api/types/EnvelopeGetFileV1EnvelopeDefaultMeta.js +0 -5
- package/api/types/ExtensionConfigurationOutput.d.ts +0 -13
- package/api/types/ExtensionConfigurationOutput.js +0 -5
- package/api/types/ExternalFile.d.ts +0 -33
- package/api/types/ExternalFile.js +0 -5
- package/api/types/FilesResponse.d.ts +0 -10
- package/api/types/FilesResponse.js +0 -5
- package/api/types/FilesWithPagination.d.ts +0 -10
- package/api/types/FilesWithPagination.js +0 -5
- package/api/types/GetFileV1.d.ts +0 -24
- package/api/types/GetFileV1.js +0 -5
- package/api/types/GetFileV1FileType.d.ts +0 -13
- package/api/types/GetFileV1FileType.js +0 -12
- package/dist/api/resources/files/client/Client.d.ts +0 -69
- package/dist/api/resources/files/client/Client.js +0 -286
- package/dist/api/resources/files/client/index.d.ts +0 -1
- package/dist/api/resources/files/client/index.js +0 -17
- package/dist/api/resources/files/client/requests/CreateFileRestInputV1.d.ts +0 -20
- package/dist/api/resources/files/client/requests/CreateFileRestInputV1.js +0 -5
- package/dist/api/resources/files/client/requests/FilesListRequest.d.ts +0 -24
- package/dist/api/resources/files/client/requests/FilesListRequest.js +0 -5
- package/dist/api/resources/files/client/requests/index.d.ts +0 -2
- package/dist/api/resources/files/client/requests/index.js +0 -2
- package/dist/api/resources/files/index.d.ts +0 -2
- package/dist/api/resources/files/index.js +0 -18
- package/dist/api/resources/files/types/CreateFileRestInputV1FileType.d.ts +0 -13
- package/dist/api/resources/files/types/CreateFileRestInputV1FileType.js +0 -12
- package/dist/api/resources/files/types/index.d.ts +0 -1
- package/dist/api/resources/files/types/index.js +0 -17
- package/dist/api/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -29
- package/dist/api/resources/windows/client/requests/AsyncClickRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -27
- package/dist/api/resources/windows/client/requests/AsyncHoverRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +0 -27
- package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -29
- package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -27
- package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -29
- package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +0 -5
- package/dist/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -37
- package/dist/api/resources/windows/client/requests/AsyncTypeRequest.js +0 -5
- package/dist/api/types/CreateFileV1.d.ts +0 -24
- package/dist/api/types/CreateFileV1.js +0 -5
- package/dist/api/types/CreateFileV1FileType.d.ts +0 -13
- package/dist/api/types/CreateFileV1FileType.js +0 -12
- package/dist/api/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.d.ts +0 -10
- package/dist/api/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.js +0 -5
- package/dist/api/types/EnvelopeGetFileV1EnvelopeDefaultMeta.d.ts +0 -10
- package/dist/api/types/EnvelopeGetFileV1EnvelopeDefaultMeta.js +0 -5
- package/dist/api/types/ExtensionConfigurationOutput.d.ts +0 -13
- package/dist/api/types/ExtensionConfigurationOutput.js +0 -5
- package/dist/api/types/ExternalFile.d.ts +0 -33
- package/dist/api/types/ExternalFile.js +0 -5
- package/dist/api/types/FilesResponse.d.ts +0 -10
- package/dist/api/types/FilesResponse.js +0 -5
- package/dist/api/types/FilesWithPagination.d.ts +0 -10
- package/dist/api/types/FilesWithPagination.js +0 -5
- package/dist/api/types/GetFileV1.d.ts +0 -24
- package/dist/api/types/GetFileV1.js +0 -5
- package/dist/api/types/GetFileV1FileType.d.ts +0 -13
- package/dist/api/types/GetFileV1FileType.js +0 -12
- package/dist/serialization/resources/files/client/index.d.ts +0 -1
- package/dist/serialization/resources/files/client/index.js +0 -17
- package/dist/serialization/resources/files/client/requests/CreateFileRestInputV1.d.ts +0 -16
- package/dist/serialization/resources/files/client/requests/CreateFileRestInputV1.js +0 -47
- package/dist/serialization/resources/files/client/requests/index.d.ts +0 -1
- package/dist/serialization/resources/files/client/requests/index.js +0 -5
- package/dist/serialization/resources/files/index.d.ts +0 -2
- package/dist/serialization/resources/files/index.js +0 -18
- package/dist/serialization/resources/files/types/CreateFileRestInputV1FileType.d.ts +0 -10
- package/dist/serialization/resources/files/types/CreateFileRestInputV1FileType.js +0 -41
- package/dist/serialization/resources/files/types/index.d.ts +0 -1
- package/dist/serialization/resources/files/types/index.js +0 -17
- package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.js +0 -50
- package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -51
- package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -19
- package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -20
- package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -51
- package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -19
- package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -24
- package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.js +0 -55
- package/dist/serialization/types/CreateFileV1.d.ts +0 -21
- package/dist/serialization/types/CreateFileV1.js +0 -52
- package/dist/serialization/types/CreateFileV1FileType.d.ts +0 -10
- package/dist/serialization/types/CreateFileV1FileType.js +0 -41
- package/dist/serialization/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.d.ts +0 -18
- package/dist/serialization/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.js +0 -49
- package/dist/serialization/types/EnvelopeGetFileV1EnvelopeDefaultMeta.d.ts +0 -18
- package/dist/serialization/types/EnvelopeGetFileV1EnvelopeDefaultMeta.js +0 -49
- package/dist/serialization/types/ExternalFile.d.ts +0 -25
- package/dist/serialization/types/ExternalFile.js +0 -56
- package/dist/serialization/types/FilesResponse.d.ts +0 -18
- package/dist/serialization/types/FilesResponse.js +0 -49
- package/dist/serialization/types/FilesWithPagination.d.ts +0 -15
- package/dist/serialization/types/FilesWithPagination.js +0 -46
- package/dist/serialization/types/GetFileV1.d.ts +0 -21
- package/dist/serialization/types/GetFileV1.js +0 -52
- package/dist/serialization/types/GetFileV1FileType.d.ts +0 -10
- package/dist/serialization/types/GetFileV1FileType.js +0 -41
- package/dist/wrapper/AirtopFiles.d.ts +0 -38
- package/dist/wrapper/AirtopFiles.js +0 -151
- package/serialization/resources/files/client/index.d.ts +0 -1
- package/serialization/resources/files/client/index.js +0 -17
- package/serialization/resources/files/client/requests/CreateFileRestInputV1.d.ts +0 -16
- package/serialization/resources/files/client/requests/CreateFileRestInputV1.js +0 -47
- package/serialization/resources/files/client/requests/index.d.ts +0 -1
- package/serialization/resources/files/client/requests/index.js +0 -5
- package/serialization/resources/files/index.d.ts +0 -2
- package/serialization/resources/files/index.js +0 -18
- package/serialization/resources/files/types/CreateFileRestInputV1FileType.d.ts +0 -10
- package/serialization/resources/files/types/CreateFileRestInputV1FileType.js +0 -41
- package/serialization/resources/files/types/index.d.ts +0 -1
- package/serialization/resources/files/types/index.js +0 -17
- package/serialization/resources/windows/client/requests/AsyncClickRequest.d.ts +0 -20
- package/serialization/resources/windows/client/requests/AsyncClickRequest.js +0 -51
- package/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +0 -19
- package/serialization/resources/windows/client/requests/AsyncHoverRequest.js +0 -50
- package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +0 -20
- package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +0 -51
- package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +0 -19
- package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +0 -50
- package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +0 -20
- package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +0 -51
- package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +0 -19
- package/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +0 -24
- package/serialization/resources/windows/client/requests/AsyncTypeRequest.js +0 -55
- package/serialization/types/CreateFileV1.d.ts +0 -21
- package/serialization/types/CreateFileV1.js +0 -52
- package/serialization/types/CreateFileV1FileType.d.ts +0 -10
- package/serialization/types/CreateFileV1FileType.js +0 -41
- package/serialization/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.d.ts +0 -18
- package/serialization/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.js +0 -49
- package/serialization/types/EnvelopeGetFileV1EnvelopeDefaultMeta.d.ts +0 -18
- package/serialization/types/EnvelopeGetFileV1EnvelopeDefaultMeta.js +0 -49
- package/serialization/types/ExternalFile.d.ts +0 -25
- package/serialization/types/ExternalFile.js +0 -56
- package/serialization/types/FilesResponse.d.ts +0 -18
- package/serialization/types/FilesResponse.js +0 -49
- package/serialization/types/FilesWithPagination.d.ts +0 -15
- package/serialization/types/FilesWithPagination.js +0 -46
- package/serialization/types/GetFileV1.d.ts +0 -21
- package/serialization/types/GetFileV1.js +0 -52
- package/serialization/types/GetFileV1FileType.d.ts +0 -10
- package/serialization/types/GetFileV1FileType.js +0 -41
- package/wrapper/AirtopFiles.d.ts +0 -38
- package/wrapper/AirtopFiles.js +0 -151
- /package/api/resources/{files/client/requests/CreateFileRestInputV1.js → windows/client/requests/AsyncCreateFormFillerRequest.js} +0 -0
- /package/api/resources/{files/client/requests/FilesListRequest.js → windows/client/requests/AsyncFillFormRequest.js} +0 -0
- /package/api/resources/windows/client/requests/{AsyncClickRequest.js → CreateFormFillerRequest.js} +0 -0
- /package/api/resources/windows/client/requests/{AsyncHoverRequest.js → FillFormRequest.js} +0 -0
- /package/{api/resources/windows/client/requests/AsyncMonitorRequest.js → dist/api/resources/windows/client/requests/AsyncCreateFormFillerRequest.js} +0 -0
- /package/{api/resources/windows/client/requests/AsyncPageQueryRequest.js → dist/api/resources/windows/client/requests/AsyncFillFormRequest.js} +0 -0
- /package/{api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js → dist/api/resources/windows/client/requests/CreateFormFillerRequest.js} +0 -0
- /package/{api/resources/windows/client/requests/AsyncPromptContentRequest.js → dist/api/resources/windows/client/requests/FillFormRequest.js} +0 -0
@@ -59,28 +59,26 @@ class Windows {
|
|
59
59
|
this._options = _options;
|
60
60
|
}
|
61
61
|
/**
|
62
|
-
*
|
62
|
+
* Create an automation of a browser window asynchronously
|
63
63
|
*
|
64
64
|
* @param {string} sessionId - The session id for the window.
|
65
65
|
* @param {string} windowId - The Airtop window id of the browser window.
|
66
|
-
* @param {Airtop.
|
66
|
+
* @param {Airtop.AsyncCreateAutomationRequest} request
|
67
67
|
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
68
68
|
*
|
69
69
|
* @example
|
70
|
-
* await client.windows.
|
71
|
-
* elementDescription: "The login button"
|
72
|
-
* })
|
70
|
+
* await client.windows.asyncCreateAutomation("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
73
71
|
*/
|
74
|
-
|
75
|
-
return __awaiter(this,
|
72
|
+
asyncCreateAutomation(sessionId_1, windowId_1) {
|
73
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
76
74
|
var _a, _b, _c;
|
77
75
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
78
|
-
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/
|
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`),
|
79
77
|
method: "POST",
|
80
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
78
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
81
79
|
contentType: "application/json",
|
82
80
|
requestType: "json",
|
83
|
-
body: serializers.
|
81
|
+
body: serializers.AsyncCreateAutomationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
84
82
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
85
83
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
86
84
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
@@ -107,7 +105,7 @@ class Windows {
|
|
107
105
|
body: _response.error.rawBody,
|
108
106
|
});
|
109
107
|
case "timeout":
|
110
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/
|
108
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/create-automation.");
|
111
109
|
case "unknown":
|
112
110
|
throw new errors.AirtopError({
|
113
111
|
message: _response.error.errorMessage,
|
@@ -116,26 +114,26 @@ class Windows {
|
|
116
114
|
});
|
117
115
|
}
|
118
116
|
/**
|
119
|
-
* Create
|
117
|
+
* Create a form filler automation asynchronously
|
120
118
|
*
|
121
119
|
* @param {string} sessionId - The session id for the window.
|
122
120
|
* @param {string} windowId - The Airtop window id of the browser window.
|
123
|
-
* @param {Airtop.
|
121
|
+
* @param {Airtop.AsyncCreateFormFillerRequest} request
|
124
122
|
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
125
123
|
*
|
126
124
|
* @example
|
127
|
-
* await client.windows.
|
125
|
+
* await client.windows.asyncCreateFormFiller("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
128
126
|
*/
|
129
|
-
|
127
|
+
asyncCreateFormFiller(sessionId_1, windowId_1) {
|
130
128
|
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
131
129
|
var _a, _b, _c;
|
132
130
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
133
|
-
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/create-
|
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`),
|
134
132
|
method: "POST",
|
135
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
133
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
136
134
|
contentType: "application/json",
|
137
135
|
requestType: "json",
|
138
|
-
body: serializers.
|
136
|
+
body: serializers.AsyncCreateFormFillerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
139
137
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
140
138
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
141
139
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
@@ -162,7 +160,7 @@ class Windows {
|
|
162
160
|
body: _response.error.rawBody,
|
163
161
|
});
|
164
162
|
case "timeout":
|
165
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/create-
|
163
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/create-form-filler.");
|
166
164
|
case "unknown":
|
167
165
|
throw new errors.AirtopError({
|
168
166
|
message: _response.error.errorMessage,
|
@@ -189,7 +187,7 @@ class Windows {
|
|
189
187
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
190
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`),
|
191
189
|
method: "POST",
|
192
|
-
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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
193
191
|
contentType: "application/json",
|
194
192
|
requestType: "json",
|
195
193
|
body: serializers.AsyncExecuteAutomationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -228,81 +226,28 @@ class Windows {
|
|
228
226
|
});
|
229
227
|
}
|
230
228
|
/**
|
231
|
-
*
|
232
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
233
|
-
* @param {Airtop.AsyncHoverRequest} request
|
234
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
229
|
+
* Fill a form of a browser window asynchronously using a form-filler automation
|
235
230
|
*
|
236
|
-
* @example
|
237
|
-
* await client.windows.asyncHover("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
238
|
-
* elementDescription: "The search box input in the top right corner"
|
239
|
-
* })
|
240
|
-
*/
|
241
|
-
asyncHover(sessionId, windowId, request, requestOptions) {
|
242
|
-
return __awaiter(this, void 0, void 0, function* () {
|
243
|
-
var _a, _b, _c;
|
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)}/hover`),
|
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.35", "User-Agent": "@airtop/sdk/0.1.35", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
248
|
-
contentType: "application/json",
|
249
|
-
requestType: "json",
|
250
|
-
body: serializers.AsyncHoverRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
251
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
252
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
253
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
254
|
-
});
|
255
|
-
if (_response.ok) {
|
256
|
-
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
257
|
-
unrecognizedObjectKeys: "passthrough",
|
258
|
-
allowUnrecognizedUnionMembers: true,
|
259
|
-
allowUnrecognizedEnumValues: true,
|
260
|
-
skipValidation: true,
|
261
|
-
breadcrumbsPrefix: ["response"],
|
262
|
-
});
|
263
|
-
}
|
264
|
-
if (_response.error.reason === "status-code") {
|
265
|
-
throw new errors.AirtopError({
|
266
|
-
statusCode: _response.error.statusCode,
|
267
|
-
body: _response.error.body,
|
268
|
-
});
|
269
|
-
}
|
270
|
-
switch (_response.error.reason) {
|
271
|
-
case "non-json":
|
272
|
-
throw new errors.AirtopError({
|
273
|
-
statusCode: _response.error.statusCode,
|
274
|
-
body: _response.error.rawBody,
|
275
|
-
});
|
276
|
-
case "timeout":
|
277
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/hover.");
|
278
|
-
case "unknown":
|
279
|
-
throw new errors.AirtopError({
|
280
|
-
message: _response.error.errorMessage,
|
281
|
-
});
|
282
|
-
}
|
283
|
-
});
|
284
|
-
}
|
285
|
-
/**
|
286
231
|
* @param {string} sessionId - The session id for the window.
|
287
232
|
* @param {string} windowId - The Airtop window id of the browser window.
|
288
|
-
* @param {Airtop.
|
233
|
+
* @param {Airtop.AsyncFillFormRequest} request
|
289
234
|
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
290
235
|
*
|
291
236
|
* @example
|
292
|
-
* await client.windows.
|
293
|
-
*
|
237
|
+
* await client.windows.asyncFillForm("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
238
|
+
* automationId: "automationId"
|
294
239
|
* })
|
295
240
|
*/
|
296
|
-
|
241
|
+
asyncFillForm(sessionId, windowId, request, requestOptions) {
|
297
242
|
return __awaiter(this, void 0, void 0, function* () {
|
298
243
|
var _a, _b, _c;
|
299
244
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
300
|
-
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)}/
|
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`),
|
301
246
|
method: "POST",
|
302
|
-
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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
303
248
|
contentType: "application/json",
|
304
249
|
requestType: "json",
|
305
|
-
body: serializers.
|
250
|
+
body: serializers.AsyncFillFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
306
251
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
307
252
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
308
253
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
@@ -329,7 +274,7 @@ class Windows {
|
|
329
274
|
body: _response.error.rawBody,
|
330
275
|
});
|
331
276
|
case "timeout":
|
332
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/
|
277
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/fill-form.");
|
333
278
|
case "unknown":
|
334
279
|
throw new errors.AirtopError({
|
335
280
|
message: _response.error.errorMessage,
|
@@ -338,87 +283,31 @@ class Windows {
|
|
338
283
|
});
|
339
284
|
}
|
340
285
|
/**
|
341
|
-
*
|
342
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
343
|
-
* @param {Airtop.AsyncPageQueryRequest} request
|
344
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
286
|
+
* Creates a new browser window in a session. Optionally, you can specify a url to load on the window upon creation.
|
345
287
|
*
|
346
|
-
* @
|
347
|
-
*
|
348
|
-
* prompt: "What is the main idea of this page?"
|
349
|
-
* })
|
350
|
-
*/
|
351
|
-
asyncPageQuery(sessionId, windowId, request, requestOptions) {
|
352
|
-
return __awaiter(this, void 0, void 0, function* () {
|
353
|
-
var _a, _b, _c;
|
354
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
355
|
-
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/page-query`),
|
356
|
-
method: "POST",
|
357
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.35", "User-Agent": "@airtop/sdk/0.1.35", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
358
|
-
contentType: "application/json",
|
359
|
-
requestType: "json",
|
360
|
-
body: serializers.AsyncPageQueryRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
361
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
362
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
363
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
364
|
-
});
|
365
|
-
if (_response.ok) {
|
366
|
-
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
367
|
-
unrecognizedObjectKeys: "passthrough",
|
368
|
-
allowUnrecognizedUnionMembers: true,
|
369
|
-
allowUnrecognizedEnumValues: true,
|
370
|
-
skipValidation: true,
|
371
|
-
breadcrumbsPrefix: ["response"],
|
372
|
-
});
|
373
|
-
}
|
374
|
-
if (_response.error.reason === "status-code") {
|
375
|
-
throw new errors.AirtopError({
|
376
|
-
statusCode: _response.error.statusCode,
|
377
|
-
body: _response.error.body,
|
378
|
-
});
|
379
|
-
}
|
380
|
-
switch (_response.error.reason) {
|
381
|
-
case "non-json":
|
382
|
-
throw new errors.AirtopError({
|
383
|
-
statusCode: _response.error.statusCode,
|
384
|
-
body: _response.error.rawBody,
|
385
|
-
});
|
386
|
-
case "timeout":
|
387
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/page-query.");
|
388
|
-
case "unknown":
|
389
|
-
throw new errors.AirtopError({
|
390
|
-
message: _response.error.errorMessage,
|
391
|
-
});
|
392
|
-
}
|
393
|
-
});
|
394
|
-
}
|
395
|
-
/**
|
396
|
-
* @param {string} sessionId - The session id for the window.
|
397
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
398
|
-
* @param {Airtop.AsyncPaginatedExtractionRequest} request
|
288
|
+
* @param {string} sessionId - ID of the session that owns the window.
|
289
|
+
* @param {Airtop.CreateWindowInputV1Body} request
|
399
290
|
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
400
291
|
*
|
401
292
|
* @example
|
402
|
-
* await client.windows.
|
403
|
-
* 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."
|
404
|
-
* })
|
293
|
+
* await client.windows.create("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b")
|
405
294
|
*/
|
406
|
-
|
407
|
-
return __awaiter(this,
|
295
|
+
create(sessionId_1) {
|
296
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, request = {}, requestOptions) {
|
408
297
|
var _a, _b, _c;
|
409
298
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
410
|
-
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, `
|
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`),
|
411
300
|
method: "POST",
|
412
|
-
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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
413
302
|
contentType: "application/json",
|
414
303
|
requestType: "json",
|
415
|
-
body: serializers.
|
304
|
+
body: serializers.CreateWindowInputV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
416
305
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
417
306
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
418
307
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
419
308
|
});
|
420
309
|
if (_response.ok) {
|
421
|
-
return serializers.
|
310
|
+
return serializers.WindowIdResponse.parseOrThrow(_response.body, {
|
422
311
|
unrecognizedObjectKeys: "passthrough",
|
423
312
|
allowUnrecognizedUnionMembers: true,
|
424
313
|
allowUnrecognizedEnumValues: true,
|
@@ -439,7 +328,7 @@ class Windows {
|
|
439
328
|
body: _response.error.rawBody,
|
440
329
|
});
|
441
330
|
case "timeout":
|
442
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /
|
331
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows.");
|
443
332
|
case "unknown":
|
444
333
|
throw new errors.AirtopError({
|
445
334
|
message: _response.error.errorMessage,
|
@@ -448,199 +337,45 @@ class Windows {
|
|
448
337
|
});
|
449
338
|
}
|
450
339
|
/**
|
451
|
-
*
|
340
|
+
* Get information about a browser window in a session, including the live view url.
|
452
341
|
*
|
453
|
-
* @param {string} sessionId -
|
454
|
-
* @param {string} windowId -
|
455
|
-
* @param {Airtop.
|
342
|
+
* @param {string} sessionId - ID of the session that owns the window.
|
343
|
+
* @param {string} windowId - ID of the browser window, which can either be a normal AirTop windowId or a [CDP TargetId](https://chromedevtools.github.io/devtools-protocol/tot/Target/#type-TargetID) from a browser automation library like Puppeteer (typically associated with the page or main frame). Our SDKs will handle retrieving a TargetId for you from various popular browser automation libraries, but we also have details in our guides on how to do it manually.
|
344
|
+
* @param {Airtop.GetWindowInfoRequest} request
|
456
345
|
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
457
346
|
*
|
458
347
|
* @example
|
459
|
-
* await client.windows.
|
460
|
-
*
|
348
|
+
* await client.windows.getWindowInfo("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "7334da2a-91b0-42c5-6156-76a5eba87430", {
|
349
|
+
* screenResolution: "1280x720"
|
461
350
|
* })
|
462
351
|
*/
|
463
|
-
|
464
|
-
return __awaiter(this, void 0, void 0, function* () {
|
465
|
-
var _a, _b, _c;
|
466
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
467
|
-
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/prompt-content`),
|
468
|
-
method: "POST",
|
469
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.35", "User-Agent": "@airtop/sdk/0.1.35", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
470
|
-
contentType: "application/json",
|
471
|
-
requestType: "json",
|
472
|
-
body: serializers.AsyncPromptContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
473
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
474
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
475
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
476
|
-
});
|
477
|
-
if (_response.ok) {
|
478
|
-
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
479
|
-
unrecognizedObjectKeys: "passthrough",
|
480
|
-
allowUnrecognizedUnionMembers: true,
|
481
|
-
allowUnrecognizedEnumValues: true,
|
482
|
-
skipValidation: true,
|
483
|
-
breadcrumbsPrefix: ["response"],
|
484
|
-
});
|
485
|
-
}
|
486
|
-
if (_response.error.reason === "status-code") {
|
487
|
-
throw new errors.AirtopError({
|
488
|
-
statusCode: _response.error.statusCode,
|
489
|
-
body: _response.error.body,
|
490
|
-
});
|
491
|
-
}
|
492
|
-
switch (_response.error.reason) {
|
493
|
-
case "non-json":
|
494
|
-
throw new errors.AirtopError({
|
495
|
-
statusCode: _response.error.statusCode,
|
496
|
-
body: _response.error.rawBody,
|
497
|
-
});
|
498
|
-
case "timeout":
|
499
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/prompt-content.");
|
500
|
-
case "unknown":
|
501
|
-
throw new errors.AirtopError({
|
502
|
-
message: _response.error.errorMessage,
|
503
|
-
});
|
504
|
-
}
|
505
|
-
});
|
506
|
-
}
|
507
|
-
/**
|
508
|
-
* Take a screenshot of the current viewport of a browser window asynchronously
|
509
|
-
*
|
510
|
-
* @param {string} sessionId - The session id for the window.
|
511
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
512
|
-
* @param {Airtop.AsyncScreenshotRequest} request
|
513
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
514
|
-
*
|
515
|
-
* @example
|
516
|
-
* await client.windows.asyncScreenshot("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
517
|
-
*/
|
518
|
-
asyncScreenshot(sessionId_1, windowId_1) {
|
519
|
-
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
520
|
-
var _a, _b, _c;
|
521
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
522
|
-
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/screenshot`),
|
523
|
-
method: "POST",
|
524
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.35", "User-Agent": "@airtop/sdk/0.1.35", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
525
|
-
contentType: "application/json",
|
526
|
-
requestType: "json",
|
527
|
-
body: serializers.AsyncScreenshotRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
528
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
529
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
530
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
531
|
-
});
|
532
|
-
if (_response.ok) {
|
533
|
-
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
534
|
-
unrecognizedObjectKeys: "passthrough",
|
535
|
-
allowUnrecognizedUnionMembers: true,
|
536
|
-
allowUnrecognizedEnumValues: true,
|
537
|
-
skipValidation: true,
|
538
|
-
breadcrumbsPrefix: ["response"],
|
539
|
-
});
|
540
|
-
}
|
541
|
-
if (_response.error.reason === "status-code") {
|
542
|
-
throw new errors.AirtopError({
|
543
|
-
statusCode: _response.error.statusCode,
|
544
|
-
body: _response.error.body,
|
545
|
-
});
|
546
|
-
}
|
547
|
-
switch (_response.error.reason) {
|
548
|
-
case "non-json":
|
549
|
-
throw new errors.AirtopError({
|
550
|
-
statusCode: _response.error.statusCode,
|
551
|
-
body: _response.error.rawBody,
|
552
|
-
});
|
553
|
-
case "timeout":
|
554
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/screenshot.");
|
555
|
-
case "unknown":
|
556
|
-
throw new errors.AirtopError({
|
557
|
-
message: _response.error.errorMessage,
|
558
|
-
});
|
559
|
-
}
|
560
|
-
});
|
561
|
-
}
|
562
|
-
/**
|
563
|
-
* This endpoint is deprecated. Please use the `pageQuery` endpoint and ask for a summary in the prompt instead.
|
564
|
-
*
|
565
|
-
* @param {string} sessionId - The session id for the window.
|
566
|
-
* @param {string} windowId - The Airtop window id of the browser window to summarize.
|
567
|
-
* @param {Airtop.AsyncSummarizeContentRequest} request
|
568
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
569
|
-
*
|
570
|
-
* @example
|
571
|
-
* await client.windows.asyncSummarizeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
572
|
-
*/
|
573
|
-
asyncSummarizeContent(sessionId_1, windowId_1) {
|
352
|
+
getWindowInfo(sessionId_1, windowId_1) {
|
574
353
|
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
575
354
|
var _a, _b, _c;
|
576
|
-
const
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
contentType: "application/json",
|
581
|
-
requestType: "json",
|
582
|
-
body: serializers.AsyncSummarizeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
583
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
584
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
585
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
586
|
-
});
|
587
|
-
if (_response.ok) {
|
588
|
-
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
589
|
-
unrecognizedObjectKeys: "passthrough",
|
590
|
-
allowUnrecognizedUnionMembers: true,
|
591
|
-
allowUnrecognizedEnumValues: true,
|
592
|
-
skipValidation: true,
|
593
|
-
breadcrumbsPrefix: ["response"],
|
594
|
-
});
|
355
|
+
const { includeNavigationBar, disableResize, screenResolution } = request;
|
356
|
+
const _queryParams = {};
|
357
|
+
if (includeNavigationBar != null) {
|
358
|
+
_queryParams["includeNavigationBar"] = includeNavigationBar.toString();
|
595
359
|
}
|
596
|
-
if (
|
597
|
-
|
598
|
-
statusCode: _response.error.statusCode,
|
599
|
-
body: _response.error.body,
|
600
|
-
});
|
360
|
+
if (disableResize != null) {
|
361
|
+
_queryParams["disableResize"] = disableResize.toString();
|
601
362
|
}
|
602
|
-
|
603
|
-
|
604
|
-
throw new errors.AirtopError({
|
605
|
-
statusCode: _response.error.statusCode,
|
606
|
-
body: _response.error.rawBody,
|
607
|
-
});
|
608
|
-
case "timeout":
|
609
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/summarize-content.");
|
610
|
-
case "unknown":
|
611
|
-
throw new errors.AirtopError({
|
612
|
-
message: _response.error.errorMessage,
|
613
|
-
});
|
363
|
+
if (screenResolution != null) {
|
364
|
+
_queryParams["screenResolution"] = screenResolution;
|
614
365
|
}
|
615
|
-
});
|
616
|
-
}
|
617
|
-
/**
|
618
|
-
* @param {string} sessionId - The session id for the window.
|
619
|
-
* @param {string} windowId - The Airtop window id of the browser window.
|
620
|
-
* @param {Airtop.AsyncTypeRequest} request
|
621
|
-
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
622
|
-
*
|
623
|
-
* @example
|
624
|
-
* await client.windows.asyncType("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
625
|
-
* text: "Example text"
|
626
|
-
* })
|
627
|
-
*/
|
628
|
-
asyncType(sessionId, windowId, request, requestOptions) {
|
629
|
-
return __awaiter(this, void 0, void 0, function* () {
|
630
|
-
var _a, _b, _c;
|
631
366
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
632
|
-
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, `
|
633
|
-
method: "
|
634
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
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)}`),
|
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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
635
370
|
contentType: "application/json",
|
371
|
+
queryParameters: _queryParams,
|
636
372
|
requestType: "json",
|
637
|
-
body: serializers.AsyncTypeRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
638
373
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
639
374
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
640
375
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
641
376
|
});
|
642
377
|
if (_response.ok) {
|
643
|
-
return serializers.
|
378
|
+
return serializers.WindowResponse.parseOrThrow(_response.body, {
|
644
379
|
unrecognizedObjectKeys: "passthrough",
|
645
380
|
allowUnrecognizedUnionMembers: true,
|
646
381
|
allowUnrecognizedEnumValues: true,
|
@@ -661,7 +396,7 @@ class Windows {
|
|
661
396
|
body: _response.error.rawBody,
|
662
397
|
});
|
663
398
|
case "timeout":
|
664
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling
|
399
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling GET /sessions/{sessionId}/windows/{windowId}.");
|
665
400
|
case "unknown":
|
666
401
|
throw new errors.AirtopError({
|
667
402
|
message: _response.error.errorMessage,
|
@@ -670,31 +405,34 @@ class Windows {
|
|
670
405
|
});
|
671
406
|
}
|
672
407
|
/**
|
673
|
-
*
|
408
|
+
* Loads a specified url on a given window
|
674
409
|
*
|
675
410
|
* @param {string} sessionId - ID of the session that owns the window.
|
676
|
-
* @param {Airtop.
|
411
|
+
* @param {string} windowId - Airtop window ID of the browser window.
|
412
|
+
* @param {Airtop.WindowLoadUrlV1Body} request
|
677
413
|
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
678
414
|
*
|
679
415
|
* @example
|
680
|
-
* await client.windows.
|
416
|
+
* await client.windows.loadUrl("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "7334da2a-91b0-42c5-6156-76a5eba87430", {
|
417
|
+
* url: "https://www.airtop.ai"
|
418
|
+
* })
|
681
419
|
*/
|
682
|
-
|
683
|
-
return __awaiter(this,
|
420
|
+
loadUrl(sessionId, windowId, request, requestOptions) {
|
421
|
+
return __awaiter(this, void 0, void 0, function* () {
|
684
422
|
var _a, _b, _c;
|
685
423
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
686
|
-
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`),
|
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)}`),
|
687
425
|
method: "POST",
|
688
|
-
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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
689
427
|
contentType: "application/json",
|
690
428
|
requestType: "json",
|
691
|
-
body: serializers.
|
429
|
+
body: serializers.WindowLoadUrlV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
692
430
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
693
431
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
694
432
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
695
433
|
});
|
696
434
|
if (_response.ok) {
|
697
|
-
return serializers.
|
435
|
+
return serializers.OperationOutcomeResponse.parseOrThrow(_response.body, {
|
698
436
|
unrecognizedObjectKeys: "passthrough",
|
699
437
|
allowUnrecognizedUnionMembers: true,
|
700
438
|
allowUnrecognizedEnumValues: true,
|
@@ -715,7 +453,7 @@ class Windows {
|
|
715
453
|
body: _response.error.rawBody,
|
716
454
|
});
|
717
455
|
case "timeout":
|
718
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows.");
|
456
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}.");
|
719
457
|
case "unknown":
|
720
458
|
throw new errors.AirtopError({
|
721
459
|
message: _response.error.errorMessage,
|
@@ -724,45 +462,30 @@ class Windows {
|
|
724
462
|
});
|
725
463
|
}
|
726
464
|
/**
|
727
|
-
*
|
465
|
+
* Closes a browser window in a session
|
728
466
|
*
|
729
467
|
* @param {string} sessionId - ID of the session that owns the window.
|
730
|
-
* @param {string} windowId - ID of the browser window
|
731
|
-
* @param {Airtop.GetWindowInfoRequest} request
|
468
|
+
* @param {string} windowId - Airtop window ID of the browser window.
|
732
469
|
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
733
470
|
*
|
734
471
|
* @example
|
735
|
-
* await client.windows.
|
736
|
-
* screenResolution: "1280x720"
|
737
|
-
* })
|
472
|
+
* await client.windows.close("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "7334da2a-91b0-42c5-6156-76a5eba87430")
|
738
473
|
*/
|
739
|
-
|
740
|
-
return __awaiter(this,
|
474
|
+
close(sessionId, windowId, requestOptions) {
|
475
|
+
return __awaiter(this, void 0, void 0, function* () {
|
741
476
|
var _a, _b, _c;
|
742
|
-
const { includeNavigationBar, disableResize, screenResolution } = request;
|
743
|
-
const _queryParams = {};
|
744
|
-
if (includeNavigationBar != null) {
|
745
|
-
_queryParams["includeNavigationBar"] = includeNavigationBar.toString();
|
746
|
-
}
|
747
|
-
if (disableResize != null) {
|
748
|
-
_queryParams["disableResize"] = disableResize.toString();
|
749
|
-
}
|
750
|
-
if (screenResolution != null) {
|
751
|
-
_queryParams["screenResolution"] = screenResolution;
|
752
|
-
}
|
753
477
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
754
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)}`),
|
755
|
-
method: "
|
756
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
757
481
|
contentType: "application/json",
|
758
|
-
queryParameters: _queryParams,
|
759
482
|
requestType: "json",
|
760
483
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
761
484
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
762
485
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
763
486
|
});
|
764
487
|
if (_response.ok) {
|
765
|
-
return serializers.
|
488
|
+
return serializers.WindowIdResponse.parseOrThrow(_response.body, {
|
766
489
|
unrecognizedObjectKeys: "passthrough",
|
767
490
|
allowUnrecognizedUnionMembers: true,
|
768
491
|
allowUnrecognizedEnumValues: true,
|
@@ -783,7 +506,7 @@ class Windows {
|
|
783
506
|
body: _response.error.rawBody,
|
784
507
|
});
|
785
508
|
case "timeout":
|
786
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling
|
509
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling DELETE /sessions/{sessionId}/windows/{windowId}.");
|
787
510
|
case "unknown":
|
788
511
|
throw new errors.AirtopError({
|
789
512
|
message: _response.error.errorMessage,
|
@@ -792,34 +515,34 @@ class Windows {
|
|
792
515
|
});
|
793
516
|
}
|
794
517
|
/**
|
795
|
-
*
|
518
|
+
* Execute a click interaction in a specific browser window
|
796
519
|
*
|
797
|
-
* @param {string} sessionId -
|
798
|
-
* @param {string} windowId - Airtop window
|
799
|
-
* @param {Airtop.
|
520
|
+
* @param {string} sessionId - The session id for the window.
|
521
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
522
|
+
* @param {Airtop.SessionClickHandlerRequestBody} request
|
800
523
|
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
801
524
|
*
|
802
525
|
* @example
|
803
|
-
* await client.windows.
|
804
|
-
*
|
526
|
+
* await client.windows.click("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
527
|
+
* elementDescription: "The login button"
|
805
528
|
* })
|
806
529
|
*/
|
807
|
-
|
530
|
+
click(sessionId, windowId, request, requestOptions) {
|
808
531
|
return __awaiter(this, void 0, void 0, function* () {
|
809
532
|
var _a, _b, _c;
|
810
533
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
811
|
-
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)}`),
|
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`),
|
812
535
|
method: "POST",
|
813
|
-
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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
814
537
|
contentType: "application/json",
|
815
538
|
requestType: "json",
|
816
|
-
body: serializers.
|
539
|
+
body: serializers.SessionClickHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
817
540
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
818
541
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
819
542
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
820
543
|
});
|
821
544
|
if (_response.ok) {
|
822
|
-
return serializers.
|
545
|
+
return serializers.AiPromptResponse.parseOrThrow(_response.body, {
|
823
546
|
unrecognizedObjectKeys: "passthrough",
|
824
547
|
allowUnrecognizedUnionMembers: true,
|
825
548
|
allowUnrecognizedEnumValues: true,
|
@@ -840,7 +563,7 @@ class Windows {
|
|
840
563
|
body: _response.error.rawBody,
|
841
564
|
});
|
842
565
|
case "timeout":
|
843
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}.");
|
566
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/click.");
|
844
567
|
case "unknown":
|
845
568
|
throw new errors.AirtopError({
|
846
569
|
message: _response.error.errorMessage,
|
@@ -849,30 +572,32 @@ class Windows {
|
|
849
572
|
});
|
850
573
|
}
|
851
574
|
/**
|
852
|
-
*
|
575
|
+
* Create a form-filler automation synchronously for the form loaded in the browser window
|
853
576
|
*
|
854
|
-
* @param {string} sessionId -
|
855
|
-
* @param {string} windowId - Airtop window
|
577
|
+
* @param {string} sessionId - The session id for the window.
|
578
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
579
|
+
* @param {Airtop.CreateFormFillerRequest} request
|
856
580
|
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
857
581
|
*
|
858
582
|
* @example
|
859
|
-
* await client.windows.
|
583
|
+
* await client.windows.createFormFiller("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
860
584
|
*/
|
861
|
-
|
862
|
-
return __awaiter(this,
|
585
|
+
createFormFiller(sessionId_1, windowId_1) {
|
586
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
863
587
|
var _a, _b, _c;
|
864
588
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
865
|
-
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)}`),
|
866
|
-
method: "
|
867
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
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`),
|
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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
868
592
|
contentType: "application/json",
|
869
593
|
requestType: "json",
|
594
|
+
body: serializers.CreateFormFillerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
870
595
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
871
596
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
872
597
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
873
598
|
});
|
874
599
|
if (_response.ok) {
|
875
|
-
return serializers.
|
600
|
+
return serializers.AiPromptResponse.parseOrThrow(_response.body, {
|
876
601
|
unrecognizedObjectKeys: "passthrough",
|
877
602
|
allowUnrecognizedUnionMembers: true,
|
878
603
|
allowUnrecognizedEnumValues: true,
|
@@ -893,7 +618,7 @@ class Windows {
|
|
893
618
|
body: _response.error.rawBody,
|
894
619
|
});
|
895
620
|
case "timeout":
|
896
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling
|
621
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/create-form-filler.");
|
897
622
|
case "unknown":
|
898
623
|
throw new errors.AirtopError({
|
899
624
|
message: _response.error.errorMessage,
|
@@ -902,28 +627,28 @@ class Windows {
|
|
902
627
|
});
|
903
628
|
}
|
904
629
|
/**
|
905
|
-
*
|
630
|
+
* Fill a form of a browser window synchronously using a form-filler automation
|
906
631
|
*
|
907
632
|
* @param {string} sessionId - The session id for the window.
|
908
633
|
* @param {string} windowId - The Airtop window id of the browser window.
|
909
|
-
* @param {Airtop.
|
634
|
+
* @param {Airtop.FillFormRequest} request
|
910
635
|
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
911
636
|
*
|
912
637
|
* @example
|
913
|
-
* await client.windows.
|
914
|
-
*
|
638
|
+
* await client.windows.fillForm("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
639
|
+
* automationId: "automationId"
|
915
640
|
* })
|
916
641
|
*/
|
917
|
-
|
642
|
+
fillForm(sessionId, windowId, request, requestOptions) {
|
918
643
|
return __awaiter(this, void 0, void 0, function* () {
|
919
644
|
var _a, _b, _c;
|
920
645
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
921
|
-
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)}/
|
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`),
|
922
647
|
method: "POST",
|
923
|
-
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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
924
649
|
contentType: "application/json",
|
925
650
|
requestType: "json",
|
926
|
-
body: serializers.
|
651
|
+
body: serializers.FillFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
927
652
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
928
653
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
929
654
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
@@ -950,7 +675,7 @@ class Windows {
|
|
950
675
|
body: _response.error.rawBody,
|
951
676
|
});
|
952
677
|
case "timeout":
|
953
|
-
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/
|
678
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/fill-form.");
|
954
679
|
case "unknown":
|
955
680
|
throw new errors.AirtopError({
|
956
681
|
message: _response.error.errorMessage,
|
@@ -977,7 +702,7 @@ class Windows {
|
|
977
702
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
978
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`),
|
979
704
|
method: "POST",
|
980
|
-
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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
981
706
|
contentType: "application/json",
|
982
707
|
requestType: "json",
|
983
708
|
body: serializers.SessionHoverHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1032,7 +757,7 @@ class Windows {
|
|
1032
757
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1033
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`),
|
1034
759
|
method: "POST",
|
1035
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.
|
760
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1036
761
|
contentType: "application/json",
|
1037
762
|
requestType: "json",
|
1038
763
|
body: serializers.SessionMonitorHandlerRequestBody.jsonOrThrow(request, {
|
@@ -1091,7 +816,7 @@ class Windows {
|
|
1091
816
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1092
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`),
|
1093
818
|
method: "POST",
|
1094
|
-
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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1095
820
|
contentType: "application/json",
|
1096
821
|
requestType: "json",
|
1097
822
|
body: serializers.SessionPageQueryHandlerRequestBody.jsonOrThrow(request, {
|
@@ -1150,7 +875,7 @@ class Windows {
|
|
1150
875
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1151
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`),
|
1152
877
|
method: "POST",
|
1153
|
-
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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1154
879
|
contentType: "application/json",
|
1155
880
|
requestType: "json",
|
1156
881
|
body: serializers.SessionPaginatedExtractionHandlerRequestBody.jsonOrThrow(request, {
|
@@ -1209,7 +934,7 @@ class Windows {
|
|
1209
934
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1210
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`),
|
1211
936
|
method: "POST",
|
1212
|
-
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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1213
938
|
contentType: "application/json",
|
1214
939
|
requestType: "json",
|
1215
940
|
body: serializers.SessionPageQueryHandlerRequestBody.jsonOrThrow(request, {
|
@@ -1266,7 +991,7 @@ class Windows {
|
|
1266
991
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1267
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`),
|
1268
993
|
method: "POST",
|
1269
|
-
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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1270
995
|
contentType: "application/json",
|
1271
996
|
requestType: "json",
|
1272
997
|
body: serializers.ScrapeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1321,7 +1046,7 @@ class Windows {
|
|
1321
1046
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1322
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`),
|
1323
1048
|
method: "POST",
|
1324
|
-
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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1325
1050
|
contentType: "application/json",
|
1326
1051
|
requestType: "json",
|
1327
1052
|
body: serializers.SessionScreenshotHandlerRequestBody.jsonOrThrow(request, {
|
@@ -1378,7 +1103,7 @@ class Windows {
|
|
1378
1103
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1379
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`),
|
1380
1105
|
method: "POST",
|
1381
|
-
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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1382
1107
|
contentType: "application/json",
|
1383
1108
|
requestType: "json",
|
1384
1109
|
body: serializers.SessionScrollHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1433,7 +1158,7 @@ class Windows {
|
|
1433
1158
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1434
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`),
|
1435
1160
|
method: "POST",
|
1436
|
-
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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1437
1162
|
contentType: "application/json",
|
1438
1163
|
requestType: "json",
|
1439
1164
|
body: serializers.SessionSummaryHandlerRequestBody.jsonOrThrow(request, {
|
@@ -1492,7 +1217,7 @@ class Windows {
|
|
1492
1217
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1493
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`),
|
1494
1219
|
method: "POST",
|
1495
|
-
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.36", "User-Agent": "@airtop/sdk/0.1.36", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1496
1221
|
contentType: "application/json",
|
1497
1222
|
requestType: "json",
|
1498
1223
|
body: serializers.SessionTypeHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|