@airweave/sdk 0.1.0 → 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,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Schema for WhiteLabel.
|
|
6
|
+
*/
|
|
7
|
+
export interface WhiteLabel {
|
|
8
|
+
name: string;
|
|
9
|
+
sourceId: string;
|
|
10
|
+
redirectUrl: string;
|
|
11
|
+
clientId: string;
|
|
12
|
+
clientSecret: string;
|
|
13
|
+
id: string;
|
|
14
|
+
organizationId: string;
|
|
15
|
+
createdAt: Date;
|
|
16
|
+
modifiedAt: Date;
|
|
17
|
+
createdByEmail: string;
|
|
18
|
+
modifiedByEmail: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export * from "./ApiKey";
|
|
2
|
+
export * from "./ApiKeyWithPlainKey";
|
|
3
|
+
export * from "./AuthType";
|
|
4
|
+
export * from "./Chat";
|
|
5
|
+
export * from "./ChatMessage";
|
|
6
|
+
export * from "./ConfigField";
|
|
7
|
+
export * from "./Connection";
|
|
8
|
+
export * from "./ConnectionStatus";
|
|
9
|
+
export * from "./Destination";
|
|
10
|
+
export * from "./DestinationWithConfigFields";
|
|
11
|
+
export * from "./EmbeddingModel";
|
|
12
|
+
export * from "./EmbeddingModelWithConfigFields";
|
|
13
|
+
export * from "./Fields";
|
|
14
|
+
export * from "./HttpValidationError";
|
|
15
|
+
export * from "./IntegrationType";
|
|
16
|
+
export * from "./Source";
|
|
17
|
+
export * from "./Sync";
|
|
18
|
+
export * from "./SyncJob";
|
|
19
|
+
export * from "./SyncJobStatus";
|
|
20
|
+
export * from "./SyncStatus";
|
|
21
|
+
export * from "./SyncWithSourceConnection";
|
|
22
|
+
export * from "./User";
|
|
23
|
+
export * from "./ValidationErrorLocItem";
|
|
24
|
+
export * from "./ValidationError";
|
|
25
|
+
export * from "./WhiteLabel";
|
|
@@ -0,0 +1,41 @@
|
|
|
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("./ApiKey"), exports);
|
|
18
|
+
__exportStar(require("./ApiKeyWithPlainKey"), exports);
|
|
19
|
+
__exportStar(require("./AuthType"), exports);
|
|
20
|
+
__exportStar(require("./Chat"), exports);
|
|
21
|
+
__exportStar(require("./ChatMessage"), exports);
|
|
22
|
+
__exportStar(require("./ConfigField"), exports);
|
|
23
|
+
__exportStar(require("./Connection"), exports);
|
|
24
|
+
__exportStar(require("./ConnectionStatus"), exports);
|
|
25
|
+
__exportStar(require("./Destination"), exports);
|
|
26
|
+
__exportStar(require("./DestinationWithConfigFields"), exports);
|
|
27
|
+
__exportStar(require("./EmbeddingModel"), exports);
|
|
28
|
+
__exportStar(require("./EmbeddingModelWithConfigFields"), exports);
|
|
29
|
+
__exportStar(require("./Fields"), exports);
|
|
30
|
+
__exportStar(require("./HttpValidationError"), exports);
|
|
31
|
+
__exportStar(require("./IntegrationType"), exports);
|
|
32
|
+
__exportStar(require("./Source"), exports);
|
|
33
|
+
__exportStar(require("./Sync"), exports);
|
|
34
|
+
__exportStar(require("./SyncJob"), exports);
|
|
35
|
+
__exportStar(require("./SyncJobStatus"), exports);
|
|
36
|
+
__exportStar(require("./SyncStatus"), exports);
|
|
37
|
+
__exportStar(require("./SyncWithSourceConnection"), exports);
|
|
38
|
+
__exportStar(require("./User"), exports);
|
|
39
|
+
__exportStar(require("./ValidationErrorLocItem"), exports);
|
|
40
|
+
__exportStar(require("./ValidationError"), exports);
|
|
41
|
+
__exportStar(require("./WhiteLabel"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export 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 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" | "arrayBuffer";
|
|
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 = void 0;
|
|
13
|
+
exports.fetcherImpl = fetcherImpl;
|
|
14
|
+
const createRequestUrl_1 = require("./createRequestUrl");
|
|
15
|
+
const getFetchFn_1 = require("./getFetchFn");
|
|
16
|
+
const getRequestBody_1 = require("./getRequestBody");
|
|
17
|
+
const getResponseBody_1 = require("./getResponseBody");
|
|
18
|
+
const makeRequest_1 = require("./makeRequest");
|
|
19
|
+
const requestWithRetries_1 = require("./requestWithRetries");
|
|
20
|
+
function fetcherImpl(args) {
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const headers = {};
|
|
23
|
+
if (args.body !== undefined && args.contentType != null) {
|
|
24
|
+
headers["Content-Type"] = args.contentType;
|
|
25
|
+
}
|
|
26
|
+
if (args.headers != null) {
|
|
27
|
+
for (const [key, value] of Object.entries(args.headers)) {
|
|
28
|
+
if (value != null) {
|
|
29
|
+
headers[key] = value;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
const url = (0, createRequestUrl_1.createRequestUrl)(args.url, args.queryParameters);
|
|
34
|
+
let requestBody = yield (0, getRequestBody_1.getRequestBody)({
|
|
35
|
+
body: args.body,
|
|
36
|
+
type: args.requestType === "json" ? "json" : "other",
|
|
37
|
+
});
|
|
38
|
+
const fetchFn = yield (0, getFetchFn_1.getFetchFn)();
|
|
39
|
+
try {
|
|
40
|
+
const response = yield (0, requestWithRetries_1.requestWithRetries)(() => __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
return (0, makeRequest_1.makeRequest)(fetchFn, url, args.method, headers, requestBody, args.timeoutMs, args.abortSignal, args.withCredentials, args.duplex);
|
|
42
|
+
}), args.maxRetries);
|
|
43
|
+
let responseBody = yield (0, getResponseBody_1.getResponseBody)(response, args.responseType);
|
|
44
|
+
if (response.status >= 200 && response.status < 400) {
|
|
45
|
+
return {
|
|
46
|
+
ok: true,
|
|
47
|
+
body: responseBody,
|
|
48
|
+
headers: response.headers,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
return {
|
|
53
|
+
ok: false,
|
|
54
|
+
error: {
|
|
55
|
+
reason: "status-code",
|
|
56
|
+
statusCode: response.status,
|
|
57
|
+
body: responseBody,
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
if (args.abortSignal != null && args.abortSignal.aborted) {
|
|
64
|
+
return {
|
|
65
|
+
ok: false,
|
|
66
|
+
error: {
|
|
67
|
+
reason: "unknown",
|
|
68
|
+
errorMessage: "The user aborted a request",
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
else if (error instanceof Error && error.name === "AbortError") {
|
|
73
|
+
return {
|
|
74
|
+
ok: false,
|
|
75
|
+
error: {
|
|
76
|
+
reason: "timeout",
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
else if (error instanceof Error) {
|
|
81
|
+
return {
|
|
82
|
+
ok: false,
|
|
83
|
+
error: {
|
|
84
|
+
reason: "unknown",
|
|
85
|
+
errorMessage: error.message,
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
ok: false,
|
|
91
|
+
error: {
|
|
92
|
+
reason: "unknown",
|
|
93
|
+
errorMessage: JSON.stringify(error),
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
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,12 @@
|
|
|
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 = createRequestUrl;
|
|
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
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
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.getFetchFn = getFetchFn;
|
|
46
|
+
const runtime_1 = require("../runtime");
|
|
47
|
+
/**
|
|
48
|
+
* Returns a fetch function based on the runtime
|
|
49
|
+
*/
|
|
50
|
+
function getFetchFn() {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
// In Node.js 18+ environments, use native fetch
|
|
53
|
+
if (runtime_1.RUNTIME.type === "node" && runtime_1.RUNTIME.parsedVersion != null && runtime_1.RUNTIME.parsedVersion >= 18) {
|
|
54
|
+
return fetch;
|
|
55
|
+
}
|
|
56
|
+
// In Node.js 18 or lower environments, the SDK always uses`node-fetch`.
|
|
57
|
+
if (runtime_1.RUNTIME.type === "node") {
|
|
58
|
+
return (yield Promise.resolve().then(() => __importStar(require("node-fetch")))).default;
|
|
59
|
+
}
|
|
60
|
+
// Otherwise the SDK uses global fetch if available,
|
|
61
|
+
// and falls back to node-fetch.
|
|
62
|
+
if (typeof fetch == "function") {
|
|
63
|
+
return fetch;
|
|
64
|
+
}
|
|
65
|
+
// Defaults to node `node-fetch` if global fetch isn't available
|
|
66
|
+
return (yield Promise.resolve().then(() => __importStar(require("node-fetch")))).default;
|
|
67
|
+
});
|
|
68
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getHeader(headers: Record<string, any>, header: string): string | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getHeader = getHeader;
|
|
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
|
+
}
|
|
@@ -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.getRequestBody = getRequestBody;
|
|
13
|
+
function getRequestBody(_a) {
|
|
14
|
+
return __awaiter(this, arguments, void 0, function* ({ body, type }) {
|
|
15
|
+
if (type.includes("json")) {
|
|
16
|
+
return JSON.stringify(body);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
return body;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getResponseBody(response: Response, responseType?: string): Promise<unknown>;
|
|
@@ -0,0 +1,54 @@
|
|
|
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.getResponseBody = getResponseBody;
|
|
13
|
+
const chooseStreamWrapper_1 = require("./stream-wrappers/chooseStreamWrapper");
|
|
14
|
+
function getResponseBody(response, responseType) {
|
|
15
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
if (response.body != null && responseType === "blob") {
|
|
17
|
+
return yield response.blob();
|
|
18
|
+
}
|
|
19
|
+
else if (response.body != null && responseType === "arrayBuffer") {
|
|
20
|
+
return yield response.arrayBuffer();
|
|
21
|
+
}
|
|
22
|
+
else if (response.body != null && responseType === "sse") {
|
|
23
|
+
return response.body;
|
|
24
|
+
}
|
|
25
|
+
else if (response.body != null && responseType === "streaming") {
|
|
26
|
+
return (0, chooseStreamWrapper_1.chooseStreamWrapper)(response.body);
|
|
27
|
+
}
|
|
28
|
+
else if (response.body != null && responseType === "text") {
|
|
29
|
+
return yield response.text();
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
const text = yield response.text();
|
|
33
|
+
if (text.length > 0) {
|
|
34
|
+
try {
|
|
35
|
+
let responseBody = JSON.parse(text);
|
|
36
|
+
return responseBody;
|
|
37
|
+
}
|
|
38
|
+
catch (err) {
|
|
39
|
+
return {
|
|
40
|
+
ok: false,
|
|
41
|
+
error: {
|
|
42
|
+
reason: "non-json",
|
|
43
|
+
statusCode: response.status,
|
|
44
|
+
rawBody: text,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Supplier = exports.getHeader = exports.fetcher = void 0;
|
|
4
|
+
var Fetcher_1 = require("./Fetcher");
|
|
5
|
+
Object.defineProperty(exports, "fetcher", { enumerable: true, get: function () { return Fetcher_1.fetcher; } });
|
|
6
|
+
var getHeader_1 = require("./getHeader");
|
|
7
|
+
Object.defineProperty(exports, "getHeader", { enumerable: true, get: function () { return getHeader_1.getHeader; } });
|
|
8
|
+
var Supplier_1 = require("./Supplier");
|
|
9
|
+
Object.defineProperty(exports, "Supplier", { enumerable: true, get: function () { return Supplier_1.Supplier; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const makeRequest: (fetchFn: (url: string, init: RequestInit) => Promise<Response>, url: string, method: string, headers: Record<string, string>, requestBody: BodyInit | undefined, timeoutMs?: number, abortSignal?: AbortSignal, withCredentials?: boolean, duplex?: "half") => Promise<Response>;
|
|
@@ -0,0 +1,42 @@
|
|
|
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.makeRequest = void 0;
|
|
13
|
+
const signals_1 = require("./signals");
|
|
14
|
+
const makeRequest = (fetchFn, url, method, headers, requestBody, timeoutMs, abortSignal, withCredentials, duplex) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
const signals = [];
|
|
16
|
+
// Add timeout signal
|
|
17
|
+
let timeoutAbortId = undefined;
|
|
18
|
+
if (timeoutMs != null) {
|
|
19
|
+
const { signal, abortId } = (0, signals_1.getTimeoutSignal)(timeoutMs);
|
|
20
|
+
timeoutAbortId = abortId;
|
|
21
|
+
signals.push(signal);
|
|
22
|
+
}
|
|
23
|
+
// Add arbitrary signal
|
|
24
|
+
if (abortSignal != null) {
|
|
25
|
+
signals.push(abortSignal);
|
|
26
|
+
}
|
|
27
|
+
let newSignals = (0, signals_1.anySignal)(signals);
|
|
28
|
+
const response = yield fetchFn(url, {
|
|
29
|
+
method: method,
|
|
30
|
+
headers,
|
|
31
|
+
body: requestBody,
|
|
32
|
+
signal: newSignals,
|
|
33
|
+
credentials: withCredentials ? "include" : undefined,
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
duplex,
|
|
36
|
+
});
|
|
37
|
+
if (timeoutAbortId != null) {
|
|
38
|
+
clearTimeout(timeoutAbortId);
|
|
39
|
+
}
|
|
40
|
+
return response;
|
|
41
|
+
});
|
|
42
|
+
exports.makeRequest = makeRequest;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function requestWithRetries(requestFn: () => Promise<Response>, maxRetries?: number): Promise<Response>;
|
|
@@ -0,0 +1,40 @@
|
|
|
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.requestWithRetries = requestWithRetries;
|
|
13
|
+
const INITIAL_RETRY_DELAY = 1000; // in milliseconds
|
|
14
|
+
const MAX_RETRY_DELAY = 60000; // in milliseconds
|
|
15
|
+
const DEFAULT_MAX_RETRIES = 2;
|
|
16
|
+
const JITTER_FACTOR = 0.2; // 20% random jitter
|
|
17
|
+
function addJitter(delay) {
|
|
18
|
+
// Generate a random value between -JITTER_FACTOR and +JITTER_FACTOR
|
|
19
|
+
const jitterMultiplier = 1 + (Math.random() * 2 - 1) * JITTER_FACTOR;
|
|
20
|
+
return delay * jitterMultiplier;
|
|
21
|
+
}
|
|
22
|
+
function requestWithRetries(requestFn_1) {
|
|
23
|
+
return __awaiter(this, arguments, void 0, function* (requestFn, maxRetries = DEFAULT_MAX_RETRIES) {
|
|
24
|
+
let response = yield requestFn();
|
|
25
|
+
for (let i = 0; i < maxRetries; ++i) {
|
|
26
|
+
if ([408, 409, 429].includes(response.status) || response.status >= 500) {
|
|
27
|
+
// Calculate base delay using exponential backoff (in milliseconds)
|
|
28
|
+
const baseDelay = Math.min(INITIAL_RETRY_DELAY * Math.pow(2, i), MAX_RETRY_DELAY);
|
|
29
|
+
// Add jitter to the delay
|
|
30
|
+
const delayWithJitter = addJitter(baseDelay);
|
|
31
|
+
yield new Promise((resolve) => setTimeout(resolve, delayWithJitter));
|
|
32
|
+
response = yield requestFn();
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return response;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function getTimeoutSignal(timeoutMs: number): {
|
|
2
|
+
signal: AbortSignal;
|
|
3
|
+
abortId: NodeJS.Timeout;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Returns an abort signal that is getting aborted when
|
|
7
|
+
* at least one of the specified abort signals is aborted.
|
|
8
|
+
*
|
|
9
|
+
* Requires at least node.js 18.
|
|
10
|
+
*/
|
|
11
|
+
export declare function anySignal(...args: AbortSignal[] | [AbortSignal[]]): AbortSignal;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTimeoutSignal = getTimeoutSignal;
|
|
4
|
+
exports.anySignal = anySignal;
|
|
5
|
+
const TIMEOUT = "timeout";
|
|
6
|
+
function getTimeoutSignal(timeoutMs) {
|
|
7
|
+
const controller = new AbortController();
|
|
8
|
+
const abortId = setTimeout(() => controller.abort(TIMEOUT), timeoutMs);
|
|
9
|
+
return { signal: controller.signal, abortId };
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Returns an abort signal that is getting aborted when
|
|
13
|
+
* at least one of the specified abort signals is aborted.
|
|
14
|
+
*
|
|
15
|
+
* Requires at least node.js 18.
|
|
16
|
+
*/
|
|
17
|
+
function anySignal(...args) {
|
|
18
|
+
// Allowing signals to be passed either as array
|
|
19
|
+
// of signals or as multiple arguments.
|
|
20
|
+
const signals = (args.length === 1 && Array.isArray(args[0]) ? args[0] : args);
|
|
21
|
+
const controller = new AbortController();
|
|
22
|
+
for (const signal of signals) {
|
|
23
|
+
if (signal.aborted) {
|
|
24
|
+
// Exiting early if one of the signals
|
|
25
|
+
// is already aborted.
|
|
26
|
+
controller.abort(signal === null || signal === void 0 ? void 0 : signal.reason);
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
// Listening for signals and removing the listeners
|
|
30
|
+
// when at least one symbol is aborted.
|
|
31
|
+
signal.addEventListener("abort", () => controller.abort(signal === null || signal === void 0 ? void 0 : signal.reason), {
|
|
32
|
+
signal: controller.signal,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return controller.signal;
|
|
36
|
+
}
|