@credal/sdk 0.0.13 → 0.0.15
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 +3 -0
- package/api/resources/common/types/index.d.ts +1 -0
- package/api/resources/common/types/index.js +1 -0
- package/api/resources/copilots/client/Client.d.ts +25 -11
- package/api/resources/copilots/client/Client.js +119 -37
- package/api/resources/copilots/client/requests/CreateCopilotRequest.d.ts +1 -1
- package/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.ts +1 -1
- package/api/resources/copilots/client/requests/SendMessageRequest.d.ts +14 -1
- package/api/resources/copilots/client/requests/StreamMessageRequest.d.ts +60 -0
- package/api/resources/copilots/client/requests/StreamMessageRequest.js +5 -0
- package/api/resources/copilots/client/requests/index.d.ts +1 -0
- package/api/resources/copilots/types/BlockedChunk.d.ts +10 -0
- package/api/resources/copilots/types/BlockedChunk.js +5 -0
- package/api/resources/copilots/types/BooleanFieldSchema.d.ts +8 -0
- package/api/resources/copilots/types/BooleanFieldSchema.js +5 -0
- package/api/resources/copilots/types/CollectionFilteredData.d.ts +9 -0
- package/api/resources/copilots/types/CollectionFilteredData.js +5 -0
- package/api/resources/copilots/types/DataChunk.d.ts +6 -0
- package/api/resources/copilots/types/DataChunk.js +5 -0
- package/api/resources/copilots/types/DataFilter.d.ts +9 -0
- package/api/resources/copilots/types/DataFilter.js +5 -0
- package/api/resources/copilots/types/DatetimeFieldSchema.d.ts +9 -0
- package/api/resources/copilots/types/DatetimeFieldSchema.js +5 -0
- package/api/resources/copilots/types/Filter.d.ts +19 -0
- package/api/resources/copilots/types/Filter.js +5 -0
- package/api/resources/copilots/types/FinalChunk.d.ts +7 -0
- package/api/resources/copilots/types/FinalChunk.js +5 -0
- package/api/resources/copilots/types/InitialChunk.d.ts +10 -0
- package/api/resources/copilots/types/InitialChunk.js +5 -0
- package/api/resources/copilots/types/InputVariable.d.ts +7 -0
- package/api/resources/copilots/types/InputVariable.js +5 -0
- package/api/resources/copilots/types/MessageReply.d.ts +1 -0
- package/api/resources/copilots/types/NumberFieldSchema.d.ts +9 -0
- package/api/resources/copilots/types/NumberFieldSchema.js +5 -0
- package/api/resources/copilots/types/StreamingChunk.d.ts +5 -0
- package/api/resources/copilots/types/StreamingChunk.js +5 -0
- package/api/resources/copilots/types/StringFieldSchema.d.ts +9 -0
- package/api/resources/copilots/types/StringFieldSchema.js +5 -0
- package/api/resources/copilots/types/WebSearchResult.d.ts +8 -0
- package/api/resources/copilots/types/WebSearchResult.js +5 -0
- package/api/resources/copilots/types/index.d.ts +14 -0
- package/api/resources/copilots/types/index.js +14 -0
- package/api/resources/documentCatalog/client/Client.d.ts +7 -4
- package/api/resources/documentCatalog/client/Client.js +13 -13
- package/api/resources/documentCollections/client/Client.d.ts +14 -11
- package/api/resources/documentCollections/client/Client.js +39 -29
- package/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.d.ts +2 -2
- package/api/resources/documentCollections/client/requests/CreateCollectionRequest.d.ts +1 -1
- package/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.d.ts +2 -2
- package/api/resources/permissionsService/client/Client.d.ts +8 -5
- package/api/resources/permissionsService/client/Client.js +20 -14
- package/api/resources/permissionsService/client/requests/CheckBulkResourcesAuthorizationForUserRequest.d.ts +1 -1
- package/api/resources/permissionsService/client/requests/CheckResourceAuthorizationForUserRequest.d.ts +1 -1
- package/api/resources/search/client/Client.d.ts +5 -2
- package/api/resources/search/client/Client.js +7 -7
- package/api/resources/search/client/requests/SearchDocumentCollectionRequest.d.ts +1 -1
- package/api/resources/search/types/index.d.ts +0 -1
- package/api/resources/search/types/index.js +0 -1
- package/api/resources/users/client/Client.d.ts +4 -1
- package/api/resources/users/client/Client.js +5 -3
- package/core/fetcher/Fetcher.d.ts +4 -1
- package/core/fetcher/Fetcher.js +19 -176
- package/core/fetcher/createRequestUrl.d.ts +1 -0
- package/core/fetcher/createRequestUrl.js +13 -0
- package/core/fetcher/getFetchFn.d.ts +4 -0
- package/core/fetcher/getFetchFn.js +59 -0
- package/core/fetcher/getRequestBody.d.ts +7 -0
- package/core/fetcher/getRequestBody.js +23 -0
- package/core/fetcher/getResponseBody.d.ts +1 -0
- package/core/fetcher/getResponseBody.js +55 -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 +41 -0
- package/core/fetcher/signals.d.ts +12 -0
- package/core/fetcher/signals.js +37 -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 +22 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +50 -0
- package/core/index.d.ts +1 -0
- package/core/index.js +1 -0
- package/core/runtime/runtime.d.ts +2 -1
- package/core/runtime/runtime.js +12 -1
- package/core/schemas/Schema.d.ts +8 -4
- package/core/schemas/Schema.js +1 -0
- package/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/core/schemas/builders/bigint/bigint.js +50 -0
- package/core/schemas/builders/bigint/index.d.ts +1 -0
- package/core/schemas/builders/bigint/index.js +5 -0
- package/core/schemas/builders/index.d.ts +1 -0
- package/core/schemas/builders/index.js +1 -0
- package/core/schemas/builders/lazy/lazy.d.ts +2 -2
- package/core/schemas/builders/lazy/lazy.js +8 -19
- package/core/schemas/builders/lazy/lazyObject.js +1 -10
- package/core/schemas/builders/list/list.js +31 -44
- package/core/schemas/builders/object/object.js +90 -111
- package/core/schemas/builders/object/types.d.ts +2 -2
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
- package/core/schemas/builders/record/record.js +49 -60
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
- package/core/schemas/builders/set/set.js +6 -15
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
- package/core/schemas/builders/union/union.js +51 -62
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
- package/core/schemas/utils/maybeSkipValidation.js +3 -12
- package/core/streaming-fetcher/Stream.d.ts +48 -0
- package/core/streaming-fetcher/Stream.js +170 -0
- package/core/streaming-fetcher/index.d.ts +1 -0
- package/core/streaming-fetcher/index.js +5 -0
- package/dist/Client.d.ts +3 -0
- package/dist/api/resources/common/types/index.d.ts +1 -0
- package/dist/api/resources/common/types/index.js +1 -0
- package/dist/api/resources/copilots/client/Client.d.ts +25 -11
- package/dist/api/resources/copilots/client/Client.js +119 -37
- package/dist/api/resources/copilots/client/requests/CreateCopilotRequest.d.ts +1 -1
- package/dist/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.ts +1 -1
- package/dist/api/resources/copilots/client/requests/SendMessageRequest.d.ts +14 -1
- package/dist/api/resources/copilots/client/requests/StreamMessageRequest.d.ts +60 -0
- package/dist/api/resources/copilots/client/requests/StreamMessageRequest.js +5 -0
- package/dist/api/resources/copilots/client/requests/index.d.ts +1 -0
- package/dist/api/resources/copilots/types/BlockedChunk.d.ts +10 -0
- package/dist/api/resources/copilots/types/BlockedChunk.js +5 -0
- package/dist/api/resources/copilots/types/BooleanFieldSchema.d.ts +8 -0
- package/dist/api/resources/copilots/types/BooleanFieldSchema.js +5 -0
- package/dist/api/resources/copilots/types/CollectionFilteredData.d.ts +9 -0
- package/dist/api/resources/copilots/types/CollectionFilteredData.js +5 -0
- package/dist/api/resources/copilots/types/DataChunk.d.ts +6 -0
- package/dist/api/resources/copilots/types/DataChunk.js +5 -0
- package/dist/api/resources/copilots/types/DataFilter.d.ts +9 -0
- package/dist/api/resources/copilots/types/DataFilter.js +5 -0
- package/dist/api/resources/copilots/types/DatetimeFieldSchema.d.ts +9 -0
- package/dist/api/resources/copilots/types/DatetimeFieldSchema.js +5 -0
- package/dist/api/resources/copilots/types/Filter.d.ts +19 -0
- package/dist/api/resources/copilots/types/Filter.js +5 -0
- package/dist/api/resources/copilots/types/FinalChunk.d.ts +7 -0
- package/dist/api/resources/copilots/types/FinalChunk.js +5 -0
- package/dist/api/resources/copilots/types/InitialChunk.d.ts +10 -0
- package/dist/api/resources/copilots/types/InitialChunk.js +5 -0
- package/dist/api/resources/copilots/types/InputVariable.d.ts +7 -0
- package/dist/api/resources/copilots/types/InputVariable.js +5 -0
- package/dist/api/resources/copilots/types/MessageReply.d.ts +1 -0
- package/dist/api/resources/copilots/types/NumberFieldSchema.d.ts +9 -0
- package/dist/api/resources/copilots/types/NumberFieldSchema.js +5 -0
- package/dist/api/resources/copilots/types/StreamingChunk.d.ts +5 -0
- package/dist/api/resources/copilots/types/StreamingChunk.js +5 -0
- package/dist/api/resources/copilots/types/StringFieldSchema.d.ts +9 -0
- package/dist/api/resources/copilots/types/StringFieldSchema.js +5 -0
- package/dist/api/resources/copilots/types/WebSearchResult.d.ts +8 -0
- package/dist/api/resources/copilots/types/WebSearchResult.js +5 -0
- package/dist/api/resources/copilots/types/index.d.ts +14 -0
- package/dist/api/resources/copilots/types/index.js +14 -0
- package/dist/api/resources/documentCatalog/client/Client.d.ts +7 -4
- package/dist/api/resources/documentCatalog/client/Client.js +13 -13
- package/dist/api/resources/documentCollections/client/Client.d.ts +14 -11
- package/dist/api/resources/documentCollections/client/Client.js +39 -29
- package/dist/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.d.ts +2 -2
- package/dist/api/resources/documentCollections/client/requests/CreateCollectionRequest.d.ts +1 -1
- package/dist/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.d.ts +2 -2
- package/dist/api/resources/permissionsService/client/Client.d.ts +8 -5
- package/dist/api/resources/permissionsService/client/Client.js +20 -14
- package/dist/api/resources/permissionsService/client/requests/CheckBulkResourcesAuthorizationForUserRequest.d.ts +1 -1
- package/dist/api/resources/permissionsService/client/requests/CheckResourceAuthorizationForUserRequest.d.ts +1 -1
- package/dist/api/resources/search/client/Client.d.ts +5 -2
- package/dist/api/resources/search/client/Client.js +7 -7
- package/dist/api/resources/search/client/requests/SearchDocumentCollectionRequest.d.ts +1 -1
- package/dist/api/resources/search/types/index.d.ts +0 -1
- package/dist/api/resources/search/types/index.js +0 -1
- package/dist/api/resources/users/client/Client.d.ts +4 -1
- package/dist/api/resources/users/client/Client.js +5 -3
- package/dist/core/fetcher/Fetcher.d.ts +4 -1
- package/dist/core/fetcher/Fetcher.js +19 -176
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +13 -0
- package/dist/core/fetcher/getFetchFn.d.ts +4 -0
- package/dist/core/fetcher/getFetchFn.js +59 -0
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +23 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +55 -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 +41 -0
- package/dist/core/fetcher/signals.d.ts +12 -0
- package/dist/core/fetcher/signals.js +37 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +50 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -0
- package/dist/core/runtime/runtime.d.ts +2 -1
- package/dist/core/runtime/runtime.js +12 -1
- package/dist/core/schemas/Schema.d.ts +8 -4
- package/dist/core/schemas/Schema.js +1 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/dist/core/schemas/builders/bigint/bigint.js +50 -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/index.d.ts +1 -0
- package/dist/core/schemas/builders/index.js +1 -0
- package/dist/core/schemas/builders/lazy/lazy.d.ts +2 -2
- package/dist/core/schemas/builders/lazy/lazy.js +8 -19
- package/dist/core/schemas/builders/lazy/lazyObject.js +1 -10
- package/dist/core/schemas/builders/list/list.js +31 -44
- package/dist/core/schemas/builders/object/object.js +90 -111
- package/dist/core/schemas/builders/object/types.d.ts +2 -2
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
- package/dist/core/schemas/builders/record/record.js +49 -60
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
- package/dist/core/schemas/builders/set/set.js +6 -15
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
- package/dist/core/schemas/builders/union/union.js +51 -62
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
- package/dist/core/schemas/utils/maybeSkipValidation.js +3 -12
- package/dist/core/streaming-fetcher/Stream.d.ts +48 -0
- package/dist/core/streaming-fetcher/Stream.js +170 -0
- package/dist/core/streaming-fetcher/index.d.ts +1 -0
- package/dist/core/streaming-fetcher/index.js +5 -0
- package/dist/serialization/resources/common/types/index.d.ts +1 -0
- package/dist/serialization/resources/common/types/index.js +1 -0
- package/dist/serialization/resources/copilots/client/requests/SendMessageRequest.d.ts +2 -0
- package/dist/serialization/resources/copilots/client/requests/SendMessageRequest.js +2 -0
- package/dist/serialization/resources/copilots/client/requests/StreamMessageRequest.d.ts +17 -0
- package/dist/serialization/resources/copilots/client/requests/StreamMessageRequest.js +38 -0
- package/dist/serialization/resources/copilots/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/copilots/client/requests/index.js +3 -1
- package/dist/serialization/resources/copilots/types/BlockedChunk.d.ts +16 -0
- package/dist/serialization/resources/copilots/types/BlockedChunk.js +37 -0
- package/dist/serialization/resources/copilots/types/BooleanFieldSchema.d.ts +14 -0
- package/dist/serialization/resources/copilots/types/BooleanFieldSchema.js +35 -0
- package/dist/serialization/resources/copilots/types/CollectionFilteredData.d.ts +15 -0
- package/dist/serialization/resources/copilots/types/CollectionFilteredData.js +36 -0
- package/dist/serialization/resources/copilots/types/DataChunk.d.ts +12 -0
- package/dist/serialization/resources/copilots/types/DataChunk.js +33 -0
- package/dist/serialization/resources/copilots/types/DataFilter.d.ts +15 -0
- package/dist/serialization/resources/copilots/types/DataFilter.js +36 -0
- package/dist/serialization/resources/copilots/types/DatetimeFieldSchema.d.ts +15 -0
- package/dist/serialization/resources/copilots/types/DatetimeFieldSchema.js +36 -0
- package/dist/serialization/resources/copilots/types/Filter.d.ts +26 -0
- package/dist/serialization/resources/copilots/types/Filter.js +45 -0
- package/dist/serialization/resources/copilots/types/FinalChunk.d.ts +13 -0
- package/dist/serialization/resources/copilots/types/FinalChunk.js +34 -0
- package/dist/serialization/resources/copilots/types/InitialChunk.d.ts +17 -0
- package/dist/serialization/resources/copilots/types/InitialChunk.js +38 -0
- package/dist/serialization/resources/copilots/types/InputVariable.d.ts +13 -0
- package/dist/serialization/resources/copilots/types/InputVariable.js +34 -0
- package/dist/serialization/resources/copilots/types/MessageReply.d.ts +2 -0
- package/dist/serialization/resources/copilots/types/MessageReply.js +2 -0
- package/dist/serialization/resources/copilots/types/NumberFieldSchema.d.ts +15 -0
- package/dist/serialization/resources/copilots/types/NumberFieldSchema.js +36 -0
- package/dist/serialization/resources/copilots/types/StreamingChunk.d.ts +14 -0
- package/dist/serialization/resources/copilots/types/StreamingChunk.js +35 -0
- package/dist/serialization/resources/copilots/types/StringFieldSchema.d.ts +15 -0
- package/dist/serialization/resources/copilots/types/StringFieldSchema.js +36 -0
- package/dist/serialization/resources/copilots/types/WebSearchResult.d.ts +14 -0
- package/dist/serialization/resources/copilots/types/WebSearchResult.js +35 -0
- package/dist/serialization/resources/copilots/types/index.d.ts +14 -0
- package/dist/serialization/resources/copilots/types/index.js +14 -0
- package/dist/serialization/resources/search/types/SingleFieldFilter.d.ts +1 -1
- package/dist/serialization/resources/search/types/SingleFieldFilter.js +1 -1
- package/dist/serialization/resources/search/types/index.d.ts +0 -1
- package/dist/serialization/resources/search/types/index.js +0 -1
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/package.json +12 -2
- package/reference.md +203 -511
- package/serialization/resources/common/types/index.d.ts +1 -0
- package/serialization/resources/common/types/index.js +1 -0
- package/serialization/resources/copilots/client/requests/SendMessageRequest.d.ts +2 -0
- package/serialization/resources/copilots/client/requests/SendMessageRequest.js +2 -0
- package/serialization/resources/copilots/client/requests/StreamMessageRequest.d.ts +17 -0
- package/serialization/resources/copilots/client/requests/StreamMessageRequest.js +38 -0
- package/serialization/resources/copilots/client/requests/index.d.ts +1 -0
- package/serialization/resources/copilots/client/requests/index.js +3 -1
- package/serialization/resources/copilots/types/BlockedChunk.d.ts +16 -0
- package/serialization/resources/copilots/types/BlockedChunk.js +37 -0
- package/serialization/resources/copilots/types/BooleanFieldSchema.d.ts +14 -0
- package/serialization/resources/copilots/types/BooleanFieldSchema.js +35 -0
- package/serialization/resources/copilots/types/CollectionFilteredData.d.ts +15 -0
- package/serialization/resources/copilots/types/CollectionFilteredData.js +36 -0
- package/serialization/resources/copilots/types/DataChunk.d.ts +12 -0
- package/serialization/resources/copilots/types/DataChunk.js +33 -0
- package/serialization/resources/copilots/types/DataFilter.d.ts +15 -0
- package/serialization/resources/copilots/types/DataFilter.js +36 -0
- package/serialization/resources/copilots/types/DatetimeFieldSchema.d.ts +15 -0
- package/serialization/resources/copilots/types/DatetimeFieldSchema.js +36 -0
- package/serialization/resources/copilots/types/Filter.d.ts +26 -0
- package/serialization/resources/copilots/types/Filter.js +45 -0
- package/serialization/resources/copilots/types/FinalChunk.d.ts +13 -0
- package/serialization/resources/copilots/types/FinalChunk.js +34 -0
- package/serialization/resources/copilots/types/InitialChunk.d.ts +17 -0
- package/serialization/resources/copilots/types/InitialChunk.js +38 -0
- package/serialization/resources/copilots/types/InputVariable.d.ts +13 -0
- package/serialization/resources/copilots/types/InputVariable.js +34 -0
- package/serialization/resources/copilots/types/MessageReply.d.ts +2 -0
- package/serialization/resources/copilots/types/MessageReply.js +2 -0
- package/serialization/resources/copilots/types/NumberFieldSchema.d.ts +15 -0
- package/serialization/resources/copilots/types/NumberFieldSchema.js +36 -0
- package/serialization/resources/copilots/types/StreamingChunk.d.ts +14 -0
- package/serialization/resources/copilots/types/StreamingChunk.js +35 -0
- package/serialization/resources/copilots/types/StringFieldSchema.d.ts +15 -0
- package/serialization/resources/copilots/types/StringFieldSchema.js +36 -0
- package/serialization/resources/copilots/types/WebSearchResult.d.ts +14 -0
- package/serialization/resources/copilots/types/WebSearchResult.js +35 -0
- package/serialization/resources/copilots/types/index.d.ts +14 -0
- package/serialization/resources/copilots/types/index.js +14 -0
- package/serialization/resources/search/types/SingleFieldFilter.d.ts +1 -1
- package/serialization/resources/search/types/SingleFieldFilter.js +1 -1
- package/serialization/resources/search/types/index.d.ts +0 -1
- package/serialization/resources/search/types/index.js +0 -1
- package/version.d.ts +1 -0
- package/version.js +4 -0
- /package/api/resources/{search → common}/types/Operator.d.ts +0 -0
- /package/api/resources/{search → common}/types/Operator.js +0 -0
- /package/dist/api/resources/{search → common}/types/Operator.d.ts +0 -0
- /package/dist/api/resources/{search → common}/types/Operator.js +0 -0
- /package/dist/serialization/resources/{search → common}/types/Operator.d.ts +0 -0
- /package/dist/serialization/resources/{search → common}/types/Operator.js +0 -0
- /package/serialization/resources/{search → common}/types/Operator.d.ts +0 -0
- /package/serialization/resources/{search → common}/types/Operator.js +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Credal from "../../../index";
|
|
5
|
+
export interface DataFilter {
|
|
6
|
+
semanticSearchTerms: string[];
|
|
7
|
+
webSearchTerm: string[];
|
|
8
|
+
filteredDataSourcesPerCollection: Credal.CollectionFilteredData[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Credal from "../../../index";
|
|
5
|
+
export declare type Filter = Credal.Filter.String | Credal.Filter.Number | Credal.Filter.Boolean | Credal.Filter.Datetime;
|
|
6
|
+
export declare namespace Filter {
|
|
7
|
+
interface String extends Credal.StringFieldSchema {
|
|
8
|
+
fieldType: "string";
|
|
9
|
+
}
|
|
10
|
+
interface Number extends Credal.NumberFieldSchema {
|
|
11
|
+
fieldType: "number";
|
|
12
|
+
}
|
|
13
|
+
interface Boolean extends Credal.BooleanFieldSchema {
|
|
14
|
+
fieldType: "boolean";
|
|
15
|
+
}
|
|
16
|
+
interface Datetime extends Credal.DatetimeFieldSchema {
|
|
17
|
+
fieldType: "datetime";
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Credal from "../../../index";
|
|
5
|
+
export interface InitialChunk {
|
|
6
|
+
conversationId: string;
|
|
7
|
+
warnings: string[];
|
|
8
|
+
webSearchResults: Credal.WebSearchResult[];
|
|
9
|
+
dataFilters?: Credal.DataFilter;
|
|
10
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from "./CreateConversationResponse";
|
|
2
2
|
export * from "./SendAgentMessageResponse";
|
|
3
3
|
export * from "./SendMessageResponse";
|
|
4
|
+
export * from "./InputVariable";
|
|
4
5
|
export * from "./MessageReply";
|
|
5
6
|
export * from "./ReferencedSource";
|
|
7
|
+
export * from "./WebSearchResult";
|
|
6
8
|
export * from "./ResponseChunk";
|
|
7
9
|
export * from "./InsertedAuditLog";
|
|
8
10
|
export * from "./MessageBlocked";
|
|
@@ -13,3 +15,15 @@ export * from "./Configuration";
|
|
|
13
15
|
export * from "./AiEndpointConfiguration";
|
|
14
16
|
export * from "./CreateCopilotResponse";
|
|
15
17
|
export * from "./DeleteCopilotResponse";
|
|
18
|
+
export * from "./StringFieldSchema";
|
|
19
|
+
export * from "./NumberFieldSchema";
|
|
20
|
+
export * from "./BooleanFieldSchema";
|
|
21
|
+
export * from "./DatetimeFieldSchema";
|
|
22
|
+
export * from "./Filter";
|
|
23
|
+
export * from "./CollectionFilteredData";
|
|
24
|
+
export * from "./DataFilter";
|
|
25
|
+
export * from "./InitialChunk";
|
|
26
|
+
export * from "./DataChunk";
|
|
27
|
+
export * from "./FinalChunk";
|
|
28
|
+
export * from "./BlockedChunk";
|
|
29
|
+
export * from "./StreamingChunk";
|
|
@@ -17,8 +17,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./CreateConversationResponse"), exports);
|
|
18
18
|
__exportStar(require("./SendAgentMessageResponse"), exports);
|
|
19
19
|
__exportStar(require("./SendMessageResponse"), exports);
|
|
20
|
+
__exportStar(require("./InputVariable"), exports);
|
|
20
21
|
__exportStar(require("./MessageReply"), exports);
|
|
21
22
|
__exportStar(require("./ReferencedSource"), exports);
|
|
23
|
+
__exportStar(require("./WebSearchResult"), exports);
|
|
22
24
|
__exportStar(require("./ResponseChunk"), exports);
|
|
23
25
|
__exportStar(require("./InsertedAuditLog"), exports);
|
|
24
26
|
__exportStar(require("./MessageBlocked"), exports);
|
|
@@ -29,3 +31,15 @@ __exportStar(require("./Configuration"), exports);
|
|
|
29
31
|
__exportStar(require("./AiEndpointConfiguration"), exports);
|
|
30
32
|
__exportStar(require("./CreateCopilotResponse"), exports);
|
|
31
33
|
__exportStar(require("./DeleteCopilotResponse"), exports);
|
|
34
|
+
__exportStar(require("./StringFieldSchema"), exports);
|
|
35
|
+
__exportStar(require("./NumberFieldSchema"), exports);
|
|
36
|
+
__exportStar(require("./BooleanFieldSchema"), exports);
|
|
37
|
+
__exportStar(require("./DatetimeFieldSchema"), exports);
|
|
38
|
+
__exportStar(require("./Filter"), exports);
|
|
39
|
+
__exportStar(require("./CollectionFilteredData"), exports);
|
|
40
|
+
__exportStar(require("./DataFilter"), exports);
|
|
41
|
+
__exportStar(require("./InitialChunk"), exports);
|
|
42
|
+
__exportStar(require("./DataChunk"), exports);
|
|
43
|
+
__exportStar(require("./FinalChunk"), exports);
|
|
44
|
+
__exportStar(require("./BlockedChunk"), exports);
|
|
45
|
+
__exportStar(require("./StreamingChunk"), exports);
|
|
@@ -11,8 +11,11 @@ export declare namespace DocumentCatalog {
|
|
|
11
11
|
fetcher?: core.FetchFunction;
|
|
12
12
|
}
|
|
13
13
|
interface RequestOptions {
|
|
14
|
+
/** The maximum time to wait for a response in seconds. */
|
|
14
15
|
timeoutInSeconds?: number;
|
|
16
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
15
17
|
maxRetries?: number;
|
|
18
|
+
/** A hook to abort the request. */
|
|
16
19
|
abortSignal?: AbortSignal;
|
|
17
20
|
}
|
|
18
21
|
}
|
|
@@ -24,7 +27,7 @@ export declare class DocumentCatalog {
|
|
|
24
27
|
* @param {DocumentCatalog.RequestOptions} requestOptions - Request-specific configuration.
|
|
25
28
|
*
|
|
26
29
|
* @example
|
|
27
|
-
* await
|
|
30
|
+
* await client.documentCatalog.uploadDocumentContents({
|
|
28
31
|
* documentName: "My Document",
|
|
29
32
|
* documentContents: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
|
|
30
33
|
* documentExternalId: "73eead26-d124-4940-b329-5f068a0a8db9",
|
|
@@ -40,7 +43,7 @@ export declare class DocumentCatalog {
|
|
|
40
43
|
* @param {DocumentCatalog.RequestOptions} requestOptions - Request-specific configuration.
|
|
41
44
|
*
|
|
42
45
|
* @example
|
|
43
|
-
* await
|
|
46
|
+
* await client.documentCatalog.metadata({
|
|
44
47
|
* sources: [{
|
|
45
48
|
* metadata: {
|
|
46
49
|
* "Department": "HR",
|
|
@@ -49,7 +52,7 @@ export declare class DocumentCatalog {
|
|
|
49
52
|
* resourceIdentifier: {
|
|
50
53
|
* type: "external-resource-id",
|
|
51
54
|
* externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
|
|
52
|
-
* resourceType:
|
|
55
|
+
* resourceType: "GOOGLE_DRIVE_ITEM"
|
|
53
56
|
* }
|
|
54
57
|
* }, {
|
|
55
58
|
* metadata: {
|
|
@@ -59,7 +62,7 @@ export declare class DocumentCatalog {
|
|
|
59
62
|
* resourceIdentifier: {
|
|
60
63
|
* type: "external-resource-id",
|
|
61
64
|
* externalResourceId: "123456",
|
|
62
|
-
* resourceType:
|
|
65
|
+
* resourceType: "ZENDESK_TICKET"
|
|
63
66
|
* }
|
|
64
67
|
* }],
|
|
65
68
|
* uploadAsUserEmail: "ben@credal.ai"
|
|
@@ -53,7 +53,7 @@ class DocumentCatalog {
|
|
|
53
53
|
* @param {DocumentCatalog.RequestOptions} requestOptions - Request-specific configuration.
|
|
54
54
|
*
|
|
55
55
|
* @example
|
|
56
|
-
* await
|
|
56
|
+
* await client.documentCatalog.uploadDocumentContents({
|
|
57
57
|
* documentName: "My Document",
|
|
58
58
|
* documentContents: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
|
|
59
59
|
* documentExternalId: "73eead26-d124-4940-b329-5f068a0a8db9",
|
|
@@ -71,20 +71,20 @@ class DocumentCatalog {
|
|
|
71
71
|
Authorization: yield this._getAuthorizationHeader(),
|
|
72
72
|
"X-Fern-Language": "JavaScript",
|
|
73
73
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
74
|
-
"X-Fern-SDK-Version": "0.0.
|
|
74
|
+
"X-Fern-SDK-Version": "0.0.15",
|
|
75
|
+
"User-Agent": "@credal/sdk/0.0.15",
|
|
75
76
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
76
77
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
77
78
|
},
|
|
78
79
|
contentType: "application/json",
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}),
|
|
80
|
+
requestType: "json",
|
|
81
|
+
body: serializers.UploadDocumentContentsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
82
82
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
83
83
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
84
84
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
85
85
|
});
|
|
86
86
|
if (_response.ok) {
|
|
87
|
-
return
|
|
87
|
+
return serializers.UploadDocumentResponse.parseOrThrow(_response.body, {
|
|
88
88
|
unrecognizedObjectKeys: "passthrough",
|
|
89
89
|
allowUnrecognizedUnionMembers: true,
|
|
90
90
|
allowUnrecognizedEnumValues: true,
|
|
@@ -119,7 +119,7 @@ class DocumentCatalog {
|
|
|
119
119
|
* @param {DocumentCatalog.RequestOptions} requestOptions - Request-specific configuration.
|
|
120
120
|
*
|
|
121
121
|
* @example
|
|
122
|
-
* await
|
|
122
|
+
* await client.documentCatalog.metadata({
|
|
123
123
|
* sources: [{
|
|
124
124
|
* metadata: {
|
|
125
125
|
* "Department": "HR",
|
|
@@ -128,7 +128,7 @@ class DocumentCatalog {
|
|
|
128
128
|
* resourceIdentifier: {
|
|
129
129
|
* type: "external-resource-id",
|
|
130
130
|
* externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
|
|
131
|
-
* resourceType:
|
|
131
|
+
* resourceType: "GOOGLE_DRIVE_ITEM"
|
|
132
132
|
* }
|
|
133
133
|
* }, {
|
|
134
134
|
* metadata: {
|
|
@@ -138,7 +138,7 @@ class DocumentCatalog {
|
|
|
138
138
|
* resourceIdentifier: {
|
|
139
139
|
* type: "external-resource-id",
|
|
140
140
|
* externalResourceId: "123456",
|
|
141
|
-
* resourceType:
|
|
141
|
+
* resourceType: "ZENDESK_TICKET"
|
|
142
142
|
* }
|
|
143
143
|
* }],
|
|
144
144
|
* uploadAsUserEmail: "ben@credal.ai"
|
|
@@ -154,14 +154,14 @@ class DocumentCatalog {
|
|
|
154
154
|
Authorization: yield this._getAuthorizationHeader(),
|
|
155
155
|
"X-Fern-Language": "JavaScript",
|
|
156
156
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
157
|
-
"X-Fern-SDK-Version": "0.0.
|
|
157
|
+
"X-Fern-SDK-Version": "0.0.15",
|
|
158
|
+
"User-Agent": "@credal/sdk/0.0.15",
|
|
158
159
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
159
160
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
160
161
|
},
|
|
161
162
|
contentType: "application/json",
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}),
|
|
163
|
+
requestType: "json",
|
|
164
|
+
body: serializers.DocumentMetadataPatchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
165
165
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
166
166
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
167
167
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -11,8 +11,11 @@ export declare namespace DocumentCollections {
|
|
|
11
11
|
fetcher?: core.FetchFunction;
|
|
12
12
|
}
|
|
13
13
|
interface RequestOptions {
|
|
14
|
+
/** The maximum time to wait for a response in seconds. */
|
|
14
15
|
timeoutInSeconds?: number;
|
|
16
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
15
17
|
maxRetries?: number;
|
|
18
|
+
/** A hook to abort the request. */
|
|
16
19
|
abortSignal?: AbortSignal;
|
|
17
20
|
}
|
|
18
21
|
}
|
|
@@ -26,16 +29,16 @@ export declare class DocumentCollections {
|
|
|
26
29
|
* @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
30
|
*
|
|
28
31
|
* @example
|
|
29
|
-
* await
|
|
32
|
+
* await client.documentCollections.addDocumentsToCollection({
|
|
30
33
|
* collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
31
34
|
* resourceIdentifiers: [{
|
|
32
35
|
* type: "external-resource-id",
|
|
33
36
|
* externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
|
|
34
|
-
* resourceType:
|
|
37
|
+
* resourceType: "GOOGLE_DRIVE_ITEM"
|
|
35
38
|
* }, {
|
|
36
39
|
* type: "external-resource-id",
|
|
37
40
|
* externalResourceId: "398KAHdfkjsdf09r54UvyslPVWkQFOA0lOiu34in923",
|
|
38
|
-
* resourceType:
|
|
41
|
+
* resourceType: "GOOGLE_DRIVE_ITEM"
|
|
39
42
|
* }]
|
|
40
43
|
* })
|
|
41
44
|
*/
|
|
@@ -47,16 +50,16 @@ export declare class DocumentCollections {
|
|
|
47
50
|
* @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
|
|
48
51
|
*
|
|
49
52
|
* @example
|
|
50
|
-
* await
|
|
53
|
+
* await client.documentCollections.removeDocumentsFromCollection({
|
|
51
54
|
* collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
52
55
|
* resourceIdentifiers: [{
|
|
53
56
|
* type: "external-resource-id",
|
|
54
57
|
* externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
|
|
55
|
-
* resourceType:
|
|
58
|
+
* resourceType: "GOOGLE_DRIVE_ITEM"
|
|
56
59
|
* }, {
|
|
57
60
|
* type: "external-resource-id",
|
|
58
61
|
* externalResourceId: "398KAHdfkjsdf09r54UvyslPVWkQFOA0lOiu34in923",
|
|
59
|
-
* resourceType:
|
|
62
|
+
* resourceType: "GOOGLE_DRIVE_ITEM"
|
|
60
63
|
* }]
|
|
61
64
|
* })
|
|
62
65
|
*/
|
|
@@ -68,12 +71,12 @@ export declare class DocumentCollections {
|
|
|
68
71
|
* @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
|
|
69
72
|
*
|
|
70
73
|
* @example
|
|
71
|
-
* await
|
|
74
|
+
* await client.documentCollections.createCollection({
|
|
72
75
|
* name: "Customer Collection",
|
|
73
76
|
* description: "This collection is used to answer customer requests based on internal documentation.",
|
|
74
77
|
* collaborators: [{
|
|
75
78
|
* email: "test@gmail.com",
|
|
76
|
-
* role:
|
|
79
|
+
* role: "editor"
|
|
77
80
|
* }]
|
|
78
81
|
* })
|
|
79
82
|
*/
|
|
@@ -85,7 +88,7 @@ export declare class DocumentCollections {
|
|
|
85
88
|
* @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
|
|
86
89
|
*
|
|
87
90
|
* @example
|
|
88
|
-
* await
|
|
91
|
+
* await client.documentCollections.deleteCollection({
|
|
89
92
|
* collectionId: "ac20e6ba-0bae-11ef-b25a-efca73df4c3a"
|
|
90
93
|
* })
|
|
91
94
|
*/
|
|
@@ -97,7 +100,7 @@ export declare class DocumentCollections {
|
|
|
97
100
|
* @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
|
|
98
101
|
*
|
|
99
102
|
* @example
|
|
100
|
-
* await
|
|
103
|
+
* await client.documentCollections.createMongoCollectionSync({
|
|
101
104
|
* mongoUri: "mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
|
|
102
105
|
* collectionId: "ac20e6ba-0bae-11ef-b25a-efca73df4c3a",
|
|
103
106
|
* config: {
|
|
@@ -125,7 +128,7 @@ export declare class DocumentCollections {
|
|
|
125
128
|
* @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
|
|
126
129
|
*
|
|
127
130
|
* @example
|
|
128
|
-
* await
|
|
131
|
+
* await client.documentCollections.updateMongoCollectionSync({
|
|
129
132
|
* mongoUri: "mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
|
|
130
133
|
* mongoCredentialId: "5988ed76-6ee1-11ef-97dd-1fca54b7c4bc",
|
|
131
134
|
* config: {
|