@proveanything/smartlinks 1.16.7 → 1.17.4
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/api/ai.d.ts +34 -1
- package/dist/api/ai.js +64 -0
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.js +3 -0
- package/dist/api/integrations.d.ts +28 -0
- package/dist/api/integrations.js +82 -0
- package/dist/api/research.d.ts +9 -0
- package/dist/api/research.js +21 -0
- package/dist/api/secrets.d.ts +15 -0
- package/dist/api/secrets.js +52 -0
- package/dist/docs/API_SUMMARY.md +374 -1
- package/dist/docs/ai-tools-and-skills.md +168 -0
- package/dist/docs/integrations.md +141 -0
- package/dist/openapi.yaml +617 -0
- package/dist/types/ai.d.ts +57 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +2 -0
- package/dist/types/integrations.d.ts +136 -0
- package/dist/types/integrations.js +10 -0
- package/dist/types/research.d.ts +22 -0
- package/dist/types/research.js +6 -0
- package/docs/API_SUMMARY.md +374 -1
- package/docs/ai-tools-and-skills.md +168 -0
- package/docs/integrations.md +141 -0
- package/openapi.yaml +617 -0
- package/package.json +2 -2
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
export type FlowDirection = 'inbound' | 'outbound';
|
|
2
|
+
export type FlowStatus = 'draft' | 'active' | 'paused' | 'error';
|
|
3
|
+
export type RunStatus = 'success' | 'partial' | 'error';
|
|
4
|
+
/** How one source field maps to one target field during transform. */
|
|
5
|
+
export type TransformType = 'direct' | 'static' | 'template' | 'jsonata' | 'ai';
|
|
6
|
+
export interface FieldMapping {
|
|
7
|
+
/** Dot-path in the produced target object (required). */
|
|
8
|
+
targetPath: string;
|
|
9
|
+
/** Dot-path in the source record. Used by `direct`. */
|
|
10
|
+
sourcePath?: string;
|
|
11
|
+
transformType: TransformType;
|
|
12
|
+
/** Constant (`static`) or Liquid template (`template`), etc. */
|
|
13
|
+
transformExpression?: string;
|
|
14
|
+
}
|
|
15
|
+
export type FlowAuthMethod = 'api_key' | 'bearer' | 'basic' | 'webhook' | 'oauth2' | 'none';
|
|
16
|
+
export interface FlowConnectionAuth {
|
|
17
|
+
method: FlowAuthMethod;
|
|
18
|
+
/** Header name for `api_key` (defaults server-side to X-API-Key). */
|
|
19
|
+
headerName?: string;
|
|
20
|
+
/** Opaque reference into the secret store; resolved server-side at execution. */
|
|
21
|
+
credentialRef?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface FlowConnection {
|
|
24
|
+
baseUrl?: string;
|
|
25
|
+
/** Outbound: path appended to baseUrl for sends. */
|
|
26
|
+
sendEndpoint?: string;
|
|
27
|
+
/** Inbound: path appended to baseUrl for fetches. */
|
|
28
|
+
fetchEndpoint?: string;
|
|
29
|
+
defaultHeaders?: Record<string, string>;
|
|
30
|
+
auth?: FlowConnectionAuth;
|
|
31
|
+
}
|
|
32
|
+
export interface IntegrationFlowConfig {
|
|
33
|
+
connection?: FlowConnection;
|
|
34
|
+
fieldMappings?: FieldMapping[];
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
}
|
|
37
|
+
export interface IntegrationFlow {
|
|
38
|
+
id: string;
|
|
39
|
+
orgId: string;
|
|
40
|
+
collectionId: string;
|
|
41
|
+
appId: string;
|
|
42
|
+
direction: FlowDirection;
|
|
43
|
+
name: string;
|
|
44
|
+
status: FlowStatus;
|
|
45
|
+
/** Event types this flow subscribes to, e.g. ['product.updated']. */
|
|
46
|
+
eventTypes: string[];
|
|
47
|
+
/** Cron/interval string for scheduled flows, or null. */
|
|
48
|
+
schedule: string | null;
|
|
49
|
+
sourceEntity: string | null;
|
|
50
|
+
targetEntity: string | null;
|
|
51
|
+
config: IntegrationFlowConfig;
|
|
52
|
+
createdBy: string | null;
|
|
53
|
+
createdAt: string;
|
|
54
|
+
updatedAt: string;
|
|
55
|
+
deletedAt?: string | null;
|
|
56
|
+
lastRunAt?: string | null;
|
|
57
|
+
lastRunStatus?: string | null;
|
|
58
|
+
lastRunError?: string | null;
|
|
59
|
+
lastRunCount?: number | null;
|
|
60
|
+
lastPollAt?: string | null;
|
|
61
|
+
lastCursor?: string | null;
|
|
62
|
+
totalSynced?: number | null;
|
|
63
|
+
}
|
|
64
|
+
export interface CreateFlowInput {
|
|
65
|
+
appId: string;
|
|
66
|
+
direction: FlowDirection;
|
|
67
|
+
name: string;
|
|
68
|
+
status?: FlowStatus;
|
|
69
|
+
eventTypes?: string[];
|
|
70
|
+
schedule?: string | null;
|
|
71
|
+
sourceEntity?: string | null;
|
|
72
|
+
targetEntity?: string | null;
|
|
73
|
+
config?: IntegrationFlowConfig;
|
|
74
|
+
}
|
|
75
|
+
export type UpdateFlowInput = Partial<Omit<CreateFlowInput, 'direction'>> & {
|
|
76
|
+
status?: FlowStatus;
|
|
77
|
+
};
|
|
78
|
+
export interface ListFlowsQuery {
|
|
79
|
+
direction?: FlowDirection;
|
|
80
|
+
status?: FlowStatus;
|
|
81
|
+
appId?: string;
|
|
82
|
+
}
|
|
83
|
+
export interface FlowList {
|
|
84
|
+
flows: IntegrationFlow[];
|
|
85
|
+
}
|
|
86
|
+
/** Options for a manual flow run. */
|
|
87
|
+
export interface RunFlowInput {
|
|
88
|
+
/** Run for a single source entity; omit for the flow's scheduled gather. */
|
|
89
|
+
entityId?: string;
|
|
90
|
+
}
|
|
91
|
+
/** Inline (synchronous) run summary. */
|
|
92
|
+
export interface RunFlowSummary {
|
|
93
|
+
flowId: string;
|
|
94
|
+
direction: FlowDirection;
|
|
95
|
+
records: number;
|
|
96
|
+
sent: number;
|
|
97
|
+
failed: number;
|
|
98
|
+
status: RunStatus;
|
|
99
|
+
}
|
|
100
|
+
/** Response when a run is enqueued (?async=true). */
|
|
101
|
+
export interface RunFlowEnqueued {
|
|
102
|
+
enqueued: true;
|
|
103
|
+
flowId: string;
|
|
104
|
+
entityId: string | null;
|
|
105
|
+
}
|
|
106
|
+
export type RunFlowResult = RunFlowSummary | RunFlowEnqueued;
|
|
107
|
+
/** Metadata for a stored secret. NEVER includes the value or ciphertext. */
|
|
108
|
+
export interface SecretMeta {
|
|
109
|
+
ref: string;
|
|
110
|
+
name: string | null;
|
|
111
|
+
purpose: string;
|
|
112
|
+
/** Masked hint (e.g. last few chars) — safe to display. */
|
|
113
|
+
hint: string;
|
|
114
|
+
keyVersion: number;
|
|
115
|
+
createdBy: string | null;
|
|
116
|
+
createdAt: string;
|
|
117
|
+
updatedAt: string;
|
|
118
|
+
rotatedAt?: string | null;
|
|
119
|
+
}
|
|
120
|
+
export interface SecretList {
|
|
121
|
+
secrets: SecretMeta[];
|
|
122
|
+
}
|
|
123
|
+
export interface SetSecretInput {
|
|
124
|
+
value: string;
|
|
125
|
+
name?: string;
|
|
126
|
+
/** Grouping/scoping label, defaults to 'integration' server-side. */
|
|
127
|
+
purpose?: string;
|
|
128
|
+
}
|
|
129
|
+
/** Result of set/rotate — the ref to store on a flow's connection, plus a hint. */
|
|
130
|
+
export interface SetSecretResult {
|
|
131
|
+
ref: string;
|
|
132
|
+
hint: string;
|
|
133
|
+
}
|
|
134
|
+
export interface ListSecretsQuery {
|
|
135
|
+
purpose?: string;
|
|
136
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/types/integrations.ts
|
|
2
|
+
//
|
|
3
|
+
// Integration flows + the sealed-secret store that backs their credentials.
|
|
4
|
+
//
|
|
5
|
+
// A flow is one input/output pipeline: an inbound flow fetches from an external
|
|
6
|
+
// system and writes a SmartLinks entity; an outbound flow reads a SmartLinks entity,
|
|
7
|
+
// transforms it, and sends it out. Credentials are never stored on the flow — the
|
|
8
|
+
// connection carries a `credentialRef` into the secret store, resolved server-side
|
|
9
|
+
// only, at execution.
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface ResearchFetchRequest {
|
|
2
|
+
/** Absolute URL to fetch (https). */
|
|
3
|
+
url: string;
|
|
4
|
+
/** schema.org @type filter for the returned JSON-LD, e.g. "Recipe" or "Product". */
|
|
5
|
+
type?: string;
|
|
6
|
+
/** Alias for `type`. */
|
|
7
|
+
schemaType?: string;
|
|
8
|
+
/** Bypass the cache and re-fetch. */
|
|
9
|
+
forceRefresh?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface ResearchFetchResult {
|
|
12
|
+
provider: 'firecrawl' | 'web';
|
|
13
|
+
status: number | null;
|
|
14
|
+
markdown?: string | null;
|
|
15
|
+
html?: string | null;
|
|
16
|
+
metadata?: Record<string, any> | null;
|
|
17
|
+
/** schema.org JSON-LD objects (filtered by `type` when provided). */
|
|
18
|
+
schemas: any[];
|
|
19
|
+
url: string;
|
|
20
|
+
cached: boolean;
|
|
21
|
+
fetchedAt?: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// src/types/research.ts
|
|
2
|
+
//
|
|
3
|
+
// Web research: fetch + extract a page server-side (Firecrawl-primary, puppeteer
|
|
4
|
+
// fallback), returning clean markdown, page metadata, and deterministic schema.org
|
|
5
|
+
// JSON-LD. The structured-data path (e.g. a recipe/product page) needs no AI.
|
|
6
|
+
export {};
|
package/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.17.4 | Generated: 2026-09-13T17:10:55.335Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -57,6 +57,8 @@ For detailed guides on specific features:
|
|
|
57
57
|
- **[Analytics](analytics.md)** - Web analytics, link-click tracking, QR/tag scan telemetry, and event reporting
|
|
58
58
|
- **[Analytics Metadata Conventions](analytics-metadata-conventions.md)** - Standard recommended keys and conventions for analytics metadata fields
|
|
59
59
|
- **[Loyalty: Points, Members & Earning Rules](loyalty.md)** - Loyalty schemes, automatic point earning via interaction rules, member balances, transaction history, and manual adjustments
|
|
60
|
+
- **[Integrations](integrations.md)** - Inbound/outbound integration flows + the sealed-secret store; triggers (manual/event/schedule), field mappings, and the Syndigo/Event Hub outbound path
|
|
61
|
+
- **[AI Tools & Skills](ai-tools-and-skills.md)** - The AI capability catalog: skills apps invoke by name (e.g. research.brand), the tools the AI reaches for (web fetch/screenshot/brand assets/image gen), the agent loop, and how apps discover them
|
|
60
62
|
- **[Deep Link Discovery](deep-link-discovery.md)** - Registering and discovering navigable app states for portal menus and AI orchestration
|
|
61
63
|
- **[AI-Native App Manifests](manifests.md)** - How AI workflows discover, configure, and import apps via structured manifests and prose guides
|
|
62
64
|
- **[AI Guide Template](ai-guide-template.md)** - A sample for an app on how to build an AI setup guide
|
|
@@ -134,6 +136,7 @@ The Smartlinks SDK is organized into the following namespaces:
|
|
|
134
136
|
- **containers** - Functions for containers operations
|
|
135
137
|
- **facets** - Functions for facets operations
|
|
136
138
|
- **http** - Functions for http operations
|
|
139
|
+
- **integrations** - Functions for integrations operations
|
|
137
140
|
- **jobs** - Functions for jobs operations
|
|
138
141
|
- **journeysAnalytics** - Functions for journeysAnalytics operations
|
|
139
142
|
- **location** - Functions for location operations
|
|
@@ -142,6 +145,8 @@ The Smartlinks SDK is organized into the following namespaces:
|
|
|
142
145
|
- **order** - Functions for order operations
|
|
143
146
|
- **products** - Functions for products operations
|
|
144
147
|
- **realtime** - Functions for realtime operations
|
|
148
|
+
- **research** - Functions for research operations
|
|
149
|
+
- **secrets** - Functions for secrets operations
|
|
145
150
|
- **tags** - Functions for tags operations
|
|
146
151
|
- **template** - Functions for template operations
|
|
147
152
|
- **translations** - Functions for translations operations
|
|
@@ -1009,6 +1014,92 @@ interface AISearchPhotosPhoto {
|
|
|
1009
1014
|
}
|
|
1010
1015
|
```
|
|
1011
1016
|
|
|
1017
|
+
**AgentRunRequest** (interface)
|
|
1018
|
+
```typescript
|
|
1019
|
+
interface AgentRunRequest {
|
|
1020
|
+
input?: string
|
|
1021
|
+
prompt?: string
|
|
1022
|
+
instructions?: string
|
|
1023
|
+
model?: string
|
|
1024
|
+
maxSteps?: number
|
|
1025
|
+
allowCapabilities?: string[]
|
|
1026
|
+
only?: string[]
|
|
1027
|
+
exclude?: string[]
|
|
1028
|
+
}
|
|
1029
|
+
```
|
|
1030
|
+
|
|
1031
|
+
**AgentToolResult** (interface)
|
|
1032
|
+
```typescript
|
|
1033
|
+
interface AgentToolResult {
|
|
1034
|
+
name: string
|
|
1035
|
+
isError: boolean
|
|
1036
|
+
result: any
|
|
1037
|
+
}
|
|
1038
|
+
```
|
|
1039
|
+
|
|
1040
|
+
**AgentRunResult** (interface)
|
|
1041
|
+
```typescript
|
|
1042
|
+
interface AgentRunResult {
|
|
1043
|
+
finalText: string | null
|
|
1044
|
+
steps: number
|
|
1045
|
+
maxStepsReached: boolean
|
|
1046
|
+
toolResults: AgentToolResult[]
|
|
1047
|
+
availableTools: string[]
|
|
1048
|
+
}
|
|
1049
|
+
```
|
|
1050
|
+
|
|
1051
|
+
**AgentToolDefinition** (interface)
|
|
1052
|
+
```typescript
|
|
1053
|
+
interface AgentToolDefinition {
|
|
1054
|
+
name: string
|
|
1055
|
+
description: string
|
|
1056
|
+
capabilities: string[]
|
|
1057
|
+
parameters: any
|
|
1058
|
+
}
|
|
1059
|
+
```
|
|
1060
|
+
|
|
1061
|
+
**AgentToolsResponse** (interface)
|
|
1062
|
+
```typescript
|
|
1063
|
+
interface AgentToolsResponse {
|
|
1064
|
+
tools: AgentToolDefinition[]
|
|
1065
|
+
}
|
|
1066
|
+
```
|
|
1067
|
+
|
|
1068
|
+
**AgentToolsQuery** (interface)
|
|
1069
|
+
```typescript
|
|
1070
|
+
interface AgentToolsQuery {
|
|
1071
|
+
allowCapabilities?: string
|
|
1072
|
+
only?: string
|
|
1073
|
+
exclude?: string
|
|
1074
|
+
}
|
|
1075
|
+
```
|
|
1076
|
+
|
|
1077
|
+
**SkillDescriptor** (interface)
|
|
1078
|
+
```typescript
|
|
1079
|
+
interface SkillDescriptor {
|
|
1080
|
+
name: string
|
|
1081
|
+
description: string
|
|
1082
|
+
inputSchema: any
|
|
1083
|
+
outputSchema: any
|
|
1084
|
+
capabilities: string[]
|
|
1085
|
+
}
|
|
1086
|
+
```
|
|
1087
|
+
|
|
1088
|
+
**SkillsListResponse** (interface)
|
|
1089
|
+
```typescript
|
|
1090
|
+
interface SkillsListResponse {
|
|
1091
|
+
skills: SkillDescriptor[]
|
|
1092
|
+
}
|
|
1093
|
+
```
|
|
1094
|
+
|
|
1095
|
+
**CatalogResponse** (interface)
|
|
1096
|
+
```typescript
|
|
1097
|
+
interface CatalogResponse {
|
|
1098
|
+
tools: AgentToolDefinition[]
|
|
1099
|
+
skills: SkillDescriptor[]
|
|
1100
|
+
}
|
|
1101
|
+
```
|
|
1102
|
+
|
|
1012
1103
|
### analytics
|
|
1013
1104
|
|
|
1014
1105
|
**AnalyticsLocation** (interface)
|
|
@@ -5768,6 +5859,195 @@ interface UploadDoneMessage {
|
|
|
5768
5859
|
|
|
5769
5860
|
**UploadMessage** = ``
|
|
5770
5861
|
|
|
5862
|
+
### integrations
|
|
5863
|
+
|
|
5864
|
+
**FieldMapping** (interface)
|
|
5865
|
+
```typescript
|
|
5866
|
+
interface FieldMapping {
|
|
5867
|
+
targetPath: string
|
|
5868
|
+
sourcePath?: string
|
|
5869
|
+
transformType: TransformType
|
|
5870
|
+
transformExpression?: string
|
|
5871
|
+
}
|
|
5872
|
+
```
|
|
5873
|
+
|
|
5874
|
+
**FlowConnectionAuth** (interface)
|
|
5875
|
+
```typescript
|
|
5876
|
+
interface FlowConnectionAuth {
|
|
5877
|
+
method: FlowAuthMethod
|
|
5878
|
+
headerName?: string
|
|
5879
|
+
credentialRef?: string
|
|
5880
|
+
}
|
|
5881
|
+
```
|
|
5882
|
+
|
|
5883
|
+
**FlowConnection** (interface)
|
|
5884
|
+
```typescript
|
|
5885
|
+
interface FlowConnection {
|
|
5886
|
+
baseUrl?: string
|
|
5887
|
+
sendEndpoint?: string
|
|
5888
|
+
fetchEndpoint?: string
|
|
5889
|
+
defaultHeaders?: Record<string, string>
|
|
5890
|
+
auth?: FlowConnectionAuth
|
|
5891
|
+
}
|
|
5892
|
+
```
|
|
5893
|
+
|
|
5894
|
+
**IntegrationFlowConfig** (interface)
|
|
5895
|
+
```typescript
|
|
5896
|
+
interface IntegrationFlowConfig {
|
|
5897
|
+
connection?: FlowConnection
|
|
5898
|
+
fieldMappings?: FieldMapping[]
|
|
5899
|
+
[key: string]: any
|
|
5900
|
+
}
|
|
5901
|
+
```
|
|
5902
|
+
|
|
5903
|
+
**IntegrationFlow** (interface)
|
|
5904
|
+
```typescript
|
|
5905
|
+
interface IntegrationFlow {
|
|
5906
|
+
id: string
|
|
5907
|
+
orgId: string
|
|
5908
|
+
collectionId: string
|
|
5909
|
+
appId: string
|
|
5910
|
+
direction: FlowDirection
|
|
5911
|
+
name: string
|
|
5912
|
+
status: FlowStatus
|
|
5913
|
+
eventTypes: string[]
|
|
5914
|
+
schedule: string | null
|
|
5915
|
+
sourceEntity: string | null
|
|
5916
|
+
targetEntity: string | null
|
|
5917
|
+
config: IntegrationFlowConfig
|
|
5918
|
+
createdBy: string | null
|
|
5919
|
+
createdAt: string
|
|
5920
|
+
updatedAt: string
|
|
5921
|
+
deletedAt?: string | null
|
|
5922
|
+
lastRunAt?: string | null
|
|
5923
|
+
lastRunStatus?: string | null
|
|
5924
|
+
lastRunError?: string | null
|
|
5925
|
+
lastRunCount?: number | null
|
|
5926
|
+
lastPollAt?: string | null
|
|
5927
|
+
lastCursor?: string | null
|
|
5928
|
+
totalSynced?: number | null
|
|
5929
|
+
}
|
|
5930
|
+
```
|
|
5931
|
+
|
|
5932
|
+
**CreateFlowInput** (interface)
|
|
5933
|
+
```typescript
|
|
5934
|
+
interface CreateFlowInput {
|
|
5935
|
+
appId: string
|
|
5936
|
+
direction: FlowDirection
|
|
5937
|
+
name: string
|
|
5938
|
+
status?: FlowStatus
|
|
5939
|
+
eventTypes?: string[]
|
|
5940
|
+
schedule?: string | null
|
|
5941
|
+
sourceEntity?: string | null
|
|
5942
|
+
targetEntity?: string | null
|
|
5943
|
+
config?: IntegrationFlowConfig
|
|
5944
|
+
}
|
|
5945
|
+
```
|
|
5946
|
+
|
|
5947
|
+
**ListFlowsQuery** (interface)
|
|
5948
|
+
```typescript
|
|
5949
|
+
interface ListFlowsQuery {
|
|
5950
|
+
direction?: FlowDirection
|
|
5951
|
+
status?: FlowStatus
|
|
5952
|
+
appId?: string
|
|
5953
|
+
}
|
|
5954
|
+
```
|
|
5955
|
+
|
|
5956
|
+
**FlowList** (interface)
|
|
5957
|
+
```typescript
|
|
5958
|
+
interface FlowList {
|
|
5959
|
+
flows: IntegrationFlow[]
|
|
5960
|
+
}
|
|
5961
|
+
```
|
|
5962
|
+
|
|
5963
|
+
**RunFlowInput** (interface)
|
|
5964
|
+
```typescript
|
|
5965
|
+
interface RunFlowInput {
|
|
5966
|
+
entityId?: string
|
|
5967
|
+
}
|
|
5968
|
+
```
|
|
5969
|
+
|
|
5970
|
+
**RunFlowSummary** (interface)
|
|
5971
|
+
```typescript
|
|
5972
|
+
interface RunFlowSummary {
|
|
5973
|
+
flowId: string
|
|
5974
|
+
direction: FlowDirection
|
|
5975
|
+
records: number
|
|
5976
|
+
sent: number
|
|
5977
|
+
failed: number
|
|
5978
|
+
status: RunStatus
|
|
5979
|
+
}
|
|
5980
|
+
```
|
|
5981
|
+
|
|
5982
|
+
**RunFlowEnqueued** (interface)
|
|
5983
|
+
```typescript
|
|
5984
|
+
interface RunFlowEnqueued {
|
|
5985
|
+
enqueued: true
|
|
5986
|
+
flowId: string
|
|
5987
|
+
entityId: string | null
|
|
5988
|
+
}
|
|
5989
|
+
```
|
|
5990
|
+
|
|
5991
|
+
**SecretMeta** (interface)
|
|
5992
|
+
```typescript
|
|
5993
|
+
interface SecretMeta {
|
|
5994
|
+
ref: string
|
|
5995
|
+
name: string | null
|
|
5996
|
+
purpose: string
|
|
5997
|
+
hint: string
|
|
5998
|
+
keyVersion: number
|
|
5999
|
+
createdBy: string | null
|
|
6000
|
+
createdAt: string
|
|
6001
|
+
updatedAt: string
|
|
6002
|
+
rotatedAt?: string | null
|
|
6003
|
+
}
|
|
6004
|
+
```
|
|
6005
|
+
|
|
6006
|
+
**SecretList** (interface)
|
|
6007
|
+
```typescript
|
|
6008
|
+
interface SecretList {
|
|
6009
|
+
secrets: SecretMeta[]
|
|
6010
|
+
}
|
|
6011
|
+
```
|
|
6012
|
+
|
|
6013
|
+
**SetSecretInput** (interface)
|
|
6014
|
+
```typescript
|
|
6015
|
+
interface SetSecretInput {
|
|
6016
|
+
value: string
|
|
6017
|
+
name?: string
|
|
6018
|
+
purpose?: string
|
|
6019
|
+
}
|
|
6020
|
+
```
|
|
6021
|
+
|
|
6022
|
+
**SetSecretResult** (interface)
|
|
6023
|
+
```typescript
|
|
6024
|
+
interface SetSecretResult {
|
|
6025
|
+
ref: string
|
|
6026
|
+
hint: string
|
|
6027
|
+
}
|
|
6028
|
+
```
|
|
6029
|
+
|
|
6030
|
+
**ListSecretsQuery** (interface)
|
|
6031
|
+
```typescript
|
|
6032
|
+
interface ListSecretsQuery {
|
|
6033
|
+
purpose?: string
|
|
6034
|
+
}
|
|
6035
|
+
```
|
|
6036
|
+
|
|
6037
|
+
**FlowDirection** = `'inbound' | 'outbound'`
|
|
6038
|
+
|
|
6039
|
+
**FlowStatus** = `'draft' | 'active' | 'paused' | 'error'`
|
|
6040
|
+
|
|
6041
|
+
**RunStatus** = `'success' | 'partial' | 'error'`
|
|
6042
|
+
|
|
6043
|
+
**TransformType** = `'direct' | 'static' | 'template' | 'jsonata' | 'ai'`
|
|
6044
|
+
|
|
6045
|
+
**FlowAuthMethod** = `'api_key' | 'bearer' | 'basic' | 'webhook' | 'oauth2' | 'none'`
|
|
6046
|
+
|
|
6047
|
+
**UpdateFlowInput** = `Partial<Omit<CreateFlowInput, 'direction'>> & {`
|
|
6048
|
+
|
|
6049
|
+
**RunFlowResult** = `RunFlowSummary | RunFlowEnqueued`
|
|
6050
|
+
|
|
5771
6051
|
### interaction
|
|
5772
6052
|
|
|
5773
6053
|
**AdminInteractionsQueryRequest** (interface)
|
|
@@ -7766,6 +8046,33 @@ interface AblyTokenRequest {
|
|
|
7766
8046
|
|
|
7767
8047
|
**RealtimeChannelPattern** = `string`
|
|
7768
8048
|
|
|
8049
|
+
### research
|
|
8050
|
+
|
|
8051
|
+
**ResearchFetchRequest** (interface)
|
|
8052
|
+
```typescript
|
|
8053
|
+
interface ResearchFetchRequest {
|
|
8054
|
+
url: string
|
|
8055
|
+
type?: string
|
|
8056
|
+
schemaType?: string
|
|
8057
|
+
forceRefresh?: boolean
|
|
8058
|
+
}
|
|
8059
|
+
```
|
|
8060
|
+
|
|
8061
|
+
**ResearchFetchResult** (interface)
|
|
8062
|
+
```typescript
|
|
8063
|
+
interface ResearchFetchResult {
|
|
8064
|
+
provider: 'firecrawl' | 'web'
|
|
8065
|
+
status: number | null
|
|
8066
|
+
markdown?: string | null
|
|
8067
|
+
html?: string | null
|
|
8068
|
+
metadata?: Record<string, any> | null
|
|
8069
|
+
schemas: any[]
|
|
8070
|
+
url: string
|
|
8071
|
+
cached: boolean
|
|
8072
|
+
fetchedAt?: string
|
|
8073
|
+
}
|
|
8074
|
+
```
|
|
8075
|
+
|
|
7769
8076
|
### segments
|
|
7770
8077
|
|
|
7771
8078
|
**InteractionFilterValue** (interface)
|
|
@@ -8604,6 +8911,14 @@ interface Gs1DigitalLinkParams {
|
|
|
8604
8911
|
|
|
8605
8912
|
## API Functions
|
|
8606
8913
|
|
|
8914
|
+
### agent
|
|
8915
|
+
|
|
8916
|
+
**run**(collectionId: string, body: AgentRunRequest) → `Promise<AgentRunResult>`
|
|
8917
|
+
Run the server-side AI agent loop once: assembles the tool set, runs the model, executes tool calls, and returns the final text + the tool trace. POST /admin/collection/:collectionId/ai/agent/run
|
|
8918
|
+
|
|
8919
|
+
**listTools**(collectionId: string, query: AgentToolsQuery = {}) → `Promise<AgentToolsResponse>`
|
|
8920
|
+
List the tools the agent can use (optionally scoped by capability / name). GET /admin/collection/:collectionId/ai/agent/tools
|
|
8921
|
+
|
|
8607
8922
|
### analytics.admin
|
|
8608
8923
|
|
|
8609
8924
|
**summary**(collectionId: string,
|
|
@@ -9921,6 +10236,34 @@ Perform a PATCH request to any API endpoint.
|
|
|
9921
10236
|
**del**(path: string) → `Promise<T>`
|
|
9922
10237
|
Perform a DELETE request to any API endpoint.
|
|
9923
10238
|
|
|
10239
|
+
### integrations
|
|
10240
|
+
|
|
10241
|
+
**listFlows**(collectionId: string, query: ListFlowsQuery = {}) → `Promise<FlowList>`
|
|
10242
|
+
List flows in a collection. GET /integrations/flows
|
|
10243
|
+
|
|
10244
|
+
**createFlow**(collectionId: string, input: CreateFlowInput) → `Promise<IntegrationFlow>`
|
|
10245
|
+
Create a flow. POST /integrations/flows
|
|
10246
|
+
|
|
10247
|
+
**getFlow**(collectionId: string, id: string) → `Promise<IntegrationFlow>`
|
|
10248
|
+
Get one flow. GET /integrations/flows/:id
|
|
10249
|
+
|
|
10250
|
+
**updateFlow**(collectionId: string, id: string, input: UpdateFlowInput) → `Promise<IntegrationFlow>`
|
|
10251
|
+
Update whitelisted fields. PUT /integrations/flows/:id
|
|
10252
|
+
|
|
10253
|
+
**deleteFlow**(collectionId: string, id: string) → `Promise<`
|
|
10254
|
+
Soft-delete a flow. DELETE /integrations/flows/:id
|
|
10255
|
+
|
|
10256
|
+
**runFlow**(collectionId: string,
|
|
10257
|
+
id: string,
|
|
10258
|
+
options: RunFlowInput & { async?: boolean } = {}) → `Promise<RunFlowResult>`
|
|
10259
|
+
Run a flow now. POST /integrations/flows/:id/run - inline (default): resolves and returns the run summary. - options.async: enqueue on the worker, returns { enqueued: true }. Pass options.entityId to run for a single source entity.
|
|
10260
|
+
|
|
10261
|
+
**isRunSummary**(r: RunFlowResult) → `r is RunFlowSummary`
|
|
10262
|
+
Type guard: the run executed inline and returned a summary.
|
|
10263
|
+
|
|
10264
|
+
**isRunEnqueued**(r: RunFlowResult) → `r is RunFlowEnqueued`
|
|
10265
|
+
Type guard: the run was enqueued (async).
|
|
10266
|
+
|
|
9924
10267
|
### interactions
|
|
9925
10268
|
|
|
9926
10269
|
**query**(collectionId: string,
|
|
@@ -10613,6 +10956,28 @@ Get an Ably token for public (user-scoped) real-time communication. This endpoin
|
|
|
10613
10956
|
**getAdminToken**() → `Promise<AblyTokenRequest>`
|
|
10614
10957
|
Get an Ably token for admin real-time communication. This endpoint returns an Ably TokenRequest that can be used to initialize an Ably client with admin permissions to receive system notifications and alerts. Admin users get subscribe-only (read-only) access to the interaction:{userId} channel pattern. Requires admin authentication (Bearer token). ```ts const tokenRequest = await realtime.getAdminToken() // Use with Ably const ably = new Ably.Realtime.Promise({ authCallback: async (data, callback) => { callback(null, tokenRequest) } }) // Subscribe to admin interaction channel const userId = 'my-user-id' const channel = ably.channels.get(`interaction:${userId}`) await channel.subscribe((message) => { console.log('Admin notification:', message.data) }) ```
|
|
10615
10958
|
|
|
10959
|
+
### research
|
|
10960
|
+
|
|
10961
|
+
**fetch**(collectionId: string, body: ResearchFetchRequest) → `Promise<ResearchFetchResult>`
|
|
10962
|
+
Fetch + extract a web page: clean markdown, page metadata, and any schema.org JSON-LD (filtered by `type` when given). Firecrawl-primary, cached per collection. POST /admin/collection/:collectionId/research/fetch
|
|
10963
|
+
|
|
10964
|
+
### secrets
|
|
10965
|
+
|
|
10966
|
+
**list**(collectionId: string, query: ListSecretsQuery = {}) → `Promise<SecretList>`
|
|
10967
|
+
List secrets as refs + masked hints + metadata (never values). GET /secrets
|
|
10968
|
+
|
|
10969
|
+
**set**(collectionId: string, input: SetSecretInput) → `Promise<SetSecretResult>`
|
|
10970
|
+
Create a secret. POST /secrets → { ref, hint }. Store the ref on a flow.
|
|
10971
|
+
|
|
10972
|
+
**get**(collectionId: string, ref: string) → `Promise<SecretMeta>`
|
|
10973
|
+
Metadata for one secret (never the value). GET /secrets/:ref
|
|
10974
|
+
|
|
10975
|
+
**rotate**(collectionId: string, ref: string, input: SetSecretInput) → `Promise<SetSecretResult>`
|
|
10976
|
+
Rotate/update a secret's value (and optionally name/purpose). PUT /secrets/:ref → { ref, hint }
|
|
10977
|
+
|
|
10978
|
+
**remove**(collectionId: string, ref: string) → `Promise<`
|
|
10979
|
+
Soft-delete a secret. DELETE /secrets/:ref
|
|
10980
|
+
|
|
10616
10981
|
### segments
|
|
10617
10982
|
|
|
10618
10983
|
**create**(collectionId: string,
|
|
@@ -10643,6 +11008,14 @@ Get an Ably token for admin real-time communication. This endpoint returns an Ab
|
|
|
10643
11008
|
**stats**(collectionId: string) → `Promise<SessionStatistics>`
|
|
10644
11009
|
Get session statistics
|
|
10645
11010
|
|
|
11011
|
+
### skills
|
|
11012
|
+
|
|
11013
|
+
**list**(collectionId: string) → `Promise<SkillsListResponse>`
|
|
11014
|
+
List the skills apps can invoke (name, description, input/output schema).
|
|
11015
|
+
|
|
11016
|
+
**run**(collectionId: string, name: string, input: Record<string, any> = {}) → `Promise<T>`
|
|
11017
|
+
Invoke a skill by name with structured input — the app-facing verb; no prompt-shaping. POST /admin/collection/:collectionId/ai/skills/:name/run
|
|
11018
|
+
|
|
10646
11019
|
### tags
|
|
10647
11020
|
|
|
10648
11021
|
**create**(collectionId: string,
|