@oomol-lab/open-flow 0.1.0-alpha.9 → 0.1.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/browser/createResourceDialog-BkZns-oZ.js +504 -0
- package/dist/browser/diagnostics-giPSzyMo.js +9346 -0
- package/dist/browser/{dist-DhsGR_K3.js → dist-3Mj8q8Pr.js} +27 -27
- package/dist/browser/{dist-n9WmBm5w.js → dist-BKuSVKCC.js} +1 -1
- package/dist/browser/{dist-DQVavPcf.js → dist-BMqL-qR5.js} +469 -903
- package/dist/browser/{dist-D5mdziGP.js → dist-BN4ZCyOB.js} +9 -9
- package/dist/browser/{dist-CVtP-E2c.js → dist-BpopSHwP.js} +1 -1
- package/dist/browser/{dist-B0Q2Mn0n.js → dist-CJpzJrLM.js} +191 -191
- package/dist/browser/{dist-DXgEYMFx.js → dist-CPuF50D9.js} +196 -196
- package/dist/browser/{dist-CUkceEvN.js → dist-CUSrALSX.js} +113 -113
- package/dist/browser/dist-CeSZ2xSM.js +444 -0
- package/dist/browser/{dist-Bc9TvHYl.js → dist-DUzA0Ukh.js} +20 -20
- package/dist/browser/{dist-DWzdGVm9.js → dist-DWADUsVB.js} +74 -74
- package/dist/browser/{esm-YIGXG-Js.js → esm-B_PbUobB.js} +13 -13
- package/dist/browser/flow-authoring-node.d.ts +4 -2
- package/dist/browser/flow-authoring.d.ts +2 -1
- package/dist/browser/flow-authoring.js +400 -100
- package/dist/browser/flow-change.d.ts +9 -4
- package/dist/browser/flow-change.js +49 -46
- package/dist/browser/{flowRunInputEditorStore-DXOyyY7o.js → flowRunInputEditorStore-BeyUSWpO.js} +1644 -908
- package/dist/browser/{flowWorkspace-D7-rBA1-.js → flowWorkspace-DAMLVMcF.js} +18416 -16444
- package/dist/browser/getPseudoElementBounds-ESJExRFX.js +7642 -0
- package/dist/browser/languages-DgJehE1g.js +62 -0
- package/dist/browser/lib-C5Ipyfps.js +7856 -0
- package/dist/browser/licenses.md +119 -1
- package/dist/browser/main-DmjVyuWr.js +76 -0
- package/dist/browser/{markdownContent-ColGUxHy.js → markdownContent-DdlIRN3_.js} +4811 -4795
- package/dist/browser/theme.css +63 -0
- package/dist/browser/theme.css.d.ts +1 -0
- package/dist/browser/typeScriptSession-mPCiA9sV.js +2579 -0
- package/dist/browser/workbench-contract.d.ts +2 -1
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.d.ts +46 -1
- package/dist/browser/workbench.js +1132 -1474
- package/dist/browser/workbenchSelect-B2s1HV-Y.js +1374 -0
- package/dist/common/connector-action.d.ts +6 -0
- package/dist/common/connector-action.js +37 -29
- package/dist/common/control-api-conformance.js +80 -29
- package/dist/common/control-api-errors.d.ts +24 -0
- package/dist/common/control-api.d.ts +54 -7
- package/dist/common/control-api.js +226 -95
- package/dist/common/flow-encoding.d.ts +2 -2
- package/dist/common/flow-encoding.js +4 -1
- package/dist/common/flow-semantics.d.ts +3 -0
- package/dist/common/flow-semantics.js +939 -851
- package/dist/common/integration-trigger.d.ts +1 -0
- package/dist/common/licenses.md +1 -25
- package/dist/common/localization.d.ts +21 -0
- package/dist/common/localization.js +62 -0
- package/dist/common/provider-triggers.js +4 -1
- package/dist/common/scheduler.d.ts +5 -5
- package/dist/common/scheduler.js +250 -236
- package/package.json +10 -1
- package/dist/browser/addNodeOptions-DRndy4EK.js +0 -6910
- package/dist/browser/createLucideIcon-CqjqCezK.js +0 -5537
- package/dist/browser/createResourceDialog-A64dDFCG.js +0 -467
- package/dist/browser/field-CKGQHCIi.js +0 -312
|
@@ -17,4 +17,10 @@ export interface ConnectorActionPorts {
|
|
|
17
17
|
readonly nullable: boolean;
|
|
18
18
|
}[];
|
|
19
19
|
}
|
|
20
|
+
export interface ConnectorRuntimeInputPort {
|
|
21
|
+
readonly handle: string;
|
|
22
|
+
readonly jsonSchema: unknown;
|
|
23
|
+
readonly nullable: boolean;
|
|
24
|
+
}
|
|
20
25
|
export declare function connectorActionPorts(inputSchema: unknown, outputSchema: unknown): ConnectorActionPorts;
|
|
26
|
+
export declare function normalizeConnectorRuntimeInputs<Value>(ports: readonly ConnectorRuntimeInputPort[], inputs: Readonly<Record<string, Value>>): Readonly<Record<string, Value>>;
|
|
@@ -3,82 +3,90 @@ var e = Array.isArray, t = (e) => typeof e == "object" && !!e, n = (n) => t(n) &
|
|
|
3
3
|
//#endregion
|
|
4
4
|
//#region src/connector/common/actionSchema.ts
|
|
5
5
|
function i(e, t) {
|
|
6
|
-
let n =
|
|
6
|
+
let n = o(e);
|
|
7
7
|
return {
|
|
8
8
|
inputs: n,
|
|
9
9
|
initialInputs: n.flatMap((e) => e.value === void 0 ? [] : [{
|
|
10
10
|
handle: e.handle,
|
|
11
11
|
value: e.value
|
|
12
12
|
}]),
|
|
13
|
-
outputs:
|
|
13
|
+
outputs: s(t)
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
function a(e) {
|
|
16
|
+
function a(e, t) {
|
|
17
|
+
let n = new Map(e.map((e) => [e.handle, e])), r = {};
|
|
18
|
+
for (let [e, i] of Object.entries(t)) {
|
|
19
|
+
let t = n.get(e);
|
|
20
|
+
i == null && t?.nullable == 1 && !f(t.jsonSchema) || (r[e] = i);
|
|
21
|
+
}
|
|
22
|
+
return r;
|
|
23
|
+
}
|
|
24
|
+
function o(e) {
|
|
17
25
|
let t = r(e);
|
|
18
26
|
if (t == null || t.type != "object" && t.properties == null) throw Error("Connector action inputSchema must be an object schema.");
|
|
19
27
|
let n = r(t.properties);
|
|
20
28
|
if (n == null) return [];
|
|
21
|
-
let i =
|
|
29
|
+
let i = d(t.required);
|
|
22
30
|
return Object.entries(n).map(([e, n]) => {
|
|
23
|
-
let r = !i.has(e) ||
|
|
31
|
+
let r = !i.has(e) || f(n, t);
|
|
24
32
|
return {
|
|
25
|
-
description:
|
|
33
|
+
description: l(t, n),
|
|
26
34
|
handle: e,
|
|
27
|
-
json_schema:
|
|
35
|
+
json_schema: c(t, n),
|
|
28
36
|
nullable: r,
|
|
29
|
-
value:
|
|
37
|
+
value: u(t, n, r)
|
|
30
38
|
};
|
|
31
39
|
});
|
|
32
40
|
}
|
|
33
|
-
function
|
|
41
|
+
function s(e) {
|
|
34
42
|
let t = r(e), n = r(t?.properties);
|
|
35
43
|
if (t != null && (t.type == "object" || n != null)) {
|
|
36
44
|
if (n == null) return [];
|
|
37
|
-
let e =
|
|
45
|
+
let e = d(t.required);
|
|
38
46
|
return Object.entries(n).map(([n, r]) => ({
|
|
39
|
-
description:
|
|
47
|
+
description: l(t, r),
|
|
40
48
|
handle: n,
|
|
41
|
-
json_schema:
|
|
42
|
-
nullable: !e.has(n) ||
|
|
49
|
+
json_schema: c(t, r),
|
|
50
|
+
nullable: !e.has(n) || f(r, t)
|
|
43
51
|
}));
|
|
44
52
|
}
|
|
45
53
|
return [{
|
|
46
|
-
description:
|
|
54
|
+
description: l(t, e),
|
|
47
55
|
handle: "output",
|
|
48
56
|
json_schema: e,
|
|
49
|
-
nullable:
|
|
57
|
+
nullable: f(e)
|
|
50
58
|
}];
|
|
51
59
|
}
|
|
52
|
-
function
|
|
60
|
+
function c(e, t) {
|
|
53
61
|
let n = r(t);
|
|
54
62
|
if (n == null) return t;
|
|
55
63
|
let i = Object.assign({}, n);
|
|
56
64
|
return i.$defs == null && e.$defs != null && (i.$defs = e.$defs), i.definitions == null && e.definitions != null && (i.definitions = e.definitions), i;
|
|
57
65
|
}
|
|
58
|
-
function
|
|
59
|
-
for (let n of
|
|
66
|
+
function l(e, t) {
|
|
67
|
+
for (let n of p(e, t)) if (typeof n.description == "string") return n.description;
|
|
60
68
|
}
|
|
61
|
-
function
|
|
62
|
-
for (let n of
|
|
69
|
+
function u(e, t, n) {
|
|
70
|
+
for (let n of p(e, t)) if (Object.hasOwn(n, "default")) return n.default;
|
|
63
71
|
return n ? null : void 0;
|
|
64
72
|
}
|
|
65
|
-
function
|
|
73
|
+
function d(e) {
|
|
66
74
|
return Array.isArray(e) ? new Set(e.filter((e) => typeof e == "string")) : /* @__PURE__ */ new Set();
|
|
67
75
|
}
|
|
68
|
-
function
|
|
76
|
+
function f(e, t = e, n = /* @__PURE__ */ new Set()) {
|
|
69
77
|
let i = r(e);
|
|
70
78
|
if (i == null) return !1;
|
|
71
79
|
if (Object.hasOwn(i, "type")) return i.type == "null" || Array.isArray(i.type) && i.type.includes("null");
|
|
72
80
|
if (Object.hasOwn(i, "enum")) return Array.isArray(i.enum) && i.enum.includes(null);
|
|
73
|
-
for (let e of ["anyOf", "oneOf"]) if (Object.hasOwn(i, e)) return Array.isArray(i[e]) && i[e].some((e) =>
|
|
81
|
+
for (let e of ["anyOf", "oneOf"]) if (Object.hasOwn(i, e)) return Array.isArray(i[e]) && i[e].some((e) => f(e, t, n));
|
|
74
82
|
let a = typeof i.$ref == "string" ? i.$ref : void 0;
|
|
75
83
|
if (a == null || n.has(a)) return !1;
|
|
76
|
-
let o =
|
|
84
|
+
let o = m(t, a);
|
|
77
85
|
if (o === void 0) return !1;
|
|
78
86
|
let s = new Set(n);
|
|
79
|
-
return s.add(a),
|
|
87
|
+
return s.add(a), f(o, t, s);
|
|
80
88
|
}
|
|
81
|
-
function
|
|
89
|
+
function p(e, t) {
|
|
82
90
|
let n = [], i = /* @__PURE__ */ new Set(), a = t;
|
|
83
91
|
for (;;) {
|
|
84
92
|
let t = r(a);
|
|
@@ -86,12 +94,12 @@ function f(e, t) {
|
|
|
86
94
|
n.push(t);
|
|
87
95
|
let o = typeof t.$ref == "string" ? t.$ref : void 0;
|
|
88
96
|
if (o == null || i.has(o)) return n;
|
|
89
|
-
let s =
|
|
97
|
+
let s = m(e, o);
|
|
90
98
|
if (s === void 0) return n;
|
|
91
99
|
i.add(o), a = s;
|
|
92
100
|
}
|
|
93
101
|
}
|
|
94
|
-
function
|
|
102
|
+
function m(e, t) {
|
|
95
103
|
if (t == "#") return e;
|
|
96
104
|
if (!t.startsWith("#/")) return;
|
|
97
105
|
let n = e;
|
|
@@ -103,4 +111,4 @@ function p(e, t) {
|
|
|
103
111
|
return n;
|
|
104
112
|
}
|
|
105
113
|
//#endregion
|
|
106
|
-
export { i as connectorActionPorts };
|
|
114
|
+
export { i as connectorActionPorts, a as normalizeConnectorRuntimeInputs };
|
|
@@ -104,7 +104,17 @@ function g(e, t, r, i, a) {
|
|
|
104
104
|
method: "POST"
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
|
-
function _(e, t, n, r
|
|
107
|
+
async function _(e, t, n, r) {
|
|
108
|
+
let o = await c(t, n, r), l = s(o.operationId, `${r} operationId`);
|
|
109
|
+
for (let t = 0; o.status == "pending" && t < 100; t += 1) await new Promise((e) => setTimeout(e, 10)), o = await c(await u(e, `/v1/flows/${s(o.flowId, `${r} flowId`)}/publish-operations/${l}`), 200, `${r} operation`);
|
|
110
|
+
i(o.status, "succeeded", `${r} terminal status`);
|
|
111
|
+
let d = s(o.publicationId, `${r} publicationId`), f = a((await c(await u(e, `/v1/flows/${s(o.flowId, `${r} flowId`)}/live`), 200, `${r} Live`)).publication, `${r} Publication`);
|
|
112
|
+
return i(f.publicationId, d, `${r} Live Publication`), {
|
|
113
|
+
operation: o,
|
|
114
|
+
publication: f
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
function v(e, t, n, r, i) {
|
|
108
118
|
return u(e, `/v1/flows/${encodeURIComponent(t)}/publications/${encodeURIComponent(n)}/rollback`, {
|
|
109
119
|
body: JSON.stringify({
|
|
110
120
|
expectedLivePublicationId: r,
|
|
@@ -114,7 +124,7 @@ function _(e, t, n, r, i) {
|
|
|
114
124
|
method: "POST"
|
|
115
125
|
});
|
|
116
126
|
}
|
|
117
|
-
function
|
|
127
|
+
function y(e, t, n) {
|
|
118
128
|
return u(e, "/v1/runs", {
|
|
119
129
|
body: JSON.stringify({
|
|
120
130
|
inputs: {},
|
|
@@ -125,7 +135,46 @@ function v(e, t, n) {
|
|
|
125
135
|
method: "POST"
|
|
126
136
|
});
|
|
127
137
|
}
|
|
128
|
-
var
|
|
138
|
+
var b = [
|
|
139
|
+
{
|
|
140
|
+
name: "manages deployment Variables with stable limits and exact-case identity",
|
|
141
|
+
async verify(e) {
|
|
142
|
+
i(await c(await u(e, "/v1/variables"), 200, "List empty Variables"), {
|
|
143
|
+
variables: [],
|
|
144
|
+
version: 1
|
|
145
|
+
}, "Empty Variables");
|
|
146
|
+
let t = (t, n, r = { value: n }) => u(e, `/v1/variables/${encodeURIComponent(t)}`, {
|
|
147
|
+
body: JSON.stringify(r),
|
|
148
|
+
method: "PUT"
|
|
149
|
+
}), n = await c(await t("Token", ""), 200, "Create Variable");
|
|
150
|
+
i(Object.keys(n).toSorted(), [
|
|
151
|
+
"name",
|
|
152
|
+
"updatedAt",
|
|
153
|
+
"value",
|
|
154
|
+
"version"
|
|
155
|
+
], "Variable fields"), i(n.name, "Token", "Variable name"), i(n.value, "", "Empty Variable value"), i(n.version, 1, "Variable version"), s(n.updatedAt, "Variable updatedAt"), i(await c(await u(e, "/v1/variables/Token"), 200, "Read Variable"), n, "Read Variable"), i(await c(await t("Token", ""), 200, "Put same Variable"), n, "Same Variable update");
|
|
156
|
+
for (let e of [
|
|
157
|
+
"A",
|
|
158
|
+
"Z",
|
|
159
|
+
"a",
|
|
160
|
+
"token"
|
|
161
|
+
]) await c(await t(e, e), 200, `Create ${e} Variable`);
|
|
162
|
+
i(o((await c(await u(e, "/v1/variables"), 200, "List Variables")).variables, "Variables").map((e) => a(e, "Variable").name), [
|
|
163
|
+
"A",
|
|
164
|
+
"Token",
|
|
165
|
+
"Z",
|
|
166
|
+
"a",
|
|
167
|
+
"token"
|
|
168
|
+
], "Variable binary order");
|
|
169
|
+
let r = `${"值".repeat(21845)}x`;
|
|
170
|
+
i(new TextEncoder().encode(r).byteLength, 65536, "Variable UTF-8 boundary fixture"), await c(await t("BIG", r), 200, "Create maximum Variable value"), await l(await t("BIG", `${r}x`), 400, "variable.invalid", "Reject oversized Variable value"), await l(await t("OO_TOKEN", "value"), 400, "variable.invalid", "Reject reserved Variable name"), await l(await t("bad-name", "value"), 400, "variable.invalid", "Reject invalid Variable name"), await l(await t("EXTRA", "value", {
|
|
171
|
+
extra: !0,
|
|
172
|
+
value: "value"
|
|
173
|
+
}), 400, "variable.invalid", "Reject extra Variable field"), await l(await u(e, "/v1/variables/MISSING"), 404, "variable.not-found", "Read missing Variable"), await l(await u(e, "/v1/variables/MISSING", { method: "DELETE" }), 404, "variable.not-found", "Delete missing Variable"), i(await c(await u(e, "/v1/variables/Token", { method: "DELETE" }), 200, "Delete Variable"), { version: 1 }, "Delete response");
|
|
174
|
+
for (let e = 0; e < 195; e += 1) await c(await t(`V${String(e).padStart(3, "0")}`, "value"), 200, `Fill Variable ${e}`);
|
|
175
|
+
await l(await t("V195", "value"), 409, "variable.limit-reached", "Reject Variable over limit"), i((await c(await t("A", "updated"), 200, "Update full Variable catalog")).value, "updated", "Full catalog update");
|
|
176
|
+
}
|
|
177
|
+
},
|
|
129
178
|
{
|
|
130
179
|
name: "creates, replays, lists, reads, renames, and retires a Flow",
|
|
131
180
|
async verify(e) {
|
|
@@ -221,7 +270,7 @@ var y = [
|
|
|
221
270
|
method: "POST"
|
|
222
271
|
}), h = await c(await m(), 202, "Create Draft Run"), g = s(h.runId, "Draft Run runId");
|
|
223
272
|
i(await c(await m(), 200, "Replay Draft Run"), h, "Replayed Draft Run"), await l(await u(e, `/v1/runs/${g}/result`), 409, "run.not-terminal", "Read queued Run result");
|
|
224
|
-
let _ = await c(await u(e, p, {
|
|
273
|
+
let _ = s((await c(await u(e, p, {
|
|
225
274
|
body: JSON.stringify({
|
|
226
275
|
engineContract: n,
|
|
227
276
|
inputs: {},
|
|
@@ -229,11 +278,13 @@ var y = [
|
|
|
229
278
|
}),
|
|
230
279
|
headers: { "idempotency-key": "draft-run-second" },
|
|
231
280
|
method: "POST"
|
|
232
|
-
}), 202, "Create second Draft Run"), v = await c(await u(e, `/v1/flows/${r}/runs?limit=1`), 200, "List Runs");
|
|
233
|
-
i(o(v.runs, "Runs").map((e) => a(e, "Run").runId), [
|
|
281
|
+
}), 202, "Create second Draft Run")).runId, "Second Draft Run"), v = await c(await u(e, `/v1/flows/${r}/runs?limit=1`), 200, "List Runs");
|
|
282
|
+
i(o(v.runs, "Runs").map((e) => a(e, "Run").runId), [_], "Listed Runs");
|
|
283
|
+
let y = s(v.nextCursor, "Run cursor");
|
|
284
|
+
i(o((await c(await u(e, `/v1/flows/${r}/runs?limit=1&cursor=${encodeURIComponent(y)}`), 200, "List next Runs")).runs, "Next Runs").map((e) => a(e, "Run").runId), [g], "Listed next Runs"), i((await c(await u(e, `/v1/runs/${g}/cancel`, {
|
|
234
285
|
body: JSON.stringify({ version: 1 }),
|
|
235
286
|
method: "POST"
|
|
236
|
-
}), 200, "Cancel Run")).status, "canceled", "Canceled Run status"), i((await c(await u(e, `/v1/runs/${g}/result`), 200, "Read canceled Run result")).status, "canceled", "Canceled Run result"), i((await c(await u(e, `/v1/runs/${g}/events`), 200, "Read canceled Run events")).done, !0, "Canceled Run events"), i((await c(await u(e, `/v1/runs/${
|
|
287
|
+
}), 200, "Cancel Run")).status, "canceled", "Canceled Run status"), i((await c(await u(e, `/v1/runs/${g}/result`), 200, "Read canceled Run result")).status, "canceled", "Canceled Run result"), i((await c(await u(e, `/v1/runs/${g}/events`), 200, "Read canceled Run events")).done, !0, "Canceled Run events"), i((await c(await u(e, `/v1/runs/${_}/cancel`, {
|
|
237
288
|
body: JSON.stringify({ version: 1 }),
|
|
238
289
|
method: "POST"
|
|
239
290
|
}), 200, "Cancel second Draft Run")).status, "canceled", "Second canceled Run status");
|
|
@@ -280,35 +331,35 @@ var y = [
|
|
|
280
331
|
await l(await p(c, "unsupported-engine/v1", "unsupported-run"), 409, "engine.unsupported", "Run unsupported Engine"), await l(await p(r, n, "missing-revision-run"), 404, "flow.not-found", "Run missing Revision");
|
|
281
332
|
}
|
|
282
333
|
}
|
|
283
|
-
],
|
|
334
|
+
], x = [{
|
|
284
335
|
name: "publishes one immutable Flow with idempotent Live CAS",
|
|
285
336
|
async verify(e) {
|
|
286
337
|
let t = await f(e, "Publication flow", "publication-flow"), n = s(t.flowId, "Publication Flow flowId"), r = s(t.draftRevisionId, "Publication Flow revisionId");
|
|
287
338
|
i((await c(await u(e, `/v1/flows/${n}/live`), 200, "Read Live")).status, "not-published", "Initial Live status");
|
|
288
|
-
let a = () => g(e, n, r, null, "publication-first"), o = await
|
|
289
|
-
i(await c(await a(),
|
|
290
|
-
let
|
|
291
|
-
i(
|
|
339
|
+
let a = () => g(e, n, r, null, "publication-first"), o = await _(e, await a(), 202, "Publish Flow"), d = o.publication, p = s(d.publicationId, "Publication id");
|
|
340
|
+
i(await c(await a(), 202, "Replay Publish"), o.operation, "Replayed Publish operation"), await l(await g(e, n, r, p, "publication-first"), 409, "publication.conflict", "Conflicting replay"), i((await c(await u(e, `/v1/flows/${n}/live`), 200, "Read published Live")).publication, d, "Live Publication");
|
|
341
|
+
let m = await c(await u(e, `/v1/flows/${n}/publications?includeTotal=true`), 200, "List Publications");
|
|
342
|
+
i(m.publications, [d], "Publication history"), i(m.total, 1, "Publication total"), await l(await u(e, `/v1/flows/${n}/revisions/${r}/publications`, {
|
|
292
343
|
body: JSON.stringify({
|
|
293
344
|
engineContract: "unsupported-engine/v1",
|
|
294
|
-
expectedLivePublicationId:
|
|
345
|
+
expectedLivePublicationId: p,
|
|
295
346
|
version: 1
|
|
296
347
|
}),
|
|
297
348
|
headers: { "idempotency-key": "unsupported-publication" },
|
|
298
349
|
method: "POST"
|
|
299
|
-
}), 409, "engine.unsupported", "Publish unsupported Engine"), await l(await g(e, n, "00000000-0000-7000-8000-000000000002",
|
|
350
|
+
}), 409, "engine.unsupported", "Publish unsupported Engine"), await l(await g(e, n, "00000000-0000-7000-8000-000000000002", p, "missing-revision-publication"), 404, "flow.not-found", "Publish missing Revision"), await l(await v(e, n, "00000000-0000-7000-8000-000000000004", p, "missing-rollback"), 404, "publication.not-found", "Rollback missing Publication"), await l(await y(e, "00000000-0000-7000-8000-000000000004", "missing-publication-run"), 404, "publication.not-found", "Run missing Publication");
|
|
300
351
|
}
|
|
301
352
|
}, {
|
|
302
353
|
name: "rolls back immutable history and fixes a Live Run target",
|
|
303
354
|
async verify(e) {
|
|
304
|
-
let t = await f(e, "Rollback flow", "rollback-flow"), n = s(t.flowId, "Rollback Flow flowId"), r = s(t.draftRevisionId, "Rollback Flow revisionId"), a =
|
|
305
|
-
await l(await
|
|
306
|
-
let
|
|
307
|
-
i(
|
|
308
|
-
let
|
|
309
|
-
i(
|
|
355
|
+
let t = await f(e, "Rollback flow", "rollback-flow"), n = s(t.flowId, "Rollback Flow flowId"), r = s(t.draftRevisionId, "Rollback Flow revisionId"), a = (await _(e, await g(e, n, r, null, "publish-first"), 202, "Publish first Revision")).publication, o = s(a.publicationId, "First Publication"), d = (await _(e, await g(e, n, h(await c(await m(e, n, r), 200, "Change Draft"), "Second Revision"), o, "publish-second"), 202, "Publish second Revision")).publication, p = s(d.publicationId, "Second Publication");
|
|
356
|
+
await l(await y(e, o, "stale-live-run"), 412, "live.conflict", "Run stale Publication");
|
|
357
|
+
let b = () => v(e, n, o, p, "rollback-first"), x = await c(await b(), 201, "Rollback Flow"), S = s(x.publicationId, "Rollback Publication");
|
|
358
|
+
i(x.operation, "rollback", "Rollback operation"), i(x.sourcePublicationId, o, "Rollback source"), i(await c(await b(), 200, "Replay Rollback"), x, "Replayed Rollback");
|
|
359
|
+
let C = await c(await y(e, S, "rollback-run"), 202, "Create Live Run");
|
|
360
|
+
i(C.flowId, n, "Live Run flowId"), i(C.revisionId, r, "Live Run revisionId"), await c(await u(e, `/v1/flows/${n}`, { method: "DELETE" }), 202, "Retire Flow"), await l(await y(e, S, "retired-run"), 409, "flow.busy", "Run retired Flow");
|
|
310
361
|
}
|
|
311
|
-
}],
|
|
362
|
+
}], S = [{
|
|
312
363
|
name: "exposes one deployment-scoped Trigger Key catalog",
|
|
313
364
|
async verify(e) {
|
|
314
365
|
let t = await c(await u(e, "/v1/trigger-keys"), 200, "List Trigger Keys"), n = await c(await u(e, "/v1/trigger-keys/catalog"), 200, "List Trigger definitions"), r = o(t.keys, "Trigger Keys").map((e) => a(e, "Trigger Key")), d = o(n.definitions, "Trigger definitions").map((e) => a(e, "Trigger definition"));
|
|
@@ -344,20 +395,20 @@ var y = [
|
|
|
344
395
|
},
|
|
345
396
|
nodeId: "webhook",
|
|
346
397
|
target: { kind: "flow" }
|
|
347
|
-
}]), 200, "Create Trigger nodes"), "Trigger Revision"), l =
|
|
348
|
-
i(
|
|
349
|
-
for (let e of
|
|
350
|
-
let
|
|
398
|
+
}]), 200, "Create Trigger nodes"), "Trigger Revision"), l = (await _(e, await g(e, n, r, null, "trigger-publication"), 202, "Publish Trigger Flow")).publication, d = s(l.publicationId, "Trigger Publication"), m = `/v1/flows/${n}/triggers`, v = o((await c(await u(e, m), 200, "List Trigger bindings")).bindings, "Trigger bindings").map((e) => a(e, "Trigger binding"));
|
|
399
|
+
i(v.map((e) => e.triggerNodeId), ["cron", "webhook"], "Trigger binding order");
|
|
400
|
+
for (let e of v) i(e.currentPublicationId, d, "Trigger Publication");
|
|
401
|
+
let y = `${m}/webhook`, b = s(a((await c(await u(e, y), 200, "Read Webhook")).binding, "Webhook").endpointUrl, "Webhook endpoint"), x = (t) => u(e, `${y}/${t}`, {
|
|
351
402
|
body: JSON.stringify({ version: 1 }),
|
|
352
403
|
method: "POST"
|
|
353
404
|
});
|
|
354
|
-
i((await c(await
|
|
405
|
+
i((await c(await x("pause"), 200, "Pause Webhook")).operatorState, "paused", "Paused state"), i((await e.request(new Request(b, { method: "POST" }))).status, 404, "Paused callback"), i((await c(await x("resume"), 200, "Resume Webhook")).operatorState, "active", "Resumed state"), i((await e.request(new Request(b, { method: "POST" }))).status, 200, "Resumed callback"), await _(e, await g(e, n, h(await c(await p(e, n, r, [{
|
|
355
406
|
kind: "graph.node.delete",
|
|
356
407
|
nodeId: "webhook",
|
|
357
408
|
target: { kind: "flow" }
|
|
358
|
-
}]), 200, "Delete Webhook"), "Retired Trigger Revision"),
|
|
409
|
+
}]), 200, "Delete Webhook"), "Retired Trigger Revision"), d, "retire-trigger"), 202, "Publish retired Trigger"), i(a((await c(await u(e, y), 200, "Read retired Webhook")).binding, "Retired Webhook").currentPublicationId, void 0, "Retired Publication");
|
|
359
410
|
}
|
|
360
|
-
}],
|
|
411
|
+
}], C = [{
|
|
361
412
|
name: "projects the deployment Connector catalog and authorized Connections",
|
|
362
413
|
async verify(e) {
|
|
363
414
|
let t = o((await c(await u(e, "/v1/connector/providers"), 200, "List Connector Providers")).providers, "Connector Providers").map((e) => a(e, "Connector Provider")), n = o((await c(await u(e, "/v1/connector/actions"), 200, "List Connector Actions")).actions, "Connector Actions").map((e) => a(e, "Connector Action"));
|
|
@@ -379,4 +430,4 @@ var y = [
|
|
|
379
430
|
}
|
|
380
431
|
}];
|
|
381
432
|
//#endregion
|
|
382
|
-
export {
|
|
433
|
+
export { C as connectorControlApiConformanceCases, b as controlApiConformanceCases, x as publicationControlApiConformanceCases, S as triggerControlApiConformanceCases };
|
|
@@ -3,6 +3,7 @@ export declare const controlErrorCode: {
|
|
|
3
3
|
readonly authorizationDenied: 'authorization.denied';
|
|
4
4
|
readonly bindingUnresolved: 'binding.unresolved';
|
|
5
5
|
readonly connectorActionNotFound: 'connector.action-not-found';
|
|
6
|
+
readonly connectorUnconfigured: 'connector.unconfigured';
|
|
6
7
|
readonly connectorUnavailable: 'connector.unavailable';
|
|
7
8
|
readonly engineUnavailable: 'engine.unavailable';
|
|
8
9
|
readonly engineUnsupported: 'engine.unsupported';
|
|
@@ -17,6 +18,8 @@ export declare const controlErrorCode: {
|
|
|
17
18
|
readonly pageInvalidCursor: 'page.invalid-cursor';
|
|
18
19
|
readonly publicationConflict: 'publication.conflict';
|
|
19
20
|
readonly publicationNotFound: 'publication.not-found';
|
|
21
|
+
readonly publicationUnsupported: 'publication.unsupported';
|
|
22
|
+
readonly publishOperationNotFound: 'publication.operation-not-found';
|
|
20
23
|
readonly routeNotFound: 'route.not-found';
|
|
21
24
|
readonly runConflict: 'run.conflict';
|
|
22
25
|
readonly runEventsExpired: 'run.events-expired';
|
|
@@ -27,6 +30,9 @@ export declare const controlErrorCode: {
|
|
|
27
30
|
readonly triggerKeyInvalid: 'trigger-key.invalid';
|
|
28
31
|
readonly triggerKeyNotFound: 'trigger-key.not-found';
|
|
29
32
|
readonly triggerNotFound: 'trigger.not-found';
|
|
33
|
+
readonly variableInvalid: 'variable.invalid';
|
|
34
|
+
readonly variableLimitReached: 'variable.limit-reached';
|
|
35
|
+
readonly variableNotFound: 'variable.not-found';
|
|
30
36
|
};
|
|
31
37
|
export type ControlErrorCode = (typeof controlErrorCode)[keyof typeof controlErrorCode];
|
|
32
38
|
export declare const controlErrorMetadata: {
|
|
@@ -42,6 +48,9 @@ export declare const controlErrorMetadata: {
|
|
|
42
48
|
readonly "connector.action-not-found": {
|
|
43
49
|
readonly status: 404;
|
|
44
50
|
};
|
|
51
|
+
readonly "connector.unconfigured": {
|
|
52
|
+
readonly status: 503;
|
|
53
|
+
};
|
|
45
54
|
readonly "connector.unavailable": {
|
|
46
55
|
readonly status: 503;
|
|
47
56
|
};
|
|
@@ -84,6 +93,12 @@ export declare const controlErrorMetadata: {
|
|
|
84
93
|
readonly "publication.not-found": {
|
|
85
94
|
readonly status: 404;
|
|
86
95
|
};
|
|
96
|
+
readonly "publication.unsupported": {
|
|
97
|
+
readonly status: 409;
|
|
98
|
+
};
|
|
99
|
+
readonly "publication.operation-not-found": {
|
|
100
|
+
readonly status: 404;
|
|
101
|
+
};
|
|
87
102
|
readonly "route.not-found": {
|
|
88
103
|
readonly status: 404;
|
|
89
104
|
};
|
|
@@ -114,4 +129,13 @@ export declare const controlErrorMetadata: {
|
|
|
114
129
|
readonly "trigger.not-found": {
|
|
115
130
|
readonly status: 404;
|
|
116
131
|
};
|
|
132
|
+
readonly "variable.invalid": {
|
|
133
|
+
readonly status: 400;
|
|
134
|
+
};
|
|
135
|
+
readonly "variable.limit-reached": {
|
|
136
|
+
readonly status: 409;
|
|
137
|
+
};
|
|
138
|
+
readonly "variable.not-found": {
|
|
139
|
+
readonly status: 404;
|
|
140
|
+
};
|
|
117
141
|
};
|
|
@@ -20,6 +20,12 @@ export interface FlowPage {
|
|
|
20
20
|
readonly total?: number;
|
|
21
21
|
readonly version: 1;
|
|
22
22
|
}
|
|
23
|
+
export interface Variable {
|
|
24
|
+
readonly name: string;
|
|
25
|
+
readonly updatedAt: string;
|
|
26
|
+
readonly value: string;
|
|
27
|
+
readonly version: 1;
|
|
28
|
+
}
|
|
23
29
|
export interface TriggerKeySummary {
|
|
24
30
|
readonly description: string;
|
|
25
31
|
readonly displayName: string;
|
|
@@ -74,6 +80,7 @@ export interface ConnectorConnection {
|
|
|
74
80
|
}
|
|
75
81
|
export interface ConnectorAction {
|
|
76
82
|
readonly actionId: string;
|
|
83
|
+
readonly authenticated: boolean;
|
|
77
84
|
readonly defaultConnection?: ConnectorConnection;
|
|
78
85
|
readonly description: string;
|
|
79
86
|
readonly icon?: string;
|
|
@@ -131,12 +138,44 @@ export interface Publication {
|
|
|
131
138
|
readonly sourcePublicationId?: string;
|
|
132
139
|
readonly version: 1;
|
|
133
140
|
}
|
|
141
|
+
export type PublishOperation = {
|
|
142
|
+
readonly createdAt: string;
|
|
143
|
+
readonly flowId: string;
|
|
144
|
+
readonly operationId: string;
|
|
145
|
+
readonly revisionId: string;
|
|
146
|
+
readonly status: 'pending';
|
|
147
|
+
readonly updatedAt: string;
|
|
148
|
+
readonly version: 1;
|
|
149
|
+
} | {
|
|
150
|
+
readonly createdAt: string;
|
|
151
|
+
readonly flowId: string;
|
|
152
|
+
readonly operationId: string;
|
|
153
|
+
readonly publicationId: string;
|
|
154
|
+
readonly revisionId: string;
|
|
155
|
+
readonly status: 'succeeded';
|
|
156
|
+
readonly updatedAt: string;
|
|
157
|
+
readonly version: 1;
|
|
158
|
+
} | {
|
|
159
|
+
readonly createdAt: string;
|
|
160
|
+
readonly flowId: string;
|
|
161
|
+
readonly issue: {
|
|
162
|
+
readonly code: string;
|
|
163
|
+
readonly message: string;
|
|
164
|
+
readonly nodeId?: string;
|
|
165
|
+
};
|
|
166
|
+
readonly operationId: string;
|
|
167
|
+
readonly revisionId: string;
|
|
168
|
+
readonly status: 'failed';
|
|
169
|
+
readonly updatedAt: string;
|
|
170
|
+
readonly version: 1;
|
|
171
|
+
};
|
|
134
172
|
export interface Diagnostic {
|
|
135
173
|
readonly code: string;
|
|
136
174
|
readonly column: number;
|
|
137
175
|
readonly line: number;
|
|
138
176
|
readonly message: string;
|
|
139
177
|
readonly path: string;
|
|
178
|
+
readonly values?: Readonly<Record<string, string | number>>;
|
|
140
179
|
}
|
|
141
180
|
export interface FlowCheck {
|
|
142
181
|
readonly closureDigest: string;
|
|
@@ -266,6 +305,13 @@ export declare class ControlClient {
|
|
|
266
305
|
readonly includeTotal?: boolean;
|
|
267
306
|
readonly limit?: number;
|
|
268
307
|
}): Promise<FlowPage>;
|
|
308
|
+
listVariables(): Promise<{
|
|
309
|
+
readonly variables: readonly Variable[];
|
|
310
|
+
readonly version: 1;
|
|
311
|
+
}>;
|
|
312
|
+
getVariable(name: string): Promise<Variable>;
|
|
313
|
+
putVariable(name: string, value: string): Promise<Variable>;
|
|
314
|
+
deleteVariable(name: string): Promise<void>;
|
|
269
315
|
createFlow(name: string, idempotencyKey?: string): Promise<Flow>;
|
|
270
316
|
getFlow(flowId: string): Promise<Flow>;
|
|
271
317
|
renameFlow(flowId: string, name: string): Promise<Flow>;
|
|
@@ -285,12 +331,12 @@ export declare class ControlClient {
|
|
|
285
331
|
getDraft(flowId: string): Promise<Draft>;
|
|
286
332
|
syncDraft(flowId: string, fromRevisionId?: string): Promise<DraftSync>;
|
|
287
333
|
getRevision(flowId: string, revisionId: string): Promise<Draft>;
|
|
288
|
-
listConnectorProviders(signal?: AbortSignal): Promise<readonly ConnectorProvider[]>;
|
|
289
|
-
listConnectorActions(serviceId?: string, signal?: AbortSignal): Promise<readonly ConnectorAction[]>;
|
|
290
|
-
searchConnectorActions(query: string, signal?: AbortSignal): Promise<readonly ConnectorAction[]>;
|
|
291
|
-
getConnectorAction(actionId: string, signal?: AbortSignal): Promise<ConnectorAction>;
|
|
292
|
-
listConnectorConnections(serviceId: string, signal?: AbortSignal): Promise<readonly ConnectorConnection[]>;
|
|
293
|
-
createConnectorConnectionPage(serviceId: string): Promise<string>;
|
|
334
|
+
listConnectorProviders(signal?: AbortSignal, flowId?: string): Promise<readonly ConnectorProvider[]>;
|
|
335
|
+
listConnectorActions(serviceId?: string, signal?: AbortSignal, flowId?: string): Promise<readonly ConnectorAction[]>;
|
|
336
|
+
searchConnectorActions(query: string, signal?: AbortSignal, flowId?: string): Promise<readonly ConnectorAction[]>;
|
|
337
|
+
getConnectorAction(actionId: string, signal?: AbortSignal, flowId?: string): Promise<ConnectorAction>;
|
|
338
|
+
listConnectorConnections(serviceId: string, signal?: AbortSignal, flowId?: string): Promise<readonly ConnectorConnection[]>;
|
|
339
|
+
createConnectorConnectionPage(serviceId: string, flowId?: string): Promise<string>;
|
|
294
340
|
changeDraft(flowId: string, expectedRevisionId: string, operations: readonly ChangeOperation[]): Promise<DraftChange>;
|
|
295
341
|
checkFlow(flowId: string, revisionId: string): Promise<FlowCheck>;
|
|
296
342
|
getLive(flowId: string): Promise<Live>;
|
|
@@ -301,7 +347,8 @@ export declare class ControlClient {
|
|
|
301
347
|
}): Promise<PublicationPage>;
|
|
302
348
|
createDraftRun(flowId: string, revisionId: string, options?: RunOptions): Promise<DraftRun>;
|
|
303
349
|
createLiveRun(publicationId: string, options?: RunOptions): Promise<LiveRun>;
|
|
304
|
-
publishFlow(flowId: string, revisionId: string, expectedLivePublicationId: string | null, options?: PublicationOptions): Promise<
|
|
350
|
+
publishFlow(flowId: string, revisionId: string, expectedLivePublicationId: string | null, options?: PublicationOptions): Promise<PublishOperation>;
|
|
351
|
+
getPublishOperation(flowId: string, operationId: string): Promise<PublishOperation>;
|
|
305
352
|
rollbackFlow(flowId: string, publicationId: string, expectedLivePublicationId: string, options?: PublicationOptions): Promise<Publication>;
|
|
306
353
|
getRun(runId: string): Promise<RunDetails>;
|
|
307
354
|
listRuns(flowId: string, options?: {
|