@proveanything/smartlinks 2.1.18 → 2.1.19
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 +19 -0
- package/dist/adminViews.js +16 -0
- package/dist/api/ai.d.ts +15 -5
- package/dist/api/ai.js +15 -9
- package/dist/api/aiGuide.d.ts +108 -0
- package/dist/api/aiGuide.js +161 -0
- package/dist/api/appObjects.d.ts +21 -0
- package/dist/api/appObjects.js +33 -1
- package/dist/api/authKit.d.ts +37 -1
- package/dist/api/authKit.js +51 -0
- package/dist/docs/API_SUMMARY.md +509 -40
- package/dist/docs/admin-lists-and-pickers.md +140 -0
- package/dist/docs/admin-views.md +22 -0
- package/dist/docs/app-data-storage.md +277 -276
- package/dist/docs/auth-kit.md +872 -741
- package/dist/docs/comms.md +686 -644
- package/dist/docs/customer-guide.md +70 -0
- package/dist/docs/headless-providers.md +112 -112
- package/dist/docs/server-functions.md +69 -1
- package/dist/docs/ui-utils.md +123 -121
- package/dist/docs/user-groups.md +175 -168
- package/dist/headless.js +38 -2
- package/dist/http.js +4 -0
- package/dist/index.d.ts +2 -2
- package/dist/live.d.ts +80 -0
- package/dist/live.js +315 -0
- package/dist/openapi.yaml +888 -34
- package/dist/testing/index.d.ts +22 -0
- package/dist/testing/index.js +31 -0
- package/dist/types/appManifest.d.ts +214 -1
- package/dist/types/appOptions.d.ts +32 -0
- package/dist/types/appOptions.js +3 -0
- package/dist/types/authKit.d.ts +193 -4
- package/dist/types/comms.d.ts +41 -2
- package/dist/types/headless.d.ts +49 -1
- package/dist/types/iframeResponder.d.ts +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/docs/API_SUMMARY.md +509 -40
- package/docs/admin-lists-and-pickers.md +140 -0
- package/docs/admin-views.md +22 -0
- package/docs/app-data-storage.md +277 -276
- package/docs/auth-kit.md +872 -741
- package/docs/comms.md +686 -644
- package/docs/customer-guide.md +70 -0
- package/docs/headless-providers.md +112 -112
- package/docs/server-functions.md +69 -1
- package/docs/ui-utils.md +123 -121
- package/docs/user-groups.md +175 -168
- package/openapi.yaml +888 -34
- package/package.json +1 -1
- package/scripts/doctor.mjs +454 -428
- package/scripts/lib/keyed-app-data.mjs +21 -0
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.19 | Generated: 2026-11-16T19:01:42.716Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -137,6 +137,7 @@ The Smartlinks SDK is organized into the following namespaces:
|
|
|
137
137
|
|
|
138
138
|
— Other —
|
|
139
139
|
- **adminCards** - Functions for adminCards operations
|
|
140
|
+
- **aiGuide** - Functions for aiGuide operations
|
|
140
141
|
- **analytics** - Functions for analytics operations
|
|
141
142
|
- **async** - Functions for async operations
|
|
142
143
|
- **attestation** - Functions for attestation operations
|
|
@@ -2867,6 +2868,22 @@ interface AppHistoryQuery {
|
|
|
2867
2868
|
}
|
|
2868
2869
|
```
|
|
2869
2870
|
|
|
2871
|
+
**ServerFunctionMessage** (interface)
|
|
2872
|
+
```typescript
|
|
2873
|
+
interface ServerFunctionMessage {
|
|
2874
|
+
contactId?: string;
|
|
2875
|
+
to?: 'caller';
|
|
2876
|
+
templateId?: string;
|
|
2877
|
+
message?: TypedMessage;
|
|
2878
|
+
channel?: 'preferred' | 'email' | 'sms' | 'whatsapp' | 'push' | 'wallet';
|
|
2879
|
+
props?: Record<string, unknown>;
|
|
2880
|
+
include?: Record<string, unknown>;
|
|
2881
|
+
about?: MessageAbout;
|
|
2882
|
+
ref?: string;
|
|
2883
|
+
attach?: EmailAttachmentSpec[];
|
|
2884
|
+
}
|
|
2885
|
+
```
|
|
2886
|
+
|
|
2870
2887
|
**ServerFunctionSl** (interface)
|
|
2871
2888
|
```typescript
|
|
2872
2889
|
interface ServerFunctionSl {
|
|
@@ -2880,8 +2897,15 @@ interface ServerFunctionSl {
|
|
|
2880
2897
|
claim(fields: Record<string, any>): Promise<AppRecordClaimResult>;
|
|
2881
2898
|
adjust(recordId: string, by: Record<string, number>, opts?: { atLeast?: Record<string, number>; atMost?: Record<string, number> }): Promise<any>;
|
|
2882
2899
|
aggregate(params?: import('./appObjects').AggregateRequest): Promise<import('./appObjects').AggregateResponse & Record<string, unknown>>;
|
|
2900
|
+
all(recordType: string): Promise<any[]>;
|
|
2883
2901
|
[method: string]: any;
|
|
2884
2902
|
};
|
|
2903
|
+
appOptions: {
|
|
2904
|
+
get(source: string, opts?: { q?: string; version?: string }): Promise<import('./appOptions').AppOptionsResponse>;
|
|
2905
|
+
};
|
|
2906
|
+
userGroups: {
|
|
2907
|
+
members(keys?: string[]): Promise<Array<{ userId: string; name: string | null; email: string | null; userGroups: string[] }>>;
|
|
2908
|
+
};
|
|
2885
2909
|
transaction(ops: RecordTransactionOp[], opts?: { idempotencyKey?: string }): Promise<{ results: any[]; replayed: boolean }>;
|
|
2886
2910
|
history: {
|
|
2887
2911
|
log(type: string, data?: Record<string, any>, opts?: { entityId?: string }): Promise<{ id: string }>;
|
|
@@ -2894,7 +2918,10 @@ interface ServerFunctionSl {
|
|
|
2894
2918
|
forCaller(): Promise<CallerContact | null>;
|
|
2895
2919
|
};
|
|
2896
2920
|
interactions: { record(event: ServerFunctionInteractionEvent): Promise<{ eventId: string }> };
|
|
2921
|
+
messages: { send(input: ServerFunctionMessage): Promise<ServerFunctionMessageResult> };
|
|
2897
2922
|
tools: { run<T = any>(name: string, args?: Record<string, any>): Promise<T> };
|
|
2923
|
+
assets: ServerFunctionAssets;
|
|
2924
|
+
ai: ServerFunctionAi;
|
|
2898
2925
|
products: any;
|
|
2899
2926
|
attestations: any;
|
|
2900
2927
|
appData: AppDataHandle & { global: AppDataHandle; collection: AppDataHandle };
|
|
@@ -2902,6 +2929,66 @@ interface ServerFunctionSl {
|
|
|
2902
2929
|
}
|
|
2903
2930
|
```
|
|
2904
2931
|
|
|
2932
|
+
**ServerFunctionAsset** (interface)
|
|
2933
|
+
```typescript
|
|
2934
|
+
interface ServerFunctionAsset {
|
|
2935
|
+
id: string;
|
|
2936
|
+
appId: string | null;
|
|
2937
|
+
productId: string | null;
|
|
2938
|
+
proofId: string | null;
|
|
2939
|
+
name: string;
|
|
2940
|
+
assetType: string;
|
|
2941
|
+
mimeType: string | null;
|
|
2942
|
+
size: number | null;
|
|
2943
|
+
width: number | null;
|
|
2944
|
+
height: number | null;
|
|
2945
|
+
hash: string | null;
|
|
2946
|
+
url: string;
|
|
2947
|
+
assetUrl: string | null;
|
|
2948
|
+
thumbnail: string | null;
|
|
2949
|
+
labels: string[];
|
|
2950
|
+
metadata: Record<string, any>;
|
|
2951
|
+
versions: number;
|
|
2952
|
+
status: string;
|
|
2953
|
+
createdAt: string;
|
|
2954
|
+
updatedAt: string;
|
|
2955
|
+
}
|
|
2956
|
+
```
|
|
2957
|
+
|
|
2958
|
+
**ServerFunctionAssets** (interface)
|
|
2959
|
+
```typescript
|
|
2960
|
+
interface ServerFunctionAssets {
|
|
2961
|
+
get(assetId: string): Promise<ServerFunctionAsset | null>;
|
|
2962
|
+
list(params?: { productId?: string | null; proofId?: string | null; appId?: string | null; labels?: string | string[]; assetType?: string; limit?: number; offset?: number }): Promise<ServerFunctionAsset[]>;
|
|
2963
|
+
read(assetId: string, opts?: { as?: 'base64' }): Promise<{ id: string; name: string; contentType: string; size: number; base64: string }>;
|
|
2964
|
+
read(assetId: string, opts: { as: 'text' }): Promise<{ id: string; name: string; contentType: string; size: number; text: string }>;
|
|
2965
|
+
create(input: ServerFunctionFileInput & { name: string; productId?: string; proofId?: string; labels?: string[]; metadata?: Record<string, any> }): Promise<ServerFunctionAsset>;
|
|
2966
|
+
replace(assetId: string, input: ServerFunctionFileInput & { name?: string }): Promise<ServerFunctionAsset>;
|
|
2967
|
+
update(assetId: string, patch: { name?: string; labels?: string[]; metadata?: Record<string, any> }): Promise<ServerFunctionAsset>;
|
|
2968
|
+
remove(assetId: string): Promise<{ id: string; deleted: true }>;
|
|
2969
|
+
startUpload(input: { name: string; contentType: string; productId?: string; proofId?: string; replaceAssetId?: string }): Promise<{ uploadId: string; sessionUrl: string; expiresAt: string }>;
|
|
2970
|
+
finishUpload(uploadId: string, input?: { name?: string; metadata?: Record<string, any> }): Promise<ServerFunctionAsset>;
|
|
2971
|
+
}
|
|
2972
|
+
```
|
|
2973
|
+
|
|
2974
|
+
**ServerFunctionAiRequest** (interface)
|
|
2975
|
+
```typescript
|
|
2976
|
+
interface ServerFunctionAiRequest {
|
|
2977
|
+
prompt?: string;
|
|
2978
|
+
system?: string;
|
|
2979
|
+
files?: Array<{ assetId: string } | { base64: string; contentType: string } | { text: string; name?: string }>;
|
|
2980
|
+
schema?: Record<string, any>;
|
|
2981
|
+
quality?: 'fast' | 'best';
|
|
2982
|
+
}
|
|
2983
|
+
```
|
|
2984
|
+
|
|
2985
|
+
**ServerFunctionAi** (interface)
|
|
2986
|
+
```typescript
|
|
2987
|
+
interface ServerFunctionAi {
|
|
2988
|
+
generate<T = any>(request: ServerFunctionAiRequest): Promise<{ text: string; data?: T; model: string; usage: { inputTokens: number; outputTokens: number } }>;
|
|
2989
|
+
}
|
|
2990
|
+
```
|
|
2991
|
+
|
|
2905
2992
|
**ServerFunctionCaller** (interface)
|
|
2906
2993
|
```typescript
|
|
2907
2994
|
interface ServerFunctionCaller {
|
|
@@ -3360,6 +3447,13 @@ interface GetCollectionWidgetsOptions {
|
|
|
3360
3447
|
|
|
3361
3448
|
**RecordTransactionOp** = ``
|
|
3362
3449
|
|
|
3450
|
+
**ServerFunctionMessageResult** = ``
|
|
3451
|
+
|
|
3452
|
+
**ServerFunctionFileInput** (type)
|
|
3453
|
+
```typescript
|
|
3454
|
+
type ServerFunctionFileInput = { base64: string; contentType: string }
|
|
3455
|
+
```
|
|
3456
|
+
|
|
3363
3457
|
### appObjects
|
|
3364
3458
|
|
|
3365
3459
|
**PaginatedResponse<T>** (interface)
|
|
@@ -3921,6 +4015,30 @@ interface PublicCreateBranch {
|
|
|
3921
4015
|
|
|
3922
4016
|
**MatchedAt** = ``
|
|
3923
4017
|
|
|
4018
|
+
### appOptions
|
|
4019
|
+
|
|
4020
|
+
**AppOption** (interface)
|
|
4021
|
+
```typescript
|
|
4022
|
+
interface AppOption {
|
|
4023
|
+
id: string;
|
|
4024
|
+
label: string;
|
|
4025
|
+
sublabel?: string;
|
|
4026
|
+
active: boolean;
|
|
4027
|
+
order: number | null;
|
|
4028
|
+
}
|
|
4029
|
+
```
|
|
4030
|
+
|
|
4031
|
+
**AppOptionValueInput** (interface)
|
|
4032
|
+
```typescript
|
|
4033
|
+
interface AppOptionValueInput {
|
|
4034
|
+
code: string;
|
|
4035
|
+
label?: string;
|
|
4036
|
+
active?: boolean;
|
|
4037
|
+
}
|
|
4038
|
+
```
|
|
4039
|
+
|
|
4040
|
+
**AppOptionsResponse** = ``
|
|
4041
|
+
|
|
3924
4042
|
### asset
|
|
3925
4043
|
|
|
3926
4044
|
**AssetRef** (interface)
|
|
@@ -5026,14 +5144,45 @@ interface UpsertContactResponse {
|
|
|
5026
5144
|
**AuthKitBrandingConfig** (interface)
|
|
5027
5145
|
```typescript
|
|
5028
5146
|
interface AuthKitBrandingConfig {
|
|
5029
|
-
logoUrl?: string
|
|
5147
|
+
logoUrl?: string | null
|
|
5030
5148
|
title?: string
|
|
5031
5149
|
subtitle?: string
|
|
5150
|
+
registerTitle?: string
|
|
5151
|
+
registerSubtitle?: string
|
|
5032
5152
|
primaryColor?: string
|
|
5033
5153
|
secondaryColor?: string
|
|
5034
5154
|
backgroundColor?: string
|
|
5035
|
-
buttonStyle?: string
|
|
5155
|
+
buttonStyle?: 'rounded' | 'square' | 'pill' | string
|
|
5036
5156
|
fontFamily?: string
|
|
5157
|
+
theme?: 'light' | 'dark' | 'auto'
|
|
5158
|
+
inheritHostStyles?: boolean
|
|
5159
|
+
minimal?: boolean
|
|
5160
|
+
customCss?: string
|
|
5161
|
+
termsUrl?: string
|
|
5162
|
+
privacyUrl?: string
|
|
5163
|
+
[key: string]: unknown
|
|
5164
|
+
}
|
|
5165
|
+
```
|
|
5166
|
+
|
|
5167
|
+
**AuthKitEmailTemplate** (interface)
|
|
5168
|
+
```typescript
|
|
5169
|
+
interface AuthKitEmailTemplate {
|
|
5170
|
+
subject?: string
|
|
5171
|
+
header?: string
|
|
5172
|
+
introText?: string
|
|
5173
|
+
buttonText?: string
|
|
5174
|
+
footerText?: string
|
|
5175
|
+
}
|
|
5176
|
+
```
|
|
5177
|
+
|
|
5178
|
+
**AuthKitMfaConfig** (interface)
|
|
5179
|
+
```typescript
|
|
5180
|
+
interface AuthKitMfaConfig {
|
|
5181
|
+
mode?: 'off' | 'optional' | 'risk-based' | 'always'
|
|
5182
|
+
factorsEnabled?: { email?: boolean; sms?: boolean; totp?: boolean; recoveryCodes?: boolean }
|
|
5183
|
+
minimumFactors?: number
|
|
5184
|
+
trustedDeviceDurationDays?: number
|
|
5185
|
+
enforceForAdmins?: boolean
|
|
5037
5186
|
}
|
|
5038
5187
|
```
|
|
5039
5188
|
|
|
@@ -5041,8 +5190,33 @@ interface AuthKitBrandingConfig {
|
|
|
5041
5190
|
```typescript
|
|
5042
5191
|
interface AuthKitConfig {
|
|
5043
5192
|
id: string
|
|
5193
|
+
name?: string
|
|
5044
5194
|
branding?: AuthKitBrandingConfig
|
|
5045
|
-
enabledProviders?:
|
|
5195
|
+
enabledProviders?: AuthKitProvider[]
|
|
5196
|
+
providerOrder?: AuthKitProvider[]
|
|
5197
|
+
emailDisplayMode?: 'form' | 'button'
|
|
5198
|
+
signupProminence?: 'none' | 'minimal' | 'balanced' | 'emphasized'
|
|
5199
|
+
signupRedirectUrl?: string
|
|
5200
|
+
googleClientId?: string
|
|
5201
|
+
googleOAuthFlow?: 'oneTap' | 'popup' | 'redirect'
|
|
5202
|
+
whitelistedGoogleDomains?: string[]
|
|
5203
|
+
appleClientIds?: string[]
|
|
5204
|
+
linkedInClientId?: string
|
|
5205
|
+
whatsappPrefillMessage?: string
|
|
5206
|
+
whatsappReply?: { enabled?: boolean; text?: string; cta?: { body?: string; buttonLabel?: string; buttonUrl?: string; mediaUrl?: string } }
|
|
5207
|
+
registrationFields?: Array<{ key: string; showDuringRegistration?: boolean; placement?: 'inline' | 'after'; required?: boolean }>
|
|
5208
|
+
collectNameOnPasswordlessSignup?: boolean
|
|
5209
|
+
emailVerificationMode?: 'immediate' | 'verify-auto-login' | 'verify-manual-login'
|
|
5210
|
+
emailVerificationGracePeriod?: number
|
|
5211
|
+
lockUnverifiedAfterGrace?: boolean
|
|
5212
|
+
allowPasswordReset?: boolean
|
|
5213
|
+
mfa?: AuthKitMfaConfig
|
|
5214
|
+
afterSignInUrl?: string
|
|
5215
|
+
allowedRedirectDomains?: string[]
|
|
5216
|
+
texts?: Partial<Record<AuthKitTextKey, string>>
|
|
5217
|
+
emailTemplates?: Partial<Record<AuthKitEmailKind, AuthKitEmailTemplate>>
|
|
5218
|
+
emailBranding?: { logoUrl?: string; buttonColor?: string; footerHtml?: string }
|
|
5219
|
+
secrets?: Record<string, { ref: string; hint?: string | null; collectionId?: string; setAt?: string }>
|
|
5046
5220
|
customCss?: string
|
|
5047
5221
|
termsUrl?: string
|
|
5048
5222
|
privacyUrl?: string
|
|
@@ -5098,6 +5272,77 @@ interface AuthKitSetIdentityResponse {
|
|
|
5098
5272
|
}
|
|
5099
5273
|
```
|
|
5100
5274
|
|
|
5275
|
+
**AuthKitSchema** (interface)
|
|
5276
|
+
```typescript
|
|
5277
|
+
interface AuthKitSchema {
|
|
5278
|
+
providers: AuthKitProvider[]
|
|
5279
|
+
emailKinds: AuthKitEmailKind[]
|
|
5280
|
+
emailFields: Array<keyof AuthKitEmailTemplate>
|
|
5281
|
+
textKeys: AuthKitTextKey[]
|
|
5282
|
+
secrets: string[]
|
|
5283
|
+
serverOwned: string[]
|
|
5284
|
+
fields: Array<{ path: string; group: string; where: 'screens' | 'server' | 'both' | 'host'; default: unknown; description: string }>
|
|
5285
|
+
}
|
|
5286
|
+
```
|
|
5287
|
+
|
|
5288
|
+
**AuthKitCheck** (interface)
|
|
5289
|
+
```typescript
|
|
5290
|
+
interface AuthKitCheck {
|
|
5291
|
+
level: 'problem' | 'warning' | 'info'
|
|
5292
|
+
code: string
|
|
5293
|
+
message: string
|
|
5294
|
+
setting?: string
|
|
5295
|
+
}
|
|
5296
|
+
```
|
|
5297
|
+
|
|
5298
|
+
**AuthKitSettingsResponse** (interface)
|
|
5299
|
+
```typescript
|
|
5300
|
+
interface AuthKitSettingsResponse {
|
|
5301
|
+
authKitId: string
|
|
5302
|
+
ownLogins: 'own' | 'shared'
|
|
5303
|
+
config: AuthKitConfig
|
|
5304
|
+
effective: Required<Pick<AuthKitConfig, 'enabledProviders' | 'providerOrder' | 'signUp' | 'allowPasswordReset' | 'emailVerificationMode'>> & AuthKitConfig
|
|
5305
|
+
secrets: Record<string, { set: boolean; hint?: string | null; setAt?: string | null; legacy?: boolean }>
|
|
5306
|
+
checks: AuthKitCheck[]
|
|
5307
|
+
}
|
|
5308
|
+
```
|
|
5309
|
+
|
|
5310
|
+
**AuthKitSetupRequest** (interface)
|
|
5311
|
+
```typescript
|
|
5312
|
+
interface AuthKitSetupRequest {
|
|
5313
|
+
name?: string
|
|
5314
|
+
ownLogins?: boolean
|
|
5315
|
+
settings?: AuthKitConfigInput
|
|
5316
|
+
}
|
|
5317
|
+
```
|
|
5318
|
+
|
|
5319
|
+
**AuthKitSetupResponse** (interface)
|
|
5320
|
+
```typescript
|
|
5321
|
+
interface AuthKitSetupResponse {
|
|
5322
|
+
authKit: AuthKitConfig
|
|
5323
|
+
created: boolean
|
|
5324
|
+
ownLogins: 'own' | 'shared'
|
|
5325
|
+
changed: string[]
|
|
5326
|
+
}
|
|
5327
|
+
```
|
|
5328
|
+
|
|
5329
|
+
**AuthKitEmailPreview** (interface)
|
|
5330
|
+
```typescript
|
|
5331
|
+
interface AuthKitEmailPreview {
|
|
5332
|
+
kind: AuthKitEmailKind
|
|
5333
|
+
subject: string
|
|
5334
|
+
html: string
|
|
5335
|
+
}
|
|
5336
|
+
```
|
|
5337
|
+
|
|
5338
|
+
**AuthKitSecretLink** (interface)
|
|
5339
|
+
```typescript
|
|
5340
|
+
interface AuthKitSecretLink {
|
|
5341
|
+
url: string
|
|
5342
|
+
expiresAt: string
|
|
5343
|
+
}
|
|
5344
|
+
```
|
|
5345
|
+
|
|
5101
5346
|
**AuthKitSecurityConfig** (interface)
|
|
5102
5347
|
```typescript
|
|
5103
5348
|
interface AuthKitSecurityConfig {
|
|
@@ -5152,6 +5397,12 @@ interface AuthKitLockoutPolicy {
|
|
|
5152
5397
|
|
|
5153
5398
|
**VerifyStatus** = `'pending' | 'verified' | 'failed' | 'expired' | 'unknown'`
|
|
5154
5399
|
|
|
5400
|
+
**AuthKitProvider** = `'email' | 'magic-link' | 'phone' | 'whatsapp' | 'google' | 'apple' | 'microsoft' | 'linkedin'`
|
|
5401
|
+
|
|
5402
|
+
**AuthKitEmailKind** = `'passwordReset' | 'emailVerification' | 'magicLink' | 'memberInvite' | 'invite' | 'addedToCollection' | 'mfaCode' | 'providerLinked'`
|
|
5403
|
+
|
|
5404
|
+
**AuthKitTextKey** = ``
|
|
5405
|
+
|
|
5155
5406
|
**AuthKitConfigInput** = ``
|
|
5156
5407
|
|
|
5157
5408
|
**PasswordPolicyErrorCode** = ``
|
|
@@ -6600,7 +6851,8 @@ interface SubscriptionsResolveResponse {
|
|
|
6600
6851
|
```typescript
|
|
6601
6852
|
interface TransactionalSendRequest {
|
|
6602
6853
|
contactId: string
|
|
6603
|
-
templateId
|
|
6854
|
+
templateId?: string
|
|
6855
|
+
message?: TypedMessage
|
|
6604
6856
|
channel?: 'email' | 'sms' | 'whatsapp' | 'push' | 'wallet' | 'preferred'
|
|
6605
6857
|
props?: Record<string, unknown>
|
|
6606
6858
|
include?: {
|
|
@@ -6614,6 +6866,8 @@ interface TransactionalSendRequest {
|
|
|
6614
6866
|
}
|
|
6615
6867
|
ref?: string
|
|
6616
6868
|
appId?: string
|
|
6869
|
+
about?: MessageAbout
|
|
6870
|
+
category?: 'service'
|
|
6617
6871
|
attach?: EmailAttachmentSpec[]
|
|
6618
6872
|
}
|
|
6619
6873
|
```
|
|
@@ -6628,6 +6882,27 @@ interface TransactionalSendResponse {
|
|
|
6628
6882
|
}
|
|
6629
6883
|
```
|
|
6630
6884
|
|
|
6885
|
+
**TypedMessage** (interface)
|
|
6886
|
+
```typescript
|
|
6887
|
+
interface TypedMessage {
|
|
6888
|
+
subject?: string
|
|
6889
|
+
body: string
|
|
6890
|
+
sms?: string
|
|
6891
|
+
}
|
|
6892
|
+
```
|
|
6893
|
+
|
|
6894
|
+
**MessageAbout** (interface)
|
|
6895
|
+
```typescript
|
|
6896
|
+
interface MessageAbout {
|
|
6897
|
+
appId?: string
|
|
6898
|
+
type: string
|
|
6899
|
+
id: string
|
|
6900
|
+
view?: string
|
|
6901
|
+
params?: Record<string, string>
|
|
6902
|
+
label?: string
|
|
6903
|
+
}
|
|
6904
|
+
```
|
|
6905
|
+
|
|
6631
6906
|
**TransactionalSendError** (interface)
|
|
6632
6907
|
```typescript
|
|
6633
6908
|
interface TransactionalSendError {
|
|
@@ -6940,8 +7215,13 @@ export interface SubscriptionsResolveResponse {
|
|
|
6940
7215
|
export interface TransactionalSendRequest {
|
|
6941
7216
|
/** CRM contact UUID */
|
|
6942
7217
|
contactId: string
|
|
6943
|
-
/**
|
|
6944
|
-
templateId
|
|
7218
|
+
/** A saved template's id. Give this or `message`. */
|
|
7219
|
+
templateId?: string
|
|
7220
|
+
/**
|
|
7221
|
+
* A typed message instead of a template: plain text, Liquid allowed (`{{ contact.firstName }}`).
|
|
7222
|
+
* `sms` is the shorter text for SMS and WhatsApp (defaults to `body`).
|
|
7223
|
+
*/
|
|
7224
|
+
message?: TypedMessage
|
|
6945
7225
|
/**
|
|
6946
7226
|
* Channel to send on. Defaults to 'preferred', which auto-selects the
|
|
6947
7227
|
* contact's best available channel respecting consent, suppression, and
|
|
@@ -6971,6 +7251,17 @@ export interface TransactionalSendRequest {
|
|
|
6971
7251
|
ref?: string
|
|
6972
7252
|
/** App context stored on the comms-events row */
|
|
6973
7253
|
appId?: string
|
|
7254
|
+
/**
|
|
7255
|
+
* What the message is about: the record it was sent for and the admin screen that shows it, so it is a
|
|
7256
|
+
* link in Messages, on the contact's Activity, and on the conversation a reply opens. `appId` defaults
|
|
7257
|
+
* to the sending app.
|
|
7258
|
+
*/
|
|
7259
|
+
about?: MessageAbout
|
|
7260
|
+
/**
|
|
7261
|
+
* `'service'` (a confirmation, a reminder, an update): an asked-for channel the person turned off, or a
|
|
7262
|
+
* suppressed email, is refused (`transactional.opted_out`). Marketing goes out as a campaign.
|
|
7263
|
+
*/
|
|
7264
|
+
category?: 'service'
|
|
6974
7265
|
/**
|
|
6975
7266
|
* Files to attach (email only; at most 5, 10 MB in all). What can't be made is left out and listed in
|
|
6976
7267
|
* `attachmentsLeftOut` — the email still goes.
|
|
@@ -7003,6 +7294,29 @@ export interface TransactionalSendResponse {
|
|
|
7003
7294
|
attachmentsLeftOut?: string[]
|
|
7004
7295
|
}
|
|
7005
7296
|
|
|
7297
|
+
/** A message written there and then rather than a saved template. */
|
|
7298
|
+
export interface TypedMessage {
|
|
7299
|
+
subject?: string
|
|
7300
|
+
body: string
|
|
7301
|
+
/** The shorter text for SMS and WhatsApp (defaults to `body`). */
|
|
7302
|
+
sms?: string
|
|
7303
|
+
}
|
|
7304
|
+
|
|
7305
|
+
/**
|
|
7306
|
+
* What a message is about (docs/comms.md, "What a message is about"). Ids only, never content.
|
|
7307
|
+
* `view` and `params` name one of the app's admin views (manifest `adminViews`, docs/admin-views.md).
|
|
7308
|
+
*/
|
|
7309
|
+
export interface MessageAbout {
|
|
7310
|
+
appId?: string
|
|
7311
|
+
/** What kind of record: `'booking'`, `'entry'`, `'case'`. */
|
|
7312
|
+
type: string
|
|
7313
|
+
id: string
|
|
7314
|
+
view?: string
|
|
7315
|
+
params?: Record<string, string>
|
|
7316
|
+
/** A short label to show without looking the record up: `'Sat 3pm, table for 4'`. */
|
|
7317
|
+
label?: string
|
|
7318
|
+
}
|
|
7319
|
+
|
|
7006
7320
|
export interface TransactionalSendError {
|
|
7007
7321
|
ok: false
|
|
7008
7322
|
/**
|
|
@@ -7015,6 +7329,8 @@ export interface TransactionalSendError {
|
|
|
7015
7329
|
* - `transactional.whatsapp_missing`
|
|
7016
7330
|
* - `transactional.no_push_methods`
|
|
7017
7331
|
* - `transactional.no_wallet_methods`
|
|
7332
|
+
* - `transactional.opted_out` (category `'service'`: the person turned that channel off, or the email is suppressed)
|
|
7333
|
+
* - `transactional.template_or_message` / `transactional.message_invalid` / `transactional.about_invalid`
|
|
7018
7334
|
*/
|
|
7019
7335
|
error: string
|
|
7020
7336
|
}
|
|
@@ -7829,6 +8145,27 @@ interface AppDataField {
|
|
|
7829
8145
|
public?: boolean;
|
|
7830
8146
|
to?: string;
|
|
7831
8147
|
options?: string[];
|
|
8148
|
+
list?: string;
|
|
8149
|
+
}
|
|
8150
|
+
```
|
|
8151
|
+
|
|
8152
|
+
**AppValueListValue** (interface)
|
|
8153
|
+
```typescript
|
|
8154
|
+
interface AppValueListValue {
|
|
8155
|
+
code: string;
|
|
8156
|
+
label?: string;
|
|
8157
|
+
active?: boolean;
|
|
8158
|
+
}
|
|
8159
|
+
```
|
|
8160
|
+
|
|
8161
|
+
**AppValueList** (interface)
|
|
8162
|
+
```typescript
|
|
8163
|
+
interface AppValueList {
|
|
8164
|
+
label: string;
|
|
8165
|
+
description?: string;
|
|
8166
|
+
values: AppValueListValue[];
|
|
8167
|
+
editable?: boolean;
|
|
8168
|
+
public?: boolean;
|
|
7832
8169
|
}
|
|
7833
8170
|
```
|
|
7834
8171
|
|
|
@@ -7844,6 +8181,14 @@ interface AppDataType {
|
|
|
7844
8181
|
examples?: Array<Record<string, unknown>>;
|
|
7845
8182
|
read?: { list?: string; get?: string; notes?: string };
|
|
7846
8183
|
since?: string;
|
|
8184
|
+
title?: string;
|
|
8185
|
+
label?: string;
|
|
8186
|
+
sublabel?: string;
|
|
8187
|
+
activeField?: string;
|
|
8188
|
+
orderField?: string;
|
|
8189
|
+
small?: boolean;
|
|
8190
|
+
setup?: boolean;
|
|
8191
|
+
checked?: boolean;
|
|
7847
8192
|
}
|
|
7848
8193
|
```
|
|
7849
8194
|
|
|
@@ -7852,6 +8197,7 @@ interface AppDataType {
|
|
|
7852
8197
|
interface AppDataDeclaration {
|
|
7853
8198
|
schemaVersion: string;
|
|
7854
8199
|
types: Record<string, AppDataType>;
|
|
8200
|
+
lists?: Record<string, AppValueList>;
|
|
7855
8201
|
}
|
|
7856
8202
|
```
|
|
7857
8203
|
|
|
@@ -7945,7 +8291,8 @@ interface SmartlinksIframeMessage {
|
|
|
7945
8291
|
| 'smartlinks:authkit:logout'
|
|
7946
8292
|
| 'smartlinks:authkit:redirect'
|
|
7947
8293
|
| 'smartlinks:navigable'
|
|
7948
|
-
| 'smartlinks:navigate-result'
|
|
8294
|
+
| 'smartlinks:navigate-result'
|
|
8295
|
+
| 'smartlinks:open-app';
|
|
7949
8296
|
payload: Record<string, any>;
|
|
7950
8297
|
messageId?: string;
|
|
7951
8298
|
}
|
|
@@ -11737,6 +12084,81 @@ interface EmbeddedWidgetProps {
|
|
|
11737
12084
|
|
|
11738
12085
|
**EmbeddedWidgetComponent** = `(props: EmbeddedWidgetProps) => any`
|
|
11739
12086
|
|
|
12087
|
+
### aiGuide (api)
|
|
12088
|
+
|
|
12089
|
+
**GuideInfo** (interface)
|
|
12090
|
+
```typescript
|
|
12091
|
+
interface GuideInfo {
|
|
12092
|
+
enabled: boolean
|
|
12093
|
+
name?: string
|
|
12094
|
+
modes?: { voice: boolean; text: boolean; start: 'voice' | 'text' }
|
|
12095
|
+
suggestions?: string[]
|
|
12096
|
+
handoff?: { kind: 'email' | 'phone' | 'url'; value: string } | null
|
|
12097
|
+
}
|
|
12098
|
+
```
|
|
12099
|
+
|
|
12100
|
+
**ScreenContent** (interface)
|
|
12101
|
+
```typescript
|
|
12102
|
+
interface ScreenContent {
|
|
12103
|
+
appId?: string | null
|
|
12104
|
+
title?: string | null
|
|
12105
|
+
content?: string | null
|
|
12106
|
+
}
|
|
12107
|
+
```
|
|
12108
|
+
|
|
12109
|
+
**GuideWhere** (interface)
|
|
12110
|
+
```typescript
|
|
12111
|
+
interface GuideWhere {
|
|
12112
|
+
appId?: string | null
|
|
12113
|
+
path?: string | null
|
|
12114
|
+
params?: Record<string, string>
|
|
12115
|
+
}
|
|
12116
|
+
```
|
|
12117
|
+
|
|
12118
|
+
**GuideNavigate** (interface)
|
|
12119
|
+
```typescript
|
|
12120
|
+
interface GuideNavigate {
|
|
12121
|
+
appId: string
|
|
12122
|
+
path: string
|
|
12123
|
+
params?: Record<string, string>
|
|
12124
|
+
}
|
|
12125
|
+
```
|
|
12126
|
+
|
|
12127
|
+
**GuideCard** (interface)
|
|
12128
|
+
```typescript
|
|
12129
|
+
interface GuideCard {
|
|
12130
|
+
title: string
|
|
12131
|
+
rows: Array<{ title: string; detail?: string | null; goTo?: string }>
|
|
12132
|
+
more?: number
|
|
12133
|
+
}
|
|
12134
|
+
```
|
|
12135
|
+
|
|
12136
|
+
**GuideStartOptions** (interface)
|
|
12137
|
+
```typescript
|
|
12138
|
+
interface GuideStartOptions {
|
|
12139
|
+
surface: GuideSurface
|
|
12140
|
+
mode?: 'voice' | 'text'
|
|
12141
|
+
productId?: string | null
|
|
12142
|
+
proofId?: string | null
|
|
12143
|
+
apps?: Array<{ id: string; title: string; kind?: 'core' | 'app'; channel?: string }>
|
|
12144
|
+
where?: GuideWhere
|
|
12145
|
+
language?: string
|
|
12146
|
+
screen?: ScreenContent
|
|
12147
|
+
readScreen?: () => Promise<ScreenContent | null> | ScreenContent | null
|
|
12148
|
+
showApp?: (appId: string) => Promise<void> | void
|
|
12149
|
+
openPage?: (to: GuideNavigate) => Promise<void> | void
|
|
12150
|
+
goTo?: (productId: string) => Promise<void> | void
|
|
12151
|
+
onShow?: (card: GuideCard) => void
|
|
12152
|
+
offerPerson?: (handoff: GuideInfo['handoff']) => Promise<void> | void
|
|
12153
|
+
onState?: (s: LiveState) => void
|
|
12154
|
+
onCaption?: (text: string) => void
|
|
12155
|
+
onReply?: (text: string) => void
|
|
12156
|
+
onError?: (message: string) => void
|
|
12157
|
+
}
|
|
12158
|
+
```
|
|
12159
|
+
|
|
12160
|
+
**GuideSurface** = `'portal' | 'hub'`
|
|
12161
|
+
|
|
11740
12162
|
### appConfiguration (api)
|
|
11741
12163
|
|
|
11742
12164
|
**AppConfigOptions** (type)
|
|
@@ -12223,6 +12645,20 @@ Append an entry to case history (admin only) POST /cases/:caseId/history
|
|
|
12223
12645
|
caseId: string) → `Promise<RelatedResponse>`
|
|
12224
12646
|
Get related threads and records for a case (admin only) GET /cases/:caseId/related
|
|
12225
12647
|
|
|
12648
|
+
### app.options
|
|
12649
|
+
|
|
12650
|
+
**get**(collectionId: string,
|
|
12651
|
+
appId: string,
|
|
12652
|
+
source: string,
|
|
12653
|
+
opts: { q?: string; version?: string; admin?: boolean } = {},) → `Promise<import('../types/appOptions').AppOptionsResponse>`
|
|
12654
|
+
`source` = `type:<record type or declared type id>` | `list:<list id>`. Admins (`admin: true`) see every entry; the public API lists public records and lists the app declares public. Hold on to `version` and pass it back to get `{ unchanged: true }` when nothing changed.
|
|
12655
|
+
|
|
12656
|
+
**saveList**(collectionId: string,
|
|
12657
|
+
appId: string,
|
|
12658
|
+
listId: string,
|
|
12659
|
+
values: import('../types/appOptions') → `void`
|
|
12660
|
+
Save a value list's values, in order (admins). Codes never change and are never lost: a value left out stays, switched off, at the end. → the list as saved.
|
|
12661
|
+
|
|
12226
12662
|
### app.records
|
|
12227
12663
|
|
|
12228
12664
|
General-purpose structured app objects. Use these when a simple scoped data item grows into something queryable, lifecycle-aware, or access-controlled.
|
|
@@ -12841,8 +13277,29 @@ Give this AuthKit its **own logins** (admin): its members become accounts of thi
|
|
|
12841
13277
|
**invite**(collectionId: string, authKitId: string, body: AuthKitInviteRequest) → `Promise<AuthKitInviteResponse>`
|
|
12842
13278
|
Invite someone to be a member of a site with its own logins (admin). Makes their account if they have none (the only way in when the site is invitation only — `signUp: 'invite'`), finds or creates their contact in this collection with the `customFields` you pass (their level), links the two, and emails them a sign-in link to the site (`redirectUrl`, default the kit's) that works once for 7 days. The page it opens handles it like any magic link: `mode=magicLink&token=…` → {@link verifyMagicLink}. Inviting someone again sends a fresh link. Errors: `OWN_LOGINS_REQUIRED` (409), `INVALID_EMAIL` (400), `INVALID_REDIRECT_URL` (400, not one of this site's addresses), `TOO_MANY_INVITES` (429, 5 an hour per address).
|
|
12843
13279
|
|
|
13280
|
+
**schema**(collectionId: string) → `Promise<AuthKitSchema>`
|
|
13281
|
+
Every sign-in setting: its path, default, what reads it (`screens` / `server` / `both`), in plain words.
|
|
13282
|
+
|
|
13283
|
+
**setup**(collectionId: string, body: AuthKitSetupRequest = {}) → `Promise<AuthKitSetupResponse>`
|
|
13284
|
+
Set up the collection's sign-in in one call, safe to repeat: finds its sign-in (or makes one, with email + Google and confirm-then-signed-in, and makes it the collection's default), optionally gives it its own logins (ONE WAY — members of this site only; needed for invite-only) and saves a first settings patch. Errors: `INVALID_CONFIG` (400, `problems`), `OWN_LOGINS_REQUIRED` (409), `MEMBER_POOL_CONFLICT` (409), `SECRET_IN_SETTINGS` (400).
|
|
13285
|
+
|
|
13286
|
+
**settings**(collectionId: string, authKitId: string) → `Promise<AuthKitSettingsResponse>`
|
|
13287
|
+
What sign-in does now: the stored config, every default filled in, which secrets are set (masked), and checks.
|
|
13288
|
+
|
|
13289
|
+
**secretEntryLink**(collectionId: string, authKitId: string, name: string, opts: { label?: string } = {}) → `Promise<AuthKitSecretLink>`
|
|
13290
|
+
A one-time SmartLinks page where the PERSON types a secret (e.g. `linkedInClientSecret`) — so it never passes through a chat or your code. Give them the `url`; it works once, for 30 minutes. Asking again replaces the link. Check it landed with {@link settings} (`secrets.<name>.set`).
|
|
13291
|
+
|
|
13292
|
+
**setSecret**(collectionId: string, authKitId: string, name: string, value: string) → `Promise<`
|
|
13293
|
+
Store a secret you already hold (server-side code only — never ask a person to paste one to you). Returns the masked hint.
|
|
13294
|
+
|
|
13295
|
+
**removeSecret**(collectionId: string, authKitId: string, name: string) → `Promise<`
|
|
13296
|
+
Remove a secret (that provider then uses SmartLinks' own app).
|
|
13297
|
+
|
|
13298
|
+
**previewEmail**(collectionId: string, authKitId: string, kind: AuthKitEmailKind, draft: Pick<AuthKitConfigInput, 'emailTemplates' | 'emailBranding' | 'branding'> = {}) → `Promise<AuthKitEmailPreview>`
|
|
13299
|
+
An account email as it would be sent now — or with draft settings (`emailTemplates`, `emailBranding`, `branding`; checked like a save, nothing stored). Sample values stand in for the person and the link.
|
|
13300
|
+
|
|
12844
13301
|
**remove**(collectionId: string, authKitId: string) → `Promise<void>`
|
|
12845
|
-
|
|
13302
|
+
An account email as it would be sent now — or with draft settings (`emailTemplates`, `emailBranding`, `branding`; checked like a save, nothing stored). Sample values stand in for the person and the link.
|
|
12846
13303
|
|
|
12847
13304
|
### batch
|
|
12848
13305
|
|
|
@@ -13017,13 +13474,13 @@ Delete a slot (admin; refused while places are booked).
|
|
|
13017
13474
|
|
|
13018
13475
|
### chat.completions
|
|
13019
13476
|
|
|
13020
|
-
**create**(collectionId: string,
|
|
13477
|
+
**create**(collectionId: string,
|
|
13021
13478
|
request: ChatCompletionRequest) → `Promise<ChatCompletionResponse | AsyncIterable<ChatCompletionChunk>>`
|
|
13022
13479
|
Create a chat completion (streaming or non-streaming)
|
|
13023
13480
|
|
|
13024
13481
|
### chat.responses
|
|
13025
13482
|
|
|
13026
|
-
**create**(collectionId: string,
|
|
13483
|
+
**create**(collectionId: string,
|
|
13027
13484
|
request: ResponsesRequest) → `Promise<ResponsesResult | AsyncIterable<ResponsesStreamEvent>>`
|
|
13028
13485
|
Create a Responses API request (streaming or non-streaming)
|
|
13029
13486
|
|
|
@@ -13407,6 +13864,14 @@ Get a single container (public). Soft-deleted containers return a 404. Same `?t
|
|
|
13407
13864
|
params?: Pick<ListContainerItemsParams, 'limit' | 'offset'>) → `Promise<ContainerItemsResponse>`
|
|
13408
13865
|
List current contents of a container (public). Returns only items where `removedAt` is null. No `?history` option on the public side.
|
|
13409
13866
|
|
|
13867
|
+
### content
|
|
13868
|
+
|
|
13869
|
+
**provide**(handler: ContentHandler) → `() => void`
|
|
13870
|
+
An app says what its screen shows, in words (an exhibit's text, a recipe, a form's purpose). Called whenever an assistant needs it. Works in an iframe (the host asks by message) and in the same page (a direct component). Returns a function that stops providing.
|
|
13871
|
+
|
|
13872
|
+
**request**(options: { frame?: Window | null; reason?: string; timeoutMs?: number } = {}) → `Promise<ScreenContent | null>`
|
|
13873
|
+
A host asks what the app on screen shows: an app in an iframe (pass its window as `frame`), or apps in this page that called `provide`. Resolves null if nothing answers within the time.
|
|
13874
|
+
|
|
13410
13875
|
### crate
|
|
13411
13876
|
|
|
13412
13877
|
**list**(collectionId: string,
|
|
@@ -13544,6 +14009,14 @@ Call an ADMIN app server function (surface `'admin'`; requires an admin session)
|
|
|
13544
14009
|
**list**(collectionId: string, opts: FunctionCallOptions = {}) → `Promise<FunctionListResponse>`
|
|
13545
14010
|
List the public functions available for a collection (discovery). Scoped to one app when an appId is given (or set as the SDK app context): `GET /public/collection/:c[/app/:appId]/functions`.
|
|
13546
14011
|
|
|
14012
|
+
### guide
|
|
14013
|
+
|
|
14014
|
+
**get**(collectionId: string, surface?: GuideSurface) → `Promise<GuideInfo>`
|
|
14015
|
+
Is the guide on for this surface, and how does it present itself?
|
|
14016
|
+
|
|
14017
|
+
**start**(collectionId: string, options: GuideStartOptions) → `Promise<LiveHandle>`
|
|
14018
|
+
Start a live conversation with the guide. Resolves once connected; the handle pauses, stops, sends text.
|
|
14019
|
+
|
|
13547
14020
|
### http
|
|
13548
14021
|
|
|
13549
14022
|
**get**(path: string) → `Promise<T>`
|
|
@@ -14082,7 +14555,7 @@ What phones reported about one chip (errors.report with entityType 'tag'), newes
|
|
|
14082
14555
|
|
|
14083
14556
|
### podcast
|
|
14084
14557
|
|
|
14085
|
-
**generate**(collectionId: string,
|
|
14558
|
+
**generate**(collectionId: string,
|
|
14086
14559
|
request: GeneratePodcastRequest) → `Promise<GeneratePodcastResponse>`
|
|
14087
14560
|
Generate a NotebookLM-style conversational podcast from product documents
|
|
14088
14561
|
|
|
@@ -14348,11 +14821,11 @@ Get the active transfer/status for a proof (owner, collection admin, or the name
|
|
|
14348
14821
|
|
|
14349
14822
|
### publicClient
|
|
14350
14823
|
|
|
14351
|
-
**chat**(collectionId: string,
|
|
14824
|
+
**chat**(collectionId: string,
|
|
14352
14825
|
request: PublicChatRequest) → `Promise<PublicChatResponse>`
|
|
14353
14826
|
Chat with product assistant (RAG)
|
|
14354
14827
|
|
|
14355
|
-
**agentRun**(collectionId: string,
|
|
14828
|
+
**agentRun**(collectionId: string,
|
|
14356
14829
|
body: PublicAgentRunRequest) → `Promise<AgentRunResult>`
|
|
14357
14830
|
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
|
|
14358
14831
|
|
|
@@ -14365,25 +14838,21 @@ Clear session history
|
|
|
14365
14838
|
**getRateLimit**(collectionId: string, userId: string) → `Promise<RateLimitStatus>`
|
|
14366
14839
|
Check rate limit status
|
|
14367
14840
|
|
|
14368
|
-
**getToken**(collectionId: string,
|
|
14369
|
-
request: EphemeralTokenRequest) → `Promise<EphemeralTokenResponse>`
|
|
14370
|
-
Generate ephemeral token for Gemini Live
|
|
14371
|
-
|
|
14372
14841
|
### publicClient.sessions
|
|
14373
14842
|
|
|
14374
|
-
**create**(collectionId: string,
|
|
14843
|
+
**create**(collectionId: string,
|
|
14375
14844
|
body: AiSessionCreate & { scope?: 'owner' | 'public' } = {}) → `Promise<AiSession>`
|
|
14376
14845
|
|
|
14377
|
-
**list**(collectionId: string,
|
|
14846
|
+
**list**(collectionId: string,
|
|
14378
14847
|
params?: { appId?: string; limit?: number }) → `Promise<`
|
|
14379
14848
|
List the signed-in consumer's own ('owner') sessions — requires an authKit bearer.
|
|
14380
14849
|
|
|
14381
14850
|
**get**(collectionId: string, id: string) → `Promise<AiSession>`
|
|
14382
14851
|
List the signed-in consumer's own ('owner') sessions — requires an authKit bearer.
|
|
14383
14852
|
|
|
14384
|
-
**append**(collectionId: string,
|
|
14385
|
-
id: string,
|
|
14386
|
-
items: ResponseInputItem[],
|
|
14853
|
+
**append**(collectionId: string,
|
|
14854
|
+
id: string,
|
|
14855
|
+
items: ResponseInputItem[],
|
|
14387
14856
|
opts?: { usage?: Record<string, any> }) → `Promise<AiSession>`
|
|
14388
14857
|
List the signed-in consumer's own ('owner') sessions — requires an authKit bearer.
|
|
14389
14858
|
|
|
@@ -14397,11 +14866,11 @@ Resolve a short code to related resource identifiers.
|
|
|
14397
14866
|
|
|
14398
14867
|
### rag
|
|
14399
14868
|
|
|
14400
|
-
**indexDocument**(collectionId: string,
|
|
14869
|
+
**indexDocument**(collectionId: string,
|
|
14401
14870
|
request: IndexDocumentRequest) → `Promise<IndexDocumentResponse>`
|
|
14402
14871
|
Index a document for RAG
|
|
14403
14872
|
|
|
14404
|
-
**configureAssistant**(collectionId: string,
|
|
14873
|
+
**configureAssistant**(collectionId: string,
|
|
14405
14874
|
request: ConfigureAssistantRequest) → `Promise<ConfigureAssistantResponse>`
|
|
14406
14875
|
Configure AI assistant behavior
|
|
14407
14876
|
|
|
@@ -14497,9 +14966,9 @@ List sessions, most-recently-active first (optionally filtered by app).
|
|
|
14497
14966
|
**get**(collectionId: string, id: string) → `Promise<AiSession>`
|
|
14498
14967
|
Get one session, including its full transcript.
|
|
14499
14968
|
|
|
14500
|
-
**append**(collectionId: string,
|
|
14501
|
-
id: string,
|
|
14502
|
-
items: ResponseInputItem[],
|
|
14969
|
+
**append**(collectionId: string,
|
|
14970
|
+
id: string,
|
|
14971
|
+
items: ResponseInputItem[],
|
|
14503
14972
|
opts?: { usage?: Record<string, any> }) → `Promise<AiSession>`
|
|
14504
14973
|
Append Responses items (input/output/tool) to a session — the manual-persistence path.
|
|
14505
14974
|
|
|
@@ -14604,17 +15073,17 @@ Reverse lookup by ref via POST (public). `POST /public/collection/:collectionId/
|
|
|
14604
15073
|
|
|
14605
15074
|
### tools
|
|
14606
15075
|
|
|
14607
|
-
**run**(collectionId: string,
|
|
14608
|
-
name: K,
|
|
14609
|
-
args: AiToolArgsMap[K],) → `Promise<ToolRunResult>
|
|
14610
|
-
export async function run<T = any>(
|
|
14611
|
-
collectionId: string,
|
|
14612
|
-
name: string,
|
|
14613
|
-
args?: Record<string, any>,
|
|
14614
|
-
): Promise<ToolRunResult<T>>
|
|
14615
|
-
export async function run(
|
|
14616
|
-
collectionId: string,
|
|
14617
|
-
name: string,
|
|
15076
|
+
**run**(collectionId: string,
|
|
15077
|
+
name: K,
|
|
15078
|
+
args: AiToolArgsMap[K],) → `Promise<ToolRunResult>
|
|
15079
|
+
export async function run<T = any>(
|
|
15080
|
+
collectionId: string,
|
|
15081
|
+
name: string,
|
|
15082
|
+
args?: Record<string, any>,
|
|
15083
|
+
): Promise<ToolRunResult<T>>
|
|
15084
|
+
export async function run(
|
|
15085
|
+
collectionId: string,
|
|
15086
|
+
name: string,
|
|
14618
15087
|
args: Record<string, any> =`
|
|
14619
15088
|
Invoke ONE built-in server tool directly — no model in the loop. This is the "direct code" caller of the orchestration-neutral tool registry: the SAME tools the agent loop and the Responses `server_tools` path run, but called as a plain, typed, deterministic API. A front end can use it two ways: (1) call a tool straight as an API (e.g. `pdf.render` / `pdf.extract` behind a PDF UX), or (2) drive its OWN agent loop and execute each model tool-call here. Capability-gated server-side to the caller's grants (same blast-radius rules as the agent loop). POST /admin/collection/:collectionId/ai/tools/:name/run
|
|
14620
15089
|
|
|
@@ -14647,7 +15116,7 @@ Invoke ONE built-in server tool directly — no model in the loop. This is the "
|
|
|
14647
15116
|
|
|
14648
15117
|
### tts
|
|
14649
15118
|
|
|
14650
|
-
**generate**(collectionId: string,
|
|
15119
|
+
**generate**(collectionId: string,
|
|
14651
15120
|
request: TTSRequest) → `Promise<Blob>`
|
|
14652
15121
|
Generate text-to-speech audio
|
|
14653
15122
|
|