@proveanything/smartlinks 1.7.6 → 1.7.9
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/README.md +68 -0
- package/dist/api/ai.d.ts +63 -8
- package/dist/api/ai.js +206 -31
- package/dist/docs/API_SUMMARY.md +192 -85
- package/dist/docs/ai.md +261 -47
- package/dist/openapi.yaml +272 -11
- package/dist/types/ai.d.ts +87 -0
- package/docs/API_SUMMARY.md +192 -85
- package/docs/ai.md +261 -47
- package/openapi.yaml +272 -11
- 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: 1.7.
|
|
3
|
+
Version: 1.7.9 | Generated: 2026-03-12T17:26:42.940Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -431,6 +431,93 @@ interface ToolDefinition {
|
|
|
431
431
|
}
|
|
432
432
|
```
|
|
433
433
|
|
|
434
|
+
**ResponseTool** (interface)
|
|
435
|
+
```typescript
|
|
436
|
+
interface ResponseTool {
|
|
437
|
+
type: string
|
|
438
|
+
name?: string
|
|
439
|
+
description?: string
|
|
440
|
+
parameters?: Record<string, any>
|
|
441
|
+
[key: string]: any
|
|
442
|
+
}
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
**ResponseInputItem** (interface)
|
|
446
|
+
```typescript
|
|
447
|
+
interface ResponseInputItem {
|
|
448
|
+
role?: 'system' | 'user' | 'assistant' | 'function' | 'tool'
|
|
449
|
+
type?: string
|
|
450
|
+
content?: string | ContentPart[]
|
|
451
|
+
name?: string
|
|
452
|
+
function_call?: FunctionCall
|
|
453
|
+
tool_calls?: ToolCall[]
|
|
454
|
+
tool_call_id?: string
|
|
455
|
+
[key: string]: any
|
|
456
|
+
}
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
**ResponsesRequest** (interface)
|
|
460
|
+
```typescript
|
|
461
|
+
interface ResponsesRequest {
|
|
462
|
+
model?: string
|
|
463
|
+
input?: string | ResponseInputItem[]
|
|
464
|
+
messages?: ResponseInputItem[]
|
|
465
|
+
previous_response_id?: string
|
|
466
|
+
conversation?: string | Record<string, any>
|
|
467
|
+
tools?: Array<ToolDefinition | ResponseTool>
|
|
468
|
+
tool_choice?:
|
|
469
|
+
| 'none'
|
|
470
|
+
| 'auto'
|
|
471
|
+
| 'required'
|
|
472
|
+
| { type: 'function'; function: { name: string } }
|
|
473
|
+
| { type: 'function'; name: string }
|
|
474
|
+
stream?: boolean
|
|
475
|
+
temperature?: number
|
|
476
|
+
max_output_tokens?: number
|
|
477
|
+
store?: boolean
|
|
478
|
+
instructions?: string
|
|
479
|
+
include?: string[]
|
|
480
|
+
reasoning?: Record<string, any>
|
|
481
|
+
parallel_tool_calls?: boolean
|
|
482
|
+
truncation?: 'auto' | 'disabled'
|
|
483
|
+
text?: Record<string, any>
|
|
484
|
+
metadata?: Record<string, string>
|
|
485
|
+
prompt_cache_key?: string
|
|
486
|
+
}
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
**ResponsesResult** (interface)
|
|
490
|
+
```typescript
|
|
491
|
+
interface ResponsesResult {
|
|
492
|
+
id: string
|
|
493
|
+
object: 'response'
|
|
494
|
+
created: number
|
|
495
|
+
model: string
|
|
496
|
+
status?: 'completed' | 'failed' | 'in_progress' | 'queued' | 'cancelled' | 'incomplete'
|
|
497
|
+
output: any[]
|
|
498
|
+
output_text: string
|
|
499
|
+
usage: {
|
|
500
|
+
input_tokens: number
|
|
501
|
+
output_tokens: number
|
|
502
|
+
total_tokens: number
|
|
503
|
+
}
|
|
504
|
+
error?: any
|
|
505
|
+
incomplete_details?: { reason?: 'max_output_tokens' | 'content_filter' } | null
|
|
506
|
+
previous_response_id?: string | null
|
|
507
|
+
conversation?: unknown
|
|
508
|
+
provider: 'openai'
|
|
509
|
+
responseTime: number
|
|
510
|
+
}
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
**ResponsesStreamEvent** (interface)
|
|
514
|
+
```typescript
|
|
515
|
+
interface ResponsesStreamEvent {
|
|
516
|
+
type: string
|
|
517
|
+
[key: string]: any
|
|
518
|
+
}
|
|
519
|
+
```
|
|
520
|
+
|
|
434
521
|
**ChatCompletionRequest** (interface)
|
|
435
522
|
```typescript
|
|
436
523
|
interface ChatCompletionRequest {
|
|
@@ -509,6 +596,22 @@ interface AIModel {
|
|
|
509
596
|
}
|
|
510
597
|
```
|
|
511
598
|
|
|
599
|
+
**AIModelListParams** (interface)
|
|
600
|
+
```typescript
|
|
601
|
+
interface AIModelListParams {
|
|
602
|
+
provider?: 'gemini' | 'openai'
|
|
603
|
+
capability?: 'text' | 'vision' | 'audio' | 'code'
|
|
604
|
+
}
|
|
605
|
+
```
|
|
606
|
+
|
|
607
|
+
**AIModelListResponse** (interface)
|
|
608
|
+
```typescript
|
|
609
|
+
interface AIModelListResponse {
|
|
610
|
+
object: 'list'
|
|
611
|
+
data: AIModel[]
|
|
612
|
+
}
|
|
613
|
+
```
|
|
614
|
+
|
|
512
615
|
**DocumentChunk** (interface)
|
|
513
616
|
```typescript
|
|
514
617
|
interface DocumentChunk {
|
|
@@ -5286,90 +5389,6 @@ type AccountInfoResponse = {
|
|
|
5286
5389
|
|
|
5287
5390
|
## API Functions
|
|
5288
5391
|
|
|
5289
|
-
### ai
|
|
5290
|
-
|
|
5291
|
-
**create**(collectionId: string,
|
|
5292
|
-
request: ChatCompletionRequest) → `Promise<ChatCompletionResponse | AsyncIterable<ChatCompletionChunk>>`
|
|
5293
|
-
Create a chat completion (streaming or non-streaming)
|
|
5294
|
-
|
|
5295
|
-
**list**(collectionId: string) → `Promise<`
|
|
5296
|
-
List available AI models
|
|
5297
|
-
|
|
5298
|
-
**get**(collectionId: string, modelId: string) → `Promise<AIModel>`
|
|
5299
|
-
Get specific model information
|
|
5300
|
-
|
|
5301
|
-
**indexDocument**(collectionId: string,
|
|
5302
|
-
request: IndexDocumentRequest) → `Promise<IndexDocumentResponse>`
|
|
5303
|
-
Index a document for RAG
|
|
5304
|
-
|
|
5305
|
-
**configureAssistant**(collectionId: string,
|
|
5306
|
-
request: ConfigureAssistantRequest) → `Promise<ConfigureAssistantResponse>`
|
|
5307
|
-
Configure AI assistant behavior
|
|
5308
|
-
|
|
5309
|
-
**stats**(collectionId: string) → `Promise<SessionStatistics>`
|
|
5310
|
-
Get session statistics
|
|
5311
|
-
|
|
5312
|
-
**reset**(collectionId: string, userId: string) → `Promise<`
|
|
5313
|
-
Reset rate limit for a user
|
|
5314
|
-
|
|
5315
|
-
**generate**(collectionId: string,
|
|
5316
|
-
request: GeneratePodcastRequest) → `Promise<GeneratePodcastResponse>`
|
|
5317
|
-
Generate a NotebookLM-style conversational podcast from product documents
|
|
5318
|
-
|
|
5319
|
-
**getStatus**(collectionId: string, podcastId: string) → `Promise<PodcastStatus>`
|
|
5320
|
-
Get podcast generation status
|
|
5321
|
-
|
|
5322
|
-
**generate**(collectionId: string,
|
|
5323
|
-
request: TTSRequest) → `Promise<Blob>`
|
|
5324
|
-
Generate text-to-speech audio
|
|
5325
|
-
|
|
5326
|
-
**chat**(collectionId: string,
|
|
5327
|
-
request: PublicChatRequest) → `Promise<PublicChatResponse>`
|
|
5328
|
-
Chat with product assistant (RAG)
|
|
5329
|
-
|
|
5330
|
-
**getSession**(collectionId: string, sessionId: string) → `Promise<Session>`
|
|
5331
|
-
Get session history
|
|
5332
|
-
|
|
5333
|
-
**clearSession**(collectionId: string, sessionId: string) → `Promise<`
|
|
5334
|
-
Clear session history
|
|
5335
|
-
|
|
5336
|
-
**getRateLimit**(collectionId: string, userId: string) → `Promise<RateLimitStatus>`
|
|
5337
|
-
Check rate limit status
|
|
5338
|
-
|
|
5339
|
-
**getToken**(collectionId: string,
|
|
5340
|
-
request: EphemeralTokenRequest) → `Promise<EphemeralTokenResponse>`
|
|
5341
|
-
Generate ephemeral token for Gemini Live
|
|
5342
|
-
|
|
5343
|
-
**isSupported**() → `boolean`
|
|
5344
|
-
Check if voice is supported in browser
|
|
5345
|
-
|
|
5346
|
-
**listen**(language = 'en-US') → `Promise<string>`
|
|
5347
|
-
Listen for voice input
|
|
5348
|
-
|
|
5349
|
-
**speak**(text: string, options?: { voice?: string; rate?: number }) → `Promise<void>`
|
|
5350
|
-
Speak text
|
|
5351
|
-
|
|
5352
|
-
**generateContent**(collectionId: string,
|
|
5353
|
-
params: AIGenerateContentRequest,
|
|
5354
|
-
admin: boolean = true) → `Promise<any>`
|
|
5355
|
-
Generate text/content via AI (admin)
|
|
5356
|
-
|
|
5357
|
-
**generateImage**(collectionId: string, params: AIGenerateImageRequest) → `Promise<any>`
|
|
5358
|
-
Generate an image via AI (admin)
|
|
5359
|
-
|
|
5360
|
-
**searchPhotos**(collectionId: string,
|
|
5361
|
-
params: AISearchPhotosRequest) → `Promise<AISearchPhotosPhoto[]>`
|
|
5362
|
-
Search stock photos or similar via AI (admin)
|
|
5363
|
-
|
|
5364
|
-
**uploadFile**(collectionId: string, params: any) → `Promise<any>`
|
|
5365
|
-
Upload a file for AI usage (admin). Pass FormData for binary uploads.
|
|
5366
|
-
|
|
5367
|
-
**createCache**(collectionId: string, params: any) → `Promise<any>`
|
|
5368
|
-
Create or warm a cache for AI (admin)
|
|
5369
|
-
|
|
5370
|
-
**postChat**(collectionId: string, params: any, admin: boolean = true) → `Promise<any>`
|
|
5371
|
-
Post a chat message to the AI (admin or public)
|
|
5372
|
-
|
|
5373
5392
|
### app
|
|
5374
5393
|
|
|
5375
5394
|
**create**(collectionId: string,
|
|
@@ -5838,6 +5857,94 @@ Get all tags/codes assigned to a specific batch. Shows which claim set codes hav
|
|
|
5838
5857
|
**appendBulk**(collectionId: string,
|
|
5839
5858
|
body: BroadcastAppendBulkBody) → `Promise<AppendBulkResult>`
|
|
5840
5859
|
|
|
5860
|
+
### chat
|
|
5861
|
+
|
|
5862
|
+
**create**(collectionId: string,
|
|
5863
|
+
request: ResponsesRequest) → `Promise<ResponsesResult | AsyncIterable<ResponsesStreamEvent>>`
|
|
5864
|
+
Create a Responses API request (streaming or non-streaming)
|
|
5865
|
+
|
|
5866
|
+
**create**(collectionId: string,
|
|
5867
|
+
request: ChatCompletionRequest) → `Promise<ChatCompletionResponse | AsyncIterable<ChatCompletionChunk>>`
|
|
5868
|
+
Create a chat completion (streaming or non-streaming)
|
|
5869
|
+
|
|
5870
|
+
**list**(collectionId: string, params?: AIModelListParams) → `Promise<AIModelListResponse>`
|
|
5871
|
+
List available AI models
|
|
5872
|
+
|
|
5873
|
+
**get**(collectionId: string, modelId: string) → `Promise<AIModel>`
|
|
5874
|
+
Get specific model information
|
|
5875
|
+
|
|
5876
|
+
**indexDocument**(collectionId: string,
|
|
5877
|
+
request: IndexDocumentRequest) → `Promise<IndexDocumentResponse>`
|
|
5878
|
+
Index a document for RAG
|
|
5879
|
+
|
|
5880
|
+
**configureAssistant**(collectionId: string,
|
|
5881
|
+
request: ConfigureAssistantRequest) → `Promise<ConfigureAssistantResponse>`
|
|
5882
|
+
Configure AI assistant behavior
|
|
5883
|
+
|
|
5884
|
+
**stats**(collectionId: string) → `Promise<SessionStatistics>`
|
|
5885
|
+
Get session statistics
|
|
5886
|
+
|
|
5887
|
+
**reset**(collectionId: string, userId: string) → `Promise<`
|
|
5888
|
+
Reset rate limit for a user
|
|
5889
|
+
|
|
5890
|
+
**generate**(collectionId: string,
|
|
5891
|
+
request: GeneratePodcastRequest) → `Promise<GeneratePodcastResponse>`
|
|
5892
|
+
Generate a NotebookLM-style conversational podcast from product documents
|
|
5893
|
+
|
|
5894
|
+
**getStatus**(collectionId: string, podcastId: string) → `Promise<PodcastStatus>`
|
|
5895
|
+
Get podcast generation status
|
|
5896
|
+
|
|
5897
|
+
**generate**(collectionId: string,
|
|
5898
|
+
request: TTSRequest) → `Promise<Blob>`
|
|
5899
|
+
Generate text-to-speech audio
|
|
5900
|
+
|
|
5901
|
+
**chat**(collectionId: string,
|
|
5902
|
+
request: PublicChatRequest) → `Promise<PublicChatResponse>`
|
|
5903
|
+
Chat with product assistant (RAG)
|
|
5904
|
+
|
|
5905
|
+
**getSession**(collectionId: string, sessionId: string) → `Promise<Session>`
|
|
5906
|
+
Get session history
|
|
5907
|
+
|
|
5908
|
+
**clearSession**(collectionId: string, sessionId: string) → `Promise<`
|
|
5909
|
+
Clear session history
|
|
5910
|
+
|
|
5911
|
+
**getRateLimit**(collectionId: string, userId: string) → `Promise<RateLimitStatus>`
|
|
5912
|
+
Check rate limit status
|
|
5913
|
+
|
|
5914
|
+
**getToken**(collectionId: string,
|
|
5915
|
+
request: EphemeralTokenRequest) → `Promise<EphemeralTokenResponse>`
|
|
5916
|
+
Generate ephemeral token for Gemini Live
|
|
5917
|
+
|
|
5918
|
+
**isSupported**() → `boolean`
|
|
5919
|
+
Check if voice is supported in browser
|
|
5920
|
+
|
|
5921
|
+
**listen**(language = 'en-US') → `Promise<string>`
|
|
5922
|
+
Listen for voice input
|
|
5923
|
+
|
|
5924
|
+
**speak**(text: string, options?: { voice?: string; rate?: number }) → `Promise<void>`
|
|
5925
|
+
Speak text
|
|
5926
|
+
|
|
5927
|
+
**generateContent**(collectionId: string,
|
|
5928
|
+
params: AIGenerateContentRequest,
|
|
5929
|
+
admin: boolean = true) → `Promise<any>`
|
|
5930
|
+
Generate text/content via AI (admin)
|
|
5931
|
+
|
|
5932
|
+
**generateImage**(collectionId: string, params: AIGenerateImageRequest) → `Promise<any>`
|
|
5933
|
+
Generate an image via AI (admin)
|
|
5934
|
+
|
|
5935
|
+
**searchPhotos**(collectionId: string,
|
|
5936
|
+
params: AISearchPhotosRequest) → `Promise<AISearchPhotosPhoto[]>`
|
|
5937
|
+
Search stock photos or similar via AI (admin)
|
|
5938
|
+
|
|
5939
|
+
**uploadFile**(collectionId: string, params: any) → `Promise<any>`
|
|
5940
|
+
Upload a file for AI usage (admin). Pass FormData for binary uploads.
|
|
5941
|
+
|
|
5942
|
+
**createCache**(collectionId: string, params: any) → `Promise<any>`
|
|
5943
|
+
Create or warm a cache for AI (admin)
|
|
5944
|
+
|
|
5945
|
+
**postChat**(collectionId: string, params: any, admin: boolean = true) → `Promise<any>`
|
|
5946
|
+
Post a chat message to the AI (admin or public)
|
|
5947
|
+
|
|
5841
5948
|
### claimSet
|
|
5842
5949
|
|
|
5843
5950
|
**getAllForCollection**(collectionId: string) → `Promise<any[]>`
|