@airtop/sdk 0.1.34 → 0.1.35-beta0
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 +14 -4
- package/Client.js +16 -6
- package/README.md +35 -17
- package/api/errors/ForbiddenError.d.ts +8 -0
- package/api/errors/ForbiddenError.js +51 -0
- package/api/errors/InternalServerError.js +17 -7
- package/api/errors/NotFoundError.js +17 -7
- package/api/errors/UnauthorizedError.d.ts +8 -0
- package/api/errors/UnauthorizedError.js +51 -0
- package/api/errors/UnprocessableEntityError.js +17 -7
- package/api/errors/index.d.ts +2 -0
- package/api/errors/index.js +2 -0
- package/api/resources/automations/client/Client.d.ts +91 -0
- package/api/resources/automations/client/Client.js +429 -0
- package/api/resources/automations/client/index.d.ts +1 -0
- package/api/resources/automations/client/index.js +17 -0
- package/api/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.d.ts +19 -0
- package/api/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.js +5 -0
- package/api/resources/automations/client/requests/index.d.ts +1 -0
- package/api/resources/automations/client/requests/index.js +2 -0
- package/api/resources/automations/index.d.ts +1 -0
- package/api/resources/automations/index.js +17 -0
- package/api/resources/files/client/Client.d.ts +69 -0
- package/api/resources/files/client/Client.js +286 -0
- package/api/resources/files/client/index.d.ts +1 -0
- package/api/resources/files/client/index.js +17 -0
- package/api/resources/files/client/requests/CreateFileRestInputV1.d.ts +20 -0
- package/api/resources/files/client/requests/CreateFileRestInputV1.js +5 -0
- package/api/resources/files/client/requests/FilesListRequest.d.ts +24 -0
- package/api/resources/files/client/requests/FilesListRequest.js +5 -0
- package/api/resources/files/client/requests/index.d.ts +2 -0
- package/api/resources/files/client/requests/index.js +2 -0
- package/api/resources/files/index.d.ts +2 -0
- package/api/resources/files/index.js +18 -0
- package/api/resources/files/types/CreateFileRestInputV1FileType.d.ts +13 -0
- package/api/resources/files/types/CreateFileRestInputV1FileType.js +12 -0
- package/api/resources/files/types/index.d.ts +1 -0
- package/api/resources/files/types/index.js +17 -0
- package/api/resources/index.d.ts +5 -0
- package/api/resources/index.js +23 -8
- package/api/resources/profiles/client/Client.d.ts +4 -0
- package/api/resources/profiles/client/Client.js +23 -21
- package/api/resources/requests/client/Client.d.ts +4 -0
- package/api/resources/requests/client/Client.js +21 -19
- package/api/resources/sessions/client/Client.d.ts +15 -1
- package/api/resources/sessions/client/Client.js +98 -88
- package/api/resources/sessions/client/requests/SessionsEventsRequest.d.ts +7 -0
- package/api/resources/sessions/types/SessionsEventsResponse.d.ts +4 -4
- package/api/resources/sessions/types/SessionsListRequestStatus.d.ts +1 -1
- 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 +142 -0
- package/api/resources/windows/client/Client.js +700 -199
- package/api/resources/windows/client/requests/AsyncClickRequest.d.ts +29 -0
- package/api/resources/windows/client/requests/AsyncClickRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncCreateAutomationRequest.d.ts +23 -0
- package/api/resources/windows/client/requests/AsyncCreateAutomationRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncExecuteAutomationRequest.d.ts +27 -0
- package/api/resources/windows/client/requests/AsyncExecuteAutomationRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +27 -0
- package/api/resources/windows/client/requests/AsyncHoverRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +27 -0
- package/api/resources/windows/client/requests/AsyncMonitorRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +29 -0
- package/api/resources/windows/client/requests/AsyncPageQueryRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +27 -0
- package/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +29 -0
- package/api/resources/windows/client/requests/AsyncPromptContentRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +23 -0
- package/api/resources/windows/client/requests/AsyncScreenshotRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +25 -0
- package/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +5 -0
- package/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +37 -0
- package/api/resources/windows/client/requests/AsyncTypeRequest.js +5 -0
- package/api/resources/windows/client/requests/index.d.ts +11 -0
- package/api/resources/windows/types/CreateWindowInputV1BodyWaitUntil.d.ts +1 -1
- package/api/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.d.ts +1 -1
- package/api/types/AsyncConfig.d.ts +7 -0
- package/api/types/AsyncConfig.js +5 -0
- package/api/types/AsyncSessionAiResponseEnvelope.d.ts +9 -0
- package/api/types/AsyncSessionAiResponseEnvelope.js +5 -0
- package/api/types/AutomationOutput.d.ts +10 -0
- package/api/types/AutomationOutput.js +5 -0
- package/api/types/BrowserWaitNavigationConfigWaitUntil.d.ts +1 -1
- package/api/types/ClickConfigClickType.d.ts +1 -1
- package/api/types/CreateAutomationRequestBodyConfiguration.d.ts +4 -0
- package/api/types/CreateAutomationRequestBodyConfiguration.js +5 -0
- package/api/types/CreateFileV1.d.ts +24 -0
- package/api/types/CreateFileV1.js +5 -0
- package/api/types/CreateFileV1FileType.d.ts +13 -0
- package/api/types/CreateFileV1FileType.js +12 -0
- package/api/types/DeleteAutomationOutputWrapperBody.d.ts +4 -0
- package/api/types/DeleteAutomationOutputWrapperBody.js +5 -0
- package/api/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.d.ts +10 -0
- package/api/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.js +5 -0
- package/api/types/EnvelopeGetFileV1EnvelopeDefaultMeta.d.ts +10 -0
- package/api/types/EnvelopeGetFileV1EnvelopeDefaultMeta.js +5 -0
- package/api/types/ExtensionConfigurationOutput.d.ts +13 -0
- package/api/types/ExtensionConfigurationOutput.js +5 -0
- package/api/types/ExternalFile.d.ts +33 -0
- package/api/types/ExternalFile.js +5 -0
- package/api/types/ExternalSessionAiResponseMetadataStatus.d.ts +1 -1
- package/api/types/FilesResponse.d.ts +10 -0
- package/api/types/FilesResponse.js +5 -0
- package/api/types/FilesWithPagination.d.ts +10 -0
- package/api/types/FilesWithPagination.js +5 -0
- package/api/types/GetFileV1.d.ts +24 -0
- package/api/types/GetFileV1.js +5 -0
- package/api/types/GetFileV1FileType.d.ts +13 -0
- package/api/types/GetFileV1FileType.js +12 -0
- package/api/types/ListAutomationsOutput.d.ts +7 -0
- package/api/types/ListAutomationsOutput.js +5 -0
- package/api/types/MonitorConfigIncludeVisualAnalysis.d.ts +1 -1
- package/api/types/Proxy.d.ts +1 -1
- package/api/types/SessionConfigV1Proxy.d.ts +1 -1
- package/api/types/StatusMessageStatus.d.ts +1 -1
- package/api/types/VisualAnalysisConfigPartitionDirection.d.ts +1 -1
- package/api/types/VisualAnalysisConfigResultSelectionStrategy.d.ts +1 -1
- package/api/types/VisualAnalysisConfigScope.d.ts +1 -1
- package/api/types/index.d.ts +26 -0
- package/api/types/index.js +26 -0
- package/biome.json +3 -0
- package/core/auth/BearerToken.d.ts +1 -1
- package/core/fetcher/APIResponse.d.ts +1 -1
- package/core/fetcher/Fetcher.d.ts +3 -3
- package/core/fetcher/Fetcher.js +6 -5
- package/core/fetcher/Supplier.d.ts +1 -1
- package/core/fetcher/createRequestUrl.d.ts +1 -1
- package/core/fetcher/createRequestUrl.js +1 -2
- package/core/fetcher/getFetchFn.js +18 -9
- package/core/fetcher/getHeader.js +1 -2
- package/core/fetcher/getRequestBody.js +5 -5
- package/core/fetcher/getResponseBody.js +4 -2
- package/core/fetcher/makeRequest.d.ts +1 -1
- package/core/fetcher/requestWithRetries.js +17 -9
- package/core/fetcher/signals.d.ts +0 -1
- package/core/fetcher/signals.js +2 -3
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +1 -2
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +4 -2
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +1 -2
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +2 -2
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +4 -2
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +19 -10
- package/core/index.js +17 -7
- package/core/json.d.ts +15 -0
- package/core/json.js +24 -0
- package/core/runtime/runtime.d.ts +1 -1
- package/core/runtime/runtime.js +51 -41
- package/core/schemas/Schema.d.ts +8 -5
- package/core/schemas/Schema.js +3 -0
- package/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/core/schemas/builders/bigint/bigint.js +53 -0
- package/core/schemas/builders/bigint/index.d.ts +1 -0
- package/core/schemas/builders/bigint/index.js +5 -0
- package/core/schemas/builders/date/date.js +1 -2
- package/core/schemas/builders/enum/enum.js +1 -2
- package/core/schemas/builders/index.d.ts +1 -0
- package/core/schemas/builders/index.js +1 -0
- package/core/schemas/builders/lazy/lazy.d.ts +1 -1
- package/core/schemas/builders/lazy/lazy.js +3 -4
- package/core/schemas/builders/lazy/lazyObject.js +1 -2
- package/core/schemas/builders/list/list.js +1 -2
- package/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/core/schemas/builders/object/object.d.ts +1 -1
- package/core/schemas/builders/object/object.js +31 -3
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/core/schemas/builders/object/property.js +2 -3
- package/core/schemas/builders/object/types.d.ts +16 -11
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
- package/core/schemas/builders/object-like/types.d.ts +1 -1
- package/core/schemas/builders/record/record.js +2 -4
- package/core/schemas/builders/record/types.d.ts +2 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +67 -4
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/core/schemas/builders/set/set.js +1 -2
- package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
- package/core/schemas/builders/union/discriminant.js +1 -2
- package/core/schemas/builders/union/types.d.ts +6 -6
- package/core/schemas/builders/union/union.d.ts +1 -1
- package/core/schemas/builders/union/union.js +1 -2
- package/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +4 -4
- package/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/core/schemas/utils/entries.d.ts +1 -1
- package/core/schemas/utils/entries.js +1 -2
- package/core/schemas/utils/filterObject.d.ts +1 -1
- package/core/schemas/utils/filterObject.js +1 -2
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +5 -2
- package/core/schemas/utils/isPlainObject.js +1 -2
- package/core/schemas/utils/keys.d.ts +1 -1
- package/core/schemas/utils/keys.js +1 -2
- package/core/schemas/utils/maybeSkipValidation.js +1 -2
- package/core/schemas/utils/partition.js +1 -2
- package/core/streaming-fetcher/Stream.d.ts +0 -1
- package/core/streaming-fetcher/Stream.js +20 -21
- package/dist/Client.d.ts +14 -4
- package/dist/Client.js +16 -6
- package/dist/api/errors/ForbiddenError.d.ts +8 -0
- package/dist/api/errors/ForbiddenError.js +51 -0
- package/dist/api/errors/InternalServerError.js +17 -7
- package/dist/api/errors/NotFoundError.js +17 -7
- package/dist/api/errors/UnauthorizedError.d.ts +8 -0
- package/dist/api/errors/UnauthorizedError.js +51 -0
- package/dist/api/errors/UnprocessableEntityError.js +17 -7
- package/dist/api/errors/index.d.ts +2 -0
- package/dist/api/errors/index.js +2 -0
- package/dist/api/resources/automations/client/Client.d.ts +91 -0
- package/dist/api/resources/automations/client/Client.js +429 -0
- package/dist/api/resources/automations/client/index.d.ts +1 -0
- package/dist/api/resources/automations/client/index.js +17 -0
- package/dist/api/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.d.ts +19 -0
- package/dist/api/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.js +5 -0
- package/dist/api/resources/automations/client/requests/index.d.ts +1 -0
- package/dist/api/resources/automations/client/requests/index.js +2 -0
- package/dist/api/resources/automations/index.d.ts +1 -0
- package/dist/api/resources/automations/index.js +17 -0
- package/dist/api/resources/files/client/Client.d.ts +69 -0
- package/dist/api/resources/files/client/Client.js +286 -0
- package/dist/api/resources/files/client/index.d.ts +1 -0
- package/dist/api/resources/files/client/index.js +17 -0
- package/dist/api/resources/files/client/requests/CreateFileRestInputV1.d.ts +20 -0
- package/dist/api/resources/files/client/requests/CreateFileRestInputV1.js +5 -0
- package/dist/api/resources/files/client/requests/FilesListRequest.d.ts +24 -0
- package/dist/api/resources/files/client/requests/FilesListRequest.js +5 -0
- package/dist/api/resources/files/client/requests/index.d.ts +2 -0
- package/dist/api/resources/files/client/requests/index.js +2 -0
- package/dist/api/resources/files/index.d.ts +2 -0
- package/dist/api/resources/files/index.js +18 -0
- package/dist/api/resources/files/types/CreateFileRestInputV1FileType.d.ts +13 -0
- package/dist/api/resources/files/types/CreateFileRestInputV1FileType.js +12 -0
- package/dist/api/resources/files/types/index.d.ts +1 -0
- package/dist/api/resources/files/types/index.js +17 -0
- package/dist/api/resources/index.d.ts +5 -0
- package/dist/api/resources/index.js +23 -8
- package/dist/api/resources/profiles/client/Client.d.ts +4 -0
- package/dist/api/resources/profiles/client/Client.js +23 -21
- package/dist/api/resources/requests/client/Client.d.ts +4 -0
- package/dist/api/resources/requests/client/Client.js +21 -19
- package/dist/api/resources/sessions/client/Client.d.ts +15 -1
- package/dist/api/resources/sessions/client/Client.js +98 -88
- package/dist/api/resources/sessions/client/requests/SessionsEventsRequest.d.ts +7 -0
- package/dist/api/resources/sessions/types/SessionsEventsResponse.d.ts +4 -4
- package/dist/api/resources/sessions/types/SessionsListRequestStatus.d.ts +1 -1
- 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 +142 -0
- package/dist/api/resources/windows/client/Client.js +700 -199
- package/dist/api/resources/windows/client/requests/AsyncClickRequest.d.ts +29 -0
- package/dist/api/resources/windows/client/requests/AsyncClickRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncCreateAutomationRequest.d.ts +23 -0
- package/dist/api/resources/windows/client/requests/AsyncCreateAutomationRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncExecuteAutomationRequest.d.ts +27 -0
- package/dist/api/resources/windows/client/requests/AsyncExecuteAutomationRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncHoverRequest.d.ts +27 -0
- package/dist/api/resources/windows/client/requests/AsyncHoverRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.d.ts +27 -0
- package/dist/api/resources/windows/client/requests/AsyncMonitorRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +29 -0
- package/dist/api/resources/windows/client/requests/AsyncPageQueryRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +27 -0
- package/dist/api/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +29 -0
- package/dist/api/resources/windows/client/requests/AsyncPromptContentRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +23 -0
- package/dist/api/resources/windows/client/requests/AsyncScreenshotRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +25 -0
- package/dist/api/resources/windows/client/requests/AsyncSummarizeContentRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/AsyncTypeRequest.d.ts +37 -0
- package/dist/api/resources/windows/client/requests/AsyncTypeRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/index.d.ts +11 -0
- package/dist/api/resources/windows/types/CreateWindowInputV1BodyWaitUntil.d.ts +1 -1
- package/dist/api/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.d.ts +1 -1
- package/dist/api/types/AsyncConfig.d.ts +7 -0
- package/dist/api/types/AsyncConfig.js +5 -0
- package/dist/api/types/AsyncSessionAiResponseEnvelope.d.ts +9 -0
- package/dist/api/types/AsyncSessionAiResponseEnvelope.js +5 -0
- package/dist/api/types/AutomationOutput.d.ts +10 -0
- package/dist/api/types/AutomationOutput.js +5 -0
- package/dist/api/types/BrowserWaitNavigationConfigWaitUntil.d.ts +1 -1
- package/dist/api/types/ClickConfigClickType.d.ts +1 -1
- package/dist/api/types/CreateAutomationRequestBodyConfiguration.d.ts +4 -0
- package/dist/api/types/CreateAutomationRequestBodyConfiguration.js +5 -0
- package/dist/api/types/CreateFileV1.d.ts +24 -0
- package/dist/api/types/CreateFileV1.js +5 -0
- package/dist/api/types/CreateFileV1FileType.d.ts +13 -0
- package/dist/api/types/CreateFileV1FileType.js +12 -0
- package/dist/api/types/DeleteAutomationOutputWrapperBody.d.ts +4 -0
- package/dist/api/types/DeleteAutomationOutputWrapperBody.js +5 -0
- package/dist/api/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.d.ts +10 -0
- package/dist/api/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.js +5 -0
- package/dist/api/types/EnvelopeGetFileV1EnvelopeDefaultMeta.d.ts +10 -0
- package/dist/api/types/EnvelopeGetFileV1EnvelopeDefaultMeta.js +5 -0
- package/dist/api/types/ExtensionConfigurationOutput.d.ts +13 -0
- package/dist/api/types/ExtensionConfigurationOutput.js +5 -0
- package/dist/api/types/ExternalFile.d.ts +33 -0
- package/dist/api/types/ExternalFile.js +5 -0
- package/dist/api/types/ExternalSessionAiResponseMetadataStatus.d.ts +1 -1
- package/dist/api/types/FilesResponse.d.ts +10 -0
- package/dist/api/types/FilesResponse.js +5 -0
- package/dist/api/types/FilesWithPagination.d.ts +10 -0
- package/dist/api/types/FilesWithPagination.js +5 -0
- package/dist/api/types/GetFileV1.d.ts +24 -0
- package/dist/api/types/GetFileV1.js +5 -0
- package/dist/api/types/GetFileV1FileType.d.ts +13 -0
- package/dist/api/types/GetFileV1FileType.js +12 -0
- package/dist/api/types/ListAutomationsOutput.d.ts +7 -0
- package/dist/api/types/ListAutomationsOutput.js +5 -0
- package/dist/api/types/MonitorConfigIncludeVisualAnalysis.d.ts +1 -1
- package/dist/api/types/Proxy.d.ts +1 -1
- package/dist/api/types/SessionConfigV1Proxy.d.ts +1 -1
- package/dist/api/types/StatusMessageStatus.d.ts +1 -1
- package/dist/api/types/VisualAnalysisConfigPartitionDirection.d.ts +1 -1
- package/dist/api/types/VisualAnalysisConfigResultSelectionStrategy.d.ts +1 -1
- package/dist/api/types/VisualAnalysisConfigScope.d.ts +1 -1
- package/dist/api/types/index.d.ts +26 -0
- package/dist/api/types/index.js +26 -0
- package/dist/core/auth/BearerToken.d.ts +1 -1
- package/dist/core/fetcher/APIResponse.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.d.ts +3 -3
- package/dist/core/fetcher/Fetcher.js +6 -5
- package/dist/core/fetcher/Supplier.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.js +1 -2
- package/dist/core/fetcher/getFetchFn.js +18 -9
- package/dist/core/fetcher/getHeader.js +1 -2
- package/dist/core/fetcher/getRequestBody.js +5 -5
- package/dist/core/fetcher/getResponseBody.js +4 -2
- package/dist/core/fetcher/makeRequest.d.ts +1 -1
- package/dist/core/fetcher/requestWithRetries.js +17 -9
- package/dist/core/fetcher/signals.d.ts +0 -1
- package/dist/core/fetcher/signals.js +2 -3
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +1 -2
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +4 -2
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +1 -2
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +2 -2
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +4 -2
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +19 -10
- package/dist/core/index.js +17 -7
- package/dist/core/json.d.ts +15 -0
- package/dist/core/json.js +24 -0
- package/dist/core/runtime/runtime.d.ts +1 -1
- package/dist/core/runtime/runtime.js +51 -41
- package/dist/core/schemas/Schema.d.ts +8 -5
- package/dist/core/schemas/Schema.js +3 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/dist/core/schemas/builders/bigint/bigint.js +53 -0
- package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
- package/dist/core/schemas/builders/bigint/index.js +5 -0
- package/dist/core/schemas/builders/date/date.js +1 -2
- package/dist/core/schemas/builders/enum/enum.js +1 -2
- package/dist/core/schemas/builders/index.d.ts +1 -0
- package/dist/core/schemas/builders/index.js +1 -0
- package/dist/core/schemas/builders/lazy/lazy.d.ts +1 -1
- package/dist/core/schemas/builders/lazy/lazy.js +3 -4
- package/dist/core/schemas/builders/lazy/lazyObject.js +1 -2
- package/dist/core/schemas/builders/list/list.js +1 -2
- package/dist/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/dist/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/dist/core/schemas/builders/object/object.d.ts +1 -1
- package/dist/core/schemas/builders/object/object.js +31 -3
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/dist/core/schemas/builders/object/property.js +2 -3
- package/dist/core/schemas/builders/object/types.d.ts +16 -11
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
- package/dist/core/schemas/builders/object-like/types.d.ts +1 -1
- package/dist/core/schemas/builders/record/record.js +2 -4
- package/dist/core/schemas/builders/record/types.d.ts +2 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +67 -4
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/dist/core/schemas/builders/set/set.js +1 -2
- package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
- package/dist/core/schemas/builders/union/discriminant.js +1 -2
- package/dist/core/schemas/builders/union/types.d.ts +6 -6
- package/dist/core/schemas/builders/union/union.d.ts +1 -1
- package/dist/core/schemas/builders/union/union.js +1 -2
- package/dist/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +4 -4
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/dist/core/schemas/utils/entries.d.ts +1 -1
- package/dist/core/schemas/utils/entries.js +1 -2
- package/dist/core/schemas/utils/filterObject.d.ts +1 -1
- package/dist/core/schemas/utils/filterObject.js +1 -2
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +5 -2
- package/dist/core/schemas/utils/isPlainObject.js +1 -2
- package/dist/core/schemas/utils/keys.d.ts +1 -1
- package/dist/core/schemas/utils/keys.js +1 -2
- package/dist/core/schemas/utils/maybeSkipValidation.js +1 -2
- package/dist/core/schemas/utils/partition.js +1 -2
- package/dist/core/streaming-fetcher/Stream.d.ts +0 -1
- package/dist/core/streaming-fetcher/Stream.js +20 -21
- package/dist/environments.d.ts +1 -1
- package/dist/errors/AirtopError.js +2 -1
- package/dist/errors/AirtopTimeoutError.d.ts +1 -1
- package/dist/errors/AirtopTimeoutError.js +2 -2
- package/dist/index.js +17 -7
- package/dist/live-view/types.d.ts +1 -1
- package/dist/live-view/types.js +1 -1
- package/dist/serialization/resources/automations/client/index.d.ts +1 -0
- package/dist/serialization/resources/automations/client/index.js +17 -0
- package/dist/serialization/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.d.ts +14 -0
- package/dist/serialization/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.js +45 -0
- package/dist/serialization/resources/automations/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/automations/client/requests/index.js +5 -0
- package/dist/serialization/resources/automations/index.d.ts +1 -0
- package/dist/serialization/resources/automations/index.js +17 -0
- package/dist/serialization/resources/files/client/index.d.ts +1 -0
- package/dist/serialization/resources/files/client/index.js +17 -0
- package/dist/serialization/resources/files/client/requests/CreateFileRestInputV1.d.ts +16 -0
- package/dist/serialization/resources/files/client/requests/CreateFileRestInputV1.js +47 -0
- package/dist/serialization/resources/files/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/files/client/requests/index.js +5 -0
- package/dist/serialization/resources/files/index.d.ts +2 -0
- package/dist/serialization/resources/files/index.js +18 -0
- package/dist/serialization/resources/files/types/CreateFileRestInputV1FileType.d.ts +10 -0
- package/dist/serialization/resources/files/types/CreateFileRestInputV1FileType.js +41 -0
- package/dist/serialization/resources/files/types/index.d.ts +1 -0
- package/dist/serialization/resources/files/types/index.js +17 -0
- package/dist/serialization/resources/index.d.ts +5 -0
- package/dist/serialization/resources/index.js +23 -8
- package/dist/serialization/resources/sessions/client/requests/SessionRestInputV1.js +17 -7
- package/dist/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +5 -5
- package/dist/serialization/resources/sessions/types/SessionsEventsResponse.js +19 -9
- package/dist/serialization/resources/sessions/types/SessionsEventsResponseError.js +17 -7
- package/dist/serialization/resources/sessions/types/SessionsEventsResponseSessionEvent.js +17 -7
- package/dist/serialization/resources/sessions/types/SessionsEventsResponseStatus.js +17 -7
- package/dist/serialization/resources/sessions/types/SessionsEventsResponseWindowEvent.js +17 -7
- package/dist/serialization/resources/sessions/types/SessionsListRequestStatus.js +17 -7
- 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/AsyncClickRequest.d.ts +20 -0
- package/dist/serialization/resources/windows/client/requests/AsyncClickRequest.js +51 -0
- package/dist/serialization/resources/windows/client/requests/AsyncCreateAutomationRequest.d.ts +18 -0
- package/dist/serialization/resources/windows/client/requests/AsyncCreateAutomationRequest.js +49 -0
- package/dist/serialization/resources/windows/client/requests/AsyncExecuteAutomationRequest.d.ts +18 -0
- package/dist/serialization/resources/windows/client/requests/AsyncExecuteAutomationRequest.js +49 -0
- package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +19 -0
- package/dist/serialization/resources/windows/client/requests/AsyncHoverRequest.js +50 -0
- package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +19 -0
- package/dist/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +50 -0
- package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +20 -0
- package/dist/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +51 -0
- package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +19 -0
- package/dist/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +50 -0
- package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +20 -0
- package/dist/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +51 -0
- package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +18 -0
- package/dist/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +49 -0
- package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +19 -0
- package/dist/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +50 -0
- package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +24 -0
- package/dist/serialization/resources/windows/client/requests/AsyncTypeRequest.js +55 -0
- package/dist/serialization/resources/windows/client/requests/CreateWindowInputV1Body.js +17 -7
- package/dist/serialization/resources/windows/client/requests/ScrapeContentRequest.js +17 -7
- package/dist/serialization/resources/windows/client/requests/SessionClickHandlerRequestBody.js +17 -7
- package/dist/serialization/resources/windows/client/requests/SessionHoverHandlerRequestBody.js +17 -7
- package/dist/serialization/resources/windows/client/requests/SessionMonitorHandlerRequestBody.js +17 -7
- package/dist/serialization/resources/windows/client/requests/SessionPaginatedExtractionHandlerRequestBody.js +17 -7
- package/dist/serialization/resources/windows/client/requests/SessionScreenshotHandlerRequestBody.js +17 -7
- package/dist/serialization/resources/windows/client/requests/SessionScrollHandlerRequestBody.js +17 -7
- package/dist/serialization/resources/windows/client/requests/SessionSummaryHandlerRequestBody.js +17 -7
- package/dist/serialization/resources/windows/client/requests/SessionTypeHandlerRequestBody.js +17 -7
- package/dist/serialization/resources/windows/client/requests/WindowLoadUrlV1Body.js +17 -7
- package/dist/serialization/resources/windows/client/requests/index.d.ts +11 -0
- package/dist/serialization/resources/windows/client/requests/index.js +23 -1
- package/dist/serialization/resources/windows/types/CreateWindowInputV1BodyWaitUntil.js +17 -7
- package/dist/serialization/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.js +17 -7
- package/dist/serialization/types/AiPromptResponse.js +17 -7
- package/dist/serialization/types/AiResponseEnvelope.js +17 -7
- package/dist/serialization/types/AirtopProxyConfiguration.js +17 -7
- package/dist/serialization/types/AsyncConfig.d.ts +12 -0
- package/dist/serialization/types/AsyncConfig.js +43 -0
- package/dist/serialization/types/AsyncSessionAiResponseEnvelope.d.ts +15 -0
- package/dist/serialization/types/AsyncSessionAiResponseEnvelope.js +46 -0
- package/dist/serialization/types/AutomationOutput.d.ts +16 -0
- package/dist/serialization/types/AutomationOutput.js +47 -0
- package/dist/serialization/types/BrowserWaitNavigationConfig.js +17 -7
- package/dist/serialization/types/BrowserWaitNavigationConfigWaitUntil.js +17 -7
- package/dist/serialization/types/ClickConfig.js +17 -7
- package/dist/serialization/types/ClickConfigClickType.js +17 -7
- package/dist/serialization/types/ClientProvidedResponseMetadata.js +17 -7
- package/dist/serialization/types/CreateAutomationRequestBodyConfiguration.d.ts +10 -0
- package/dist/serialization/types/CreateAutomationRequestBodyConfiguration.js +41 -0
- package/dist/serialization/types/CreateFileV1.d.ts +21 -0
- package/dist/serialization/types/CreateFileV1.js +52 -0
- package/dist/serialization/types/CreateFileV1FileType.d.ts +10 -0
- package/dist/serialization/types/CreateFileV1FileType.js +41 -0
- package/dist/serialization/types/DeleteAutomationOutputWrapperBody.d.ts +10 -0
- package/dist/serialization/types/DeleteAutomationOutputWrapperBody.js +41 -0
- package/dist/serialization/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.d.ts +18 -0
- package/dist/serialization/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.js +49 -0
- package/dist/serialization/types/EnvelopeDefaultMeta.js +17 -7
- package/dist/serialization/types/EnvelopeGetFileV1EnvelopeDefaultMeta.d.ts +18 -0
- package/dist/serialization/types/EnvelopeGetFileV1EnvelopeDefaultMeta.js +49 -0
- package/dist/serialization/types/ErrorBody.js +17 -7
- package/dist/serialization/types/ErrorDetail.js +17 -7
- package/dist/serialization/types/ErrorMessage.js +17 -7
- package/dist/serialization/types/ErrorModel.js +17 -7
- package/dist/serialization/types/ExternalFile.d.ts +25 -0
- package/dist/serialization/types/ExternalFile.js +56 -0
- package/dist/serialization/types/ExternalSessionAiResponseMetadata.js +17 -7
- package/dist/serialization/types/ExternalSessionAiResponseMetadataStatus.js +17 -7
- package/dist/serialization/types/ExternalSessionAiResponseMetadataUsage.js +17 -7
- package/dist/serialization/types/ExternalSessionConfig.js +17 -7
- package/dist/serialization/types/ExternalSessionWithConnectionInfo.js +17 -7
- package/dist/serialization/types/FilesResponse.d.ts +18 -0
- package/dist/serialization/types/FilesResponse.js +49 -0
- package/dist/serialization/types/FilesWithPagination.d.ts +15 -0
- package/dist/serialization/types/FilesWithPagination.js +46 -0
- package/dist/serialization/types/GetFileV1.d.ts +21 -0
- package/dist/serialization/types/GetFileV1.js +52 -0
- package/dist/serialization/types/GetFileV1FileType.d.ts +10 -0
- package/dist/serialization/types/GetFileV1FileType.js +41 -0
- package/dist/serialization/types/IntervalMonitorConfig.js +17 -7
- package/dist/serialization/types/Issue.js +17 -7
- package/dist/serialization/types/ListAutomationsOutput.d.ts +13 -0
- package/dist/serialization/types/ListAutomationsOutput.js +44 -0
- package/dist/serialization/types/MicroInteractionConfig.js +17 -7
- package/dist/serialization/types/MicroInteractionConfigWithExperimental.js +17 -7
- package/dist/serialization/types/MicroInteractionExperimentalConfig.js +17 -7
- package/dist/serialization/types/MonitorConfig.js +17 -7
- package/dist/serialization/types/MonitorConfigIncludeVisualAnalysis.js +17 -7
- package/dist/serialization/types/OperationOutcome.js +17 -7
- package/dist/serialization/types/OperationOutcomeResponse.js +17 -7
- package/dist/serialization/types/PageQueryConfig.js +17 -7
- package/dist/serialization/types/PageQueryExperimentalConfig.js +17 -7
- package/dist/serialization/types/PaginatedExtractionConfig.js +17 -7
- package/dist/serialization/types/PaginatedExtractionExperimentalConfig.js +17 -7
- package/dist/serialization/types/Pagination.js +17 -7
- package/dist/serialization/types/Proxy.js +17 -7
- package/dist/serialization/types/ProxyConfigurationKind.js +17 -7
- package/dist/serialization/types/ProxyCredentials.js +17 -7
- package/dist/serialization/types/RequestStatusResponse.js +17 -7
- package/dist/serialization/types/ScrapeConfig.js +17 -7
- package/dist/serialization/types/ScrapeResponse.js +17 -7
- package/dist/serialization/types/ScrapeResponseContent.js +17 -7
- package/dist/serialization/types/ScrapeResponseEnvelope.js +17 -7
- package/dist/serialization/types/ScrapeResponseOutput.js +17 -7
- package/dist/serialization/types/ScreenshotConfig.js +17 -7
- package/dist/serialization/types/ScreenshotMetadata.js +17 -7
- package/dist/serialization/types/ScreenshotRequestConfig.js +17 -7
- package/dist/serialization/types/ScrollByConfig.js +17 -7
- package/dist/serialization/types/ScrollToEdgeConfig.js +17 -7
- package/dist/serialization/types/SessionConfigV1.js +17 -7
- package/dist/serialization/types/SessionConfigV1Proxy.js +17 -7
- package/dist/serialization/types/SessionEventMessage.js +17 -7
- package/dist/serialization/types/SessionPageQueryHandlerRequestBody.js +17 -7
- package/dist/serialization/types/SessionResponse.js +17 -7
- package/dist/serialization/types/SessionsResponse.js +17 -7
- package/dist/serialization/types/SessionsWithPagination.js +17 -7
- package/dist/serialization/types/StatusMessage.js +17 -7
- package/dist/serialization/types/StatusMessageStatus.js +17 -7
- package/dist/serialization/types/SummaryConfig.js +17 -7
- package/dist/serialization/types/SummaryExperimentalConfig.js +17 -7
- package/dist/serialization/types/VisualAnalysisConfig.js +17 -7
- package/dist/serialization/types/VisualAnalysisConfigPartitionDirection.js +17 -7
- package/dist/serialization/types/VisualAnalysisConfigResultSelectionStrategy.js +17 -7
- package/dist/serialization/types/VisualAnalysisConfigScope.js +17 -7
- package/dist/serialization/types/Window.js +17 -7
- package/dist/serialization/types/WindowEventMessage.js +17 -7
- package/dist/serialization/types/WindowId.js +17 -7
- package/dist/serialization/types/WindowIdResponse.js +17 -7
- package/dist/serialization/types/WindowResponse.js +17 -7
- package/dist/serialization/types/index.d.ts +26 -0
- package/dist/serialization/types/index.js +26 -0
- package/dist/utils/batch-operate/SessionQueue.js +2 -2
- package/dist/utils/batch-operate/WindowQueue.js +2 -2
- package/dist/utils/batch-operate/batch-util.d.ts +1 -1
- package/dist/utils/batch-operate/types.d.ts +5 -5
- package/dist/utils/process-screenshots.d.ts +1 -2
- package/dist/utils/process-screenshots.js +1 -2
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/dist/wrapper/AirtopClient.d.ts +5 -2
- package/dist/wrapper/AirtopClient.js +24 -8
- package/dist/wrapper/AirtopFiles.d.ts +38 -0
- package/dist/wrapper/AirtopFiles.js +151 -0
- package/dist/wrapper/AirtopRequests.js +2 -2
- package/dist/wrapper/AirtopSessions.js +7 -5
- package/dist/wrapper/AirtopWindows.d.ts +1 -1
- package/dist/wrapper/AirtopWindows.js +22 -12
- package/environments.d.ts +1 -1
- package/errors/AirtopError.js +2 -1
- package/errors/AirtopTimeoutError.d.ts +1 -1
- package/errors/AirtopTimeoutError.js +2 -2
- package/index.js +17 -7
- package/{jest.config.js → jest.config.mjs} +4 -1
- package/live-view/types.d.ts +1 -1
- package/live-view/types.js +1 -1
- package/package.json +18 -14
- package/reference.md +2009 -175
- package/scripts/rename-to-esm-files.js +115 -0
- package/serialization/resources/automations/client/index.d.ts +1 -0
- package/serialization/resources/automations/client/index.js +17 -0
- package/serialization/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.d.ts +14 -0
- package/serialization/resources/automations/client/requests/UpdateAutomationDescriptionInputBody.js +45 -0
- package/serialization/resources/automations/client/requests/index.d.ts +1 -0
- package/serialization/resources/automations/client/requests/index.js +5 -0
- package/serialization/resources/automations/index.d.ts +1 -0
- package/serialization/resources/automations/index.js +17 -0
- package/serialization/resources/files/client/index.d.ts +1 -0
- package/serialization/resources/files/client/index.js +17 -0
- package/serialization/resources/files/client/requests/CreateFileRestInputV1.d.ts +16 -0
- package/serialization/resources/files/client/requests/CreateFileRestInputV1.js +47 -0
- package/serialization/resources/files/client/requests/index.d.ts +1 -0
- package/serialization/resources/files/client/requests/index.js +5 -0
- package/serialization/resources/files/index.d.ts +2 -0
- package/serialization/resources/files/index.js +18 -0
- package/serialization/resources/files/types/CreateFileRestInputV1FileType.d.ts +10 -0
- package/serialization/resources/files/types/CreateFileRestInputV1FileType.js +41 -0
- package/serialization/resources/files/types/index.d.ts +1 -0
- package/serialization/resources/files/types/index.js +17 -0
- package/serialization/resources/index.d.ts +5 -0
- package/serialization/resources/index.js +23 -8
- package/serialization/resources/sessions/client/requests/SessionRestInputV1.js +17 -7
- package/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +5 -5
- package/serialization/resources/sessions/types/SessionsEventsResponse.js +19 -9
- package/serialization/resources/sessions/types/SessionsEventsResponseError.js +17 -7
- package/serialization/resources/sessions/types/SessionsEventsResponseSessionEvent.js +17 -7
- package/serialization/resources/sessions/types/SessionsEventsResponseStatus.js +17 -7
- package/serialization/resources/sessions/types/SessionsEventsResponseWindowEvent.js +17 -7
- package/serialization/resources/sessions/types/SessionsListRequestStatus.js +17 -7
- 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/AsyncClickRequest.d.ts +20 -0
- package/serialization/resources/windows/client/requests/AsyncClickRequest.js +51 -0
- package/serialization/resources/windows/client/requests/AsyncCreateAutomationRequest.d.ts +18 -0
- package/serialization/resources/windows/client/requests/AsyncCreateAutomationRequest.js +49 -0
- package/serialization/resources/windows/client/requests/AsyncExecuteAutomationRequest.d.ts +18 -0
- package/serialization/resources/windows/client/requests/AsyncExecuteAutomationRequest.js +49 -0
- package/serialization/resources/windows/client/requests/AsyncHoverRequest.d.ts +19 -0
- package/serialization/resources/windows/client/requests/AsyncHoverRequest.js +50 -0
- package/serialization/resources/windows/client/requests/AsyncMonitorRequest.d.ts +19 -0
- package/serialization/resources/windows/client/requests/AsyncMonitorRequest.js +50 -0
- package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.d.ts +20 -0
- package/serialization/resources/windows/client/requests/AsyncPageQueryRequest.js +51 -0
- package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.d.ts +19 -0
- package/serialization/resources/windows/client/requests/AsyncPaginatedExtractionRequest.js +50 -0
- package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.d.ts +20 -0
- package/serialization/resources/windows/client/requests/AsyncPromptContentRequest.js +51 -0
- package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.d.ts +18 -0
- package/serialization/resources/windows/client/requests/AsyncScreenshotRequest.js +49 -0
- package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.d.ts +19 -0
- package/serialization/resources/windows/client/requests/AsyncSummarizeContentRequest.js +50 -0
- package/serialization/resources/windows/client/requests/AsyncTypeRequest.d.ts +24 -0
- package/serialization/resources/windows/client/requests/AsyncTypeRequest.js +55 -0
- package/serialization/resources/windows/client/requests/CreateWindowInputV1Body.js +17 -7
- package/serialization/resources/windows/client/requests/ScrapeContentRequest.js +17 -7
- package/serialization/resources/windows/client/requests/SessionClickHandlerRequestBody.js +17 -7
- package/serialization/resources/windows/client/requests/SessionHoverHandlerRequestBody.js +17 -7
- package/serialization/resources/windows/client/requests/SessionMonitorHandlerRequestBody.js +17 -7
- package/serialization/resources/windows/client/requests/SessionPaginatedExtractionHandlerRequestBody.js +17 -7
- package/serialization/resources/windows/client/requests/SessionScreenshotHandlerRequestBody.js +17 -7
- package/serialization/resources/windows/client/requests/SessionScrollHandlerRequestBody.js +17 -7
- package/serialization/resources/windows/client/requests/SessionSummaryHandlerRequestBody.js +17 -7
- package/serialization/resources/windows/client/requests/SessionTypeHandlerRequestBody.js +17 -7
- package/serialization/resources/windows/client/requests/WindowLoadUrlV1Body.js +17 -7
- package/serialization/resources/windows/client/requests/index.d.ts +11 -0
- package/serialization/resources/windows/client/requests/index.js +23 -1
- package/serialization/resources/windows/types/CreateWindowInputV1BodyWaitUntil.js +17 -7
- package/serialization/resources/windows/types/WindowLoadUrlV1BodyWaitUntil.js +17 -7
- package/serialization/types/AiPromptResponse.js +17 -7
- package/serialization/types/AiResponseEnvelope.js +17 -7
- package/serialization/types/AirtopProxyConfiguration.js +17 -7
- package/serialization/types/AsyncConfig.d.ts +12 -0
- package/serialization/types/AsyncConfig.js +43 -0
- package/serialization/types/AsyncSessionAiResponseEnvelope.d.ts +15 -0
- package/serialization/types/AsyncSessionAiResponseEnvelope.js +46 -0
- package/serialization/types/AutomationOutput.d.ts +16 -0
- package/serialization/types/AutomationOutput.js +47 -0
- package/serialization/types/BrowserWaitNavigationConfig.js +17 -7
- package/serialization/types/BrowserWaitNavigationConfigWaitUntil.js +17 -7
- package/serialization/types/ClickConfig.js +17 -7
- package/serialization/types/ClickConfigClickType.js +17 -7
- package/serialization/types/ClientProvidedResponseMetadata.js +17 -7
- package/serialization/types/CreateAutomationRequestBodyConfiguration.d.ts +10 -0
- package/serialization/types/CreateAutomationRequestBodyConfiguration.js +41 -0
- package/serialization/types/CreateFileV1.d.ts +21 -0
- package/serialization/types/CreateFileV1.js +52 -0
- package/serialization/types/CreateFileV1FileType.d.ts +10 -0
- package/serialization/types/CreateFileV1FileType.js +41 -0
- package/serialization/types/DeleteAutomationOutputWrapperBody.d.ts +10 -0
- package/serialization/types/DeleteAutomationOutputWrapperBody.js +41 -0
- package/serialization/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.d.ts +18 -0
- package/serialization/types/EnvelopeCreateFileV1EnvelopeDefaultMeta.js +49 -0
- package/serialization/types/EnvelopeDefaultMeta.js +17 -7
- package/serialization/types/EnvelopeGetFileV1EnvelopeDefaultMeta.d.ts +18 -0
- package/serialization/types/EnvelopeGetFileV1EnvelopeDefaultMeta.js +49 -0
- package/serialization/types/ErrorBody.js +17 -7
- package/serialization/types/ErrorDetail.js +17 -7
- package/serialization/types/ErrorMessage.js +17 -7
- package/serialization/types/ErrorModel.js +17 -7
- package/serialization/types/ExternalFile.d.ts +25 -0
- package/serialization/types/ExternalFile.js +56 -0
- package/serialization/types/ExternalSessionAiResponseMetadata.js +17 -7
- package/serialization/types/ExternalSessionAiResponseMetadataStatus.js +17 -7
- package/serialization/types/ExternalSessionAiResponseMetadataUsage.js +17 -7
- package/serialization/types/ExternalSessionConfig.js +17 -7
- package/serialization/types/ExternalSessionWithConnectionInfo.js +17 -7
- package/serialization/types/FilesResponse.d.ts +18 -0
- package/serialization/types/FilesResponse.js +49 -0
- package/serialization/types/FilesWithPagination.d.ts +15 -0
- package/serialization/types/FilesWithPagination.js +46 -0
- package/serialization/types/GetFileV1.d.ts +21 -0
- package/serialization/types/GetFileV1.js +52 -0
- package/serialization/types/GetFileV1FileType.d.ts +10 -0
- package/serialization/types/GetFileV1FileType.js +41 -0
- package/serialization/types/IntervalMonitorConfig.js +17 -7
- package/serialization/types/Issue.js +17 -7
- package/serialization/types/ListAutomationsOutput.d.ts +13 -0
- package/serialization/types/ListAutomationsOutput.js +44 -0
- package/serialization/types/MicroInteractionConfig.js +17 -7
- package/serialization/types/MicroInteractionConfigWithExperimental.js +17 -7
- package/serialization/types/MicroInteractionExperimentalConfig.js +17 -7
- package/serialization/types/MonitorConfig.js +17 -7
- package/serialization/types/MonitorConfigIncludeVisualAnalysis.js +17 -7
- package/serialization/types/OperationOutcome.js +17 -7
- package/serialization/types/OperationOutcomeResponse.js +17 -7
- package/serialization/types/PageQueryConfig.js +17 -7
- package/serialization/types/PageQueryExperimentalConfig.js +17 -7
- package/serialization/types/PaginatedExtractionConfig.js +17 -7
- package/serialization/types/PaginatedExtractionExperimentalConfig.js +17 -7
- package/serialization/types/Pagination.js +17 -7
- package/serialization/types/Proxy.js +17 -7
- package/serialization/types/ProxyConfigurationKind.js +17 -7
- package/serialization/types/ProxyCredentials.js +17 -7
- package/serialization/types/RequestStatusResponse.js +17 -7
- package/serialization/types/ScrapeConfig.js +17 -7
- package/serialization/types/ScrapeResponse.js +17 -7
- package/serialization/types/ScrapeResponseContent.js +17 -7
- package/serialization/types/ScrapeResponseEnvelope.js +17 -7
- package/serialization/types/ScrapeResponseOutput.js +17 -7
- package/serialization/types/ScreenshotConfig.js +17 -7
- package/serialization/types/ScreenshotMetadata.js +17 -7
- package/serialization/types/ScreenshotRequestConfig.js +17 -7
- package/serialization/types/ScrollByConfig.js +17 -7
- package/serialization/types/ScrollToEdgeConfig.js +17 -7
- package/serialization/types/SessionConfigV1.js +17 -7
- package/serialization/types/SessionConfigV1Proxy.js +17 -7
- package/serialization/types/SessionEventMessage.js +17 -7
- package/serialization/types/SessionPageQueryHandlerRequestBody.js +17 -7
- package/serialization/types/SessionResponse.js +17 -7
- package/serialization/types/SessionsResponse.js +17 -7
- package/serialization/types/SessionsWithPagination.js +17 -7
- package/serialization/types/StatusMessage.js +17 -7
- package/serialization/types/StatusMessageStatus.js +17 -7
- package/serialization/types/SummaryConfig.js +17 -7
- package/serialization/types/SummaryExperimentalConfig.js +17 -7
- package/serialization/types/VisualAnalysisConfig.js +17 -7
- package/serialization/types/VisualAnalysisConfigPartitionDirection.js +17 -7
- package/serialization/types/VisualAnalysisConfigResultSelectionStrategy.js +17 -7
- package/serialization/types/VisualAnalysisConfigScope.js +17 -7
- package/serialization/types/Window.js +17 -7
- package/serialization/types/WindowEventMessage.js +17 -7
- package/serialization/types/WindowId.js +17 -7
- package/serialization/types/WindowIdResponse.js +17 -7
- package/serialization/types/WindowResponse.js +17 -7
- package/serialization/types/index.d.ts +26 -0
- package/serialization/types/index.js +26 -0
- package/utils/batch-operate/SessionQueue.js +2 -2
- package/utils/batch-operate/WindowQueue.js +2 -2
- package/utils/batch-operate/batch-util.d.ts +1 -1
- package/utils/batch-operate/types.d.ts +5 -5
- package/utils/process-screenshots.d.ts +1 -2
- package/utils/process-screenshots.js +1 -2
- package/version.d.ts +1 -0
- package/version.js +4 -0
- package/wrapper/AirtopClient.d.ts +5 -2
- package/wrapper/AirtopClient.js +24 -8
- package/wrapper/AirtopFiles.d.ts +38 -0
- package/wrapper/AirtopFiles.js +151 -0
- package/wrapper/AirtopRequests.js +2 -2
- package/wrapper/AirtopSessions.js +7 -5
- package/wrapper/AirtopWindows.d.ts +1 -1
- package/wrapper/AirtopWindows.js +22 -12
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
18
18
|
}) : function(o, v) {
|
19
19
|
o["default"] = v;
|
20
20
|
});
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
};
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
22
|
+
var ownKeys = function(o) {
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
24
|
+
var ar = [];
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
26
|
+
return ar;
|
27
|
+
};
|
28
|
+
return ownKeys(o);
|
29
|
+
};
|
30
|
+
return function (mod) {
|
31
|
+
if (mod && mod.__esModule) return mod;
|
32
|
+
var result = {};
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
34
|
+
__setModuleDefault(result, mod);
|
35
|
+
return result;
|
36
|
+
};
|
37
|
+
})();
|
28
38
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
29
39
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
30
40
|
return new (P || (P = Promise))(function (resolve, reject) {
|
@@ -48,6 +58,617 @@ class Windows {
|
|
48
58
|
constructor(_options) {
|
49
59
|
this._options = _options;
|
50
60
|
}
|
61
|
+
/**
|
62
|
+
* Execute a click interaction in a specific browser window asynchronously
|
63
|
+
*
|
64
|
+
* @param {string} sessionId - The session id for the window.
|
65
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
66
|
+
* @param {Airtop.AsyncClickRequest} request
|
67
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
68
|
+
*
|
69
|
+
* @example
|
70
|
+
* await client.windows.asyncClick("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
71
|
+
* elementDescription: "The login button"
|
72
|
+
* })
|
73
|
+
*/
|
74
|
+
asyncClick(sessionId, windowId, request, requestOptions) {
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
76
|
+
var _a, _b, _c;
|
77
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
78
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/click`),
|
79
|
+
method: "POST",
|
80
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.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),
|
81
|
+
contentType: "application/json",
|
82
|
+
requestType: "json",
|
83
|
+
body: serializers.AsyncClickRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
84
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
85
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
86
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
87
|
+
});
|
88
|
+
if (_response.ok) {
|
89
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
90
|
+
unrecognizedObjectKeys: "passthrough",
|
91
|
+
allowUnrecognizedUnionMembers: true,
|
92
|
+
allowUnrecognizedEnumValues: true,
|
93
|
+
skipValidation: true,
|
94
|
+
breadcrumbsPrefix: ["response"],
|
95
|
+
});
|
96
|
+
}
|
97
|
+
if (_response.error.reason === "status-code") {
|
98
|
+
throw new errors.AirtopError({
|
99
|
+
statusCode: _response.error.statusCode,
|
100
|
+
body: _response.error.body,
|
101
|
+
});
|
102
|
+
}
|
103
|
+
switch (_response.error.reason) {
|
104
|
+
case "non-json":
|
105
|
+
throw new errors.AirtopError({
|
106
|
+
statusCode: _response.error.statusCode,
|
107
|
+
body: _response.error.rawBody,
|
108
|
+
});
|
109
|
+
case "timeout":
|
110
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/click.");
|
111
|
+
case "unknown":
|
112
|
+
throw new errors.AirtopError({
|
113
|
+
message: _response.error.errorMessage,
|
114
|
+
});
|
115
|
+
}
|
116
|
+
});
|
117
|
+
}
|
118
|
+
/**
|
119
|
+
* Create an automation of a browser window asynchronously
|
120
|
+
*
|
121
|
+
* @param {string} sessionId - The session id for the window.
|
122
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
123
|
+
* @param {Airtop.AsyncCreateAutomationRequest} request
|
124
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
125
|
+
*
|
126
|
+
* @example
|
127
|
+
* await client.windows.asyncCreateAutomation("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
128
|
+
*/
|
129
|
+
asyncCreateAutomation(sessionId_1, windowId_1) {
|
130
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
131
|
+
var _a, _b, _c;
|
132
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
133
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/create-automation`),
|
134
|
+
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.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),
|
136
|
+
contentType: "application/json",
|
137
|
+
requestType: "json",
|
138
|
+
body: serializers.AsyncCreateAutomationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
139
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
140
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
141
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
142
|
+
});
|
143
|
+
if (_response.ok) {
|
144
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
145
|
+
unrecognizedObjectKeys: "passthrough",
|
146
|
+
allowUnrecognizedUnionMembers: true,
|
147
|
+
allowUnrecognizedEnumValues: true,
|
148
|
+
skipValidation: true,
|
149
|
+
breadcrumbsPrefix: ["response"],
|
150
|
+
});
|
151
|
+
}
|
152
|
+
if (_response.error.reason === "status-code") {
|
153
|
+
throw new errors.AirtopError({
|
154
|
+
statusCode: _response.error.statusCode,
|
155
|
+
body: _response.error.body,
|
156
|
+
});
|
157
|
+
}
|
158
|
+
switch (_response.error.reason) {
|
159
|
+
case "non-json":
|
160
|
+
throw new errors.AirtopError({
|
161
|
+
statusCode: _response.error.statusCode,
|
162
|
+
body: _response.error.rawBody,
|
163
|
+
});
|
164
|
+
case "timeout":
|
165
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/create-automation.");
|
166
|
+
case "unknown":
|
167
|
+
throw new errors.AirtopError({
|
168
|
+
message: _response.error.errorMessage,
|
169
|
+
});
|
170
|
+
}
|
171
|
+
});
|
172
|
+
}
|
173
|
+
/**
|
174
|
+
* Execute an automation of a browser window asynchronously
|
175
|
+
*
|
176
|
+
* @param {string} sessionId - The session id for the window.
|
177
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
178
|
+
* @param {Airtop.AsyncExecuteAutomationRequest} request
|
179
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
180
|
+
*
|
181
|
+
* @example
|
182
|
+
* await client.windows.asyncExecuteAutomation("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
183
|
+
* automationId: "automationId"
|
184
|
+
* })
|
185
|
+
*/
|
186
|
+
asyncExecuteAutomation(sessionId, windowId, request, requestOptions) {
|
187
|
+
return __awaiter(this, void 0, void 0, function* () {
|
188
|
+
var _a, _b, _c;
|
189
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
190
|
+
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
|
+
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.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),
|
193
|
+
contentType: "application/json",
|
194
|
+
requestType: "json",
|
195
|
+
body: serializers.AsyncExecuteAutomationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
196
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
197
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
198
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
199
|
+
});
|
200
|
+
if (_response.ok) {
|
201
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
202
|
+
unrecognizedObjectKeys: "passthrough",
|
203
|
+
allowUnrecognizedUnionMembers: true,
|
204
|
+
allowUnrecognizedEnumValues: true,
|
205
|
+
skipValidation: true,
|
206
|
+
breadcrumbsPrefix: ["response"],
|
207
|
+
});
|
208
|
+
}
|
209
|
+
if (_response.error.reason === "status-code") {
|
210
|
+
throw new errors.AirtopError({
|
211
|
+
statusCode: _response.error.statusCode,
|
212
|
+
body: _response.error.body,
|
213
|
+
});
|
214
|
+
}
|
215
|
+
switch (_response.error.reason) {
|
216
|
+
case "non-json":
|
217
|
+
throw new errors.AirtopError({
|
218
|
+
statusCode: _response.error.statusCode,
|
219
|
+
body: _response.error.rawBody,
|
220
|
+
});
|
221
|
+
case "timeout":
|
222
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/execute-automation.");
|
223
|
+
case "unknown":
|
224
|
+
throw new errors.AirtopError({
|
225
|
+
message: _response.error.errorMessage,
|
226
|
+
});
|
227
|
+
}
|
228
|
+
});
|
229
|
+
}
|
230
|
+
/**
|
231
|
+
* @param {string} sessionId - The session id for the window.
|
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.
|
235
|
+
*
|
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
|
+
* @param {string} sessionId - The session id for the window.
|
287
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
288
|
+
* @param {Airtop.AsyncMonitorRequest} request
|
289
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
290
|
+
*
|
291
|
+
* @example
|
292
|
+
* await client.windows.asyncMonitor("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
293
|
+
* condition: "Determine if the user appears to be signed in to the website"
|
294
|
+
* })
|
295
|
+
*/
|
296
|
+
asyncMonitor(sessionId, windowId, request, requestOptions) {
|
297
|
+
return __awaiter(this, void 0, void 0, function* () {
|
298
|
+
var _a, _b, _c;
|
299
|
+
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)}/monitor`),
|
301
|
+
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.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),
|
303
|
+
contentType: "application/json",
|
304
|
+
requestType: "json",
|
305
|
+
body: serializers.AsyncMonitorRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
306
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
307
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
308
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
309
|
+
});
|
310
|
+
if (_response.ok) {
|
311
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
312
|
+
unrecognizedObjectKeys: "passthrough",
|
313
|
+
allowUnrecognizedUnionMembers: true,
|
314
|
+
allowUnrecognizedEnumValues: true,
|
315
|
+
skipValidation: true,
|
316
|
+
breadcrumbsPrefix: ["response"],
|
317
|
+
});
|
318
|
+
}
|
319
|
+
if (_response.error.reason === "status-code") {
|
320
|
+
throw new errors.AirtopError({
|
321
|
+
statusCode: _response.error.statusCode,
|
322
|
+
body: _response.error.body,
|
323
|
+
});
|
324
|
+
}
|
325
|
+
switch (_response.error.reason) {
|
326
|
+
case "non-json":
|
327
|
+
throw new errors.AirtopError({
|
328
|
+
statusCode: _response.error.statusCode,
|
329
|
+
body: _response.error.rawBody,
|
330
|
+
});
|
331
|
+
case "timeout":
|
332
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/monitor.");
|
333
|
+
case "unknown":
|
334
|
+
throw new errors.AirtopError({
|
335
|
+
message: _response.error.errorMessage,
|
336
|
+
});
|
337
|
+
}
|
338
|
+
});
|
339
|
+
}
|
340
|
+
/**
|
341
|
+
* @param {string} sessionId - The session id for the window.
|
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.
|
345
|
+
*
|
346
|
+
* @example
|
347
|
+
* await client.windows.asyncPageQuery("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
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
|
399
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
400
|
+
*
|
401
|
+
* @example
|
402
|
+
* await client.windows.asyncPaginatedExtraction("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
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
|
+
* })
|
405
|
+
*/
|
406
|
+
asyncPaginatedExtraction(sessionId, windowId, request, requestOptions) {
|
407
|
+
return __awaiter(this, void 0, void 0, function* () {
|
408
|
+
var _a, _b, _c;
|
409
|
+
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, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/paginated-extraction`),
|
411
|
+
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.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),
|
413
|
+
contentType: "application/json",
|
414
|
+
requestType: "json",
|
415
|
+
body: serializers.AsyncPaginatedExtractionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
416
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
417
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
418
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
419
|
+
});
|
420
|
+
if (_response.ok) {
|
421
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
422
|
+
unrecognizedObjectKeys: "passthrough",
|
423
|
+
allowUnrecognizedUnionMembers: true,
|
424
|
+
allowUnrecognizedEnumValues: true,
|
425
|
+
skipValidation: true,
|
426
|
+
breadcrumbsPrefix: ["response"],
|
427
|
+
});
|
428
|
+
}
|
429
|
+
if (_response.error.reason === "status-code") {
|
430
|
+
throw new errors.AirtopError({
|
431
|
+
statusCode: _response.error.statusCode,
|
432
|
+
body: _response.error.body,
|
433
|
+
});
|
434
|
+
}
|
435
|
+
switch (_response.error.reason) {
|
436
|
+
case "non-json":
|
437
|
+
throw new errors.AirtopError({
|
438
|
+
statusCode: _response.error.statusCode,
|
439
|
+
body: _response.error.rawBody,
|
440
|
+
});
|
441
|
+
case "timeout":
|
442
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/paginated-extraction.");
|
443
|
+
case "unknown":
|
444
|
+
throw new errors.AirtopError({
|
445
|
+
message: _response.error.errorMessage,
|
446
|
+
});
|
447
|
+
}
|
448
|
+
});
|
449
|
+
}
|
450
|
+
/**
|
451
|
+
* This endpoint is deprecated. Please use the `pageQuery` endpoint instead.
|
452
|
+
*
|
453
|
+
* @param {string} sessionId - The session id for the window.
|
454
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
455
|
+
* @param {Airtop.AsyncPromptContentRequest} request
|
456
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
457
|
+
*
|
458
|
+
* @example
|
459
|
+
* await client.windows.asyncPromptContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
460
|
+
* prompt: "What is the main idea of this page?"
|
461
|
+
* })
|
462
|
+
*/
|
463
|
+
asyncPromptContent(sessionId, windowId, request, requestOptions) {
|
464
|
+
return __awaiter(this, void 0, void 0, function* () {
|
465
|
+
var _a, _b, _c;
|
466
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
467
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/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) {
|
574
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
575
|
+
var _a, _b, _c;
|
576
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
577
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/summarize-content`),
|
578
|
+
method: "POST",
|
579
|
+
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),
|
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
|
+
});
|
595
|
+
}
|
596
|
+
if (_response.error.reason === "status-code") {
|
597
|
+
throw new errors.AirtopError({
|
598
|
+
statusCode: _response.error.statusCode,
|
599
|
+
body: _response.error.body,
|
600
|
+
});
|
601
|
+
}
|
602
|
+
switch (_response.error.reason) {
|
603
|
+
case "non-json":
|
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
|
+
});
|
614
|
+
}
|
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
|
+
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, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/type`),
|
633
|
+
method: "POST",
|
634
|
+
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),
|
635
|
+
contentType: "application/json",
|
636
|
+
requestType: "json",
|
637
|
+
body: serializers.AsyncTypeRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
638
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
639
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
640
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
641
|
+
});
|
642
|
+
if (_response.ok) {
|
643
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
644
|
+
unrecognizedObjectKeys: "passthrough",
|
645
|
+
allowUnrecognizedUnionMembers: true,
|
646
|
+
allowUnrecognizedEnumValues: true,
|
647
|
+
skipValidation: true,
|
648
|
+
breadcrumbsPrefix: ["response"],
|
649
|
+
});
|
650
|
+
}
|
651
|
+
if (_response.error.reason === "status-code") {
|
652
|
+
throw new errors.AirtopError({
|
653
|
+
statusCode: _response.error.statusCode,
|
654
|
+
body: _response.error.body,
|
655
|
+
});
|
656
|
+
}
|
657
|
+
switch (_response.error.reason) {
|
658
|
+
case "non-json":
|
659
|
+
throw new errors.AirtopError({
|
660
|
+
statusCode: _response.error.statusCode,
|
661
|
+
body: _response.error.rawBody,
|
662
|
+
});
|
663
|
+
case "timeout":
|
664
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/type.");
|
665
|
+
case "unknown":
|
666
|
+
throw new errors.AirtopError({
|
667
|
+
message: _response.error.errorMessage,
|
668
|
+
});
|
669
|
+
}
|
670
|
+
});
|
671
|
+
}
|
51
672
|
/**
|
52
673
|
* Creates a new browser window in a session. Optionally, you can specify a url to load on the window upon creation.
|
53
674
|
*
|
@@ -58,21 +679,13 @@ class Windows {
|
|
58
679
|
* @example
|
59
680
|
* await client.windows.create("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b")
|
60
681
|
*/
|
61
|
-
create(
|
62
|
-
|
63
|
-
|
682
|
+
create(sessionId_1) {
|
683
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, request = {}, requestOptions) {
|
684
|
+
var _a, _b, _c;
|
64
685
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
65
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
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`),
|
66
687
|
method: "POST",
|
67
|
-
headers: {
|
68
|
-
Authorization: yield this._getAuthorizationHeader(),
|
69
|
-
"X-Fern-Language": "JavaScript",
|
70
|
-
"X-Fern-SDK-Name": "@airtop/sdk",
|
71
|
-
"X-Fern-SDK-Version": "0.1.34",
|
72
|
-
"User-Agent": "@airtop/sdk/0.1.34",
|
73
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
74
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
75
|
-
},
|
688
|
+
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),
|
76
689
|
contentType: "application/json",
|
77
690
|
requestType: "json",
|
78
691
|
body: serializers.CreateWindowInputV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -102,7 +715,7 @@ class Windows {
|
|
102
715
|
body: _response.error.rawBody,
|
103
716
|
});
|
104
717
|
case "timeout":
|
105
|
-
throw new errors.AirtopTimeoutError();
|
718
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows.");
|
106
719
|
case "unknown":
|
107
720
|
throw new errors.AirtopError({
|
108
721
|
message: _response.error.errorMessage,
|
@@ -123,9 +736,9 @@ class Windows {
|
|
123
736
|
* screenResolution: "1280x720"
|
124
737
|
* })
|
125
738
|
*/
|
126
|
-
getWindowInfo(
|
127
|
-
|
128
|
-
|
739
|
+
getWindowInfo(sessionId_1, windowId_1) {
|
740
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
741
|
+
var _a, _b, _c;
|
129
742
|
const { includeNavigationBar, disableResize, screenResolution } = request;
|
130
743
|
const _queryParams = {};
|
131
744
|
if (includeNavigationBar != null) {
|
@@ -138,17 +751,9 @@ class Windows {
|
|
138
751
|
_queryParams["screenResolution"] = screenResolution;
|
139
752
|
}
|
140
753
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
141
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
754
|
+
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)}`),
|
142
755
|
method: "GET",
|
143
|
-
headers: {
|
144
|
-
Authorization: yield this._getAuthorizationHeader(),
|
145
|
-
"X-Fern-Language": "JavaScript",
|
146
|
-
"X-Fern-SDK-Name": "@airtop/sdk",
|
147
|
-
"X-Fern-SDK-Version": "0.1.34",
|
148
|
-
"User-Agent": "@airtop/sdk/0.1.34",
|
149
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
150
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
151
|
-
},
|
756
|
+
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),
|
152
757
|
contentType: "application/json",
|
153
758
|
queryParameters: _queryParams,
|
154
759
|
requestType: "json",
|
@@ -178,7 +783,7 @@ class Windows {
|
|
178
783
|
body: _response.error.rawBody,
|
179
784
|
});
|
180
785
|
case "timeout":
|
181
|
-
throw new errors.AirtopTimeoutError();
|
786
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling GET /sessions/{sessionId}/windows/{windowId}.");
|
182
787
|
case "unknown":
|
183
788
|
throw new errors.AirtopError({
|
184
789
|
message: _response.error.errorMessage,
|
@@ -200,20 +805,12 @@ class Windows {
|
|
200
805
|
* })
|
201
806
|
*/
|
202
807
|
loadUrl(sessionId, windowId, request, requestOptions) {
|
203
|
-
var _a, _b;
|
204
808
|
return __awaiter(this, void 0, void 0, function* () {
|
809
|
+
var _a, _b, _c;
|
205
810
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
206
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
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)}`),
|
207
812
|
method: "POST",
|
208
|
-
headers: {
|
209
|
-
Authorization: yield this._getAuthorizationHeader(),
|
210
|
-
"X-Fern-Language": "JavaScript",
|
211
|
-
"X-Fern-SDK-Name": "@airtop/sdk",
|
212
|
-
"X-Fern-SDK-Version": "0.1.34",
|
213
|
-
"User-Agent": "@airtop/sdk/0.1.34",
|
214
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
215
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
216
|
-
},
|
813
|
+
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),
|
217
814
|
contentType: "application/json",
|
218
815
|
requestType: "json",
|
219
816
|
body: serializers.WindowLoadUrlV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -243,7 +840,7 @@ class Windows {
|
|
243
840
|
body: _response.error.rawBody,
|
244
841
|
});
|
245
842
|
case "timeout":
|
246
|
-
throw new errors.AirtopTimeoutError();
|
843
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}.");
|
247
844
|
case "unknown":
|
248
845
|
throw new errors.AirtopError({
|
249
846
|
message: _response.error.errorMessage,
|
@@ -262,20 +859,12 @@ class Windows {
|
|
262
859
|
* await client.windows.close("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "7334da2a-91b0-42c5-6156-76a5eba87430")
|
263
860
|
*/
|
264
861
|
close(sessionId, windowId, requestOptions) {
|
265
|
-
var _a, _b;
|
266
862
|
return __awaiter(this, void 0, void 0, function* () {
|
863
|
+
var _a, _b, _c;
|
267
864
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
268
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
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)}`),
|
269
866
|
method: "DELETE",
|
270
|
-
headers: {
|
271
|
-
Authorization: yield this._getAuthorizationHeader(),
|
272
|
-
"X-Fern-Language": "JavaScript",
|
273
|
-
"X-Fern-SDK-Name": "@airtop/sdk",
|
274
|
-
"X-Fern-SDK-Version": "0.1.34",
|
275
|
-
"User-Agent": "@airtop/sdk/0.1.34",
|
276
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
277
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
278
|
-
},
|
867
|
+
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),
|
279
868
|
contentType: "application/json",
|
280
869
|
requestType: "json",
|
281
870
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -304,7 +893,7 @@ class Windows {
|
|
304
893
|
body: _response.error.rawBody,
|
305
894
|
});
|
306
895
|
case "timeout":
|
307
|
-
throw new errors.AirtopTimeoutError();
|
896
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling DELETE /sessions/{sessionId}/windows/{windowId}.");
|
308
897
|
case "unknown":
|
309
898
|
throw new errors.AirtopError({
|
310
899
|
message: _response.error.errorMessage,
|
@@ -326,20 +915,12 @@ class Windows {
|
|
326
915
|
* })
|
327
916
|
*/
|
328
917
|
click(sessionId, windowId, request, requestOptions) {
|
329
|
-
var _a, _b;
|
330
918
|
return __awaiter(this, void 0, void 0, function* () {
|
919
|
+
var _a, _b, _c;
|
331
920
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
332
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
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)}/click`),
|
333
922
|
method: "POST",
|
334
|
-
headers: {
|
335
|
-
Authorization: yield this._getAuthorizationHeader(),
|
336
|
-
"X-Fern-Language": "JavaScript",
|
337
|
-
"X-Fern-SDK-Name": "@airtop/sdk",
|
338
|
-
"X-Fern-SDK-Version": "0.1.34",
|
339
|
-
"User-Agent": "@airtop/sdk/0.1.34",
|
340
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
341
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
342
|
-
},
|
923
|
+
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),
|
343
924
|
contentType: "application/json",
|
344
925
|
requestType: "json",
|
345
926
|
body: serializers.SessionClickHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -369,7 +950,7 @@ class Windows {
|
|
369
950
|
body: _response.error.rawBody,
|
370
951
|
});
|
371
952
|
case "timeout":
|
372
|
-
throw new errors.AirtopTimeoutError();
|
953
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/click.");
|
373
954
|
case "unknown":
|
374
955
|
throw new errors.AirtopError({
|
375
956
|
message: _response.error.errorMessage,
|
@@ -391,20 +972,12 @@ class Windows {
|
|
391
972
|
* })
|
392
973
|
*/
|
393
974
|
hover(sessionId, windowId, request, requestOptions) {
|
394
|
-
var _a, _b;
|
395
975
|
return __awaiter(this, void 0, void 0, function* () {
|
976
|
+
var _a, _b, _c;
|
396
977
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
397
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
978
|
+
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`),
|
398
979
|
method: "POST",
|
399
|
-
headers: {
|
400
|
-
Authorization: yield this._getAuthorizationHeader(),
|
401
|
-
"X-Fern-Language": "JavaScript",
|
402
|
-
"X-Fern-SDK-Name": "@airtop/sdk",
|
403
|
-
"X-Fern-SDK-Version": "0.1.34",
|
404
|
-
"User-Agent": "@airtop/sdk/0.1.34",
|
405
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
406
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
407
|
-
},
|
980
|
+
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),
|
408
981
|
contentType: "application/json",
|
409
982
|
requestType: "json",
|
410
983
|
body: serializers.SessionHoverHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -434,7 +1007,7 @@ class Windows {
|
|
434
1007
|
body: _response.error.rawBody,
|
435
1008
|
});
|
436
1009
|
case "timeout":
|
437
|
-
throw new errors.AirtopTimeoutError();
|
1010
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/hover.");
|
438
1011
|
case "unknown":
|
439
1012
|
throw new errors.AirtopError({
|
440
1013
|
message: _response.error.errorMessage,
|
@@ -454,20 +1027,12 @@ class Windows {
|
|
454
1027
|
* })
|
455
1028
|
*/
|
456
1029
|
monitor(sessionId, windowId, request, requestOptions) {
|
457
|
-
var _a, _b;
|
458
1030
|
return __awaiter(this, void 0, void 0, function* () {
|
1031
|
+
var _a, _b, _c;
|
459
1032
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
460
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
1033
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/monitor`),
|
461
1034
|
method: "POST",
|
462
|
-
headers: {
|
463
|
-
Authorization: yield this._getAuthorizationHeader(),
|
464
|
-
"X-Fern-Language": "JavaScript",
|
465
|
-
"X-Fern-SDK-Name": "@airtop/sdk",
|
466
|
-
"X-Fern-SDK-Version": "0.1.34",
|
467
|
-
"User-Agent": "@airtop/sdk/0.1.34",
|
468
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
469
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
470
|
-
},
|
1035
|
+
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),
|
471
1036
|
contentType: "application/json",
|
472
1037
|
requestType: "json",
|
473
1038
|
body: serializers.SessionMonitorHandlerRequestBody.jsonOrThrow(request, {
|
@@ -499,7 +1064,7 @@ class Windows {
|
|
499
1064
|
body: _response.error.rawBody,
|
500
1065
|
});
|
501
1066
|
case "timeout":
|
502
|
-
throw new errors.AirtopTimeoutError();
|
1067
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/monitor.");
|
503
1068
|
case "unknown":
|
504
1069
|
throw new errors.AirtopError({
|
505
1070
|
message: _response.error.errorMessage,
|
@@ -521,20 +1086,12 @@ class Windows {
|
|
521
1086
|
* })
|
522
1087
|
*/
|
523
1088
|
pageQuery(sessionId, windowId, request, requestOptions) {
|
524
|
-
var _a, _b;
|
525
1089
|
return __awaiter(this, void 0, void 0, function* () {
|
1090
|
+
var _a, _b, _c;
|
526
1091
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
527
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
1092
|
+
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`),
|
528
1093
|
method: "POST",
|
529
|
-
headers: {
|
530
|
-
Authorization: yield this._getAuthorizationHeader(),
|
531
|
-
"X-Fern-Language": "JavaScript",
|
532
|
-
"X-Fern-SDK-Name": "@airtop/sdk",
|
533
|
-
"X-Fern-SDK-Version": "0.1.34",
|
534
|
-
"User-Agent": "@airtop/sdk/0.1.34",
|
535
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
536
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
537
|
-
},
|
1094
|
+
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),
|
538
1095
|
contentType: "application/json",
|
539
1096
|
requestType: "json",
|
540
1097
|
body: serializers.SessionPageQueryHandlerRequestBody.jsonOrThrow(request, {
|
@@ -566,7 +1123,7 @@ class Windows {
|
|
566
1123
|
body: _response.error.rawBody,
|
567
1124
|
});
|
568
1125
|
case "timeout":
|
569
|
-
throw new errors.AirtopTimeoutError();
|
1126
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/page-query.");
|
570
1127
|
case "unknown":
|
571
1128
|
throw new errors.AirtopError({
|
572
1129
|
message: _response.error.errorMessage,
|
@@ -588,20 +1145,12 @@ class Windows {
|
|
588
1145
|
* })
|
589
1146
|
*/
|
590
1147
|
paginatedExtraction(sessionId, windowId, request, requestOptions) {
|
591
|
-
var _a, _b;
|
592
1148
|
return __awaiter(this, void 0, void 0, function* () {
|
1149
|
+
var _a, _b, _c;
|
593
1150
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
594
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
1151
|
+
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`),
|
595
1152
|
method: "POST",
|
596
|
-
headers: {
|
597
|
-
Authorization: yield this._getAuthorizationHeader(),
|
598
|
-
"X-Fern-Language": "JavaScript",
|
599
|
-
"X-Fern-SDK-Name": "@airtop/sdk",
|
600
|
-
"X-Fern-SDK-Version": "0.1.34",
|
601
|
-
"User-Agent": "@airtop/sdk/0.1.34",
|
602
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
603
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
604
|
-
},
|
1153
|
+
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),
|
605
1154
|
contentType: "application/json",
|
606
1155
|
requestType: "json",
|
607
1156
|
body: serializers.SessionPaginatedExtractionHandlerRequestBody.jsonOrThrow(request, {
|
@@ -633,7 +1182,7 @@ class Windows {
|
|
633
1182
|
body: _response.error.rawBody,
|
634
1183
|
});
|
635
1184
|
case "timeout":
|
636
|
-
throw new errors.AirtopTimeoutError();
|
1185
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/paginated-extraction.");
|
637
1186
|
case "unknown":
|
638
1187
|
throw new errors.AirtopError({
|
639
1188
|
message: _response.error.errorMessage,
|
@@ -655,20 +1204,12 @@ class Windows {
|
|
655
1204
|
* })
|
656
1205
|
*/
|
657
1206
|
promptContent(sessionId, windowId, request, requestOptions) {
|
658
|
-
var _a, _b;
|
659
1207
|
return __awaiter(this, void 0, void 0, function* () {
|
1208
|
+
var _a, _b, _c;
|
660
1209
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
661
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
1210
|
+
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`),
|
662
1211
|
method: "POST",
|
663
|
-
headers: {
|
664
|
-
Authorization: yield this._getAuthorizationHeader(),
|
665
|
-
"X-Fern-Language": "JavaScript",
|
666
|
-
"X-Fern-SDK-Name": "@airtop/sdk",
|
667
|
-
"X-Fern-SDK-Version": "0.1.34",
|
668
|
-
"User-Agent": "@airtop/sdk/0.1.34",
|
669
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
670
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
671
|
-
},
|
1212
|
+
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),
|
672
1213
|
contentType: "application/json",
|
673
1214
|
requestType: "json",
|
674
1215
|
body: serializers.SessionPageQueryHandlerRequestBody.jsonOrThrow(request, {
|
@@ -700,7 +1241,7 @@ class Windows {
|
|
700
1241
|
body: _response.error.rawBody,
|
701
1242
|
});
|
702
1243
|
case "timeout":
|
703
|
-
throw new errors.AirtopTimeoutError();
|
1244
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/prompt-content.");
|
704
1245
|
case "unknown":
|
705
1246
|
throw new errors.AirtopError({
|
706
1247
|
message: _response.error.errorMessage,
|
@@ -719,21 +1260,13 @@ class Windows {
|
|
719
1260
|
* @example
|
720
1261
|
* await client.windows.scrapeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
721
1262
|
*/
|
722
|
-
scrapeContent(
|
723
|
-
|
724
|
-
|
1263
|
+
scrapeContent(sessionId_1, windowId_1) {
|
1264
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
1265
|
+
var _a, _b, _c;
|
725
1266
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
726
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
1267
|
+
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`),
|
727
1268
|
method: "POST",
|
728
|
-
headers: {
|
729
|
-
Authorization: yield this._getAuthorizationHeader(),
|
730
|
-
"X-Fern-Language": "JavaScript",
|
731
|
-
"X-Fern-SDK-Name": "@airtop/sdk",
|
732
|
-
"X-Fern-SDK-Version": "0.1.34",
|
733
|
-
"User-Agent": "@airtop/sdk/0.1.34",
|
734
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
735
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
736
|
-
},
|
1269
|
+
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),
|
737
1270
|
contentType: "application/json",
|
738
1271
|
requestType: "json",
|
739
1272
|
body: serializers.ScrapeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -763,7 +1296,7 @@ class Windows {
|
|
763
1296
|
body: _response.error.rawBody,
|
764
1297
|
});
|
765
1298
|
case "timeout":
|
766
|
-
throw new errors.AirtopTimeoutError();
|
1299
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/scrape-content.");
|
767
1300
|
case "unknown":
|
768
1301
|
throw new errors.AirtopError({
|
769
1302
|
message: _response.error.errorMessage,
|
@@ -782,21 +1315,13 @@ class Windows {
|
|
782
1315
|
* @example
|
783
1316
|
* await client.windows.screenshot("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
784
1317
|
*/
|
785
|
-
screenshot(
|
786
|
-
|
787
|
-
|
1318
|
+
screenshot(sessionId_1, windowId_1) {
|
1319
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
1320
|
+
var _a, _b, _c;
|
788
1321
|
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.
|
1322
|
+
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`),
|
790
1323
|
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.34",
|
796
|
-
"User-Agent": "@airtop/sdk/0.1.34",
|
797
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
798
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
799
|
-
},
|
1324
|
+
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),
|
800
1325
|
contentType: "application/json",
|
801
1326
|
requestType: "json",
|
802
1327
|
body: serializers.SessionScreenshotHandlerRequestBody.jsonOrThrow(request, {
|
@@ -828,7 +1353,7 @@ class Windows {
|
|
828
1353
|
body: _response.error.rawBody,
|
829
1354
|
});
|
830
1355
|
case "timeout":
|
831
|
-
throw new errors.AirtopTimeoutError();
|
1356
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/screenshot.");
|
832
1357
|
case "unknown":
|
833
1358
|
throw new errors.AirtopError({
|
834
1359
|
message: _response.error.errorMessage,
|
@@ -847,21 +1372,13 @@ class Windows {
|
|
847
1372
|
* @example
|
848
1373
|
* await client.windows.scroll("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
849
1374
|
*/
|
850
|
-
scroll(
|
851
|
-
|
852
|
-
|
1375
|
+
scroll(sessionId_1, windowId_1) {
|
1376
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
1377
|
+
var _a, _b, _c;
|
853
1378
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
854
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
1379
|
+
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`),
|
855
1380
|
method: "POST",
|
856
|
-
headers: {
|
857
|
-
Authorization: yield this._getAuthorizationHeader(),
|
858
|
-
"X-Fern-Language": "JavaScript",
|
859
|
-
"X-Fern-SDK-Name": "@airtop/sdk",
|
860
|
-
"X-Fern-SDK-Version": "0.1.34",
|
861
|
-
"User-Agent": "@airtop/sdk/0.1.34",
|
862
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
863
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
864
|
-
},
|
1381
|
+
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),
|
865
1382
|
contentType: "application/json",
|
866
1383
|
requestType: "json",
|
867
1384
|
body: serializers.SessionScrollHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -891,7 +1408,7 @@ class Windows {
|
|
891
1408
|
body: _response.error.rawBody,
|
892
1409
|
});
|
893
1410
|
case "timeout":
|
894
|
-
throw new errors.AirtopTimeoutError();
|
1411
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/scroll.");
|
895
1412
|
case "unknown":
|
896
1413
|
throw new errors.AirtopError({
|
897
1414
|
message: _response.error.errorMessage,
|
@@ -910,21 +1427,13 @@ class Windows {
|
|
910
1427
|
* @example
|
911
1428
|
* await client.windows.summarizeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
912
1429
|
*/
|
913
|
-
summarizeContent(
|
914
|
-
|
915
|
-
|
1430
|
+
summarizeContent(sessionId_1, windowId_1) {
|
1431
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
1432
|
+
var _a, _b, _c;
|
916
1433
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
917
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
1434
|
+
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`),
|
918
1435
|
method: "POST",
|
919
|
-
headers: {
|
920
|
-
Authorization: yield this._getAuthorizationHeader(),
|
921
|
-
"X-Fern-Language": "JavaScript",
|
922
|
-
"X-Fern-SDK-Name": "@airtop/sdk",
|
923
|
-
"X-Fern-SDK-Version": "0.1.34",
|
924
|
-
"User-Agent": "@airtop/sdk/0.1.34",
|
925
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
926
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
927
|
-
},
|
1436
|
+
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),
|
928
1437
|
contentType: "application/json",
|
929
1438
|
requestType: "json",
|
930
1439
|
body: serializers.SessionSummaryHandlerRequestBody.jsonOrThrow(request, {
|
@@ -956,7 +1465,7 @@ class Windows {
|
|
956
1465
|
body: _response.error.rawBody,
|
957
1466
|
});
|
958
1467
|
case "timeout":
|
959
|
-
throw new errors.AirtopTimeoutError();
|
1468
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/summarize-content.");
|
960
1469
|
case "unknown":
|
961
1470
|
throw new errors.AirtopError({
|
962
1471
|
message: _response.error.errorMessage,
|
@@ -978,20 +1487,12 @@ class Windows {
|
|
978
1487
|
* })
|
979
1488
|
*/
|
980
1489
|
type(sessionId, windowId, request, requestOptions) {
|
981
|
-
var _a, _b;
|
982
1490
|
return __awaiter(this, void 0, void 0, function* () {
|
1491
|
+
var _a, _b, _c;
|
983
1492
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
984
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
1493
|
+
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`),
|
985
1494
|
method: "POST",
|
986
|
-
headers: {
|
987
|
-
Authorization: yield this._getAuthorizationHeader(),
|
988
|
-
"X-Fern-Language": "JavaScript",
|
989
|
-
"X-Fern-SDK-Name": "@airtop/sdk",
|
990
|
-
"X-Fern-SDK-Version": "0.1.34",
|
991
|
-
"User-Agent": "@airtop/sdk/0.1.34",
|
992
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
993
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
994
|
-
},
|
1495
|
+
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),
|
995
1496
|
contentType: "application/json",
|
996
1497
|
requestType: "json",
|
997
1498
|
body: serializers.SessionTypeHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1021,7 +1522,7 @@ class Windows {
|
|
1021
1522
|
body: _response.error.rawBody,
|
1022
1523
|
});
|
1023
1524
|
case "timeout":
|
1024
|
-
throw new errors.AirtopTimeoutError();
|
1525
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/type.");
|
1025
1526
|
case "unknown":
|
1026
1527
|
throw new errors.AirtopError({
|
1027
1528
|
message: _response.error.errorMessage,
|