@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/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<`
|