@proveanything/smartlinks 1.16.7 → 1.17.0
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/index.d.ts +2 -0
- package/dist/api/index.js +2 -0
- package/dist/api/integrations.d.ts +28 -0
- package/dist/api/integrations.js +82 -0
- package/dist/api/secrets.d.ts +15 -0
- package/dist/api/secrets.js +52 -0
- package/dist/docs/API_SUMMARY.md +237 -1
- package/dist/docs/integrations.md +141 -0
- package/dist/openapi.yaml +270 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/integrations.d.ts +136 -0
- package/dist/types/integrations.js +10 -0
- package/docs/API_SUMMARY.md +237 -1
- package/docs/integrations.md +141 -0
- package/openapi.yaml +270 -0
- package/package.json +2 -2
package/dist/openapi.yaml
CHANGED
|
@@ -22860,6 +22860,276 @@ components:
|
|
|
22860
22860
|
UploadMessage:
|
|
22861
22861
|
type: object
|
|
22862
22862
|
additionalProperties: true
|
|
22863
|
+
FieldMapping:
|
|
22864
|
+
type: object
|
|
22865
|
+
properties:
|
|
22866
|
+
targetPath:
|
|
22867
|
+
type: string
|
|
22868
|
+
sourcePath:
|
|
22869
|
+
type: string
|
|
22870
|
+
transformType:
|
|
22871
|
+
$ref: "#/components/schemas/TransformType"
|
|
22872
|
+
transformExpression:
|
|
22873
|
+
type: string
|
|
22874
|
+
required:
|
|
22875
|
+
- targetPath
|
|
22876
|
+
- transformType
|
|
22877
|
+
FlowConnectionAuth:
|
|
22878
|
+
type: object
|
|
22879
|
+
properties:
|
|
22880
|
+
method:
|
|
22881
|
+
$ref: "#/components/schemas/FlowAuthMethod"
|
|
22882
|
+
headerName:
|
|
22883
|
+
type: string
|
|
22884
|
+
credentialRef:
|
|
22885
|
+
type: string
|
|
22886
|
+
required:
|
|
22887
|
+
- method
|
|
22888
|
+
FlowConnection:
|
|
22889
|
+
type: object
|
|
22890
|
+
properties:
|
|
22891
|
+
baseUrl:
|
|
22892
|
+
type: string
|
|
22893
|
+
sendEndpoint:
|
|
22894
|
+
type: string
|
|
22895
|
+
fetchEndpoint:
|
|
22896
|
+
type: string
|
|
22897
|
+
defaultHeaders:
|
|
22898
|
+
type: object
|
|
22899
|
+
additionalProperties:
|
|
22900
|
+
type: string
|
|
22901
|
+
auth:
|
|
22902
|
+
$ref: "#/components/schemas/FlowConnectionAuth"
|
|
22903
|
+
IntegrationFlowConfig:
|
|
22904
|
+
type: object
|
|
22905
|
+
properties:
|
|
22906
|
+
connection:
|
|
22907
|
+
$ref: "#/components/schemas/FlowConnection"
|
|
22908
|
+
fieldMappings:
|
|
22909
|
+
type: array
|
|
22910
|
+
items:
|
|
22911
|
+
$ref: "#/components/schemas/FieldMapping"
|
|
22912
|
+
IntegrationFlow:
|
|
22913
|
+
type: object
|
|
22914
|
+
properties:
|
|
22915
|
+
id:
|
|
22916
|
+
type: string
|
|
22917
|
+
orgId:
|
|
22918
|
+
type: string
|
|
22919
|
+
collectionId:
|
|
22920
|
+
type: string
|
|
22921
|
+
appId:
|
|
22922
|
+
type: string
|
|
22923
|
+
direction:
|
|
22924
|
+
$ref: "#/components/schemas/FlowDirection"
|
|
22925
|
+
name:
|
|
22926
|
+
type: string
|
|
22927
|
+
status:
|
|
22928
|
+
$ref: "#/components/schemas/FlowStatus"
|
|
22929
|
+
eventTypes:
|
|
22930
|
+
type: array
|
|
22931
|
+
items:
|
|
22932
|
+
type: string
|
|
22933
|
+
schedule:
|
|
22934
|
+
type: string
|
|
22935
|
+
sourceEntity:
|
|
22936
|
+
type: string
|
|
22937
|
+
targetEntity:
|
|
22938
|
+
type: string
|
|
22939
|
+
config:
|
|
22940
|
+
$ref: "#/components/schemas/IntegrationFlowConfig"
|
|
22941
|
+
createdBy:
|
|
22942
|
+
type: string
|
|
22943
|
+
createdAt:
|
|
22944
|
+
type: string
|
|
22945
|
+
updatedAt:
|
|
22946
|
+
type: string
|
|
22947
|
+
deletedAt:
|
|
22948
|
+
type: string
|
|
22949
|
+
lastRunAt:
|
|
22950
|
+
type: string
|
|
22951
|
+
lastRunStatus:
|
|
22952
|
+
type: string
|
|
22953
|
+
lastRunError:
|
|
22954
|
+
type: string
|
|
22955
|
+
lastRunCount:
|
|
22956
|
+
type: number
|
|
22957
|
+
lastPollAt:
|
|
22958
|
+
type: string
|
|
22959
|
+
lastCursor:
|
|
22960
|
+
type: string
|
|
22961
|
+
totalSynced:
|
|
22962
|
+
type: number
|
|
22963
|
+
required:
|
|
22964
|
+
- id
|
|
22965
|
+
- orgId
|
|
22966
|
+
- collectionId
|
|
22967
|
+
- appId
|
|
22968
|
+
- direction
|
|
22969
|
+
- name
|
|
22970
|
+
- status
|
|
22971
|
+
- eventTypes
|
|
22972
|
+
- schedule
|
|
22973
|
+
- sourceEntity
|
|
22974
|
+
- targetEntity
|
|
22975
|
+
- config
|
|
22976
|
+
- createdBy
|
|
22977
|
+
- createdAt
|
|
22978
|
+
- updatedAt
|
|
22979
|
+
CreateFlowInput:
|
|
22980
|
+
type: object
|
|
22981
|
+
properties:
|
|
22982
|
+
appId:
|
|
22983
|
+
type: string
|
|
22984
|
+
direction:
|
|
22985
|
+
$ref: "#/components/schemas/FlowDirection"
|
|
22986
|
+
name:
|
|
22987
|
+
type: string
|
|
22988
|
+
status:
|
|
22989
|
+
$ref: "#/components/schemas/FlowStatus"
|
|
22990
|
+
eventTypes:
|
|
22991
|
+
type: array
|
|
22992
|
+
items:
|
|
22993
|
+
type: string
|
|
22994
|
+
schedule:
|
|
22995
|
+
type: string
|
|
22996
|
+
sourceEntity:
|
|
22997
|
+
type: string
|
|
22998
|
+
targetEntity:
|
|
22999
|
+
type: string
|
|
23000
|
+
config:
|
|
23001
|
+
$ref: "#/components/schemas/IntegrationFlowConfig"
|
|
23002
|
+
required:
|
|
23003
|
+
- appId
|
|
23004
|
+
- direction
|
|
23005
|
+
- name
|
|
23006
|
+
ListFlowsQuery:
|
|
23007
|
+
type: object
|
|
23008
|
+
properties:
|
|
23009
|
+
direction:
|
|
23010
|
+
$ref: "#/components/schemas/FlowDirection"
|
|
23011
|
+
status:
|
|
23012
|
+
$ref: "#/components/schemas/FlowStatus"
|
|
23013
|
+
appId:
|
|
23014
|
+
type: string
|
|
23015
|
+
FlowList:
|
|
23016
|
+
type: object
|
|
23017
|
+
properties:
|
|
23018
|
+
flows:
|
|
23019
|
+
type: array
|
|
23020
|
+
items:
|
|
23021
|
+
$ref: "#/components/schemas/IntegrationFlow"
|
|
23022
|
+
required:
|
|
23023
|
+
- flows
|
|
23024
|
+
RunFlowInput:
|
|
23025
|
+
type: object
|
|
23026
|
+
properties:
|
|
23027
|
+
entityId:
|
|
23028
|
+
type: string
|
|
23029
|
+
RunFlowSummary:
|
|
23030
|
+
type: object
|
|
23031
|
+
properties:
|
|
23032
|
+
flowId:
|
|
23033
|
+
type: string
|
|
23034
|
+
direction:
|
|
23035
|
+
$ref: "#/components/schemas/FlowDirection"
|
|
23036
|
+
records:
|
|
23037
|
+
type: number
|
|
23038
|
+
sent:
|
|
23039
|
+
type: number
|
|
23040
|
+
failed:
|
|
23041
|
+
type: number
|
|
23042
|
+
status:
|
|
23043
|
+
$ref: "#/components/schemas/RunStatus"
|
|
23044
|
+
required:
|
|
23045
|
+
- flowId
|
|
23046
|
+
- direction
|
|
23047
|
+
- records
|
|
23048
|
+
- sent
|
|
23049
|
+
- failed
|
|
23050
|
+
- status
|
|
23051
|
+
RunFlowEnqueued:
|
|
23052
|
+
type: object
|
|
23053
|
+
properties:
|
|
23054
|
+
enqueued:
|
|
23055
|
+
type: object
|
|
23056
|
+
additionalProperties: true
|
|
23057
|
+
flowId:
|
|
23058
|
+
type: string
|
|
23059
|
+
entityId:
|
|
23060
|
+
type: string
|
|
23061
|
+
required:
|
|
23062
|
+
- enqueued
|
|
23063
|
+
- flowId
|
|
23064
|
+
- entityId
|
|
23065
|
+
SecretMeta:
|
|
23066
|
+
type: object
|
|
23067
|
+
properties:
|
|
23068
|
+
ref:
|
|
23069
|
+
type: string
|
|
23070
|
+
name:
|
|
23071
|
+
type: string
|
|
23072
|
+
purpose:
|
|
23073
|
+
type: string
|
|
23074
|
+
hint:
|
|
23075
|
+
type: string
|
|
23076
|
+
keyVersion:
|
|
23077
|
+
type: number
|
|
23078
|
+
createdBy:
|
|
23079
|
+
type: string
|
|
23080
|
+
createdAt:
|
|
23081
|
+
type: string
|
|
23082
|
+
updatedAt:
|
|
23083
|
+
type: string
|
|
23084
|
+
rotatedAt:
|
|
23085
|
+
type: string
|
|
23086
|
+
required:
|
|
23087
|
+
- ref
|
|
23088
|
+
- name
|
|
23089
|
+
- purpose
|
|
23090
|
+
- hint
|
|
23091
|
+
- keyVersion
|
|
23092
|
+
- createdBy
|
|
23093
|
+
- createdAt
|
|
23094
|
+
- updatedAt
|
|
23095
|
+
SecretList:
|
|
23096
|
+
type: object
|
|
23097
|
+
properties:
|
|
23098
|
+
secrets:
|
|
23099
|
+
type: array
|
|
23100
|
+
items:
|
|
23101
|
+
$ref: "#/components/schemas/SecretMeta"
|
|
23102
|
+
required:
|
|
23103
|
+
- secrets
|
|
23104
|
+
SetSecretInput:
|
|
23105
|
+
type: object
|
|
23106
|
+
properties:
|
|
23107
|
+
value:
|
|
23108
|
+
type: string
|
|
23109
|
+
name:
|
|
23110
|
+
type: string
|
|
23111
|
+
purpose:
|
|
23112
|
+
type: string
|
|
23113
|
+
required:
|
|
23114
|
+
- value
|
|
23115
|
+
SetSecretResult:
|
|
23116
|
+
type: object
|
|
23117
|
+
properties:
|
|
23118
|
+
ref:
|
|
23119
|
+
type: string
|
|
23120
|
+
hint:
|
|
23121
|
+
type: string
|
|
23122
|
+
required:
|
|
23123
|
+
- ref
|
|
23124
|
+
- hint
|
|
23125
|
+
ListSecretsQuery:
|
|
23126
|
+
type: object
|
|
23127
|
+
properties:
|
|
23128
|
+
purpose:
|
|
23129
|
+
type: string
|
|
23130
|
+
RunFlowResult:
|
|
23131
|
+
type: object
|
|
23132
|
+
additionalProperties: true
|
|
22863
23133
|
AdminInteractionsQueryRequest:
|
|
22864
23134
|
type: object
|
|
22865
23135
|
properties:
|
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 {};
|
package/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.17.0 | Generated: 2026-09-13T07:38:31.861Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -134,6 +134,7 @@ The Smartlinks SDK is organized into the following namespaces:
|
|
|
134
134
|
- **containers** - Functions for containers operations
|
|
135
135
|
- **facets** - Functions for facets operations
|
|
136
136
|
- **http** - Functions for http operations
|
|
137
|
+
- **integrations** - Functions for integrations operations
|
|
137
138
|
- **jobs** - Functions for jobs operations
|
|
138
139
|
- **journeysAnalytics** - Functions for journeysAnalytics operations
|
|
139
140
|
- **location** - Functions for location operations
|
|
@@ -142,6 +143,7 @@ The Smartlinks SDK is organized into the following namespaces:
|
|
|
142
143
|
- **order** - Functions for order operations
|
|
143
144
|
- **products** - Functions for products operations
|
|
144
145
|
- **realtime** - Functions for realtime operations
|
|
146
|
+
- **secrets** - Functions for secrets operations
|
|
145
147
|
- **tags** - Functions for tags operations
|
|
146
148
|
- **template** - Functions for template operations
|
|
147
149
|
- **translations** - Functions for translations operations
|
|
@@ -5768,6 +5770,195 @@ interface UploadDoneMessage {
|
|
|
5768
5770
|
|
|
5769
5771
|
**UploadMessage** = ``
|
|
5770
5772
|
|
|
5773
|
+
### integrations
|
|
5774
|
+
|
|
5775
|
+
**FieldMapping** (interface)
|
|
5776
|
+
```typescript
|
|
5777
|
+
interface FieldMapping {
|
|
5778
|
+
targetPath: string
|
|
5779
|
+
sourcePath?: string
|
|
5780
|
+
transformType: TransformType
|
|
5781
|
+
transformExpression?: string
|
|
5782
|
+
}
|
|
5783
|
+
```
|
|
5784
|
+
|
|
5785
|
+
**FlowConnectionAuth** (interface)
|
|
5786
|
+
```typescript
|
|
5787
|
+
interface FlowConnectionAuth {
|
|
5788
|
+
method: FlowAuthMethod
|
|
5789
|
+
headerName?: string
|
|
5790
|
+
credentialRef?: string
|
|
5791
|
+
}
|
|
5792
|
+
```
|
|
5793
|
+
|
|
5794
|
+
**FlowConnection** (interface)
|
|
5795
|
+
```typescript
|
|
5796
|
+
interface FlowConnection {
|
|
5797
|
+
baseUrl?: string
|
|
5798
|
+
sendEndpoint?: string
|
|
5799
|
+
fetchEndpoint?: string
|
|
5800
|
+
defaultHeaders?: Record<string, string>
|
|
5801
|
+
auth?: FlowConnectionAuth
|
|
5802
|
+
}
|
|
5803
|
+
```
|
|
5804
|
+
|
|
5805
|
+
**IntegrationFlowConfig** (interface)
|
|
5806
|
+
```typescript
|
|
5807
|
+
interface IntegrationFlowConfig {
|
|
5808
|
+
connection?: FlowConnection
|
|
5809
|
+
fieldMappings?: FieldMapping[]
|
|
5810
|
+
[key: string]: any
|
|
5811
|
+
}
|
|
5812
|
+
```
|
|
5813
|
+
|
|
5814
|
+
**IntegrationFlow** (interface)
|
|
5815
|
+
```typescript
|
|
5816
|
+
interface IntegrationFlow {
|
|
5817
|
+
id: string
|
|
5818
|
+
orgId: string
|
|
5819
|
+
collectionId: string
|
|
5820
|
+
appId: string
|
|
5821
|
+
direction: FlowDirection
|
|
5822
|
+
name: string
|
|
5823
|
+
status: FlowStatus
|
|
5824
|
+
eventTypes: string[]
|
|
5825
|
+
schedule: string | null
|
|
5826
|
+
sourceEntity: string | null
|
|
5827
|
+
targetEntity: string | null
|
|
5828
|
+
config: IntegrationFlowConfig
|
|
5829
|
+
createdBy: string | null
|
|
5830
|
+
createdAt: string
|
|
5831
|
+
updatedAt: string
|
|
5832
|
+
deletedAt?: string | null
|
|
5833
|
+
lastRunAt?: string | null
|
|
5834
|
+
lastRunStatus?: string | null
|
|
5835
|
+
lastRunError?: string | null
|
|
5836
|
+
lastRunCount?: number | null
|
|
5837
|
+
lastPollAt?: string | null
|
|
5838
|
+
lastCursor?: string | null
|
|
5839
|
+
totalSynced?: number | null
|
|
5840
|
+
}
|
|
5841
|
+
```
|
|
5842
|
+
|
|
5843
|
+
**CreateFlowInput** (interface)
|
|
5844
|
+
```typescript
|
|
5845
|
+
interface CreateFlowInput {
|
|
5846
|
+
appId: string
|
|
5847
|
+
direction: FlowDirection
|
|
5848
|
+
name: string
|
|
5849
|
+
status?: FlowStatus
|
|
5850
|
+
eventTypes?: string[]
|
|
5851
|
+
schedule?: string | null
|
|
5852
|
+
sourceEntity?: string | null
|
|
5853
|
+
targetEntity?: string | null
|
|
5854
|
+
config?: IntegrationFlowConfig
|
|
5855
|
+
}
|
|
5856
|
+
```
|
|
5857
|
+
|
|
5858
|
+
**ListFlowsQuery** (interface)
|
|
5859
|
+
```typescript
|
|
5860
|
+
interface ListFlowsQuery {
|
|
5861
|
+
direction?: FlowDirection
|
|
5862
|
+
status?: FlowStatus
|
|
5863
|
+
appId?: string
|
|
5864
|
+
}
|
|
5865
|
+
```
|
|
5866
|
+
|
|
5867
|
+
**FlowList** (interface)
|
|
5868
|
+
```typescript
|
|
5869
|
+
interface FlowList {
|
|
5870
|
+
flows: IntegrationFlow[]
|
|
5871
|
+
}
|
|
5872
|
+
```
|
|
5873
|
+
|
|
5874
|
+
**RunFlowInput** (interface)
|
|
5875
|
+
```typescript
|
|
5876
|
+
interface RunFlowInput {
|
|
5877
|
+
entityId?: string
|
|
5878
|
+
}
|
|
5879
|
+
```
|
|
5880
|
+
|
|
5881
|
+
**RunFlowSummary** (interface)
|
|
5882
|
+
```typescript
|
|
5883
|
+
interface RunFlowSummary {
|
|
5884
|
+
flowId: string
|
|
5885
|
+
direction: FlowDirection
|
|
5886
|
+
records: number
|
|
5887
|
+
sent: number
|
|
5888
|
+
failed: number
|
|
5889
|
+
status: RunStatus
|
|
5890
|
+
}
|
|
5891
|
+
```
|
|
5892
|
+
|
|
5893
|
+
**RunFlowEnqueued** (interface)
|
|
5894
|
+
```typescript
|
|
5895
|
+
interface RunFlowEnqueued {
|
|
5896
|
+
enqueued: true
|
|
5897
|
+
flowId: string
|
|
5898
|
+
entityId: string | null
|
|
5899
|
+
}
|
|
5900
|
+
```
|
|
5901
|
+
|
|
5902
|
+
**SecretMeta** (interface)
|
|
5903
|
+
```typescript
|
|
5904
|
+
interface SecretMeta {
|
|
5905
|
+
ref: string
|
|
5906
|
+
name: string | null
|
|
5907
|
+
purpose: string
|
|
5908
|
+
hint: string
|
|
5909
|
+
keyVersion: number
|
|
5910
|
+
createdBy: string | null
|
|
5911
|
+
createdAt: string
|
|
5912
|
+
updatedAt: string
|
|
5913
|
+
rotatedAt?: string | null
|
|
5914
|
+
}
|
|
5915
|
+
```
|
|
5916
|
+
|
|
5917
|
+
**SecretList** (interface)
|
|
5918
|
+
```typescript
|
|
5919
|
+
interface SecretList {
|
|
5920
|
+
secrets: SecretMeta[]
|
|
5921
|
+
}
|
|
5922
|
+
```
|
|
5923
|
+
|
|
5924
|
+
**SetSecretInput** (interface)
|
|
5925
|
+
```typescript
|
|
5926
|
+
interface SetSecretInput {
|
|
5927
|
+
value: string
|
|
5928
|
+
name?: string
|
|
5929
|
+
purpose?: string
|
|
5930
|
+
}
|
|
5931
|
+
```
|
|
5932
|
+
|
|
5933
|
+
**SetSecretResult** (interface)
|
|
5934
|
+
```typescript
|
|
5935
|
+
interface SetSecretResult {
|
|
5936
|
+
ref: string
|
|
5937
|
+
hint: string
|
|
5938
|
+
}
|
|
5939
|
+
```
|
|
5940
|
+
|
|
5941
|
+
**ListSecretsQuery** (interface)
|
|
5942
|
+
```typescript
|
|
5943
|
+
interface ListSecretsQuery {
|
|
5944
|
+
purpose?: string
|
|
5945
|
+
}
|
|
5946
|
+
```
|
|
5947
|
+
|
|
5948
|
+
**FlowDirection** = `'inbound' | 'outbound'`
|
|
5949
|
+
|
|
5950
|
+
**FlowStatus** = `'draft' | 'active' | 'paused' | 'error'`
|
|
5951
|
+
|
|
5952
|
+
**RunStatus** = `'success' | 'partial' | 'error'`
|
|
5953
|
+
|
|
5954
|
+
**TransformType** = `'direct' | 'static' | 'template' | 'jsonata' | 'ai'`
|
|
5955
|
+
|
|
5956
|
+
**FlowAuthMethod** = `'api_key' | 'bearer' | 'basic' | 'webhook' | 'oauth2' | 'none'`
|
|
5957
|
+
|
|
5958
|
+
**UpdateFlowInput** = `Partial<Omit<CreateFlowInput, 'direction'>> & {`
|
|
5959
|
+
|
|
5960
|
+
**RunFlowResult** = `RunFlowSummary | RunFlowEnqueued`
|
|
5961
|
+
|
|
5771
5962
|
### interaction
|
|
5772
5963
|
|
|
5773
5964
|
**AdminInteractionsQueryRequest** (interface)
|
|
@@ -9921,6 +10112,34 @@ Perform a PATCH request to any API endpoint.
|
|
|
9921
10112
|
**del**(path: string) → `Promise<T>`
|
|
9922
10113
|
Perform a DELETE request to any API endpoint.
|
|
9923
10114
|
|
|
10115
|
+
### integrations
|
|
10116
|
+
|
|
10117
|
+
**listFlows**(collectionId: string, query: ListFlowsQuery = {}) → `Promise<FlowList>`
|
|
10118
|
+
List flows in a collection. GET /integrations/flows
|
|
10119
|
+
|
|
10120
|
+
**createFlow**(collectionId: string, input: CreateFlowInput) → `Promise<IntegrationFlow>`
|
|
10121
|
+
Create a flow. POST /integrations/flows
|
|
10122
|
+
|
|
10123
|
+
**getFlow**(collectionId: string, id: string) → `Promise<IntegrationFlow>`
|
|
10124
|
+
Get one flow. GET /integrations/flows/:id
|
|
10125
|
+
|
|
10126
|
+
**updateFlow**(collectionId: string, id: string, input: UpdateFlowInput) → `Promise<IntegrationFlow>`
|
|
10127
|
+
Update whitelisted fields. PUT /integrations/flows/:id
|
|
10128
|
+
|
|
10129
|
+
**deleteFlow**(collectionId: string, id: string) → `Promise<`
|
|
10130
|
+
Soft-delete a flow. DELETE /integrations/flows/:id
|
|
10131
|
+
|
|
10132
|
+
**runFlow**(collectionId: string,
|
|
10133
|
+
id: string,
|
|
10134
|
+
options: RunFlowInput & { async?: boolean } = {}) → `Promise<RunFlowResult>`
|
|
10135
|
+
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.
|
|
10136
|
+
|
|
10137
|
+
**isRunSummary**(r: RunFlowResult) → `r is RunFlowSummary`
|
|
10138
|
+
Type guard: the run executed inline and returned a summary.
|
|
10139
|
+
|
|
10140
|
+
**isRunEnqueued**(r: RunFlowResult) → `r is RunFlowEnqueued`
|
|
10141
|
+
Type guard: the run was enqueued (async).
|
|
10142
|
+
|
|
9924
10143
|
### interactions
|
|
9925
10144
|
|
|
9926
10145
|
**query**(collectionId: string,
|
|
@@ -10613,6 +10832,23 @@ Get an Ably token for public (user-scoped) real-time communication. This endpoin
|
|
|
10613
10832
|
**getAdminToken**() → `Promise<AblyTokenRequest>`
|
|
10614
10833
|
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
10834
|
|
|
10835
|
+
### secrets
|
|
10836
|
+
|
|
10837
|
+
**list**(collectionId: string, query: ListSecretsQuery = {}) → `Promise<SecretList>`
|
|
10838
|
+
List secrets as refs + masked hints + metadata (never values). GET /secrets
|
|
10839
|
+
|
|
10840
|
+
**set**(collectionId: string, input: SetSecretInput) → `Promise<SetSecretResult>`
|
|
10841
|
+
Create a secret. POST /secrets → { ref, hint }. Store the ref on a flow.
|
|
10842
|
+
|
|
10843
|
+
**get**(collectionId: string, ref: string) → `Promise<SecretMeta>`
|
|
10844
|
+
Metadata for one secret (never the value). GET /secrets/:ref
|
|
10845
|
+
|
|
10846
|
+
**rotate**(collectionId: string, ref: string, input: SetSecretInput) → `Promise<SetSecretResult>`
|
|
10847
|
+
Rotate/update a secret's value (and optionally name/purpose). PUT /secrets/:ref → { ref, hint }
|
|
10848
|
+
|
|
10849
|
+
**remove**(collectionId: string, ref: string) → `Promise<`
|
|
10850
|
+
Soft-delete a secret. DELETE /secrets/:ref
|
|
10851
|
+
|
|
10616
10852
|
### segments
|
|
10617
10853
|
|
|
10618
10854
|
**create**(collectionId: string,
|