@squidcloud/client 1.0.479 → 1.0.480
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/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/internal-common/src/public-types/ai-knowledge-base.public-types.d.ts +40 -0
- package/dist/internal-common/src/public-types/extraction.public-types.d.ts +1 -1
- package/dist/typescript-client/src/ai-knowledge-base/ai-knowledge-base-client-reference.d.ts +22 -2
- package/dist/typescript-client/src/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -563,6 +563,46 @@ export interface ListAiKnowledgeBaseContextsResponse {
|
|
|
563
563
|
/** The list of AiKnowledgeBaseContexts */
|
|
564
564
|
contexts: Array<AiKnowledgeBaseContext>;
|
|
565
565
|
}
|
|
566
|
+
/**
|
|
567
|
+
* Options for {@link AiKnowledgeBaseReference.listContextsPage}
|
|
568
|
+
* @category AI
|
|
569
|
+
*/
|
|
570
|
+
export interface ListKnowledgeBaseContextsOptions {
|
|
571
|
+
/** The number of characters after which text is truncated. Optional */
|
|
572
|
+
truncateTextAfter?: number;
|
|
573
|
+
/** The number of contexts to skip, for pagination. Optional */
|
|
574
|
+
offset?: number;
|
|
575
|
+
/** The maximum number of contexts to return, for pagination. Optional */
|
|
576
|
+
limit?: number;
|
|
577
|
+
/** Case-insensitive substring search across id/title only. Optional */
|
|
578
|
+
search?: string;
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* API request for listing a page of AiKnowledgeBaseContexts
|
|
582
|
+
* @category AI
|
|
583
|
+
*/
|
|
584
|
+
export interface ListAiKnowledgeBaseContextsPageRequest {
|
|
585
|
+
/** The id of the AiKnowledgeBase */
|
|
586
|
+
id: string;
|
|
587
|
+
/** The number of characters after which text is truncated. Optional */
|
|
588
|
+
truncateTextAfter?: number;
|
|
589
|
+
/** The number of contexts to skip, for pagination. Optional */
|
|
590
|
+
offset?: number;
|
|
591
|
+
/** The maximum number of contexts to return, for pagination. Optional */
|
|
592
|
+
limit?: number;
|
|
593
|
+
/** Case-insensitive substring search across id/title only. Optional */
|
|
594
|
+
search?: string;
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* API response to list a page of AiKnowledgeBaseContexts
|
|
598
|
+
* @category AI
|
|
599
|
+
*/
|
|
600
|
+
export interface ListAiKnowledgeBaseContextsPageResponse {
|
|
601
|
+
/** The list of AiKnowledgeBaseContexts */
|
|
602
|
+
contexts: Array<AiKnowledgeBaseContext>;
|
|
603
|
+
/** The total number of contexts in the AiKnowledgeBase, ignoring offset/limit */
|
|
604
|
+
totalCount: number;
|
|
605
|
+
}
|
|
566
606
|
/**
|
|
567
607
|
* API response for searching an AiKnowledgeBase
|
|
568
608
|
* @category AI
|
|
@@ -247,6 +247,6 @@ export interface DocumentMetadata {
|
|
|
247
247
|
docCreatedAt?: string;
|
|
248
248
|
/** Last-modified timestamp, ISO 8601. */
|
|
249
249
|
docModifiedAt?: string;
|
|
250
|
-
/** Source document type: `pdf` | `docx` | `pptx` | `xlsx` | `md` | `html` | `txt`. */
|
|
250
|
+
/** Source document type: `pdf` | `docx` | `pptx` | `xlsx` | `eml` | `msg` | `md` | `html` | `txt`. */
|
|
251
251
|
docType?: string;
|
|
252
252
|
}
|
package/dist/typescript-client/src/ai-knowledge-base/ai-knowledge-base-client-reference.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AiEmbeddingsModelWithOptionalFields, AiKnowledgeBase, AiKnowledgeBaseChatOptions, AiKnowledgeBaseContext, AiKnowledgeBaseContextRequest, AiKnowledgeBaseContextWithReasoning, AiKnowledgeBaseDownloadContextResponse, AiKnowledgeBaseSearchContextsWithContextIdRequest, AiKnowledgeBaseSearchContextsWithPromptRequest, AiKnowledgeBaseSearchResultChunk, GenerateMetadataFieldDescriptionsRequest, GenerateMetadataFieldDescriptionsResponse, UpsertKnowledgeBaseContextResponse, UpsertKnowledgeBaseContextsResponse } from '../../../internal-common/src/public-types/ai-knowledge-base.public-types';
|
|
1
|
+
import { AiEmbeddingsModelWithOptionalFields, AiKnowledgeBase, AiKnowledgeBaseChatOptions, AiKnowledgeBaseContext, AiKnowledgeBaseContextRequest, AiKnowledgeBaseContextWithReasoning, AiKnowledgeBaseDownloadContextResponse, AiKnowledgeBaseSearchContextsWithContextIdRequest, AiKnowledgeBaseSearchContextsWithPromptRequest, AiKnowledgeBaseSearchResultChunk, GenerateMetadataFieldDescriptionsRequest, GenerateMetadataFieldDescriptionsResponse, ListAiKnowledgeBaseContextsPageResponse, ListKnowledgeBaseContextsOptions, UpsertKnowledgeBaseContextResponse, UpsertKnowledgeBaseContextsResponse } from '../../../internal-common/src/public-types/ai-knowledge-base.public-types';
|
|
2
2
|
import { AiContextId } from '../../../internal-common/src/public-types/communication.public-types';
|
|
3
3
|
/**
|
|
4
4
|
* Parameters for creating or updating an AI agent.
|
|
@@ -6,6 +6,18 @@ import { AiContextId } from '../../../internal-common/src/public-types/communica
|
|
|
6
6
|
* @category AI
|
|
7
7
|
*/
|
|
8
8
|
export type UpsertKnowledgeBaseRequestParams = Omit<AiKnowledgeBase, 'id'>;
|
|
9
|
+
/**
|
|
10
|
+
* Options for upserting knowledge base contexts.
|
|
11
|
+
* @category AI
|
|
12
|
+
*/
|
|
13
|
+
export interface UpsertContextsOptions {
|
|
14
|
+
/**
|
|
15
|
+
* Called once the request payload has been uploaded and accepted by the server.
|
|
16
|
+
* Server-side ingestion (extraction, embedding) continues after this callback; the returned
|
|
17
|
+
* promise resolves only when ingestion completes.
|
|
18
|
+
*/
|
|
19
|
+
onUploaded?: () => void;
|
|
20
|
+
}
|
|
9
21
|
/**
|
|
10
22
|
* A reference to an AI knowledge base.
|
|
11
23
|
*/
|
|
@@ -43,8 +55,16 @@ export declare class AiKnowledgeBaseReference {
|
|
|
43
55
|
delete(): Promise<void>;
|
|
44
56
|
/**
|
|
45
57
|
* Lists all contexts associated with the knowledge base.
|
|
58
|
+
* @deprecated Fetches every context in one call with no pagination — expensive for large knowledge
|
|
59
|
+
* bases. Use {@link listContextsPage} instead, which supports `offset`/`limit`/`search`.
|
|
46
60
|
*/
|
|
47
61
|
listContexts(truncateTextAfter?: number): Promise<Array<AiKnowledgeBaseContext>>;
|
|
62
|
+
/**
|
|
63
|
+
* Lists contexts associated with the knowledge base, paginated via `offset`/`limit` and optionally
|
|
64
|
+
* filtered via `search` (case-insensitive substring match on id/title only).
|
|
65
|
+
* @returns The requested page of contexts, plus `totalCount` (ignoring `offset`/`limit`).
|
|
66
|
+
*/
|
|
67
|
+
listContextsPage(options?: ListKnowledgeBaseContextsOptions): Promise<ListAiKnowledgeBaseContextsPageResponse>;
|
|
48
68
|
/**
|
|
49
69
|
* Lists the ids for all contexts associated with the knowledge base.
|
|
50
70
|
*/
|
|
@@ -70,7 +90,7 @@ export declare class AiKnowledgeBaseReference {
|
|
|
70
90
|
* generates one and rejects the request if identical content already exists in the knowledge base
|
|
71
91
|
* (content-level dedup). Requests that carry an explicit `contextId` overwrite that context unconditionally.
|
|
72
92
|
*/
|
|
73
|
-
upsertContexts(contextRequests: Array<AiKnowledgeBaseContextRequest>, files?: Array<File
|
|
93
|
+
upsertContexts(contextRequests: Array<AiKnowledgeBaseContextRequest>, files?: Array<File>, options?: UpsertContextsOptions): Promise<UpsertKnowledgeBaseContextsResponse>;
|
|
74
94
|
/**
|
|
75
95
|
* Performs a semantic search in the knowledge base and returns chunks from the different contexts.
|
|
76
96
|
*/
|