@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,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.SessionAiResponseDataStatus = void 0;
|
7
|
+
exports.SessionAiResponseDataStatus = {
|
8
|
+
Success: "success",
|
9
|
+
PartialSuccess: "partial_success",
|
10
|
+
Failure: "failure",
|
11
|
+
};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
export interface SessionAiResponseIssue {
|
5
|
+
/** Issue code */
|
6
|
+
code?: string;
|
7
|
+
/** Any associated details */
|
8
|
+
details?: Record<string, unknown>;
|
9
|
+
/** Message describing the issue */
|
10
|
+
message: string;
|
11
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
export interface SessionConfig {
|
5
|
+
/** Whether to enable the CDP */
|
6
|
+
enableCdp?: boolean;
|
7
|
+
/** Persist the profile */
|
8
|
+
persistProfile?: boolean;
|
9
|
+
/** Profile name to persist resulting profile (required when persist_profile is true). Must contain A-Za-z0-9 only */
|
10
|
+
persistProfileName?: string;
|
11
|
+
/** Profile tags */
|
12
|
+
persistProfileTags?: string[];
|
13
|
+
/** Id of a profile to use with this session */
|
14
|
+
profileId?: string;
|
15
|
+
/** Max length of session in minutes, after which it will terminate if not already deleted */
|
16
|
+
timeout?: number;
|
17
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
export interface SessionConfigV1 {
|
5
|
+
/** Whether to enable the CDP */
|
6
|
+
enableCdp?: boolean;
|
7
|
+
/** Persist the profile */
|
8
|
+
persistProfile?: boolean;
|
9
|
+
/** Profile name to persist resulting profile (required when persist_profile is true). Must contain A-Za-z0-9 only */
|
10
|
+
persistProfileName?: string;
|
11
|
+
/** Profile tags */
|
12
|
+
persistProfileTags?: string[];
|
13
|
+
/** Id of a profile to use with this session */
|
14
|
+
profileId?: string;
|
15
|
+
/** Max length of session in minutes, after which it will terminate if not already deleted */
|
16
|
+
timeout?: number;
|
17
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as Airtop from "../index";
|
5
|
+
export interface SessionOutputV1Body {
|
6
|
+
/** A URL to the JSON Schema for this object. */
|
7
|
+
schema?: string;
|
8
|
+
/** Connection info for the session */
|
9
|
+
connectionInfo?: Airtop.ConnectionInfo;
|
10
|
+
/** Session */
|
11
|
+
session: Airtop.Session;
|
12
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as Airtop from "../index";
|
5
|
+
export interface SessionWithConnectionInfo {
|
6
|
+
/** Connection info for the session */
|
7
|
+
connectionInfo?: Airtop.ConnectionInfo;
|
8
|
+
/** Session */
|
9
|
+
session: Airtop.Session;
|
10
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as Airtop from "../index";
|
5
|
+
export interface SessionsOutputV1Body {
|
6
|
+
/** A URL to the JSON Schema for this object. */
|
7
|
+
schema?: string;
|
8
|
+
/** List of sessions */
|
9
|
+
sessions?: Airtop.SessionWithConnectionInfo[];
|
10
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as Airtop from "../index";
|
5
|
+
export interface StatusMessage {
|
6
|
+
/** Event name */
|
7
|
+
event: string;
|
8
|
+
/** Time of the event in milliseconds since epoch */
|
9
|
+
eventTimeMillis: number;
|
10
|
+
/** ID of the session */
|
11
|
+
id: string;
|
12
|
+
/** Status of the session */
|
13
|
+
status: Airtop.StatusMessageStatus;
|
14
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
/**
|
5
|
+
* Status of the session
|
6
|
+
*/
|
7
|
+
export declare type StatusMessageStatus = "awaiting_capacity" | "initializing" | "running" | "ended";
|
8
|
+
export declare const StatusMessageStatus: {
|
9
|
+
readonly AwaitingCapacity: "awaiting_capacity";
|
10
|
+
readonly Initializing: "initializing";
|
11
|
+
readonly Running: "running";
|
12
|
+
readonly Ended: "ended";
|
13
|
+
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.StatusMessageStatus = void 0;
|
7
|
+
exports.StatusMessageStatus = {
|
8
|
+
AwaitingCapacity: "awaiting_capacity",
|
9
|
+
Initializing: "initializing",
|
10
|
+
Running: "running",
|
11
|
+
Ended: "ended",
|
12
|
+
};
|
@@ -0,0 +1,28 @@
|
|
1
|
+
export * from "./CleanScrapeResponse";
|
2
|
+
export * from "./CleanScrapeResponseDataStatus";
|
3
|
+
export * from "./CleanScrapeResponseData";
|
4
|
+
export * from "./CleanScrapeResponseOutput";
|
5
|
+
export * from "./ConnectionInfo";
|
6
|
+
export * from "./ErrorDetail";
|
7
|
+
export * from "./ErrorMessage";
|
8
|
+
export * from "./ErrorModel";
|
9
|
+
export * from "./LiveViewConnectionInfo";
|
10
|
+
export * from "./LiveViewUrlOutputV1Body";
|
11
|
+
export * from "./ProfileOutputV1Body";
|
12
|
+
export * from "./ProfileV1";
|
13
|
+
export * from "./ProfilesOutputV1Body";
|
14
|
+
export * from "./ScrapeResponseContent";
|
15
|
+
export * from "./Session";
|
16
|
+
export * from "./SessionAiResponse";
|
17
|
+
export * from "./SessionAiResponseDataStatus";
|
18
|
+
export * from "./SessionAiResponseData";
|
19
|
+
export * from "./SessionAiResponseIssue";
|
20
|
+
export * from "./SessionAiResponseMetadata";
|
21
|
+
export * from "./SessionAiResponseMetadataUsage";
|
22
|
+
export * from "./SessionConfig";
|
23
|
+
export * from "./SessionConfigV1";
|
24
|
+
export * from "./SessionOutputV1Body";
|
25
|
+
export * from "./SessionWithConnectionInfo";
|
26
|
+
export * from "./SessionsOutputV1Body";
|
27
|
+
export * from "./StatusMessageStatus";
|
28
|
+
export * from "./StatusMessage";
|
@@ -0,0 +1,44 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./CleanScrapeResponse"), exports);
|
18
|
+
__exportStar(require("./CleanScrapeResponseDataStatus"), exports);
|
19
|
+
__exportStar(require("./CleanScrapeResponseData"), exports);
|
20
|
+
__exportStar(require("./CleanScrapeResponseOutput"), exports);
|
21
|
+
__exportStar(require("./ConnectionInfo"), exports);
|
22
|
+
__exportStar(require("./ErrorDetail"), exports);
|
23
|
+
__exportStar(require("./ErrorMessage"), exports);
|
24
|
+
__exportStar(require("./ErrorModel"), exports);
|
25
|
+
__exportStar(require("./LiveViewConnectionInfo"), exports);
|
26
|
+
__exportStar(require("./LiveViewUrlOutputV1Body"), exports);
|
27
|
+
__exportStar(require("./ProfileOutputV1Body"), exports);
|
28
|
+
__exportStar(require("./ProfileV1"), exports);
|
29
|
+
__exportStar(require("./ProfilesOutputV1Body"), exports);
|
30
|
+
__exportStar(require("./ScrapeResponseContent"), exports);
|
31
|
+
__exportStar(require("./Session"), exports);
|
32
|
+
__exportStar(require("./SessionAiResponse"), exports);
|
33
|
+
__exportStar(require("./SessionAiResponseDataStatus"), exports);
|
34
|
+
__exportStar(require("./SessionAiResponseData"), exports);
|
35
|
+
__exportStar(require("./SessionAiResponseIssue"), exports);
|
36
|
+
__exportStar(require("./SessionAiResponseMetadata"), exports);
|
37
|
+
__exportStar(require("./SessionAiResponseMetadataUsage"), exports);
|
38
|
+
__exportStar(require("./SessionConfig"), exports);
|
39
|
+
__exportStar(require("./SessionConfigV1"), exports);
|
40
|
+
__exportStar(require("./SessionOutputV1Body"), exports);
|
41
|
+
__exportStar(require("./SessionWithConnectionInfo"), exports);
|
42
|
+
__exportStar(require("./SessionsOutputV1Body"), exports);
|
43
|
+
__exportStar(require("./StatusMessageStatus"), exports);
|
44
|
+
__exportStar(require("./StatusMessage"), exports);
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export declare type APIResponse<Success, Failure> = SuccessfulResponse<Success> | FailedResponse<Failure>;
|
2
|
+
export interface SuccessfulResponse<T> {
|
3
|
+
ok: true;
|
4
|
+
body: T;
|
5
|
+
headers?: Record<string, any>;
|
6
|
+
}
|
7
|
+
export interface FailedResponse<T> {
|
8
|
+
ok: false;
|
9
|
+
error: T;
|
10
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { APIResponse } from "./APIResponse";
|
2
|
+
export declare type FetchFunction = <R = unknown>(args: Fetcher.Args) => Promise<APIResponse<R, Fetcher.Error>>;
|
3
|
+
export declare namespace Fetcher {
|
4
|
+
interface Args {
|
5
|
+
url: string;
|
6
|
+
method: string;
|
7
|
+
contentType?: string;
|
8
|
+
headers?: Record<string, string | undefined>;
|
9
|
+
queryParameters?: Record<string, string | string[] | object | object[]>;
|
10
|
+
body?: unknown;
|
11
|
+
timeoutMs?: number;
|
12
|
+
maxRetries?: number;
|
13
|
+
withCredentials?: boolean;
|
14
|
+
abortSignal?: AbortSignal;
|
15
|
+
requestType?: "json" | "file" | "bytes";
|
16
|
+
responseType?: "json" | "blob" | "sse" | "streaming" | "text";
|
17
|
+
duplex?: "half";
|
18
|
+
}
|
19
|
+
type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError;
|
20
|
+
interface FailedStatusCodeError {
|
21
|
+
reason: "status-code";
|
22
|
+
statusCode: number;
|
23
|
+
body: unknown;
|
24
|
+
}
|
25
|
+
interface NonJsonError {
|
26
|
+
reason: "non-json";
|
27
|
+
statusCode: number;
|
28
|
+
rawBody: string;
|
29
|
+
}
|
30
|
+
interface TimeoutError {
|
31
|
+
reason: "timeout";
|
32
|
+
}
|
33
|
+
interface UnknownError {
|
34
|
+
reason: "unknown";
|
35
|
+
errorMessage: string;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
export declare function fetcherImpl<R = unknown>(args: Fetcher.Args): Promise<APIResponse<R, Fetcher.Error>>;
|
39
|
+
export declare const fetcher: FetchFunction;
|
@@ -0,0 +1,99 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
exports.fetcher = exports.fetcherImpl = void 0;
|
13
|
+
const createRequestUrl_1 = require("./createRequestUrl");
|
14
|
+
const getFetchFn_1 = require("./getFetchFn");
|
15
|
+
const getRequestBody_1 = require("./getRequestBody");
|
16
|
+
const getResponseBody_1 = require("./getResponseBody");
|
17
|
+
const makeRequest_1 = require("./makeRequest");
|
18
|
+
const requestWithRetries_1 = require("./requestWithRetries");
|
19
|
+
function fetcherImpl(args) {
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
21
|
+
const headers = {};
|
22
|
+
if (args.body !== undefined && args.contentType != null) {
|
23
|
+
headers["Content-Type"] = args.contentType;
|
24
|
+
}
|
25
|
+
if (args.headers != null) {
|
26
|
+
for (const [key, value] of Object.entries(args.headers)) {
|
27
|
+
if (value != null) {
|
28
|
+
headers[key] = value;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
32
|
+
const url = (0, createRequestUrl_1.createRequestUrl)(args.url, args.queryParameters);
|
33
|
+
let requestBody = yield (0, getRequestBody_1.getRequestBody)({
|
34
|
+
body: args.body,
|
35
|
+
type: args.requestType === "json" ? "json" : "other",
|
36
|
+
});
|
37
|
+
const fetchFn = yield (0, getFetchFn_1.getFetchFn)();
|
38
|
+
try {
|
39
|
+
const response = yield (0, requestWithRetries_1.requestWithRetries)(() => __awaiter(this, void 0, void 0, function* () {
|
40
|
+
return (0, makeRequest_1.makeRequest)(fetchFn, url, args.method, headers, requestBody, args.timeoutMs, args.abortSignal, args.withCredentials, args.duplex);
|
41
|
+
}), args.maxRetries);
|
42
|
+
let responseBody = yield (0, getResponseBody_1.getResponseBody)(response, args.responseType);
|
43
|
+
if (response.status >= 200 && response.status < 400) {
|
44
|
+
return {
|
45
|
+
ok: true,
|
46
|
+
body: responseBody,
|
47
|
+
headers: response.headers,
|
48
|
+
};
|
49
|
+
}
|
50
|
+
else {
|
51
|
+
return {
|
52
|
+
ok: false,
|
53
|
+
error: {
|
54
|
+
reason: "status-code",
|
55
|
+
statusCode: response.status,
|
56
|
+
body: responseBody,
|
57
|
+
},
|
58
|
+
};
|
59
|
+
}
|
60
|
+
}
|
61
|
+
catch (error) {
|
62
|
+
if (args.abortSignal != null && args.abortSignal.aborted) {
|
63
|
+
return {
|
64
|
+
ok: false,
|
65
|
+
error: {
|
66
|
+
reason: "unknown",
|
67
|
+
errorMessage: "The user aborted a request",
|
68
|
+
},
|
69
|
+
};
|
70
|
+
}
|
71
|
+
else if (error instanceof Error && error.name === "AbortError") {
|
72
|
+
return {
|
73
|
+
ok: false,
|
74
|
+
error: {
|
75
|
+
reason: "timeout",
|
76
|
+
},
|
77
|
+
};
|
78
|
+
}
|
79
|
+
else if (error instanceof Error) {
|
80
|
+
return {
|
81
|
+
ok: false,
|
82
|
+
error: {
|
83
|
+
reason: "unknown",
|
84
|
+
errorMessage: error.message,
|
85
|
+
},
|
86
|
+
};
|
87
|
+
}
|
88
|
+
return {
|
89
|
+
ok: false,
|
90
|
+
error: {
|
91
|
+
reason: "unknown",
|
92
|
+
errorMessage: JSON.stringify(error),
|
93
|
+
},
|
94
|
+
};
|
95
|
+
}
|
96
|
+
});
|
97
|
+
}
|
98
|
+
exports.fetcherImpl = fetcherImpl;
|
99
|
+
exports.fetcher = fetcherImpl;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
exports.Supplier = void 0;
|
13
|
+
exports.Supplier = {
|
14
|
+
get: (supplier) => __awaiter(void 0, void 0, void 0, function* () {
|
15
|
+
if (typeof supplier === "function") {
|
16
|
+
return supplier();
|
17
|
+
}
|
18
|
+
else {
|
19
|
+
return supplier;
|
20
|
+
}
|
21
|
+
}),
|
22
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function createRequestUrl(baseUrl: string, queryParameters?: Record<string, string | string[] | object | object[]>): string;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.createRequestUrl = void 0;
|
7
|
+
const qs_1 = __importDefault(require("qs"));
|
8
|
+
function createRequestUrl(baseUrl, queryParameters) {
|
9
|
+
return Object.keys(queryParameters !== null && queryParameters !== void 0 ? queryParameters : {}).length > 0
|
10
|
+
? `${baseUrl}?${qs_1.default.stringify(queryParameters, { arrayFormat: "repeat" })}`
|
11
|
+
: baseUrl;
|
12
|
+
}
|
13
|
+
exports.createRequestUrl = createRequestUrl;
|
@@ -0,0 +1,59 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
+
}) : function(o, v) {
|
16
|
+
o["default"] = v;
|
17
|
+
});
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
+
if (mod && mod.__esModule) return mod;
|
20
|
+
var result = {};
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
+
__setModuleDefault(result, mod);
|
23
|
+
return result;
|
24
|
+
};
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
32
|
+
});
|
33
|
+
};
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
35
|
+
exports.getFetchFn = void 0;
|
36
|
+
const runtime_1 = require("../runtime");
|
37
|
+
/**
|
38
|
+
* Returns a fetch function based on the runtime
|
39
|
+
*/
|
40
|
+
function getFetchFn() {
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
42
|
+
// In Node.js 18+ environments, use native fetch
|
43
|
+
if (runtime_1.RUNTIME.type === "node" && runtime_1.RUNTIME.parsedVersion != null && runtime_1.RUNTIME.parsedVersion >= 18) {
|
44
|
+
return fetch;
|
45
|
+
}
|
46
|
+
// In Node.js 18 or lower environments, the SDK always uses`node-fetch`.
|
47
|
+
if (runtime_1.RUNTIME.type === "node") {
|
48
|
+
return (yield Promise.resolve().then(() => __importStar(require("node-fetch")))).default;
|
49
|
+
}
|
50
|
+
// Otherwise the SDK uses global fetch if available,
|
51
|
+
// and falls back to node-fetch.
|
52
|
+
if (typeof fetch == "function") {
|
53
|
+
return fetch;
|
54
|
+
}
|
55
|
+
// Defaults to node `node-fetch` if global fetch isn't available
|
56
|
+
return (yield Promise.resolve().then(() => __importStar(require("node-fetch")))).default;
|
57
|
+
});
|
58
|
+
}
|
59
|
+
exports.getFetchFn = getFetchFn;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function getHeader(headers: Record<string, any>, header: string): string | undefined;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getHeader = void 0;
|
4
|
+
function getHeader(headers, header) {
|
5
|
+
for (const [headerKey, headerValue] of Object.entries(headers)) {
|
6
|
+
if (headerKey.toLowerCase() === header.toLowerCase()) {
|
7
|
+
return headerValue;
|
8
|
+
}
|
9
|
+
}
|
10
|
+
return undefined;
|
11
|
+
}
|
12
|
+
exports.getHeader = getHeader;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
exports.getRequestBody = void 0;
|
13
|
+
function getRequestBody({ body, type }) {
|
14
|
+
return __awaiter(this, void 0, void 0, function* () {
|
15
|
+
if (type.includes("json")) {
|
16
|
+
return JSON.stringify(body);
|
17
|
+
}
|
18
|
+
else {
|
19
|
+
return body;
|
20
|
+
}
|
21
|
+
});
|
22
|
+
}
|
23
|
+
exports.getRequestBody = getRequestBody;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function getResponseBody(response: Response, responseType?: string): Promise<unknown>;
|