@credal/sdk 0.0.14 → 0.0.16
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/copilots/client/Client.d.ts +13 -10
- package/api/resources/copilots/client/Client.js +52 -40
- 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/types/DataFilter.d.ts +1 -1
- package/api/resources/copilots/types/FinalChunk.d.ts +1 -1
- package/api/resources/copilots/types/StreamingChunk.d.ts +15 -1
- 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/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/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.js +6 -6
- package/dist/Client.d.ts +3 -0
- package/dist/api/resources/copilots/client/Client.d.ts +13 -10
- package/dist/api/resources/copilots/client/Client.js +52 -40
- 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/types/DataFilter.d.ts +1 -1
- package/dist/api/resources/copilots/types/FinalChunk.d.ts +1 -1
- package/dist/api/resources/copilots/types/StreamingChunk.d.ts +15 -1
- 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/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/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.js +6 -6
- package/dist/serialization/resources/copilots/types/DataFilter.d.ts +1 -1
- package/dist/serialization/resources/copilots/types/DataFilter.js +1 -1
- package/dist/serialization/resources/copilots/types/FinalChunk.d.ts +1 -1
- package/dist/serialization/resources/copilots/types/FinalChunk.js +1 -1
- package/dist/serialization/resources/copilots/types/StreamingChunk.d.ts +13 -1
- package/dist/serialization/resources/copilots/types/StreamingChunk.js +11 -1
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/package.json +12 -2
- package/reference.md +155 -534
- package/serialization/resources/copilots/types/DataFilter.d.ts +1 -1
- package/serialization/resources/copilots/types/DataFilter.js +1 -1
- package/serialization/resources/copilots/types/FinalChunk.d.ts +1 -1
- package/serialization/resources/copilots/types/FinalChunk.js +1 -1
- package/serialization/resources/copilots/types/StreamingChunk.d.ts +13 -1
- package/serialization/resources/copilots/types/StreamingChunk.js +11 -1
- package/version.d.ts +1 -0
- package/version.js +4 -0
|
@@ -9,7 +9,7 @@ export declare const DataFilter: core.serialization.ObjectSchema<serializers.Dat
|
|
|
9
9
|
export declare namespace DataFilter {
|
|
10
10
|
interface Raw {
|
|
11
11
|
semanticSearchTerms: string[];
|
|
12
|
-
|
|
12
|
+
webSearchTerm: string[];
|
|
13
13
|
filteredDataSourcesPerCollection: CollectionFilteredData.Raw[];
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -31,6 +31,6 @@ const core = __importStar(require("../../../../core"));
|
|
|
31
31
|
const CollectionFilteredData_1 = require("./CollectionFilteredData");
|
|
32
32
|
exports.DataFilter = core.serialization.object({
|
|
33
33
|
semanticSearchTerms: core.serialization.list(core.serialization.string()),
|
|
34
|
-
|
|
34
|
+
webSearchTerm: core.serialization.list(core.serialization.string()),
|
|
35
35
|
filteredDataSourcesPerCollection: core.serialization.list(CollectionFilteredData_1.CollectionFilteredData),
|
|
36
36
|
});
|
|
@@ -8,6 +8,6 @@ import { ReferencedSource } from "./ReferencedSource";
|
|
|
8
8
|
export declare const FinalChunk: core.serialization.ObjectSchema<serializers.FinalChunk.Raw, Credal.FinalChunk>;
|
|
9
9
|
export declare namespace FinalChunk {
|
|
10
10
|
interface Raw {
|
|
11
|
-
|
|
11
|
+
sources: ReferencedSource.Raw[];
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -30,5 +30,5 @@ exports.FinalChunk = void 0;
|
|
|
30
30
|
const core = __importStar(require("../../../../core"));
|
|
31
31
|
const ReferencedSource_1 = require("./ReferencedSource");
|
|
32
32
|
exports.FinalChunk = core.serialization.object({
|
|
33
|
-
|
|
33
|
+
sources: core.serialization.list(ReferencedSource_1.ReferencedSource),
|
|
34
34
|
});
|
|
@@ -10,5 +10,17 @@ import { FinalChunk } from "./FinalChunk";
|
|
|
10
10
|
import { BlockedChunk } from "./BlockedChunk";
|
|
11
11
|
export declare const StreamingChunk: core.serialization.Schema<serializers.StreamingChunk.Raw, Credal.StreamingChunk>;
|
|
12
12
|
export declare namespace StreamingChunk {
|
|
13
|
-
type Raw =
|
|
13
|
+
type Raw = StreamingChunk.Initial | StreamingChunk.DataChunk | StreamingChunk.FinalChunk | StreamingChunk.Blocked;
|
|
14
|
+
interface Initial extends InitialChunk.Raw {
|
|
15
|
+
event: "initial";
|
|
16
|
+
}
|
|
17
|
+
interface DataChunk extends DataChunk.Raw {
|
|
18
|
+
event: "data_chunk";
|
|
19
|
+
}
|
|
20
|
+
interface FinalChunk extends FinalChunk.Raw {
|
|
21
|
+
event: "final_chunk";
|
|
22
|
+
}
|
|
23
|
+
interface Blocked extends BlockedChunk.Raw {
|
|
24
|
+
event: "blocked";
|
|
25
|
+
}
|
|
14
26
|
}
|
|
@@ -32,4 +32,14 @@ const InitialChunk_1 = require("./InitialChunk");
|
|
|
32
32
|
const DataChunk_1 = require("./DataChunk");
|
|
33
33
|
const FinalChunk_1 = require("./FinalChunk");
|
|
34
34
|
const BlockedChunk_1 = require("./BlockedChunk");
|
|
35
|
-
exports.StreamingChunk = core.serialization
|
|
35
|
+
exports.StreamingChunk = core.serialization
|
|
36
|
+
.union("event", {
|
|
37
|
+
initial: InitialChunk_1.InitialChunk,
|
|
38
|
+
data_chunk: DataChunk_1.DataChunk,
|
|
39
|
+
final_chunk: FinalChunk_1.FinalChunk,
|
|
40
|
+
blocked: BlockedChunk_1.BlockedChunk,
|
|
41
|
+
})
|
|
42
|
+
.transform({
|
|
43
|
+
transform: (value) => value,
|
|
44
|
+
untransform: (value) => value,
|
|
45
|
+
});
|
package/version.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SDK_VERSION = "0.0.16";
|
package/version.js
ADDED