@proveanything/smartlinks 2.1.39 → 2.1.40
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/adminViews.d.ts +1 -1
- package/dist/adminViews.js +3 -1
- package/dist/ai-tools.d.ts +2 -1
- package/dist/ai-tools.js +3 -0
- package/dist/api/ai.d.ts +2 -21
- package/dist/api/ai.js +0 -35
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/knowledge.d.ts +64 -0
- package/dist/api/knowledge.js +97 -0
- package/dist/docs/API_SUMMARY.md +179 -125
- package/dist/docs/admin-views.md +257 -255
- package/dist/docs/ai.md +239 -352
- package/dist/docs/knowledge.md +102 -0
- package/dist/openapi.yaml +240 -303
- package/dist/types/ai.d.ts +9 -91
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/knowledge.d.ts +120 -0
- package/dist/types/knowledge.js +2 -0
- package/docs/API_SUMMARY.md +179 -125
- package/docs/admin-views.md +257 -255
- package/docs/ai.md +239 -352
- package/docs/knowledge.md +102 -0
- package/openapi.yaml +240 -303
- package/package.json +1 -1
package/dist/types/ai.d.ts
CHANGED
|
@@ -261,95 +261,6 @@ export interface AIModelListResponse {
|
|
|
261
261
|
object: 'list';
|
|
262
262
|
data: AIModel[];
|
|
263
263
|
}
|
|
264
|
-
/** Document chunk with embedding */
|
|
265
|
-
export interface DocumentChunk {
|
|
266
|
-
text: string;
|
|
267
|
-
embedding: number[];
|
|
268
|
-
metadata: {
|
|
269
|
-
chunkIndex: number;
|
|
270
|
-
documentId: string;
|
|
271
|
-
[key: string]: any;
|
|
272
|
-
};
|
|
273
|
-
}
|
|
274
|
-
/** Index document request */
|
|
275
|
-
export interface IndexDocumentRequest {
|
|
276
|
-
productId: string;
|
|
277
|
-
text?: string;
|
|
278
|
-
documentUrl?: string;
|
|
279
|
-
metadata?: Record<string, any>;
|
|
280
|
-
chunkSize?: number;
|
|
281
|
-
overlap?: number;
|
|
282
|
-
provider?: 'openai' | 'gemini';
|
|
283
|
-
}
|
|
284
|
-
/** Index document response */
|
|
285
|
-
export interface IndexDocumentResponse {
|
|
286
|
-
success: boolean;
|
|
287
|
-
productId: string;
|
|
288
|
-
documentId: string;
|
|
289
|
-
chunks: number;
|
|
290
|
-
metadata: {
|
|
291
|
-
textLength: number;
|
|
292
|
-
chunkSize: number;
|
|
293
|
-
overlap: number;
|
|
294
|
-
embeddingDimensions: number;
|
|
295
|
-
};
|
|
296
|
-
sample?: {
|
|
297
|
-
text: string;
|
|
298
|
-
chunkIndex: number;
|
|
299
|
-
};
|
|
300
|
-
}
|
|
301
|
-
/** Configure assistant request */
|
|
302
|
-
export interface ConfigureAssistantRequest {
|
|
303
|
-
productId: string;
|
|
304
|
-
systemPrompt?: string;
|
|
305
|
-
model?: string;
|
|
306
|
-
maxTokensPerResponse?: number;
|
|
307
|
-
temperature?: number;
|
|
308
|
-
rateLimitPerUser?: number;
|
|
309
|
-
allowedTopics?: string[];
|
|
310
|
-
customInstructions?: {
|
|
311
|
-
tone?: string;
|
|
312
|
-
additionalRules?: string;
|
|
313
|
-
[key: string]: any;
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
|
-
/** Configure assistant response */
|
|
317
|
-
export interface ConfigureAssistantResponse {
|
|
318
|
-
success: boolean;
|
|
319
|
-
configuration: {
|
|
320
|
-
productId: string;
|
|
321
|
-
systemPrompt: string;
|
|
322
|
-
model: string;
|
|
323
|
-
maxTokensPerResponse: number;
|
|
324
|
-
temperature: number;
|
|
325
|
-
rateLimitPerUser: number;
|
|
326
|
-
allowedTopics: string[];
|
|
327
|
-
customInstructions?: Record<string, any>;
|
|
328
|
-
updatedAt: string;
|
|
329
|
-
};
|
|
330
|
-
}
|
|
331
|
-
/** Public chat request */
|
|
332
|
-
export interface PublicChatRequest {
|
|
333
|
-
productId: string;
|
|
334
|
-
userId: string;
|
|
335
|
-
message: string;
|
|
336
|
-
sessionId?: string;
|
|
337
|
-
stream?: boolean;
|
|
338
|
-
}
|
|
339
|
-
/** Public chat response */
|
|
340
|
-
export interface PublicChatResponse {
|
|
341
|
-
message: string;
|
|
342
|
-
sessionId: string;
|
|
343
|
-
usage: {
|
|
344
|
-
prompt_tokens: number;
|
|
345
|
-
completion_tokens: number;
|
|
346
|
-
total_tokens: number;
|
|
347
|
-
};
|
|
348
|
-
context?: {
|
|
349
|
-
chunksUsed: number;
|
|
350
|
-
topSimilarity: number;
|
|
351
|
-
};
|
|
352
|
-
}
|
|
353
264
|
/** Session information */
|
|
354
265
|
export interface Session {
|
|
355
266
|
sessionId: string;
|
|
@@ -843,9 +754,9 @@ export interface CatalogResponse {
|
|
|
843
754
|
skills: SkillDescriptor[];
|
|
844
755
|
}
|
|
845
756
|
/** Capability tags a tool requires; scope a run with `allowCapabilities`. */
|
|
846
|
-
export type AiToolCapability = 'web:read' | 'ai:vision' | 'ai:image' | 'ai:text' | 'media:image' | 'media:pdf' | 'net:http';
|
|
757
|
+
export type AiToolCapability = 'web:read' | 'ai:vision' | 'ai:image' | 'ai:text' | 'media:image' | 'media:pdf' | 'net:http' | 'knowledge:read';
|
|
847
758
|
/** The names of the built-in server-side agent tools (run via `server_tools`). */
|
|
848
|
-
export type AiToolName = 'web.fetchPage' | 'web.extractSchema' | 'web.screenshot' | 'web.search' | 'brand.assets' | 'document.read' | 'data.extract' | 'image.describe' | 'image.generate' | 'image.fromReference' | 'image.searchStock' | 'image.transform' | 'image.ocr' | 'pdf.create' | 'pdf.fill' | 'pdf.merge' | 'pdf.inspect' | 'pdf.render' | 'pdf.extract' | 'pdf.decodeBarcodes' | 'pdf.inspectGraphics' | 'pdf.edit' | 'pdf.preflight' | 'pdf.printReady' | 'http.request' | 'translate';
|
|
759
|
+
export type AiToolName = 'web.fetchPage' | 'web.extractSchema' | 'web.screenshot' | 'web.search' | 'brand.assets' | 'document.read' | 'data.extract' | 'image.describe' | 'image.generate' | 'image.fromReference' | 'image.searchStock' | 'image.transform' | 'image.ocr' | 'pdf.create' | 'pdf.fill' | 'pdf.merge' | 'pdf.inspect' | 'pdf.render' | 'pdf.extract' | 'pdf.decodeBarcodes' | 'pdf.inspectGraphics' | 'pdf.edit' | 'pdf.preflight' | 'pdf.printReady' | 'http.request' | 'translate' | 'knowledge.search';
|
|
849
760
|
export interface WebFetchPageArgs {
|
|
850
761
|
url: string;
|
|
851
762
|
type?: string;
|
|
@@ -1131,6 +1042,12 @@ export interface HttpRequestArgs {
|
|
|
1131
1042
|
headers?: Record<string, string>;
|
|
1132
1043
|
body?: any;
|
|
1133
1044
|
}
|
|
1045
|
+
export interface KnowledgeSearchArgs {
|
|
1046
|
+
query: string;
|
|
1047
|
+
sets?: string[];
|
|
1048
|
+
filters?: Record<string, any>;
|
|
1049
|
+
k?: number;
|
|
1050
|
+
}
|
|
1134
1051
|
export interface TranslateArgs {
|
|
1135
1052
|
text: string;
|
|
1136
1053
|
targetLanguages: string[];
|
|
@@ -1164,6 +1081,7 @@ export interface AiToolArgsMap {
|
|
|
1164
1081
|
'pdf.printReady': PdfPrintReadyArgs;
|
|
1165
1082
|
'http.request': HttpRequestArgs;
|
|
1166
1083
|
'translate': TranslateArgs;
|
|
1084
|
+
'knowledge.search': KnowledgeSearchArgs;
|
|
1167
1085
|
}
|
|
1168
1086
|
export interface WebSearchResultItem {
|
|
1169
1087
|
url: string | null;
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/** Who may search a set: anyone, signed-in people, or the business's own staff and assistants. */
|
|
2
|
+
export type KnowledgeVisibility = 'public' | 'customer' | 'staff';
|
|
3
|
+
/** Where a set's passages come from. */
|
|
4
|
+
export type KnowledgeSourceKind =
|
|
5
|
+
/** A Markdown bundle: documents separated by `---`, each with a `Source: <url>` line (the llms-full format). */
|
|
6
|
+
'markdown_feed'
|
|
7
|
+
/** One web page or document at an address. */
|
|
8
|
+
| 'url'
|
|
9
|
+
/** Documents an app pushes itself with `knowledge.upsertDocuments`. */
|
|
10
|
+
| 'documents';
|
|
11
|
+
export interface KnowledgeSet {
|
|
12
|
+
id: string;
|
|
13
|
+
/** Lower-case key, unique in the collection: "docs", "manuals". */
|
|
14
|
+
key: string;
|
|
15
|
+
name: string;
|
|
16
|
+
description: string | null;
|
|
17
|
+
visibility: KnowledgeVisibility;
|
|
18
|
+
/** The app that declared the set, if any. */
|
|
19
|
+
ownerAppId: string | null;
|
|
20
|
+
/** The embedding model its passages were embedded with (null until embedded). */
|
|
21
|
+
embedModel: string | null;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
updatedAt: string;
|
|
24
|
+
/** On list: how many sources and passages it has. */
|
|
25
|
+
sourceCount?: number;
|
|
26
|
+
passageCount?: number;
|
|
27
|
+
}
|
|
28
|
+
export interface SaveKnowledgeSetRequest {
|
|
29
|
+
key: string;
|
|
30
|
+
name: string;
|
|
31
|
+
description?: string | null;
|
|
32
|
+
/** Default `staff`. */
|
|
33
|
+
visibility?: KnowledgeVisibility;
|
|
34
|
+
}
|
|
35
|
+
export interface UpdateKnowledgeSetRequest {
|
|
36
|
+
name?: string;
|
|
37
|
+
description?: string | null;
|
|
38
|
+
visibility?: KnowledgeVisibility;
|
|
39
|
+
}
|
|
40
|
+
export interface KnowledgeSource {
|
|
41
|
+
id: string;
|
|
42
|
+
setId: string;
|
|
43
|
+
kind: KnowledgeSourceKind;
|
|
44
|
+
name: string | null;
|
|
45
|
+
/** `markdown_feed` and `url`: `{ url }` (https). */
|
|
46
|
+
config: Record<string, any>;
|
|
47
|
+
/** Re-read every this many hours (default 24 for feeds and pages; null = only when asked). */
|
|
48
|
+
refreshHours: number | null;
|
|
49
|
+
status: 'pending' | 'indexing' | 'ready' | 'failed';
|
|
50
|
+
/** Why the last read failed (the previous passages stay searchable meanwhile). */
|
|
51
|
+
error: string | null;
|
|
52
|
+
passageCount: number;
|
|
53
|
+
lastIndexedAt: string | null;
|
|
54
|
+
createdAt: string;
|
|
55
|
+
updatedAt: string;
|
|
56
|
+
}
|
|
57
|
+
export interface AddKnowledgeSourceRequest {
|
|
58
|
+
kind: KnowledgeSourceKind;
|
|
59
|
+
config?: {
|
|
60
|
+
url?: string;
|
|
61
|
+
[key: string]: any;
|
|
62
|
+
};
|
|
63
|
+
name?: string;
|
|
64
|
+
refreshHours?: number | null;
|
|
65
|
+
}
|
|
66
|
+
export interface UpdateKnowledgeSourceRequest {
|
|
67
|
+
config?: {
|
|
68
|
+
url?: string;
|
|
69
|
+
[key: string]: any;
|
|
70
|
+
};
|
|
71
|
+
name?: string;
|
|
72
|
+
refreshHours?: number | null;
|
|
73
|
+
}
|
|
74
|
+
/** A document an app pushes into a `documents` source. Re-pushing the same `ref` replaces it. */
|
|
75
|
+
export interface KnowledgeDocument {
|
|
76
|
+
ref: string;
|
|
77
|
+
title: string;
|
|
78
|
+
/** Markdown. Split into passages along its headings. */
|
|
79
|
+
body: string;
|
|
80
|
+
/** The link to show with an answer. */
|
|
81
|
+
url?: string;
|
|
82
|
+
/** Details to filter searches on, e.g. `{ productId: 'p1' }`. */
|
|
83
|
+
meta?: Record<string, any>;
|
|
84
|
+
}
|
|
85
|
+
export interface KnowledgeSearchRequest {
|
|
86
|
+
query: string;
|
|
87
|
+
/** Only these sets (ids or keys). Default: every set the caller may read. */
|
|
88
|
+
sets?: string[];
|
|
89
|
+
/** Exact matches on a passage's details, e.g. `{ productId: 'p1' }`. */
|
|
90
|
+
filters?: Record<string, any>;
|
|
91
|
+
/** How many results (default 8, at most 25). */
|
|
92
|
+
k?: number;
|
|
93
|
+
}
|
|
94
|
+
export interface KnowledgeSearchResult {
|
|
95
|
+
id: string;
|
|
96
|
+
/** The document it came from. */
|
|
97
|
+
title: string;
|
|
98
|
+
/** Its section: "Settings › Email footer". */
|
|
99
|
+
heading: string | null;
|
|
100
|
+
/** A link to the section. */
|
|
101
|
+
url: string | null;
|
|
102
|
+
/** A short piece around the match, for a results list. */
|
|
103
|
+
snippet: string;
|
|
104
|
+
/** The whole passage, for an AI to read. */
|
|
105
|
+
text: string;
|
|
106
|
+
score: number;
|
|
107
|
+
set: {
|
|
108
|
+
id: string;
|
|
109
|
+
key: string;
|
|
110
|
+
name: string;
|
|
111
|
+
};
|
|
112
|
+
sourceId: string;
|
|
113
|
+
meta: Record<string, any>;
|
|
114
|
+
}
|
|
115
|
+
export interface KnowledgeSearchResponse {
|
|
116
|
+
query: string;
|
|
117
|
+
results: KnowledgeSearchResult[];
|
|
118
|
+
/** `hybrid` (meaning + keywords), `keywords` (where vectors aren't available) or `none` (no sets to search). */
|
|
119
|
+
mode: 'hybrid' | 'keywords' | 'none';
|
|
120
|
+
}
|
package/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.40 | Generated: 2026-11-22T09:29:50.349Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -156,6 +156,7 @@ The Smartlinks SDK is organized into the following namespaces:
|
|
|
156
156
|
- **integrations** - Functions for integrations operations
|
|
157
157
|
- **jobs** - Functions for jobs operations
|
|
158
158
|
- **journeysAnalytics** - Functions for journeysAnalytics operations
|
|
159
|
+
- **knowledge** - Functions for knowledge operations
|
|
159
160
|
- **location** - Functions for location operations
|
|
160
161
|
- **lots** - Functions for lots operations
|
|
161
162
|
- **navigation** - Functions for navigation operations
|
|
@@ -921,116 +922,6 @@ interface AIModelListResponse {
|
|
|
921
922
|
}
|
|
922
923
|
```
|
|
923
924
|
|
|
924
|
-
**DocumentChunk** (interface)
|
|
925
|
-
```typescript
|
|
926
|
-
interface DocumentChunk {
|
|
927
|
-
text: string
|
|
928
|
-
embedding: number[]
|
|
929
|
-
metadata: {
|
|
930
|
-
chunkIndex: number
|
|
931
|
-
documentId: string
|
|
932
|
-
[key: string]: any
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
```
|
|
936
|
-
|
|
937
|
-
**IndexDocumentRequest** (interface)
|
|
938
|
-
```typescript
|
|
939
|
-
interface IndexDocumentRequest {
|
|
940
|
-
productId: string
|
|
941
|
-
text?: string
|
|
942
|
-
documentUrl?: string
|
|
943
|
-
metadata?: Record<string, any>
|
|
944
|
-
chunkSize?: number
|
|
945
|
-
overlap?: number
|
|
946
|
-
provider?: 'openai' | 'gemini'
|
|
947
|
-
}
|
|
948
|
-
```
|
|
949
|
-
|
|
950
|
-
**IndexDocumentResponse** (interface)
|
|
951
|
-
```typescript
|
|
952
|
-
interface IndexDocumentResponse {
|
|
953
|
-
success: boolean
|
|
954
|
-
productId: string
|
|
955
|
-
documentId: string
|
|
956
|
-
chunks: number
|
|
957
|
-
metadata: {
|
|
958
|
-
textLength: number
|
|
959
|
-
chunkSize: number
|
|
960
|
-
overlap: number
|
|
961
|
-
embeddingDimensions: number
|
|
962
|
-
}
|
|
963
|
-
sample?: {
|
|
964
|
-
text: string
|
|
965
|
-
chunkIndex: number
|
|
966
|
-
}
|
|
967
|
-
}
|
|
968
|
-
```
|
|
969
|
-
|
|
970
|
-
**ConfigureAssistantRequest** (interface)
|
|
971
|
-
```typescript
|
|
972
|
-
interface ConfigureAssistantRequest {
|
|
973
|
-
productId: string
|
|
974
|
-
systemPrompt?: string
|
|
975
|
-
model?: string
|
|
976
|
-
maxTokensPerResponse?: number
|
|
977
|
-
temperature?: number
|
|
978
|
-
rateLimitPerUser?: number
|
|
979
|
-
allowedTopics?: string[]
|
|
980
|
-
customInstructions?: {
|
|
981
|
-
tone?: string
|
|
982
|
-
additionalRules?: string
|
|
983
|
-
[key: string]: any
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
```
|
|
987
|
-
|
|
988
|
-
**ConfigureAssistantResponse** (interface)
|
|
989
|
-
```typescript
|
|
990
|
-
interface ConfigureAssistantResponse {
|
|
991
|
-
success: boolean
|
|
992
|
-
configuration: {
|
|
993
|
-
productId: string
|
|
994
|
-
systemPrompt: string
|
|
995
|
-
model: string
|
|
996
|
-
maxTokensPerResponse: number
|
|
997
|
-
temperature: number
|
|
998
|
-
rateLimitPerUser: number
|
|
999
|
-
allowedTopics: string[]
|
|
1000
|
-
customInstructions?: Record<string, any>
|
|
1001
|
-
updatedAt: string
|
|
1002
|
-
}
|
|
1003
|
-
}
|
|
1004
|
-
```
|
|
1005
|
-
|
|
1006
|
-
**PublicChatRequest** (interface)
|
|
1007
|
-
```typescript
|
|
1008
|
-
interface PublicChatRequest {
|
|
1009
|
-
productId: string
|
|
1010
|
-
userId: string
|
|
1011
|
-
message: string
|
|
1012
|
-
sessionId?: string
|
|
1013
|
-
stream?: boolean
|
|
1014
|
-
}
|
|
1015
|
-
```
|
|
1016
|
-
|
|
1017
|
-
**PublicChatResponse** (interface)
|
|
1018
|
-
```typescript
|
|
1019
|
-
interface PublicChatResponse {
|
|
1020
|
-
message: string
|
|
1021
|
-
sessionId: string
|
|
1022
|
-
usage: {
|
|
1023
|
-
prompt_tokens: number
|
|
1024
|
-
completion_tokens: number
|
|
1025
|
-
total_tokens: number
|
|
1026
|
-
}
|
|
1027
|
-
context?: {
|
|
1028
|
-
chunksUsed: number
|
|
1029
|
-
topSimilarity: number
|
|
1030
|
-
}
|
|
1031
|
-
}
|
|
1032
|
-
```
|
|
1033
|
-
|
|
1034
925
|
**Session** (interface)
|
|
1035
926
|
```typescript
|
|
1036
927
|
interface Session {
|
|
@@ -1815,6 +1706,13 @@ interface HttpRequestArgs {
|
|
|
1815
1706
|
}
|
|
1816
1707
|
```
|
|
1817
1708
|
|
|
1709
|
+
**KnowledgeSearchArgs** (interface)
|
|
1710
|
+
```typescript
|
|
1711
|
+
interface KnowledgeSearchArgs {
|
|
1712
|
+
query: string; sets?: string[]; filters?: Record<string, any>; k?: number
|
|
1713
|
+
}
|
|
1714
|
+
```
|
|
1715
|
+
|
|
1818
1716
|
**TranslateArgs** (interface)
|
|
1819
1717
|
```typescript
|
|
1820
1718
|
interface TranslateArgs {
|
|
@@ -1851,6 +1749,7 @@ interface AiToolArgsMap {
|
|
|
1851
1749
|
'pdf.printReady': PdfPrintReadyArgs
|
|
1852
1750
|
'http.request': HttpRequestArgs
|
|
1853
1751
|
'translate': TranslateArgs
|
|
1752
|
+
'knowledge.search': KnowledgeSearchArgs
|
|
1854
1753
|
}
|
|
1855
1754
|
```
|
|
1856
1755
|
|
|
@@ -9899,6 +9798,131 @@ interface JourneyFunnelReportResponse {
|
|
|
9899
9798
|
|
|
9900
9799
|
**JourneyStepRecipientsResponse** = `string[]`
|
|
9901
9800
|
|
|
9801
|
+
### knowledge
|
|
9802
|
+
|
|
9803
|
+
**KnowledgeSet** (interface)
|
|
9804
|
+
```typescript
|
|
9805
|
+
interface KnowledgeSet {
|
|
9806
|
+
id: string
|
|
9807
|
+
key: string
|
|
9808
|
+
name: string
|
|
9809
|
+
description: string | null
|
|
9810
|
+
visibility: KnowledgeVisibility
|
|
9811
|
+
ownerAppId: string | null
|
|
9812
|
+
embedModel: string | null
|
|
9813
|
+
createdAt: string
|
|
9814
|
+
updatedAt: string
|
|
9815
|
+
sourceCount?: number
|
|
9816
|
+
passageCount?: number
|
|
9817
|
+
}
|
|
9818
|
+
```
|
|
9819
|
+
|
|
9820
|
+
**SaveKnowledgeSetRequest** (interface)
|
|
9821
|
+
```typescript
|
|
9822
|
+
interface SaveKnowledgeSetRequest {
|
|
9823
|
+
key: string
|
|
9824
|
+
name: string
|
|
9825
|
+
description?: string | null
|
|
9826
|
+
visibility?: KnowledgeVisibility
|
|
9827
|
+
}
|
|
9828
|
+
```
|
|
9829
|
+
|
|
9830
|
+
**UpdateKnowledgeSetRequest** (interface)
|
|
9831
|
+
```typescript
|
|
9832
|
+
interface UpdateKnowledgeSetRequest {
|
|
9833
|
+
name?: string
|
|
9834
|
+
description?: string | null
|
|
9835
|
+
visibility?: KnowledgeVisibility
|
|
9836
|
+
}
|
|
9837
|
+
```
|
|
9838
|
+
|
|
9839
|
+
**KnowledgeSource** (interface)
|
|
9840
|
+
```typescript
|
|
9841
|
+
interface KnowledgeSource {
|
|
9842
|
+
id: string
|
|
9843
|
+
setId: string
|
|
9844
|
+
kind: KnowledgeSourceKind
|
|
9845
|
+
name: string | null
|
|
9846
|
+
config: Record<string, any>
|
|
9847
|
+
refreshHours: number | null
|
|
9848
|
+
status: 'pending' | 'indexing' | 'ready' | 'failed'
|
|
9849
|
+
error: string | null
|
|
9850
|
+
passageCount: number
|
|
9851
|
+
lastIndexedAt: string | null
|
|
9852
|
+
createdAt: string
|
|
9853
|
+
updatedAt: string
|
|
9854
|
+
}
|
|
9855
|
+
```
|
|
9856
|
+
|
|
9857
|
+
**AddKnowledgeSourceRequest** (interface)
|
|
9858
|
+
```typescript
|
|
9859
|
+
interface AddKnowledgeSourceRequest {
|
|
9860
|
+
kind: KnowledgeSourceKind
|
|
9861
|
+
config?: { url?: string; [key: string]: any }
|
|
9862
|
+
name?: string
|
|
9863
|
+
refreshHours?: number | null
|
|
9864
|
+
}
|
|
9865
|
+
```
|
|
9866
|
+
|
|
9867
|
+
**UpdateKnowledgeSourceRequest** (interface)
|
|
9868
|
+
```typescript
|
|
9869
|
+
interface UpdateKnowledgeSourceRequest {
|
|
9870
|
+
config?: { url?: string; [key: string]: any }
|
|
9871
|
+
name?: string
|
|
9872
|
+
refreshHours?: number | null
|
|
9873
|
+
}
|
|
9874
|
+
```
|
|
9875
|
+
|
|
9876
|
+
**KnowledgeDocument** (interface)
|
|
9877
|
+
```typescript
|
|
9878
|
+
interface KnowledgeDocument {
|
|
9879
|
+
ref: string
|
|
9880
|
+
title: string
|
|
9881
|
+
body: string
|
|
9882
|
+
url?: string
|
|
9883
|
+
meta?: Record<string, any>
|
|
9884
|
+
}
|
|
9885
|
+
```
|
|
9886
|
+
|
|
9887
|
+
**KnowledgeSearchRequest** (interface)
|
|
9888
|
+
```typescript
|
|
9889
|
+
interface KnowledgeSearchRequest {
|
|
9890
|
+
query: string
|
|
9891
|
+
sets?: string[]
|
|
9892
|
+
filters?: Record<string, any>
|
|
9893
|
+
k?: number
|
|
9894
|
+
}
|
|
9895
|
+
```
|
|
9896
|
+
|
|
9897
|
+
**KnowledgeSearchResult** (interface)
|
|
9898
|
+
```typescript
|
|
9899
|
+
interface KnowledgeSearchResult {
|
|
9900
|
+
id: string
|
|
9901
|
+
title: string
|
|
9902
|
+
heading: string | null
|
|
9903
|
+
url: string | null
|
|
9904
|
+
snippet: string
|
|
9905
|
+
text: string
|
|
9906
|
+
score: number
|
|
9907
|
+
set: { id: string; key: string; name: string }
|
|
9908
|
+
sourceId: string
|
|
9909
|
+
meta: Record<string, any>
|
|
9910
|
+
}
|
|
9911
|
+
```
|
|
9912
|
+
|
|
9913
|
+
**KnowledgeSearchResponse** (interface)
|
|
9914
|
+
```typescript
|
|
9915
|
+
interface KnowledgeSearchResponse {
|
|
9916
|
+
query: string
|
|
9917
|
+
results: KnowledgeSearchResult[]
|
|
9918
|
+
mode: 'hybrid' | 'keywords' | 'none'
|
|
9919
|
+
}
|
|
9920
|
+
```
|
|
9921
|
+
|
|
9922
|
+
**KnowledgeVisibility** = `'public' | 'customer' | 'staff'`
|
|
9923
|
+
|
|
9924
|
+
**KnowledgeSourceKind** = ``
|
|
9925
|
+
|
|
9902
9926
|
### location
|
|
9903
9927
|
|
|
9904
9928
|
**Location** (interface)
|
|
@@ -15159,6 +15183,50 @@ POST /admin/collection/:collectionId/journeys.analytics/:journeyId/steps/:stepId
|
|
|
15159
15183
|
body: JourneyFunnelReportRequest) → `Promise<JourneyFunnelReportResponse>`
|
|
15160
15184
|
POST /admin/collection/:collectionId/journeys.analytics/:journeyId/funnel-report Computes conversion, counts, and avg time across mapped steps in a period.
|
|
15161
15185
|
|
|
15186
|
+
### knowledge
|
|
15187
|
+
|
|
15188
|
+
**listSets**(collectionId: string) → `Promise<KnowledgeSet[]>`
|
|
15189
|
+
Every set, with its source and passage counts (admin).
|
|
15190
|
+
|
|
15191
|
+
**saveSet**(collectionId: string, body: SaveKnowledgeSetRequest) → `Promise<KnowledgeSet>`
|
|
15192
|
+
Create a set, or update the one with this key (admin).
|
|
15193
|
+
|
|
15194
|
+
**getSet**(collectionId: string, set: string) → `Promise<KnowledgeSet>`
|
|
15195
|
+
One set, by id or key (admin).
|
|
15196
|
+
|
|
15197
|
+
**updateSet**(collectionId: string, set: string, body: UpdateKnowledgeSetRequest) → `Promise<KnowledgeSet>`
|
|
15198
|
+
One set, by id or key (admin).
|
|
15199
|
+
|
|
15200
|
+
**deleteSet**(collectionId: string, set: string) → `Promise<`
|
|
15201
|
+
Delete a set with its sources and passages (admin).
|
|
15202
|
+
|
|
15203
|
+
**listSources**(collectionId: string, set: string) → `Promise<KnowledgeSource[]>`
|
|
15204
|
+
A set's sources, with their status (admin).
|
|
15205
|
+
|
|
15206
|
+
**addSource**(collectionId: string, set: string, body: AddKnowledgeSourceRequest) → `Promise<KnowledgeSource>`
|
|
15207
|
+
Add a source; feeds and pages are read in the background (admin).
|
|
15208
|
+
|
|
15209
|
+
**updateSource**(collectionId: string, sourceId: string, body: UpdateKnowledgeSourceRequest) → `Promise<KnowledgeSource>`
|
|
15210
|
+
Add a source; feeds and pages are read in the background (admin).
|
|
15211
|
+
|
|
15212
|
+
**deleteSource**(collectionId: string, sourceId: string) → `Promise<`
|
|
15213
|
+
Add a source; feeds and pages are read in the background (admin).
|
|
15214
|
+
|
|
15215
|
+
**reindex**(collectionId: string, sourceId: string, opts: { force?: boolean } = {}) → `Promise<`
|
|
15216
|
+
Read a source again now (`force` re-splits even if it hasn't changed) (admin).
|
|
15217
|
+
|
|
15218
|
+
**upsertDocuments**(collectionId: string, sourceId: string, documents: KnowledgeDocument[]) → `Promise<`
|
|
15219
|
+
Push documents into a `documents` source; the same `ref` replaces its earlier version. Up to 500 at a time (admin).
|
|
15220
|
+
|
|
15221
|
+
**removeDocuments**(collectionId: string, sourceId: string, refs: string[]) → `Promise<`
|
|
15222
|
+
Remove pushed documents by `ref` (admin).
|
|
15223
|
+
|
|
15224
|
+
**search**(collectionId: string, body: KnowledgeSearchRequest) → `Promise<KnowledgeSearchResponse>`
|
|
15225
|
+
Search every set, staff ones included (admin).
|
|
15226
|
+
|
|
15227
|
+
**publicSearch**(collectionId: string, body: KnowledgeSearchRequest) → `Promise<KnowledgeSearchResponse>`
|
|
15228
|
+
Search from a website, Portal or Hub: public sets, plus customer sets for a signed-in person.
|
|
15229
|
+
|
|
15162
15230
|
### location
|
|
15163
15231
|
|
|
15164
15232
|
**createGlobal**(params: LocationPayload) → `Promise<Location>`
|
|
@@ -15744,10 +15812,6 @@ Get the active transfer/status for a proof (owner, collection admin, or the name
|
|
|
15744
15812
|
|
|
15745
15813
|
### publicClient
|
|
15746
15814
|
|
|
15747
|
-
**chat**(collectionId: string,
|
|
15748
|
-
request: PublicChatRequest) → `Promise<PublicChatResponse>`
|
|
15749
|
-
Chat with product assistant (RAG)
|
|
15750
|
-
|
|
15751
15815
|
**agentRun**(collectionId: string,
|
|
15752
15816
|
body: PublicAgentRunRequest) → `Promise<AgentRunResult>`
|
|
15753
15817
|
Public agent loop — run the orchestration-neutral tool loop on the consumer surface. Exposes an app's PUBLIC server functions (`agent.tool:true`, `visibility:'public'`) to a consumer assistant; built-in tools are opt-in by explicit `server_tools[]` allowlist only. The caller runs as the signed-in consumer ('owner', send the authKit bearer) or anonymous ('public'). POST /public/collection/:collectionId/ai/agent/run
|
|
@@ -15787,16 +15851,6 @@ List the signed-in consumer's own ('owner') sessions — requires an authKit bea
|
|
|
15787
15851
|
**lookupShortCode**(shortId: string, code: string) → `Promise<QrShortCodeLookupResponse>`
|
|
15788
15852
|
Resolve a short code to related resource identifiers.
|
|
15789
15853
|
|
|
15790
|
-
### rag
|
|
15791
|
-
|
|
15792
|
-
**indexDocument**(collectionId: string,
|
|
15793
|
-
request: IndexDocumentRequest) → `Promise<IndexDocumentResponse>`
|
|
15794
|
-
Index a document for RAG
|
|
15795
|
-
|
|
15796
|
-
**configureAssistant**(collectionId: string,
|
|
15797
|
-
request: ConfigureAssistantRequest) → `Promise<ConfigureAssistantResponse>`
|
|
15798
|
-
Configure AI assistant behavior
|
|
15799
|
-
|
|
15800
15854
|
### rateLimit
|
|
15801
15855
|
|
|
15802
15856
|
**reset**(collectionId: string, userId: string) → `Promise<`
|