@proveanything/smartlinks 2.0.30 → 2.0.32
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/appObjects.js +26 -11
- package/dist/api/integrations.d.ts +27 -1
- package/dist/api/integrations.js +47 -0
- package/dist/docs/API_SUMMARY.md +153 -1
- package/dist/openapi.yaml +290 -0
- package/dist/types/appObjects.d.ts +12 -1
- package/dist/types/integrations.d.ts +100 -0
- package/docs/API_SUMMARY.md +153 -1
- package/openapi.yaml +290 -0
- package/package.json +1 -1
package/dist/api/appObjects.js
CHANGED
|
@@ -421,15 +421,30 @@ export var app;
|
|
|
421
421
|
* Build a query string from an object of parameters
|
|
422
422
|
*/
|
|
423
423
|
function buildQueryString(params) {
|
|
424
|
-
const
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
.
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
.
|
|
434
|
-
|
|
424
|
+
const parts = [];
|
|
425
|
+
const add = (key, value) => {
|
|
426
|
+
if (value === undefined || value === null)
|
|
427
|
+
return;
|
|
428
|
+
parts.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
|
|
429
|
+
};
|
|
430
|
+
for (const [key, value] of Object.entries(params)) {
|
|
431
|
+
if (value === undefined || value === null)
|
|
432
|
+
continue;
|
|
433
|
+
if (Array.isArray(value)) {
|
|
434
|
+
add(key, value.join(',')); // unchanged: top-level arrays are sent comma-joined
|
|
435
|
+
}
|
|
436
|
+
else if (typeof value === 'object' && !(value instanceof Date)) {
|
|
437
|
+
// Nested filter objects (e.g. dataFilter: { versionId: 'x', zone: 'in:a,b' }) → dataFilter[versionId]=x
|
|
438
|
+
for (const [sub, subValue] of Object.entries(value)) {
|
|
439
|
+
if (Array.isArray(subValue))
|
|
440
|
+
subValue.forEach((v) => add(`${key}[${sub}]`, v));
|
|
441
|
+
else
|
|
442
|
+
add(`${key}[${sub}]`, subValue);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
else {
|
|
446
|
+
add(key, value instanceof Date ? value.toISOString() : value);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
return parts.length ? `?${parts.join('&')}` : '';
|
|
435
450
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IntegrationFlow, CreateFlowInput, UpdateFlowInput, ListFlowsQuery, FlowList, RunFlowInput, RunFlowResult, RunFlowSummary, RunFlowEnqueued, RecordTypesResponse } from "../types/integrations.js";
|
|
1
|
+
import type { IntegrationFlow, CreateFlowInput, UpdateFlowInput, ListFlowsQuery, FlowList, RunFlowInput, RunFlowResult, RunFlowSummary, RunFlowEnqueued, RecordTypesResponse, FlowRun, ListRunsQuery, RunList, ListRunItemsQuery, RunItemList, LoggingWindow, SetLoggingInput } from "../types/integrations.js";
|
|
2
2
|
export declare namespace integrations {
|
|
3
3
|
/** List flows in a collection. GET /integrations/flows */
|
|
4
4
|
function listFlows(collectionId: string, query?: ListFlowsQuery): Promise<FlowList>;
|
|
@@ -31,4 +31,30 @@ export declare namespace integrations {
|
|
|
31
31
|
function isRunSummary(r: RunFlowResult): r is RunFlowSummary;
|
|
32
32
|
/** Type guard: the run was enqueued (async). */
|
|
33
33
|
function isRunEnqueued(r: RunFlowResult): r is RunFlowEnqueued;
|
|
34
|
+
/** List a flow's runs, newest first. GET /integrations/flows/:id/runs */
|
|
35
|
+
function listRuns(collectionId: string, flowId: string, query?: ListRunsQuery): Promise<RunList>;
|
|
36
|
+
/** Get one run's summary. GET /integrations/flows/:id/runs/:runId */
|
|
37
|
+
function getRun(collectionId: string, flowId: string, runId: string): Promise<FlowRun>;
|
|
38
|
+
/**
|
|
39
|
+
* List a run's per-record items. GET /integrations/flows/:id/runs/:runId/items
|
|
40
|
+
* `request`/`response` are populated only for items captured while enhanced logging
|
|
41
|
+
* was active (and before the 24h body purge).
|
|
42
|
+
*/
|
|
43
|
+
function listRunItems(collectionId: string, flowId: string, runId: string, query?: ListRunItemsQuery): Promise<RunItemList>;
|
|
44
|
+
/** Every run touching an entity (e.g. a product), across flows. GET /integrations/runs/entity/:entityId */
|
|
45
|
+
function listEntityRuns(collectionId: string, entityId: string, query?: {
|
|
46
|
+
limit?: number;
|
|
47
|
+
}): Promise<RunList>;
|
|
48
|
+
/** Is enhanced logging active for a connection? GET /integrations/logging/:connectionId */
|
|
49
|
+
function getLogging(collectionId: string, connectionId: string): Promise<{
|
|
50
|
+
window: LoggingWindow | null;
|
|
51
|
+
}>;
|
|
52
|
+
/** Enable enhanced logging. POST /integrations/logging/:connectionId (omit ttlMinutes = until cancelled) */
|
|
53
|
+
function setLogging(collectionId: string, connectionId: string, input?: SetLoggingInput): Promise<{
|
|
54
|
+
window: LoggingWindow;
|
|
55
|
+
}>;
|
|
56
|
+
/** Cancel enhanced logging now. DELETE /integrations/logging/:connectionId */
|
|
57
|
+
function cancelLogging(collectionId: string, connectionId: string): Promise<{
|
|
58
|
+
canceled: boolean;
|
|
59
|
+
}>;
|
|
34
60
|
}
|
package/dist/api/integrations.js
CHANGED
|
@@ -88,4 +88,51 @@ export var integrations;
|
|
|
88
88
|
return r.enqueued === true;
|
|
89
89
|
}
|
|
90
90
|
integrations.isRunEnqueued = isRunEnqueued;
|
|
91
|
+
// --- Run logs -----------------------------------------------------------
|
|
92
|
+
// A run row is written for every execution (manual, event, scheduled, test). Per-record
|
|
93
|
+
// request/response detail is captured only while enhanced logging is active for the
|
|
94
|
+
// connection (see setLogging); otherwise runs carry metadata only.
|
|
95
|
+
/** List a flow's runs, newest first. GET /integrations/flows/:id/runs */
|
|
96
|
+
async function listRuns(collectionId, flowId, query = {}) {
|
|
97
|
+
return request(`${base(collectionId)}/${enc(flowId)}/runs${encodeQuery(query)}`);
|
|
98
|
+
}
|
|
99
|
+
integrations.listRuns = listRuns;
|
|
100
|
+
/** Get one run's summary. GET /integrations/flows/:id/runs/:runId */
|
|
101
|
+
async function getRun(collectionId, flowId, runId) {
|
|
102
|
+
return request(`${base(collectionId)}/${enc(flowId)}/runs/${enc(runId)}`);
|
|
103
|
+
}
|
|
104
|
+
integrations.getRun = getRun;
|
|
105
|
+
/**
|
|
106
|
+
* List a run's per-record items. GET /integrations/flows/:id/runs/:runId/items
|
|
107
|
+
* `request`/`response` are populated only for items captured while enhanced logging
|
|
108
|
+
* was active (and before the 24h body purge).
|
|
109
|
+
*/
|
|
110
|
+
async function listRunItems(collectionId, flowId, runId, query = {}) {
|
|
111
|
+
return request(`${base(collectionId)}/${enc(flowId)}/runs/${enc(runId)}/items${encodeQuery(query)}`);
|
|
112
|
+
}
|
|
113
|
+
integrations.listRunItems = listRunItems;
|
|
114
|
+
/** Every run touching an entity (e.g. a product), across flows. GET /integrations/runs/entity/:entityId */
|
|
115
|
+
async function listEntityRuns(collectionId, entityId, query = {}) {
|
|
116
|
+
return request(`/admin/collection/${enc(collectionId)}/integrations/runs/entity/${enc(entityId)}${encodeQuery(query)}`);
|
|
117
|
+
}
|
|
118
|
+
integrations.listEntityRuns = listEntityRuns;
|
|
119
|
+
// --- Enhanced logging window (per connection) ---------------------------
|
|
120
|
+
// Full request/response capture is off by default. Turn it on for a connection while
|
|
121
|
+
// debugging; it applies to every flow on that connection and auto-expires (or runs until
|
|
122
|
+
// cancelled). Bodies are redacted at capture and purged after 24h.
|
|
123
|
+
/** Is enhanced logging active for a connection? GET /integrations/logging/:connectionId */
|
|
124
|
+
async function getLogging(collectionId, connectionId) {
|
|
125
|
+
return request(`/admin/collection/${enc(collectionId)}/integrations/logging/${enc(connectionId)}`);
|
|
126
|
+
}
|
|
127
|
+
integrations.getLogging = getLogging;
|
|
128
|
+
/** Enable enhanced logging. POST /integrations/logging/:connectionId (omit ttlMinutes = until cancelled) */
|
|
129
|
+
async function setLogging(collectionId, connectionId, input = {}) {
|
|
130
|
+
return post(`/admin/collection/${enc(collectionId)}/integrations/logging/${enc(connectionId)}`, input);
|
|
131
|
+
}
|
|
132
|
+
integrations.setLogging = setLogging;
|
|
133
|
+
/** Cancel enhanced logging now. DELETE /integrations/logging/:connectionId */
|
|
134
|
+
async function cancelLogging(collectionId, connectionId) {
|
|
135
|
+
return del(`/admin/collection/${enc(collectionId)}/integrations/logging/${enc(connectionId)}`);
|
|
136
|
+
}
|
|
137
|
+
integrations.cancelLogging = cancelLogging;
|
|
91
138
|
})(integrations || (integrations = {}));
|
package/dist/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.32 | Generated: 2026-10-01T17:18:44.658Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -6562,6 +6562,7 @@ interface FlowList {
|
|
|
6562
6562
|
```typescript
|
|
6563
6563
|
interface RunFlowInput {
|
|
6564
6564
|
entityId?: string
|
|
6565
|
+
trigger?: RunTrigger
|
|
6565
6566
|
}
|
|
6566
6567
|
```
|
|
6567
6568
|
|
|
@@ -6574,6 +6575,128 @@ interface RunFlowSummary {
|
|
|
6574
6575
|
sent: number
|
|
6575
6576
|
failed: number
|
|
6576
6577
|
status: RunStatus
|
|
6578
|
+
runId?: string
|
|
6579
|
+
}
|
|
6580
|
+
```
|
|
6581
|
+
|
|
6582
|
+
**CapturedRequest** (interface)
|
|
6583
|
+
```typescript
|
|
6584
|
+
interface CapturedRequest {
|
|
6585
|
+
transport: string
|
|
6586
|
+
method: string
|
|
6587
|
+
url: string
|
|
6588
|
+
headers: Record<string, string>
|
|
6589
|
+
partitionKey?: string
|
|
6590
|
+
body: unknown
|
|
6591
|
+
bodyBytes: number
|
|
6592
|
+
truncated: boolean
|
|
6593
|
+
}
|
|
6594
|
+
```
|
|
6595
|
+
|
|
6596
|
+
**CapturedResponse** (interface)
|
|
6597
|
+
```typescript
|
|
6598
|
+
interface CapturedResponse {
|
|
6599
|
+
status: number | null
|
|
6600
|
+
ok: boolean | null
|
|
6601
|
+
headers: Record<string, string>
|
|
6602
|
+
body: unknown
|
|
6603
|
+
bodyBytes: number
|
|
6604
|
+
truncated: boolean
|
|
6605
|
+
error: string | null
|
|
6606
|
+
}
|
|
6607
|
+
```
|
|
6608
|
+
|
|
6609
|
+
**FlowRun** (interface)
|
|
6610
|
+
```typescript
|
|
6611
|
+
interface FlowRun {
|
|
6612
|
+
id: string
|
|
6613
|
+
flowId: string
|
|
6614
|
+
connectionId?: string | null
|
|
6615
|
+
trigger: RunTrigger
|
|
6616
|
+
triggerEvent?: string | null
|
|
6617
|
+
triggerEntityId?: string | null
|
|
6618
|
+
status: FlowRunStatus
|
|
6619
|
+
records: number
|
|
6620
|
+
sent: number
|
|
6621
|
+
failed: number
|
|
6622
|
+
error?: string | null
|
|
6623
|
+
correlationId?: string | null
|
|
6624
|
+
captureLevel: CaptureLevel
|
|
6625
|
+
bodiesPurged: boolean
|
|
6626
|
+
startedAt: string
|
|
6627
|
+
completedAt?: string | null
|
|
6628
|
+
durationMs?: number | null
|
|
6629
|
+
}
|
|
6630
|
+
```
|
|
6631
|
+
|
|
6632
|
+
**FlowRunItem** (interface)
|
|
6633
|
+
```typescript
|
|
6634
|
+
interface FlowRunItem {
|
|
6635
|
+
id: string
|
|
6636
|
+
runId: string
|
|
6637
|
+
entityType: string
|
|
6638
|
+
entityId?: string | null
|
|
6639
|
+
entityLabel?: string | null
|
|
6640
|
+
status: FlowRunItemStatus
|
|
6641
|
+
skipReason?: string | null
|
|
6642
|
+
request?: CapturedRequest | null
|
|
6643
|
+
response?: CapturedResponse | null
|
|
6644
|
+
attempt: number
|
|
6645
|
+
durationMs?: number | null
|
|
6646
|
+
createdAt: string
|
|
6647
|
+
}
|
|
6648
|
+
```
|
|
6649
|
+
|
|
6650
|
+
**ListRunsQuery** (interface)
|
|
6651
|
+
```typescript
|
|
6652
|
+
interface ListRunsQuery {
|
|
6653
|
+
status?: FlowRunStatus
|
|
6654
|
+
trigger?: RunTrigger
|
|
6655
|
+
entityId?: string
|
|
6656
|
+
limit?: number
|
|
6657
|
+
cursor?: string
|
|
6658
|
+
}
|
|
6659
|
+
```
|
|
6660
|
+
|
|
6661
|
+
**RunList** (interface)
|
|
6662
|
+
```typescript
|
|
6663
|
+
interface RunList {
|
|
6664
|
+
runs: FlowRun[]; nextCursor?: string
|
|
6665
|
+
}
|
|
6666
|
+
```
|
|
6667
|
+
|
|
6668
|
+
**ListRunItemsQuery** (interface)
|
|
6669
|
+
```typescript
|
|
6670
|
+
interface ListRunItemsQuery {
|
|
6671
|
+
status?: FlowRunItemStatus; limit?: number; cursor?: string
|
|
6672
|
+
}
|
|
6673
|
+
```
|
|
6674
|
+
|
|
6675
|
+
**RunItemList** (interface)
|
|
6676
|
+
```typescript
|
|
6677
|
+
interface RunItemList {
|
|
6678
|
+
items: FlowRunItem[]; nextCursor?: string
|
|
6679
|
+
}
|
|
6680
|
+
```
|
|
6681
|
+
|
|
6682
|
+
**LoggingWindow** (interface)
|
|
6683
|
+
```typescript
|
|
6684
|
+
interface LoggingWindow {
|
|
6685
|
+
id: string
|
|
6686
|
+
connectionId: string
|
|
6687
|
+
level: CaptureLevel
|
|
6688
|
+
enabledBy?: string | null
|
|
6689
|
+
enabledAt: string
|
|
6690
|
+
expiresAt?: string | null
|
|
6691
|
+
canceledAt?: string | null
|
|
6692
|
+
}
|
|
6693
|
+
```
|
|
6694
|
+
|
|
6695
|
+
**SetLoggingInput** (interface)
|
|
6696
|
+
```typescript
|
|
6697
|
+
interface SetLoggingInput {
|
|
6698
|
+
ttlMinutes?: number
|
|
6699
|
+
level?: 'full' | 'errors_only'
|
|
6577
6700
|
}
|
|
6578
6701
|
```
|
|
6579
6702
|
|
|
@@ -6660,6 +6783,14 @@ interface RecordTypesResponse {
|
|
|
6660
6783
|
|
|
6661
6784
|
**UpdateFlowInput** = `Partial<Omit<CreateFlowInput, 'direction'>> & {`
|
|
6662
6785
|
|
|
6786
|
+
**RunTrigger** = `'manual' | 'event' | 'schedule' | 'test'`
|
|
6787
|
+
|
|
6788
|
+
**FlowRunStatus** = `'running' | 'success' | 'partial' | 'failed' | 'skipped'`
|
|
6789
|
+
|
|
6790
|
+
**FlowRunItemStatus** = `'sent' | 'failed' | 'skipped'`
|
|
6791
|
+
|
|
6792
|
+
**CaptureLevel** = `'metadata' | 'errors_only' | 'full'`
|
|
6793
|
+
|
|
6663
6794
|
**RunFlowResult** = `RunFlowSummary | RunFlowEnqueued`
|
|
6664
6795
|
|
|
6665
6796
|
### interaction
|
|
@@ -10850,6 +10981,27 @@ Type guard: the run executed inline and returned a summary.
|
|
|
10850
10981
|
**isRunEnqueued**(r: RunFlowResult) → `r is RunFlowEnqueued`
|
|
10851
10982
|
Type guard: the run was enqueued (async).
|
|
10852
10983
|
|
|
10984
|
+
**listRuns**(collectionId: string, flowId: string, query: ListRunsQuery = {}) → `Promise<RunList>`
|
|
10985
|
+
List a flow's runs, newest first. GET /integrations/flows/:id/runs
|
|
10986
|
+
|
|
10987
|
+
**getRun**(collectionId: string, flowId: string, runId: string) → `Promise<FlowRun>`
|
|
10988
|
+
Get one run's summary. GET /integrations/flows/:id/runs/:runId
|
|
10989
|
+
|
|
10990
|
+
**listRunItems**(collectionId: string, flowId: string, runId: string, query: ListRunItemsQuery = {}) → `Promise<RunItemList>`
|
|
10991
|
+
List a run's per-record items. GET /integrations/flows/:id/runs/:runId/items `request`/`response` are populated only for items captured while enhanced logging was active (and before the 24h body purge).
|
|
10992
|
+
|
|
10993
|
+
**listEntityRuns**(collectionId: string, entityId: string, query: { limit?: number } = {}) → `Promise<RunList>`
|
|
10994
|
+
Every run touching an entity (e.g. a product), across flows. GET /integrations/runs/entity/:entityId
|
|
10995
|
+
|
|
10996
|
+
**getLogging**(collectionId: string, connectionId: string) → `Promise<`
|
|
10997
|
+
Is enhanced logging active for a connection? GET /integrations/logging/:connectionId
|
|
10998
|
+
|
|
10999
|
+
**setLogging**(collectionId: string, connectionId: string, input: SetLoggingInput = {}) → `Promise<`
|
|
11000
|
+
Enable enhanced logging. POST /integrations/logging/:connectionId (omit ttlMinutes = until cancelled)
|
|
11001
|
+
|
|
11002
|
+
**cancelLogging**(collectionId: string, connectionId: string) → `Promise<`
|
|
11003
|
+
Cancel enhanced logging now. DELETE /integrations/logging/:connectionId
|
|
11004
|
+
|
|
10853
11005
|
### interactions
|
|
10854
11006
|
|
|
10855
11007
|
**query**(collectionId: string,
|
package/dist/openapi.yaml
CHANGED
|
@@ -4444,6 +4444,38 @@ paths:
|
|
|
4444
4444
|
description: Unauthorized
|
|
4445
4445
|
404:
|
|
4446
4446
|
description: Not found
|
|
4447
|
+
/admin/collection/{collectionId}/integrations/runs/entity/{entityId}:
|
|
4448
|
+
get:
|
|
4449
|
+
tags:
|
|
4450
|
+
- integrations
|
|
4451
|
+
summary: Every run touching an entity (e.g.
|
|
4452
|
+
operationId: integrations_listEntityRuns
|
|
4453
|
+
security:
|
|
4454
|
+
- bearerAuth: []
|
|
4455
|
+
parameters:
|
|
4456
|
+
- name: collectionId
|
|
4457
|
+
in: path
|
|
4458
|
+
required: true
|
|
4459
|
+
schema:
|
|
4460
|
+
type: string
|
|
4461
|
+
- name: entityId
|
|
4462
|
+
in: path
|
|
4463
|
+
required: true
|
|
4464
|
+
schema:
|
|
4465
|
+
type: string
|
|
4466
|
+
responses:
|
|
4467
|
+
200:
|
|
4468
|
+
description: Success
|
|
4469
|
+
content:
|
|
4470
|
+
application/json:
|
|
4471
|
+
schema:
|
|
4472
|
+
$ref: "#/components/schemas/RunList"
|
|
4473
|
+
400:
|
|
4474
|
+
description: Bad request
|
|
4475
|
+
401:
|
|
4476
|
+
description: Unauthorized
|
|
4477
|
+
404:
|
|
4478
|
+
description: Not found
|
|
4447
4479
|
/admin/collection/{collectionId}/interactions:
|
|
4448
4480
|
get:
|
|
4449
4481
|
tags:
|
|
@@ -14477,6 +14509,21 @@ paths:
|
|
|
14477
14509
|
required: false
|
|
14478
14510
|
schema:
|
|
14479
14511
|
type: string
|
|
14512
|
+
- name: qFields
|
|
14513
|
+
in: query
|
|
14514
|
+
required: false
|
|
14515
|
+
schema:
|
|
14516
|
+
type: string
|
|
14517
|
+
- name: dataFilter
|
|
14518
|
+
in: query
|
|
14519
|
+
required: false
|
|
14520
|
+
schema:
|
|
14521
|
+
type: object
|
|
14522
|
+
additionalProperties:
|
|
14523
|
+
type: array
|
|
14524
|
+
items:
|
|
14525
|
+
type: object
|
|
14526
|
+
additionalProperties: true
|
|
14480
14527
|
- name: authorId
|
|
14481
14528
|
in: query
|
|
14482
14529
|
required: false
|
|
@@ -20020,6 +20067,15 @@ components:
|
|
|
20020
20067
|
type: string
|
|
20021
20068
|
q:
|
|
20022
20069
|
type: string
|
|
20070
|
+
qFields:
|
|
20071
|
+
type: string
|
|
20072
|
+
dataFilter:
|
|
20073
|
+
type: object
|
|
20074
|
+
additionalProperties:
|
|
20075
|
+
type: array
|
|
20076
|
+
items:
|
|
20077
|
+
type: object
|
|
20078
|
+
additionalProperties: true
|
|
20023
20079
|
authorId:
|
|
20024
20080
|
type: string
|
|
20025
20081
|
parentType:
|
|
@@ -25250,6 +25306,8 @@ components:
|
|
|
25250
25306
|
properties:
|
|
25251
25307
|
entityId:
|
|
25252
25308
|
type: string
|
|
25309
|
+
trigger:
|
|
25310
|
+
$ref: "#/components/schemas/RunTrigger"
|
|
25253
25311
|
RunFlowSummary:
|
|
25254
25312
|
type: object
|
|
25255
25313
|
properties:
|
|
@@ -25265,6 +25323,8 @@ components:
|
|
|
25265
25323
|
type: number
|
|
25266
25324
|
status:
|
|
25267
25325
|
$ref: "#/components/schemas/RunStatus"
|
|
25326
|
+
runId:
|
|
25327
|
+
type: string
|
|
25268
25328
|
required:
|
|
25269
25329
|
- flowId
|
|
25270
25330
|
- direction
|
|
@@ -25272,6 +25332,209 @@ components:
|
|
|
25272
25332
|
- sent
|
|
25273
25333
|
- failed
|
|
25274
25334
|
- status
|
|
25335
|
+
CapturedRequest:
|
|
25336
|
+
type: object
|
|
25337
|
+
properties:
|
|
25338
|
+
transport:
|
|
25339
|
+
type: string
|
|
25340
|
+
method:
|
|
25341
|
+
type: string
|
|
25342
|
+
url:
|
|
25343
|
+
type: string
|
|
25344
|
+
headers:
|
|
25345
|
+
type: object
|
|
25346
|
+
additionalProperties:
|
|
25347
|
+
type: string
|
|
25348
|
+
partitionKey:
|
|
25349
|
+
type: string
|
|
25350
|
+
body: {}
|
|
25351
|
+
bodyBytes:
|
|
25352
|
+
type: number
|
|
25353
|
+
truncated:
|
|
25354
|
+
type: boolean
|
|
25355
|
+
required:
|
|
25356
|
+
- transport
|
|
25357
|
+
- method
|
|
25358
|
+
- url
|
|
25359
|
+
- headers
|
|
25360
|
+
- body
|
|
25361
|
+
- bodyBytes
|
|
25362
|
+
- truncated
|
|
25363
|
+
CapturedResponse:
|
|
25364
|
+
type: object
|
|
25365
|
+
properties:
|
|
25366
|
+
status:
|
|
25367
|
+
type: number
|
|
25368
|
+
ok:
|
|
25369
|
+
type: boolean
|
|
25370
|
+
headers:
|
|
25371
|
+
type: object
|
|
25372
|
+
additionalProperties:
|
|
25373
|
+
type: string
|
|
25374
|
+
body: {}
|
|
25375
|
+
bodyBytes:
|
|
25376
|
+
type: number
|
|
25377
|
+
truncated:
|
|
25378
|
+
type: boolean
|
|
25379
|
+
error:
|
|
25380
|
+
type: string
|
|
25381
|
+
required:
|
|
25382
|
+
- status
|
|
25383
|
+
- ok
|
|
25384
|
+
- headers
|
|
25385
|
+
- body
|
|
25386
|
+
- bodyBytes
|
|
25387
|
+
- truncated
|
|
25388
|
+
- error
|
|
25389
|
+
FlowRun:
|
|
25390
|
+
type: object
|
|
25391
|
+
properties:
|
|
25392
|
+
id:
|
|
25393
|
+
type: string
|
|
25394
|
+
flowId:
|
|
25395
|
+
type: string
|
|
25396
|
+
connectionId:
|
|
25397
|
+
type: string
|
|
25398
|
+
trigger:
|
|
25399
|
+
$ref: "#/components/schemas/RunTrigger"
|
|
25400
|
+
triggerEvent:
|
|
25401
|
+
type: string
|
|
25402
|
+
triggerEntityId:
|
|
25403
|
+
type: string
|
|
25404
|
+
status:
|
|
25405
|
+
$ref: "#/components/schemas/FlowRunStatus"
|
|
25406
|
+
records:
|
|
25407
|
+
type: number
|
|
25408
|
+
sent:
|
|
25409
|
+
type: number
|
|
25410
|
+
failed:
|
|
25411
|
+
type: number
|
|
25412
|
+
error:
|
|
25413
|
+
type: string
|
|
25414
|
+
correlationId:
|
|
25415
|
+
type: string
|
|
25416
|
+
captureLevel:
|
|
25417
|
+
$ref: "#/components/schemas/CaptureLevel"
|
|
25418
|
+
bodiesPurged:
|
|
25419
|
+
type: boolean
|
|
25420
|
+
startedAt:
|
|
25421
|
+
type: string
|
|
25422
|
+
completedAt:
|
|
25423
|
+
type: string
|
|
25424
|
+
durationMs:
|
|
25425
|
+
type: number
|
|
25426
|
+
required:
|
|
25427
|
+
- id
|
|
25428
|
+
- flowId
|
|
25429
|
+
- trigger
|
|
25430
|
+
- status
|
|
25431
|
+
- records
|
|
25432
|
+
- sent
|
|
25433
|
+
- failed
|
|
25434
|
+
- captureLevel
|
|
25435
|
+
- bodiesPurged
|
|
25436
|
+
- startedAt
|
|
25437
|
+
FlowRunItem:
|
|
25438
|
+
type: object
|
|
25439
|
+
properties:
|
|
25440
|
+
id:
|
|
25441
|
+
type: string
|
|
25442
|
+
runId:
|
|
25443
|
+
type: string
|
|
25444
|
+
entityType:
|
|
25445
|
+
type: string
|
|
25446
|
+
entityId:
|
|
25447
|
+
type: string
|
|
25448
|
+
entityLabel:
|
|
25449
|
+
type: string
|
|
25450
|
+
status:
|
|
25451
|
+
$ref: "#/components/schemas/FlowRunItemStatus"
|
|
25452
|
+
skipReason:
|
|
25453
|
+
type: string
|
|
25454
|
+
request:
|
|
25455
|
+
$ref: "#/components/schemas/CapturedRequest"
|
|
25456
|
+
response:
|
|
25457
|
+
$ref: "#/components/schemas/CapturedResponse"
|
|
25458
|
+
attempt:
|
|
25459
|
+
type: number
|
|
25460
|
+
durationMs:
|
|
25461
|
+
type: number
|
|
25462
|
+
createdAt:
|
|
25463
|
+
type: string
|
|
25464
|
+
required:
|
|
25465
|
+
- id
|
|
25466
|
+
- runId
|
|
25467
|
+
- entityType
|
|
25468
|
+
- status
|
|
25469
|
+
- attempt
|
|
25470
|
+
- createdAt
|
|
25471
|
+
ListRunsQuery:
|
|
25472
|
+
type: object
|
|
25473
|
+
properties:
|
|
25474
|
+
status:
|
|
25475
|
+
$ref: "#/components/schemas/FlowRunStatus"
|
|
25476
|
+
trigger:
|
|
25477
|
+
$ref: "#/components/schemas/RunTrigger"
|
|
25478
|
+
entityId:
|
|
25479
|
+
type: string
|
|
25480
|
+
limit:
|
|
25481
|
+
type: number
|
|
25482
|
+
cursor:
|
|
25483
|
+
type: string
|
|
25484
|
+
RunList:
|
|
25485
|
+
type: object
|
|
25486
|
+
properties:
|
|
25487
|
+
runs:
|
|
25488
|
+
type: object
|
|
25489
|
+
additionalProperties: true
|
|
25490
|
+
required:
|
|
25491
|
+
- runs
|
|
25492
|
+
ListRunItemsQuery:
|
|
25493
|
+
type: object
|
|
25494
|
+
properties:
|
|
25495
|
+
status:
|
|
25496
|
+
type: object
|
|
25497
|
+
additionalProperties: true
|
|
25498
|
+
RunItemList:
|
|
25499
|
+
type: object
|
|
25500
|
+
properties:
|
|
25501
|
+
items:
|
|
25502
|
+
type: object
|
|
25503
|
+
additionalProperties: true
|
|
25504
|
+
required:
|
|
25505
|
+
- items
|
|
25506
|
+
LoggingWindow:
|
|
25507
|
+
type: object
|
|
25508
|
+
properties:
|
|
25509
|
+
id:
|
|
25510
|
+
type: string
|
|
25511
|
+
connectionId:
|
|
25512
|
+
type: string
|
|
25513
|
+
level:
|
|
25514
|
+
$ref: "#/components/schemas/CaptureLevel"
|
|
25515
|
+
enabledBy:
|
|
25516
|
+
type: string
|
|
25517
|
+
enabledAt:
|
|
25518
|
+
type: string
|
|
25519
|
+
expiresAt:
|
|
25520
|
+
type: string
|
|
25521
|
+
canceledAt:
|
|
25522
|
+
type: string
|
|
25523
|
+
required:
|
|
25524
|
+
- id
|
|
25525
|
+
- connectionId
|
|
25526
|
+
- level
|
|
25527
|
+
- enabledAt
|
|
25528
|
+
SetLoggingInput:
|
|
25529
|
+
type: object
|
|
25530
|
+
properties:
|
|
25531
|
+
ttlMinutes:
|
|
25532
|
+
type: number
|
|
25533
|
+
level:
|
|
25534
|
+
type: string
|
|
25535
|
+
enum:
|
|
25536
|
+
- full
|
|
25537
|
+
- errors_only
|
|
25275
25538
|
RunFlowEnqueued:
|
|
25276
25539
|
type: object
|
|
25277
25540
|
properties:
|
|
@@ -25410,6 +25673,33 @@ components:
|
|
|
25410
25673
|
- none
|
|
25411
25674
|
UpdateFlowInput:
|
|
25412
25675
|
$ref: "#/components/schemas/CreateFlowInput"
|
|
25676
|
+
RunTrigger:
|
|
25677
|
+
type: string
|
|
25678
|
+
enum:
|
|
25679
|
+
- manual
|
|
25680
|
+
- event
|
|
25681
|
+
- schedule
|
|
25682
|
+
- test
|
|
25683
|
+
FlowRunStatus:
|
|
25684
|
+
type: string
|
|
25685
|
+
enum:
|
|
25686
|
+
- running
|
|
25687
|
+
- success
|
|
25688
|
+
- partial
|
|
25689
|
+
- failed
|
|
25690
|
+
- skipped
|
|
25691
|
+
FlowRunItemStatus:
|
|
25692
|
+
type: string
|
|
25693
|
+
enum:
|
|
25694
|
+
- sent
|
|
25695
|
+
- failed
|
|
25696
|
+
- skipped
|
|
25697
|
+
CaptureLevel:
|
|
25698
|
+
type: string
|
|
25699
|
+
enum:
|
|
25700
|
+
- metadata
|
|
25701
|
+
- errors_only
|
|
25702
|
+
- full
|
|
25413
25703
|
RunFlowResult:
|
|
25414
25704
|
anyOf:
|
|
25415
25705
|
- $ref: "#/components/schemas/RunFlowSummary"
|
|
@@ -620,8 +620,19 @@ export interface RecordListQueryParams extends ListQueryParams {
|
|
|
620
620
|
variantId?: string;
|
|
621
621
|
/** Filter by batchId (indexed flat column) */
|
|
622
622
|
batchId?: string;
|
|
623
|
-
/** Full-text filter on data.label (
|
|
623
|
+
/** Full-text filter (case-insensitive substring) on data.label — or on `qFields` (admin) */
|
|
624
624
|
q?: string;
|
|
625
|
+
/**
|
|
626
|
+
* Admin only: which top-level `data` keys `q` searches (comma-separated, max 5).
|
|
627
|
+
* Default `label`. Example: `'value,label'`.
|
|
628
|
+
*/
|
|
629
|
+
qFields?: string;
|
|
630
|
+
/**
|
|
631
|
+
* Admin only: filter on top-level `data` keys. Each value is an exact match, an
|
|
632
|
+
* `in:a,b,c` list, or an array of values (any match). Max 10 keys.
|
|
633
|
+
* Example: `{ versionId: 'v1', zone: 'in:on_pack,unclear' }`.
|
|
634
|
+
*/
|
|
635
|
+
dataFilter?: Record<string, string | string[]>;
|
|
625
636
|
authorId?: string;
|
|
626
637
|
parentType?: string;
|
|
627
638
|
parentId?: string;
|
|
@@ -87,6 +87,8 @@ export interface FlowList {
|
|
|
87
87
|
export interface RunFlowInput {
|
|
88
88
|
/** Run for a single source entity; omit for the flow's scheduled gather. */
|
|
89
89
|
entityId?: string;
|
|
90
|
+
/** Trigger label recorded on the run (e.g. 'test' for a test send). Default 'manual'. */
|
|
91
|
+
trigger?: RunTrigger;
|
|
90
92
|
}
|
|
91
93
|
/** Inline (synchronous) run summary. */
|
|
92
94
|
export interface RunFlowSummary {
|
|
@@ -96,6 +98,104 @@ export interface RunFlowSummary {
|
|
|
96
98
|
sent: number;
|
|
97
99
|
failed: number;
|
|
98
100
|
status: RunStatus;
|
|
101
|
+
/** Id of the persisted run row (deep-link into its detail). */
|
|
102
|
+
runId?: string;
|
|
103
|
+
}
|
|
104
|
+
export type RunTrigger = 'manual' | 'event' | 'schedule' | 'test';
|
|
105
|
+
export type FlowRunStatus = 'running' | 'success' | 'partial' | 'failed' | 'skipped';
|
|
106
|
+
export type FlowRunItemStatus = 'sent' | 'failed' | 'skipped';
|
|
107
|
+
export type CaptureLevel = 'metadata' | 'errors_only' | 'full';
|
|
108
|
+
/** A redacted outbound request as captured in a run item (secrets masked, body size-capped). */
|
|
109
|
+
export interface CapturedRequest {
|
|
110
|
+
transport: string;
|
|
111
|
+
method: string;
|
|
112
|
+
url: string;
|
|
113
|
+
headers: Record<string, string>;
|
|
114
|
+
partitionKey?: string;
|
|
115
|
+
body: unknown;
|
|
116
|
+
bodyBytes: number;
|
|
117
|
+
truncated: boolean;
|
|
118
|
+
}
|
|
119
|
+
/** A redacted response as captured in a run item. */
|
|
120
|
+
export interface CapturedResponse {
|
|
121
|
+
status: number | null;
|
|
122
|
+
ok: boolean | null;
|
|
123
|
+
headers: Record<string, string>;
|
|
124
|
+
body: unknown;
|
|
125
|
+
bodyBytes: number;
|
|
126
|
+
truncated: boolean;
|
|
127
|
+
error: string | null;
|
|
128
|
+
}
|
|
129
|
+
/** One run of a flow. */
|
|
130
|
+
export interface FlowRun {
|
|
131
|
+
id: string;
|
|
132
|
+
flowId: string;
|
|
133
|
+
connectionId?: string | null;
|
|
134
|
+
trigger: RunTrigger;
|
|
135
|
+
triggerEvent?: string | null;
|
|
136
|
+
triggerEntityId?: string | null;
|
|
137
|
+
status: FlowRunStatus;
|
|
138
|
+
records: number;
|
|
139
|
+
sent: number;
|
|
140
|
+
failed: number;
|
|
141
|
+
error?: string | null;
|
|
142
|
+
correlationId?: string | null;
|
|
143
|
+
captureLevel: CaptureLevel;
|
|
144
|
+
bodiesPurged: boolean;
|
|
145
|
+
startedAt: string;
|
|
146
|
+
completedAt?: string | null;
|
|
147
|
+
durationMs?: number | null;
|
|
148
|
+
}
|
|
149
|
+
/** One record's attempt within a run (request/response present only when captured at 'full'). */
|
|
150
|
+
export interface FlowRunItem {
|
|
151
|
+
id: string;
|
|
152
|
+
runId: string;
|
|
153
|
+
entityType: string;
|
|
154
|
+
entityId?: string | null;
|
|
155
|
+
entityLabel?: string | null;
|
|
156
|
+
status: FlowRunItemStatus;
|
|
157
|
+
skipReason?: string | null;
|
|
158
|
+
request?: CapturedRequest | null;
|
|
159
|
+
response?: CapturedResponse | null;
|
|
160
|
+
attempt: number;
|
|
161
|
+
durationMs?: number | null;
|
|
162
|
+
createdAt: string;
|
|
163
|
+
}
|
|
164
|
+
export interface ListRunsQuery {
|
|
165
|
+
status?: FlowRunStatus;
|
|
166
|
+
trigger?: RunTrigger;
|
|
167
|
+
entityId?: string;
|
|
168
|
+
limit?: number;
|
|
169
|
+
cursor?: string;
|
|
170
|
+
}
|
|
171
|
+
export interface RunList {
|
|
172
|
+
runs: FlowRun[];
|
|
173
|
+
nextCursor?: string;
|
|
174
|
+
}
|
|
175
|
+
export interface ListRunItemsQuery {
|
|
176
|
+
status?: FlowRunItemStatus;
|
|
177
|
+
limit?: number;
|
|
178
|
+
cursor?: string;
|
|
179
|
+
}
|
|
180
|
+
export interface RunItemList {
|
|
181
|
+
items: FlowRunItem[];
|
|
182
|
+
nextCursor?: string;
|
|
183
|
+
}
|
|
184
|
+
/** A per-connection enhanced-logging window (full capture) while active. */
|
|
185
|
+
export interface LoggingWindow {
|
|
186
|
+
id: string;
|
|
187
|
+
connectionId: string;
|
|
188
|
+
level: CaptureLevel;
|
|
189
|
+
enabledBy?: string | null;
|
|
190
|
+
enabledAt: string;
|
|
191
|
+
expiresAt?: string | null;
|
|
192
|
+
canceledAt?: string | null;
|
|
193
|
+
}
|
|
194
|
+
export interface SetLoggingInput {
|
|
195
|
+
/** Minutes until the window auto-expires; omit for on-until-cancelled. */
|
|
196
|
+
ttlMinutes?: number;
|
|
197
|
+
/** Capture level while active (default 'full'). */
|
|
198
|
+
level?: 'full' | 'errors_only';
|
|
99
199
|
}
|
|
100
200
|
/** Response when a run is enqueued (?async=true). */
|
|
101
201
|
export interface RunFlowEnqueued {
|
package/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.32 | Generated: 2026-10-01T17:18:44.658Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -6562,6 +6562,7 @@ interface FlowList {
|
|
|
6562
6562
|
```typescript
|
|
6563
6563
|
interface RunFlowInput {
|
|
6564
6564
|
entityId?: string
|
|
6565
|
+
trigger?: RunTrigger
|
|
6565
6566
|
}
|
|
6566
6567
|
```
|
|
6567
6568
|
|
|
@@ -6574,6 +6575,128 @@ interface RunFlowSummary {
|
|
|
6574
6575
|
sent: number
|
|
6575
6576
|
failed: number
|
|
6576
6577
|
status: RunStatus
|
|
6578
|
+
runId?: string
|
|
6579
|
+
}
|
|
6580
|
+
```
|
|
6581
|
+
|
|
6582
|
+
**CapturedRequest** (interface)
|
|
6583
|
+
```typescript
|
|
6584
|
+
interface CapturedRequest {
|
|
6585
|
+
transport: string
|
|
6586
|
+
method: string
|
|
6587
|
+
url: string
|
|
6588
|
+
headers: Record<string, string>
|
|
6589
|
+
partitionKey?: string
|
|
6590
|
+
body: unknown
|
|
6591
|
+
bodyBytes: number
|
|
6592
|
+
truncated: boolean
|
|
6593
|
+
}
|
|
6594
|
+
```
|
|
6595
|
+
|
|
6596
|
+
**CapturedResponse** (interface)
|
|
6597
|
+
```typescript
|
|
6598
|
+
interface CapturedResponse {
|
|
6599
|
+
status: number | null
|
|
6600
|
+
ok: boolean | null
|
|
6601
|
+
headers: Record<string, string>
|
|
6602
|
+
body: unknown
|
|
6603
|
+
bodyBytes: number
|
|
6604
|
+
truncated: boolean
|
|
6605
|
+
error: string | null
|
|
6606
|
+
}
|
|
6607
|
+
```
|
|
6608
|
+
|
|
6609
|
+
**FlowRun** (interface)
|
|
6610
|
+
```typescript
|
|
6611
|
+
interface FlowRun {
|
|
6612
|
+
id: string
|
|
6613
|
+
flowId: string
|
|
6614
|
+
connectionId?: string | null
|
|
6615
|
+
trigger: RunTrigger
|
|
6616
|
+
triggerEvent?: string | null
|
|
6617
|
+
triggerEntityId?: string | null
|
|
6618
|
+
status: FlowRunStatus
|
|
6619
|
+
records: number
|
|
6620
|
+
sent: number
|
|
6621
|
+
failed: number
|
|
6622
|
+
error?: string | null
|
|
6623
|
+
correlationId?: string | null
|
|
6624
|
+
captureLevel: CaptureLevel
|
|
6625
|
+
bodiesPurged: boolean
|
|
6626
|
+
startedAt: string
|
|
6627
|
+
completedAt?: string | null
|
|
6628
|
+
durationMs?: number | null
|
|
6629
|
+
}
|
|
6630
|
+
```
|
|
6631
|
+
|
|
6632
|
+
**FlowRunItem** (interface)
|
|
6633
|
+
```typescript
|
|
6634
|
+
interface FlowRunItem {
|
|
6635
|
+
id: string
|
|
6636
|
+
runId: string
|
|
6637
|
+
entityType: string
|
|
6638
|
+
entityId?: string | null
|
|
6639
|
+
entityLabel?: string | null
|
|
6640
|
+
status: FlowRunItemStatus
|
|
6641
|
+
skipReason?: string | null
|
|
6642
|
+
request?: CapturedRequest | null
|
|
6643
|
+
response?: CapturedResponse | null
|
|
6644
|
+
attempt: number
|
|
6645
|
+
durationMs?: number | null
|
|
6646
|
+
createdAt: string
|
|
6647
|
+
}
|
|
6648
|
+
```
|
|
6649
|
+
|
|
6650
|
+
**ListRunsQuery** (interface)
|
|
6651
|
+
```typescript
|
|
6652
|
+
interface ListRunsQuery {
|
|
6653
|
+
status?: FlowRunStatus
|
|
6654
|
+
trigger?: RunTrigger
|
|
6655
|
+
entityId?: string
|
|
6656
|
+
limit?: number
|
|
6657
|
+
cursor?: string
|
|
6658
|
+
}
|
|
6659
|
+
```
|
|
6660
|
+
|
|
6661
|
+
**RunList** (interface)
|
|
6662
|
+
```typescript
|
|
6663
|
+
interface RunList {
|
|
6664
|
+
runs: FlowRun[]; nextCursor?: string
|
|
6665
|
+
}
|
|
6666
|
+
```
|
|
6667
|
+
|
|
6668
|
+
**ListRunItemsQuery** (interface)
|
|
6669
|
+
```typescript
|
|
6670
|
+
interface ListRunItemsQuery {
|
|
6671
|
+
status?: FlowRunItemStatus; limit?: number; cursor?: string
|
|
6672
|
+
}
|
|
6673
|
+
```
|
|
6674
|
+
|
|
6675
|
+
**RunItemList** (interface)
|
|
6676
|
+
```typescript
|
|
6677
|
+
interface RunItemList {
|
|
6678
|
+
items: FlowRunItem[]; nextCursor?: string
|
|
6679
|
+
}
|
|
6680
|
+
```
|
|
6681
|
+
|
|
6682
|
+
**LoggingWindow** (interface)
|
|
6683
|
+
```typescript
|
|
6684
|
+
interface LoggingWindow {
|
|
6685
|
+
id: string
|
|
6686
|
+
connectionId: string
|
|
6687
|
+
level: CaptureLevel
|
|
6688
|
+
enabledBy?: string | null
|
|
6689
|
+
enabledAt: string
|
|
6690
|
+
expiresAt?: string | null
|
|
6691
|
+
canceledAt?: string | null
|
|
6692
|
+
}
|
|
6693
|
+
```
|
|
6694
|
+
|
|
6695
|
+
**SetLoggingInput** (interface)
|
|
6696
|
+
```typescript
|
|
6697
|
+
interface SetLoggingInput {
|
|
6698
|
+
ttlMinutes?: number
|
|
6699
|
+
level?: 'full' | 'errors_only'
|
|
6577
6700
|
}
|
|
6578
6701
|
```
|
|
6579
6702
|
|
|
@@ -6660,6 +6783,14 @@ interface RecordTypesResponse {
|
|
|
6660
6783
|
|
|
6661
6784
|
**UpdateFlowInput** = `Partial<Omit<CreateFlowInput, 'direction'>> & {`
|
|
6662
6785
|
|
|
6786
|
+
**RunTrigger** = `'manual' | 'event' | 'schedule' | 'test'`
|
|
6787
|
+
|
|
6788
|
+
**FlowRunStatus** = `'running' | 'success' | 'partial' | 'failed' | 'skipped'`
|
|
6789
|
+
|
|
6790
|
+
**FlowRunItemStatus** = `'sent' | 'failed' | 'skipped'`
|
|
6791
|
+
|
|
6792
|
+
**CaptureLevel** = `'metadata' | 'errors_only' | 'full'`
|
|
6793
|
+
|
|
6663
6794
|
**RunFlowResult** = `RunFlowSummary | RunFlowEnqueued`
|
|
6664
6795
|
|
|
6665
6796
|
### interaction
|
|
@@ -10850,6 +10981,27 @@ Type guard: the run executed inline and returned a summary.
|
|
|
10850
10981
|
**isRunEnqueued**(r: RunFlowResult) → `r is RunFlowEnqueued`
|
|
10851
10982
|
Type guard: the run was enqueued (async).
|
|
10852
10983
|
|
|
10984
|
+
**listRuns**(collectionId: string, flowId: string, query: ListRunsQuery = {}) → `Promise<RunList>`
|
|
10985
|
+
List a flow's runs, newest first. GET /integrations/flows/:id/runs
|
|
10986
|
+
|
|
10987
|
+
**getRun**(collectionId: string, flowId: string, runId: string) → `Promise<FlowRun>`
|
|
10988
|
+
Get one run's summary. GET /integrations/flows/:id/runs/:runId
|
|
10989
|
+
|
|
10990
|
+
**listRunItems**(collectionId: string, flowId: string, runId: string, query: ListRunItemsQuery = {}) → `Promise<RunItemList>`
|
|
10991
|
+
List a run's per-record items. GET /integrations/flows/:id/runs/:runId/items `request`/`response` are populated only for items captured while enhanced logging was active (and before the 24h body purge).
|
|
10992
|
+
|
|
10993
|
+
**listEntityRuns**(collectionId: string, entityId: string, query: { limit?: number } = {}) → `Promise<RunList>`
|
|
10994
|
+
Every run touching an entity (e.g. a product), across flows. GET /integrations/runs/entity/:entityId
|
|
10995
|
+
|
|
10996
|
+
**getLogging**(collectionId: string, connectionId: string) → `Promise<`
|
|
10997
|
+
Is enhanced logging active for a connection? GET /integrations/logging/:connectionId
|
|
10998
|
+
|
|
10999
|
+
**setLogging**(collectionId: string, connectionId: string, input: SetLoggingInput = {}) → `Promise<`
|
|
11000
|
+
Enable enhanced logging. POST /integrations/logging/:connectionId (omit ttlMinutes = until cancelled)
|
|
11001
|
+
|
|
11002
|
+
**cancelLogging**(collectionId: string, connectionId: string) → `Promise<`
|
|
11003
|
+
Cancel enhanced logging now. DELETE /integrations/logging/:connectionId
|
|
11004
|
+
|
|
10853
11005
|
### interactions
|
|
10854
11006
|
|
|
10855
11007
|
**query**(collectionId: string,
|
package/openapi.yaml
CHANGED
|
@@ -4444,6 +4444,38 @@ paths:
|
|
|
4444
4444
|
description: Unauthorized
|
|
4445
4445
|
404:
|
|
4446
4446
|
description: Not found
|
|
4447
|
+
/admin/collection/{collectionId}/integrations/runs/entity/{entityId}:
|
|
4448
|
+
get:
|
|
4449
|
+
tags:
|
|
4450
|
+
- integrations
|
|
4451
|
+
summary: Every run touching an entity (e.g.
|
|
4452
|
+
operationId: integrations_listEntityRuns
|
|
4453
|
+
security:
|
|
4454
|
+
- bearerAuth: []
|
|
4455
|
+
parameters:
|
|
4456
|
+
- name: collectionId
|
|
4457
|
+
in: path
|
|
4458
|
+
required: true
|
|
4459
|
+
schema:
|
|
4460
|
+
type: string
|
|
4461
|
+
- name: entityId
|
|
4462
|
+
in: path
|
|
4463
|
+
required: true
|
|
4464
|
+
schema:
|
|
4465
|
+
type: string
|
|
4466
|
+
responses:
|
|
4467
|
+
200:
|
|
4468
|
+
description: Success
|
|
4469
|
+
content:
|
|
4470
|
+
application/json:
|
|
4471
|
+
schema:
|
|
4472
|
+
$ref: "#/components/schemas/RunList"
|
|
4473
|
+
400:
|
|
4474
|
+
description: Bad request
|
|
4475
|
+
401:
|
|
4476
|
+
description: Unauthorized
|
|
4477
|
+
404:
|
|
4478
|
+
description: Not found
|
|
4447
4479
|
/admin/collection/{collectionId}/interactions:
|
|
4448
4480
|
get:
|
|
4449
4481
|
tags:
|
|
@@ -14477,6 +14509,21 @@ paths:
|
|
|
14477
14509
|
required: false
|
|
14478
14510
|
schema:
|
|
14479
14511
|
type: string
|
|
14512
|
+
- name: qFields
|
|
14513
|
+
in: query
|
|
14514
|
+
required: false
|
|
14515
|
+
schema:
|
|
14516
|
+
type: string
|
|
14517
|
+
- name: dataFilter
|
|
14518
|
+
in: query
|
|
14519
|
+
required: false
|
|
14520
|
+
schema:
|
|
14521
|
+
type: object
|
|
14522
|
+
additionalProperties:
|
|
14523
|
+
type: array
|
|
14524
|
+
items:
|
|
14525
|
+
type: object
|
|
14526
|
+
additionalProperties: true
|
|
14480
14527
|
- name: authorId
|
|
14481
14528
|
in: query
|
|
14482
14529
|
required: false
|
|
@@ -20020,6 +20067,15 @@ components:
|
|
|
20020
20067
|
type: string
|
|
20021
20068
|
q:
|
|
20022
20069
|
type: string
|
|
20070
|
+
qFields:
|
|
20071
|
+
type: string
|
|
20072
|
+
dataFilter:
|
|
20073
|
+
type: object
|
|
20074
|
+
additionalProperties:
|
|
20075
|
+
type: array
|
|
20076
|
+
items:
|
|
20077
|
+
type: object
|
|
20078
|
+
additionalProperties: true
|
|
20023
20079
|
authorId:
|
|
20024
20080
|
type: string
|
|
20025
20081
|
parentType:
|
|
@@ -25250,6 +25306,8 @@ components:
|
|
|
25250
25306
|
properties:
|
|
25251
25307
|
entityId:
|
|
25252
25308
|
type: string
|
|
25309
|
+
trigger:
|
|
25310
|
+
$ref: "#/components/schemas/RunTrigger"
|
|
25253
25311
|
RunFlowSummary:
|
|
25254
25312
|
type: object
|
|
25255
25313
|
properties:
|
|
@@ -25265,6 +25323,8 @@ components:
|
|
|
25265
25323
|
type: number
|
|
25266
25324
|
status:
|
|
25267
25325
|
$ref: "#/components/schemas/RunStatus"
|
|
25326
|
+
runId:
|
|
25327
|
+
type: string
|
|
25268
25328
|
required:
|
|
25269
25329
|
- flowId
|
|
25270
25330
|
- direction
|
|
@@ -25272,6 +25332,209 @@ components:
|
|
|
25272
25332
|
- sent
|
|
25273
25333
|
- failed
|
|
25274
25334
|
- status
|
|
25335
|
+
CapturedRequest:
|
|
25336
|
+
type: object
|
|
25337
|
+
properties:
|
|
25338
|
+
transport:
|
|
25339
|
+
type: string
|
|
25340
|
+
method:
|
|
25341
|
+
type: string
|
|
25342
|
+
url:
|
|
25343
|
+
type: string
|
|
25344
|
+
headers:
|
|
25345
|
+
type: object
|
|
25346
|
+
additionalProperties:
|
|
25347
|
+
type: string
|
|
25348
|
+
partitionKey:
|
|
25349
|
+
type: string
|
|
25350
|
+
body: {}
|
|
25351
|
+
bodyBytes:
|
|
25352
|
+
type: number
|
|
25353
|
+
truncated:
|
|
25354
|
+
type: boolean
|
|
25355
|
+
required:
|
|
25356
|
+
- transport
|
|
25357
|
+
- method
|
|
25358
|
+
- url
|
|
25359
|
+
- headers
|
|
25360
|
+
- body
|
|
25361
|
+
- bodyBytes
|
|
25362
|
+
- truncated
|
|
25363
|
+
CapturedResponse:
|
|
25364
|
+
type: object
|
|
25365
|
+
properties:
|
|
25366
|
+
status:
|
|
25367
|
+
type: number
|
|
25368
|
+
ok:
|
|
25369
|
+
type: boolean
|
|
25370
|
+
headers:
|
|
25371
|
+
type: object
|
|
25372
|
+
additionalProperties:
|
|
25373
|
+
type: string
|
|
25374
|
+
body: {}
|
|
25375
|
+
bodyBytes:
|
|
25376
|
+
type: number
|
|
25377
|
+
truncated:
|
|
25378
|
+
type: boolean
|
|
25379
|
+
error:
|
|
25380
|
+
type: string
|
|
25381
|
+
required:
|
|
25382
|
+
- status
|
|
25383
|
+
- ok
|
|
25384
|
+
- headers
|
|
25385
|
+
- body
|
|
25386
|
+
- bodyBytes
|
|
25387
|
+
- truncated
|
|
25388
|
+
- error
|
|
25389
|
+
FlowRun:
|
|
25390
|
+
type: object
|
|
25391
|
+
properties:
|
|
25392
|
+
id:
|
|
25393
|
+
type: string
|
|
25394
|
+
flowId:
|
|
25395
|
+
type: string
|
|
25396
|
+
connectionId:
|
|
25397
|
+
type: string
|
|
25398
|
+
trigger:
|
|
25399
|
+
$ref: "#/components/schemas/RunTrigger"
|
|
25400
|
+
triggerEvent:
|
|
25401
|
+
type: string
|
|
25402
|
+
triggerEntityId:
|
|
25403
|
+
type: string
|
|
25404
|
+
status:
|
|
25405
|
+
$ref: "#/components/schemas/FlowRunStatus"
|
|
25406
|
+
records:
|
|
25407
|
+
type: number
|
|
25408
|
+
sent:
|
|
25409
|
+
type: number
|
|
25410
|
+
failed:
|
|
25411
|
+
type: number
|
|
25412
|
+
error:
|
|
25413
|
+
type: string
|
|
25414
|
+
correlationId:
|
|
25415
|
+
type: string
|
|
25416
|
+
captureLevel:
|
|
25417
|
+
$ref: "#/components/schemas/CaptureLevel"
|
|
25418
|
+
bodiesPurged:
|
|
25419
|
+
type: boolean
|
|
25420
|
+
startedAt:
|
|
25421
|
+
type: string
|
|
25422
|
+
completedAt:
|
|
25423
|
+
type: string
|
|
25424
|
+
durationMs:
|
|
25425
|
+
type: number
|
|
25426
|
+
required:
|
|
25427
|
+
- id
|
|
25428
|
+
- flowId
|
|
25429
|
+
- trigger
|
|
25430
|
+
- status
|
|
25431
|
+
- records
|
|
25432
|
+
- sent
|
|
25433
|
+
- failed
|
|
25434
|
+
- captureLevel
|
|
25435
|
+
- bodiesPurged
|
|
25436
|
+
- startedAt
|
|
25437
|
+
FlowRunItem:
|
|
25438
|
+
type: object
|
|
25439
|
+
properties:
|
|
25440
|
+
id:
|
|
25441
|
+
type: string
|
|
25442
|
+
runId:
|
|
25443
|
+
type: string
|
|
25444
|
+
entityType:
|
|
25445
|
+
type: string
|
|
25446
|
+
entityId:
|
|
25447
|
+
type: string
|
|
25448
|
+
entityLabel:
|
|
25449
|
+
type: string
|
|
25450
|
+
status:
|
|
25451
|
+
$ref: "#/components/schemas/FlowRunItemStatus"
|
|
25452
|
+
skipReason:
|
|
25453
|
+
type: string
|
|
25454
|
+
request:
|
|
25455
|
+
$ref: "#/components/schemas/CapturedRequest"
|
|
25456
|
+
response:
|
|
25457
|
+
$ref: "#/components/schemas/CapturedResponse"
|
|
25458
|
+
attempt:
|
|
25459
|
+
type: number
|
|
25460
|
+
durationMs:
|
|
25461
|
+
type: number
|
|
25462
|
+
createdAt:
|
|
25463
|
+
type: string
|
|
25464
|
+
required:
|
|
25465
|
+
- id
|
|
25466
|
+
- runId
|
|
25467
|
+
- entityType
|
|
25468
|
+
- status
|
|
25469
|
+
- attempt
|
|
25470
|
+
- createdAt
|
|
25471
|
+
ListRunsQuery:
|
|
25472
|
+
type: object
|
|
25473
|
+
properties:
|
|
25474
|
+
status:
|
|
25475
|
+
$ref: "#/components/schemas/FlowRunStatus"
|
|
25476
|
+
trigger:
|
|
25477
|
+
$ref: "#/components/schemas/RunTrigger"
|
|
25478
|
+
entityId:
|
|
25479
|
+
type: string
|
|
25480
|
+
limit:
|
|
25481
|
+
type: number
|
|
25482
|
+
cursor:
|
|
25483
|
+
type: string
|
|
25484
|
+
RunList:
|
|
25485
|
+
type: object
|
|
25486
|
+
properties:
|
|
25487
|
+
runs:
|
|
25488
|
+
type: object
|
|
25489
|
+
additionalProperties: true
|
|
25490
|
+
required:
|
|
25491
|
+
- runs
|
|
25492
|
+
ListRunItemsQuery:
|
|
25493
|
+
type: object
|
|
25494
|
+
properties:
|
|
25495
|
+
status:
|
|
25496
|
+
type: object
|
|
25497
|
+
additionalProperties: true
|
|
25498
|
+
RunItemList:
|
|
25499
|
+
type: object
|
|
25500
|
+
properties:
|
|
25501
|
+
items:
|
|
25502
|
+
type: object
|
|
25503
|
+
additionalProperties: true
|
|
25504
|
+
required:
|
|
25505
|
+
- items
|
|
25506
|
+
LoggingWindow:
|
|
25507
|
+
type: object
|
|
25508
|
+
properties:
|
|
25509
|
+
id:
|
|
25510
|
+
type: string
|
|
25511
|
+
connectionId:
|
|
25512
|
+
type: string
|
|
25513
|
+
level:
|
|
25514
|
+
$ref: "#/components/schemas/CaptureLevel"
|
|
25515
|
+
enabledBy:
|
|
25516
|
+
type: string
|
|
25517
|
+
enabledAt:
|
|
25518
|
+
type: string
|
|
25519
|
+
expiresAt:
|
|
25520
|
+
type: string
|
|
25521
|
+
canceledAt:
|
|
25522
|
+
type: string
|
|
25523
|
+
required:
|
|
25524
|
+
- id
|
|
25525
|
+
- connectionId
|
|
25526
|
+
- level
|
|
25527
|
+
- enabledAt
|
|
25528
|
+
SetLoggingInput:
|
|
25529
|
+
type: object
|
|
25530
|
+
properties:
|
|
25531
|
+
ttlMinutes:
|
|
25532
|
+
type: number
|
|
25533
|
+
level:
|
|
25534
|
+
type: string
|
|
25535
|
+
enum:
|
|
25536
|
+
- full
|
|
25537
|
+
- errors_only
|
|
25275
25538
|
RunFlowEnqueued:
|
|
25276
25539
|
type: object
|
|
25277
25540
|
properties:
|
|
@@ -25410,6 +25673,33 @@ components:
|
|
|
25410
25673
|
- none
|
|
25411
25674
|
UpdateFlowInput:
|
|
25412
25675
|
$ref: "#/components/schemas/CreateFlowInput"
|
|
25676
|
+
RunTrigger:
|
|
25677
|
+
type: string
|
|
25678
|
+
enum:
|
|
25679
|
+
- manual
|
|
25680
|
+
- event
|
|
25681
|
+
- schedule
|
|
25682
|
+
- test
|
|
25683
|
+
FlowRunStatus:
|
|
25684
|
+
type: string
|
|
25685
|
+
enum:
|
|
25686
|
+
- running
|
|
25687
|
+
- success
|
|
25688
|
+
- partial
|
|
25689
|
+
- failed
|
|
25690
|
+
- skipped
|
|
25691
|
+
FlowRunItemStatus:
|
|
25692
|
+
type: string
|
|
25693
|
+
enum:
|
|
25694
|
+
- sent
|
|
25695
|
+
- failed
|
|
25696
|
+
- skipped
|
|
25697
|
+
CaptureLevel:
|
|
25698
|
+
type: string
|
|
25699
|
+
enum:
|
|
25700
|
+
- metadata
|
|
25701
|
+
- errors_only
|
|
25702
|
+
- full
|
|
25413
25703
|
RunFlowResult:
|
|
25414
25704
|
anyOf:
|
|
25415
25705
|
- $ref: "#/components/schemas/RunFlowSummary"
|