@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
|
@@ -55,12 +55,12 @@ class Copilots {
|
|
|
55
55
|
* @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
56
|
*
|
|
57
57
|
* @example
|
|
58
|
-
* await
|
|
58
|
+
* await client.copilots.createCopilot({
|
|
59
59
|
* name: "Customer Copilot",
|
|
60
60
|
* description: "This copilot is used to answer customer requests based on internal documentation.",
|
|
61
61
|
* collaborators: [{
|
|
62
62
|
* email: "test@gmail.com",
|
|
63
|
-
* role:
|
|
63
|
+
* role: "editor"
|
|
64
64
|
* }]
|
|
65
65
|
* })
|
|
66
66
|
*/
|
|
@@ -74,18 +74,20 @@ class Copilots {
|
|
|
74
74
|
Authorization: yield this._getAuthorizationHeader(),
|
|
75
75
|
"X-Fern-Language": "JavaScript",
|
|
76
76
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
77
|
-
"X-Fern-SDK-Version": "0.0.
|
|
77
|
+
"X-Fern-SDK-Version": "0.0.15",
|
|
78
|
+
"User-Agent": "@credal/sdk/0.0.15",
|
|
78
79
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
79
80
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
80
81
|
},
|
|
81
82
|
contentType: "application/json",
|
|
82
|
-
|
|
83
|
+
requestType: "json",
|
|
84
|
+
body: serializers.CreateCopilotRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
83
85
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
84
86
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
85
87
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
86
88
|
});
|
|
87
89
|
if (_response.ok) {
|
|
88
|
-
return
|
|
90
|
+
return serializers.CreateCopilotResponse.parseOrThrow(_response.body, {
|
|
89
91
|
unrecognizedObjectKeys: "passthrough",
|
|
90
92
|
allowUnrecognizedUnionMembers: true,
|
|
91
93
|
allowUnrecognizedEnumValues: true,
|
|
@@ -120,7 +122,7 @@ class Copilots {
|
|
|
120
122
|
* @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
|
|
121
123
|
*
|
|
122
124
|
* @example
|
|
123
|
-
* await
|
|
125
|
+
* await client.copilots.createConversation({
|
|
124
126
|
* agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
125
127
|
* userEmail: "ravin@credal.ai"
|
|
126
128
|
* })
|
|
@@ -135,18 +137,20 @@ class Copilots {
|
|
|
135
137
|
Authorization: yield this._getAuthorizationHeader(),
|
|
136
138
|
"X-Fern-Language": "JavaScript",
|
|
137
139
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
138
|
-
"X-Fern-SDK-Version": "0.0.
|
|
140
|
+
"X-Fern-SDK-Version": "0.0.15",
|
|
141
|
+
"User-Agent": "@credal/sdk/0.0.15",
|
|
139
142
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
140
143
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
141
144
|
},
|
|
142
145
|
contentType: "application/json",
|
|
143
|
-
|
|
146
|
+
requestType: "json",
|
|
147
|
+
body: serializers.CreateConversationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
144
148
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
145
149
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
146
150
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
147
151
|
});
|
|
148
152
|
if (_response.ok) {
|
|
149
|
-
return
|
|
153
|
+
return serializers.CreateConversationResponse.parseOrThrow(_response.body, {
|
|
150
154
|
unrecognizedObjectKeys: "passthrough",
|
|
151
155
|
allowUnrecognizedUnionMembers: true,
|
|
152
156
|
allowUnrecognizedEnumValues: true,
|
|
@@ -179,12 +183,12 @@ class Copilots {
|
|
|
179
183
|
* @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
|
|
180
184
|
*
|
|
181
185
|
* @example
|
|
182
|
-
* await
|
|
186
|
+
* await client.copilots.provideMessageFeedback({
|
|
183
187
|
* userEmail: "ravin@credal.ai",
|
|
184
188
|
* messageId: "dd721cd8-4bf2-4b94-9869-258df3dab9dc",
|
|
185
189
|
* agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
186
190
|
* messageFeedback: {
|
|
187
|
-
* feedback:
|
|
191
|
+
* feedback: "NEGATIVE",
|
|
188
192
|
* suggestedAnswer: "Yes, Credal is SOC 2 compliant."
|
|
189
193
|
* }
|
|
190
194
|
* })
|
|
@@ -199,14 +203,14 @@ class Copilots {
|
|
|
199
203
|
Authorization: yield this._getAuthorizationHeader(),
|
|
200
204
|
"X-Fern-Language": "JavaScript",
|
|
201
205
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
202
|
-
"X-Fern-SDK-Version": "0.0.
|
|
206
|
+
"X-Fern-SDK-Version": "0.0.15",
|
|
207
|
+
"User-Agent": "@credal/sdk/0.0.15",
|
|
203
208
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
204
209
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
205
210
|
},
|
|
206
211
|
contentType: "application/json",
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}),
|
|
212
|
+
requestType: "json",
|
|
213
|
+
body: serializers.ProvideMessageFeedbackRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
210
214
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
211
215
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
212
216
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -240,10 +244,17 @@ class Copilots {
|
|
|
240
244
|
* @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
|
|
241
245
|
*
|
|
242
246
|
* @example
|
|
243
|
-
* await
|
|
247
|
+
* await client.copilots.sendMessage({
|
|
244
248
|
* agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
245
249
|
* message: "Is Credal SOC 2 compliant?",
|
|
246
|
-
* userEmail: "ravin@credal.ai"
|
|
250
|
+
* userEmail: "ravin@credal.ai",
|
|
251
|
+
* inputVariables: [{
|
|
252
|
+
* name: "input1",
|
|
253
|
+
* urls: ["https://drive.google.com/file/d/123456/view"]
|
|
254
|
+
* }, {
|
|
255
|
+
* name: "input2",
|
|
256
|
+
* urls: ["https://drive.google.com/file/d/123457/view", "https://drive.google.com/file/d/123458/view"]
|
|
257
|
+
* }]
|
|
247
258
|
* })
|
|
248
259
|
*/
|
|
249
260
|
sendMessage(request, requestOptions) {
|
|
@@ -256,18 +267,20 @@ class Copilots {
|
|
|
256
267
|
Authorization: yield this._getAuthorizationHeader(),
|
|
257
268
|
"X-Fern-Language": "JavaScript",
|
|
258
269
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
259
|
-
"X-Fern-SDK-Version": "0.0.
|
|
270
|
+
"X-Fern-SDK-Version": "0.0.15",
|
|
271
|
+
"User-Agent": "@credal/sdk/0.0.15",
|
|
260
272
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
261
273
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
262
274
|
},
|
|
263
275
|
contentType: "application/json",
|
|
264
|
-
|
|
276
|
+
requestType: "json",
|
|
277
|
+
body: serializers.SendMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
265
278
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
266
279
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
267
280
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
268
281
|
});
|
|
269
282
|
if (_response.ok) {
|
|
270
|
-
return
|
|
283
|
+
return serializers.SendAgentMessageResponse.parseOrThrow(_response.body, {
|
|
271
284
|
unrecognizedObjectKeys: "passthrough",
|
|
272
285
|
allowUnrecognizedUnionMembers: true,
|
|
273
286
|
allowUnrecognizedEnumValues: true,
|
|
@@ -295,6 +308,71 @@ class Copilots {
|
|
|
295
308
|
}
|
|
296
309
|
});
|
|
297
310
|
}
|
|
311
|
+
/**
|
|
312
|
+
* This endpoint allows you to send a message to a specific copilot and get the response back as a streamed set of Server-Sent Events.
|
|
313
|
+
*/
|
|
314
|
+
streamMessage(request, requestOptions) {
|
|
315
|
+
var _a, _b;
|
|
316
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
317
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
318
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CredalEnvironment.Production, "/v0/copilots/streamMessage"),
|
|
319
|
+
method: "POST",
|
|
320
|
+
headers: {
|
|
321
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
322
|
+
"X-Fern-Language": "JavaScript",
|
|
323
|
+
"X-Fern-SDK-Name": "@credal/sdk",
|
|
324
|
+
"X-Fern-SDK-Version": "0.0.15",
|
|
325
|
+
"User-Agent": "@credal/sdk/0.0.15",
|
|
326
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
327
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
328
|
+
},
|
|
329
|
+
contentType: "application/json",
|
|
330
|
+
requestType: "json",
|
|
331
|
+
body: serializers.StreamMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
332
|
+
responseType: "sse",
|
|
333
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
334
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
335
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
336
|
+
});
|
|
337
|
+
if (_response.ok) {
|
|
338
|
+
return new core.Stream({
|
|
339
|
+
stream: _response.body,
|
|
340
|
+
parse: (data) => __awaiter(this, void 0, void 0, function* () {
|
|
341
|
+
return serializers.StreamingChunk.parseOrThrow(data, {
|
|
342
|
+
unrecognizedObjectKeys: "passthrough",
|
|
343
|
+
allowUnrecognizedUnionMembers: true,
|
|
344
|
+
allowUnrecognizedEnumValues: true,
|
|
345
|
+
breadcrumbsPrefix: ["response"],
|
|
346
|
+
});
|
|
347
|
+
}),
|
|
348
|
+
signal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
349
|
+
eventShape: {
|
|
350
|
+
type: "sse",
|
|
351
|
+
streamTerminator: "[DONE]",
|
|
352
|
+
},
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
if (_response.error.reason === "status-code") {
|
|
356
|
+
throw new errors.CredalError({
|
|
357
|
+
statusCode: _response.error.statusCode,
|
|
358
|
+
body: _response.error.body,
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
switch (_response.error.reason) {
|
|
362
|
+
case "non-json":
|
|
363
|
+
throw new errors.CredalError({
|
|
364
|
+
statusCode: _response.error.statusCode,
|
|
365
|
+
body: _response.error.rawBody,
|
|
366
|
+
});
|
|
367
|
+
case "timeout":
|
|
368
|
+
throw new errors.CredalTimeoutError();
|
|
369
|
+
case "unknown":
|
|
370
|
+
throw new errors.CredalError({
|
|
371
|
+
message: _response.error.errorMessage,
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
});
|
|
375
|
+
}
|
|
298
376
|
/**
|
|
299
377
|
* Link a collection with a copilot. The API Key used must be added to both the collection and the copilot beforehand.
|
|
300
378
|
*
|
|
@@ -302,7 +380,7 @@ class Copilots {
|
|
|
302
380
|
* @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
|
|
303
381
|
*
|
|
304
382
|
* @example
|
|
305
|
-
* await
|
|
383
|
+
* await client.copilots.addCollectionToCopilot({
|
|
306
384
|
* copilotId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
307
385
|
* collectionId: "def1055f-83c5-43d6-b558-f7a38e7b299e"
|
|
308
386
|
* })
|
|
@@ -317,14 +395,14 @@ class Copilots {
|
|
|
317
395
|
Authorization: yield this._getAuthorizationHeader(),
|
|
318
396
|
"X-Fern-Language": "JavaScript",
|
|
319
397
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
320
|
-
"X-Fern-SDK-Version": "0.0.
|
|
398
|
+
"X-Fern-SDK-Version": "0.0.15",
|
|
399
|
+
"User-Agent": "@credal/sdk/0.0.15",
|
|
321
400
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
322
401
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
323
402
|
},
|
|
324
403
|
contentType: "application/json",
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
}),
|
|
404
|
+
requestType: "json",
|
|
405
|
+
body: serializers.AddCollectionToCopilotRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
328
406
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
329
407
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
330
408
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -360,7 +438,7 @@ class Copilots {
|
|
|
360
438
|
* @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
|
|
361
439
|
*
|
|
362
440
|
* @example
|
|
363
|
-
* await
|
|
441
|
+
* await client.copilots.removeCollectionFromCopilot({
|
|
364
442
|
* copilotId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
365
443
|
* collectionId: "def1055f-83c5-43d6-b558-f7a38e7b299e"
|
|
366
444
|
* })
|
|
@@ -375,12 +453,14 @@ class Copilots {
|
|
|
375
453
|
Authorization: yield this._getAuthorizationHeader(),
|
|
376
454
|
"X-Fern-Language": "JavaScript",
|
|
377
455
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
378
|
-
"X-Fern-SDK-Version": "0.0.
|
|
456
|
+
"X-Fern-SDK-Version": "0.0.15",
|
|
457
|
+
"User-Agent": "@credal/sdk/0.0.15",
|
|
379
458
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
380
459
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
381
460
|
},
|
|
382
461
|
contentType: "application/json",
|
|
383
|
-
|
|
462
|
+
requestType: "json",
|
|
463
|
+
body: serializers.RemoveCollectionFromCopilotRequest.jsonOrThrow(request, {
|
|
384
464
|
unrecognizedObjectKeys: "strip",
|
|
385
465
|
}),
|
|
386
466
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -418,7 +498,7 @@ class Copilots {
|
|
|
418
498
|
* @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
|
|
419
499
|
*
|
|
420
500
|
* @example
|
|
421
|
-
* await
|
|
501
|
+
* await client.copilots.updateConfiguration({
|
|
422
502
|
* copilotId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
423
503
|
* configuration: {
|
|
424
504
|
* name: "Customer Copilot",
|
|
@@ -441,14 +521,14 @@ class Copilots {
|
|
|
441
521
|
Authorization: yield this._getAuthorizationHeader(),
|
|
442
522
|
"X-Fern-Language": "JavaScript",
|
|
443
523
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
444
|
-
"X-Fern-SDK-Version": "0.0.
|
|
524
|
+
"X-Fern-SDK-Version": "0.0.15",
|
|
525
|
+
"User-Agent": "@credal/sdk/0.0.15",
|
|
445
526
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
446
527
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
447
528
|
},
|
|
448
529
|
contentType: "application/json",
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
}),
|
|
530
|
+
requestType: "json",
|
|
531
|
+
body: serializers.UpdateConfigurationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
452
532
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
453
533
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
454
534
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -482,7 +562,7 @@ class Copilots {
|
|
|
482
562
|
* @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
|
|
483
563
|
*
|
|
484
564
|
* @example
|
|
485
|
-
* await
|
|
565
|
+
* await client.copilots.deleteCopilot({
|
|
486
566
|
* id: "ac20e6ba-0bae-11ef-b25a-efca73df4c3a"
|
|
487
567
|
* })
|
|
488
568
|
*/
|
|
@@ -496,18 +576,20 @@ class Copilots {
|
|
|
496
576
|
Authorization: yield this._getAuthorizationHeader(),
|
|
497
577
|
"X-Fern-Language": "JavaScript",
|
|
498
578
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
499
|
-
"X-Fern-SDK-Version": "0.0.
|
|
579
|
+
"X-Fern-SDK-Version": "0.0.15",
|
|
580
|
+
"User-Agent": "@credal/sdk/0.0.15",
|
|
500
581
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
501
582
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
502
583
|
},
|
|
503
584
|
contentType: "application/json",
|
|
504
|
-
|
|
585
|
+
requestType: "json",
|
|
586
|
+
body: serializers.DeleteCopilotRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
505
587
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
506
588
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
507
589
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
508
590
|
});
|
|
509
591
|
if (_response.ok) {
|
|
510
|
-
return
|
|
592
|
+
return serializers.DeleteCopilotResponse.parseOrThrow(_response.body, {
|
|
511
593
|
unrecognizedObjectKeys: "passthrough",
|
|
512
594
|
allowUnrecognizedUnionMembers: true,
|
|
513
595
|
allowUnrecognizedEnumValues: true,
|
|
@@ -9,7 +9,7 @@ import * as Credal from "../../../../index";
|
|
|
9
9
|
* description: "This copilot is used to answer customer requests based on internal documentation.",
|
|
10
10
|
* collaborators: [{
|
|
11
11
|
* email: "test@gmail.com",
|
|
12
|
-
* role:
|
|
12
|
+
* role: "editor"
|
|
13
13
|
* }]
|
|
14
14
|
* }
|
|
15
15
|
*/
|
|
@@ -9,7 +9,7 @@ import * as Credal from "../../../../index";
|
|
|
9
9
|
* messageId: "dd721cd8-4bf2-4b94-9869-258df3dab9dc",
|
|
10
10
|
* agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
11
11
|
* messageFeedback: {
|
|
12
|
-
* feedback:
|
|
12
|
+
* feedback: "NEGATIVE",
|
|
13
13
|
* suggestedAnswer: "Yes, Credal is SOC 2 compliant."
|
|
14
14
|
* }
|
|
15
15
|
* }
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as Credal from "../../../../index";
|
|
4
5
|
/**
|
|
5
6
|
* @example
|
|
6
7
|
* {
|
|
7
8
|
* agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
8
9
|
* message: "Is Credal SOC 2 compliant?",
|
|
9
|
-
* userEmail: "ravin@credal.ai"
|
|
10
|
+
* userEmail: "ravin@credal.ai",
|
|
11
|
+
* inputVariables: [{
|
|
12
|
+
* name: "input1",
|
|
13
|
+
* urls: ["https://drive.google.com/file/d/123456/view"]
|
|
14
|
+
* }, {
|
|
15
|
+
* name: "input2",
|
|
16
|
+
* urls: ["https://drive.google.com/file/d/123457/view", "https://drive.google.com/file/d/123458/view"]
|
|
17
|
+
* }]
|
|
10
18
|
* }
|
|
11
19
|
*/
|
|
12
20
|
export interface SendMessageRequest {
|
|
@@ -30,4 +38,9 @@ export interface SendMessageRequest {
|
|
|
30
38
|
*
|
|
31
39
|
*/
|
|
32
40
|
conversationId?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Optional input variables to be used in the message. Map the name of the variable to a list of urls.
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
inputVariables?: Credal.InputVariable[];
|
|
33
46
|
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Credal from "../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* copilotId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
9
|
+
* message: "Is Credal SOC 2 compliant?",
|
|
10
|
+
* email: "ravin@credal.ai",
|
|
11
|
+
* inputVariables: [{
|
|
12
|
+
* name: "input1",
|
|
13
|
+
* urls: ["https://drive.google.com/file/d/123456/view"]
|
|
14
|
+
* }, {
|
|
15
|
+
* name: "input2",
|
|
16
|
+
* urls: ["https://drive.google.com/file/d/123457/view", "https://drive.google.com/file/d/123458/view"]
|
|
17
|
+
* }]
|
|
18
|
+
* }
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* {
|
|
22
|
+
* copilotId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
23
|
+
* message: "Is this user eligible for benefits based on their date of birth?",
|
|
24
|
+
* email: "ravin@credal.ai",
|
|
25
|
+
* inputVariables: [{
|
|
26
|
+
* name: "input1",
|
|
27
|
+
* urls: ["https://drive.google.com/file/d/123456/view"]
|
|
28
|
+
* }, {
|
|
29
|
+
* name: "input2",
|
|
30
|
+
* urls: ["https://drive.google.com/file/d/123457/view", "https://drive.google.com/file/d/123458/view"]
|
|
31
|
+
* }]
|
|
32
|
+
* }
|
|
33
|
+
*/
|
|
34
|
+
export interface StreamMessageRequest {
|
|
35
|
+
/**
|
|
36
|
+
* Credal-generated Copilot ID to specify which agent to route the request to.
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
copilotId: string;
|
|
40
|
+
/**
|
|
41
|
+
* The message you want to send to your copilot.
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
message: string;
|
|
45
|
+
/**
|
|
46
|
+
* The user profile you want to use when sending the message.
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
49
|
+
email: string;
|
|
50
|
+
/**
|
|
51
|
+
* Credal-generated conversation ID for sending follow up messages. Conversation ID is returned after initial message. Optional, to be left off for first messages on new conversations.
|
|
52
|
+
*
|
|
53
|
+
*/
|
|
54
|
+
conversationId?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Optional input variables to be used in the message. Map the name of the variable to a list of urls.
|
|
57
|
+
*
|
|
58
|
+
*/
|
|
59
|
+
inputVariables?: Credal.InputVariable[];
|
|
60
|
+
}
|
|
@@ -2,6 +2,7 @@ export { type CreateCopilotRequest } from "./CreateCopilotRequest";
|
|
|
2
2
|
export { type CreateConversationRequest } from "./CreateConversationRequest";
|
|
3
3
|
export { type ProvideMessageFeedbackRequest } from "./ProvideMessageFeedbackRequest";
|
|
4
4
|
export { type SendMessageRequest } from "./SendMessageRequest";
|
|
5
|
+
export { type StreamMessageRequest } from "./StreamMessageRequest";
|
|
5
6
|
export { type AddCollectionToCopilotRequest } from "./AddCollectionToCopilotRequest";
|
|
6
7
|
export { type RemoveCollectionFromCopilotRequest } from "./RemoveCollectionFromCopilotRequest";
|
|
7
8
|
export { type UpdateConfigurationRequest } from "./UpdateConfigurationRequest";
|
|
@@ -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 BlockedChunk {
|
|
6
|
+
conversationId: string;
|
|
7
|
+
warnings: string[];
|
|
8
|
+
blocks: string[];
|
|
9
|
+
policyTriggers: Credal.PolicyTrigger[];
|
|
10
|
+
}
|
|
@@ -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
|
+
}
|