@credal/sdk 0.1.8 → 0.1.9
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/dist/cjs/BaseClient.d.ts +2 -2
- package/dist/cjs/Client.d.ts +1 -1
- package/dist/cjs/Client.js +4 -4
- package/dist/cjs/api/resources/common/types/Collaborator.d.ts +1 -1
- package/dist/cjs/api/resources/common/types/ExternalResourceId.d.ts +1 -1
- package/dist/cjs/api/resources/common/types/ResourceIdentifier.d.ts +1 -1
- package/dist/cjs/api/resources/common/types/index.d.ts +5 -5
- package/dist/cjs/api/resources/common/types/index.js +5 -5
- package/dist/cjs/api/resources/copilots/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/copilots/client/Client.js +12 -12
- package/dist/cjs/api/resources/copilots/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/copilots/client/requests/CreateCopilotRequest.d.ts +1 -1
- package/dist/cjs/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.ts +1 -1
- package/dist/cjs/api/resources/copilots/client/requests/SendMessageRequest.d.ts +1 -1
- package/dist/cjs/api/resources/copilots/client/requests/StreamMessageRequest.d.ts +1 -1
- package/dist/cjs/api/resources/copilots/client/requests/UpdateConfigurationRequest.d.ts +1 -1
- package/dist/cjs/api/resources/copilots/client/requests/index.d.ts +9 -9
- package/dist/cjs/api/resources/copilots/index.d.ts +1 -1
- package/dist/cjs/api/resources/copilots/index.js +1 -1
- package/dist/cjs/api/resources/copilots/types/CollectionFilteredData.d.ts +1 -1
- package/dist/cjs/api/resources/copilots/types/Configuration.d.ts +1 -1
- package/dist/cjs/api/resources/copilots/types/DataFilter.d.ts +1 -1
- package/dist/cjs/api/resources/copilots/types/DatetimeFieldSchema.d.ts +1 -1
- package/dist/cjs/api/resources/copilots/types/EndOfMessageChunk.d.ts +1 -2
- package/dist/cjs/api/resources/copilots/types/ErrorChunk.d.ts +1 -1
- package/dist/cjs/api/resources/copilots/types/Filter.d.ts +1 -1
- package/dist/cjs/api/resources/copilots/types/FinalChunk.d.ts +1 -1
- package/dist/cjs/api/resources/copilots/types/InitialChunk.d.ts +1 -1
- package/dist/cjs/api/resources/copilots/types/MessageBlocked.d.ts +1 -1
- package/dist/cjs/api/resources/copilots/types/MessageFeedback.d.ts +1 -1
- package/dist/cjs/api/resources/copilots/types/MessageReply.d.ts +1 -1
- package/dist/cjs/api/resources/copilots/types/NumberFieldSchema.d.ts +1 -1
- package/dist/cjs/api/resources/copilots/types/ReferencedSource.d.ts +1 -1
- package/dist/cjs/api/resources/copilots/types/SendAgentMessageResponse.d.ts +1 -1
- package/dist/cjs/api/resources/copilots/types/SendMessageResponse.d.ts +1 -1
- package/dist/cjs/api/resources/copilots/types/StreamingChunk.d.ts +1 -1
- package/dist/cjs/api/resources/copilots/types/StringFieldSchema.d.ts +1 -1
- package/dist/cjs/api/resources/copilots/types/index.d.ts +24 -24
- package/dist/cjs/api/resources/copilots/types/index.js +24 -24
- package/dist/cjs/api/resources/documentCatalog/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/documentCatalog/client/Client.js +6 -6
- package/dist/cjs/api/resources/documentCatalog/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.d.ts +1 -1
- package/dist/cjs/api/resources/documentCatalog/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/documentCatalog/index.d.ts +1 -1
- package/dist/cjs/api/resources/documentCatalog/index.js +1 -1
- package/dist/cjs/api/resources/documentCatalog/types/DocumentMetadataPatch.d.ts +1 -1
- package/dist/cjs/api/resources/documentCatalog/types/DocumentMetadataPatchRequest.d.ts +1 -1
- package/dist/cjs/api/resources/documentCatalog/types/index.d.ts +1 -1
- package/dist/cjs/api/resources/documentCatalog/types/index.js +1 -1
- package/dist/cjs/api/resources/documentCollections/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/documentCollections/client/Client.js +11 -11
- package/dist/cjs/api/resources/documentCollections/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.d.ts +1 -1
- package/dist/cjs/api/resources/documentCollections/client/requests/CreateCollectionRequest.d.ts +1 -1
- package/dist/cjs/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.d.ts +1 -1
- package/dist/cjs/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.d.ts +1 -1
- package/dist/cjs/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.d.ts +1 -1
- package/dist/cjs/api/resources/documentCollections/client/requests/index.d.ts +7 -7
- package/dist/cjs/api/resources/documentCollections/index.d.ts +1 -1
- package/dist/cjs/api/resources/documentCollections/index.js +1 -1
- package/dist/cjs/api/resources/documentCollections/types/ListDocumentsInCollectionResponse.d.ts +1 -1
- package/dist/cjs/api/resources/documentCollections/types/MongoCollectionSyncConfig.d.ts +1 -1
- package/dist/cjs/api/resources/documentCollections/types/index.d.ts +1 -1
- package/dist/cjs/api/resources/documentCollections/types/index.js +1 -1
- package/dist/cjs/api/resources/index.d.ts +4 -4
- package/dist/cjs/api/resources/index.js +4 -4
- package/dist/cjs/api/resources/search/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/search/client/Client.js +4 -4
- package/dist/cjs/api/resources/search/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/search/client/requests/SearchDocumentCollectionRequest.d.ts +1 -1
- package/dist/cjs/api/resources/search/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/search/index.d.ts +1 -1
- package/dist/cjs/api/resources/search/index.js +1 -1
- package/dist/cjs/api/resources/search/types/DocumentCollectionSearchResult.d.ts +1 -1
- package/dist/cjs/api/resources/search/types/SearchDocumentCollectionResponse.d.ts +1 -1
- package/dist/cjs/api/resources/search/types/SingleFieldFilter.d.ts +1 -1
- package/dist/cjs/api/resources/search/types/index.d.ts +1 -1
- package/dist/cjs/api/resources/search/types/index.js +1 -1
- package/dist/cjs/api/resources/users/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/users/client/Client.js +4 -4
- package/dist/cjs/api/resources/users/index.d.ts +1 -1
- package/dist/cjs/api/resources/users/index.js +1 -1
- package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +1 -1
- package/dist/cjs/core/fetcher/Fetcher.js +2 -1
- package/dist/cjs/core/fetcher/getErrorResponseBody.js +2 -1
- package/dist/cjs/core/fetcher/getResponseBody.js +3 -3
- package/dist/cjs/core/fetcher/makeRequest.js +2 -2
- package/dist/cjs/core/fetcher/requestWithRetries.js +3 -3
- package/dist/cjs/core/index.d.ts +3 -3
- package/dist/cjs/core/index.js +3 -3
- package/dist/cjs/core/stream/Stream.d.ts +1 -0
- package/dist/cjs/core/stream/Stream.js +8 -5
- package/dist/cjs/core/url/encodePathParam.d.ts +1 -0
- package/dist/cjs/core/url/encodePathParam.js +21 -0
- package/dist/cjs/core/url/index.d.ts +1 -0
- package/dist/cjs/core/url/index.js +3 -1
- package/dist/cjs/core/url/join.js +3 -3
- package/dist/cjs/errors/CredalError.d.ts +1 -1
- package/dist/cjs/errors/CredalError.js +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +2 -2
- package/dist/esm/BaseClient.mjs +1 -2
- package/dist/esm/Client.d.mts +1 -1
- package/dist/esm/Client.mjs +4 -5
- package/dist/esm/api/resources/common/types/Collaborator.d.mts +1 -1
- package/dist/esm/api/resources/common/types/Collaborator.mjs +1 -1
- package/dist/esm/api/resources/common/types/ExternalResourceId.d.mts +1 -1
- package/dist/esm/api/resources/common/types/ExternalResourceId.mjs +1 -1
- package/dist/esm/api/resources/common/types/ResourceIdentifier.d.mts +1 -1
- package/dist/esm/api/resources/common/types/ResourceIdentifier.mjs +1 -1
- package/dist/esm/api/resources/common/types/index.d.mts +5 -5
- package/dist/esm/api/resources/common/types/index.mjs +5 -5
- package/dist/esm/api/resources/copilots/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/copilots/client/Client.mjs +12 -13
- package/dist/esm/api/resources/copilots/client/index.d.mts +0 -1
- package/dist/esm/api/resources/copilots/client/index.mjs +0 -1
- package/dist/esm/api/resources/copilots/client/requests/CreateCopilotRequest.d.mts +1 -1
- package/dist/esm/api/resources/copilots/client/requests/CreateCopilotRequest.mjs +1 -1
- package/dist/esm/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.mts +1 -1
- package/dist/esm/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.mjs +1 -1
- package/dist/esm/api/resources/copilots/client/requests/SendMessageRequest.d.mts +1 -1
- package/dist/esm/api/resources/copilots/client/requests/SendMessageRequest.mjs +1 -1
- package/dist/esm/api/resources/copilots/client/requests/StreamMessageRequest.d.mts +1 -1
- package/dist/esm/api/resources/copilots/client/requests/StreamMessageRequest.mjs +1 -1
- package/dist/esm/api/resources/copilots/client/requests/UpdateConfigurationRequest.d.mts +1 -1
- package/dist/esm/api/resources/copilots/client/requests/UpdateConfigurationRequest.mjs +1 -1
- package/dist/esm/api/resources/copilots/client/requests/index.d.mts +9 -9
- package/dist/esm/api/resources/copilots/client/requests/index.mjs +1 -9
- package/dist/esm/api/resources/copilots/index.d.mts +1 -1
- package/dist/esm/api/resources/copilots/index.mjs +1 -1
- package/dist/esm/api/resources/copilots/types/CollectionFilteredData.d.mts +1 -1
- package/dist/esm/api/resources/copilots/types/CollectionFilteredData.mjs +1 -1
- package/dist/esm/api/resources/copilots/types/Configuration.d.mts +1 -1
- package/dist/esm/api/resources/copilots/types/Configuration.mjs +1 -1
- package/dist/esm/api/resources/copilots/types/DataFilter.d.mts +1 -1
- package/dist/esm/api/resources/copilots/types/DataFilter.mjs +1 -1
- package/dist/esm/api/resources/copilots/types/DatetimeFieldSchema.d.mts +1 -1
- package/dist/esm/api/resources/copilots/types/DatetimeFieldSchema.mjs +1 -1
- package/dist/esm/api/resources/copilots/types/EndOfMessageChunk.d.mts +1 -2
- package/dist/esm/api/resources/copilots/types/ErrorChunk.d.mts +1 -1
- package/dist/esm/api/resources/copilots/types/ErrorChunk.mjs +1 -1
- package/dist/esm/api/resources/copilots/types/Filter.d.mts +1 -1
- package/dist/esm/api/resources/copilots/types/Filter.mjs +1 -1
- package/dist/esm/api/resources/copilots/types/FinalChunk.d.mts +1 -1
- package/dist/esm/api/resources/copilots/types/FinalChunk.mjs +1 -1
- package/dist/esm/api/resources/copilots/types/InitialChunk.d.mts +1 -1
- package/dist/esm/api/resources/copilots/types/InitialChunk.mjs +1 -1
- package/dist/esm/api/resources/copilots/types/MessageBlocked.d.mts +1 -1
- package/dist/esm/api/resources/copilots/types/MessageBlocked.mjs +1 -1
- package/dist/esm/api/resources/copilots/types/MessageFeedback.d.mts +1 -1
- package/dist/esm/api/resources/copilots/types/MessageFeedback.mjs +1 -1
- package/dist/esm/api/resources/copilots/types/MessageReply.d.mts +1 -1
- package/dist/esm/api/resources/copilots/types/MessageReply.mjs +1 -1
- package/dist/esm/api/resources/copilots/types/NumberFieldSchema.d.mts +1 -1
- package/dist/esm/api/resources/copilots/types/NumberFieldSchema.mjs +1 -1
- package/dist/esm/api/resources/copilots/types/ReferencedSource.d.mts +1 -1
- package/dist/esm/api/resources/copilots/types/ReferencedSource.mjs +1 -1
- package/dist/esm/api/resources/copilots/types/SendAgentMessageResponse.d.mts +1 -1
- package/dist/esm/api/resources/copilots/types/SendAgentMessageResponse.mjs +1 -1
- package/dist/esm/api/resources/copilots/types/SendMessageResponse.d.mts +1 -1
- package/dist/esm/api/resources/copilots/types/SendMessageResponse.mjs +1 -1
- package/dist/esm/api/resources/copilots/types/StreamingChunk.d.mts +1 -1
- package/dist/esm/api/resources/copilots/types/StreamingChunk.mjs +1 -1
- package/dist/esm/api/resources/copilots/types/StringFieldSchema.d.mts +1 -1
- package/dist/esm/api/resources/copilots/types/StringFieldSchema.mjs +1 -1
- package/dist/esm/api/resources/copilots/types/index.d.mts +24 -24
- package/dist/esm/api/resources/copilots/types/index.mjs +24 -24
- package/dist/esm/api/resources/documentCatalog/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/documentCatalog/client/Client.mjs +6 -7
- package/dist/esm/api/resources/documentCatalog/client/index.d.mts +0 -1
- package/dist/esm/api/resources/documentCatalog/client/index.mjs +0 -1
- package/dist/esm/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.d.mts +1 -1
- package/dist/esm/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.mjs +1 -1
- package/dist/esm/api/resources/documentCatalog/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/documentCatalog/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/documentCatalog/index.d.mts +1 -1
- package/dist/esm/api/resources/documentCatalog/index.mjs +1 -1
- package/dist/esm/api/resources/documentCatalog/types/DocumentMetadataPatch.d.mts +1 -1
- package/dist/esm/api/resources/documentCatalog/types/DocumentMetadataPatch.mjs +1 -1
- package/dist/esm/api/resources/documentCatalog/types/DocumentMetadataPatchRequest.d.mts +1 -1
- package/dist/esm/api/resources/documentCatalog/types/DocumentMetadataPatchRequest.mjs +1 -1
- package/dist/esm/api/resources/documentCatalog/types/index.d.mts +1 -1
- package/dist/esm/api/resources/documentCatalog/types/index.mjs +1 -1
- package/dist/esm/api/resources/documentCollections/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/documentCollections/client/Client.mjs +11 -12
- package/dist/esm/api/resources/documentCollections/client/index.d.mts +0 -1
- package/dist/esm/api/resources/documentCollections/client/index.mjs +0 -1
- package/dist/esm/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.d.mts +1 -1
- package/dist/esm/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.mjs +1 -1
- package/dist/esm/api/resources/documentCollections/client/requests/CreateCollectionRequest.d.mts +1 -1
- package/dist/esm/api/resources/documentCollections/client/requests/CreateCollectionRequest.mjs +1 -1
- package/dist/esm/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.d.mts +1 -1
- package/dist/esm/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.mjs +1 -1
- package/dist/esm/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.d.mts +1 -1
- package/dist/esm/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.mjs +1 -1
- package/dist/esm/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.d.mts +1 -1
- package/dist/esm/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.mjs +1 -1
- package/dist/esm/api/resources/documentCollections/client/requests/index.d.mts +7 -7
- package/dist/esm/api/resources/documentCollections/client/requests/index.mjs +1 -7
- package/dist/esm/api/resources/documentCollections/index.d.mts +1 -1
- package/dist/esm/api/resources/documentCollections/index.mjs +1 -1
- package/dist/esm/api/resources/documentCollections/types/ListDocumentsInCollectionResponse.d.mts +1 -1
- package/dist/esm/api/resources/documentCollections/types/ListDocumentsInCollectionResponse.mjs +1 -1
- package/dist/esm/api/resources/documentCollections/types/MongoCollectionSyncConfig.d.mts +1 -1
- package/dist/esm/api/resources/documentCollections/types/MongoCollectionSyncConfig.mjs +1 -1
- package/dist/esm/api/resources/documentCollections/types/index.d.mts +1 -1
- package/dist/esm/api/resources/documentCollections/types/index.mjs +1 -1
- package/dist/esm/api/resources/index.d.mts +4 -4
- package/dist/esm/api/resources/index.mjs +4 -4
- package/dist/esm/api/resources/search/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/search/client/Client.mjs +4 -5
- package/dist/esm/api/resources/search/client/index.d.mts +0 -1
- package/dist/esm/api/resources/search/client/index.mjs +0 -1
- package/dist/esm/api/resources/search/client/requests/SearchDocumentCollectionRequest.d.mts +1 -1
- package/dist/esm/api/resources/search/client/requests/SearchDocumentCollectionRequest.mjs +1 -1
- package/dist/esm/api/resources/search/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/search/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/search/index.d.mts +1 -1
- package/dist/esm/api/resources/search/index.mjs +1 -1
- package/dist/esm/api/resources/search/types/DocumentCollectionSearchResult.d.mts +1 -1
- package/dist/esm/api/resources/search/types/DocumentCollectionSearchResult.mjs +1 -1
- package/dist/esm/api/resources/search/types/SearchDocumentCollectionResponse.d.mts +1 -1
- package/dist/esm/api/resources/search/types/SearchDocumentCollectionResponse.mjs +1 -1
- package/dist/esm/api/resources/search/types/SingleFieldFilter.d.mts +1 -1
- package/dist/esm/api/resources/search/types/SingleFieldFilter.mjs +1 -1
- package/dist/esm/api/resources/search/types/index.d.mts +1 -1
- package/dist/esm/api/resources/search/types/index.mjs +1 -1
- package/dist/esm/api/resources/users/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/users/client/Client.mjs +4 -5
- package/dist/esm/api/resources/users/index.d.mts +1 -1
- package/dist/esm/api/resources/users/index.mjs +1 -1
- package/dist/esm/core/fetcher/EndpointSupplier.d.mts +1 -1
- package/dist/esm/core/fetcher/EndpointSupplier.mjs +0 -1
- package/dist/esm/core/fetcher/Fetcher.mjs +2 -1
- package/dist/esm/core/fetcher/getErrorResponseBody.mjs +2 -1
- package/dist/esm/core/fetcher/getResponseBody.mjs +3 -3
- package/dist/esm/core/fetcher/makeRequest.mjs +2 -2
- package/dist/esm/core/fetcher/requestWithRetries.mjs +3 -3
- package/dist/esm/core/index.d.mts +3 -3
- package/dist/esm/core/index.mjs +3 -3
- package/dist/esm/core/stream/Stream.d.mts +1 -0
- package/dist/esm/core/stream/Stream.mjs +8 -5
- package/dist/esm/core/url/encodePathParam.d.mts +1 -0
- package/dist/esm/core/url/encodePathParam.mjs +18 -0
- package/dist/esm/core/url/index.d.mts +1 -0
- package/dist/esm/core/url/index.mjs +1 -0
- package/dist/esm/core/url/join.mjs +3 -3
- package/dist/esm/errors/CredalError.d.mts +1 -1
- package/dist/esm/errors/CredalError.mjs +1 -2
- package/dist/esm/index.d.mts +2 -2
- package/dist/esm/index.mjs +1 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +9 -4
- package/reference.md +203 -229
|
@@ -33,6 +33,7 @@ export declare class Stream<T> implements AsyncIterable<T> {
|
|
|
33
33
|
private messageTerminator;
|
|
34
34
|
private streamTerminator;
|
|
35
35
|
private controller;
|
|
36
|
+
private decoder;
|
|
36
37
|
constructor({ stream, parse, eventShape, signal }: Stream.Args & {
|
|
37
38
|
parse: (val: unknown) => Promise<T>;
|
|
38
39
|
});
|
|
@@ -47,6 +47,10 @@ class Stream {
|
|
|
47
47
|
this.messageTerminator = eventShape.messageTerminator;
|
|
48
48
|
}
|
|
49
49
|
signal === null || signal === void 0 ? void 0 : signal.addEventListener("abort", () => this.controller.abort());
|
|
50
|
+
// Initialize shared TextDecoder
|
|
51
|
+
if (typeof TextDecoder !== "undefined") {
|
|
52
|
+
this.decoder = new TextDecoder("utf-8");
|
|
53
|
+
}
|
|
50
54
|
}
|
|
51
55
|
iterMessages() {
|
|
52
56
|
return __asyncGenerator(this, arguments, function* iterMessages_1() {
|
|
@@ -63,7 +67,7 @@ class Stream {
|
|
|
63
67
|
buf += this.decodeChunk(chunk);
|
|
64
68
|
let terminatorIndex;
|
|
65
69
|
while ((terminatorIndex = buf.indexOf(this.messageTerminator)) >= 0) {
|
|
66
|
-
let line = buf.slice(0, terminatorIndex
|
|
70
|
+
let line = buf.slice(0, terminatorIndex);
|
|
67
71
|
buf = buf.slice(terminatorIndex + this.messageTerminator.length);
|
|
68
72
|
if (!line.trim()) {
|
|
69
73
|
continue;
|
|
@@ -116,10 +120,9 @@ class Stream {
|
|
|
116
120
|
}
|
|
117
121
|
decodeChunk(chunk) {
|
|
118
122
|
let decoded = "";
|
|
119
|
-
// If TextDecoder is
|
|
120
|
-
if (
|
|
121
|
-
|
|
122
|
-
decoded += decoder.decode(chunk);
|
|
123
|
+
// If TextDecoder is available, use the streaming decoder instance
|
|
124
|
+
if (this.decoder != null) {
|
|
125
|
+
decoded += this.decoder.decode(chunk, { stream: true });
|
|
123
126
|
}
|
|
124
127
|
// Buffer is present in Node.js environment
|
|
125
128
|
else if (index_js_1.RUNTIME.type === "node" && typeof chunk !== "undefined") {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function encodePathParam(param: unknown): string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.encodePathParam = encodePathParam;
|
|
4
|
+
function encodePathParam(param) {
|
|
5
|
+
if (param === null) {
|
|
6
|
+
return "null";
|
|
7
|
+
}
|
|
8
|
+
const typeofParam = typeof param;
|
|
9
|
+
switch (typeofParam) {
|
|
10
|
+
case "undefined":
|
|
11
|
+
return "undefined";
|
|
12
|
+
case "string":
|
|
13
|
+
case "number":
|
|
14
|
+
case "boolean":
|
|
15
|
+
break;
|
|
16
|
+
default:
|
|
17
|
+
param = String(param);
|
|
18
|
+
break;
|
|
19
|
+
}
|
|
20
|
+
return encodeURIComponent(param);
|
|
21
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toQueryString = exports.join = void 0;
|
|
3
|
+
exports.toQueryString = exports.join = exports.encodePathParam = void 0;
|
|
4
|
+
var encodePathParam_js_1 = require("./encodePathParam.js");
|
|
5
|
+
Object.defineProperty(exports, "encodePathParam", { enumerable: true, get: function () { return encodePathParam_js_1.encodePathParam; } });
|
|
4
6
|
var join_js_1 = require("./join.js");
|
|
5
7
|
Object.defineProperty(exports, "join", { enumerable: true, get: function () { return join_js_1.join; } });
|
|
6
8
|
var qs_js_1 = require("./qs.js");
|
|
@@ -18,7 +18,7 @@ function join(base, ...segments) {
|
|
|
18
18
|
return joinPath(base, ...segments);
|
|
19
19
|
}
|
|
20
20
|
const lastSegment = segments[segments.length - 1];
|
|
21
|
-
const shouldPreserveTrailingSlash = lastSegment
|
|
21
|
+
const shouldPreserveTrailingSlash = lastSegment === null || lastSegment === void 0 ? void 0 : lastSegment.endsWith("/");
|
|
22
22
|
for (const segment of segments) {
|
|
23
23
|
const cleanSegment = trimSlashes(segment);
|
|
24
24
|
if (cleanSegment) {
|
|
@@ -38,7 +38,7 @@ function joinPath(base, ...segments) {
|
|
|
38
38
|
}
|
|
39
39
|
let result = base;
|
|
40
40
|
const lastSegment = segments[segments.length - 1];
|
|
41
|
-
const shouldPreserveTrailingSlash = lastSegment
|
|
41
|
+
const shouldPreserveTrailingSlash = lastSegment === null || lastSegment === void 0 ? void 0 : lastSegment.endsWith("/");
|
|
42
42
|
for (const segment of segments) {
|
|
43
43
|
const cleanSegment = trimSlashes(segment);
|
|
44
44
|
if (cleanSegment) {
|
|
@@ -54,7 +54,7 @@ function joinPathSegments(left, right) {
|
|
|
54
54
|
if (left.endsWith("/")) {
|
|
55
55
|
return left + right;
|
|
56
56
|
}
|
|
57
|
-
return left
|
|
57
|
+
return `${left}/${right}`;
|
|
58
58
|
}
|
|
59
59
|
function trimSlashes(str) {
|
|
60
60
|
if (!str)
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * as Credal from "./api/index.js";
|
|
2
|
-
export {
|
|
3
|
-
export { type BaseClientOptions, type BaseRequestOptions } from "./BaseClient.js";
|
|
2
|
+
export type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
|
|
4
3
|
export { CredalClient } from "./Client.js";
|
|
5
4
|
export { CredalEnvironment } from "./environments.js";
|
|
5
|
+
export { CredalError, CredalTimeoutError } from "./errors/index.js";
|
package/dist/cjs/index.js
CHANGED
|
@@ -33,12 +33,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.
|
|
36
|
+
exports.CredalTimeoutError = exports.CredalError = exports.CredalEnvironment = exports.CredalClient = exports.Credal = void 0;
|
|
37
37
|
exports.Credal = __importStar(require("./api/index.js"));
|
|
38
|
-
var index_js_1 = require("./errors/index.js");
|
|
39
|
-
Object.defineProperty(exports, "CredalError", { enumerable: true, get: function () { return index_js_1.CredalError; } });
|
|
40
|
-
Object.defineProperty(exports, "CredalTimeoutError", { enumerable: true, get: function () { return index_js_1.CredalTimeoutError; } });
|
|
41
38
|
var Client_js_1 = require("./Client.js");
|
|
42
39
|
Object.defineProperty(exports, "CredalClient", { enumerable: true, get: function () { return Client_js_1.CredalClient; } });
|
|
43
40
|
var environments_js_1 = require("./environments.js");
|
|
44
41
|
Object.defineProperty(exports, "CredalEnvironment", { enumerable: true, get: function () { return environments_js_1.CredalEnvironment; } });
|
|
42
|
+
var index_js_1 = require("./errors/index.js");
|
|
43
|
+
Object.defineProperty(exports, "CredalError", { enumerable: true, get: function () { return index_js_1.CredalError; } });
|
|
44
|
+
Object.defineProperty(exports, "CredalTimeoutError", { enumerable: true, get: function () { return index_js_1.CredalTimeoutError; } });
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.1.
|
|
1
|
+
export declare const SDK_VERSION = "0.1.9";
|
package/dist/cjs/version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import type * as core from "./core/index.mjs";
|
|
2
|
+
import type * as environments from "./environments.mjs";
|
|
3
3
|
export interface BaseClientOptions {
|
|
4
4
|
environment?: core.Supplier<environments.CredalEnvironment | string>;
|
|
5
5
|
/** Specify a custom URL to connect the client to. */
|
package/dist/esm/BaseClient.mjs
CHANGED
package/dist/esm/Client.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.mjs";
|
|
2
1
|
import { Copilots } from "./api/resources/copilots/client/Client.mjs";
|
|
3
2
|
import { DocumentCatalog } from "./api/resources/documentCatalog/client/Client.mjs";
|
|
4
3
|
import { DocumentCollections } from "./api/resources/documentCollections/client/Client.mjs";
|
|
5
4
|
import { Search } from "./api/resources/search/client/Client.mjs";
|
|
6
5
|
import { Users } from "./api/resources/users/client/Client.mjs";
|
|
6
|
+
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.mjs";
|
|
7
7
|
export declare namespace CredalClient {
|
|
8
8
|
interface Options extends BaseClientOptions {
|
|
9
9
|
}
|
package/dist/esm/Client.mjs
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
import * as core from "./core/index.mjs";
|
|
3
|
-
import { mergeHeaders } from "./core/headers.mjs";
|
|
4
|
-
import * as environments from "./environments.mjs";
|
|
5
2
|
import { Copilots } from "./api/resources/copilots/client/Client.mjs";
|
|
6
3
|
import { DocumentCatalog } from "./api/resources/documentCatalog/client/Client.mjs";
|
|
7
4
|
import { DocumentCollections } from "./api/resources/documentCollections/client/Client.mjs";
|
|
8
5
|
import { Search } from "./api/resources/search/client/Client.mjs";
|
|
9
6
|
import { Users } from "./api/resources/users/client/Client.mjs";
|
|
7
|
+
import { mergeHeaders } from "./core/headers.mjs";
|
|
8
|
+
import * as core from "./core/index.mjs";
|
|
10
9
|
export class CredalClient {
|
|
11
10
|
constructor(_options = {}) {
|
|
12
11
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
13
12
|
"X-Fern-Language": "JavaScript",
|
|
14
13
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
15
|
-
"X-Fern-SDK-Version": "0.1.
|
|
16
|
-
"User-Agent": "@credal/sdk/0.1.
|
|
14
|
+
"X-Fern-SDK-Version": "0.1.9",
|
|
15
|
+
"User-Agent": "@credal/sdk/0.1.9",
|
|
17
16
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
18
17
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
19
18
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
2
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
2
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as Credal from "../../../index.mjs";
|
|
1
|
+
import type * as Credal from "../../../index.mjs";
|
|
2
2
|
export type ResourceIdentifier = Credal.ResourceIdentifier.ExternalResourceId | Credal.ResourceIdentifier.Url;
|
|
3
3
|
export declare namespace ResourceIdentifier {
|
|
4
4
|
interface ExternalResourceId extends Credal.ExternalResourceId {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
2
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./Collaborator.mjs";
|
|
2
|
+
export * from "./CustomMetadataValue.mjs";
|
|
2
3
|
export * from "./ExternalResourceId.mjs";
|
|
3
|
-
export * from "./
|
|
4
|
+
export * from "./Operator.mjs";
|
|
5
|
+
export * from "./ResourceIdentifier.mjs";
|
|
4
6
|
export * from "./ResourceType.mjs";
|
|
5
|
-
export * from "./Collaborator.mjs";
|
|
6
7
|
export * from "./Role.mjs";
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./CustomMetadataValue.mjs";
|
|
8
|
+
export * from "./Url.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./Collaborator.mjs";
|
|
2
|
+
export * from "./CustomMetadataValue.mjs";
|
|
2
3
|
export * from "./ExternalResourceId.mjs";
|
|
3
|
-
export * from "./
|
|
4
|
+
export * from "./Operator.mjs";
|
|
5
|
+
export * from "./ResourceIdentifier.mjs";
|
|
4
6
|
export * from "./ResourceType.mjs";
|
|
5
|
-
export * from "./Collaborator.mjs";
|
|
6
7
|
export * from "./Role.mjs";
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./CustomMetadataValue.mjs";
|
|
8
|
+
export * from "./Url.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
|
|
2
2
|
import * as core from "../../../../core/index.mjs";
|
|
3
|
-
import * as Credal from "../../../index.mjs";
|
|
3
|
+
import type * as Credal from "../../../index.mjs";
|
|
4
4
|
export declare namespace Copilots {
|
|
5
5
|
interface Options extends BaseClientOptions {
|
|
6
6
|
}
|
|
@@ -8,10 +8,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
import * as environments from "../../../../environments.mjs";
|
|
12
|
-
import * as core from "../../../../core/index.mjs";
|
|
13
|
-
import * as Credal from "../../../index.mjs";
|
|
14
11
|
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
12
|
+
import * as core from "../../../../core/index.mjs";
|
|
13
|
+
import * as environments from "../../../../environments.mjs";
|
|
15
14
|
import * as errors from "../../../../errors/index.mjs";
|
|
16
15
|
export class Copilots {
|
|
17
16
|
constructor(_options = {}) {
|
|
@@ -39,7 +38,7 @@ export class Copilots {
|
|
|
39
38
|
__createCopilot(request, requestOptions) {
|
|
40
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
40
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
42
|
-
|
|
41
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
43
42
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
44
43
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/createCopilot"),
|
|
45
44
|
method: "POST",
|
|
@@ -97,7 +96,7 @@ export class Copilots {
|
|
|
97
96
|
__createConversation(request, requestOptions) {
|
|
98
97
|
return __awaiter(this, void 0, void 0, function* () {
|
|
99
98
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
100
|
-
|
|
99
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
101
100
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
102
101
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/createConversation"),
|
|
103
102
|
method: "POST",
|
|
@@ -159,7 +158,7 @@ export class Copilots {
|
|
|
159
158
|
__provideMessageFeedback(request, requestOptions) {
|
|
160
159
|
return __awaiter(this, void 0, void 0, function* () {
|
|
161
160
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
162
|
-
|
|
161
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
163
162
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
164
163
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/provideMessageFeedback"),
|
|
165
164
|
method: "POST",
|
|
@@ -223,7 +222,7 @@ export class Copilots {
|
|
|
223
222
|
__sendMessage(request, requestOptions) {
|
|
224
223
|
return __awaiter(this, void 0, void 0, function* () {
|
|
225
224
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
226
|
-
|
|
225
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
227
226
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
228
227
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/sendMessage"),
|
|
229
228
|
method: "POST",
|
|
@@ -272,7 +271,7 @@ export class Copilots {
|
|
|
272
271
|
__streamMessage(request, requestOptions) {
|
|
273
272
|
return __awaiter(this, void 0, void 0, function* () {
|
|
274
273
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
275
|
-
|
|
274
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
276
275
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
277
276
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/streamMessage"),
|
|
278
277
|
method: "POST",
|
|
@@ -342,7 +341,7 @@ export class Copilots {
|
|
|
342
341
|
__addCollectionToCopilot(request, requestOptions) {
|
|
343
342
|
return __awaiter(this, void 0, void 0, function* () {
|
|
344
343
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
345
|
-
|
|
344
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
346
345
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
347
346
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/addCollectionToCopilot"),
|
|
348
347
|
method: "POST",
|
|
@@ -400,7 +399,7 @@ export class Copilots {
|
|
|
400
399
|
__removeCollectionFromCopilot(request, requestOptions) {
|
|
401
400
|
return __awaiter(this, void 0, void 0, function* () {
|
|
402
401
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
403
|
-
|
|
402
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
404
403
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
405
404
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/removeCollectionFromCopilot"),
|
|
406
405
|
method: "POST",
|
|
@@ -466,7 +465,7 @@ export class Copilots {
|
|
|
466
465
|
__updateConfiguration(request, requestOptions) {
|
|
467
466
|
return __awaiter(this, void 0, void 0, function* () {
|
|
468
467
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
469
|
-
|
|
468
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
470
469
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
471
470
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/updateConfiguration"),
|
|
472
471
|
method: "POST",
|
|
@@ -521,7 +520,7 @@ export class Copilots {
|
|
|
521
520
|
__deleteCopilot(request, requestOptions) {
|
|
522
521
|
return __awaiter(this, void 0, void 0, function* () {
|
|
523
522
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
524
|
-
|
|
523
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
525
524
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
526
525
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/deleteCopilot"),
|
|
527
526
|
method: "DELETE",
|
|
@@ -564,7 +563,7 @@ export class Copilots {
|
|
|
564
563
|
_getAuthorizationHeader() {
|
|
565
564
|
return __awaiter(this, void 0, void 0, function* () {
|
|
566
565
|
var _a;
|
|
567
|
-
const bearer = (_a = (yield core.Supplier.get(this._options.apiKey))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env
|
|
566
|
+
const bearer = (_a = (yield core.Supplier.get(this._options.apiKey))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env.CREDAL_API_KEY;
|
|
568
567
|
if (bearer == null) {
|
|
569
568
|
throw new errors.CredalError({
|
|
570
569
|
message: "Please specify a bearer by either passing it in to the constructor or initializing a CREDAL_API_KEY environment variable",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
2
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
2
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
2
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
2
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
2
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
1
|
+
export type { AddCollectionToCopilotRequest } from "./AddCollectionToCopilotRequest.mjs";
|
|
2
|
+
export type { CreateConversationRequest } from "./CreateConversationRequest.mjs";
|
|
3
|
+
export type { CreateCopilotRequest } from "./CreateCopilotRequest.mjs";
|
|
4
|
+
export type { DeleteCopilotRequest } from "./DeleteCopilotRequest.mjs";
|
|
5
|
+
export type { ProvideMessageFeedbackRequest } from "./ProvideMessageFeedbackRequest.mjs";
|
|
6
|
+
export type { RemoveCollectionFromCopilotRequest } from "./RemoveCollectionFromCopilotRequest.mjs";
|
|
7
|
+
export type { SendMessageRequest } from "./SendMessageRequest.mjs";
|
|
8
|
+
export type { StreamMessageRequest } from "./StreamMessageRequest.mjs";
|
|
9
|
+
export type { UpdateConfigurationRequest } from "./UpdateConfigurationRequest.mjs";
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
export {}
|
|
2
|
-
export {} from "./CreateConversationRequest.mjs";
|
|
3
|
-
export {} from "./ProvideMessageFeedbackRequest.mjs";
|
|
4
|
-
export {} from "./SendMessageRequest.mjs";
|
|
5
|
-
export {} from "./StreamMessageRequest.mjs";
|
|
6
|
-
export {} from "./AddCollectionToCopilotRequest.mjs";
|
|
7
|
-
export {} from "./RemoveCollectionFromCopilotRequest.mjs";
|
|
8
|
-
export {} from "./UpdateConfigurationRequest.mjs";
|
|
9
|
-
export {} from "./DeleteCopilotRequest.mjs";
|
|
1
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
2
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
2
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
2
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
2
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
}
|
|
1
|
+
export type EndOfMessageChunk = {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
2
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as Credal from "../../../index.mjs";
|
|
1
|
+
import type * as Credal from "../../../index.mjs";
|
|
2
2
|
export type Filter = Credal.Filter.String | Credal.Filter.Number | Credal.Filter.Boolean | Credal.Filter.Datetime;
|
|
3
3
|
export declare namespace Filter {
|
|
4
4
|
interface String extends Credal.StringFieldSchema {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
2
|
+
export {};
|