@airweave/sdk 0.0.1 → 0.1.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 +57 -0
- package/Client.js +62 -0
- package/README.md +151 -1
- package/api/errors/UnprocessableEntityError.d.ts +8 -0
- package/api/errors/UnprocessableEntityError.js +51 -0
- package/api/errors/index.d.ts +1 -0
- package/api/errors/index.js +17 -0
- package/api/index.d.ts +3 -0
- package/api/index.js +19 -0
- package/api/resources/apiKeys/client/Client.d.ts +130 -0
- package/api/resources/apiKeys/client/Client.js +386 -0
- package/api/resources/apiKeys/client/index.d.ts +1 -0
- package/api/resources/apiKeys/client/index.js +17 -0
- package/api/resources/apiKeys/client/requests/ApiKeyCreate.d.ts +10 -0
- package/api/resources/apiKeys/client/requests/ApiKeyCreate.js +5 -0
- package/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.d.ts +12 -0
- package/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.js +5 -0
- package/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.d.ts +11 -0
- package/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.js +5 -0
- package/api/resources/apiKeys/client/requests/index.d.ts +3 -0
- package/api/resources/apiKeys/client/requests/index.js +2 -0
- package/api/resources/apiKeys/index.d.ts +1 -0
- package/api/resources/apiKeys/index.js +17 -0
- package/api/resources/chat/client/Client.d.ts +119 -0
- package/api/resources/chat/client/Client.js +519 -0
- package/api/resources/chat/client/index.d.ts +1 -0
- package/api/resources/chat/client/index.js +17 -0
- package/api/resources/chat/client/requests/ChatCreate.d.ts +18 -0
- package/api/resources/chat/client/requests/ChatCreate.js +5 -0
- package/api/resources/chat/client/requests/ChatMessageCreate.d.ts +13 -0
- package/api/resources/chat/client/requests/ChatMessageCreate.js +5 -0
- package/api/resources/chat/client/requests/ChatUpdate.d.ts +13 -0
- package/api/resources/chat/client/requests/ChatUpdate.js +5 -0
- package/api/resources/chat/client/requests/ListChatsChatGetRequest.d.ts +11 -0
- package/api/resources/chat/client/requests/ListChatsChatGetRequest.js +5 -0
- package/api/resources/chat/client/requests/index.d.ts +4 -0
- package/api/resources/chat/client/requests/index.js +2 -0
- package/api/resources/chat/index.d.ts +1 -0
- package/api/resources/chat/index.js +17 -0
- package/api/resources/connections/client/Client.d.ts +238 -0
- package/api/resources/connections/client/Client.js +907 -0
- package/api/resources/connections/client/index.d.ts +1 -0
- package/api/resources/connections/client/index.js +17 -0
- package/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +15 -0
- package/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +5 -0
- package/api/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +14 -0
- package/api/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +5 -0
- package/api/resources/connections/client/requests/GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest.d.ts +12 -0
- package/api/resources/connections/client/requests/GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest.js +5 -0
- package/api/resources/connections/client/requests/index.d.ts +3 -0
- package/api/resources/connections/client/requests/index.js +2 -0
- package/api/resources/connections/index.d.ts +1 -0
- package/api/resources/connections/index.js +17 -0
- package/api/resources/destinations/client/Client.d.ts +51 -0
- package/api/resources/destinations/client/Client.js +189 -0
- package/api/resources/destinations/client/index.d.ts +1 -0
- package/api/resources/destinations/client/index.js +2 -0
- package/api/resources/destinations/index.d.ts +1 -0
- package/api/resources/destinations/index.js +17 -0
- package/api/resources/embeddingModels/client/Client.d.ts +70 -0
- package/api/resources/embeddingModels/client/Client.js +208 -0
- package/api/resources/embeddingModels/client/index.d.ts +1 -0
- package/api/resources/embeddingModels/client/index.js +2 -0
- package/api/resources/embeddingModels/index.d.ts +1 -0
- package/api/resources/embeddingModels/index.js +17 -0
- package/api/resources/health/client/Client.d.ts +39 -0
- package/api/resources/health/client/Client.js +115 -0
- package/api/resources/health/client/index.d.ts +1 -0
- package/api/resources/health/client/index.js +2 -0
- package/api/resources/health/index.d.ts +1 -0
- package/api/resources/health/index.js +17 -0
- package/api/resources/index.d.ts +16 -0
- package/api/resources/index.js +55 -0
- package/api/resources/sources/client/Client.d.ts +65 -0
- package/api/resources/sources/client/Client.js +203 -0
- package/api/resources/sources/client/index.d.ts +1 -0
- package/api/resources/sources/client/index.js +2 -0
- package/api/resources/sources/index.d.ts +1 -0
- package/api/resources/sources/index.js +17 -0
- package/api/resources/sync/client/Client.d.ts +131 -0
- package/api/resources/sync/client/Client.js +599 -0
- package/api/resources/sync/client/index.d.ts +1 -0
- package/api/resources/sync/client/index.js +17 -0
- package/api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.d.ts +10 -0
- package/api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.js +5 -0
- package/api/resources/sync/client/requests/GetSyncJobSyncJobJobIdGetRequest.d.ts +12 -0
- package/api/resources/sync/client/requests/GetSyncJobSyncJobJobIdGetRequest.js +5 -0
- package/api/resources/sync/client/requests/ListSyncsSyncGetRequest.d.ts +12 -0
- package/api/resources/sync/client/requests/ListSyncsSyncGetRequest.js +5 -0
- package/api/resources/sync/client/requests/SyncCreate.d.ts +22 -0
- package/api/resources/sync/client/requests/SyncCreate.js +5 -0
- package/api/resources/sync/client/requests/index.d.ts +4 -0
- package/api/resources/sync/client/requests/index.js +2 -0
- package/api/resources/sync/index.d.ts +2 -0
- package/api/resources/sync/index.js +18 -0
- package/api/resources/sync/types/ListSyncsSyncGetResponse.d.ts +5 -0
- package/api/resources/sync/types/ListSyncsSyncGetResponse.js +5 -0
- package/api/resources/sync/types/index.d.ts +1 -0
- package/api/resources/sync/types/index.js +17 -0
- package/api/resources/users/client/Client.d.ts +47 -0
- package/api/resources/users/client/Client.js +133 -0
- package/api/resources/users/client/index.d.ts +1 -0
- package/api/resources/users/client/index.js +2 -0
- package/api/resources/users/index.d.ts +1 -0
- package/api/resources/users/index.js +17 -0
- package/api/resources/whiteLabels/client/Client.d.ts +131 -0
- package/api/resources/whiteLabels/client/Client.js +586 -0
- package/api/resources/whiteLabels/client/index.d.ts +1 -0
- package/api/resources/whiteLabels/client/index.js +17 -0
- package/api/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +20 -0
- package/api/resources/whiteLabels/client/requests/WhiteLabelCreate.js +5 -0
- package/api/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +13 -0
- package/api/resources/whiteLabels/client/requests/WhiteLabelUpdate.js +5 -0
- package/api/resources/whiteLabels/client/requests/index.d.ts +2 -0
- package/api/resources/whiteLabels/client/requests/index.js +2 -0
- package/api/resources/whiteLabels/index.d.ts +1 -0
- package/api/resources/whiteLabels/index.js +17 -0
- package/api/types/ApiKey.d.ts +17 -0
- package/api/types/ApiKey.js +5 -0
- package/api/types/ApiKeyWithPlainKey.d.ts +18 -0
- package/api/types/ApiKeyWithPlainKey.js +5 -0
- package/api/types/AuthType.d.ts +26 -0
- package/api/types/AuthType.js +15 -0
- package/api/types/Chat.d.ts +22 -0
- package/api/types/Chat.js +5 -0
- package/api/types/ChatMessage.d.ts +18 -0
- package/api/types/ChatMessage.js +5 -0
- package/api/types/ConfigField.d.ts +12 -0
- package/api/types/ConfigField.js +5 -0
- package/api/types/Connection.d.ts +18 -0
- package/api/types/Connection.js +5 -0
- package/api/types/ConnectionStatus.d.ts +12 -0
- package/api/types/ConnectionStatus.js +11 -0
- package/api/types/Destination.d.ts +18 -0
- package/api/types/Destination.js +5 -0
- package/api/types/DestinationWithConfigFields.d.ts +19 -0
- package/api/types/DestinationWithConfigFields.js +5 -0
- package/api/types/EmbeddingModel.d.ts +20 -0
- package/api/types/EmbeddingModel.js +5 -0
- package/api/types/EmbeddingModelWithConfigFields.d.ts +21 -0
- package/api/types/EmbeddingModelWithConfigFields.js +5 -0
- package/api/types/Fields.d.ts +10 -0
- package/api/types/Fields.js +5 -0
- package/api/types/HttpValidationError.d.ts +7 -0
- package/api/types/HttpValidationError.js +5 -0
- package/api/types/IntegrationType.d.ts +12 -0
- package/api/types/IntegrationType.js +11 -0
- package/api/types/Source.d.ts +18 -0
- package/api/types/Source.js +5 -0
- package/api/types/Sync.d.ts +25 -0
- package/api/types/Sync.js +5 -0
- package/api/types/SyncJob.d.ts +25 -0
- package/api/types/SyncJob.js +5 -0
- package/api/types/SyncJobStatus.d.ts +13 -0
- package/api/types/SyncJobStatus.js +12 -0
- package/api/types/SyncStatus.d.ts +12 -0
- package/api/types/SyncStatus.js +11 -0
- package/api/types/SyncWithSourceConnection.d.ts +26 -0
- package/api/types/SyncWithSourceConnection.js +5 -0
- package/api/types/User.d.ts +13 -0
- package/api/types/User.js +5 -0
- package/api/types/ValidationError.d.ts +9 -0
- package/api/types/ValidationError.js +5 -0
- package/api/types/ValidationErrorLocItem.d.ts +4 -0
- package/api/types/ValidationErrorLocItem.js +5 -0
- package/api/types/WhiteLabel.d.ts +19 -0
- package/api/types/WhiteLabel.js +5 -0
- package/api/types/index.d.ts +25 -0
- package/api/types/index.js +41 -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 +12 -0
- package/core/fetcher/getFetchFn.d.ts +4 -0
- package/core/fetcher/getFetchFn.js +68 -0
- package/core/fetcher/getHeader.d.ts +1 -0
- package/core/fetcher/getHeader.js +11 -0
- package/core/fetcher/getRequestBody.d.ts +7 -0
- package/core/fetcher/getRequestBody.js +22 -0
- package/core/fetcher/getResponseBody.d.ts +1 -0
- package/core/fetcher/getResponseBody.js +54 -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 +40 -0
- package/core/fetcher/signals.d.ts +11 -0
- package/core/fetcher/signals.js +36 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +126 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +59 -0
- package/core/index.d.ts +3 -0
- package/core/index.js +42 -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 +85 -0
- package/core/schemas/Schema.js +22 -0
- package/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/core/schemas/builders/bigint/bigint.js +49 -0
- package/core/schemas/builders/bigint/index.d.ts +1 -0
- package/core/schemas/builders/bigint/index.js +5 -0
- package/core/schemas/builders/date/date.d.ts +2 -0
- package/core/schemas/builders/date/date.js +62 -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 +38 -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 +14 -0
- package/core/schemas/builders/index.js +30 -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 +24 -0
- package/core/schemas/builders/lazy/lazyObject.d.ts +3 -0
- package/core/schemas/builders/lazy/lazyObject.js +11 -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 +54 -0
- package/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
- package/core/schemas/builders/literals/booleanLiteral.js +28 -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 +28 -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 +260 -0
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +7 -0
- package/core/schemas/builders/object/property.d.ts +8 -0
- package/core/schemas/builders/object/property.js +15 -0
- package/core/schemas/builders/object/types.d.ts +31 -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 +53 -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 +94 -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 +81 -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 +9 -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 +43 -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 +39 -0
- package/core/schemas/builders/union/discriminant.d.ts +5 -0
- package/core/schemas/builders/union/discriminant.js +9 -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 +129 -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 +15 -0
- package/core/schemas/utils/entries.d.ts +1 -0
- package/core/schemas/utils/entries.js +6 -0
- package/core/schemas/utils/filterObject.d.ts +1 -0
- package/core/schemas/utils/filterObject.js +13 -0
- package/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -0
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +27 -0
- package/core/schemas/utils/isPlainObject.d.ts +1 -0
- package/core/schemas/utils/isPlainObject.js +17 -0
- package/core/schemas/utils/keys.d.ts +1 -0
- package/core/schemas/utils/keys.js +6 -0
- package/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
- package/core/schemas/utils/maybeSkipValidation.js +27 -0
- package/core/schemas/utils/partition.d.ts +1 -0
- package/core/schemas/utils/partition.js +15 -0
- package/dist/Client.d.ts +57 -0
- package/dist/Client.js +62 -0
- package/dist/api/errors/UnprocessableEntityError.d.ts +8 -0
- package/dist/api/errors/UnprocessableEntityError.js +51 -0
- package/dist/api/errors/index.d.ts +1 -0
- package/dist/api/errors/index.js +17 -0
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.js +19 -0
- package/dist/api/resources/apiKeys/client/Client.d.ts +130 -0
- package/dist/api/resources/apiKeys/client/Client.js +386 -0
- package/dist/api/resources/apiKeys/client/index.d.ts +1 -0
- package/dist/api/resources/apiKeys/client/index.js +17 -0
- package/dist/api/resources/apiKeys/client/requests/ApiKeyCreate.d.ts +10 -0
- package/dist/api/resources/apiKeys/client/requests/ApiKeyCreate.js +5 -0
- package/dist/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.d.ts +12 -0
- package/dist/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.js +5 -0
- package/dist/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.d.ts +11 -0
- package/dist/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.js +5 -0
- package/dist/api/resources/apiKeys/client/requests/index.d.ts +3 -0
- package/dist/api/resources/apiKeys/client/requests/index.js +2 -0
- package/dist/api/resources/apiKeys/index.d.ts +1 -0
- package/dist/api/resources/apiKeys/index.js +17 -0
- package/dist/api/resources/chat/client/Client.d.ts +119 -0
- package/dist/api/resources/chat/client/Client.js +519 -0
- package/dist/api/resources/chat/client/index.d.ts +1 -0
- package/dist/api/resources/chat/client/index.js +17 -0
- package/dist/api/resources/chat/client/requests/ChatCreate.d.ts +18 -0
- package/dist/api/resources/chat/client/requests/ChatCreate.js +5 -0
- package/dist/api/resources/chat/client/requests/ChatMessageCreate.d.ts +13 -0
- package/dist/api/resources/chat/client/requests/ChatMessageCreate.js +5 -0
- package/dist/api/resources/chat/client/requests/ChatUpdate.d.ts +13 -0
- package/dist/api/resources/chat/client/requests/ChatUpdate.js +5 -0
- package/dist/api/resources/chat/client/requests/ListChatsChatGetRequest.d.ts +11 -0
- package/dist/api/resources/chat/client/requests/ListChatsChatGetRequest.js +5 -0
- package/dist/api/resources/chat/client/requests/index.d.ts +4 -0
- package/dist/api/resources/chat/client/requests/index.js +2 -0
- package/dist/api/resources/chat/index.d.ts +1 -0
- package/dist/api/resources/chat/index.js +17 -0
- package/dist/api/resources/connections/client/Client.d.ts +238 -0
- package/dist/api/resources/connections/client/Client.js +907 -0
- package/dist/api/resources/connections/client/index.d.ts +1 -0
- package/dist/api/resources/connections/client/index.js +17 -0
- package/dist/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +15 -0
- package/dist/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +5 -0
- package/dist/api/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +14 -0
- package/dist/api/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +5 -0
- package/dist/api/resources/connections/client/requests/GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest.d.ts +12 -0
- package/dist/api/resources/connections/client/requests/GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest.js +5 -0
- package/dist/api/resources/connections/client/requests/index.d.ts +3 -0
- package/dist/api/resources/connections/client/requests/index.js +2 -0
- package/dist/api/resources/connections/index.d.ts +1 -0
- package/dist/api/resources/connections/index.js +17 -0
- package/dist/api/resources/destinations/client/Client.d.ts +51 -0
- package/dist/api/resources/destinations/client/Client.js +189 -0
- package/dist/api/resources/destinations/client/index.d.ts +1 -0
- package/dist/api/resources/destinations/client/index.js +2 -0
- package/dist/api/resources/destinations/index.d.ts +1 -0
- package/dist/api/resources/destinations/index.js +17 -0
- package/dist/api/resources/embeddingModels/client/Client.d.ts +70 -0
- package/dist/api/resources/embeddingModels/client/Client.js +208 -0
- package/dist/api/resources/embeddingModels/client/index.d.ts +1 -0
- package/dist/api/resources/embeddingModels/client/index.js +2 -0
- package/dist/api/resources/embeddingModels/index.d.ts +1 -0
- package/dist/api/resources/embeddingModels/index.js +17 -0
- package/dist/api/resources/health/client/Client.d.ts +39 -0
- package/dist/api/resources/health/client/Client.js +115 -0
- package/dist/api/resources/health/client/index.d.ts +1 -0
- package/dist/api/resources/health/client/index.js +2 -0
- package/dist/api/resources/health/index.d.ts +1 -0
- package/dist/api/resources/health/index.js +17 -0
- package/dist/api/resources/index.d.ts +16 -0
- package/dist/api/resources/index.js +55 -0
- package/dist/api/resources/sources/client/Client.d.ts +65 -0
- package/dist/api/resources/sources/client/Client.js +203 -0
- package/dist/api/resources/sources/client/index.d.ts +1 -0
- package/dist/api/resources/sources/client/index.js +2 -0
- package/dist/api/resources/sources/index.d.ts +1 -0
- package/dist/api/resources/sources/index.js +17 -0
- package/dist/api/resources/sync/client/Client.d.ts +131 -0
- package/dist/api/resources/sync/client/Client.js +599 -0
- package/dist/api/resources/sync/client/index.d.ts +1 -0
- package/dist/api/resources/sync/client/index.js +17 -0
- package/dist/api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.d.ts +10 -0
- package/dist/api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.js +5 -0
- package/dist/api/resources/sync/client/requests/GetSyncJobSyncJobJobIdGetRequest.d.ts +12 -0
- package/dist/api/resources/sync/client/requests/GetSyncJobSyncJobJobIdGetRequest.js +5 -0
- package/dist/api/resources/sync/client/requests/ListSyncsSyncGetRequest.d.ts +12 -0
- package/dist/api/resources/sync/client/requests/ListSyncsSyncGetRequest.js +5 -0
- package/dist/api/resources/sync/client/requests/SyncCreate.d.ts +22 -0
- package/dist/api/resources/sync/client/requests/SyncCreate.js +5 -0
- package/dist/api/resources/sync/client/requests/index.d.ts +4 -0
- package/dist/api/resources/sync/client/requests/index.js +2 -0
- package/dist/api/resources/sync/index.d.ts +2 -0
- package/dist/api/resources/sync/index.js +18 -0
- package/dist/api/resources/sync/types/ListSyncsSyncGetResponse.d.ts +5 -0
- package/dist/api/resources/sync/types/ListSyncsSyncGetResponse.js +5 -0
- package/dist/api/resources/sync/types/index.d.ts +1 -0
- package/dist/api/resources/sync/types/index.js +17 -0
- package/dist/api/resources/users/client/Client.d.ts +47 -0
- package/dist/api/resources/users/client/Client.js +133 -0
- package/dist/api/resources/users/client/index.d.ts +1 -0
- package/dist/api/resources/users/client/index.js +2 -0
- package/dist/api/resources/users/index.d.ts +1 -0
- package/dist/api/resources/users/index.js +17 -0
- package/dist/api/resources/whiteLabels/client/Client.d.ts +131 -0
- package/dist/api/resources/whiteLabels/client/Client.js +586 -0
- package/dist/api/resources/whiteLabels/client/index.d.ts +1 -0
- package/dist/api/resources/whiteLabels/client/index.js +17 -0
- package/dist/api/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +20 -0
- package/dist/api/resources/whiteLabels/client/requests/WhiteLabelCreate.js +5 -0
- package/dist/api/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +13 -0
- package/dist/api/resources/whiteLabels/client/requests/WhiteLabelUpdate.js +5 -0
- package/dist/api/resources/whiteLabels/client/requests/index.d.ts +2 -0
- package/dist/api/resources/whiteLabels/client/requests/index.js +2 -0
- package/dist/api/resources/whiteLabels/index.d.ts +1 -0
- package/dist/api/resources/whiteLabels/index.js +17 -0
- package/dist/api/types/ApiKey.d.ts +17 -0
- package/dist/api/types/ApiKey.js +5 -0
- package/dist/api/types/ApiKeyWithPlainKey.d.ts +18 -0
- package/dist/api/types/ApiKeyWithPlainKey.js +5 -0
- package/dist/api/types/AuthType.d.ts +26 -0
- package/dist/api/types/AuthType.js +15 -0
- package/dist/api/types/Chat.d.ts +22 -0
- package/dist/api/types/Chat.js +5 -0
- package/dist/api/types/ChatMessage.d.ts +18 -0
- package/dist/api/types/ChatMessage.js +5 -0
- package/dist/api/types/ConfigField.d.ts +12 -0
- package/dist/api/types/ConfigField.js +5 -0
- package/dist/api/types/Connection.d.ts +18 -0
- package/dist/api/types/Connection.js +5 -0
- package/dist/api/types/ConnectionStatus.d.ts +12 -0
- package/dist/api/types/ConnectionStatus.js +11 -0
- package/dist/api/types/Destination.d.ts +18 -0
- package/dist/api/types/Destination.js +5 -0
- package/dist/api/types/DestinationWithConfigFields.d.ts +19 -0
- package/dist/api/types/DestinationWithConfigFields.js +5 -0
- package/dist/api/types/EmbeddingModel.d.ts +20 -0
- package/dist/api/types/EmbeddingModel.js +5 -0
- package/dist/api/types/EmbeddingModelWithConfigFields.d.ts +21 -0
- package/dist/api/types/EmbeddingModelWithConfigFields.js +5 -0
- package/dist/api/types/Fields.d.ts +10 -0
- package/dist/api/types/Fields.js +5 -0
- package/dist/api/types/HttpValidationError.d.ts +7 -0
- package/dist/api/types/HttpValidationError.js +5 -0
- package/dist/api/types/IntegrationType.d.ts +12 -0
- package/dist/api/types/IntegrationType.js +11 -0
- package/dist/api/types/Source.d.ts +18 -0
- package/dist/api/types/Source.js +5 -0
- package/dist/api/types/Sync.d.ts +25 -0
- package/dist/api/types/Sync.js +5 -0
- package/dist/api/types/SyncJob.d.ts +25 -0
- package/dist/api/types/SyncJob.js +5 -0
- package/dist/api/types/SyncJobStatus.d.ts +13 -0
- package/dist/api/types/SyncJobStatus.js +12 -0
- package/dist/api/types/SyncStatus.d.ts +12 -0
- package/dist/api/types/SyncStatus.js +11 -0
- package/dist/api/types/SyncWithSourceConnection.d.ts +26 -0
- package/dist/api/types/SyncWithSourceConnection.js +5 -0
- package/dist/api/types/User.d.ts +13 -0
- package/dist/api/types/User.js +5 -0
- package/dist/api/types/ValidationError.d.ts +9 -0
- package/dist/api/types/ValidationError.js +5 -0
- package/dist/api/types/ValidationErrorLocItem.d.ts +4 -0
- package/dist/api/types/ValidationErrorLocItem.js +5 -0
- package/dist/api/types/WhiteLabel.d.ts +19 -0
- package/dist/api/types/WhiteLabel.js +5 -0
- package/dist/api/types/index.d.ts +25 -0
- package/dist/api/types/index.js +41 -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 +12 -0
- package/dist/core/fetcher/getFetchFn.d.ts +4 -0
- package/dist/core/fetcher/getFetchFn.js +68 -0
- package/dist/core/fetcher/getHeader.d.ts +1 -0
- package/dist/core/fetcher/getHeader.js +11 -0
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +22 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +54 -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 +40 -0
- package/dist/core/fetcher/signals.d.ts +11 -0
- package/dist/core/fetcher/signals.js +36 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +126 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +59 -0
- package/dist/core/index.d.ts +3 -0
- package/dist/core/index.js +42 -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 +85 -0
- package/dist/core/schemas/Schema.js +22 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/dist/core/schemas/builders/bigint/bigint.js +49 -0
- package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
- package/dist/core/schemas/builders/bigint/index.js +5 -0
- package/dist/core/schemas/builders/date/date.d.ts +2 -0
- package/dist/core/schemas/builders/date/date.js +62 -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 +38 -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 +14 -0
- package/dist/core/schemas/builders/index.js +30 -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 +24 -0
- package/dist/core/schemas/builders/lazy/lazyObject.d.ts +3 -0
- package/dist/core/schemas/builders/lazy/lazyObject.js +11 -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 +54 -0
- package/dist/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
- package/dist/core/schemas/builders/literals/booleanLiteral.js +28 -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 +28 -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 +260 -0
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +7 -0
- package/dist/core/schemas/builders/object/property.d.ts +8 -0
- package/dist/core/schemas/builders/object/property.js +15 -0
- package/dist/core/schemas/builders/object/types.d.ts +31 -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 +53 -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 +94 -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 +81 -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 +9 -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 +43 -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 +39 -0
- package/dist/core/schemas/builders/union/discriminant.d.ts +5 -0
- package/dist/core/schemas/builders/union/discriminant.js +9 -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 +129 -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 +15 -0
- package/dist/core/schemas/utils/entries.d.ts +1 -0
- package/dist/core/schemas/utils/entries.js +6 -0
- package/dist/core/schemas/utils/filterObject.d.ts +1 -0
- package/dist/core/schemas/utils/filterObject.js +13 -0
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -0
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +27 -0
- package/dist/core/schemas/utils/isPlainObject.d.ts +1 -0
- package/dist/core/schemas/utils/isPlainObject.js +17 -0
- package/dist/core/schemas/utils/keys.d.ts +1 -0
- package/dist/core/schemas/utils/keys.js +6 -0
- package/dist/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
- package/dist/core/schemas/utils/maybeSkipValidation.js +27 -0
- package/dist/core/schemas/utils/partition.d.ts +1 -0
- package/dist/core/schemas/utils/partition.js +15 -0
- package/dist/errors/AirweaveSDKError.d.ts +12 -0
- package/dist/errors/AirweaveSDKError.js +32 -0
- package/dist/errors/AirweaveSDKTimeoutError.d.ts +6 -0
- package/dist/errors/AirweaveSDKTimeoutError.js +13 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.js +7 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +42 -0
- package/dist/serialization/index.d.ts +2 -0
- package/dist/serialization/index.js +18 -0
- package/dist/serialization/resources/apiKeys/client/index.d.ts +2 -0
- package/dist/serialization/resources/apiKeys/client/index.js +41 -0
- package/dist/serialization/resources/apiKeys/client/readApiKeys.d.ts +11 -0
- package/dist/serialization/resources/apiKeys/client/readApiKeys.js +42 -0
- package/dist/serialization/resources/apiKeys/client/requests/ApiKeyCreate.d.ts +12 -0
- package/dist/serialization/resources/apiKeys/client/requests/ApiKeyCreate.js +43 -0
- package/dist/serialization/resources/apiKeys/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/apiKeys/client/requests/index.js +5 -0
- package/dist/serialization/resources/apiKeys/index.d.ts +1 -0
- package/dist/serialization/resources/apiKeys/index.js +17 -0
- package/dist/serialization/resources/chat/client/index.d.ts +2 -0
- package/dist/serialization/resources/chat/client/index.js +41 -0
- package/dist/serialization/resources/chat/client/listChats.d.ts +11 -0
- package/dist/serialization/resources/chat/client/listChats.js +42 -0
- package/dist/serialization/resources/chat/client/requests/ChatCreate.d.ts +17 -0
- package/dist/serialization/resources/chat/client/requests/ChatCreate.js +48 -0
- package/dist/serialization/resources/chat/client/requests/ChatMessageCreate.d.ts +13 -0
- package/dist/serialization/resources/chat/client/requests/ChatMessageCreate.js +44 -0
- package/dist/serialization/resources/chat/client/requests/ChatUpdate.d.ts +15 -0
- package/dist/serialization/resources/chat/client/requests/ChatUpdate.js +46 -0
- package/dist/serialization/resources/chat/client/requests/index.d.ts +3 -0
- package/dist/serialization/resources/chat/client/requests/index.js +9 -0
- package/dist/serialization/resources/chat/index.d.ts +1 -0
- package/dist/serialization/resources/chat/index.js +17 -0
- package/dist/serialization/resources/connections/client/getConnectionCredentials.d.ts +9 -0
- package/dist/serialization/resources/connections/client/getConnectionCredentials.js +41 -0
- package/dist/serialization/resources/connections/client/getOauth2AuthUrl.d.ts +9 -0
- package/dist/serialization/resources/connections/client/getOauth2AuthUrl.js +41 -0
- package/dist/serialization/resources/connections/client/getOauth2WhiteLabelAuthUrl.d.ts +9 -0
- package/dist/serialization/resources/connections/client/getOauth2WhiteLabelAuthUrl.js +41 -0
- package/dist/serialization/resources/connections/client/index.d.ts +7 -0
- package/dist/serialization/resources/connections/client/index.js +46 -0
- package/dist/serialization/resources/connections/client/listAllConnectedIntegrations.d.ts +11 -0
- package/dist/serialization/resources/connections/client/listAllConnectedIntegrations.js +42 -0
- package/dist/serialization/resources/connections/client/listConnectedIntegrations.d.ts +11 -0
- package/dist/serialization/resources/connections/client/listConnectedIntegrations.js +42 -0
- package/dist/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +13 -0
- package/dist/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +44 -0
- package/dist/serialization/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +13 -0
- package/dist/serialization/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +44 -0
- package/dist/serialization/resources/connections/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/connections/client/requests/index.js +7 -0
- package/dist/serialization/resources/connections/client/sendOauth2WhiteLabelCode.d.ts +9 -0
- package/dist/serialization/resources/connections/client/sendOauth2WhiteLabelCode.js +41 -0
- package/dist/serialization/resources/connections/index.d.ts +1 -0
- package/dist/serialization/resources/connections/index.js +17 -0
- package/dist/serialization/resources/destinations/client/index.d.ts +1 -0
- package/dist/serialization/resources/destinations/client/index.js +37 -0
- package/dist/serialization/resources/destinations/client/listDestinations.d.ts +11 -0
- package/dist/serialization/resources/destinations/client/listDestinations.js +42 -0
- package/dist/serialization/resources/destinations/index.d.ts +1 -0
- package/dist/serialization/resources/destinations/index.js +17 -0
- package/dist/serialization/resources/embeddingModels/client/index.d.ts +1 -0
- package/dist/serialization/resources/embeddingModels/client/index.js +37 -0
- package/dist/serialization/resources/embeddingModels/client/readEmbeddingModels.d.ts +11 -0
- package/dist/serialization/resources/embeddingModels/client/readEmbeddingModels.js +42 -0
- package/dist/serialization/resources/embeddingModels/index.d.ts +1 -0
- package/dist/serialization/resources/embeddingModels/index.js +17 -0
- package/dist/serialization/resources/health/client/healthCheck.d.ts +9 -0
- package/dist/serialization/resources/health/client/healthCheck.js +41 -0
- package/dist/serialization/resources/health/client/index.d.ts +1 -0
- package/dist/serialization/resources/health/client/index.js +37 -0
- package/dist/serialization/resources/health/index.d.ts +1 -0
- package/dist/serialization/resources/health/index.js +17 -0
- package/dist/serialization/resources/index.d.ts +15 -0
- package/dist/serialization/resources/index.js +54 -0
- package/dist/serialization/resources/sources/client/index.d.ts +1 -0
- package/dist/serialization/resources/sources/client/index.js +37 -0
- package/dist/serialization/resources/sources/client/readSources.d.ts +11 -0
- package/dist/serialization/resources/sources/client/readSources.js +42 -0
- package/dist/serialization/resources/sources/index.d.ts +1 -0
- package/dist/serialization/resources/sources/index.js +17 -0
- package/dist/serialization/resources/sync/client/index.d.ts +2 -0
- package/dist/serialization/resources/sync/client/index.js +41 -0
- package/dist/serialization/resources/sync/client/listSyncJobs.d.ts +11 -0
- package/dist/serialization/resources/sync/client/listSyncJobs.js +42 -0
- package/dist/serialization/resources/sync/client/requests/SyncCreate.d.ts +21 -0
- package/dist/serialization/resources/sync/client/requests/SyncCreate.js +52 -0
- package/dist/serialization/resources/sync/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/sync/client/requests/index.js +5 -0
- package/dist/serialization/resources/sync/index.d.ts +2 -0
- package/dist/serialization/resources/sync/index.js +18 -0
- package/dist/serialization/resources/sync/types/ListSyncsSyncGetResponse.d.ts +12 -0
- package/dist/serialization/resources/sync/types/ListSyncsSyncGetResponse.js +46 -0
- package/dist/serialization/resources/sync/types/index.d.ts +1 -0
- package/dist/serialization/resources/sync/types/index.js +17 -0
- package/dist/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.d.ts +9 -0
- package/dist/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.js +41 -0
- package/dist/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.d.ts +9 -0
- package/dist/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.js +41 -0
- package/dist/serialization/resources/whiteLabels/client/index.d.ts +5 -0
- package/dist/serialization/resources/whiteLabels/client/index.js +44 -0
- package/dist/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.d.ts +11 -0
- package/dist/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.js +42 -0
- package/dist/serialization/resources/whiteLabels/client/listWhiteLabels.d.ts +11 -0
- package/dist/serialization/resources/whiteLabels/client/listWhiteLabels.js +42 -0
- package/dist/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +16 -0
- package/dist/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.js +47 -0
- package/dist/serialization/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +15 -0
- package/dist/serialization/resources/whiteLabels/client/requests/WhiteLabelUpdate.js +46 -0
- package/dist/serialization/resources/whiteLabels/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/whiteLabels/client/requests/index.js +7 -0
- package/dist/serialization/resources/whiteLabels/index.d.ts +1 -0
- package/dist/serialization/resources/whiteLabels/index.js +17 -0
- package/dist/serialization/types/ApiKey.d.ts +20 -0
- package/dist/serialization/types/ApiKey.js +51 -0
- package/dist/serialization/types/ApiKeyWithPlainKey.d.ts +21 -0
- package/dist/serialization/types/ApiKeyWithPlainKey.js +52 -0
- package/dist/serialization/types/AuthType.d.ts +10 -0
- package/dist/serialization/types/AuthType.js +49 -0
- package/dist/serialization/types/Chat.d.ts +25 -0
- package/dist/serialization/types/Chat.js +56 -0
- package/dist/serialization/types/ChatMessage.d.ts +21 -0
- package/dist/serialization/types/ChatMessage.js +52 -0
- package/dist/serialization/types/ConfigField.d.ts +15 -0
- package/dist/serialization/types/ConfigField.js +46 -0
- package/dist/serialization/types/Connection.d.ts +22 -0
- package/dist/serialization/types/Connection.js +53 -0
- package/dist/serialization/types/ConnectionStatus.d.ts +10 -0
- package/dist/serialization/types/ConnectionStatus.js +41 -0
- package/dist/serialization/types/Destination.d.ts +21 -0
- package/dist/serialization/types/Destination.js +52 -0
- package/dist/serialization/types/DestinationWithConfigFields.d.ts +23 -0
- package/dist/serialization/types/DestinationWithConfigFields.js +54 -0
- package/dist/serialization/types/EmbeddingModel.d.ts +23 -0
- package/dist/serialization/types/EmbeddingModel.js +54 -0
- package/dist/serialization/types/EmbeddingModelWithConfigFields.d.ts +25 -0
- package/dist/serialization/types/EmbeddingModelWithConfigFields.js +56 -0
- package/dist/serialization/types/Fields.d.ts +13 -0
- package/dist/serialization/types/Fields.js +44 -0
- package/dist/serialization/types/HttpValidationError.d.ts +13 -0
- package/dist/serialization/types/HttpValidationError.js +44 -0
- package/dist/serialization/types/IntegrationType.d.ts +10 -0
- package/dist/serialization/types/IntegrationType.js +41 -0
- package/dist/serialization/types/Source.d.ts +21 -0
- package/dist/serialization/types/Source.js +52 -0
- package/dist/serialization/types/Sync.d.ts +28 -0
- package/dist/serialization/types/Sync.js +59 -0
- package/dist/serialization/types/SyncJob.d.ts +28 -0
- package/dist/serialization/types/SyncJob.js +59 -0
- package/dist/serialization/types/SyncJobStatus.d.ts +10 -0
- package/dist/serialization/types/SyncJobStatus.js +41 -0
- package/dist/serialization/types/SyncStatus.d.ts +10 -0
- package/dist/serialization/types/SyncStatus.js +41 -0
- package/dist/serialization/types/SyncWithSourceConnection.d.ts +30 -0
- package/dist/serialization/types/SyncWithSourceConnection.js +61 -0
- package/dist/serialization/types/User.d.ts +16 -0
- package/dist/serialization/types/User.js +47 -0
- package/dist/serialization/types/ValidationError.d.ts +15 -0
- package/dist/serialization/types/ValidationError.js +46 -0
- package/dist/serialization/types/ValidationErrorLocItem.d.ts +10 -0
- package/dist/serialization/types/ValidationErrorLocItem.js +41 -0
- package/dist/serialization/types/WhiteLabel.d.ts +22 -0
- package/dist/serialization/types/WhiteLabel.js +53 -0
- package/dist/serialization/types/index.d.ts +25 -0
- package/dist/serialization/types/index.js +41 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/errors/AirweaveSDKError.d.ts +12 -0
- package/errors/AirweaveSDKError.js +32 -0
- package/errors/AirweaveSDKTimeoutError.d.ts +6 -0
- package/errors/AirweaveSDKTimeoutError.js +13 -0
- package/errors/index.d.ts +2 -0
- package/errors/index.js +7 -0
- package/index.d.ts +3 -0
- package/index.js +42 -1
- package/jest.config.js +5 -0
- package/package.json +41 -14
- package/reference.md +3177 -0
- package/serialization/index.d.ts +2 -0
- package/serialization/index.js +18 -0
- package/serialization/resources/apiKeys/client/index.d.ts +2 -0
- package/serialization/resources/apiKeys/client/index.js +41 -0
- package/serialization/resources/apiKeys/client/readApiKeys.d.ts +11 -0
- package/serialization/resources/apiKeys/client/readApiKeys.js +42 -0
- package/serialization/resources/apiKeys/client/requests/ApiKeyCreate.d.ts +12 -0
- package/serialization/resources/apiKeys/client/requests/ApiKeyCreate.js +43 -0
- package/serialization/resources/apiKeys/client/requests/index.d.ts +1 -0
- package/serialization/resources/apiKeys/client/requests/index.js +5 -0
- package/serialization/resources/apiKeys/index.d.ts +1 -0
- package/serialization/resources/apiKeys/index.js +17 -0
- package/serialization/resources/chat/client/index.d.ts +2 -0
- package/serialization/resources/chat/client/index.js +41 -0
- package/serialization/resources/chat/client/listChats.d.ts +11 -0
- package/serialization/resources/chat/client/listChats.js +42 -0
- package/serialization/resources/chat/client/requests/ChatCreate.d.ts +17 -0
- package/serialization/resources/chat/client/requests/ChatCreate.js +48 -0
- package/serialization/resources/chat/client/requests/ChatMessageCreate.d.ts +13 -0
- package/serialization/resources/chat/client/requests/ChatMessageCreate.js +44 -0
- package/serialization/resources/chat/client/requests/ChatUpdate.d.ts +15 -0
- package/serialization/resources/chat/client/requests/ChatUpdate.js +46 -0
- package/serialization/resources/chat/client/requests/index.d.ts +3 -0
- package/serialization/resources/chat/client/requests/index.js +9 -0
- package/serialization/resources/chat/index.d.ts +1 -0
- package/serialization/resources/chat/index.js +17 -0
- package/serialization/resources/connections/client/getConnectionCredentials.d.ts +9 -0
- package/serialization/resources/connections/client/getConnectionCredentials.js +41 -0
- package/serialization/resources/connections/client/getOauth2AuthUrl.d.ts +9 -0
- package/serialization/resources/connections/client/getOauth2AuthUrl.js +41 -0
- package/serialization/resources/connections/client/getOauth2WhiteLabelAuthUrl.d.ts +9 -0
- package/serialization/resources/connections/client/getOauth2WhiteLabelAuthUrl.js +41 -0
- package/serialization/resources/connections/client/index.d.ts +7 -0
- package/serialization/resources/connections/client/index.js +46 -0
- package/serialization/resources/connections/client/listAllConnectedIntegrations.d.ts +11 -0
- package/serialization/resources/connections/client/listAllConnectedIntegrations.js +42 -0
- package/serialization/resources/connections/client/listConnectedIntegrations.d.ts +11 -0
- package/serialization/resources/connections/client/listConnectedIntegrations.js +42 -0
- package/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +13 -0
- package/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +44 -0
- package/serialization/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +13 -0
- package/serialization/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +44 -0
- package/serialization/resources/connections/client/requests/index.d.ts +2 -0
- package/serialization/resources/connections/client/requests/index.js +7 -0
- package/serialization/resources/connections/client/sendOauth2WhiteLabelCode.d.ts +9 -0
- package/serialization/resources/connections/client/sendOauth2WhiteLabelCode.js +41 -0
- package/serialization/resources/connections/index.d.ts +1 -0
- package/serialization/resources/connections/index.js +17 -0
- package/serialization/resources/destinations/client/index.d.ts +1 -0
- package/serialization/resources/destinations/client/index.js +37 -0
- package/serialization/resources/destinations/client/listDestinations.d.ts +11 -0
- package/serialization/resources/destinations/client/listDestinations.js +42 -0
- package/serialization/resources/destinations/index.d.ts +1 -0
- package/serialization/resources/destinations/index.js +17 -0
- package/serialization/resources/embeddingModels/client/index.d.ts +1 -0
- package/serialization/resources/embeddingModels/client/index.js +37 -0
- package/serialization/resources/embeddingModels/client/readEmbeddingModels.d.ts +11 -0
- package/serialization/resources/embeddingModels/client/readEmbeddingModels.js +42 -0
- package/serialization/resources/embeddingModels/index.d.ts +1 -0
- package/serialization/resources/embeddingModels/index.js +17 -0
- package/serialization/resources/health/client/healthCheck.d.ts +9 -0
- package/serialization/resources/health/client/healthCheck.js +41 -0
- package/serialization/resources/health/client/index.d.ts +1 -0
- package/serialization/resources/health/client/index.js +37 -0
- package/serialization/resources/health/index.d.ts +1 -0
- package/serialization/resources/health/index.js +17 -0
- package/serialization/resources/index.d.ts +15 -0
- package/serialization/resources/index.js +54 -0
- package/serialization/resources/sources/client/index.d.ts +1 -0
- package/serialization/resources/sources/client/index.js +37 -0
- package/serialization/resources/sources/client/readSources.d.ts +11 -0
- package/serialization/resources/sources/client/readSources.js +42 -0
- package/serialization/resources/sources/index.d.ts +1 -0
- package/serialization/resources/sources/index.js +17 -0
- package/serialization/resources/sync/client/index.d.ts +2 -0
- package/serialization/resources/sync/client/index.js +41 -0
- package/serialization/resources/sync/client/listSyncJobs.d.ts +11 -0
- package/serialization/resources/sync/client/listSyncJobs.js +42 -0
- package/serialization/resources/sync/client/requests/SyncCreate.d.ts +21 -0
- package/serialization/resources/sync/client/requests/SyncCreate.js +52 -0
- package/serialization/resources/sync/client/requests/index.d.ts +1 -0
- package/serialization/resources/sync/client/requests/index.js +5 -0
- package/serialization/resources/sync/index.d.ts +2 -0
- package/serialization/resources/sync/index.js +18 -0
- package/serialization/resources/sync/types/ListSyncsSyncGetResponse.d.ts +12 -0
- package/serialization/resources/sync/types/ListSyncsSyncGetResponse.js +46 -0
- package/serialization/resources/sync/types/index.d.ts +1 -0
- package/serialization/resources/sync/types/index.js +17 -0
- package/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.d.ts +9 -0
- package/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.js +41 -0
- package/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.d.ts +9 -0
- package/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.js +41 -0
- package/serialization/resources/whiteLabels/client/index.d.ts +5 -0
- package/serialization/resources/whiteLabels/client/index.js +44 -0
- package/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.d.ts +11 -0
- package/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.js +42 -0
- package/serialization/resources/whiteLabels/client/listWhiteLabels.d.ts +11 -0
- package/serialization/resources/whiteLabels/client/listWhiteLabels.js +42 -0
- package/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +16 -0
- package/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.js +47 -0
- package/serialization/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +15 -0
- package/serialization/resources/whiteLabels/client/requests/WhiteLabelUpdate.js +46 -0
- package/serialization/resources/whiteLabels/client/requests/index.d.ts +2 -0
- package/serialization/resources/whiteLabels/client/requests/index.js +7 -0
- package/serialization/resources/whiteLabels/index.d.ts +1 -0
- package/serialization/resources/whiteLabels/index.js +17 -0
- package/serialization/types/ApiKey.d.ts +20 -0
- package/serialization/types/ApiKey.js +51 -0
- package/serialization/types/ApiKeyWithPlainKey.d.ts +21 -0
- package/serialization/types/ApiKeyWithPlainKey.js +52 -0
- package/serialization/types/AuthType.d.ts +10 -0
- package/serialization/types/AuthType.js +49 -0
- package/serialization/types/Chat.d.ts +25 -0
- package/serialization/types/Chat.js +56 -0
- package/serialization/types/ChatMessage.d.ts +21 -0
- package/serialization/types/ChatMessage.js +52 -0
- package/serialization/types/ConfigField.d.ts +15 -0
- package/serialization/types/ConfigField.js +46 -0
- package/serialization/types/Connection.d.ts +22 -0
- package/serialization/types/Connection.js +53 -0
- package/serialization/types/ConnectionStatus.d.ts +10 -0
- package/serialization/types/ConnectionStatus.js +41 -0
- package/serialization/types/Destination.d.ts +21 -0
- package/serialization/types/Destination.js +52 -0
- package/serialization/types/DestinationWithConfigFields.d.ts +23 -0
- package/serialization/types/DestinationWithConfigFields.js +54 -0
- package/serialization/types/EmbeddingModel.d.ts +23 -0
- package/serialization/types/EmbeddingModel.js +54 -0
- package/serialization/types/EmbeddingModelWithConfigFields.d.ts +25 -0
- package/serialization/types/EmbeddingModelWithConfigFields.js +56 -0
- package/serialization/types/Fields.d.ts +13 -0
- package/serialization/types/Fields.js +44 -0
- package/serialization/types/HttpValidationError.d.ts +13 -0
- package/serialization/types/HttpValidationError.js +44 -0
- package/serialization/types/IntegrationType.d.ts +10 -0
- package/serialization/types/IntegrationType.js +41 -0
- package/serialization/types/Source.d.ts +21 -0
- package/serialization/types/Source.js +52 -0
- package/serialization/types/Sync.d.ts +28 -0
- package/serialization/types/Sync.js +59 -0
- package/serialization/types/SyncJob.d.ts +28 -0
- package/serialization/types/SyncJob.js +59 -0
- package/serialization/types/SyncJobStatus.d.ts +10 -0
- package/serialization/types/SyncJobStatus.js +41 -0
- package/serialization/types/SyncStatus.d.ts +10 -0
- package/serialization/types/SyncStatus.js +41 -0
- package/serialization/types/SyncWithSourceConnection.d.ts +30 -0
- package/serialization/types/SyncWithSourceConnection.js +61 -0
- package/serialization/types/User.d.ts +16 -0
- package/serialization/types/User.js +47 -0
- package/serialization/types/ValidationError.d.ts +15 -0
- package/serialization/types/ValidationError.js +46 -0
- package/serialization/types/ValidationErrorLocItem.d.ts +10 -0
- package/serialization/types/ValidationErrorLocItem.js +41 -0
- package/serialization/types/WhiteLabel.d.ts +22 -0
- package/serialization/types/WhiteLabel.js +53 -0
- package/serialization/types/index.d.ts +25 -0
- package/serialization/types/index.js +41 -0
- package/version.d.ts +1 -0
- package/version.js +4 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type EventCallback = (data?: any) => void;
|
|
2
|
+
export interface StreamWrapper<WritableStream, ReadFormat> {
|
|
3
|
+
setEncoding(encoding?: string): void;
|
|
4
|
+
on(event: string, callback: EventCallback): void;
|
|
5
|
+
off(event: string, callback: EventCallback): void;
|
|
6
|
+
pipe(dest: WritableStream): WritableStream;
|
|
7
|
+
pipeTo(dest: WritableStream): WritableStream;
|
|
8
|
+
unpipe(dest?: WritableStream): void;
|
|
9
|
+
destroy(error?: Error): void;
|
|
10
|
+
pause(): void;
|
|
11
|
+
resume(): void;
|
|
12
|
+
get isPaused(): boolean;
|
|
13
|
+
read(): Promise<ReadFormat | undefined>;
|
|
14
|
+
text(): Promise<string>;
|
|
15
|
+
json<T>(): Promise<T>;
|
|
16
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<ReadFormat>;
|
|
17
|
+
}
|
|
18
|
+
export declare function chooseStreamWrapper(responseBody: any): Promise<Promise<StreamWrapper<any, any>>>;
|
|
@@ -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 () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.chooseStreamWrapper = chooseStreamWrapper;
|
|
46
|
+
const runtime_1 = require("../../runtime");
|
|
47
|
+
function chooseStreamWrapper(responseBody) {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
if (runtime_1.RUNTIME.type === "node" && runtime_1.RUNTIME.parsedVersion != null && runtime_1.RUNTIME.parsedVersion >= 18) {
|
|
50
|
+
return new (yield Promise.resolve().then(() => __importStar(require("./Node18UniversalStreamWrapper")))).Node18UniversalStreamWrapper(responseBody);
|
|
51
|
+
}
|
|
52
|
+
else if (runtime_1.RUNTIME.type !== "node" && typeof fetch === "function") {
|
|
53
|
+
return new (yield Promise.resolve().then(() => __importStar(require("./UndiciStreamWrapper")))).UndiciStreamWrapper(responseBody);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
return new (yield Promise.resolve().then(() => __importStar(require("./NodePre18StreamWrapper")))).NodePre18StreamWrapper(responseBody);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
+
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.serialization = void 0;
|
|
40
|
+
__exportStar(require("./fetcher"), exports);
|
|
41
|
+
__exportStar(require("./runtime"), exports);
|
|
42
|
+
exports.serialization = __importStar(require("./schemas"));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RUNTIME } from "./runtime";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A constant that indicates which environment and version the SDK is running in.
|
|
3
|
+
*/
|
|
4
|
+
export declare const RUNTIME: Runtime;
|
|
5
|
+
export interface Runtime {
|
|
6
|
+
type: "browser" | "web-worker" | "deno" | "bun" | "node" | "react-native" | "unknown" | "workerd";
|
|
7
|
+
version?: string;
|
|
8
|
+
parsedVersion?: number;
|
|
9
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a, _b, _c, _d, _e;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.RUNTIME = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* A constant that indicates whether the environment the code is running is a Web Browser.
|
|
7
|
+
*/
|
|
8
|
+
const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
9
|
+
/**
|
|
10
|
+
* A constant that indicates whether the environment the code is running is a Web Worker.
|
|
11
|
+
*/
|
|
12
|
+
const isWebWorker = typeof self === "object" &&
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" &&
|
|
15
|
+
(((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" ||
|
|
16
|
+
((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "ServiceWorkerGlobalScope" ||
|
|
17
|
+
((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "SharedWorkerGlobalScope");
|
|
18
|
+
/**
|
|
19
|
+
* A constant that indicates whether the environment the code is running is Deno.
|
|
20
|
+
*/
|
|
21
|
+
const isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined";
|
|
22
|
+
/**
|
|
23
|
+
* A constant that indicates whether the environment the code is running is Bun.sh.
|
|
24
|
+
*/
|
|
25
|
+
const isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined";
|
|
26
|
+
/**
|
|
27
|
+
* A constant that indicates whether the environment the code is running is Node.JS.
|
|
28
|
+
*/
|
|
29
|
+
const isNode = typeof process !== "undefined" &&
|
|
30
|
+
Boolean(process.version) &&
|
|
31
|
+
Boolean((_d = process.versions) === null || _d === void 0 ? void 0 : _d.node) &&
|
|
32
|
+
// Deno spoofs process.versions.node, see https://deno.land/std@0.177.0/node/process.ts?s=versions
|
|
33
|
+
!isDeno &&
|
|
34
|
+
!isBun;
|
|
35
|
+
/**
|
|
36
|
+
* A constant that indicates whether the environment the code is running is in React-Native.
|
|
37
|
+
* https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js
|
|
38
|
+
*/
|
|
39
|
+
const isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative";
|
|
40
|
+
/**
|
|
41
|
+
* A constant that indicates whether the environment the code is running is Cloudflare.
|
|
42
|
+
* https://developers.cloudflare.com/workers/runtime-apis/web-standards/#navigatoruseragent
|
|
43
|
+
*/
|
|
44
|
+
const isCloudflare = typeof globalThis !== "undefined" && ((_e = globalThis === null || globalThis === void 0 ? void 0 : globalThis.navigator) === null || _e === void 0 ? void 0 : _e.userAgent) === "Cloudflare-Workers";
|
|
45
|
+
/**
|
|
46
|
+
* A constant that indicates which environment and version the SDK is running in.
|
|
47
|
+
*/
|
|
48
|
+
exports.RUNTIME = evaluateRuntime();
|
|
49
|
+
function evaluateRuntime() {
|
|
50
|
+
if (isBrowser) {
|
|
51
|
+
return {
|
|
52
|
+
type: "browser",
|
|
53
|
+
version: window.navigator.userAgent,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
if (isCloudflare) {
|
|
57
|
+
return {
|
|
58
|
+
type: "workerd",
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
if (isWebWorker) {
|
|
62
|
+
return {
|
|
63
|
+
type: "web-worker",
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
if (isDeno) {
|
|
67
|
+
return {
|
|
68
|
+
type: "deno",
|
|
69
|
+
version: Deno.version.deno,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
if (isBun) {
|
|
73
|
+
return {
|
|
74
|
+
type: "bun",
|
|
75
|
+
version: Bun.version,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
if (isNode) {
|
|
79
|
+
return {
|
|
80
|
+
type: "node",
|
|
81
|
+
version: process.versions.node,
|
|
82
|
+
parsedVersion: Number(process.versions.node.split(".")[0]),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
if (isReactNative) {
|
|
86
|
+
return {
|
|
87
|
+
type: "react-native",
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
type: "unknown",
|
|
92
|
+
};
|
|
93
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { SchemaUtils } from "./builders";
|
|
2
|
+
export type Schema<Raw = unknown, Parsed = unknown> = BaseSchema<Raw, Parsed> & SchemaUtils<Raw, Parsed>;
|
|
3
|
+
export type inferRaw<S extends Schema> = S extends Schema<infer Raw, any> ? Raw : never;
|
|
4
|
+
export type inferParsed<S extends Schema> = S extends Schema<any, infer Parsed> ? Parsed : never;
|
|
5
|
+
export interface BaseSchema<Raw, Parsed> {
|
|
6
|
+
parse: (raw: unknown, opts?: SchemaOptions) => MaybeValid<Parsed>;
|
|
7
|
+
json: (parsed: unknown, opts?: SchemaOptions) => MaybeValid<Raw>;
|
|
8
|
+
getType: () => SchemaType | SchemaType;
|
|
9
|
+
}
|
|
10
|
+
export declare const SchemaType: {
|
|
11
|
+
readonly BIGINT: "bigint";
|
|
12
|
+
readonly DATE: "date";
|
|
13
|
+
readonly ENUM: "enum";
|
|
14
|
+
readonly LIST: "list";
|
|
15
|
+
readonly STRING_LITERAL: "stringLiteral";
|
|
16
|
+
readonly BOOLEAN_LITERAL: "booleanLiteral";
|
|
17
|
+
readonly OBJECT: "object";
|
|
18
|
+
readonly ANY: "any";
|
|
19
|
+
readonly BOOLEAN: "boolean";
|
|
20
|
+
readonly NUMBER: "number";
|
|
21
|
+
readonly STRING: "string";
|
|
22
|
+
readonly UNKNOWN: "unknown";
|
|
23
|
+
readonly RECORD: "record";
|
|
24
|
+
readonly SET: "set";
|
|
25
|
+
readonly UNION: "union";
|
|
26
|
+
readonly UNDISCRIMINATED_UNION: "undiscriminatedUnion";
|
|
27
|
+
readonly OPTIONAL: "optional";
|
|
28
|
+
};
|
|
29
|
+
export type SchemaType = (typeof SchemaType)[keyof typeof SchemaType];
|
|
30
|
+
export type MaybeValid<T> = Valid<T> | Invalid;
|
|
31
|
+
export interface Valid<T> {
|
|
32
|
+
ok: true;
|
|
33
|
+
value: T;
|
|
34
|
+
}
|
|
35
|
+
export interface Invalid {
|
|
36
|
+
ok: false;
|
|
37
|
+
errors: ValidationError[];
|
|
38
|
+
}
|
|
39
|
+
export interface ValidationError {
|
|
40
|
+
path: string[];
|
|
41
|
+
message: string;
|
|
42
|
+
}
|
|
43
|
+
export interface SchemaOptions {
|
|
44
|
+
/**
|
|
45
|
+
* how to handle unrecognized keys in objects
|
|
46
|
+
*
|
|
47
|
+
* @default "fail"
|
|
48
|
+
*/
|
|
49
|
+
unrecognizedObjectKeys?: "fail" | "passthrough" | "strip";
|
|
50
|
+
/**
|
|
51
|
+
* whether to fail when an unrecognized discriminant value is
|
|
52
|
+
* encountered in a union
|
|
53
|
+
*
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
56
|
+
allowUnrecognizedUnionMembers?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* whether to fail when an unrecognized enum value is encountered
|
|
59
|
+
*
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
62
|
+
allowUnrecognizedEnumValues?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* whether to allow data that doesn't conform to the schema.
|
|
65
|
+
* invalid data is passed through without transformation.
|
|
66
|
+
*
|
|
67
|
+
* when this is enabled, .parse() and .json() will always
|
|
68
|
+
* return `ok: true`. `.parseOrThrow()` and `.jsonOrThrow()`
|
|
69
|
+
* will never fail.
|
|
70
|
+
*
|
|
71
|
+
* @default false
|
|
72
|
+
*/
|
|
73
|
+
skipValidation?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* each validation failure contains a "path" property, which is
|
|
76
|
+
* the breadcrumbs to the offending node in the JSON. you can supply
|
|
77
|
+
* a prefix that is prepended to all the errors' paths. this can be
|
|
78
|
+
* helpful for zurg's internal debug logging.
|
|
79
|
+
*/
|
|
80
|
+
breadcrumbsPrefix?: string[];
|
|
81
|
+
/**
|
|
82
|
+
* whether to send 'null' for optional properties explicitly set to 'undefined'.
|
|
83
|
+
*/
|
|
84
|
+
omitUndefined?: boolean;
|
|
85
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SchemaType = void 0;
|
|
4
|
+
exports.SchemaType = {
|
|
5
|
+
BIGINT: "bigint",
|
|
6
|
+
DATE: "date",
|
|
7
|
+
ENUM: "enum",
|
|
8
|
+
LIST: "list",
|
|
9
|
+
STRING_LITERAL: "stringLiteral",
|
|
10
|
+
BOOLEAN_LITERAL: "booleanLiteral",
|
|
11
|
+
OBJECT: "object",
|
|
12
|
+
ANY: "any",
|
|
13
|
+
BOOLEAN: "boolean",
|
|
14
|
+
NUMBER: "number",
|
|
15
|
+
STRING: "string",
|
|
16
|
+
UNKNOWN: "unknown",
|
|
17
|
+
RECORD: "record",
|
|
18
|
+
SET: "set",
|
|
19
|
+
UNION: "union",
|
|
20
|
+
UNDISCRIMINATED_UNION: "undiscriminatedUnion",
|
|
21
|
+
OPTIONAL: "optional",
|
|
22
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bigint = bigint;
|
|
4
|
+
const Schema_1 = require("../../Schema");
|
|
5
|
+
const getErrorMessageForIncorrectType_1 = require("../../utils/getErrorMessageForIncorrectType");
|
|
6
|
+
const maybeSkipValidation_1 = require("../../utils/maybeSkipValidation");
|
|
7
|
+
const schema_utils_1 = require("../schema-utils");
|
|
8
|
+
function bigint() {
|
|
9
|
+
const baseSchema = {
|
|
10
|
+
parse: (raw, { breadcrumbsPrefix = [] } = {}) => {
|
|
11
|
+
if (typeof raw !== "string") {
|
|
12
|
+
return {
|
|
13
|
+
ok: false,
|
|
14
|
+
errors: [
|
|
15
|
+
{
|
|
16
|
+
path: breadcrumbsPrefix,
|
|
17
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(raw, "string"),
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
ok: true,
|
|
24
|
+
value: BigInt(raw),
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
json: (bigint, { breadcrumbsPrefix = [] } = {}) => {
|
|
28
|
+
if (typeof bigint === "bigint") {
|
|
29
|
+
return {
|
|
30
|
+
ok: true,
|
|
31
|
+
value: bigint.toString(),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
return {
|
|
36
|
+
ok: false,
|
|
37
|
+
errors: [
|
|
38
|
+
{
|
|
39
|
+
path: breadcrumbsPrefix,
|
|
40
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(bigint, "bigint"),
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
getType: () => Schema_1.SchemaType.BIGINT,
|
|
47
|
+
};
|
|
48
|
+
return Object.assign(Object.assign({}, (0, maybeSkipValidation_1.maybeSkipValidation)(baseSchema)), (0, schema_utils_1.getSchemaUtils)(baseSchema));
|
|
49
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { bigint } from "./bigint";
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.date = date;
|
|
4
|
+
const Schema_1 = require("../../Schema");
|
|
5
|
+
const getErrorMessageForIncorrectType_1 = require("../../utils/getErrorMessageForIncorrectType");
|
|
6
|
+
const maybeSkipValidation_1 = require("../../utils/maybeSkipValidation");
|
|
7
|
+
const schema_utils_1 = require("../schema-utils");
|
|
8
|
+
// https://stackoverflow.com/questions/12756159/regex-and-iso8601-formatted-datetime
|
|
9
|
+
const ISO_8601_REGEX = /^([+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([.,]\d+(?!:))?)?(\17[0-5]\d([.,]\d+)?)?([zZ]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/;
|
|
10
|
+
function date() {
|
|
11
|
+
const baseSchema = {
|
|
12
|
+
parse: (raw, { breadcrumbsPrefix = [] } = {}) => {
|
|
13
|
+
if (typeof raw !== "string") {
|
|
14
|
+
return {
|
|
15
|
+
ok: false,
|
|
16
|
+
errors: [
|
|
17
|
+
{
|
|
18
|
+
path: breadcrumbsPrefix,
|
|
19
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(raw, "string"),
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
if (!ISO_8601_REGEX.test(raw)) {
|
|
25
|
+
return {
|
|
26
|
+
ok: false,
|
|
27
|
+
errors: [
|
|
28
|
+
{
|
|
29
|
+
path: breadcrumbsPrefix,
|
|
30
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(raw, "ISO 8601 date string"),
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
ok: true,
|
|
37
|
+
value: new Date(raw),
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
json: (date, { breadcrumbsPrefix = [] } = {}) => {
|
|
41
|
+
if (date instanceof Date) {
|
|
42
|
+
return {
|
|
43
|
+
ok: true,
|
|
44
|
+
value: date.toISOString(),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
return {
|
|
49
|
+
ok: false,
|
|
50
|
+
errors: [
|
|
51
|
+
{
|
|
52
|
+
path: breadcrumbsPrefix,
|
|
53
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(date, "Date object"),
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
getType: () => Schema_1.SchemaType.DATE,
|
|
60
|
+
};
|
|
61
|
+
return Object.assign(Object.assign({}, (0, maybeSkipValidation_1.maybeSkipValidation)(baseSchema)), (0, schema_utils_1.getSchemaUtils)(baseSchema));
|
|
62
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { date } from "./date";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.enum_ = enum_;
|
|
4
|
+
const Schema_1 = require("../../Schema");
|
|
5
|
+
const createIdentitySchemaCreator_1 = require("../../utils/createIdentitySchemaCreator");
|
|
6
|
+
const getErrorMessageForIncorrectType_1 = require("../../utils/getErrorMessageForIncorrectType");
|
|
7
|
+
function enum_(values) {
|
|
8
|
+
const validValues = new Set(values);
|
|
9
|
+
const schemaCreator = (0, createIdentitySchemaCreator_1.createIdentitySchemaCreator)(Schema_1.SchemaType.ENUM, (value, { allowUnrecognizedEnumValues, breadcrumbsPrefix = [] } = {}) => {
|
|
10
|
+
if (typeof value !== "string") {
|
|
11
|
+
return {
|
|
12
|
+
ok: false,
|
|
13
|
+
errors: [
|
|
14
|
+
{
|
|
15
|
+
path: breadcrumbsPrefix,
|
|
16
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(value, "string"),
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
if (!validValues.has(value) && !allowUnrecognizedEnumValues) {
|
|
22
|
+
return {
|
|
23
|
+
ok: false,
|
|
24
|
+
errors: [
|
|
25
|
+
{
|
|
26
|
+
path: breadcrumbsPrefix,
|
|
27
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(value, "enum"),
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
ok: true,
|
|
34
|
+
value: value,
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
return schemaCreator();
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { enum_ } from "./enum";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from "./bigint";
|
|
2
|
+
export * from "./date";
|
|
3
|
+
export * from "./enum";
|
|
4
|
+
export * from "./lazy";
|
|
5
|
+
export * from "./list";
|
|
6
|
+
export * from "./literals";
|
|
7
|
+
export * from "./object";
|
|
8
|
+
export * from "./object-like";
|
|
9
|
+
export * from "./primitives";
|
|
10
|
+
export * from "./record";
|
|
11
|
+
export * from "./schema-utils";
|
|
12
|
+
export * from "./set";
|
|
13
|
+
export * from "./undiscriminated-union";
|
|
14
|
+
export * from "./union";
|
|
@@ -0,0 +1,30 @@
|
|
|
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("./bigint"), exports);
|
|
18
|
+
__exportStar(require("./date"), exports);
|
|
19
|
+
__exportStar(require("./enum"), exports);
|
|
20
|
+
__exportStar(require("./lazy"), exports);
|
|
21
|
+
__exportStar(require("./list"), exports);
|
|
22
|
+
__exportStar(require("./literals"), exports);
|
|
23
|
+
__exportStar(require("./object"), exports);
|
|
24
|
+
__exportStar(require("./object-like"), exports);
|
|
25
|
+
__exportStar(require("./primitives"), exports);
|
|
26
|
+
__exportStar(require("./record"), exports);
|
|
27
|
+
__exportStar(require("./schema-utils"), exports);
|
|
28
|
+
__exportStar(require("./set"), exports);
|
|
29
|
+
__exportStar(require("./undiscriminated-union"), exports);
|
|
30
|
+
__exportStar(require("./union"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.lazyObject = exports.lazy = void 0;
|
|
4
|
+
var lazy_1 = require("./lazy");
|
|
5
|
+
Object.defineProperty(exports, "lazy", { enumerable: true, get: function () { return lazy_1.lazy; } });
|
|
6
|
+
var lazyObject_1 = require("./lazyObject");
|
|
7
|
+
Object.defineProperty(exports, "lazyObject", { enumerable: true, get: function () { return lazyObject_1.lazyObject; } });
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BaseSchema, Schema } from "../../Schema";
|
|
2
|
+
export type SchemaGetter<SchemaType extends Schema<any, any>> = () => SchemaType;
|
|
3
|
+
export declare function lazy<Raw, Parsed>(getter: SchemaGetter<Schema<Raw, Parsed>>): Schema<Raw, Parsed>;
|
|
4
|
+
export declare function constructLazyBaseSchema<Raw, Parsed>(getter: SchemaGetter<Schema<Raw, Parsed>>): BaseSchema<Raw, Parsed>;
|
|
5
|
+
export declare function getMemoizedSchema<SchemaType extends Schema<any, any>>(getter: SchemaGetter<SchemaType>): SchemaType;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.lazy = lazy;
|
|
4
|
+
exports.constructLazyBaseSchema = constructLazyBaseSchema;
|
|
5
|
+
exports.getMemoizedSchema = getMemoizedSchema;
|
|
6
|
+
const schema_utils_1 = require("../schema-utils");
|
|
7
|
+
function lazy(getter) {
|
|
8
|
+
const baseSchema = constructLazyBaseSchema(getter);
|
|
9
|
+
return Object.assign(Object.assign({}, baseSchema), (0, schema_utils_1.getSchemaUtils)(baseSchema));
|
|
10
|
+
}
|
|
11
|
+
function constructLazyBaseSchema(getter) {
|
|
12
|
+
return {
|
|
13
|
+
parse: (raw, opts) => getMemoizedSchema(getter).parse(raw, opts),
|
|
14
|
+
json: (parsed, opts) => getMemoizedSchema(getter).json(parsed, opts),
|
|
15
|
+
getType: () => getMemoizedSchema(getter).getType(),
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function getMemoizedSchema(getter) {
|
|
19
|
+
const castedGetter = getter;
|
|
20
|
+
if (castedGetter.__zurg_memoized == null) {
|
|
21
|
+
castedGetter.__zurg_memoized = getter();
|
|
22
|
+
}
|
|
23
|
+
return castedGetter.__zurg_memoized;
|
|
24
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.lazyObject = lazyObject;
|
|
4
|
+
const object_1 = require("../object");
|
|
5
|
+
const object_like_1 = require("../object-like");
|
|
6
|
+
const schema_utils_1 = require("../schema-utils");
|
|
7
|
+
const lazy_1 = require("./lazy");
|
|
8
|
+
function lazyObject(getter) {
|
|
9
|
+
const baseSchema = Object.assign(Object.assign({}, (0, lazy_1.constructLazyBaseSchema)(getter)), { _getRawProperties: () => (0, lazy_1.getMemoizedSchema)(getter)._getRawProperties(), _getParsedProperties: () => (0, lazy_1.getMemoizedSchema)(getter)._getParsedProperties() });
|
|
10
|
+
return Object.assign(Object.assign(Object.assign(Object.assign({}, baseSchema), (0, schema_utils_1.getSchemaUtils)(baseSchema)), (0, object_like_1.getObjectLikeUtils)(baseSchema)), (0, object_1.getObjectUtils)(baseSchema));
|
|
11
|
+
}
|