@airtop/sdk 0.0.4
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 +33 -0
- package/Client.js +22 -0
- package/README.md +135 -0
- package/api/errors/InternalServerError.d.ts +8 -0
- package/api/errors/InternalServerError.js +41 -0
- package/api/errors/NotFoundError.d.ts +8 -0
- package/api/errors/NotFoundError.js +41 -0
- package/api/errors/UnprocessableEntityError.d.ts +8 -0
- package/api/errors/UnprocessableEntityError.js +41 -0
- package/api/errors/index.d.ts +3 -0
- package/api/errors/index.js +19 -0
- package/api/index.d.ts +3 -0
- package/api/index.js +19 -0
- package/api/resources/index.d.ts +5 -0
- package/api/resources/index.js +34 -0
- package/api/resources/profiles/client/Client.d.ts +66 -0
- package/api/resources/profiles/client/Client.js +296 -0
- package/api/resources/profiles/client/index.d.ts +1 -0
- package/api/resources/profiles/client/index.js +17 -0
- package/api/resources/profiles/client/requests/ProfilesDeleteRequest.d.ts +19 -0
- package/api/resources/profiles/client/requests/ProfilesDeleteRequest.js +5 -0
- package/api/resources/profiles/client/requests/ProfilesGetRequest.d.ts +19 -0
- package/api/resources/profiles/client/requests/ProfilesGetRequest.js +5 -0
- package/api/resources/profiles/client/requests/index.d.ts +2 -0
- package/api/resources/profiles/client/requests/index.js +2 -0
- package/api/resources/profiles/index.d.ts +1 -0
- package/api/resources/profiles/index.js +17 -0
- package/api/resources/sessions/client/Client.d.ts +132 -0
- package/api/resources/sessions/client/Client.js +788 -0
- package/api/resources/sessions/client/index.d.ts +1 -0
- package/api/resources/sessions/client/index.js +17 -0
- package/api/resources/sessions/client/requests/CreateLiveViewUrlRequest.d.ts +20 -0
- package/api/resources/sessions/client/requests/CreateLiveViewUrlRequest.js +5 -0
- package/api/resources/sessions/client/requests/SessionPromptContentRequest.d.ts +15 -0
- package/api/resources/sessions/client/requests/SessionPromptContentRequest.js +5 -0
- package/api/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.d.ts +15 -0
- package/api/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.js +5 -0
- package/api/resources/sessions/client/requests/SessionRestInputV1.d.ts +14 -0
- package/api/resources/sessions/client/requests/SessionRestInputV1.js +5 -0
- package/api/resources/sessions/client/requests/SessionsListRequest.d.ts +13 -0
- package/api/resources/sessions/client/requests/SessionsListRequest.js +5 -0
- package/api/resources/sessions/client/requests/index.d.ts +5 -0
- package/api/resources/sessions/client/requests/index.js +2 -0
- package/api/resources/sessions/index.d.ts +2 -0
- package/api/resources/sessions/index.js +18 -0
- package/api/resources/sessions/types/SessionsEventsResponse.d.ts +16 -0
- package/api/resources/sessions/types/SessionsEventsResponse.js +5 -0
- package/api/resources/sessions/types/SessionsEventsResponseError.d.ts +11 -0
- package/api/resources/sessions/types/SessionsEventsResponseError.js +5 -0
- package/api/resources/sessions/types/SessionsEventsResponseStatus.d.ts +11 -0
- package/api/resources/sessions/types/SessionsEventsResponseStatus.js +5 -0
- package/api/resources/sessions/types/index.d.ts +3 -0
- package/api/resources/sessions/types/index.js +19 -0
- package/api/types/CleanScrapeResponse.d.ts +12 -0
- package/api/types/CleanScrapeResponse.js +5 -0
- package/api/types/CleanScrapeResponseData.d.ts +10 -0
- package/api/types/CleanScrapeResponseData.js +5 -0
- package/api/types/CleanScrapeResponseDataStatus.d.ts +12 -0
- package/api/types/CleanScrapeResponseDataStatus.js +11 -0
- package/api/types/CleanScrapeResponseOutput.d.ts +12 -0
- package/api/types/CleanScrapeResponseOutput.js +5 -0
- package/api/types/ConnectionInfo.d.ts +14 -0
- package/api/types/ConnectionInfo.js +5 -0
- package/api/types/ErrorDetail.d.ts +10 -0
- package/api/types/ErrorDetail.js +5 -0
- package/api/types/ErrorMessage.d.ts +11 -0
- package/api/types/ErrorMessage.js +5 -0
- package/api/types/ErrorModel.d.ts +20 -0
- package/api/types/ErrorModel.js +5 -0
- package/api/types/LiveViewConnectionInfo.d.ts +9 -0
- package/api/types/LiveViewConnectionInfo.js +5 -0
- package/api/types/LiveViewUrlOutputV1Body.d.ts +9 -0
- package/api/types/LiveViewUrlOutputV1Body.js +5 -0
- package/api/types/ProfileOutputV1Body.d.ts +10 -0
- package/api/types/ProfileOutputV1Body.js +5 -0
- package/api/types/ProfileV1.d.ts +13 -0
- package/api/types/ProfileV1.js +5 -0
- package/api/types/ProfilesOutputV1Body.d.ts +9 -0
- package/api/types/ProfilesOutputV1Body.js +5 -0
- package/api/types/ScrapeResponseContent.d.ts +9 -0
- package/api/types/ScrapeResponseContent.js +5 -0
- package/api/types/Session.d.ts +20 -0
- package/api/types/Session.js +5 -0
- package/api/types/SessionAiResponse.d.ts +16 -0
- package/api/types/SessionAiResponse.js +5 -0
- package/api/types/SessionAiResponseData.d.ts +10 -0
- package/api/types/SessionAiResponseData.js +5 -0
- package/api/types/SessionAiResponseDataStatus.d.ts +12 -0
- package/api/types/SessionAiResponseDataStatus.js +11 -0
- package/api/types/SessionAiResponseIssue.d.ts +11 -0
- package/api/types/SessionAiResponseIssue.js +5 -0
- package/api/types/SessionAiResponseMetadata.d.ts +8 -0
- package/api/types/SessionAiResponseMetadata.js +5 -0
- package/api/types/SessionAiResponseMetadataUsage.d.ts +9 -0
- package/api/types/SessionAiResponseMetadataUsage.js +5 -0
- package/api/types/SessionConfig.d.ts +17 -0
- package/api/types/SessionConfig.js +5 -0
- package/api/types/SessionConfigV1.d.ts +17 -0
- package/api/types/SessionConfigV1.js +5 -0
- package/api/types/SessionOutputV1Body.d.ts +12 -0
- package/api/types/SessionOutputV1Body.js +5 -0
- package/api/types/SessionWithConnectionInfo.d.ts +10 -0
- package/api/types/SessionWithConnectionInfo.js +5 -0
- package/api/types/SessionsOutputV1Body.d.ts +10 -0
- package/api/types/SessionsOutputV1Body.js +5 -0
- package/api/types/StatusMessage.d.ts +14 -0
- package/api/types/StatusMessage.js +5 -0
- package/api/types/StatusMessageStatus.d.ts +13 -0
- package/api/types/StatusMessageStatus.js +12 -0
- package/api/types/index.d.ts +28 -0
- package/api/types/index.js +44 -0
- package/core/fetcher/APIResponse.d.ts +10 -0
- package/core/fetcher/APIResponse.js +2 -0
- package/core/fetcher/Fetcher.d.ts +39 -0
- package/core/fetcher/Fetcher.js +99 -0
- package/core/fetcher/Supplier.d.ts +4 -0
- package/core/fetcher/Supplier.js +22 -0
- package/core/fetcher/createRequestUrl.d.ts +1 -0
- package/core/fetcher/createRequestUrl.js +13 -0
- package/core/fetcher/getFetchFn.d.ts +4 -0
- package/core/fetcher/getFetchFn.js +59 -0
- package/core/fetcher/getHeader.d.ts +1 -0
- package/core/fetcher/getHeader.js +12 -0
- package/core/fetcher/getRequestBody.d.ts +7 -0
- package/core/fetcher/getRequestBody.js +23 -0
- package/core/fetcher/getResponseBody.d.ts +1 -0
- package/core/fetcher/getResponseBody.js +52 -0
- package/core/fetcher/index.d.ts +5 -0
- package/core/fetcher/index.js +9 -0
- package/core/fetcher/makeRequest.d.ts +1 -0
- package/core/fetcher/makeRequest.js +42 -0
- package/core/fetcher/requestWithRetries.d.ts +1 -0
- package/core/fetcher/requestWithRetries.js +32 -0
- package/core/fetcher/signals.d.ts +12 -0
- package/core/fetcher/signals.js +37 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +31 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +245 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +227 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +50 -0
- package/core/index.d.ts +4 -0
- package/core/index.js +33 -0
- package/core/runtime/index.d.ts +1 -0
- package/core/runtime/index.js +5 -0
- package/core/runtime/runtime.d.ts +9 -0
- package/core/runtime/runtime.js +93 -0
- package/core/schemas/Schema.d.ts +84 -0
- package/core/schemas/Schema.js +21 -0
- package/core/schemas/builders/date/date.d.ts +2 -0
- package/core/schemas/builders/date/date.js +63 -0
- package/core/schemas/builders/date/index.d.ts +1 -0
- package/core/schemas/builders/date/index.js +5 -0
- package/core/schemas/builders/enum/enum.d.ts +2 -0
- package/core/schemas/builders/enum/enum.js +39 -0
- package/core/schemas/builders/enum/index.d.ts +1 -0
- package/core/schemas/builders/enum/index.js +5 -0
- package/core/schemas/builders/index.d.ts +13 -0
- package/core/schemas/builders/index.js +29 -0
- package/core/schemas/builders/lazy/index.d.ts +3 -0
- package/core/schemas/builders/lazy/index.js +7 -0
- package/core/schemas/builders/lazy/lazy.d.ts +5 -0
- package/core/schemas/builders/lazy/lazy.js +25 -0
- package/core/schemas/builders/lazy/lazyObject.d.ts +3 -0
- package/core/schemas/builders/lazy/lazyObject.js +12 -0
- package/core/schemas/builders/list/index.d.ts +1 -0
- package/core/schemas/builders/list/index.js +5 -0
- package/core/schemas/builders/list/list.d.ts +2 -0
- package/core/schemas/builders/list/list.js +55 -0
- package/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
- package/core/schemas/builders/literals/booleanLiteral.js +29 -0
- package/core/schemas/builders/literals/index.d.ts +2 -0
- package/core/schemas/builders/literals/index.js +7 -0
- package/core/schemas/builders/literals/stringLiteral.d.ts +2 -0
- package/core/schemas/builders/literals/stringLiteral.js +29 -0
- package/core/schemas/builders/object/index.d.ts +6 -0
- package/core/schemas/builders/object/index.js +11 -0
- package/core/schemas/builders/object/object.d.ts +3 -0
- package/core/schemas/builders/object/object.js +233 -0
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +8 -0
- package/core/schemas/builders/object/property.d.ts +8 -0
- package/core/schemas/builders/object/property.js +16 -0
- package/core/schemas/builders/object/types.d.ts +26 -0
- package/core/schemas/builders/object/types.js +2 -0
- package/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +9 -0
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +54 -0
- package/core/schemas/builders/object-like/index.d.ts +2 -0
- package/core/schemas/builders/object-like/index.js +6 -0
- package/core/schemas/builders/object-like/types.d.ts +7 -0
- package/core/schemas/builders/object-like/types.js +2 -0
- package/core/schemas/builders/primitives/any.d.ts +1 -0
- package/core/schemas/builders/primitives/any.js +6 -0
- package/core/schemas/builders/primitives/boolean.d.ts +1 -0
- package/core/schemas/builders/primitives/boolean.js +25 -0
- package/core/schemas/builders/primitives/index.d.ts +5 -0
- package/core/schemas/builders/primitives/index.js +13 -0
- package/core/schemas/builders/primitives/number.d.ts +1 -0
- package/core/schemas/builders/primitives/number.js +25 -0
- package/core/schemas/builders/primitives/string.d.ts +1 -0
- package/core/schemas/builders/primitives/string.js +25 -0
- package/core/schemas/builders/primitives/unknown.d.ts +1 -0
- package/core/schemas/builders/primitives/unknown.js +6 -0
- package/core/schemas/builders/record/index.d.ts +2 -0
- package/core/schemas/builders/record/index.js +5 -0
- package/core/schemas/builders/record/record.d.ts +3 -0
- package/core/schemas/builders/record/record.js +95 -0
- package/core/schemas/builders/record/types.d.ts +4 -0
- package/core/schemas/builders/record/types.js +2 -0
- package/core/schemas/builders/schema-utils/JsonError.d.ts +5 -0
- package/core/schemas/builders/schema-utils/JsonError.js +12 -0
- package/core/schemas/builders/schema-utils/ParseError.d.ts +5 -0
- package/core/schemas/builders/schema-utils/ParseError.js +12 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +17 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +82 -0
- package/core/schemas/builders/schema-utils/index.d.ts +4 -0
- package/core/schemas/builders/schema-utils/index.js +11 -0
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -0
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +10 -0
- package/core/schemas/builders/set/index.d.ts +1 -0
- package/core/schemas/builders/set/index.js +5 -0
- package/core/schemas/builders/set/set.d.ts +2 -0
- package/core/schemas/builders/set/set.js +44 -0
- package/core/schemas/builders/undiscriminated-union/index.d.ts +2 -0
- package/core/schemas/builders/undiscriminated-union/index.js +5 -0
- package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -0
- package/core/schemas/builders/undiscriminated-union/types.js +2 -0
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +3 -0
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +40 -0
- package/core/schemas/builders/union/discriminant.d.ts +5 -0
- package/core/schemas/builders/union/discriminant.js +10 -0
- package/core/schemas/builders/union/index.d.ts +4 -0
- package/core/schemas/builders/union/index.js +7 -0
- package/core/schemas/builders/union/types.d.ts +13 -0
- package/core/schemas/builders/union/types.js +2 -0
- package/core/schemas/builders/union/union.d.ts +4 -0
- package/core/schemas/builders/union/union.js +130 -0
- package/core/schemas/index.d.ts +2 -0
- package/core/schemas/index.js +17 -0
- package/core/schemas/utils/MaybePromise.d.ts +1 -0
- package/core/schemas/utils/MaybePromise.js +2 -0
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +7 -0
- package/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -0
- package/core/schemas/utils/createIdentitySchemaCreator.d.ts +2 -0
- package/core/schemas/utils/createIdentitySchemaCreator.js +16 -0
- package/core/schemas/utils/entries.d.ts +1 -0
- package/core/schemas/utils/entries.js +7 -0
- package/core/schemas/utils/filterObject.d.ts +1 -0
- package/core/schemas/utils/filterObject.js +14 -0
- package/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -0
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +24 -0
- package/core/schemas/utils/isPlainObject.d.ts +1 -0
- package/core/schemas/utils/isPlainObject.js +18 -0
- package/core/schemas/utils/keys.d.ts +1 -0
- package/core/schemas/utils/keys.js +7 -0
- package/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
- package/core/schemas/utils/maybeSkipValidation.js +28 -0
- package/core/schemas/utils/partition.d.ts +1 -0
- package/core/schemas/utils/partition.js +16 -0
- package/core/streaming-fetcher/Stream.d.ts +48 -0
- package/core/streaming-fetcher/Stream.js +170 -0
- package/core/streaming-fetcher/index.d.ts +1 -0
- package/core/streaming-fetcher/index.js +5 -0
- package/dist/Client.d.ts +33 -0
- package/dist/Client.js +22 -0
- package/dist/api/errors/InternalServerError.d.ts +8 -0
- package/dist/api/errors/InternalServerError.js +41 -0
- package/dist/api/errors/NotFoundError.d.ts +8 -0
- package/dist/api/errors/NotFoundError.js +41 -0
- package/dist/api/errors/UnprocessableEntityError.d.ts +8 -0
- package/dist/api/errors/UnprocessableEntityError.js +41 -0
- package/dist/api/errors/index.d.ts +3 -0
- package/dist/api/errors/index.js +19 -0
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.js +19 -0
- package/dist/api/resources/index.d.ts +5 -0
- package/dist/api/resources/index.js +34 -0
- package/dist/api/resources/profiles/client/Client.d.ts +66 -0
- package/dist/api/resources/profiles/client/Client.js +296 -0
- package/dist/api/resources/profiles/client/index.d.ts +1 -0
- package/dist/api/resources/profiles/client/index.js +17 -0
- package/dist/api/resources/profiles/client/requests/ProfilesDeleteRequest.d.ts +19 -0
- package/dist/api/resources/profiles/client/requests/ProfilesDeleteRequest.js +5 -0
- package/dist/api/resources/profiles/client/requests/ProfilesGetRequest.d.ts +19 -0
- package/dist/api/resources/profiles/client/requests/ProfilesGetRequest.js +5 -0
- package/dist/api/resources/profiles/client/requests/index.d.ts +2 -0
- package/dist/api/resources/profiles/client/requests/index.js +2 -0
- package/dist/api/resources/profiles/index.d.ts +1 -0
- package/dist/api/resources/profiles/index.js +17 -0
- package/dist/api/resources/sessions/client/Client.d.ts +132 -0
- package/dist/api/resources/sessions/client/Client.js +788 -0
- package/dist/api/resources/sessions/client/index.d.ts +1 -0
- package/dist/api/resources/sessions/client/index.js +17 -0
- package/dist/api/resources/sessions/client/requests/CreateLiveViewUrlRequest.d.ts +20 -0
- package/dist/api/resources/sessions/client/requests/CreateLiveViewUrlRequest.js +5 -0
- package/dist/api/resources/sessions/client/requests/SessionPromptContentRequest.d.ts +15 -0
- package/dist/api/resources/sessions/client/requests/SessionPromptContentRequest.js +5 -0
- package/dist/api/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.d.ts +15 -0
- package/dist/api/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.js +5 -0
- package/dist/api/resources/sessions/client/requests/SessionRestInputV1.d.ts +14 -0
- package/dist/api/resources/sessions/client/requests/SessionRestInputV1.js +5 -0
- package/dist/api/resources/sessions/client/requests/SessionsListRequest.d.ts +13 -0
- package/dist/api/resources/sessions/client/requests/SessionsListRequest.js +5 -0
- package/dist/api/resources/sessions/client/requests/index.d.ts +5 -0
- package/dist/api/resources/sessions/client/requests/index.js +2 -0
- package/dist/api/resources/sessions/index.d.ts +2 -0
- package/dist/api/resources/sessions/index.js +18 -0
- package/dist/api/resources/sessions/types/SessionsEventsResponse.d.ts +16 -0
- package/dist/api/resources/sessions/types/SessionsEventsResponse.js +5 -0
- package/dist/api/resources/sessions/types/SessionsEventsResponseError.d.ts +11 -0
- package/dist/api/resources/sessions/types/SessionsEventsResponseError.js +5 -0
- package/dist/api/resources/sessions/types/SessionsEventsResponseStatus.d.ts +11 -0
- package/dist/api/resources/sessions/types/SessionsEventsResponseStatus.js +5 -0
- package/dist/api/resources/sessions/types/index.d.ts +3 -0
- package/dist/api/resources/sessions/types/index.js +19 -0
- package/dist/api/types/CleanScrapeResponse.d.ts +12 -0
- package/dist/api/types/CleanScrapeResponse.js +5 -0
- package/dist/api/types/CleanScrapeResponseData.d.ts +10 -0
- package/dist/api/types/CleanScrapeResponseData.js +5 -0
- package/dist/api/types/CleanScrapeResponseDataStatus.d.ts +12 -0
- package/dist/api/types/CleanScrapeResponseDataStatus.js +11 -0
- package/dist/api/types/CleanScrapeResponseOutput.d.ts +12 -0
- package/dist/api/types/CleanScrapeResponseOutput.js +5 -0
- package/dist/api/types/ConnectionInfo.d.ts +14 -0
- package/dist/api/types/ConnectionInfo.js +5 -0
- package/dist/api/types/ErrorDetail.d.ts +10 -0
- package/dist/api/types/ErrorDetail.js +5 -0
- package/dist/api/types/ErrorMessage.d.ts +11 -0
- package/dist/api/types/ErrorMessage.js +5 -0
- package/dist/api/types/ErrorModel.d.ts +20 -0
- package/dist/api/types/ErrorModel.js +5 -0
- package/dist/api/types/LiveViewConnectionInfo.d.ts +9 -0
- package/dist/api/types/LiveViewConnectionInfo.js +5 -0
- package/dist/api/types/LiveViewUrlOutputV1Body.d.ts +9 -0
- package/dist/api/types/LiveViewUrlOutputV1Body.js +5 -0
- package/dist/api/types/ProfileOutputV1Body.d.ts +10 -0
- package/dist/api/types/ProfileOutputV1Body.js +5 -0
- package/dist/api/types/ProfileV1.d.ts +13 -0
- package/dist/api/types/ProfileV1.js +5 -0
- package/dist/api/types/ProfilesOutputV1Body.d.ts +9 -0
- package/dist/api/types/ProfilesOutputV1Body.js +5 -0
- package/dist/api/types/ScrapeResponseContent.d.ts +9 -0
- package/dist/api/types/ScrapeResponseContent.js +5 -0
- package/dist/api/types/Session.d.ts +20 -0
- package/dist/api/types/Session.js +5 -0
- package/dist/api/types/SessionAiResponse.d.ts +16 -0
- package/dist/api/types/SessionAiResponse.js +5 -0
- package/dist/api/types/SessionAiResponseData.d.ts +10 -0
- package/dist/api/types/SessionAiResponseData.js +5 -0
- package/dist/api/types/SessionAiResponseDataStatus.d.ts +12 -0
- package/dist/api/types/SessionAiResponseDataStatus.js +11 -0
- package/dist/api/types/SessionAiResponseIssue.d.ts +11 -0
- package/dist/api/types/SessionAiResponseIssue.js +5 -0
- package/dist/api/types/SessionAiResponseMetadata.d.ts +8 -0
- package/dist/api/types/SessionAiResponseMetadata.js +5 -0
- package/dist/api/types/SessionAiResponseMetadataUsage.d.ts +9 -0
- package/dist/api/types/SessionAiResponseMetadataUsage.js +5 -0
- package/dist/api/types/SessionConfig.d.ts +17 -0
- package/dist/api/types/SessionConfig.js +5 -0
- package/dist/api/types/SessionConfigV1.d.ts +17 -0
- package/dist/api/types/SessionConfigV1.js +5 -0
- package/dist/api/types/SessionOutputV1Body.d.ts +12 -0
- package/dist/api/types/SessionOutputV1Body.js +5 -0
- package/dist/api/types/SessionWithConnectionInfo.d.ts +10 -0
- package/dist/api/types/SessionWithConnectionInfo.js +5 -0
- package/dist/api/types/SessionsOutputV1Body.d.ts +10 -0
- package/dist/api/types/SessionsOutputV1Body.js +5 -0
- package/dist/api/types/StatusMessage.d.ts +14 -0
- package/dist/api/types/StatusMessage.js +5 -0
- package/dist/api/types/StatusMessageStatus.d.ts +13 -0
- package/dist/api/types/StatusMessageStatus.js +12 -0
- package/dist/api/types/index.d.ts +28 -0
- package/dist/api/types/index.js +44 -0
- package/dist/core/fetcher/APIResponse.d.ts +10 -0
- package/dist/core/fetcher/APIResponse.js +2 -0
- package/dist/core/fetcher/Fetcher.d.ts +39 -0
- package/dist/core/fetcher/Fetcher.js +99 -0
- package/dist/core/fetcher/Supplier.d.ts +4 -0
- package/dist/core/fetcher/Supplier.js +22 -0
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +13 -0
- package/dist/core/fetcher/getFetchFn.d.ts +4 -0
- package/dist/core/fetcher/getFetchFn.js +59 -0
- package/dist/core/fetcher/getHeader.d.ts +1 -0
- package/dist/core/fetcher/getHeader.js +12 -0
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +23 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +52 -0
- package/dist/core/fetcher/index.d.ts +5 -0
- package/dist/core/fetcher/index.js +9 -0
- package/dist/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/core/fetcher/makeRequest.js +42 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/core/fetcher/requestWithRetries.js +32 -0
- package/dist/core/fetcher/signals.d.ts +12 -0
- package/dist/core/fetcher/signals.js +37 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +31 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +245 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +227 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +50 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.js +33 -0
- package/dist/core/runtime/index.d.ts +1 -0
- package/dist/core/runtime/index.js +5 -0
- package/dist/core/runtime/runtime.d.ts +9 -0
- package/dist/core/runtime/runtime.js +93 -0
- package/dist/core/schemas/Schema.d.ts +84 -0
- package/dist/core/schemas/Schema.js +21 -0
- package/dist/core/schemas/builders/date/date.d.ts +2 -0
- package/dist/core/schemas/builders/date/date.js +63 -0
- package/dist/core/schemas/builders/date/index.d.ts +1 -0
- package/dist/core/schemas/builders/date/index.js +5 -0
- package/dist/core/schemas/builders/enum/enum.d.ts +2 -0
- package/dist/core/schemas/builders/enum/enum.js +39 -0
- package/dist/core/schemas/builders/enum/index.d.ts +1 -0
- package/dist/core/schemas/builders/enum/index.js +5 -0
- package/dist/core/schemas/builders/index.d.ts +13 -0
- package/dist/core/schemas/builders/index.js +29 -0
- package/dist/core/schemas/builders/lazy/index.d.ts +3 -0
- package/dist/core/schemas/builders/lazy/index.js +7 -0
- package/dist/core/schemas/builders/lazy/lazy.d.ts +5 -0
- package/dist/core/schemas/builders/lazy/lazy.js +25 -0
- package/dist/core/schemas/builders/lazy/lazyObject.d.ts +3 -0
- package/dist/core/schemas/builders/lazy/lazyObject.js +12 -0
- package/dist/core/schemas/builders/list/index.d.ts +1 -0
- package/dist/core/schemas/builders/list/index.js +5 -0
- package/dist/core/schemas/builders/list/list.d.ts +2 -0
- package/dist/core/schemas/builders/list/list.js +55 -0
- package/dist/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
- package/dist/core/schemas/builders/literals/booleanLiteral.js +29 -0
- package/dist/core/schemas/builders/literals/index.d.ts +2 -0
- package/dist/core/schemas/builders/literals/index.js +7 -0
- package/dist/core/schemas/builders/literals/stringLiteral.d.ts +2 -0
- package/dist/core/schemas/builders/literals/stringLiteral.js +29 -0
- package/dist/core/schemas/builders/object/index.d.ts +6 -0
- package/dist/core/schemas/builders/object/index.js +11 -0
- package/dist/core/schemas/builders/object/object.d.ts +3 -0
- package/dist/core/schemas/builders/object/object.js +233 -0
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +8 -0
- package/dist/core/schemas/builders/object/property.d.ts +8 -0
- package/dist/core/schemas/builders/object/property.js +16 -0
- package/dist/core/schemas/builders/object/types.d.ts +26 -0
- package/dist/core/schemas/builders/object/types.js +2 -0
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +9 -0
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +54 -0
- package/dist/core/schemas/builders/object-like/index.d.ts +2 -0
- package/dist/core/schemas/builders/object-like/index.js +6 -0
- package/dist/core/schemas/builders/object-like/types.d.ts +7 -0
- package/dist/core/schemas/builders/object-like/types.js +2 -0
- package/dist/core/schemas/builders/primitives/any.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/any.js +6 -0
- package/dist/core/schemas/builders/primitives/boolean.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/boolean.js +25 -0
- package/dist/core/schemas/builders/primitives/index.d.ts +5 -0
- package/dist/core/schemas/builders/primitives/index.js +13 -0
- package/dist/core/schemas/builders/primitives/number.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/number.js +25 -0
- package/dist/core/schemas/builders/primitives/string.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/string.js +25 -0
- package/dist/core/schemas/builders/primitives/unknown.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/unknown.js +6 -0
- package/dist/core/schemas/builders/record/index.d.ts +2 -0
- package/dist/core/schemas/builders/record/index.js +5 -0
- package/dist/core/schemas/builders/record/record.d.ts +3 -0
- package/dist/core/schemas/builders/record/record.js +95 -0
- package/dist/core/schemas/builders/record/types.d.ts +4 -0
- package/dist/core/schemas/builders/record/types.js +2 -0
- package/dist/core/schemas/builders/schema-utils/JsonError.d.ts +5 -0
- package/dist/core/schemas/builders/schema-utils/JsonError.js +12 -0
- package/dist/core/schemas/builders/schema-utils/ParseError.d.ts +5 -0
- package/dist/core/schemas/builders/schema-utils/ParseError.js +12 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +17 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +82 -0
- package/dist/core/schemas/builders/schema-utils/index.d.ts +4 -0
- package/dist/core/schemas/builders/schema-utils/index.js +11 -0
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -0
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +10 -0
- package/dist/core/schemas/builders/set/index.d.ts +1 -0
- package/dist/core/schemas/builders/set/index.js +5 -0
- package/dist/core/schemas/builders/set/set.d.ts +2 -0
- package/dist/core/schemas/builders/set/set.js +44 -0
- package/dist/core/schemas/builders/undiscriminated-union/index.d.ts +2 -0
- package/dist/core/schemas/builders/undiscriminated-union/index.js +5 -0
- package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -0
- package/dist/core/schemas/builders/undiscriminated-union/types.js +2 -0
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +3 -0
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +40 -0
- package/dist/core/schemas/builders/union/discriminant.d.ts +5 -0
- package/dist/core/schemas/builders/union/discriminant.js +10 -0
- package/dist/core/schemas/builders/union/index.d.ts +4 -0
- package/dist/core/schemas/builders/union/index.js +7 -0
- package/dist/core/schemas/builders/union/types.d.ts +13 -0
- package/dist/core/schemas/builders/union/types.js +2 -0
- package/dist/core/schemas/builders/union/union.d.ts +4 -0
- package/dist/core/schemas/builders/union/union.js +130 -0
- package/dist/core/schemas/index.d.ts +2 -0
- package/dist/core/schemas/index.js +17 -0
- package/dist/core/schemas/utils/MaybePromise.d.ts +1 -0
- package/dist/core/schemas/utils/MaybePromise.js +2 -0
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +7 -0
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -0
- package/dist/core/schemas/utils/createIdentitySchemaCreator.d.ts +2 -0
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +16 -0
- package/dist/core/schemas/utils/entries.d.ts +1 -0
- package/dist/core/schemas/utils/entries.js +7 -0
- package/dist/core/schemas/utils/filterObject.d.ts +1 -0
- package/dist/core/schemas/utils/filterObject.js +14 -0
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -0
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +24 -0
- package/dist/core/schemas/utils/isPlainObject.d.ts +1 -0
- package/dist/core/schemas/utils/isPlainObject.js +18 -0
- package/dist/core/schemas/utils/keys.d.ts +1 -0
- package/dist/core/schemas/utils/keys.js +7 -0
- package/dist/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
- package/dist/core/schemas/utils/maybeSkipValidation.js +28 -0
- package/dist/core/schemas/utils/partition.d.ts +1 -0
- package/dist/core/schemas/utils/partition.js +16 -0
- package/dist/core/streaming-fetcher/Stream.d.ts +48 -0
- package/dist/core/streaming-fetcher/Stream.js +170 -0
- package/dist/core/streaming-fetcher/index.d.ts +1 -0
- package/dist/core/streaming-fetcher/index.js +5 -0
- package/dist/environments.d.ts +7 -0
- package/dist/environments.js +9 -0
- package/dist/errors/AirtopError.d.ts +12 -0
- package/dist/errors/AirtopError.js +32 -0
- package/dist/errors/AirtopTimeoutError.d.ts +6 -0
- package/dist/errors/AirtopTimeoutError.js +13 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.js +7 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +34 -0
- package/dist/serialization/index.d.ts +2 -0
- package/dist/serialization/index.js +18 -0
- package/dist/serialization/resources/index.d.ts +3 -0
- package/dist/serialization/resources/index.js +32 -0
- package/dist/serialization/resources/sessions/client/index.d.ts +1 -0
- package/dist/serialization/resources/sessions/client/index.js +17 -0
- package/dist/serialization/resources/sessions/client/requests/SessionPromptContentRequest.d.ts +13 -0
- package/dist/serialization/resources/sessions/client/requests/SessionPromptContentRequest.js +34 -0
- package/dist/serialization/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.d.ts +13 -0
- package/dist/serialization/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.js +34 -0
- package/dist/serialization/resources/sessions/client/requests/SessionRestInputV1.d.ts +14 -0
- package/dist/serialization/resources/sessions/client/requests/SessionRestInputV1.js +35 -0
- package/dist/serialization/resources/sessions/client/requests/index.d.ts +3 -0
- package/dist/serialization/resources/sessions/client/requests/index.js +9 -0
- package/dist/serialization/resources/sessions/index.d.ts +2 -0
- package/dist/serialization/resources/sessions/index.js +18 -0
- package/dist/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +18 -0
- package/dist/serialization/resources/sessions/types/SessionsEventsResponse.js +41 -0
- package/dist/serialization/resources/sessions/types/SessionsEventsResponseError.d.ts +15 -0
- package/dist/serialization/resources/sessions/types/SessionsEventsResponseError.js +36 -0
- package/dist/serialization/resources/sessions/types/SessionsEventsResponseStatus.d.ts +15 -0
- package/dist/serialization/resources/sessions/types/SessionsEventsResponseStatus.js +36 -0
- package/dist/serialization/resources/sessions/types/index.d.ts +3 -0
- package/dist/serialization/resources/sessions/types/index.js +19 -0
- package/dist/serialization/types/CleanScrapeResponse.d.ts +16 -0
- package/dist/serialization/types/CleanScrapeResponse.js +37 -0
- package/dist/serialization/types/CleanScrapeResponseData.d.ts +15 -0
- package/dist/serialization/types/CleanScrapeResponseData.js +36 -0
- package/dist/serialization/types/CleanScrapeResponseDataStatus.d.ts +10 -0
- package/dist/serialization/types/CleanScrapeResponseDataStatus.js +31 -0
- package/dist/serialization/types/CleanScrapeResponseOutput.d.ts +15 -0
- package/dist/serialization/types/CleanScrapeResponseOutput.js +36 -0
- package/dist/serialization/types/ConnectionInfo.d.ts +16 -0
- package/dist/serialization/types/ConnectionInfo.js +37 -0
- package/dist/serialization/types/ErrorDetail.d.ts +14 -0
- package/dist/serialization/types/ErrorDetail.js +35 -0
- package/dist/serialization/types/ErrorMessage.d.ts +14 -0
- package/dist/serialization/types/ErrorMessage.js +35 -0
- package/dist/serialization/types/ErrorModel.d.ts +19 -0
- package/dist/serialization/types/ErrorModel.js +40 -0
- package/dist/serialization/types/LiveViewConnectionInfo.d.ts +13 -0
- package/dist/serialization/types/LiveViewConnectionInfo.js +34 -0
- package/dist/serialization/types/LiveViewUrlOutputV1Body.d.ts +13 -0
- package/dist/serialization/types/LiveViewUrlOutputV1Body.js +34 -0
- package/dist/serialization/types/ProfileOutputV1Body.d.ts +14 -0
- package/dist/serialization/types/ProfileOutputV1Body.js +35 -0
- package/dist/serialization/types/ProfileV1.d.ts +15 -0
- package/dist/serialization/types/ProfileV1.js +36 -0
- package/dist/serialization/types/ProfilesOutputV1Body.d.ts +14 -0
- package/dist/serialization/types/ProfilesOutputV1Body.js +35 -0
- package/dist/serialization/types/ScrapeResponseContent.d.ts +13 -0
- package/dist/serialization/types/ScrapeResponseContent.js +34 -0
- package/dist/serialization/types/Session.d.ts +19 -0
- package/dist/serialization/types/Session.js +40 -0
- package/dist/serialization/types/SessionAiResponse.d.ts +19 -0
- package/dist/serialization/types/SessionAiResponse.js +40 -0
- package/dist/serialization/types/SessionAiResponseData.d.ts +14 -0
- package/dist/serialization/types/SessionAiResponseData.js +35 -0
- package/dist/serialization/types/SessionAiResponseDataStatus.d.ts +10 -0
- package/dist/serialization/types/SessionAiResponseDataStatus.js +31 -0
- package/dist/serialization/types/SessionAiResponseIssue.d.ts +14 -0
- package/dist/serialization/types/SessionAiResponseIssue.js +35 -0
- package/dist/serialization/types/SessionAiResponseMetadata.d.ts +13 -0
- package/dist/serialization/types/SessionAiResponseMetadata.js +34 -0
- package/dist/serialization/types/SessionAiResponseMetadataUsage.d.ts +13 -0
- package/dist/serialization/types/SessionAiResponseMetadataUsage.js +34 -0
- package/dist/serialization/types/SessionConfig.d.ts +17 -0
- package/dist/serialization/types/SessionConfig.js +38 -0
- package/dist/serialization/types/SessionConfigV1.d.ts +17 -0
- package/dist/serialization/types/SessionConfigV1.js +38 -0
- package/dist/serialization/types/SessionOutputV1Body.d.ts +16 -0
- package/dist/serialization/types/SessionOutputV1Body.js +37 -0
- package/dist/serialization/types/SessionWithConnectionInfo.d.ts +15 -0
- package/dist/serialization/types/SessionWithConnectionInfo.js +36 -0
- package/dist/serialization/types/SessionsOutputV1Body.d.ts +14 -0
- package/dist/serialization/types/SessionsOutputV1Body.js +35 -0
- package/dist/serialization/types/StatusMessage.d.ts +16 -0
- package/dist/serialization/types/StatusMessage.js +37 -0
- package/dist/serialization/types/StatusMessageStatus.d.ts +10 -0
- package/dist/serialization/types/StatusMessageStatus.js +31 -0
- package/dist/serialization/types/index.d.ts +28 -0
- package/dist/serialization/types/index.js +44 -0
- package/environments.d.ts +7 -0
- package/environments.js +9 -0
- package/errors/AirtopError.d.ts +12 -0
- package/errors/AirtopError.js +32 -0
- package/errors/AirtopTimeoutError.d.ts +6 -0
- package/errors/AirtopTimeoutError.js +13 -0
- package/errors/index.d.ts +2 -0
- package/errors/index.js +7 -0
- package/index.d.ts +4 -0
- package/index.js +34 -0
- package/jest.config.js +5 -0
- package/package.json +39 -0
- package/reference.md +812 -0
- package/serialization/index.d.ts +2 -0
- package/serialization/index.js +18 -0
- package/serialization/resources/index.d.ts +3 -0
- package/serialization/resources/index.js +32 -0
- package/serialization/resources/sessions/client/index.d.ts +1 -0
- package/serialization/resources/sessions/client/index.js +17 -0
- package/serialization/resources/sessions/client/requests/SessionPromptContentRequest.d.ts +13 -0
- package/serialization/resources/sessions/client/requests/SessionPromptContentRequest.js +34 -0
- package/serialization/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.d.ts +13 -0
- package/serialization/resources/sessions/client/requests/SessionPromptPaginatedExtractionRequest.js +34 -0
- package/serialization/resources/sessions/client/requests/SessionRestInputV1.d.ts +14 -0
- package/serialization/resources/sessions/client/requests/SessionRestInputV1.js +35 -0
- package/serialization/resources/sessions/client/requests/index.d.ts +3 -0
- package/serialization/resources/sessions/client/requests/index.js +9 -0
- package/serialization/resources/sessions/index.d.ts +2 -0
- package/serialization/resources/sessions/index.js +18 -0
- package/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +18 -0
- package/serialization/resources/sessions/types/SessionsEventsResponse.js +41 -0
- package/serialization/resources/sessions/types/SessionsEventsResponseError.d.ts +15 -0
- package/serialization/resources/sessions/types/SessionsEventsResponseError.js +36 -0
- package/serialization/resources/sessions/types/SessionsEventsResponseStatus.d.ts +15 -0
- package/serialization/resources/sessions/types/SessionsEventsResponseStatus.js +36 -0
- package/serialization/resources/sessions/types/index.d.ts +3 -0
- package/serialization/resources/sessions/types/index.js +19 -0
- package/serialization/types/CleanScrapeResponse.d.ts +16 -0
- package/serialization/types/CleanScrapeResponse.js +37 -0
- package/serialization/types/CleanScrapeResponseData.d.ts +15 -0
- package/serialization/types/CleanScrapeResponseData.js +36 -0
- package/serialization/types/CleanScrapeResponseDataStatus.d.ts +10 -0
- package/serialization/types/CleanScrapeResponseDataStatus.js +31 -0
- package/serialization/types/CleanScrapeResponseOutput.d.ts +15 -0
- package/serialization/types/CleanScrapeResponseOutput.js +36 -0
- package/serialization/types/ConnectionInfo.d.ts +16 -0
- package/serialization/types/ConnectionInfo.js +37 -0
- package/serialization/types/ErrorDetail.d.ts +14 -0
- package/serialization/types/ErrorDetail.js +35 -0
- package/serialization/types/ErrorMessage.d.ts +14 -0
- package/serialization/types/ErrorMessage.js +35 -0
- package/serialization/types/ErrorModel.d.ts +19 -0
- package/serialization/types/ErrorModel.js +40 -0
- package/serialization/types/LiveViewConnectionInfo.d.ts +13 -0
- package/serialization/types/LiveViewConnectionInfo.js +34 -0
- package/serialization/types/LiveViewUrlOutputV1Body.d.ts +13 -0
- package/serialization/types/LiveViewUrlOutputV1Body.js +34 -0
- package/serialization/types/ProfileOutputV1Body.d.ts +14 -0
- package/serialization/types/ProfileOutputV1Body.js +35 -0
- package/serialization/types/ProfileV1.d.ts +15 -0
- package/serialization/types/ProfileV1.js +36 -0
- package/serialization/types/ProfilesOutputV1Body.d.ts +14 -0
- package/serialization/types/ProfilesOutputV1Body.js +35 -0
- package/serialization/types/ScrapeResponseContent.d.ts +13 -0
- package/serialization/types/ScrapeResponseContent.js +34 -0
- package/serialization/types/Session.d.ts +19 -0
- package/serialization/types/Session.js +40 -0
- package/serialization/types/SessionAiResponse.d.ts +19 -0
- package/serialization/types/SessionAiResponse.js +40 -0
- package/serialization/types/SessionAiResponseData.d.ts +14 -0
- package/serialization/types/SessionAiResponseData.js +35 -0
- package/serialization/types/SessionAiResponseDataStatus.d.ts +10 -0
- package/serialization/types/SessionAiResponseDataStatus.js +31 -0
- package/serialization/types/SessionAiResponseIssue.d.ts +14 -0
- package/serialization/types/SessionAiResponseIssue.js +35 -0
- package/serialization/types/SessionAiResponseMetadata.d.ts +13 -0
- package/serialization/types/SessionAiResponseMetadata.js +34 -0
- package/serialization/types/SessionAiResponseMetadataUsage.d.ts +13 -0
- package/serialization/types/SessionAiResponseMetadataUsage.js +34 -0
- package/serialization/types/SessionConfig.d.ts +17 -0
- package/serialization/types/SessionConfig.js +38 -0
- package/serialization/types/SessionConfigV1.d.ts +17 -0
- package/serialization/types/SessionConfigV1.js +38 -0
- package/serialization/types/SessionOutputV1Body.d.ts +16 -0
- package/serialization/types/SessionOutputV1Body.js +37 -0
- package/serialization/types/SessionWithConnectionInfo.d.ts +15 -0
- package/serialization/types/SessionWithConnectionInfo.js +36 -0
- package/serialization/types/SessionsOutputV1Body.d.ts +14 -0
- package/serialization/types/SessionsOutputV1Body.js +35 -0
- package/serialization/types/StatusMessage.d.ts +16 -0
- package/serialization/types/StatusMessage.js +37 -0
- package/serialization/types/StatusMessageStatus.d.ts +10 -0
- package/serialization/types/StatusMessageStatus.js +31 -0
- package/serialization/types/index.d.ts +28 -0
- package/serialization/types/index.js +44 -0
@@ -0,0 +1,788 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
10
|
+
}
|
11
|
+
Object.defineProperty(o, k2, desc);
|
12
|
+
}) : (function(o, m, k, k2) {
|
13
|
+
if (k2 === undefined) k2 = k;
|
14
|
+
o[k2] = m[k];
|
15
|
+
}));
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
18
|
+
}) : function(o, v) {
|
19
|
+
o["default"] = v;
|
20
|
+
});
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
22
|
+
if (mod && mod.__esModule) return mod;
|
23
|
+
var result = {};
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
25
|
+
__setModuleDefault(result, mod);
|
26
|
+
return result;
|
27
|
+
};
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
35
|
+
});
|
36
|
+
};
|
37
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
38
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
39
|
+
};
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
41
|
+
exports.Sessions = void 0;
|
42
|
+
const environments = __importStar(require("../../../../environments"));
|
43
|
+
const core = __importStar(require("../../../../core"));
|
44
|
+
const Airtop = __importStar(require("../../../index"));
|
45
|
+
const url_join_1 = __importDefault(require("url-join"));
|
46
|
+
const serializers = __importStar(require("../../../../serialization/index"));
|
47
|
+
const errors = __importStar(require("../../../../errors/index"));
|
48
|
+
class Sessions {
|
49
|
+
constructor(_options = {}) {
|
50
|
+
this._options = _options;
|
51
|
+
}
|
52
|
+
/**
|
53
|
+
* Get a list of sessions by ID
|
54
|
+
*
|
55
|
+
* @param {Airtop.SessionsListRequest} request
|
56
|
+
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
57
|
+
*
|
58
|
+
* @throws {@link Airtop.NotFoundError}
|
59
|
+
* @throws {@link Airtop.UnprocessableEntityError}
|
60
|
+
* @throws {@link Airtop.InternalServerError}
|
61
|
+
*
|
62
|
+
* @example
|
63
|
+
* await client.sessions.list()
|
64
|
+
*/
|
65
|
+
list(request = {}, requestOptions) {
|
66
|
+
var _a, _b;
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
68
|
+
const { sessionIds } = request;
|
69
|
+
const _queryParams = {};
|
70
|
+
if (sessionIds != null) {
|
71
|
+
if (Array.isArray(sessionIds)) {
|
72
|
+
_queryParams["sessionIds"] = sessionIds.map((item) => item);
|
73
|
+
}
|
74
|
+
else {
|
75
|
+
_queryParams["sessionIds"] = sessionIds;
|
76
|
+
}
|
77
|
+
}
|
78
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
79
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, "sessions"),
|
80
|
+
method: "GET",
|
81
|
+
headers: {
|
82
|
+
"x-airtop-token": (yield core.Supplier.get(this._options.airtopToken)) != null
|
83
|
+
? yield core.Supplier.get(this._options.airtopToken)
|
84
|
+
: undefined,
|
85
|
+
"X-Fern-Language": "JavaScript",
|
86
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
87
|
+
"X-Fern-SDK-Version": "0.0.4",
|
88
|
+
"User-Agent": "@airtop/sdk/0.0.4",
|
89
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
90
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
91
|
+
},
|
92
|
+
contentType: "application/json",
|
93
|
+
queryParameters: _queryParams,
|
94
|
+
requestType: "json",
|
95
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
96
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
97
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
98
|
+
});
|
99
|
+
if (_response.ok) {
|
100
|
+
return serializers.SessionsOutputV1Body.parseOrThrow(_response.body, {
|
101
|
+
unrecognizedObjectKeys: "passthrough",
|
102
|
+
allowUnrecognizedUnionMembers: true,
|
103
|
+
allowUnrecognizedEnumValues: true,
|
104
|
+
skipValidation: true,
|
105
|
+
breadcrumbsPrefix: ["response"],
|
106
|
+
});
|
107
|
+
}
|
108
|
+
if (_response.error.reason === "status-code") {
|
109
|
+
switch (_response.error.statusCode) {
|
110
|
+
case 404:
|
111
|
+
throw new Airtop.NotFoundError(serializers.ErrorModel.parseOrThrow(_response.error.body, {
|
112
|
+
unrecognizedObjectKeys: "passthrough",
|
113
|
+
allowUnrecognizedUnionMembers: true,
|
114
|
+
allowUnrecognizedEnumValues: true,
|
115
|
+
skipValidation: true,
|
116
|
+
breadcrumbsPrefix: ["response"],
|
117
|
+
}));
|
118
|
+
case 422:
|
119
|
+
throw new Airtop.UnprocessableEntityError(serializers.ErrorModel.parseOrThrow(_response.error.body, {
|
120
|
+
unrecognizedObjectKeys: "passthrough",
|
121
|
+
allowUnrecognizedUnionMembers: true,
|
122
|
+
allowUnrecognizedEnumValues: true,
|
123
|
+
skipValidation: true,
|
124
|
+
breadcrumbsPrefix: ["response"],
|
125
|
+
}));
|
126
|
+
case 500:
|
127
|
+
throw new Airtop.InternalServerError(serializers.ErrorModel.parseOrThrow(_response.error.body, {
|
128
|
+
unrecognizedObjectKeys: "passthrough",
|
129
|
+
allowUnrecognizedUnionMembers: true,
|
130
|
+
allowUnrecognizedEnumValues: true,
|
131
|
+
skipValidation: true,
|
132
|
+
breadcrumbsPrefix: ["response"],
|
133
|
+
}));
|
134
|
+
default:
|
135
|
+
throw new errors.AirtopError({
|
136
|
+
statusCode: _response.error.statusCode,
|
137
|
+
body: _response.error.body,
|
138
|
+
});
|
139
|
+
}
|
140
|
+
}
|
141
|
+
switch (_response.error.reason) {
|
142
|
+
case "non-json":
|
143
|
+
throw new errors.AirtopError({
|
144
|
+
statusCode: _response.error.statusCode,
|
145
|
+
body: _response.error.rawBody,
|
146
|
+
});
|
147
|
+
case "timeout":
|
148
|
+
throw new errors.AirtopTimeoutError();
|
149
|
+
case "unknown":
|
150
|
+
throw new errors.AirtopError({
|
151
|
+
message: _response.error.errorMessage,
|
152
|
+
});
|
153
|
+
}
|
154
|
+
});
|
155
|
+
}
|
156
|
+
/**
|
157
|
+
* @param {Airtop.SessionRestInputV1} request
|
158
|
+
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
159
|
+
*
|
160
|
+
* @example
|
161
|
+
* await client.sessions.post()
|
162
|
+
*/
|
163
|
+
post(request = {}, requestOptions) {
|
164
|
+
var _a, _b;
|
165
|
+
return __awaiter(this, void 0, void 0, function* () {
|
166
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
167
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, "sessions"),
|
168
|
+
method: "POST",
|
169
|
+
headers: {
|
170
|
+
"x-airtop-token": (yield core.Supplier.get(this._options.airtopToken)) != null
|
171
|
+
? yield core.Supplier.get(this._options.airtopToken)
|
172
|
+
: undefined,
|
173
|
+
"X-Fern-Language": "JavaScript",
|
174
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
175
|
+
"X-Fern-SDK-Version": "0.0.4",
|
176
|
+
"User-Agent": "@airtop/sdk/0.0.4",
|
177
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
178
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
179
|
+
},
|
180
|
+
contentType: "application/json",
|
181
|
+
requestType: "json",
|
182
|
+
body: serializers.SessionRestInputV1.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
183
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
184
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
185
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
186
|
+
});
|
187
|
+
if (_response.ok) {
|
188
|
+
return serializers.SessionOutputV1Body.parseOrThrow(_response.body, {
|
189
|
+
unrecognizedObjectKeys: "passthrough",
|
190
|
+
allowUnrecognizedUnionMembers: true,
|
191
|
+
allowUnrecognizedEnumValues: true,
|
192
|
+
skipValidation: true,
|
193
|
+
breadcrumbsPrefix: ["response"],
|
194
|
+
});
|
195
|
+
}
|
196
|
+
if (_response.error.reason === "status-code") {
|
197
|
+
throw new errors.AirtopError({
|
198
|
+
statusCode: _response.error.statusCode,
|
199
|
+
body: _response.error.body,
|
200
|
+
});
|
201
|
+
}
|
202
|
+
switch (_response.error.reason) {
|
203
|
+
case "non-json":
|
204
|
+
throw new errors.AirtopError({
|
205
|
+
statusCode: _response.error.statusCode,
|
206
|
+
body: _response.error.rawBody,
|
207
|
+
});
|
208
|
+
case "timeout":
|
209
|
+
throw new errors.AirtopTimeoutError();
|
210
|
+
case "unknown":
|
211
|
+
throw new errors.AirtopError({
|
212
|
+
message: _response.error.errorMessage,
|
213
|
+
});
|
214
|
+
}
|
215
|
+
});
|
216
|
+
}
|
217
|
+
/**
|
218
|
+
* Get a session by ID
|
219
|
+
*
|
220
|
+
* @param {string} id - UUID of the session to get
|
221
|
+
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
222
|
+
*
|
223
|
+
* @throws {@link Airtop.NotFoundError}
|
224
|
+
* @throws {@link Airtop.UnprocessableEntityError}
|
225
|
+
* @throws {@link Airtop.InternalServerError}
|
226
|
+
*
|
227
|
+
* @example
|
228
|
+
* await client.sessions.get("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b")
|
229
|
+
*/
|
230
|
+
get(id, requestOptions) {
|
231
|
+
var _a, _b;
|
232
|
+
return __awaiter(this, void 0, void 0, function* () {
|
233
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
234
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(id)}`),
|
235
|
+
method: "GET",
|
236
|
+
headers: {
|
237
|
+
"x-airtop-token": (yield core.Supplier.get(this._options.airtopToken)) != null
|
238
|
+
? yield core.Supplier.get(this._options.airtopToken)
|
239
|
+
: undefined,
|
240
|
+
"X-Fern-Language": "JavaScript",
|
241
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
242
|
+
"X-Fern-SDK-Version": "0.0.4",
|
243
|
+
"User-Agent": "@airtop/sdk/0.0.4",
|
244
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
245
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
246
|
+
},
|
247
|
+
contentType: "application/json",
|
248
|
+
requestType: "json",
|
249
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
250
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
251
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
252
|
+
});
|
253
|
+
if (_response.ok) {
|
254
|
+
return serializers.SessionOutputV1Body.parseOrThrow(_response.body, {
|
255
|
+
unrecognizedObjectKeys: "passthrough",
|
256
|
+
allowUnrecognizedUnionMembers: true,
|
257
|
+
allowUnrecognizedEnumValues: true,
|
258
|
+
skipValidation: true,
|
259
|
+
breadcrumbsPrefix: ["response"],
|
260
|
+
});
|
261
|
+
}
|
262
|
+
if (_response.error.reason === "status-code") {
|
263
|
+
switch (_response.error.statusCode) {
|
264
|
+
case 404:
|
265
|
+
throw new Airtop.NotFoundError(serializers.ErrorModel.parseOrThrow(_response.error.body, {
|
266
|
+
unrecognizedObjectKeys: "passthrough",
|
267
|
+
allowUnrecognizedUnionMembers: true,
|
268
|
+
allowUnrecognizedEnumValues: true,
|
269
|
+
skipValidation: true,
|
270
|
+
breadcrumbsPrefix: ["response"],
|
271
|
+
}));
|
272
|
+
case 422:
|
273
|
+
throw new Airtop.UnprocessableEntityError(serializers.ErrorModel.parseOrThrow(_response.error.body, {
|
274
|
+
unrecognizedObjectKeys: "passthrough",
|
275
|
+
allowUnrecognizedUnionMembers: true,
|
276
|
+
allowUnrecognizedEnumValues: true,
|
277
|
+
skipValidation: true,
|
278
|
+
breadcrumbsPrefix: ["response"],
|
279
|
+
}));
|
280
|
+
case 500:
|
281
|
+
throw new Airtop.InternalServerError(serializers.ErrorModel.parseOrThrow(_response.error.body, {
|
282
|
+
unrecognizedObjectKeys: "passthrough",
|
283
|
+
allowUnrecognizedUnionMembers: true,
|
284
|
+
allowUnrecognizedEnumValues: true,
|
285
|
+
skipValidation: true,
|
286
|
+
breadcrumbsPrefix: ["response"],
|
287
|
+
}));
|
288
|
+
default:
|
289
|
+
throw new errors.AirtopError({
|
290
|
+
statusCode: _response.error.statusCode,
|
291
|
+
body: _response.error.body,
|
292
|
+
});
|
293
|
+
}
|
294
|
+
}
|
295
|
+
switch (_response.error.reason) {
|
296
|
+
case "non-json":
|
297
|
+
throw new errors.AirtopError({
|
298
|
+
statusCode: _response.error.statusCode,
|
299
|
+
body: _response.error.rawBody,
|
300
|
+
});
|
301
|
+
case "timeout":
|
302
|
+
throw new errors.AirtopTimeoutError();
|
303
|
+
case "unknown":
|
304
|
+
throw new errors.AirtopError({
|
305
|
+
message: _response.error.errorMessage,
|
306
|
+
});
|
307
|
+
}
|
308
|
+
});
|
309
|
+
}
|
310
|
+
/**
|
311
|
+
* Ends a session by ID
|
312
|
+
*
|
313
|
+
* @param {string} id - UUID of the session to delete
|
314
|
+
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
315
|
+
*
|
316
|
+
* @example
|
317
|
+
* await client.sessions.delete("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b")
|
318
|
+
*/
|
319
|
+
delete(id, requestOptions) {
|
320
|
+
var _a, _b;
|
321
|
+
return __awaiter(this, void 0, void 0, function* () {
|
322
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
323
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(id)}`),
|
324
|
+
method: "DELETE",
|
325
|
+
headers: {
|
326
|
+
"x-airtop-token": (yield core.Supplier.get(this._options.airtopToken)) != null
|
327
|
+
? yield core.Supplier.get(this._options.airtopToken)
|
328
|
+
: undefined,
|
329
|
+
"X-Fern-Language": "JavaScript",
|
330
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
331
|
+
"X-Fern-SDK-Version": "0.0.4",
|
332
|
+
"User-Agent": "@airtop/sdk/0.0.4",
|
333
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
334
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
335
|
+
},
|
336
|
+
contentType: "application/json",
|
337
|
+
requestType: "json",
|
338
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
339
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
340
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
341
|
+
});
|
342
|
+
if (_response.ok) {
|
343
|
+
return;
|
344
|
+
}
|
345
|
+
if (_response.error.reason === "status-code") {
|
346
|
+
throw new errors.AirtopError({
|
347
|
+
statusCode: _response.error.statusCode,
|
348
|
+
body: _response.error.body,
|
349
|
+
});
|
350
|
+
}
|
351
|
+
switch (_response.error.reason) {
|
352
|
+
case "non-json":
|
353
|
+
throw new errors.AirtopError({
|
354
|
+
statusCode: _response.error.statusCode,
|
355
|
+
body: _response.error.rawBody,
|
356
|
+
});
|
357
|
+
case "timeout":
|
358
|
+
throw new errors.AirtopTimeoutError();
|
359
|
+
case "unknown":
|
360
|
+
throw new errors.AirtopError({
|
361
|
+
message: _response.error.errorMessage,
|
362
|
+
});
|
363
|
+
}
|
364
|
+
});
|
365
|
+
}
|
366
|
+
/**
|
367
|
+
* Get a session event stream for a given session ID
|
368
|
+
*/
|
369
|
+
events(id, requestOptions) {
|
370
|
+
var _a, _b;
|
371
|
+
return __awaiter(this, void 0, void 0, function* () {
|
372
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
373
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(id)}/events`),
|
374
|
+
method: "GET",
|
375
|
+
headers: {
|
376
|
+
"x-airtop-token": (yield core.Supplier.get(this._options.airtopToken)) != null
|
377
|
+
? yield core.Supplier.get(this._options.airtopToken)
|
378
|
+
: undefined,
|
379
|
+
"X-Fern-Language": "JavaScript",
|
380
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
381
|
+
"X-Fern-SDK-Version": "0.0.4",
|
382
|
+
"User-Agent": "@airtop/sdk/0.0.4",
|
383
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
384
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
385
|
+
},
|
386
|
+
contentType: "application/json",
|
387
|
+
requestType: "json",
|
388
|
+
responseType: "sse",
|
389
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
390
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
391
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
392
|
+
});
|
393
|
+
if (_response.ok) {
|
394
|
+
return new core.Stream({
|
395
|
+
stream: _response.body,
|
396
|
+
parse: (data) => __awaiter(this, void 0, void 0, function* () {
|
397
|
+
return serializers.SessionsEventsResponse.parseOrThrow(data, {
|
398
|
+
unrecognizedObjectKeys: "passthrough",
|
399
|
+
allowUnrecognizedUnionMembers: true,
|
400
|
+
allowUnrecognizedEnumValues: true,
|
401
|
+
skipValidation: true,
|
402
|
+
breadcrumbsPrefix: ["response"],
|
403
|
+
});
|
404
|
+
}),
|
405
|
+
signal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
406
|
+
eventShape: {
|
407
|
+
type: "sse",
|
408
|
+
streamTerminator: "[DONE]",
|
409
|
+
},
|
410
|
+
});
|
411
|
+
}
|
412
|
+
if (_response.error.reason === "status-code") {
|
413
|
+
switch (_response.error.statusCode) {
|
414
|
+
case 404:
|
415
|
+
throw new Airtop.NotFoundError(serializers.ErrorModel.parseOrThrow(_response.error.body, {
|
416
|
+
unrecognizedObjectKeys: "passthrough",
|
417
|
+
allowUnrecognizedUnionMembers: true,
|
418
|
+
allowUnrecognizedEnumValues: true,
|
419
|
+
skipValidation: true,
|
420
|
+
breadcrumbsPrefix: ["response"],
|
421
|
+
}));
|
422
|
+
case 422:
|
423
|
+
throw new Airtop.UnprocessableEntityError(serializers.ErrorModel.parseOrThrow(_response.error.body, {
|
424
|
+
unrecognizedObjectKeys: "passthrough",
|
425
|
+
allowUnrecognizedUnionMembers: true,
|
426
|
+
allowUnrecognizedEnumValues: true,
|
427
|
+
skipValidation: true,
|
428
|
+
breadcrumbsPrefix: ["response"],
|
429
|
+
}));
|
430
|
+
case 500:
|
431
|
+
throw new Airtop.InternalServerError(serializers.ErrorModel.parseOrThrow(_response.error.body, {
|
432
|
+
unrecognizedObjectKeys: "passthrough",
|
433
|
+
allowUnrecognizedUnionMembers: true,
|
434
|
+
allowUnrecognizedEnumValues: true,
|
435
|
+
skipValidation: true,
|
436
|
+
breadcrumbsPrefix: ["response"],
|
437
|
+
}));
|
438
|
+
default:
|
439
|
+
throw new errors.AirtopError({
|
440
|
+
statusCode: _response.error.statusCode,
|
441
|
+
body: _response.error.body,
|
442
|
+
});
|
443
|
+
}
|
444
|
+
}
|
445
|
+
switch (_response.error.reason) {
|
446
|
+
case "non-json":
|
447
|
+
throw new errors.AirtopError({
|
448
|
+
statusCode: _response.error.statusCode,
|
449
|
+
body: _response.error.rawBody,
|
450
|
+
});
|
451
|
+
case "timeout":
|
452
|
+
throw new errors.AirtopTimeoutError();
|
453
|
+
case "unknown":
|
454
|
+
throw new errors.AirtopError({
|
455
|
+
message: _response.error.errorMessage,
|
456
|
+
});
|
457
|
+
}
|
458
|
+
});
|
459
|
+
}
|
460
|
+
/**
|
461
|
+
* @param {string} id - UUID of the session to create a url for
|
462
|
+
* @param {Airtop.CreateLiveViewUrlRequest} request
|
463
|
+
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
464
|
+
*
|
465
|
+
* @example
|
466
|
+
* await client.sessions.createLiveViewUrl("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", {
|
467
|
+
* browserId: "7334da2a-91b0-42c5-6156-76a5eba87430",
|
468
|
+
* targetId: "123456"
|
469
|
+
* })
|
470
|
+
*/
|
471
|
+
createLiveViewUrl(id, request = {}, requestOptions) {
|
472
|
+
var _a, _b;
|
473
|
+
return __awaiter(this, void 0, void 0, function* () {
|
474
|
+
const { browserId, targetId } = request;
|
475
|
+
const _queryParams = {};
|
476
|
+
if (browserId != null) {
|
477
|
+
_queryParams["browserId"] = browserId;
|
478
|
+
}
|
479
|
+
if (targetId != null) {
|
480
|
+
_queryParams["targetId"] = targetId;
|
481
|
+
}
|
482
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
483
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(id)}/live-view-url`),
|
484
|
+
method: "GET",
|
485
|
+
headers: {
|
486
|
+
"x-airtop-token": (yield core.Supplier.get(this._options.airtopToken)) != null
|
487
|
+
? yield core.Supplier.get(this._options.airtopToken)
|
488
|
+
: undefined,
|
489
|
+
"X-Fern-Language": "JavaScript",
|
490
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
491
|
+
"X-Fern-SDK-Version": "0.0.4",
|
492
|
+
"User-Agent": "@airtop/sdk/0.0.4",
|
493
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
494
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
495
|
+
},
|
496
|
+
contentType: "application/json",
|
497
|
+
queryParameters: _queryParams,
|
498
|
+
requestType: "json",
|
499
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
500
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
501
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
502
|
+
});
|
503
|
+
if (_response.ok) {
|
504
|
+
return serializers.LiveViewUrlOutputV1Body.parseOrThrow(_response.body, {
|
505
|
+
unrecognizedObjectKeys: "passthrough",
|
506
|
+
allowUnrecognizedUnionMembers: true,
|
507
|
+
allowUnrecognizedEnumValues: true,
|
508
|
+
skipValidation: true,
|
509
|
+
breadcrumbsPrefix: ["response"],
|
510
|
+
});
|
511
|
+
}
|
512
|
+
if (_response.error.reason === "status-code") {
|
513
|
+
throw new errors.AirtopError({
|
514
|
+
statusCode: _response.error.statusCode,
|
515
|
+
body: _response.error.body,
|
516
|
+
});
|
517
|
+
}
|
518
|
+
switch (_response.error.reason) {
|
519
|
+
case "non-json":
|
520
|
+
throw new errors.AirtopError({
|
521
|
+
statusCode: _response.error.statusCode,
|
522
|
+
body: _response.error.rawBody,
|
523
|
+
});
|
524
|
+
case "timeout":
|
525
|
+
throw new errors.AirtopTimeoutError();
|
526
|
+
case "unknown":
|
527
|
+
throw new errors.AirtopError({
|
528
|
+
message: _response.error.errorMessage,
|
529
|
+
});
|
530
|
+
}
|
531
|
+
});
|
532
|
+
}
|
533
|
+
/**
|
534
|
+
* @param {string} sessionId - The session id to scrape
|
535
|
+
* @param {string} windowId - The window id to scrape
|
536
|
+
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
537
|
+
*
|
538
|
+
* @example
|
539
|
+
* await client.sessions.cleanScrapeSession("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
540
|
+
*/
|
541
|
+
cleanScrapeSession(sessionId, windowId, requestOptions) {
|
542
|
+
var _a, _b;
|
543
|
+
return __awaiter(this, void 0, void 0, function* () {
|
544
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
545
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/clean-scrape`),
|
546
|
+
method: "GET",
|
547
|
+
headers: {
|
548
|
+
"x-airtop-token": (yield core.Supplier.get(this._options.airtopToken)) != null
|
549
|
+
? yield core.Supplier.get(this._options.airtopToken)
|
550
|
+
: undefined,
|
551
|
+
"X-Fern-Language": "JavaScript",
|
552
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
553
|
+
"X-Fern-SDK-Version": "0.0.4",
|
554
|
+
"User-Agent": "@airtop/sdk/0.0.4",
|
555
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
556
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
557
|
+
},
|
558
|
+
contentType: "application/json",
|
559
|
+
requestType: "json",
|
560
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
561
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
562
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
563
|
+
});
|
564
|
+
if (_response.ok) {
|
565
|
+
return serializers.CleanScrapeResponse.parseOrThrow(_response.body, {
|
566
|
+
unrecognizedObjectKeys: "passthrough",
|
567
|
+
allowUnrecognizedUnionMembers: true,
|
568
|
+
allowUnrecognizedEnumValues: true,
|
569
|
+
skipValidation: true,
|
570
|
+
breadcrumbsPrefix: ["response"],
|
571
|
+
});
|
572
|
+
}
|
573
|
+
if (_response.error.reason === "status-code") {
|
574
|
+
throw new errors.AirtopError({
|
575
|
+
statusCode: _response.error.statusCode,
|
576
|
+
body: _response.error.body,
|
577
|
+
});
|
578
|
+
}
|
579
|
+
switch (_response.error.reason) {
|
580
|
+
case "non-json":
|
581
|
+
throw new errors.AirtopError({
|
582
|
+
statusCode: _response.error.statusCode,
|
583
|
+
body: _response.error.rawBody,
|
584
|
+
});
|
585
|
+
case "timeout":
|
586
|
+
throw new errors.AirtopTimeoutError();
|
587
|
+
case "unknown":
|
588
|
+
throw new errors.AirtopError({
|
589
|
+
message: _response.error.errorMessage,
|
590
|
+
});
|
591
|
+
}
|
592
|
+
});
|
593
|
+
}
|
594
|
+
/**
|
595
|
+
* @param {string} sessionId - The session id to submit a prompt about
|
596
|
+
* @param {string} windowId - The window id to submit a prompt about
|
597
|
+
* @param {Airtop.SessionPromptContentRequest} request
|
598
|
+
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
599
|
+
*
|
600
|
+
* @example
|
601
|
+
* await client.sessions.sessionPromptContent("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
602
|
+
* prompt: "What is the main idea of this page?"
|
603
|
+
* })
|
604
|
+
*/
|
605
|
+
sessionPromptContent(sessionId, windowId, request, requestOptions) {
|
606
|
+
var _a, _b;
|
607
|
+
return __awaiter(this, void 0, void 0, function* () {
|
608
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
609
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/prompt/content`),
|
610
|
+
method: "POST",
|
611
|
+
headers: {
|
612
|
+
"x-airtop-token": (yield core.Supplier.get(this._options.airtopToken)) != null
|
613
|
+
? yield core.Supplier.get(this._options.airtopToken)
|
614
|
+
: undefined,
|
615
|
+
"X-Fern-Language": "JavaScript",
|
616
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
617
|
+
"X-Fern-SDK-Version": "0.0.4",
|
618
|
+
"User-Agent": "@airtop/sdk/0.0.4",
|
619
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
620
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
621
|
+
},
|
622
|
+
contentType: "application/json",
|
623
|
+
requestType: "json",
|
624
|
+
body: serializers.SessionPromptContentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
625
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
626
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
627
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
628
|
+
});
|
629
|
+
if (_response.ok) {
|
630
|
+
return serializers.SessionAiResponse.parseOrThrow(_response.body, {
|
631
|
+
unrecognizedObjectKeys: "passthrough",
|
632
|
+
allowUnrecognizedUnionMembers: true,
|
633
|
+
allowUnrecognizedEnumValues: true,
|
634
|
+
skipValidation: true,
|
635
|
+
breadcrumbsPrefix: ["response"],
|
636
|
+
});
|
637
|
+
}
|
638
|
+
if (_response.error.reason === "status-code") {
|
639
|
+
throw new errors.AirtopError({
|
640
|
+
statusCode: _response.error.statusCode,
|
641
|
+
body: _response.error.body,
|
642
|
+
});
|
643
|
+
}
|
644
|
+
switch (_response.error.reason) {
|
645
|
+
case "non-json":
|
646
|
+
throw new errors.AirtopError({
|
647
|
+
statusCode: _response.error.statusCode,
|
648
|
+
body: _response.error.rawBody,
|
649
|
+
});
|
650
|
+
case "timeout":
|
651
|
+
throw new errors.AirtopTimeoutError();
|
652
|
+
case "unknown":
|
653
|
+
throw new errors.AirtopError({
|
654
|
+
message: _response.error.errorMessage,
|
655
|
+
});
|
656
|
+
}
|
657
|
+
});
|
658
|
+
}
|
659
|
+
/**
|
660
|
+
* @param {string} sessionId - The session id to perform a paginated extraction on
|
661
|
+
* @param {string} windowId - The window id to perform a paginated extraction on
|
662
|
+
* @param {Airtop.SessionPromptPaginatedExtractionRequest} request
|
663
|
+
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
664
|
+
*
|
665
|
+
* @example
|
666
|
+
* await client.sessions.sessionPromptPaginatedExtraction("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430", {
|
667
|
+
* prompt: "For each page on return all the items listed including a subfield"
|
668
|
+
* })
|
669
|
+
*/
|
670
|
+
sessionPromptPaginatedExtraction(sessionId, windowId, request, requestOptions) {
|
671
|
+
var _a, _b;
|
672
|
+
return __awaiter(this, void 0, void 0, function* () {
|
673
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
674
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/prompt/paginated-extraction`),
|
675
|
+
method: "POST",
|
676
|
+
headers: {
|
677
|
+
"x-airtop-token": (yield core.Supplier.get(this._options.airtopToken)) != null
|
678
|
+
? yield core.Supplier.get(this._options.airtopToken)
|
679
|
+
: undefined,
|
680
|
+
"X-Fern-Language": "JavaScript",
|
681
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
682
|
+
"X-Fern-SDK-Version": "0.0.4",
|
683
|
+
"User-Agent": "@airtop/sdk/0.0.4",
|
684
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
685
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
686
|
+
},
|
687
|
+
contentType: "application/json",
|
688
|
+
requestType: "json",
|
689
|
+
body: serializers.SessionPromptPaginatedExtractionRequest.jsonOrThrow(request, {
|
690
|
+
unrecognizedObjectKeys: "strip",
|
691
|
+
}),
|
692
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
693
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
694
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
695
|
+
});
|
696
|
+
if (_response.ok) {
|
697
|
+
return serializers.SessionAiResponse.parseOrThrow(_response.body, {
|
698
|
+
unrecognizedObjectKeys: "passthrough",
|
699
|
+
allowUnrecognizedUnionMembers: true,
|
700
|
+
allowUnrecognizedEnumValues: true,
|
701
|
+
skipValidation: true,
|
702
|
+
breadcrumbsPrefix: ["response"],
|
703
|
+
});
|
704
|
+
}
|
705
|
+
if (_response.error.reason === "status-code") {
|
706
|
+
throw new errors.AirtopError({
|
707
|
+
statusCode: _response.error.statusCode,
|
708
|
+
body: _response.error.body,
|
709
|
+
});
|
710
|
+
}
|
711
|
+
switch (_response.error.reason) {
|
712
|
+
case "non-json":
|
713
|
+
throw new errors.AirtopError({
|
714
|
+
statusCode: _response.error.statusCode,
|
715
|
+
body: _response.error.rawBody,
|
716
|
+
});
|
717
|
+
case "timeout":
|
718
|
+
throw new errors.AirtopTimeoutError();
|
719
|
+
case "unknown":
|
720
|
+
throw new errors.AirtopError({
|
721
|
+
message: _response.error.errorMessage,
|
722
|
+
});
|
723
|
+
}
|
724
|
+
});
|
725
|
+
}
|
726
|
+
/**
|
727
|
+
* @param {string} sessionId - The session id to summarize
|
728
|
+
* @param {string} windowId - The window id to summarize
|
729
|
+
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
730
|
+
*
|
731
|
+
* @example
|
732
|
+
* await client.sessions.summary("6aac6f73-bd89-4a76-ab32-5a6c422e8b0b", "0334da2a-91b0-42c5-6156-76a5eba87430")
|
733
|
+
*/
|
734
|
+
summary(sessionId, windowId, requestOptions) {
|
735
|
+
var _a, _b;
|
736
|
+
return __awaiter(this, void 0, void 0, function* () {
|
737
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
738
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirtopEnvironment.Default, `sessions/${encodeURIComponent(sessionId)}/windows/${encodeURIComponent(windowId)}/summary`),
|
739
|
+
method: "GET",
|
740
|
+
headers: {
|
741
|
+
"x-airtop-token": (yield core.Supplier.get(this._options.airtopToken)) != null
|
742
|
+
? yield core.Supplier.get(this._options.airtopToken)
|
743
|
+
: undefined,
|
744
|
+
"X-Fern-Language": "JavaScript",
|
745
|
+
"X-Fern-SDK-Name": "@airtop/sdk",
|
746
|
+
"X-Fern-SDK-Version": "0.0.4",
|
747
|
+
"User-Agent": "@airtop/sdk/0.0.4",
|
748
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
749
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
750
|
+
},
|
751
|
+
contentType: "application/json",
|
752
|
+
requestType: "json",
|
753
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
754
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
755
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
756
|
+
});
|
757
|
+
if (_response.ok) {
|
758
|
+
return serializers.SessionAiResponse.parseOrThrow(_response.body, {
|
759
|
+
unrecognizedObjectKeys: "passthrough",
|
760
|
+
allowUnrecognizedUnionMembers: true,
|
761
|
+
allowUnrecognizedEnumValues: true,
|
762
|
+
skipValidation: true,
|
763
|
+
breadcrumbsPrefix: ["response"],
|
764
|
+
});
|
765
|
+
}
|
766
|
+
if (_response.error.reason === "status-code") {
|
767
|
+
throw new errors.AirtopError({
|
768
|
+
statusCode: _response.error.statusCode,
|
769
|
+
body: _response.error.body,
|
770
|
+
});
|
771
|
+
}
|
772
|
+
switch (_response.error.reason) {
|
773
|
+
case "non-json":
|
774
|
+
throw new errors.AirtopError({
|
775
|
+
statusCode: _response.error.statusCode,
|
776
|
+
body: _response.error.rawBody,
|
777
|
+
});
|
778
|
+
case "timeout":
|
779
|
+
throw new errors.AirtopTimeoutError();
|
780
|
+
case "unknown":
|
781
|
+
throw new errors.AirtopError({
|
782
|
+
message: _response.error.errorMessage,
|
783
|
+
});
|
784
|
+
}
|
785
|
+
});
|
786
|
+
}
|
787
|
+
}
|
788
|
+
exports.Sessions = Sessions;
|