@airtop/sdk 0.1.34 → 0.1.36-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 +22 -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 +5 -1
- package/api/resources/sessions/client/Client.js +52 -88
- package/api/resources/sessions/client/requests/SessionsEventsRequest.d.ts +7 -0
- package/api/resources/sessions/types/SessionsEventsResponse.d.ts +7 -7
- package/api/resources/sessions/types/SessionsListRequestStatus.d.ts +1 -1
- package/api/resources/sessions/types/index.d.ts +2 -2
- package/api/resources/sessions/types/index.js +2 -2
- package/api/resources/windows/client/Client.d.ts +194 -0
- package/api/resources/windows/client/Client.js +924 -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/AsyncCreateFormFillerRequest.d.ts +23 -0
- package/api/resources/windows/client/requests/AsyncCreateFormFillerRequest.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/AsyncFillFormRequest.d.ts +27 -0
- package/api/resources/windows/client/requests/AsyncFillFormRequest.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/CreateFormFillerRequest.d.ts +23 -0
- package/api/resources/windows/client/requests/CreateFormFillerRequest.js +5 -0
- package/api/resources/windows/client/requests/FillFormRequest.d.ts +27 -0
- package/api/resources/windows/client/requests/FillFormRequest.js +5 -0
- package/api/resources/windows/client/requests/index.d.ts +15 -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/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 +15 -0
- package/api/types/index.js +15 -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 +22 -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 +5 -1
- package/dist/api/resources/sessions/client/Client.js +52 -88
- package/dist/api/resources/sessions/client/requests/SessionsEventsRequest.d.ts +7 -0
- package/dist/api/resources/sessions/types/SessionsEventsResponse.d.ts +7 -7
- package/dist/api/resources/sessions/types/SessionsListRequestStatus.d.ts +1 -1
- package/dist/api/resources/sessions/types/index.d.ts +2 -2
- package/dist/api/resources/sessions/types/index.js +2 -2
- package/dist/api/resources/windows/client/Client.d.ts +194 -0
- package/dist/api/resources/windows/client/Client.js +924 -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/AsyncCreateFormFillerRequest.d.ts +23 -0
- package/dist/api/resources/windows/client/requests/AsyncCreateFormFillerRequest.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/AsyncFillFormRequest.d.ts +27 -0
- package/dist/api/resources/windows/client/requests/AsyncFillFormRequest.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/CreateFormFillerRequest.d.ts +23 -0
- package/dist/api/resources/windows/client/requests/CreateFormFillerRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/FillFormRequest.d.ts +27 -0
- package/dist/api/resources/windows/client/requests/FillFormRequest.js +5 -0
- package/dist/api/resources/windows/client/requests/index.d.ts +15 -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/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 +15 -0
- package/dist/api/types/index.js +15 -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 +17 -0
- package/dist/serialization/resources/files/client/requests/CreateFileRestInputV1.js +48 -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 +9 -9
- package/dist/serialization/resources/sessions/types/SessionsEventsResponse.js +21 -11
- 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 +2 -2
- package/dist/serialization/resources/sessions/types/index.js +2 -2
- 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/AsyncCreateFormFillerRequest.d.ts +18 -0
- package/dist/serialization/resources/windows/client/requests/AsyncCreateFormFillerRequest.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/AsyncFillFormRequest.d.ts +18 -0
- package/dist/serialization/resources/windows/client/requests/AsyncFillFormRequest.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/CreateFormFillerRequest.d.ts +18 -0
- package/dist/serialization/resources/windows/client/requests/CreateFormFillerRequest.js +49 -0
- package/dist/serialization/resources/windows/client/requests/CreateWindowInputV1Body.js +17 -7
- package/dist/serialization/resources/windows/client/requests/FillFormRequest.d.ts +18 -0
- package/dist/serialization/resources/windows/client/requests/FillFormRequest.js +49 -0
- 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 +15 -0
- package/dist/serialization/resources/windows/client/requests/index.js +31 -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 +15 -0
- package/dist/serialization/types/index.js +15 -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 +6 -2
- package/dist/wrapper/AirtopClient.js +27 -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.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 +16 -13
- package/reference.md +1881 -189
- 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 +17 -0
- package/serialization/resources/files/client/requests/CreateFileRestInputV1.js +48 -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 +9 -9
- package/serialization/resources/sessions/types/SessionsEventsResponse.js +21 -11
- 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 +2 -2
- package/serialization/resources/sessions/types/index.js +2 -2
- 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/AsyncCreateFormFillerRequest.d.ts +18 -0
- package/serialization/resources/windows/client/requests/AsyncCreateFormFillerRequest.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/AsyncFillFormRequest.d.ts +18 -0
- package/serialization/resources/windows/client/requests/AsyncFillFormRequest.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/CreateFormFillerRequest.d.ts +18 -0
- package/serialization/resources/windows/client/requests/CreateFormFillerRequest.js +49 -0
- package/serialization/resources/windows/client/requests/CreateWindowInputV1Body.js +17 -7
- package/serialization/resources/windows/client/requests/FillFormRequest.d.ts +18 -0
- package/serialization/resources/windows/client/requests/FillFormRequest.js +49 -0
- 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 +15 -0
- package/serialization/resources/windows/client/requests/index.js +31 -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 +15 -0
- package/serialization/types/index.js +15 -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 +6 -2
- package/wrapper/AirtopClient.js +27 -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.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,729 @@ 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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
81
|
+
contentType: "application/json",
|
82
|
+
requestType: "json",
|
83
|
+
body: serializers.AsyncClickRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
84
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
85
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
86
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
87
|
+
});
|
88
|
+
if (_response.ok) {
|
89
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
90
|
+
unrecognizedObjectKeys: "passthrough",
|
91
|
+
allowUnrecognizedUnionMembers: true,
|
92
|
+
allowUnrecognizedEnumValues: true,
|
93
|
+
skipValidation: true,
|
94
|
+
breadcrumbsPrefix: ["response"],
|
95
|
+
});
|
96
|
+
}
|
97
|
+
if (_response.error.reason === "status-code") {
|
98
|
+
throw new errors.AirtopError({
|
99
|
+
statusCode: _response.error.statusCode,
|
100
|
+
body: _response.error.body,
|
101
|
+
});
|
102
|
+
}
|
103
|
+
switch (_response.error.reason) {
|
104
|
+
case "non-json":
|
105
|
+
throw new errors.AirtopError({
|
106
|
+
statusCode: _response.error.statusCode,
|
107
|
+
body: _response.error.rawBody,
|
108
|
+
});
|
109
|
+
case "timeout":
|
110
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/click.");
|
111
|
+
case "unknown":
|
112
|
+
throw new errors.AirtopError({
|
113
|
+
message: _response.error.errorMessage,
|
114
|
+
});
|
115
|
+
}
|
116
|
+
});
|
117
|
+
}
|
118
|
+
/**
|
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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "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
|
+
* Create a form filler automation 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.AsyncCreateFormFillerRequest} request
|
179
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
180
|
+
*
|
181
|
+
* @example
|
182
|
+
* await client.windows.asyncCreateFormFiller("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
183
|
+
*/
|
184
|
+
asyncCreateFormFiller(sessionId_1, windowId_1) {
|
185
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
186
|
+
var _a, _b, _c;
|
187
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
188
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/create-form-filler`),
|
189
|
+
method: "POST",
|
190
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
191
|
+
contentType: "application/json",
|
192
|
+
requestType: "json",
|
193
|
+
body: serializers.AsyncCreateFormFillerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
194
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
195
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
196
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
197
|
+
});
|
198
|
+
if (_response.ok) {
|
199
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
200
|
+
unrecognizedObjectKeys: "passthrough",
|
201
|
+
allowUnrecognizedUnionMembers: true,
|
202
|
+
allowUnrecognizedEnumValues: true,
|
203
|
+
skipValidation: true,
|
204
|
+
breadcrumbsPrefix: ["response"],
|
205
|
+
});
|
206
|
+
}
|
207
|
+
if (_response.error.reason === "status-code") {
|
208
|
+
throw new errors.AirtopError({
|
209
|
+
statusCode: _response.error.statusCode,
|
210
|
+
body: _response.error.body,
|
211
|
+
});
|
212
|
+
}
|
213
|
+
switch (_response.error.reason) {
|
214
|
+
case "non-json":
|
215
|
+
throw new errors.AirtopError({
|
216
|
+
statusCode: _response.error.statusCode,
|
217
|
+
body: _response.error.rawBody,
|
218
|
+
});
|
219
|
+
case "timeout":
|
220
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/create-form-filler.");
|
221
|
+
case "unknown":
|
222
|
+
throw new errors.AirtopError({
|
223
|
+
message: _response.error.errorMessage,
|
224
|
+
});
|
225
|
+
}
|
226
|
+
});
|
227
|
+
}
|
228
|
+
/**
|
229
|
+
* Execute an automation of a browser window asynchronously
|
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.AsyncExecuteAutomationRequest} request
|
234
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
235
|
+
*
|
236
|
+
* @example
|
237
|
+
* await client.windows.asyncExecuteAutomation("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
238
|
+
* automationId: "automationId"
|
239
|
+
* })
|
240
|
+
*/
|
241
|
+
asyncExecuteAutomation(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)}/execute-automation`),
|
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.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "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.AsyncExecuteAutomationRequest.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}/execute-automation.");
|
278
|
+
case "unknown":
|
279
|
+
throw new errors.AirtopError({
|
280
|
+
message: _response.error.errorMessage,
|
281
|
+
});
|
282
|
+
}
|
283
|
+
});
|
284
|
+
}
|
285
|
+
/**
|
286
|
+
* Fill a form of a browser window asynchronously using a form-filler automation
|
287
|
+
*
|
288
|
+
* @param {string} sessionId - The session id for the window.
|
289
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
290
|
+
* @param {Airtop.AsyncFillFormRequest} request
|
291
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
292
|
+
*
|
293
|
+
* @example
|
294
|
+
* await client.windows.asyncFillForm("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
295
|
+
* automationId: "automationId"
|
296
|
+
* })
|
297
|
+
*/
|
298
|
+
asyncFillForm(sessionId, windowId, request, requestOptions) {
|
299
|
+
return __awaiter(this, void 0, void 0, function* () {
|
300
|
+
var _a, _b, _c;
|
301
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
302
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/fill-form`),
|
303
|
+
method: "POST",
|
304
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
305
|
+
contentType: "application/json",
|
306
|
+
requestType: "json",
|
307
|
+
body: serializers.AsyncFillFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
308
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
309
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
310
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
311
|
+
});
|
312
|
+
if (_response.ok) {
|
313
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
314
|
+
unrecognizedObjectKeys: "passthrough",
|
315
|
+
allowUnrecognizedUnionMembers: true,
|
316
|
+
allowUnrecognizedEnumValues: true,
|
317
|
+
skipValidation: true,
|
318
|
+
breadcrumbsPrefix: ["response"],
|
319
|
+
});
|
320
|
+
}
|
321
|
+
if (_response.error.reason === "status-code") {
|
322
|
+
throw new errors.AirtopError({
|
323
|
+
statusCode: _response.error.statusCode,
|
324
|
+
body: _response.error.body,
|
325
|
+
});
|
326
|
+
}
|
327
|
+
switch (_response.error.reason) {
|
328
|
+
case "non-json":
|
329
|
+
throw new errors.AirtopError({
|
330
|
+
statusCode: _response.error.statusCode,
|
331
|
+
body: _response.error.rawBody,
|
332
|
+
});
|
333
|
+
case "timeout":
|
334
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/fill-form.");
|
335
|
+
case "unknown":
|
336
|
+
throw new errors.AirtopError({
|
337
|
+
message: _response.error.errorMessage,
|
338
|
+
});
|
339
|
+
}
|
340
|
+
});
|
341
|
+
}
|
342
|
+
/**
|
343
|
+
* @param {string} sessionId - The session id for the window.
|
344
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
345
|
+
* @param {Airtop.AsyncHoverRequest} request
|
346
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
347
|
+
*
|
348
|
+
* @example
|
349
|
+
* await client.windows.asyncHover("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
350
|
+
* elementDescription: "The search box input in the top right corner"
|
351
|
+
* })
|
352
|
+
*/
|
353
|
+
asyncHover(sessionId, windowId, request, requestOptions) {
|
354
|
+
return __awaiter(this, void 0, void 0, function* () {
|
355
|
+
var _a, _b, _c;
|
356
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
357
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/hover`),
|
358
|
+
method: "POST",
|
359
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
360
|
+
contentType: "application/json",
|
361
|
+
requestType: "json",
|
362
|
+
body: serializers.AsyncHoverRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
363
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
364
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
365
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
366
|
+
});
|
367
|
+
if (_response.ok) {
|
368
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
369
|
+
unrecognizedObjectKeys: "passthrough",
|
370
|
+
allowUnrecognizedUnionMembers: true,
|
371
|
+
allowUnrecognizedEnumValues: true,
|
372
|
+
skipValidation: true,
|
373
|
+
breadcrumbsPrefix: ["response"],
|
374
|
+
});
|
375
|
+
}
|
376
|
+
if (_response.error.reason === "status-code") {
|
377
|
+
throw new errors.AirtopError({
|
378
|
+
statusCode: _response.error.statusCode,
|
379
|
+
body: _response.error.body,
|
380
|
+
});
|
381
|
+
}
|
382
|
+
switch (_response.error.reason) {
|
383
|
+
case "non-json":
|
384
|
+
throw new errors.AirtopError({
|
385
|
+
statusCode: _response.error.statusCode,
|
386
|
+
body: _response.error.rawBody,
|
387
|
+
});
|
388
|
+
case "timeout":
|
389
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/hover.");
|
390
|
+
case "unknown":
|
391
|
+
throw new errors.AirtopError({
|
392
|
+
message: _response.error.errorMessage,
|
393
|
+
});
|
394
|
+
}
|
395
|
+
});
|
396
|
+
}
|
397
|
+
/**
|
398
|
+
* @param {string} sessionId - The session id for the window.
|
399
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
400
|
+
* @param {Airtop.AsyncMonitorRequest} request
|
401
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
402
|
+
*
|
403
|
+
* @example
|
404
|
+
* await client.windows.asyncMonitor("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
405
|
+
* condition: "Determine if the user appears to be signed in to the website"
|
406
|
+
* })
|
407
|
+
*/
|
408
|
+
asyncMonitor(sessionId, windowId, request, requestOptions) {
|
409
|
+
return __awaiter(this, void 0, void 0, function* () {
|
410
|
+
var _a, _b, _c;
|
411
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
412
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/monitor`),
|
413
|
+
method: "POST",
|
414
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
415
|
+
contentType: "application/json",
|
416
|
+
requestType: "json",
|
417
|
+
body: serializers.AsyncMonitorRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
418
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
419
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
420
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
421
|
+
});
|
422
|
+
if (_response.ok) {
|
423
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
424
|
+
unrecognizedObjectKeys: "passthrough",
|
425
|
+
allowUnrecognizedUnionMembers: true,
|
426
|
+
allowUnrecognizedEnumValues: true,
|
427
|
+
skipValidation: true,
|
428
|
+
breadcrumbsPrefix: ["response"],
|
429
|
+
});
|
430
|
+
}
|
431
|
+
if (_response.error.reason === "status-code") {
|
432
|
+
throw new errors.AirtopError({
|
433
|
+
statusCode: _response.error.statusCode,
|
434
|
+
body: _response.error.body,
|
435
|
+
});
|
436
|
+
}
|
437
|
+
switch (_response.error.reason) {
|
438
|
+
case "non-json":
|
439
|
+
throw new errors.AirtopError({
|
440
|
+
statusCode: _response.error.statusCode,
|
441
|
+
body: _response.error.rawBody,
|
442
|
+
});
|
443
|
+
case "timeout":
|
444
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/monitor.");
|
445
|
+
case "unknown":
|
446
|
+
throw new errors.AirtopError({
|
447
|
+
message: _response.error.errorMessage,
|
448
|
+
});
|
449
|
+
}
|
450
|
+
});
|
451
|
+
}
|
452
|
+
/**
|
453
|
+
* @param {string} sessionId - The session id for the window.
|
454
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
455
|
+
* @param {Airtop.AsyncPageQueryRequest} request
|
456
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
457
|
+
*
|
458
|
+
* @example
|
459
|
+
* await client.windows.asyncPageQuery("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
460
|
+
* prompt: "What is the main idea of this page?"
|
461
|
+
* })
|
462
|
+
*/
|
463
|
+
asyncPageQuery(sessionId, windowId, request, requestOptions) {
|
464
|
+
return __awaiter(this, void 0, void 0, function* () {
|
465
|
+
var _a, _b, _c;
|
466
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
467
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/page-query`),
|
468
|
+
method: "POST",
|
469
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
470
|
+
contentType: "application/json",
|
471
|
+
requestType: "json",
|
472
|
+
body: serializers.AsyncPageQueryRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
473
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
474
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
475
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
476
|
+
});
|
477
|
+
if (_response.ok) {
|
478
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
479
|
+
unrecognizedObjectKeys: "passthrough",
|
480
|
+
allowUnrecognizedUnionMembers: true,
|
481
|
+
allowUnrecognizedEnumValues: true,
|
482
|
+
skipValidation: true,
|
483
|
+
breadcrumbsPrefix: ["response"],
|
484
|
+
});
|
485
|
+
}
|
486
|
+
if (_response.error.reason === "status-code") {
|
487
|
+
throw new errors.AirtopError({
|
488
|
+
statusCode: _response.error.statusCode,
|
489
|
+
body: _response.error.body,
|
490
|
+
});
|
491
|
+
}
|
492
|
+
switch (_response.error.reason) {
|
493
|
+
case "non-json":
|
494
|
+
throw new errors.AirtopError({
|
495
|
+
statusCode: _response.error.statusCode,
|
496
|
+
body: _response.error.rawBody,
|
497
|
+
});
|
498
|
+
case "timeout":
|
499
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/page-query.");
|
500
|
+
case "unknown":
|
501
|
+
throw new errors.AirtopError({
|
502
|
+
message: _response.error.errorMessage,
|
503
|
+
});
|
504
|
+
}
|
505
|
+
});
|
506
|
+
}
|
507
|
+
/**
|
508
|
+
* @param {string} sessionId - The session id for the window.
|
509
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
510
|
+
* @param {Airtop.AsyncPaginatedExtractionRequest} request
|
511
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
512
|
+
*
|
513
|
+
* @example
|
514
|
+
* await client.windows.asyncPaginatedExtraction("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
515
|
+
* prompt: "This site contains a list of results about <provide details about the list>. Navigate through 3 pages of results and return the title and <provide details about the data you want to extract> about each result in this list."
|
516
|
+
* })
|
517
|
+
*/
|
518
|
+
asyncPaginatedExtraction(sessionId, windowId, request, requestOptions) {
|
519
|
+
return __awaiter(this, void 0, void 0, function* () {
|
520
|
+
var _a, _b, _c;
|
521
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
522
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/paginated-extraction`),
|
523
|
+
method: "POST",
|
524
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
525
|
+
contentType: "application/json",
|
526
|
+
requestType: "json",
|
527
|
+
body: serializers.AsyncPaginatedExtractionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
528
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
529
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
530
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
531
|
+
});
|
532
|
+
if (_response.ok) {
|
533
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
534
|
+
unrecognizedObjectKeys: "passthrough",
|
535
|
+
allowUnrecognizedUnionMembers: true,
|
536
|
+
allowUnrecognizedEnumValues: true,
|
537
|
+
skipValidation: true,
|
538
|
+
breadcrumbsPrefix: ["response"],
|
539
|
+
});
|
540
|
+
}
|
541
|
+
if (_response.error.reason === "status-code") {
|
542
|
+
throw new errors.AirtopError({
|
543
|
+
statusCode: _response.error.statusCode,
|
544
|
+
body: _response.error.body,
|
545
|
+
});
|
546
|
+
}
|
547
|
+
switch (_response.error.reason) {
|
548
|
+
case "non-json":
|
549
|
+
throw new errors.AirtopError({
|
550
|
+
statusCode: _response.error.statusCode,
|
551
|
+
body: _response.error.rawBody,
|
552
|
+
});
|
553
|
+
case "timeout":
|
554
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/paginated-extraction.");
|
555
|
+
case "unknown":
|
556
|
+
throw new errors.AirtopError({
|
557
|
+
message: _response.error.errorMessage,
|
558
|
+
});
|
559
|
+
}
|
560
|
+
});
|
561
|
+
}
|
562
|
+
/**
|
563
|
+
* This endpoint is deprecated. Please use the `pageQuery` endpoint instead.
|
564
|
+
*
|
565
|
+
* @param {string} sessionId - The session id for the window.
|
566
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
567
|
+
* @param {Airtop.AsyncPromptContentRequest} request
|
568
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
569
|
+
*
|
570
|
+
* @example
|
571
|
+
* await client.windows.asyncPromptContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
572
|
+
* prompt: "What is the main idea of this page?"
|
573
|
+
* })
|
574
|
+
*/
|
575
|
+
asyncPromptContent(sessionId, windowId, request, requestOptions) {
|
576
|
+
return __awaiter(this, void 0, void 0, function* () {
|
577
|
+
var _a, _b, _c;
|
578
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
579
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/prompt-content`),
|
580
|
+
method: "POST",
|
581
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
582
|
+
contentType: "application/json",
|
583
|
+
requestType: "json",
|
584
|
+
body: serializers.AsyncPromptContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
585
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
586
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
587
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
588
|
+
});
|
589
|
+
if (_response.ok) {
|
590
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
591
|
+
unrecognizedObjectKeys: "passthrough",
|
592
|
+
allowUnrecognizedUnionMembers: true,
|
593
|
+
allowUnrecognizedEnumValues: true,
|
594
|
+
skipValidation: true,
|
595
|
+
breadcrumbsPrefix: ["response"],
|
596
|
+
});
|
597
|
+
}
|
598
|
+
if (_response.error.reason === "status-code") {
|
599
|
+
throw new errors.AirtopError({
|
600
|
+
statusCode: _response.error.statusCode,
|
601
|
+
body: _response.error.body,
|
602
|
+
});
|
603
|
+
}
|
604
|
+
switch (_response.error.reason) {
|
605
|
+
case "non-json":
|
606
|
+
throw new errors.AirtopError({
|
607
|
+
statusCode: _response.error.statusCode,
|
608
|
+
body: _response.error.rawBody,
|
609
|
+
});
|
610
|
+
case "timeout":
|
611
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/prompt-content.");
|
612
|
+
case "unknown":
|
613
|
+
throw new errors.AirtopError({
|
614
|
+
message: _response.error.errorMessage,
|
615
|
+
});
|
616
|
+
}
|
617
|
+
});
|
618
|
+
}
|
619
|
+
/**
|
620
|
+
* Take a screenshot of the current viewport of a browser window asynchronously
|
621
|
+
*
|
622
|
+
* @param {string} sessionId - The session id for the window.
|
623
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
624
|
+
* @param {Airtop.AsyncScreenshotRequest} request
|
625
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
626
|
+
*
|
627
|
+
* @example
|
628
|
+
* await client.windows.asyncScreenshot("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
629
|
+
*/
|
630
|
+
asyncScreenshot(sessionId_1, windowId_1) {
|
631
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
632
|
+
var _a, _b, _c;
|
633
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
634
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/screenshot`),
|
635
|
+
method: "POST",
|
636
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
637
|
+
contentType: "application/json",
|
638
|
+
requestType: "json",
|
639
|
+
body: serializers.AsyncScreenshotRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
640
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
641
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
642
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
643
|
+
});
|
644
|
+
if (_response.ok) {
|
645
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
646
|
+
unrecognizedObjectKeys: "passthrough",
|
647
|
+
allowUnrecognizedUnionMembers: true,
|
648
|
+
allowUnrecognizedEnumValues: true,
|
649
|
+
skipValidation: true,
|
650
|
+
breadcrumbsPrefix: ["response"],
|
651
|
+
});
|
652
|
+
}
|
653
|
+
if (_response.error.reason === "status-code") {
|
654
|
+
throw new errors.AirtopError({
|
655
|
+
statusCode: _response.error.statusCode,
|
656
|
+
body: _response.error.body,
|
657
|
+
});
|
658
|
+
}
|
659
|
+
switch (_response.error.reason) {
|
660
|
+
case "non-json":
|
661
|
+
throw new errors.AirtopError({
|
662
|
+
statusCode: _response.error.statusCode,
|
663
|
+
body: _response.error.rawBody,
|
664
|
+
});
|
665
|
+
case "timeout":
|
666
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/screenshot.");
|
667
|
+
case "unknown":
|
668
|
+
throw new errors.AirtopError({
|
669
|
+
message: _response.error.errorMessage,
|
670
|
+
});
|
671
|
+
}
|
672
|
+
});
|
673
|
+
}
|
674
|
+
/**
|
675
|
+
* This endpoint is deprecated. Please use the `pageQuery` endpoint and ask for a summary in the prompt instead.
|
676
|
+
*
|
677
|
+
* @param {string} sessionId - The session id for the window.
|
678
|
+
* @param {string} windowId - The Airtop window id of the browser window to summarize.
|
679
|
+
* @param {Airtop.AsyncSummarizeContentRequest} request
|
680
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
681
|
+
*
|
682
|
+
* @example
|
683
|
+
* await client.windows.asyncSummarizeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
684
|
+
*/
|
685
|
+
asyncSummarizeContent(sessionId_1, windowId_1) {
|
686
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
687
|
+
var _a, _b, _c;
|
688
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
689
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/summarize-content`),
|
690
|
+
method: "POST",
|
691
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
692
|
+
contentType: "application/json",
|
693
|
+
requestType: "json",
|
694
|
+
body: serializers.AsyncSummarizeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
695
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
696
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
697
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
698
|
+
});
|
699
|
+
if (_response.ok) {
|
700
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
701
|
+
unrecognizedObjectKeys: "passthrough",
|
702
|
+
allowUnrecognizedUnionMembers: true,
|
703
|
+
allowUnrecognizedEnumValues: true,
|
704
|
+
skipValidation: true,
|
705
|
+
breadcrumbsPrefix: ["response"],
|
706
|
+
});
|
707
|
+
}
|
708
|
+
if (_response.error.reason === "status-code") {
|
709
|
+
throw new errors.AirtopError({
|
710
|
+
statusCode: _response.error.statusCode,
|
711
|
+
body: _response.error.body,
|
712
|
+
});
|
713
|
+
}
|
714
|
+
switch (_response.error.reason) {
|
715
|
+
case "non-json":
|
716
|
+
throw new errors.AirtopError({
|
717
|
+
statusCode: _response.error.statusCode,
|
718
|
+
body: _response.error.rawBody,
|
719
|
+
});
|
720
|
+
case "timeout":
|
721
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/summarize-content.");
|
722
|
+
case "unknown":
|
723
|
+
throw new errors.AirtopError({
|
724
|
+
message: _response.error.errorMessage,
|
725
|
+
});
|
726
|
+
}
|
727
|
+
});
|
728
|
+
}
|
729
|
+
/**
|
730
|
+
* @param {string} sessionId - The session id for the window.
|
731
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
732
|
+
* @param {Airtop.AsyncTypeRequest} request
|
733
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
734
|
+
*
|
735
|
+
* @example
|
736
|
+
* await client.windows.asyncType("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
737
|
+
* text: "Example text"
|
738
|
+
* })
|
739
|
+
*/
|
740
|
+
asyncType(sessionId, windowId, request, requestOptions) {
|
741
|
+
return __awaiter(this, void 0, void 0, function* () {
|
742
|
+
var _a, _b, _c;
|
743
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
744
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `async/sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/type`),
|
745
|
+
method: "POST",
|
746
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
747
|
+
contentType: "application/json",
|
748
|
+
requestType: "json",
|
749
|
+
body: serializers.AsyncTypeRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
750
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
751
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
752
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
753
|
+
});
|
754
|
+
if (_response.ok) {
|
755
|
+
return serializers.AsyncSessionAiResponseEnvelope.parseOrThrow(_response.body, {
|
756
|
+
unrecognizedObjectKeys: "passthrough",
|
757
|
+
allowUnrecognizedUnionMembers: true,
|
758
|
+
allowUnrecognizedEnumValues: true,
|
759
|
+
skipValidation: true,
|
760
|
+
breadcrumbsPrefix: ["response"],
|
761
|
+
});
|
762
|
+
}
|
763
|
+
if (_response.error.reason === "status-code") {
|
764
|
+
throw new errors.AirtopError({
|
765
|
+
statusCode: _response.error.statusCode,
|
766
|
+
body: _response.error.body,
|
767
|
+
});
|
768
|
+
}
|
769
|
+
switch (_response.error.reason) {
|
770
|
+
case "non-json":
|
771
|
+
throw new errors.AirtopError({
|
772
|
+
statusCode: _response.error.statusCode,
|
773
|
+
body: _response.error.rawBody,
|
774
|
+
});
|
775
|
+
case "timeout":
|
776
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /async/sessions/{sessionId}/windows/{windowId}/type.");
|
777
|
+
case "unknown":
|
778
|
+
throw new errors.AirtopError({
|
779
|
+
message: _response.error.errorMessage,
|
780
|
+
});
|
781
|
+
}
|
782
|
+
});
|
783
|
+
}
|
51
784
|
/**
|
52
785
|
* Creates a new browser window in a session. Optionally, you can specify a url to load on the window upon creation.
|
53
786
|
*
|
@@ -58,21 +791,13 @@ class Windows {
|
|
58
791
|
* @example
|
59
792
|
* await client.windows.create("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b")
|
60
793
|
*/
|
61
|
-
create(
|
62
|
-
|
63
|
-
|
794
|
+
create(sessionId_1) {
|
795
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, request = {}, requestOptions) {
|
796
|
+
var _a, _b, _c;
|
64
797
|
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.
|
798
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows`),
|
66
799
|
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
|
-
},
|
800
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
76
801
|
contentType: "application/json",
|
77
802
|
requestType: "json",
|
78
803
|
body: serializers.CreateWindowInputV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -102,7 +827,7 @@ class Windows {
|
|
102
827
|
body: _response.error.rawBody,
|
103
828
|
});
|
104
829
|
case "timeout":
|
105
|
-
throw new errors.AirtopTimeoutError();
|
830
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows.");
|
106
831
|
case "unknown":
|
107
832
|
throw new errors.AirtopError({
|
108
833
|
message: _response.error.errorMessage,
|
@@ -123,9 +848,9 @@ class Windows {
|
|
123
848
|
* screenResolution: "1280x720"
|
124
849
|
* })
|
125
850
|
*/
|
126
|
-
getWindowInfo(
|
127
|
-
|
128
|
-
|
851
|
+
getWindowInfo(sessionId_1, windowId_1) {
|
852
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
853
|
+
var _a, _b, _c;
|
129
854
|
const { includeNavigationBar, disableResize, screenResolution } = request;
|
130
855
|
const _queryParams = {};
|
131
856
|
if (includeNavigationBar != null) {
|
@@ -138,17 +863,9 @@ class Windows {
|
|
138
863
|
_queryParams["screenResolution"] = screenResolution;
|
139
864
|
}
|
140
865
|
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.
|
866
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}`),
|
142
867
|
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
|
-
},
|
868
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
152
869
|
contentType: "application/json",
|
153
870
|
queryParameters: _queryParams,
|
154
871
|
requestType: "json",
|
@@ -178,7 +895,7 @@ class Windows {
|
|
178
895
|
body: _response.error.rawBody,
|
179
896
|
});
|
180
897
|
case "timeout":
|
181
|
-
throw new errors.AirtopTimeoutError();
|
898
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling GET /sessions/{sessionId}/windows/{windowId}.");
|
182
899
|
case "unknown":
|
183
900
|
throw new errors.AirtopError({
|
184
901
|
message: _response.error.errorMessage,
|
@@ -200,20 +917,12 @@ class Windows {
|
|
200
917
|
* })
|
201
918
|
*/
|
202
919
|
loadUrl(sessionId, windowId, request, requestOptions) {
|
203
|
-
var _a, _b;
|
204
920
|
return __awaiter(this, void 0, void 0, function* () {
|
921
|
+
var _a, _b, _c;
|
205
922
|
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.
|
923
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}`),
|
207
924
|
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
|
-
},
|
925
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
217
926
|
contentType: "application/json",
|
218
927
|
requestType: "json",
|
219
928
|
body: serializers.WindowLoadUrlV1Body.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -243,7 +952,7 @@ class Windows {
|
|
243
952
|
body: _response.error.rawBody,
|
244
953
|
});
|
245
954
|
case "timeout":
|
246
|
-
throw new errors.AirtopTimeoutError();
|
955
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}.");
|
247
956
|
case "unknown":
|
248
957
|
throw new errors.AirtopError({
|
249
958
|
message: _response.error.errorMessage,
|
@@ -262,20 +971,12 @@ class Windows {
|
|
262
971
|
* await client.windows.close("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "7334da2a-91b0-42c5-6156-76a5eba87430")
|
263
972
|
*/
|
264
973
|
close(sessionId, windowId, requestOptions) {
|
265
|
-
var _a, _b;
|
266
974
|
return __awaiter(this, void 0, void 0, function* () {
|
975
|
+
var _a, _b, _c;
|
267
976
|
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.
|
977
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}`),
|
269
978
|
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
|
-
},
|
979
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
279
980
|
contentType: "application/json",
|
280
981
|
requestType: "json",
|
281
982
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
@@ -304,7 +1005,7 @@ class Windows {
|
|
304
1005
|
body: _response.error.rawBody,
|
305
1006
|
});
|
306
1007
|
case "timeout":
|
307
|
-
throw new errors.AirtopTimeoutError();
|
1008
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling DELETE /sessions/{sessionId}/windows/{windowId}.");
|
308
1009
|
case "unknown":
|
309
1010
|
throw new errors.AirtopError({
|
310
1011
|
message: _response.error.errorMessage,
|
@@ -326,20 +1027,12 @@ class Windows {
|
|
326
1027
|
* })
|
327
1028
|
*/
|
328
1029
|
click(sessionId, windowId, request, requestOptions) {
|
329
|
-
var _a, _b;
|
330
1030
|
return __awaiter(this, void 0, void 0, function* () {
|
1031
|
+
var _a, _b, _c;
|
331
1032
|
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.
|
1033
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/click`),
|
333
1034
|
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
|
-
},
|
1035
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
343
1036
|
contentType: "application/json",
|
344
1037
|
requestType: "json",
|
345
1038
|
body: serializers.SessionClickHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -369,7 +1062,119 @@ class Windows {
|
|
369
1062
|
body: _response.error.rawBody,
|
370
1063
|
});
|
371
1064
|
case "timeout":
|
372
|
-
throw new errors.AirtopTimeoutError();
|
1065
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/click.");
|
1066
|
+
case "unknown":
|
1067
|
+
throw new errors.AirtopError({
|
1068
|
+
message: _response.error.errorMessage,
|
1069
|
+
});
|
1070
|
+
}
|
1071
|
+
});
|
1072
|
+
}
|
1073
|
+
/**
|
1074
|
+
* Create a form-filler automation synchronously for the form loaded in the browser window
|
1075
|
+
*
|
1076
|
+
* @param {string} sessionId - The session id for the window.
|
1077
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
1078
|
+
* @param {Airtop.CreateFormFillerRequest} request
|
1079
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
1080
|
+
*
|
1081
|
+
* @example
|
1082
|
+
* await client.windows.createFormFiller("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
1083
|
+
*/
|
1084
|
+
createFormFiller(sessionId_1, windowId_1) {
|
1085
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
1086
|
+
var _a, _b, _c;
|
1087
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1088
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/create-form-filler`),
|
1089
|
+
method: "POST",
|
1090
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1091
|
+
contentType: "application/json",
|
1092
|
+
requestType: "json",
|
1093
|
+
body: serializers.CreateFormFillerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
1094
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
1095
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
1096
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
1097
|
+
});
|
1098
|
+
if (_response.ok) {
|
1099
|
+
return serializers.AiPromptResponse.parseOrThrow(_response.body, {
|
1100
|
+
unrecognizedObjectKeys: "passthrough",
|
1101
|
+
allowUnrecognizedUnionMembers: true,
|
1102
|
+
allowUnrecognizedEnumValues: true,
|
1103
|
+
skipValidation: true,
|
1104
|
+
breadcrumbsPrefix: ["response"],
|
1105
|
+
});
|
1106
|
+
}
|
1107
|
+
if (_response.error.reason === "status-code") {
|
1108
|
+
throw new errors.AirtopError({
|
1109
|
+
statusCode: _response.error.statusCode,
|
1110
|
+
body: _response.error.body,
|
1111
|
+
});
|
1112
|
+
}
|
1113
|
+
switch (_response.error.reason) {
|
1114
|
+
case "non-json":
|
1115
|
+
throw new errors.AirtopError({
|
1116
|
+
statusCode: _response.error.statusCode,
|
1117
|
+
body: _response.error.rawBody,
|
1118
|
+
});
|
1119
|
+
case "timeout":
|
1120
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/create-form-filler.");
|
1121
|
+
case "unknown":
|
1122
|
+
throw new errors.AirtopError({
|
1123
|
+
message: _response.error.errorMessage,
|
1124
|
+
});
|
1125
|
+
}
|
1126
|
+
});
|
1127
|
+
}
|
1128
|
+
/**
|
1129
|
+
* Fill a form of a browser window synchronously using a form-filler automation
|
1130
|
+
*
|
1131
|
+
* @param {string} sessionId - The session id for the window.
|
1132
|
+
* @param {string} windowId - The Airtop window id of the browser window.
|
1133
|
+
* @param {Airtop.FillFormRequest} request
|
1134
|
+
* @param {Windows.RequestOptions} requestOptions - Request-specific configuration.
|
1135
|
+
*
|
1136
|
+
* @example
|
1137
|
+
* await client.windows.fillForm("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
1138
|
+
* automationId: "automationId"
|
1139
|
+
* })
|
1140
|
+
*/
|
1141
|
+
fillForm(sessionId, windowId, request, requestOptions) {
|
1142
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1143
|
+
var _a, _b, _c;
|
1144
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
1145
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/fill-form`),
|
1146
|
+
method: "POST",
|
1147
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
1148
|
+
contentType: "application/json",
|
1149
|
+
requestType: "json",
|
1150
|
+
body: serializers.FillFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
1151
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
1152
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
1153
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
1154
|
+
});
|
1155
|
+
if (_response.ok) {
|
1156
|
+
return serializers.AiPromptResponse.parseOrThrow(_response.body, {
|
1157
|
+
unrecognizedObjectKeys: "passthrough",
|
1158
|
+
allowUnrecognizedUnionMembers: true,
|
1159
|
+
allowUnrecognizedEnumValues: true,
|
1160
|
+
skipValidation: true,
|
1161
|
+
breadcrumbsPrefix: ["response"],
|
1162
|
+
});
|
1163
|
+
}
|
1164
|
+
if (_response.error.reason === "status-code") {
|
1165
|
+
throw new errors.AirtopError({
|
1166
|
+
statusCode: _response.error.statusCode,
|
1167
|
+
body: _response.error.body,
|
1168
|
+
});
|
1169
|
+
}
|
1170
|
+
switch (_response.error.reason) {
|
1171
|
+
case "non-json":
|
1172
|
+
throw new errors.AirtopError({
|
1173
|
+
statusCode: _response.error.statusCode,
|
1174
|
+
body: _response.error.rawBody,
|
1175
|
+
});
|
1176
|
+
case "timeout":
|
1177
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/fill-form.");
|
373
1178
|
case "unknown":
|
374
1179
|
throw new errors.AirtopError({
|
375
1180
|
message: _response.error.errorMessage,
|
@@ -391,20 +1196,12 @@ class Windows {
|
|
391
1196
|
* })
|
392
1197
|
*/
|
393
1198
|
hover(sessionId, windowId, request, requestOptions) {
|
394
|
-
var _a, _b;
|
395
1199
|
return __awaiter(this, void 0, void 0, function* () {
|
1200
|
+
var _a, _b, _c;
|
396
1201
|
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.
|
1202
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/hover`),
|
398
1203
|
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
|
-
},
|
1204
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
408
1205
|
contentType: "application/json",
|
409
1206
|
requestType: "json",
|
410
1207
|
body: serializers.SessionHoverHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -434,7 +1231,7 @@ class Windows {
|
|
434
1231
|
body: _response.error.rawBody,
|
435
1232
|
});
|
436
1233
|
case "timeout":
|
437
|
-
throw new errors.AirtopTimeoutError();
|
1234
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/hover.");
|
438
1235
|
case "unknown":
|
439
1236
|
throw new errors.AirtopError({
|
440
1237
|
message: _response.error.errorMessage,
|
@@ -454,20 +1251,12 @@ class Windows {
|
|
454
1251
|
* })
|
455
1252
|
*/
|
456
1253
|
monitor(sessionId, windowId, request, requestOptions) {
|
457
|
-
var _a, _b;
|
458
1254
|
return __awaiter(this, void 0, void 0, function* () {
|
1255
|
+
var _a, _b, _c;
|
459
1256
|
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.
|
1257
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/monitor`),
|
461
1258
|
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
|
-
},
|
1259
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
471
1260
|
contentType: "application/json",
|
472
1261
|
requestType: "json",
|
473
1262
|
body: serializers.SessionMonitorHandlerRequestBody.jsonOrThrow(request, {
|
@@ -499,7 +1288,7 @@ class Windows {
|
|
499
1288
|
body: _response.error.rawBody,
|
500
1289
|
});
|
501
1290
|
case "timeout":
|
502
|
-
throw new errors.AirtopTimeoutError();
|
1291
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/monitor.");
|
503
1292
|
case "unknown":
|
504
1293
|
throw new errors.AirtopError({
|
505
1294
|
message: _response.error.errorMessage,
|
@@ -521,20 +1310,12 @@ class Windows {
|
|
521
1310
|
* })
|
522
1311
|
*/
|
523
1312
|
pageQuery(sessionId, windowId, request, requestOptions) {
|
524
|
-
var _a, _b;
|
525
1313
|
return __awaiter(this, void 0, void 0, function* () {
|
1314
|
+
var _a, _b, _c;
|
526
1315
|
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.
|
1316
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/page-query`),
|
528
1317
|
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
|
-
},
|
1318
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
538
1319
|
contentType: "application/json",
|
539
1320
|
requestType: "json",
|
540
1321
|
body: serializers.SessionPageQueryHandlerRequestBody.jsonOrThrow(request, {
|
@@ -566,7 +1347,7 @@ class Windows {
|
|
566
1347
|
body: _response.error.rawBody,
|
567
1348
|
});
|
568
1349
|
case "timeout":
|
569
|
-
throw new errors.AirtopTimeoutError();
|
1350
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/page-query.");
|
570
1351
|
case "unknown":
|
571
1352
|
throw new errors.AirtopError({
|
572
1353
|
message: _response.error.errorMessage,
|
@@ -588,20 +1369,12 @@ class Windows {
|
|
588
1369
|
* })
|
589
1370
|
*/
|
590
1371
|
paginatedExtraction(sessionId, windowId, request, requestOptions) {
|
591
|
-
var _a, _b;
|
592
1372
|
return __awaiter(this, void 0, void 0, function* () {
|
1373
|
+
var _a, _b, _c;
|
593
1374
|
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.
|
1375
|
+
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
1376
|
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
|
-
},
|
1377
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
605
1378
|
contentType: "application/json",
|
606
1379
|
requestType: "json",
|
607
1380
|
body: serializers.SessionPaginatedExtractionHandlerRequestBody.jsonOrThrow(request, {
|
@@ -633,7 +1406,7 @@ class Windows {
|
|
633
1406
|
body: _response.error.rawBody,
|
634
1407
|
});
|
635
1408
|
case "timeout":
|
636
|
-
throw new errors.AirtopTimeoutError();
|
1409
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/paginated-extraction.");
|
637
1410
|
case "unknown":
|
638
1411
|
throw new errors.AirtopError({
|
639
1412
|
message: _response.error.errorMessage,
|
@@ -655,20 +1428,12 @@ class Windows {
|
|
655
1428
|
* })
|
656
1429
|
*/
|
657
1430
|
promptContent(sessionId, windowId, request, requestOptions) {
|
658
|
-
var _a, _b;
|
659
1431
|
return __awaiter(this, void 0, void 0, function* () {
|
1432
|
+
var _a, _b, _c;
|
660
1433
|
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.
|
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)}/prompt-content`),
|
662
1435
|
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
|
-
},
|
1436
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
672
1437
|
contentType: "application/json",
|
673
1438
|
requestType: "json",
|
674
1439
|
body: serializers.SessionPageQueryHandlerRequestBody.jsonOrThrow(request, {
|
@@ -700,7 +1465,7 @@ class Windows {
|
|
700
1465
|
body: _response.error.rawBody,
|
701
1466
|
});
|
702
1467
|
case "timeout":
|
703
|
-
throw new errors.AirtopTimeoutError();
|
1468
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/prompt-content.");
|
704
1469
|
case "unknown":
|
705
1470
|
throw new errors.AirtopError({
|
706
1471
|
message: _response.error.errorMessage,
|
@@ -719,21 +1484,13 @@ class Windows {
|
|
719
1484
|
* @example
|
720
1485
|
* await client.windows.scrapeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
721
1486
|
*/
|
722
|
-
scrapeContent(
|
723
|
-
|
724
|
-
|
1487
|
+
scrapeContent(sessionId_1, windowId_1) {
|
1488
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
1489
|
+
var _a, _b, _c;
|
725
1490
|
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.
|
1491
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/scrape-content`),
|
727
1492
|
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
|
-
},
|
1493
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
737
1494
|
contentType: "application/json",
|
738
1495
|
requestType: "json",
|
739
1496
|
body: serializers.ScrapeContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -763,7 +1520,7 @@ class Windows {
|
|
763
1520
|
body: _response.error.rawBody,
|
764
1521
|
});
|
765
1522
|
case "timeout":
|
766
|
-
throw new errors.AirtopTimeoutError();
|
1523
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/scrape-content.");
|
767
1524
|
case "unknown":
|
768
1525
|
throw new errors.AirtopError({
|
769
1526
|
message: _response.error.errorMessage,
|
@@ -782,21 +1539,13 @@ class Windows {
|
|
782
1539
|
* @example
|
783
1540
|
* await client.windows.screenshot("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
784
1541
|
*/
|
785
|
-
screenshot(
|
786
|
-
|
787
|
-
|
1542
|
+
screenshot(sessionId_1, windowId_1) {
|
1543
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
1544
|
+
var _a, _b, _c;
|
788
1545
|
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.
|
1546
|
+
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
1547
|
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
|
-
},
|
1548
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
800
1549
|
contentType: "application/json",
|
801
1550
|
requestType: "json",
|
802
1551
|
body: serializers.SessionScreenshotHandlerRequestBody.jsonOrThrow(request, {
|
@@ -828,7 +1577,7 @@ class Windows {
|
|
828
1577
|
body: _response.error.rawBody,
|
829
1578
|
});
|
830
1579
|
case "timeout":
|
831
|
-
throw new errors.AirtopTimeoutError();
|
1580
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/screenshot.");
|
832
1581
|
case "unknown":
|
833
1582
|
throw new errors.AirtopError({
|
834
1583
|
message: _response.error.errorMessage,
|
@@ -847,21 +1596,13 @@ class Windows {
|
|
847
1596
|
* @example
|
848
1597
|
* await client.windows.scroll("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
849
1598
|
*/
|
850
|
-
scroll(
|
851
|
-
|
852
|
-
|
1599
|
+
scroll(sessionId_1, windowId_1) {
|
1600
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
1601
|
+
var _a, _b, _c;
|
853
1602
|
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.
|
1603
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/scroll`),
|
855
1604
|
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
|
-
},
|
1605
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
865
1606
|
contentType: "application/json",
|
866
1607
|
requestType: "json",
|
867
1608
|
body: serializers.SessionScrollHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -891,7 +1632,7 @@ class Windows {
|
|
891
1632
|
body: _response.error.rawBody,
|
892
1633
|
});
|
893
1634
|
case "timeout":
|
894
|
-
throw new errors.AirtopTimeoutError();
|
1635
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/scroll.");
|
895
1636
|
case "unknown":
|
896
1637
|
throw new errors.AirtopError({
|
897
1638
|
message: _response.error.errorMessage,
|
@@ -910,21 +1651,13 @@ class Windows {
|
|
910
1651
|
* @example
|
911
1652
|
* await client.windows.summarizeContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
912
1653
|
*/
|
913
|
-
summarizeContent(
|
914
|
-
|
915
|
-
|
1654
|
+
summarizeContent(sessionId_1, windowId_1) {
|
1655
|
+
return __awaiter(this, arguments, void 0, function* (sessionId, windowId, request = {}, requestOptions) {
|
1656
|
+
var _a, _b, _c;
|
916
1657
|
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.
|
1658
|
+
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
1659
|
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
|
-
},
|
1660
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
928
1661
|
contentType: "application/json",
|
929
1662
|
requestType: "json",
|
930
1663
|
body: serializers.SessionSummaryHandlerRequestBody.jsonOrThrow(request, {
|
@@ -956,7 +1689,7 @@ class Windows {
|
|
956
1689
|
body: _response.error.rawBody,
|
957
1690
|
});
|
958
1691
|
case "timeout":
|
959
|
-
throw new errors.AirtopTimeoutError();
|
1692
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/summarize-content.");
|
960
1693
|
case "unknown":
|
961
1694
|
throw new errors.AirtopError({
|
962
1695
|
message: _response.error.errorMessage,
|
@@ -978,20 +1711,12 @@ class Windows {
|
|
978
1711
|
* })
|
979
1712
|
*/
|
980
1713
|
type(sessionId, windowId, request, requestOptions) {
|
981
|
-
var _a, _b;
|
982
1714
|
return __awaiter(this, void 0, void 0, function* () {
|
1715
|
+
var _a, _b, _c;
|
983
1716
|
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.
|
1717
|
+
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
1718
|
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
|
-
},
|
1719
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airtop/sdk", "X-Fern-SDK-Version": "0.1.36-beta0", "User-Agent": "@airtop/sdk/0.1.36-beta0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
995
1720
|
contentType: "application/json",
|
996
1721
|
requestType: "json",
|
997
1722
|
body: serializers.SessionTypeHandlerRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
@@ -1021,7 +1746,7 @@ class Windows {
|
|
1021
1746
|
body: _response.error.rawBody,
|
1022
1747
|
});
|
1023
1748
|
case "timeout":
|
1024
|
-
throw new errors.AirtopTimeoutError();
|
1749
|
+
throw new errors.AirtopTimeoutError("Timeout exceeded when calling POST /sessions/{sessionId}/windows/{windowId}/type.");
|
1025
1750
|
case "unknown":
|
1026
1751
|
throw new errors.AirtopError({
|
1027
1752
|
message: _response.error.errorMessage,
|