@squidcloud/client 1.0.388 → 1.0.390

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.
Files changed (26) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/esm/index.js +1 -1
  3. package/dist/internal-common/src/public-types/ai-agent.public-types.d.ts +17 -266
  4. package/dist/internal-common/src/public-types/ai-assistant.public-types.d.ts +2 -1
  5. package/dist/internal-common/src/public-types/ai-common.public-types.d.ts +185 -0
  6. package/dist/internal-common/src/public-types/ai-knowledge-base.public-types.d.ts +244 -0
  7. package/dist/internal-common/src/public-types/ai-matchmaking.public-types.d.ts +1 -1
  8. package/dist/internal-common/src/public-types/ai-query.public-types.d.ts +1 -1
  9. package/dist/internal-common/src/public-types/backend.public-types.d.ts +4 -4
  10. package/dist/internal-common/src/public-types/communication.public-types.d.ts +2 -0
  11. package/dist/internal-common/src/public-utils/context-utils.d.ts +1 -0
  12. package/dist/internal-common/src/types/ai-agent.types.d.ts +13 -2
  13. package/dist/internal-common/src/types/ai-knowledge-base.types.d.ts +115 -0
  14. package/dist/internal-common/src/types/notification.types.d.ts +5 -0
  15. package/dist/internal-common/src/types/observability.types.d.ts +2 -0
  16. package/dist/typescript-client/src/agent/ai-agent-client-reference.d.ts +2 -3
  17. package/dist/typescript-client/src/agent/ai-agent-client.types.d.ts +2 -1
  18. package/dist/typescript-client/src/ai-client.d.ts +5 -0
  19. package/dist/typescript-client/src/ai-knowledge-base.reference.d.ts +57 -0
  20. package/dist/typescript-client/src/index.d.ts +2 -0
  21. package/dist/typescript-client/src/notification-client.d.ts +20 -0
  22. package/dist/typescript-client/src/personal-storage-client.d.ts +1 -1
  23. package/dist/typescript-client/src/public-types.d.ts +2 -0
  24. package/dist/typescript-client/src/squid.d.ts +26 -20
  25. package/dist/typescript-client/src/version.d.ts +1 -1
  26. package/package.json +1 -1
@@ -0,0 +1,244 @@
1
+ import { UpsertContextStatusError } from './ai-agent.public-types';
2
+ import { AiChatModelName, AiEmbeddingsModelName, AiRerankProvider } from './ai-common.public-types';
3
+ import { AiKnowledgeBaseId } from './communication.public-types';
4
+ /**
5
+ * Represents an AI knowledge base that can be attached to an AI agent.
6
+ * @category AI
7
+ */
8
+ export interface AiKnowledgeBase {
9
+ /** The unique identifier of the knowledge base.*/
10
+ id: string;
11
+ /** The name of the knowledge base.*/
12
+ name: AiKnowledgeBaseId;
13
+ /** The description of the knowledge base - will be used by AI agents.*/
14
+ description: string;
15
+ /** A set of predefined metadata fields for the knowledge base that can be used for filtering.*/
16
+ metadataFields: Array<AiKnowledgeBaseMetadataField>;
17
+ /** The embedding model name that should be used for this knowledge base.*/
18
+ embeddingModel: AiEmbeddingsModelName;
19
+ }
20
+ /**
21
+ * Represents a field in an AI knowledge base metadata.
22
+ */
23
+ export interface AiKnowledgeBaseMetadataField {
24
+ /** The name of field.*/
25
+ name: string;
26
+ /** The field data type - used for filtering. For array, only array of strings is supported. */
27
+ dataType: 'string' | 'number' | 'boolean' | 'date' | 'array';
28
+ /** Indicates if the field is required for knowledge base entries.*/
29
+ required: boolean;
30
+ /**
31
+ * In case that the field is required and not provided when uploaded to the knowledge base,
32
+ * this description will be used for extracting the value from the document.
33
+ * Also, it will be used for auto filtering when a prompt is sent to an AI agent.
34
+ */
35
+ description?: string;
36
+ }
37
+ /**
38
+ * A record of metadata key-value pairs for AI context, where values are primitive types or undefined.
39
+ * @category AI
40
+ */
41
+ export type AiContextMetadata = Record<string, AiContextMetadataValue>;
42
+ /**
43
+ * @category AI
44
+ */
45
+ export type AiContextMetadataValue = number | string | boolean | undefined;
46
+ /**
47
+ * @category AI
48
+ */
49
+ export type AiContextMetadataValueArray = AiContextMetadataValue[];
50
+ interface AiContextMetadataEqFilter {
51
+ $eq: AiContextMetadataValue;
52
+ }
53
+ interface AiContextMetadataNeFilter {
54
+ $ne: AiContextMetadataValue;
55
+ }
56
+ interface AiContextMetadataGtFilter {
57
+ $gt: number;
58
+ }
59
+ interface AiContextMetadataGteFilter {
60
+ $gte: number;
61
+ }
62
+ interface AiContextMetadataLtFilter {
63
+ $lt: number;
64
+ }
65
+ interface AiContextMetadataLteFilter {
66
+ $lte: number;
67
+ }
68
+ interface AiContextMetadataInFilter {
69
+ $in: AiContextMetadataValueArray;
70
+ }
71
+ interface AiContextMetadataNinFilter {
72
+ $nin: AiContextMetadataValueArray;
73
+ }
74
+ interface AiContextMetadataExistsFilter {
75
+ $exists: boolean;
76
+ }
77
+ /**
78
+ * @category AI
79
+ */
80
+ export type AiContextMetadataSimpleFilter = AiContextMetadataEqFilter | AiContextMetadataNeFilter | AiContextMetadataGtFilter | AiContextMetadataGteFilter | AiContextMetadataLtFilter | AiContextMetadataLteFilter | AiContextMetadataInFilter | AiContextMetadataNinFilter | AiContextMetadataExistsFilter;
81
+ /**
82
+ * A filter for AI context metadata based on field-specific conditions or values.
83
+ * @category AI
84
+ */
85
+ export interface AiContextMetadataFieldFilter {
86
+ /** A record where keys are field names and values are either simple filters or direct metadata values. */
87
+ [field: string]: AiContextMetadataSimpleFilter | AiContextMetadataValue;
88
+ }
89
+ /**
90
+ * A filter combining multiple AI context metadata filters with a logical AND operation.
91
+ * @category AI
92
+ */
93
+ export interface AiContextMetadataAndFilter {
94
+ /** An array of filters that must all be true for the condition to pass. */
95
+ $and: AiContextMetadataFilter[];
96
+ }
97
+ /**
98
+ * A filter combining multiple AI context metadata filters with a logical OR operation.
99
+ * @category AI
100
+ */
101
+ export interface AiContextMetadataOrFilter {
102
+ /** An array of filters where at least one must be true for the condition to pass. */
103
+ $or: AiContextMetadataFilter[];
104
+ }
105
+ /**
106
+ * @category AI
107
+ */
108
+ export type AiContextMetadataFilter = AiContextMetadataFieldFilter | AiContextMetadataAndFilter | AiContextMetadataOrFilter;
109
+ /**
110
+ * Represents an AI knowledge base's context entry with metadata and content.
111
+ * @category AI
112
+ */
113
+ export interface AiKnowledgeBaseContext {
114
+ /** The unique identifier of the context entry. */
115
+ id: string;
116
+ /** The knowledge base id of the context entry */
117
+ knowledgeBaseId: AiKnowledgeBaseId;
118
+ /** The date and time the context was created. */
119
+ createdAt: Date;
120
+ /** The date and time the context was last updated. */
121
+ updatedAt: Date;
122
+ /** The type of context (e.g., 'text' or 'file'). */
123
+ type: AiKnowledgeBaseContextType;
124
+ /** A title describing the context content. */
125
+ title: string;
126
+ /** The text content of the context. */
127
+ text: string;
128
+ /** Indicates whether the context is a preview; defaults to false. */
129
+ preview: boolean;
130
+ /** The size of the context content in bytes. */
131
+ sizeBytes: number;
132
+ /** Metadata associated with the context. */
133
+ metadata: AiContextMetadata;
134
+ }
135
+ /**
136
+ * @category AI
137
+ */
138
+ export type AiKnowledgeBaseContextType = 'text' | 'file';
139
+ /**
140
+ * @category AI
141
+ */
142
+ export type AiKnowledgeBaseContextRequest = AiKnowledgeBaseTextContextRequest | AiKnowledgeBaseFileContextRequest;
143
+ interface BaseAiKnowledgeBaseContextRequest {
144
+ contextId: string;
145
+ type: AiKnowledgeBaseContextType;
146
+ metadata?: AiContextMetadata;
147
+ }
148
+ /**
149
+ * Base options for upserting text content into the AI agent's context.
150
+ * @category AI
151
+ */
152
+ export interface AiKnowledgeBaseContextTextOptions extends BaseAiKnowledgeBaseContextOptions {
153
+ }
154
+ /**
155
+ * Base options for upserting file content into the AI agent's context.
156
+ * @category AI
157
+ */
158
+ export interface AiKnowledgeBaseContextFileOptions extends BaseAiKnowledgeBaseContextOptions {
159
+ }
160
+ /**
161
+ * Request structure for adding text-based context to an AI agent.
162
+ * @category AI
163
+ */
164
+ export interface AiKnowledgeBaseTextContextRequest extends BaseAiKnowledgeBaseContextRequest {
165
+ /** Specifies the context type as 'text'. */
166
+ type: 'text';
167
+ /** A title for the text context. */
168
+ title: string;
169
+ /** The text content to add to the context. */
170
+ text: string;
171
+ /** General options for how to process the text. */
172
+ options?: AiKnowledgeBaseContextTextOptions;
173
+ }
174
+ /**
175
+ * Request structure for adding file-based context to an AI agent.
176
+ * @category AI
177
+ */
178
+ export interface AiKnowledgeBaseFileContextRequest extends BaseAiKnowledgeBaseContextRequest {
179
+ /** Specifies the context type as 'file'. */
180
+ type: 'file';
181
+ /** Whether to extract images from the file; defaults to false. */
182
+ extractImages?: boolean;
183
+ /** The minimum size for extracted images, if applicable. */
184
+ imageMinSizePixels?: number;
185
+ /** The AI model to use for extraction, if specified. */
186
+ imageExtractionModel?: AiChatModelName;
187
+ /** General options for how to process the file. */
188
+ options?: AiKnowledgeBaseContextFileOptions;
189
+ }
190
+ /**
191
+ * @category AI
192
+ */
193
+ export declare const RAG_TYPES: readonly ["contextual", "basic"];
194
+ /**
195
+ * @category AI
196
+ */
197
+ export type AiRagType = (typeof RAG_TYPES)[number];
198
+ /**
199
+ * Base options for how to deal with the content being upserted.
200
+ * @category AI
201
+ */
202
+ export type BaseAiKnowledgeBaseContextOptions = {
203
+ /** The type of RAG to use for the content. */
204
+ ragType?: AiRagType;
205
+ /** Amount of chunk overlap, in characters. */
206
+ chunkOverlap?: number;
207
+ };
208
+ /**
209
+ * The options for the AI agent search method.
210
+ * @category AI
211
+ */
212
+ export interface AiKnowledgeBaseSearchOptions {
213
+ /** The prompt to search for */
214
+ prompt: string;
215
+ /** A set of filters that will limit the context the AI can access */
216
+ contextMetadataFilter?: AiContextMetadataFilter;
217
+ /** The maximum number of results to return */
218
+ limit?: number;
219
+ /** Which provider's reranker to use for reranking the context. Defaults to 'cohere'. */
220
+ rerankProvider?: AiRerankProvider;
221
+ /** How many chunks to look over. Defaults to 100 */
222
+ chunkLimit?: number;
223
+ }
224
+ /**
225
+ * A single chunk of data returned from an AI search operation.
226
+ * @category AI
227
+ */
228
+ export interface AiKnowledgeBaseSearchResultChunk {
229
+ /** The data content of the search result chunk. */
230
+ data: string;
231
+ /** Optional metadata associated with the chunk. */
232
+ metadata?: AiContextMetadata;
233
+ /** The relevance score of the chunk, indicating match quality. */
234
+ score: number;
235
+ }
236
+ /**
237
+ * Response structure for upserting context for an AiKnowledgeBase
238
+ * @category AI
239
+ */
240
+ export interface UpsertKnowledgeBaseContextsResponse {
241
+ /** List of the upsert status of each item sent in the request. */
242
+ failures: Array<UpsertContextStatusError>;
243
+ }
244
+ export {};
@@ -1,4 +1,4 @@
1
- import { AiContextMetadata, AiContextMetadataFilter } from './ai-agent.public-types';
1
+ import { AiContextMetadata, AiContextMetadataFilter } from './ai-knowledge-base.public-types';
2
2
  /**
3
3
  * Represents a category in the matchmaker.
4
4
  * The description is used by the AI to extract features from the content.
@@ -1,4 +1,4 @@
1
- import { AiChatModelName } from './ai-agent.public-types';
1
+ import { AiChatModelName } from './ai-common.public-types';
2
2
  import { ApiOptions } from './api-client.public-types';
3
3
  import { IntegrationId } from './communication.public-types';
4
4
  /**
@@ -43,8 +43,8 @@ export type LlmModelMetadata = {
43
43
  * A friendly name for the model, to display in UIs.
44
44
  */
45
45
  displayName: string;
46
- /**
47
- * The max number of input tokens that the model can handle.
48
- */
49
- maxTokens: number;
46
+ /** Maximum tokens the model can generate in a single response. */
47
+ maxOutputTokens: number;
48
+ /** Total context window size: input (aka prompt) + output (aka completion) tokens combined. */
49
+ contextWindowTokens: number;
50
50
  };
@@ -16,6 +16,8 @@ export type SquidDocId = string;
16
16
  export type ClientRequestId = string;
17
17
  /** ID of AI agent. Also known as AI profile id. */
18
18
  export type AiAgentId = string;
19
+ /** ID of AI Knowledge Base */
20
+ export type AiKnowledgeBaseId = string;
19
21
  /**
20
22
  * The built-in agent id. Cannot be customized.
21
23
  * @category AI
@@ -1,5 +1,7 @@
1
- import { AgentContextRequest, AiAgent, AiAgentContext, AiAudioCreateSpeechOptions, AiChatModelName, AiChatOptions, AiContextMetadata, AiContextMetadataFilter, AiEmbeddingsModelName, AiGenerateImageOptions, AiProviderType, AiSearchOptions, AiSearchResultChunk, AllAiAgentChatOptions, ApplicationAiSettings } from '../public-types/ai-agent.public-types';
2
- import { AiAgentId, AppId, ClientRequestId } from '../public-types/communication.public-types';
1
+ import { AgentContextRequest, AiAgent, AiAgentContext, AiAudioCreateSpeechOptions, AiChatOptions, AiGenerateImageOptions, AiSearchOptions, AiSearchResultChunk, AllAiAgentChatOptions, ApplicationAiSettings } from '../public-types/ai-agent.public-types';
2
+ import { AiChatModelName, AiEmbeddingsModelName, AiProviderType } from '../public-types/ai-common.public-types';
3
+ import { AiContextMetadata, AiContextMetadataFilter } from '../public-types/ai-knowledge-base.public-types';
4
+ import { AiAgentId, AiKnowledgeBaseId, AppId, ClientRequestId } from '../public-types/communication.public-types';
3
5
  import { JobId } from '../public-types/job.public-types';
4
6
  import { SecretKey } from '../public-types/secret.public-types';
5
7
  /** Specification for an AI model, defining its operational parameters. */
@@ -86,6 +88,15 @@ export interface GetAgentContextRequest {
86
88
  agentId: AiAgentId;
87
89
  contextId: string;
88
90
  }
91
+ export interface ConnectAgentKnowledgeBaseRequest {
92
+ agentId: AiAgentId;
93
+ knowledgeBaseId: AiKnowledgeBaseId;
94
+ description: string;
95
+ }
96
+ export interface DisconnectAgentKnowledgeBaseRequest {
97
+ agentId: AiAgentId;
98
+ knowledgeBaseId: AiKnowledgeBaseId;
99
+ }
89
100
  export interface DeleteAgentRequest {
90
101
  agentId: AiAgentId;
91
102
  }
@@ -0,0 +1,115 @@
1
+ import { AiKnowledgeBase, AiKnowledgeBaseContext, AiKnowledgeBaseContextRequest, AiKnowledgeBaseSearchOptions, AiKnowledgeBaseSearchResultChunk } from '../public-types/ai-knowledge-base.public-types';
2
+ /**
3
+ * Request structure for getting an AiKnowledgeBase
4
+ * @category AI
5
+ */
6
+ export interface GetAiKnowledgeBaseRequest {
7
+ /** The id of the AiKnowledgeBase */
8
+ id: string;
9
+ }
10
+ /**
11
+ * Response structure for getting an AiKnowledgeBase
12
+ * @category AI
13
+ */
14
+ export interface GetAiKnowledgeBaseResponse {
15
+ /** The resulting AiKnowledgeBase, if it is found */
16
+ knowledgeBase: AiKnowledgeBase | undefined;
17
+ }
18
+ /**
19
+ * Request structure for deleting an AiKnowledgeBase
20
+ * @category AI
21
+ */
22
+ export interface DeleteAiKnowledgeBaseRequest {
23
+ /** The id of the AiKnowledgeBase */
24
+ id: string;
25
+ }
26
+ /**
27
+ * Request structure for upserting an AiKnowledgeBase
28
+ * @category AI
29
+ */
30
+ export interface UpsertAiKnowledgeBaseRequest {
31
+ /** The AiKnowledgeBase to upsert */
32
+ knowledgeBase: AiKnowledgeBase;
33
+ }
34
+ /**
35
+ * Response structure for listing AiKnowledgeBases
36
+ * @category AI
37
+ */
38
+ export interface ListAiKnowledgeBasesResponse {
39
+ /** The list of AiKnowledgeBases */
40
+ knowledgeBases: Array<AiKnowledgeBase>;
41
+ }
42
+ /**
43
+ * Request structure for listing AiKnowledgeBaseContexts
44
+ * @category AI
45
+ */
46
+ export interface ListAiKnowledgeBaseContextsRequest {
47
+ /** The id of the AiKnowledgeBase */
48
+ id: string;
49
+ }
50
+ /**
51
+ * Response structure to list AiKnowledgeBaseContexts
52
+ * @category AI
53
+ */
54
+ export interface ListAiKnowledgeBaseContextsResponse {
55
+ /** The list AiKnowledgeBaseContexts */
56
+ contexts: Array<AiKnowledgeBaseContext>;
57
+ }
58
+ /**
59
+ * Request structure for deleting AiKnowledgeBaseContexts
60
+ * @category AI
61
+ */
62
+ export interface DeleteAiKnowledgeBaseContextsRequest {
63
+ /** The id of the AiKnowledgeBase */
64
+ knowledgeBaseId: string;
65
+ /** An array of AiKnowledgeBaseContext ids */
66
+ contextIds: Array<string>;
67
+ }
68
+ /**
69
+ * Request structure for getting an AiKnowledgeBaseContext
70
+ * @category AI
71
+ */
72
+ export interface GetAiKnowledgeBaseContextRequest {
73
+ /** The id of the AiKnowledgeBase */
74
+ knowledgeBaseId: string;
75
+ /** The id of the AiKnowledgeBaseContext */
76
+ contextId: string;
77
+ }
78
+ /**
79
+ * Response structure for getting an AiKnowledgeBaseContext
80
+ * @category AI
81
+ */
82
+ export interface GetAiKnowledgeBaseContextResponse {
83
+ /** The resulting AiKnowledgeBaseContext, if it is found */
84
+ context: AiKnowledgeBaseContext | undefined;
85
+ }
86
+ /**
87
+ * Request structure for upserting context for an AiKnowledgeBase
88
+ * @category AI
89
+ */
90
+ export interface UpsertAiKnowledgeBaseContextsRequest {
91
+ /** The id of the AiKnowledgeBase */
92
+ knowledgeBaseId: string;
93
+ /** The AiKnowledgeBaseContext data, which could be a file or text */
94
+ contextRequests: Array<AiKnowledgeBaseContextRequest>;
95
+ /** The job ID to use for the async upsert job */
96
+ jobId: string;
97
+ }
98
+ /**
99
+ * Request structure for searching an AiKnowledgeBase
100
+ * @category AI
101
+ */
102
+ export interface AiKnowledgeBaseSearchRequest {
103
+ /** The id of the AiKnowledgeBase */
104
+ knowledgeBaseId: string;
105
+ /** The search options for this search */
106
+ options: AiKnowledgeBaseSearchOptions;
107
+ }
108
+ /**
109
+ * Response structure for searching an AiKnowledgeBase
110
+ * @category AI
111
+ */
112
+ export interface AiKnowledgeBaseSearchResponse {
113
+ /** Array of result chunks from the search */
114
+ chunks: Array<AiKnowledgeBaseSearchResultChunk>;
115
+ }
@@ -0,0 +1,5 @@
1
+ import { ClientId } from '../public-types/communication.public-types';
2
+ export interface PublishNotificationRequest {
3
+ clientIds: Array<ClientId>;
4
+ payload: unknown;
5
+ }
@@ -60,6 +60,8 @@ export declare const O11Y_TAG_INTEGRATION_ID = "integrationId";
60
60
  /** Tag for AI events. */
61
61
  export declare const O11Y_TAG_AI_MODEL = "aiModel";
62
62
  export declare const O11Y_TAG_AI_PROFILE = "aiProfile";
63
+ /** Tag for AI KnowledgeBase events */
64
+ export declare const O11Y_TAG_AI_KNOWLEDGE_BASE_MODEL = "aiKnowledgeBaseModel";
63
65
  export declare const O11Y_TAG_API_KEY_SOURCE = "apiKeySource";
64
66
  /** Tag for metric and log events. Value: '0' - not a tenant originated, '1' - is a tenant originated. */
65
67
  export declare const O11Y_TAG_IS_TENANT_ORIGINATED = "isTenantOriginated";
@@ -1,5 +1,6 @@
1
1
  import { Observable } from 'rxjs';
2
- import { AgentContextRequest, AiAgent, AiAgentContext, AiChatModelName, AiConnectedAgentMetadata, AiSearchOptions, AiSearchResultChunk, AiStatusMessage, AiTranscribeAndAskResponse, GuardrailsOptions, UpsertAgentContextsResponse, UpsertAgentRequest } from '../../../internal-common/src/public-types/ai-agent.public-types';
2
+ import { AgentContextRequest, AiAgent, AiAgentContext, AiConnectedAgentMetadata, AiSearchOptions, AiSearchResultChunk, AiStatusMessage, AiTranscribeAndAskResponse, GuardrailsOptions, UpsertAgentContextsResponse, UpsertAgentRequest } from '../../../internal-common/src/public-types/ai-agent.public-types';
3
+ import { AiChatModelName } from '../../../internal-common/src/public-types/ai-common.public-types';
3
4
  import { JobId } from '../../../internal-common/src/public-types/job.public-types';
4
5
  import { AiAskOptions, AiAskOptionsWithVoice, AiChatOptionsWithoutVoice, AskWithVoiceResponse, TranscribeAndAskWithVoiceResponse, TranscribeAndChatResponse } from './ai-agent-client.types';
5
6
  /**
@@ -66,8 +67,6 @@ export declare class AiAgentReference {
66
67
  upsertContext(contextRequest: AgentContextRequest, file?: File): Promise<void>;
67
68
  /**
68
69
  * Adds or updates multiple agent contexts.
69
- *
70
- * @return Response object containing the individual statuses of whether each context was successfully upserted.
71
70
  */
72
71
  upsertContexts(contextRequests: Array<AgentContextRequest>, files?: Array<File>): Promise<UpsertAgentContextsResponse>;
73
72
  /**
@@ -1,5 +1,6 @@
1
1
  import { Observable } from 'rxjs';
2
- import { AiChatModelName, AiChatOptions } from '../../../internal-common/src/public-types/ai-agent.public-types';
2
+ import { AiChatOptions } from '../../../internal-common/src/public-types/ai-agent.public-types';
3
+ import { AiChatModelName } from '../../../internal-common/src/public-types/ai-common.public-types';
3
4
  /**
4
5
  * Response format for transcribing audio and generating a chat response.
5
6
  * Contains the transcribed text and a stream of AI-generated responses.
@@ -3,6 +3,7 @@ import { AiAgentReference } from './agent/ai-agent-client-reference';
3
3
  import { AiAssistantClient } from './ai-assistant-client';
4
4
  import { AiAudioClient } from './ai-audio-client';
5
5
  import { AiImageClient } from './ai-image-client';
6
+ import { AiKnowledgeBaseReference } from './ai-knowledge-base.reference';
6
7
  import { AiMatchMakingClient } from './ai-matchmaking-client';
7
8
  import { AiAgent, AiAgentId, AiProviderType, ApplicationAiSettings, IntegrationId, SecretKey } from './public-types';
8
9
  /**
@@ -22,6 +23,10 @@ export declare class AiClient {
22
23
  * If no ID is provided, the built-in agent is used by default.
23
24
  */
24
25
  agent(agentId?: AiAgentId): AiAgentReference;
26
+ /**
27
+ * Returns a reference to the specified AI knowledge base.
28
+ */
29
+ knowledgeBase(knowledgeBaseId: string): AiKnowledgeBaseReference;
25
30
  /**
26
31
  * Lists all available AI agents.
27
32
  */
@@ -0,0 +1,57 @@
1
+ import { AiKnowledgeBase, AiKnowledgeBaseContext, AiKnowledgeBaseContextRequest, AiKnowledgeBaseSearchOptions, AiKnowledgeBaseSearchResultChunk, UpsertKnowledgeBaseContextsResponse } from '../../internal-common/src/public-types/ai-knowledge-base.public-types';
2
+ /**
3
+ * A reference to an AI knowledge base.
4
+ */
5
+ export declare class AiKnowledgeBaseReference {
6
+ private readonly knowledgeBaseId;
7
+ private readonly rpcManager;
8
+ private readonly jobClient;
9
+ /**
10
+ * Returns the AI knowledge base.
11
+ * @returns A promise that resolves to the AI knowledge base or undefined if not found.
12
+ */
13
+ getKnowledgeBase(): Promise<AiKnowledgeBase | undefined>;
14
+ /**
15
+ * Returns all AI knowledge bases.
16
+ * @returns A promise that resolves to an array of AI Knowledge Bases
17
+ */
18
+ listKnowledgeBases(): Promise<Array<AiKnowledgeBase>>;
19
+ /**
20
+ * Upserts the AI knowledge base.
21
+ * @param knowledgeBase
22
+ */
23
+ upsertKnowledgeBase(knowledgeBase: AiKnowledgeBase): Promise<void>;
24
+ /**
25
+ * Deletes the AI knowledge base.
26
+ * @returns A promise that resolves when the deletion is complete.
27
+ */
28
+ delete(): Promise<void>;
29
+ /**
30
+ * Lists all contexts associated with the knowledge base.
31
+ */
32
+ listContexts(): Promise<Array<AiKnowledgeBaseContext>>;
33
+ /**
34
+ * Retrieves a specific context by its ID.
35
+ */
36
+ getContext(contextId: string): Promise<AiKnowledgeBaseContext | undefined>;
37
+ /**
38
+ * Deletes a specific context by its ID.
39
+ */
40
+ deleteContext(contextId: string): Promise<void>;
41
+ /**
42
+ * Deletes multiple contexts.
43
+ */
44
+ deleteContexts(contextIds: Array<string>): Promise<void>;
45
+ /**
46
+ * Adds or updates a single context.
47
+ */
48
+ upsertContext(contextRequest: AiKnowledgeBaseContextRequest, file?: File): Promise<void>;
49
+ /**
50
+ * Adds or updates multiple contexts.
51
+ */
52
+ upsertContexts(contextRequests: Array<AiKnowledgeBaseContextRequest>, files?: Array<File>): Promise<UpsertKnowledgeBaseContextsResponse>;
53
+ /**
54
+ * Performs a semantic search in the knowledge base.
55
+ */
56
+ search(options: AiKnowledgeBaseSearchOptions): Promise<Array<AiKnowledgeBaseSearchResultChunk>>;
57
+ }
@@ -6,6 +6,7 @@ export * from './ai-assistant-client';
6
6
  export * from './ai-audio-client';
7
7
  export * from './ai-client';
8
8
  export * from './ai-image-client';
9
+ export * from './ai-knowledge-base.reference';
9
10
  export * from './ai-matchmaking-client';
10
11
  export * from './api-client';
11
12
  export * from './auth.manager';
@@ -30,6 +31,7 @@ export * from './integration-client';
30
31
  export * from './job-client';
31
32
  export * from './mutation/mutation-sender';
32
33
  export * from './native-query-manager';
34
+ export * from './notification-client';
33
35
  export * from './observability-client';
34
36
  export * from './personal-storage-client';
35
37
  export * from './public-types';
@@ -0,0 +1,20 @@
1
+ import { Observable } from 'rxjs';
2
+ import { ClientId } from '../../internal-common/src/public-types/communication.public-types';
3
+ /**
4
+ * NotificationClient is a client for handling user-defined notifications.
5
+ * Using this class you can receive messages that are sent from the server to this client or
6
+ * publish messages to other clients. In order to publish a message you have to initialize the squid sdk with a valid
7
+ * api key.
8
+ */
9
+ export declare class NotificationClient {
10
+ private readonly socketManager;
11
+ private readonly rpcManager;
12
+ /**
13
+ * Observes user-defined notifications.
14
+ */
15
+ observeNotifications(): Observable<unknown>;
16
+ /**
17
+ * Publishes a notification to clients.
18
+ */
19
+ publishNotification(payload: unknown, clientIds: Array<ClientId>): Promise<void>;
20
+ }
@@ -1,4 +1,4 @@
1
- import { AiContextMetadata } from '../../internal-common/src/public-types/ai-agent.public-types';
1
+ import { AiContextMetadata } from './public-types';
2
2
  /**
3
3
  * Response to a request to get the access token for a personal storage service.
4
4
  * @category Personal Storage
@@ -1,6 +1,8 @@
1
1
  export * from '../../internal-common/src/public-types/ai-agent-integrations.public-types';
2
2
  export * from '../../internal-common/src/public-types/ai-agent.public-types';
3
3
  export * from '../../internal-common/src/public-types/ai-assistant.public-types';
4
+ export * from '../../internal-common/src/public-types/ai-common.public-types';
5
+ export * from '../../internal-common/src/public-types/ai-knowledge-base.public-types';
4
6
  export * from '../../internal-common/src/public-types/ai-matchmaking.public-types';
5
7
  export * from '../../internal-common/src/public-types/ai-query.public-types';
6
8
  export * from '../../internal-common/src/public-types/api-client.public-types';