@credal/sdk 0.0.12 → 0.0.14
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/api/resources/common/types/ResourceType.d.ts +5 -1
- package/api/resources/common/types/ResourceType.js +4 -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 +12 -1
- package/api/resources/copilots/client/Client.js +79 -9
- 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.js +2 -2
- package/api/resources/documentCollections/client/Client.js +6 -6
- package/api/resources/permissionsService/client/Client.js +3 -3
- package/api/resources/search/client/Client.js +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.js +1 -1
- package/core/index.d.ts +1 -0
- package/core/index.js +1 -0
- 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/api/resources/common/types/ResourceType.d.ts +5 -1
- package/dist/api/resources/common/types/ResourceType.js +4 -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 +12 -1
- package/dist/api/resources/copilots/client/Client.js +79 -9
- 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.js +2 -2
- package/dist/api/resources/documentCollections/client/Client.js +6 -6
- package/dist/api/resources/permissionsService/client/Client.js +3 -3
- package/dist/api/resources/search/client/Client.js +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.js +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -0
- 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/ResourceType.d.ts +1 -1
- package/dist/serialization/resources/common/types/ResourceType.js +4 -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/package.json +1 -1
- package/reference.md +71 -0
- package/serialization/resources/common/types/ResourceType.d.ts +1 -1
- package/serialization/resources/common/types/ResourceType.js +4 -0
- 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/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
|
@@ -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
|
+
webSearchResults: string[];
|
|
8
|
+
filteredDataSourcesPerCollection: Credal.CollectionFilteredData[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Credal from "../../../index";
|
|
5
|
+
export declare type Filter = Credal.Filter.String | Credal.Filter.Number | Credal.Filter.Boolean | Credal.Filter.Datetime;
|
|
6
|
+
export declare namespace Filter {
|
|
7
|
+
interface String extends Credal.StringFieldSchema {
|
|
8
|
+
fieldType: "string";
|
|
9
|
+
}
|
|
10
|
+
interface Number extends Credal.NumberFieldSchema {
|
|
11
|
+
fieldType: "number";
|
|
12
|
+
}
|
|
13
|
+
interface Boolean extends Credal.BooleanFieldSchema {
|
|
14
|
+
fieldType: "boolean";
|
|
15
|
+
}
|
|
16
|
+
interface Datetime extends Credal.DatetimeFieldSchema {
|
|
17
|
+
fieldType: "datetime";
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Credal from "../../../index";
|
|
5
|
+
export interface InitialChunk {
|
|
6
|
+
conversationId: string;
|
|
7
|
+
warnings: string[];
|
|
8
|
+
webSearchResults: Credal.WebSearchResult[];
|
|
9
|
+
dataFilters?: Credal.DataFilter;
|
|
10
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from "./CreateConversationResponse";
|
|
2
2
|
export * from "./SendAgentMessageResponse";
|
|
3
3
|
export * from "./SendMessageResponse";
|
|
4
|
+
export * from "./InputVariable";
|
|
4
5
|
export * from "./MessageReply";
|
|
5
6
|
export * from "./ReferencedSource";
|
|
7
|
+
export * from "./WebSearchResult";
|
|
6
8
|
export * from "./ResponseChunk";
|
|
7
9
|
export * from "./InsertedAuditLog";
|
|
8
10
|
export * from "./MessageBlocked";
|
|
@@ -13,3 +15,15 @@ export * from "./Configuration";
|
|
|
13
15
|
export * from "./AiEndpointConfiguration";
|
|
14
16
|
export * from "./CreateCopilotResponse";
|
|
15
17
|
export * from "./DeleteCopilotResponse";
|
|
18
|
+
export * from "./StringFieldSchema";
|
|
19
|
+
export * from "./NumberFieldSchema";
|
|
20
|
+
export * from "./BooleanFieldSchema";
|
|
21
|
+
export * from "./DatetimeFieldSchema";
|
|
22
|
+
export * from "./Filter";
|
|
23
|
+
export * from "./CollectionFilteredData";
|
|
24
|
+
export * from "./DataFilter";
|
|
25
|
+
export * from "./InitialChunk";
|
|
26
|
+
export * from "./DataChunk";
|
|
27
|
+
export * from "./FinalChunk";
|
|
28
|
+
export * from "./BlockedChunk";
|
|
29
|
+
export * from "./StreamingChunk";
|
|
@@ -17,8 +17,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./CreateConversationResponse"), exports);
|
|
18
18
|
__exportStar(require("./SendAgentMessageResponse"), exports);
|
|
19
19
|
__exportStar(require("./SendMessageResponse"), exports);
|
|
20
|
+
__exportStar(require("./InputVariable"), exports);
|
|
20
21
|
__exportStar(require("./MessageReply"), exports);
|
|
21
22
|
__exportStar(require("./ReferencedSource"), exports);
|
|
23
|
+
__exportStar(require("./WebSearchResult"), exports);
|
|
22
24
|
__exportStar(require("./ResponseChunk"), exports);
|
|
23
25
|
__exportStar(require("./InsertedAuditLog"), exports);
|
|
24
26
|
__exportStar(require("./MessageBlocked"), exports);
|
|
@@ -29,3 +31,15 @@ __exportStar(require("./Configuration"), exports);
|
|
|
29
31
|
__exportStar(require("./AiEndpointConfiguration"), exports);
|
|
30
32
|
__exportStar(require("./CreateCopilotResponse"), exports);
|
|
31
33
|
__exportStar(require("./DeleteCopilotResponse"), exports);
|
|
34
|
+
__exportStar(require("./StringFieldSchema"), exports);
|
|
35
|
+
__exportStar(require("./NumberFieldSchema"), exports);
|
|
36
|
+
__exportStar(require("./BooleanFieldSchema"), exports);
|
|
37
|
+
__exportStar(require("./DatetimeFieldSchema"), exports);
|
|
38
|
+
__exportStar(require("./Filter"), exports);
|
|
39
|
+
__exportStar(require("./CollectionFilteredData"), exports);
|
|
40
|
+
__exportStar(require("./DataFilter"), exports);
|
|
41
|
+
__exportStar(require("./InitialChunk"), exports);
|
|
42
|
+
__exportStar(require("./DataChunk"), exports);
|
|
43
|
+
__exportStar(require("./FinalChunk"), exports);
|
|
44
|
+
__exportStar(require("./BlockedChunk"), exports);
|
|
45
|
+
__exportStar(require("./StreamingChunk"), exports);
|
|
@@ -71,7 +71,7 @@ class DocumentCatalog {
|
|
|
71
71
|
Authorization: yield this._getAuthorizationHeader(),
|
|
72
72
|
"X-Fern-Language": "JavaScript",
|
|
73
73
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
74
|
-
"X-Fern-SDK-Version": "0.0.
|
|
74
|
+
"X-Fern-SDK-Version": "0.0.14",
|
|
75
75
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
76
76
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
77
77
|
},
|
|
@@ -154,7 +154,7 @@ class DocumentCatalog {
|
|
|
154
154
|
Authorization: yield this._getAuthorizationHeader(),
|
|
155
155
|
"X-Fern-Language": "JavaScript",
|
|
156
156
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
157
|
-
"X-Fern-SDK-Version": "0.0.
|
|
157
|
+
"X-Fern-SDK-Version": "0.0.14",
|
|
158
158
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
159
159
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
160
160
|
},
|
|
@@ -78,7 +78,7 @@ class DocumentCollections {
|
|
|
78
78
|
Authorization: yield this._getAuthorizationHeader(),
|
|
79
79
|
"X-Fern-Language": "JavaScript",
|
|
80
80
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
81
|
-
"X-Fern-SDK-Version": "0.0.
|
|
81
|
+
"X-Fern-SDK-Version": "0.0.14",
|
|
82
82
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
83
83
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
84
84
|
},
|
|
@@ -144,7 +144,7 @@ class DocumentCollections {
|
|
|
144
144
|
Authorization: yield this._getAuthorizationHeader(),
|
|
145
145
|
"X-Fern-Language": "JavaScript",
|
|
146
146
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
147
|
-
"X-Fern-SDK-Version": "0.0.
|
|
147
|
+
"X-Fern-SDK-Version": "0.0.14",
|
|
148
148
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
149
149
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
150
150
|
},
|
|
@@ -206,7 +206,7 @@ class DocumentCollections {
|
|
|
206
206
|
Authorization: yield this._getAuthorizationHeader(),
|
|
207
207
|
"X-Fern-Language": "JavaScript",
|
|
208
208
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
209
|
-
"X-Fern-SDK-Version": "0.0.
|
|
209
|
+
"X-Fern-SDK-Version": "0.0.14",
|
|
210
210
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
211
211
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
212
212
|
},
|
|
@@ -266,7 +266,7 @@ class DocumentCollections {
|
|
|
266
266
|
Authorization: yield this._getAuthorizationHeader(),
|
|
267
267
|
"X-Fern-Language": "JavaScript",
|
|
268
268
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
269
|
-
"X-Fern-SDK-Version": "0.0.
|
|
269
|
+
"X-Fern-SDK-Version": "0.0.14",
|
|
270
270
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
271
271
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
272
272
|
},
|
|
@@ -342,7 +342,7 @@ class DocumentCollections {
|
|
|
342
342
|
Authorization: yield this._getAuthorizationHeader(),
|
|
343
343
|
"X-Fern-Language": "JavaScript",
|
|
344
344
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
345
|
-
"X-Fern-SDK-Version": "0.0.
|
|
345
|
+
"X-Fern-SDK-Version": "0.0.14",
|
|
346
346
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
347
347
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
348
348
|
},
|
|
@@ -420,7 +420,7 @@ class DocumentCollections {
|
|
|
420
420
|
Authorization: yield this._getAuthorizationHeader(),
|
|
421
421
|
"X-Fern-Language": "JavaScript",
|
|
422
422
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
423
|
-
"X-Fern-SDK-Version": "0.0.
|
|
423
|
+
"X-Fern-SDK-Version": "0.0.14",
|
|
424
424
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
425
425
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
426
426
|
},
|
|
@@ -74,7 +74,7 @@ class PermissionsService {
|
|
|
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.14",
|
|
78
78
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
79
79
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
80
80
|
},
|
|
@@ -144,7 +144,7 @@ class PermissionsService {
|
|
|
144
144
|
Authorization: yield this._getAuthorizationHeader(),
|
|
145
145
|
"X-Fern-Language": "JavaScript",
|
|
146
146
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
147
|
-
"X-Fern-SDK-Version": "0.0.
|
|
147
|
+
"X-Fern-SDK-Version": "0.0.14",
|
|
148
148
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
149
149
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
150
150
|
},
|
|
@@ -206,7 +206,7 @@ class PermissionsService {
|
|
|
206
206
|
Authorization: yield this._getAuthorizationHeader(),
|
|
207
207
|
"X-Fern-Language": "JavaScript",
|
|
208
208
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
209
|
-
"X-Fern-SDK-Version": "0.0.
|
|
209
|
+
"X-Fern-SDK-Version": "0.0.14",
|
|
210
210
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
211
211
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
212
212
|
},
|
|
@@ -84,7 +84,7 @@ class Search {
|
|
|
84
84
|
Authorization: yield this._getAuthorizationHeader(),
|
|
85
85
|
"X-Fern-Language": "JavaScript",
|
|
86
86
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
87
|
-
"X-Fern-SDK-Version": "0.0.
|
|
87
|
+
"X-Fern-SDK-Version": "0.0.14",
|
|
88
88
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
89
89
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
90
90
|
},
|
|
@@ -18,5 +18,4 @@ __exportStar(require("./DocumentCollectionSearchOptions"), exports);
|
|
|
18
18
|
__exportStar(require("./SearchDocumentCollectionResponse"), exports);
|
|
19
19
|
__exportStar(require("./DocumentCollectionSearchResult"), exports);
|
|
20
20
|
__exportStar(require("./SearchResultChunk"), exports);
|
|
21
|
-
__exportStar(require("./Operator"), exports);
|
|
22
21
|
__exportStar(require("./SingleFieldFilter"), exports);
|
|
@@ -79,7 +79,7 @@ class Users {
|
|
|
79
79
|
Authorization: yield this._getAuthorizationHeader(),
|
|
80
80
|
"X-Fern-Language": "JavaScript",
|
|
81
81
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
82
|
-
"X-Fern-SDK-Version": "0.0.
|
|
82
|
+
"X-Fern-SDK-Version": "0.0.14",
|
|
83
83
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
84
84
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
85
85
|
},
|
package/dist/core/index.d.ts
CHANGED
package/dist/core/index.js
CHANGED
|
@@ -30,4 +30,5 @@ exports.serialization = void 0;
|
|
|
30
30
|
__exportStar(require("./fetcher"), exports);
|
|
31
31
|
__exportStar(require("./auth"), exports);
|
|
32
32
|
__exportStar(require("./runtime"), exports);
|
|
33
|
+
__exportStar(require("./streaming-fetcher"), exports);
|
|
33
34
|
exports.serialization = __importStar(require("./schemas"));
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Readable } from "stream";
|
|
3
|
+
export declare namespace Stream {
|
|
4
|
+
interface Args {
|
|
5
|
+
/**
|
|
6
|
+
* The HTTP response stream to read from.
|
|
7
|
+
*/
|
|
8
|
+
stream: Readable | ReadableStream;
|
|
9
|
+
/**
|
|
10
|
+
* The event shape to use for parsing the stream data.
|
|
11
|
+
*/
|
|
12
|
+
eventShape: JsonEvent | SseEvent;
|
|
13
|
+
/**
|
|
14
|
+
* An abort signal to stop the stream.
|
|
15
|
+
*/
|
|
16
|
+
signal?: AbortSignal;
|
|
17
|
+
}
|
|
18
|
+
interface JsonEvent {
|
|
19
|
+
type: "json";
|
|
20
|
+
messageTerminator: string;
|
|
21
|
+
}
|
|
22
|
+
interface SseEvent {
|
|
23
|
+
type: "sse";
|
|
24
|
+
streamTerminator?: string;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export declare class Stream<T> implements AsyncIterable<T> {
|
|
28
|
+
private stream;
|
|
29
|
+
private parse;
|
|
30
|
+
/**
|
|
31
|
+
* The prefix to use for each message. For example,
|
|
32
|
+
* for SSE, the prefix is "data: ".
|
|
33
|
+
*/
|
|
34
|
+
private prefix;
|
|
35
|
+
private messageTerminator;
|
|
36
|
+
private streamTerminator;
|
|
37
|
+
private controller;
|
|
38
|
+
constructor({ stream, parse, eventShape, signal }: Stream.Args & {
|
|
39
|
+
parse: (val: unknown) => Promise<T>;
|
|
40
|
+
});
|
|
41
|
+
private iterMessages;
|
|
42
|
+
[Symbol.asyncIterator](): AsyncIterator<T, void, unknown>;
|
|
43
|
+
private decodeChunk;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Browser polyfill for ReadableStream
|
|
47
|
+
*/
|
|
48
|
+
export declare function readableStreamAsyncIterable<T>(stream: any): AsyncIterableIterator<T>;
|