@oomol-lab/open-flow 0.1.0-alpha.4 → 0.1.0-alpha.6
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/browser/{addNodeOptions-CGyTkP99.js → addNodeOptions-C4wix0_u.js} +1008 -1428
- package/dist/browser/carbon-DMCVsjHo.js +53 -0
- package/dist/browser/{createLucideIcon-MmUpJrIU.js → createLucideIcon-ggJB9CTC.js} +86 -117
- package/dist/browser/{createResourceDialog-CIVfStiE.js → createResourceDialog-CESUCxOM.js} +12 -12
- package/dist/browser/{dist-BbyiRq3c.js → dist-B0Q2Mn0n.js} +117 -107
- package/dist/browser/{dist-B9OV3YTx.js → dist-Bc9TvHYl.js} +7 -7
- package/dist/browser/{dist-0lWKriL5.js → dist-C46JByB-.js} +1 -1
- package/dist/browser/{dist-CvcmLAMW.js → dist-CUkceEvN.js} +4 -4
- package/dist/browser/{dist-zyY--HOV.js → dist-CVtP-E2c.js} +2 -2
- package/dist/browser/{dist-CLZJNoWB.js → dist-D5mdziGP.js} +4 -4
- package/dist/browser/{dist-7oZK9QXZ.js → dist-DMi8_lU3.js} +5 -5
- package/dist/browser/{dist-DL0SDskM.js → dist-DQVavPcf.js} +9 -8
- package/dist/browser/{dist-aWSZx4q1.js → dist-DWzdGVm9.js} +2 -2
- package/dist/browser/{dist-Djd02JSy.js → dist-DXgEYMFx.js} +4 -4
- package/dist/browser/{dist-o4dBuwiG.js → dist-DhsGR_K3.js} +4 -4
- package/dist/browser/{dist-BLk5M0uK.js → dist-Mecbzdl2.js} +3 -3
- package/dist/browser/{dist-CIq6ue3I.js → dist-n9WmBm5w.js} +1115 -1103
- package/dist/browser/{esm-DXw7EADW.js → esm-CoE5_2w7.js} +5 -5
- package/dist/browser/{field-runIpvMd.js → field-CIrv7Rez.js} +6 -6
- package/dist/browser/{project-authoring-edge.d.ts → flow-authoring-edge.d.ts} +1 -1
- package/dist/browser/{project-authoring-module.d.ts → flow-authoring-module.d.ts} +1 -1
- package/dist/browser/{project-authoring-node.d.ts → flow-authoring-node.d.ts} +6 -12
- package/dist/browser/flow-authoring.d.ts +3 -0
- package/dist/browser/{project-authoring.js → flow-authoring.js} +44 -69
- package/dist/browser/{project-change.d.ts → flow-change.d.ts} +11 -26
- package/dist/browser/{project-change.js → flow-change.js} +8 -39
- package/dist/browser/{project-notifications.d.ts → flow-notifications.d.ts} +6 -3
- package/dist/browser/{flowRunInputEditorStore-B49C0ZmK.js → flowRunInputEditorStore-DXOyyY7o.js} +850 -675
- package/dist/browser/{flowWorkspace-CGsEHe2F.js → flowWorkspace-Bo0bz1Uz.js} +7040 -6875
- package/dist/browser/{lib-S4ccuMeT.js → lib-GrGxYjsJ.js} +3 -5
- package/dist/browser/licenses.md +11 -11
- package/dist/browser/{markdownContent-BvYiwIwR.js → markdownContent-ColGUxHy.js} +4046 -4018
- package/dist/browser/workbench-contract.d.ts +4 -4
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.d.ts +1 -1
- package/dist/browser/workbench.js +898 -1053
- package/dist/common/connector-action.js +1 -1
- package/dist/common/control-api-conformance.js +137 -361
- package/dist/common/control-api-errors.d.ts +16 -24
- package/dist/common/control-api.d.ts +38 -67
- package/dist/common/control-api.js +135 -188
- package/dist/common/cron-trigger.d.ts +1 -1
- package/dist/common/cron-trigger.js +1 -1
- package/dist/common/{project-encoding.d.ts → flow-encoding.d.ts} +3 -3
- package/dist/common/{project-encoding.js → flow-encoding.js} +3 -6
- package/dist/common/{project-notifications.d.ts → flow-notifications.d.ts} +6 -3
- package/dist/common/{project-semantics.d.ts → flow-semantics.d.ts} +9 -12
- package/dist/common/{project-semantics.js → flow-semantics.js} +103 -115
- package/dist/common/integration-trigger.d.ts +1 -1
- package/dist/common/integration-trigger.js +1 -1
- package/dist/common/poll-trigger.d.ts +1 -1
- package/dist/common/run-lifecycle.js +1 -1
- package/dist/common/runtime-contract.d.ts +1 -1
- package/dist/common/runtime-contract.js +1 -1
- package/dist/common/scheduler.d.ts +3 -2
- package/dist/common/scheduler.js +4 -4
- package/dist/common/webhook-trigger.d.ts +1 -1
- package/dist/common/webhook-trigger.js +2 -2
- package/package.json +13 -13
- package/dist/browser/carbon-nMY84Amv.js +0 -53
- package/dist/browser/project-authoring-flow.d.ts +0 -4
- package/dist/browser/project-authoring.d.ts +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/dequal/lite/index.mjs
|
|
1
|
+
//#region ../../node_modules/.bun/dequal@2.0.3/node_modules/dequal/lite/index.mjs
|
|
2
2
|
var e = Object.prototype.hasOwnProperty;
|
|
3
3
|
function t(n, r) {
|
|
4
4
|
var i, a;
|
|
@@ -35,70 +35,22 @@ function o(e, t) {
|
|
|
35
35
|
function s(e, t) {
|
|
36
36
|
return (typeof e != "string" || e.length == 0) && r(`${t}: expected a non-empty string.`), e;
|
|
37
37
|
}
|
|
38
|
-
function c(e, t, n) {
|
|
39
|
-
i(Object.keys(e).toSorted(), [...t].toSorted(), `${n} fields`);
|
|
40
|
-
}
|
|
41
|
-
function l(e, t) {
|
|
42
|
-
let n = a(e, t);
|
|
43
|
-
return c(n, [
|
|
44
|
-
"connectionId",
|
|
45
|
-
"displayName",
|
|
46
|
-
"isDefault",
|
|
47
|
-
"serviceId",
|
|
48
|
-
"status"
|
|
49
|
-
], t), s(n.connectionId, `${t} connectionId`), s(n.displayName, `${t} displayName`), s(n.serviceId, `${t} serviceId`), typeof n.isDefault != "boolean" && r(`${t} isDefault: expected a boolean.`), [
|
|
50
|
-
"active",
|
|
51
|
-
"disconnected",
|
|
52
|
-
"error",
|
|
53
|
-
"reauth_required"
|
|
54
|
-
].includes(String(n.status)) || r(`${t} status: invalid status.`), n;
|
|
55
|
-
}
|
|
56
|
-
function u(e, t, n) {
|
|
57
|
-
let i = a(e, n), o = Object.hasOwn(i, "description"), s = t && Object.hasOwn(i, "value");
|
|
58
|
-
c(i, [
|
|
59
|
-
"jsonSchema",
|
|
60
|
-
"nullable",
|
|
61
|
-
...o ? ["description"] : [],
|
|
62
|
-
...s ? ["value"] : []
|
|
63
|
-
], n), typeof i.nullable != "boolean" && r(`${n} nullable: expected a boolean.`), o && typeof i.description != "string" && r(`${n} description: expected a string.`);
|
|
64
|
-
}
|
|
65
|
-
function d(e, t) {
|
|
66
|
-
let n = a(e, t), o = Object.hasOwn(n, "defaultConnection"), d = Object.hasOwn(n, "icon");
|
|
67
|
-
c(n, [
|
|
68
|
-
"actionId",
|
|
69
|
-
...o ? ["defaultConnection"] : [],
|
|
70
|
-
"description",
|
|
71
|
-
...d ? ["icon"] : [],
|
|
72
|
-
"inputs",
|
|
73
|
-
"name",
|
|
74
|
-
"outputs",
|
|
75
|
-
"serviceId",
|
|
76
|
-
"serviceName"
|
|
77
|
-
], t), s(n.actionId, `${t} actionId`), s(n.name, `${t} name`), s(n.serviceId, `${t} serviceId`), s(n.serviceName, `${t} serviceName`), typeof n.description != "string" && r(`${t} description: expected a string.`), d && s(n.icon, `${t} icon`);
|
|
78
|
-
for (let [e, r] of Object.entries(a(n.inputs, `${t} inputs`))) u(r, !0, `${t} input ${e}`);
|
|
79
|
-
for (let [e, r] of Object.entries(a(n.outputs, `${t} outputs`))) u(r, !1, `${t} output ${e}`);
|
|
80
|
-
if (o) {
|
|
81
|
-
let e = l(n.defaultConnection, `${t} default Connection`);
|
|
82
|
-
i(e.serviceId, n.serviceId, `${t} default Connection serviceId`), i(e.status, "active", `${t} default Connection status`);
|
|
83
|
-
}
|
|
84
|
-
return n;
|
|
85
|
-
}
|
|
86
|
-
async function f(e, t, n) {
|
|
38
|
+
async function c(e, t, n) {
|
|
87
39
|
return i(e.status, t, `${n} status`), a(await e.json().catch(() => r(`${n} body: expected JSON.`)), `${n} body`);
|
|
88
40
|
}
|
|
89
|
-
async function
|
|
90
|
-
let o = await
|
|
41
|
+
async function l(e, t, n, r) {
|
|
42
|
+
let o = await c(e, t, r);
|
|
91
43
|
i(a(o.error, `${r} error`).code, n, `${r} error code`), i(o.version, 1, `${r} version`);
|
|
92
44
|
}
|
|
93
|
-
function
|
|
45
|
+
function u(e, t, n = {}) {
|
|
94
46
|
let r = new Headers(n.headers);
|
|
95
47
|
return n.body != null && !r.has("content-type") && r.set("content-type", "application/json"), e.request(new Request(new URL(t, e.origin), {
|
|
96
48
|
...n,
|
|
97
49
|
headers: r
|
|
98
50
|
}));
|
|
99
51
|
}
|
|
100
|
-
function
|
|
101
|
-
return
|
|
52
|
+
function d(e, t, n) {
|
|
53
|
+
return u(e, "/v1/flows", {
|
|
102
54
|
body: JSON.stringify({
|
|
103
55
|
name: t,
|
|
104
56
|
version: 1
|
|
@@ -107,67 +59,64 @@ function h(e, t, n) {
|
|
|
107
59
|
method: "POST"
|
|
108
60
|
});
|
|
109
61
|
}
|
|
110
|
-
async function
|
|
111
|
-
return
|
|
62
|
+
async function f(e, t, n) {
|
|
63
|
+
return c(await d(e, t, n), 201, "Create Flow");
|
|
112
64
|
}
|
|
113
|
-
function
|
|
114
|
-
return
|
|
65
|
+
function p(e, t, n, r) {
|
|
66
|
+
return u(e, `/v1/flows/${encodeURIComponent(t)}/draft/changes`, {
|
|
115
67
|
body: JSON.stringify({
|
|
116
68
|
expectedRevisionId: n,
|
|
117
|
-
operations:
|
|
118
|
-
flow: {
|
|
119
|
-
graph: { nodes: {} },
|
|
120
|
-
name: "Main"
|
|
121
|
-
},
|
|
122
|
-
flowId: r,
|
|
123
|
-
kind: "flow.create"
|
|
124
|
-
}],
|
|
69
|
+
operations: r,
|
|
125
70
|
version: 1
|
|
126
71
|
}),
|
|
127
72
|
method: "POST"
|
|
128
73
|
});
|
|
129
74
|
}
|
|
130
|
-
|
|
131
|
-
return
|
|
75
|
+
function m(e, t, n, r = "marker") {
|
|
76
|
+
return p(e, t, n, [{
|
|
77
|
+
kind: "graph.node.create",
|
|
78
|
+
node: {
|
|
79
|
+
concurrency: 1,
|
|
80
|
+
inputs: {},
|
|
81
|
+
kind: "value",
|
|
82
|
+
values: { ready: {
|
|
83
|
+
jsonSchema: { type: "boolean" },
|
|
84
|
+
nullable: !1,
|
|
85
|
+
value: !0
|
|
86
|
+
} }
|
|
87
|
+
},
|
|
88
|
+
nodeId: r,
|
|
89
|
+
target: { kind: "flow" }
|
|
90
|
+
}]);
|
|
132
91
|
}
|
|
133
|
-
function
|
|
92
|
+
function h(e, t) {
|
|
134
93
|
return s(a(e.revision, `${t} revision`).revisionId, `${t} revisionId`);
|
|
135
94
|
}
|
|
136
|
-
function
|
|
137
|
-
return
|
|
138
|
-
body: JSON.stringify({
|
|
139
|
-
expectedRevisionId: n,
|
|
140
|
-
operations: r,
|
|
141
|
-
version: 1
|
|
142
|
-
}),
|
|
143
|
-
method: "POST"
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
function x(e, t, r, i, a, o) {
|
|
147
|
-
return m(e, `/v1/projects/${encodeURIComponent(t)}/revisions/${encodeURIComponent(r)}/flows/${encodeURIComponent(i)}/publications`, {
|
|
95
|
+
function g(e, t, r, i, a) {
|
|
96
|
+
return u(e, `/v1/flows/${encodeURIComponent(t)}/revisions/${encodeURIComponent(r)}/publications`, {
|
|
148
97
|
body: JSON.stringify({
|
|
149
98
|
engineContract: n,
|
|
150
|
-
expectedLivePublicationId:
|
|
99
|
+
expectedLivePublicationId: i,
|
|
151
100
|
version: 1
|
|
152
101
|
}),
|
|
153
|
-
headers: { "idempotency-key":
|
|
102
|
+
headers: { "idempotency-key": a },
|
|
154
103
|
method: "POST"
|
|
155
104
|
});
|
|
156
105
|
}
|
|
157
|
-
function
|
|
158
|
-
return
|
|
106
|
+
function _(e, t, n, r, i) {
|
|
107
|
+
return u(e, `/v1/flows/${encodeURIComponent(t)}/publications/${encodeURIComponent(n)}/rollback`, {
|
|
159
108
|
body: JSON.stringify({
|
|
160
|
-
expectedLivePublicationId:
|
|
109
|
+
expectedLivePublicationId: r,
|
|
161
110
|
version: 1
|
|
162
111
|
}),
|
|
163
|
-
headers: { "idempotency-key":
|
|
112
|
+
headers: { "idempotency-key": i },
|
|
164
113
|
method: "POST"
|
|
165
114
|
});
|
|
166
115
|
}
|
|
167
|
-
function
|
|
168
|
-
return
|
|
116
|
+
function v(e, t, n) {
|
|
117
|
+
return u(e, "/v1/runs", {
|
|
169
118
|
body: JSON.stringify({
|
|
170
|
-
inputs:
|
|
119
|
+
inputs: {},
|
|
171
120
|
publicationId: t,
|
|
172
121
|
version: 1
|
|
173
122
|
}),
|
|
@@ -175,49 +124,38 @@ function C(e, t, n, r = {}) {
|
|
|
175
124
|
method: "POST"
|
|
176
125
|
});
|
|
177
126
|
}
|
|
178
|
-
|
|
179
|
-
return s(e.publicationId, `${t} publicationId`);
|
|
180
|
-
}
|
|
181
|
-
var T = [
|
|
127
|
+
var y = [
|
|
182
128
|
{
|
|
183
|
-
name: "creates, replays, lists, reads, and retires a
|
|
129
|
+
name: "creates, replays, lists, reads, renames, and retires a Flow",
|
|
184
130
|
async verify(e) {
|
|
185
|
-
let t = await
|
|
186
|
-
i(t.name, "Control
|
|
187
|
-
let a = await
|
|
188
|
-
i(a.
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
131
|
+
let t = await f(e, "Control flow", "flow-lifecycle"), n = s(t.flowId, "Created Flow flowId"), r = s(t.draftRevisionId, "Created Flow draftRevisionId");
|
|
132
|
+
i(t.name, "Control flow", "Created Flow name"), i(t.status, "active", "Created Flow status"), i(await c(await d(e, "Control flow", "flow-lifecycle"), 200, "Replay Flow"), t, "Replayed Flow"), await l(await d(e, "Different flow", "flow-lifecycle"), 409, "flow.conflict", "Conflicting Flow"), i(await c(await u(e, `/v1/flows/${n}`), 200, "Read Flow"), t, "Read Flow");
|
|
133
|
+
let a = await c(await u(e, "/v1/flows?includeTotal=true"), 200, "List Flows");
|
|
134
|
+
i(a.flows, [t], "Listed Flows"), i(a.total, 1, "Flow total"), i((await c(await u(e, `/v1/flows/${n}`, {
|
|
135
|
+
body: JSON.stringify({
|
|
136
|
+
name: "Renamed flow",
|
|
137
|
+
version: 1
|
|
138
|
+
}),
|
|
139
|
+
method: "PATCH"
|
|
140
|
+
}), 200, "Rename Flow")).name, "Renamed flow", "Renamed Flow name"), i((await c(await u(e, `/v1/flows/${n}`, { method: "DELETE" }), 202, "Retire Flow")).status, "retiring", "Retired Flow status"), await l(await m(e, n, r), 409, "flow.busy", "Mutation after retirement");
|
|
193
141
|
}
|
|
194
142
|
},
|
|
195
143
|
{
|
|
196
|
-
name: "commits immutable Draft Revisions
|
|
144
|
+
name: "commits immutable Draft Revisions for one Flow",
|
|
197
145
|
async verify(e) {
|
|
198
|
-
let t = await
|
|
199
|
-
|
|
200
|
-
let
|
|
201
|
-
i(
|
|
202
|
-
let h = a(a(d.content, "Current Draft content").document, "Current Draft document").flows;
|
|
203
|
-
i(Object.keys(a(h, "Current Draft Flows")), ["main"], "Current Draft Flow ids");
|
|
204
|
-
let b = await f(await m(e, `/v1/projects/${encodeURIComponent(n)}/draft/sync`), 200, "Sync Draft snapshot");
|
|
205
|
-
i(b.kind, "snapshot", "Draft snapshot kind"), i(a(b.draft, "Draft snapshot").revisionId, u, "Draft snapshot revisionId");
|
|
206
|
-
let x = await f(await m(e, `/v1/projects/${encodeURIComponent(n)}/draft/sync?fromRevisionId=${encodeURIComponent(c)}`), 200, "Sync Draft from parent");
|
|
207
|
-
x.kind == "snapshot" ? i(a(x.draft, "Draft sync snapshot").revisionId, u, "Draft sync snapshot revisionId") : x.kind == "changes" ? i(a(a(o(x.revisions, "Draft sync revisions").at(-1), "Last Draft sync revision").revision, "Last Draft sync revision metadata").revisionId, u, "Last Draft sync revisionId") : r(`Draft sync kind: expected changes or snapshot, received ${JSON.stringify(x.kind)}.`);
|
|
208
|
-
let S = o((await f(await m(e, `/v1/projects/${encodeURIComponent(n)}/flows`), 200, "List Draft Flows")).flows, "Projected Flows"), C = a(S[0], "Projected Flow");
|
|
209
|
-
i(S.length, 1, "Projected Flow count"), i(C.flowId, "main", "Projected Flow id"), i(a(C.draft, "Projected Flow Draft").revisionId, u, "Projected Flow Revision");
|
|
146
|
+
let t = await f(e, "Draft flow", "draft-flow"), n = s(t.flowId, "Draft Flow flowId"), r = s(t.draftRevisionId, "Draft Flow revisionId"), o = await c(await m(e, n, r), 200, "Change Draft"), d = h(o, "Changed Draft");
|
|
147
|
+
i(a(o.revision, "Changed Draft revision").parentRevisionId, r, "Changed Draft parent"), await l(await m(e, n, r, "stale"), 412, "flow.revision-conflict", "Stale Draft change"), i(a(a(a(a((await c(await u(e, `/v1/flows/${n}/revisions/${r}`), 200, "Read old Revision")).content, "Old content").document, "Old document").graph, "Old graph").nodes, "Old nodes"), {}, "Old Revision nodes"), i((await c(await u(e, `/v1/flows/${n}/draft`), 200, "Read Draft")).revisionId, d, "Draft revisionId");
|
|
148
|
+
let p = await c(await u(e, `/v1/flows/${n}/draft/sync?fromRevisionId=${r}`), 200, "Sync Draft");
|
|
149
|
+
i(p.kind, "snapshot", "Draft sync kind"), i(a(p.draft, "Draft snapshot").revisionId, d, "Draft snapshot revisionId");
|
|
210
150
|
}
|
|
211
151
|
},
|
|
212
152
|
{
|
|
213
153
|
name: "keeps Presentation CAS independent from the Draft head",
|
|
214
154
|
async verify(e) {
|
|
215
|
-
let t = await
|
|
216
|
-
i((await f(await m(e, a), 200, "Read initial Presentation")).revision, 1, "Initial Presentation revision");
|
|
217
|
-
let o = { nodes: { task: {
|
|
155
|
+
let t = await f(e, "Presentation flow", "presentation-flow"), n = s(t.flowId, "Presentation Flow flowId"), r = s(t.draftRevisionId, "Presentation Flow revisionId"), a = `/v1/flows/${n}/presentation`, o = { nodes: { task: {
|
|
218
156
|
x: 120,
|
|
219
157
|
y: 80
|
|
220
|
-
} } },
|
|
158
|
+
} } }, d = await c(await u(e, a, {
|
|
221
159
|
body: JSON.stringify({
|
|
222
160
|
expectedRevision: 1,
|
|
223
161
|
value: o,
|
|
@@ -225,39 +163,28 @@ var T = [
|
|
|
225
163
|
}),
|
|
226
164
|
method: "PUT"
|
|
227
165
|
}), 200, "Update Presentation");
|
|
228
|
-
i(
|
|
166
|
+
i(d.revision, 2, "Presentation revision"), i(d.value, o, "Presentation value"), await l(await u(e, a, {
|
|
229
167
|
body: JSON.stringify({
|
|
230
168
|
expectedRevision: 1,
|
|
231
169
|
value: {},
|
|
232
170
|
version: 1
|
|
233
171
|
}),
|
|
234
172
|
method: "PUT"
|
|
235
|
-
}), 412, "
|
|
173
|
+
}), 412, "flow.presentation-conflict", "Stale Presentation update"), i((await c(await u(e, `/v1/flows/${n}`), 200, "Read Flow")).draftRevisionId, r, "Draft head");
|
|
236
174
|
}
|
|
237
175
|
},
|
|
238
176
|
{
|
|
239
|
-
name: "validates
|
|
177
|
+
name: "validates, admits, lists, and cancels one Draft Run",
|
|
240
178
|
async verify(e) {
|
|
241
|
-
let t = await
|
|
242
|
-
|
|
243
|
-
engineContract: n,
|
|
244
|
-
version: 1
|
|
245
|
-
}),
|
|
246
|
-
method: "POST"
|
|
247
|
-
}), 200, "Check Flow");
|
|
248
|
-
i(d.projectId, r, "Flow check projectId"), i(d.revisionId, c, "Flow check revisionId"), i(d.revisionDigest, l.digest, "Flow check revision digest"), i(d.flowId, "main", "Flow check flowId"), i(d.engineContract, n, "Flow check Engine Contract"), i(d.modelVersion, 1, "Flow check model version"), i(d.valid, !0, "Flow check validity"), s(d.closureDigest, "Flow check closure digest"), await p(await m(e, `${u}/missing/check`, {
|
|
179
|
+
let t = await f(e, "Run flow", "run-flow"), r = s(t.flowId, "Run Flow flowId"), l = s(t.draftRevisionId, "Run Flow revisionId");
|
|
180
|
+
i((await c(await u(e, `/v1/flows/${r}/revisions/${l}/check`, {
|
|
249
181
|
body: JSON.stringify({
|
|
250
182
|
engineContract: n,
|
|
251
183
|
version: 1
|
|
252
184
|
}),
|
|
253
185
|
method: "POST"
|
|
254
|
-
}),
|
|
255
|
-
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
name: "admits, observes, and cancels one fixed Draft Run",
|
|
259
|
-
async verify(e) {
|
|
260
|
-
let t = await g(e, "Run project", "run-project"), r = s(t.projectId, "Run Project projectId"), c = y(await v(e, r, s(t.draftRevisionId, "Run Project Draft head")), "Run Revision"), l = `/v1/projects/${encodeURIComponent(r)}/revisions/${encodeURIComponent(c)}/flows/main/runs`, u = () => m(e, l, {
|
|
186
|
+
}), 200, "Check Flow")).valid, !0, "Flow validity");
|
|
187
|
+
let d = `/v1/flows/${r}/revisions/${l}/runs`, p = () => u(e, d, {
|
|
261
188
|
body: JSON.stringify({
|
|
262
189
|
engineContract: n,
|
|
263
190
|
inputs: {},
|
|
@@ -265,251 +192,100 @@ var T = [
|
|
|
265
192
|
}),
|
|
266
193
|
headers: { "idempotency-key": "draft-run" },
|
|
267
194
|
method: "POST"
|
|
268
|
-
}),
|
|
269
|
-
i(
|
|
270
|
-
let _ = `/v1/runs/${encodeURIComponent(h)}`;
|
|
271
|
-
i(await f(await m(e, _), 200, "Read Draft Run"), d, "Read Draft Run");
|
|
272
|
-
let b = await f(await m(e, `/v1/projects/${encodeURIComponent(r)}/runs`), 200, "List Draft Runs");
|
|
273
|
-
i(b.projectId, r, "Run list projectId"), i(o(b.runs, "Listed Runs").map((e) => a(e, "Listed Run").runId), [h], "Listed Run ids");
|
|
274
|
-
let x = await f(await m(e, `${_}/events`), 200, "Read queued Run events"), [S] = o(x.events, "Queued Run events");
|
|
275
|
-
i(a(S, "Queued Run event").kind, "run.queued", "Queued Run event kind"), i(x.done, !1, "Queued Run events done"), await p(await m(e, `${_}/result`), 409, "run.not-terminal", "Read pending Run result");
|
|
276
|
-
let C = s((await g(e, "Other project", "other-run-project")).projectId, "Other Project projectId");
|
|
277
|
-
i(o((await f(await m(e, `/v1/projects/${encodeURIComponent(C)}/runs`), 200, "List other Project Runs")).runs, "Other Project Runs"), [], "Run remains scoped to its fixed Project list");
|
|
278
|
-
let w = () => m(e, `${_}/cancel`, {
|
|
195
|
+
}), m = await c(await p(), 202, "Create Draft Run"), h = s(m.runId, "Draft Run runId");
|
|
196
|
+
i(await c(await p(), 200, "Replay Draft Run"), m, "Replayed Draft Run"), i(o((await c(await u(e, `/v1/flows/${r}/runs`), 200, "List Runs")).runs, "Runs").map((e) => a(e, "Run").runId), [h], "Listed Runs"), i((await c(await u(e, `/v1/runs/${h}/cancel`, {
|
|
279
197
|
body: JSON.stringify({ version: 1 }),
|
|
280
198
|
method: "POST"
|
|
281
|
-
});
|
|
282
|
-
i(await f(await w(), 200, "Cancel Draft Run"), {
|
|
283
|
-
cancelAccepted: !0,
|
|
284
|
-
runId: h,
|
|
285
|
-
status: "canceled",
|
|
286
|
-
version: 1
|
|
287
|
-
}, "Canceled Draft Run");
|
|
288
|
-
let T = await f(await m(e, `${_}/result`), 200, "Read canceled Run result");
|
|
289
|
-
i(T.runId, h, "Canceled Run result runId"), i(T.status, "canceled", "Canceled Run result status"), s(T.finishedAt, "Canceled Run result finishedAt");
|
|
290
|
-
let E = await f(await m(e, `${_}/events?after=1`), 200, "Read terminal Run events"), [D] = o(E.events, "Terminal Run events");
|
|
291
|
-
i(a(D, "Terminal Run event").kind, "run.canceled", "Terminal Run event kind"), i(E.done, !0, "Terminal Run events done"), i(await f(await w(), 200, "Replay Run cancellation"), {
|
|
292
|
-
cancelAccepted: !1,
|
|
293
|
-
runId: h,
|
|
294
|
-
status: "canceled",
|
|
295
|
-
version: 1
|
|
296
|
-
}, "Replayed cancellation");
|
|
199
|
+
}), 200, "Cancel Run")).status, "canceled", "Canceled Run status");
|
|
297
200
|
}
|
|
298
201
|
}
|
|
299
|
-
],
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
name: "rolls back immutable history and fixes a Live Run target",
|
|
317
|
-
async verify(e) {
|
|
318
|
-
let t = await g(e, "Rollback project", "rollback-project"), n = s(t.projectId, "Rollback Project projectId"), a = y(await v(e, n, s(t.draftRevisionId, "Rollback Project Draft head")), "First Rollback Revision"), o = await f(await x(e, n, a, "main", null, "rollback-publish-first"), 201, "Publish first Rollback Revision"), c = w(o, "First Rollback Publication"), l = y(await f(await b(e, n, a, [{
|
|
319
|
-
kind: "graph.node.create",
|
|
320
|
-
node: {
|
|
321
|
-
concurrency: 1,
|
|
322
|
-
inputs: {},
|
|
323
|
-
kind: "value",
|
|
324
|
-
values: { ready: {
|
|
325
|
-
jsonSchema: { type: "boolean" },
|
|
326
|
-
nullable: !1,
|
|
327
|
-
value: !0
|
|
328
|
-
} }
|
|
329
|
-
},
|
|
330
|
-
nodeId: "marker",
|
|
331
|
-
target: {
|
|
332
|
-
id: "main",
|
|
333
|
-
kind: "flow"
|
|
334
|
-
}
|
|
335
|
-
}]), 200, "Create second Rollback Revision"), "Second Rollback Revision"), u = await f(await x(e, n, l, "main", c, "rollback-publish-second"), 201, "Publish second Rollback Revision"), d = w(u, "Second Rollback Publication"), h = () => S(e, n, "main", c, d, "rollback-first"), _ = await f(await h(), 201, "Rollback Flow"), T = w(_, "Rollback Publication");
|
|
336
|
-
(T == c || T == d) && r("Rollback must create a new Publication identity."), i(_.operation, "rollback", "Rollback operation"), i(_.sourcePublicationId, c, "Rollback source Publication"), i(_.revisionId, o.revisionId, "Rollback fixed Revision"), i(_.revisionDigest, o.revisionDigest, "Rollback fixed Revision digest"), i(_.closureDigest, o.closureDigest, "Rollback fixed closure digest"), i(_.engineContract, o.engineContract, "Rollback fixed Engine Contract"), i(await f(await h(), 200, "Replay Rollback"), _, "Replayed Rollback"), await p(await S(e, n, "main", c, T, "rollback-first"), 409, "publication.conflict", "Conflicting Rollback replay");
|
|
337
|
-
let E = `/v1/projects/${encodeURIComponent(n)}/flows/main`, D = await f(await m(e, `${E}/live`), 200, "Read rolled back Live");
|
|
338
|
-
i(D.publication, _, "Rolled back Live Publication"), i(D.revision, 3, "Rolled back Live revision"), i(D.hasUnpublishedChanges, !0, "Rolled back Live Draft state"), i((await f(await m(e, `/v1/projects/${encodeURIComponent(n)}`), 200, "Read Rollback Project")).draftRevisionId, l, "Draft head after Rollback");
|
|
339
|
-
let O = await f(await m(e, `${E}/publications?includeTotal=true&limit=2`), 200, "List first Publication page");
|
|
340
|
-
i(O.publications, [_, u], "First Publication page"), i(O.total, 3, "Publication page total");
|
|
341
|
-
let k = s(O.nextCursor, "Publication next cursor"), A = await f(await m(e, `${E}/publications?cursor=${encodeURIComponent(k)}&limit=2`), 200, "List second Publication page");
|
|
342
|
-
i(A.publications, [o], "Second Publication page"), i(A.nextCursor, void 0, "Final Publication cursor");
|
|
343
|
-
let j = () => C(e, T, "rollback-live-run"), M = await f(await j(), 202, "Create rolled back Live Run"), N = s(M.runId, "Rolled back Live Run runId");
|
|
344
|
-
i(M.projectId, n, "Live Run projectId"), i(M.flowId, "main", "Live Run flowId"), i(M.publicationId, T, "Live Run Publication"), i(M.revisionId, a, "Live Run fixed Revision"), i(M.source, "live", "Live Run source"), i(M.status, "queued", "Live Run status"), i(await f(await j(), 200, "Replay Live Run"), M, "Replayed Live Run"), await p(await C(e, T, "rollback-live-run", { changed: {} }), 409, "run.conflict", "Conflicting Live Run replay"), await f(await x(e, n, l, "main", T, "rollback-publish-current"), 201, "Move Live after Run admission"), i(await f(await m(e, `/v1/runs/${encodeURIComponent(N)}`), 200, "Read fixed Live Run"), M, "Live Run after Live moved");
|
|
345
|
-
}
|
|
346
|
-
},
|
|
347
|
-
{
|
|
348
|
-
name: "retires Live when its Flow or Project is retired",
|
|
349
|
-
async verify(e) {
|
|
350
|
-
let t = await g(e, "Deleted Flow project", "deleted-flow-project"), n = s(t.projectId, "Deleted Flow Project projectId"), r = y(await v(e, n, s(t.draftRevisionId, "Deleted Flow Project Draft head")), "Deleted Flow Revision"), a = await f(await x(e, n, r, "main", null, "deleted-flow-publish"), 201, "Publish deleted Flow");
|
|
351
|
-
await f(await b(e, n, r, [{
|
|
352
|
-
flowId: "main",
|
|
353
|
-
kind: "flow.delete"
|
|
354
|
-
}]), 200, "Delete published Flow");
|
|
355
|
-
let o = `/v1/projects/${encodeURIComponent(n)}/flows/main`, c = await f(await m(e, `${o}/live`), 200, "Read deleted Flow Live");
|
|
356
|
-
i(c.publication, null, "Deleted Flow Live Publication"), i(c.revision, 0, "Deleted Flow Live revision"), i(c.status, "not-published", "Deleted Flow Live status"), i(c.hasUnpublishedChanges, !1, "Deleted Flow unpublished state"), i((await f(await m(e, `/v1/projects/${encodeURIComponent(n)}/flows`), 200, "List deleted Flows")).flows, [], "Deleted Flow projection");
|
|
357
|
-
let l = await f(await m(e, `${o}/publications?includeTotal=true`), 200, "List deleted Flow history");
|
|
358
|
-
i(l.publications, [a], "Deleted Flow Publication history"), i(l.total, 1, "Deleted Flow Publication total"), await p(await C(e, w(a, "Deleted Flow Publication"), "deleted-flow-run"), 412, "live.conflict", "Run deleted Flow Publication");
|
|
359
|
-
let u = await g(e, "Retired Live project", "retired-live-project"), d = s(u.projectId, "Retired Live Project projectId"), h = y(await v(e, d, s(u.draftRevisionId, "Retired Live Project Draft head")), "Retired Live Revision"), _ = await f(await x(e, d, h, "main", null, "retired-live-publish"), 201, "Publish retiring Project Flow"), T = w(_, "Retired Live Publication");
|
|
360
|
-
await f(await m(e, `/v1/projects/${encodeURIComponent(d)}`, { method: "DELETE" }), 202, "Retire Live Project");
|
|
361
|
-
let E = `/v1/projects/${encodeURIComponent(d)}/flows/main`, D = await f(await m(e, `${E}/live`), 200, "Read retired Project Live");
|
|
362
|
-
i(D.publication, null, "Retired Project Live Publication"), i(D.revision, 0, "Retired Project Live revision"), i(D.status, "not-published", "Retired Project Live status");
|
|
363
|
-
let O = await f(await m(e, `${E}/publications?includeTotal=true`), 200, "List retired Publication history");
|
|
364
|
-
i(O.publications, [_], "Retired Publication history"), i(O.total, 1, "Retired Publication total"), await p(await C(e, T, "retired-live-run"), 409, "project.busy", "Run retired Live"), await p(await x(e, d, h, "main", null, "retired-live-republish"), 409, "project.busy", "Publish retired Project"), await p(await S(e, d, "main", T, T, "retired-live-rollback"), 409, "project.busy", "Rollback retired Project");
|
|
365
|
-
}
|
|
202
|
+
], b = [{
|
|
203
|
+
name: "publishes one immutable Flow with idempotent Live CAS",
|
|
204
|
+
async verify(e) {
|
|
205
|
+
let t = await f(e, "Publication flow", "publication-flow"), n = s(t.flowId, "Publication Flow flowId"), r = s(t.draftRevisionId, "Publication Flow revisionId");
|
|
206
|
+
i((await c(await u(e, `/v1/flows/${n}/live`), 200, "Read Live")).status, "not-published", "Initial Live status");
|
|
207
|
+
let a = () => g(e, n, r, null, "publication-first"), o = await c(await a(), 201, "Publish Flow"), d = s(o.publicationId, "Publication id");
|
|
208
|
+
i(await c(await a(), 200, "Replay Publish"), o, "Replayed Publication"), await l(await g(e, n, r, d, "publication-first"), 409, "publication.conflict", "Conflicting replay"), i((await c(await u(e, `/v1/flows/${n}/live`), 200, "Read published Live")).publication, o, "Live Publication");
|
|
209
|
+
let p = await c(await u(e, `/v1/flows/${n}/publications?includeTotal=true`), 200, "List Publications");
|
|
210
|
+
i(p.publications, [o], "Publication history"), i(p.total, 1, "Publication total");
|
|
211
|
+
}
|
|
212
|
+
}, {
|
|
213
|
+
name: "rolls back immutable history and fixes a Live Run target",
|
|
214
|
+
async verify(e) {
|
|
215
|
+
let t = await f(e, "Rollback flow", "rollback-flow"), n = s(t.flowId, "Rollback Flow flowId"), r = s(t.draftRevisionId, "Rollback Flow revisionId"), a = s((await c(await g(e, n, r, null, "publish-first"), 201, "Publish first Revision")).publicationId, "First Publication"), o = s((await c(await g(e, n, h(await c(await m(e, n, r), 200, "Change Draft"), "Second Revision"), a, "publish-second"), 201, "Publish second Revision")).publicationId, "Second Publication"), d = () => _(e, n, a, o, "rollback-first"), p = await c(await d(), 201, "Rollback Flow"), y = s(p.publicationId, "Rollback Publication");
|
|
216
|
+
i(p.operation, "rollback", "Rollback operation"), i(p.sourcePublicationId, a, "Rollback source"), i(await c(await d(), 200, "Replay Rollback"), p, "Replayed Rollback");
|
|
217
|
+
let b = await c(await v(e, y, "rollback-run"), 202, "Create Live Run");
|
|
218
|
+
i(b.flowId, n, "Live Run flowId"), i(b.revisionId, r, "Live Run revisionId"), await c(await u(e, `/v1/flows/${n}`, { method: "DELETE" }), 202, "Retire Flow"), await l(await v(e, y, "retired-run"), 409, "flow.busy", "Run retired Flow");
|
|
366
219
|
}
|
|
367
|
-
],
|
|
220
|
+
}], x = [{
|
|
368
221
|
name: "exposes one deployment-scoped Trigger Key catalog",
|
|
369
222
|
async verify(e) {
|
|
370
|
-
let t = await
|
|
371
|
-
i(
|
|
372
|
-
for (let [t, n] of
|
|
373
|
-
let
|
|
374
|
-
|
|
375
|
-
let c = s(n.key, "Trigger Key summary key"), u = await f(await m(e, `/v1/trigger-keys/${encodeURIComponent(c)}`), 200, "Read Trigger Key");
|
|
376
|
-
i(u.definition, a, "Trigger Key detail"), i(u.version, 1, "Trigger Key detail version");
|
|
223
|
+
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"));
|
|
224
|
+
i(r.map((e) => e.key), d.map((e) => e.key), "Trigger catalog identities");
|
|
225
|
+
for (let [t, n] of r.entries()) {
|
|
226
|
+
let r = s(n.key, "Trigger Key");
|
|
227
|
+
i((await c(await u(e, `/v1/trigger-keys/${encodeURIComponent(r)}`), 200, "Read Trigger Key")).definition, d[t], "Trigger detail");
|
|
377
228
|
}
|
|
378
|
-
await
|
|
229
|
+
await l(await u(e, "/v1/trigger-keys/conformance.missing"), 404, "trigger-key.not-found", "Missing Trigger Key");
|
|
379
230
|
}
|
|
380
231
|
}, {
|
|
381
|
-
name: "operates and retires one Live Trigger binding
|
|
232
|
+
name: "operates and retires one Live Trigger binding",
|
|
382
233
|
async verify(e) {
|
|
383
|
-
let t = await
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
name: "Scheduled"
|
|
394
|
-
},
|
|
395
|
-
webhook: {
|
|
396
|
-
inputsDef: [],
|
|
397
|
-
kind: "webhook",
|
|
398
|
-
name: "Incoming"
|
|
399
|
-
}
|
|
400
|
-
} },
|
|
401
|
-
name: "Triggered"
|
|
234
|
+
let t = await f(e, "Trigger flow", "trigger-flow"), n = s(t.flowId, "Trigger Flow flowId"), r = h(await c(await p(e, n, s(t.draftRevisionId, "Trigger Flow revisionId"), [{
|
|
235
|
+
kind: "graph.node.create",
|
|
236
|
+
node: {
|
|
237
|
+
cronTimes: [{
|
|
238
|
+
type: "every",
|
|
239
|
+
unit: "hour",
|
|
240
|
+
value: 1
|
|
241
|
+
}],
|
|
242
|
+
kind: "cron",
|
|
243
|
+
name: "Scheduled"
|
|
402
244
|
},
|
|
403
|
-
|
|
404
|
-
kind: "flow
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
let
|
|
418
|
-
i(D.currentPublicationId, E, "Paused binding current Publication"), i(D.operatorState, "paused", "Paused binding state after Publish"), i(D.runtimeVersion, 3, "Paused binding runtime after Publish"), i((await e.request(new Request(S, { method: "POST" }))).status, 404, "Republished paused Webhook callback status");
|
|
419
|
-
let O = await f(await C("resume"), 200, "Resume Webhook binding");
|
|
420
|
-
i(O.operatorState, "active", "Resumed Webhook operator state"), i(O.runtimeVersion, 4, "Resumed Webhook runtime version"), i((await e.request(new Request(S, { method: "POST" }))).status, 200, "Resumed Webhook callback status"), await p(await m(e, `${h}/test`, {
|
|
245
|
+
nodeId: "cron",
|
|
246
|
+
target: { kind: "flow" }
|
|
247
|
+
}, {
|
|
248
|
+
kind: "graph.node.create",
|
|
249
|
+
node: {
|
|
250
|
+
inputsDef: [],
|
|
251
|
+
kind: "webhook",
|
|
252
|
+
name: "Incoming"
|
|
253
|
+
},
|
|
254
|
+
nodeId: "webhook",
|
|
255
|
+
target: { kind: "flow" }
|
|
256
|
+
}]), 200, "Create Trigger nodes"), "Trigger Revision"), l = s((await c(await g(e, n, r, null, "trigger-publication"), 201, "Publish Trigger Flow")).publicationId, "Trigger Publication"), d = `/v1/flows/${n}/triggers`, m = o((await c(await u(e, d), 200, "List Trigger bindings")).bindings, "Trigger bindings").map((e) => a(e, "Trigger binding"));
|
|
257
|
+
i(m.map((e) => e.triggerNodeId), ["cron", "webhook"], "Trigger binding order");
|
|
258
|
+
for (let e of m) i(e.currentPublicationId, l, "Trigger Publication");
|
|
259
|
+
let _ = `${d}/webhook`, v = s(a((await c(await u(e, _), 200, "Read Webhook")).binding, "Webhook").endpointUrl, "Webhook endpoint"), y = (t) => u(e, `${_}/${t}`, {
|
|
421
260
|
body: JSON.stringify({ version: 1 }),
|
|
422
261
|
method: "POST"
|
|
423
|
-
})
|
|
424
|
-
|
|
425
|
-
i(A.kind, "operator.resumed", "First Trigger Activity kind"), s(A.activityId, "First Trigger Activity id"), s(A.createdAt, "First Trigger Activity createdAt");
|
|
426
|
-
let j = s(k.nextCursor, "First Trigger Activity cursor"), M = await f(await m(e, `${h}/activities?cursor=${encodeURIComponent(j)}&limit=1`), 200, "List second Trigger Activity");
|
|
427
|
-
i(a(o(M.activities, "Second Trigger Activity page")[0], "Second Trigger Activity").kind, "operator.paused", "Second Trigger Activity kind"), i(M.nextCursor, void 0, "Last Trigger Activity cursor"), await p(await m(e, `${l}/cron/activities?cursor=${encodeURIComponent(j)}`), 400, "page.invalid-cursor", "Cross-binding Trigger Activity cursor"), await f(await x(e, n, y(await f(await b(e, n, r, [{
|
|
262
|
+
});
|
|
263
|
+
i((await c(await y("pause"), 200, "Pause Webhook")).operatorState, "paused", "Paused state"), i((await e.request(new Request(v, { method: "POST" }))).status, 404, "Paused callback"), i((await c(await y("resume"), 200, "Resume Webhook")).operatorState, "active", "Resumed state"), i((await e.request(new Request(v, { method: "POST" }))).status, 200, "Resumed callback"), await c(await g(e, n, h(await c(await p(e, n, r, [{
|
|
428
264
|
kind: "graph.node.delete",
|
|
429
265
|
nodeId: "webhook",
|
|
430
|
-
target: {
|
|
431
|
-
|
|
432
|
-
kind: "flow"
|
|
433
|
-
}
|
|
434
|
-
}]), 200, "Delete Webhook Trigger"), "Retired Trigger Revision"), "main", E, "trigger-publication-3"), 201, "Publish retired Webhook Trigger");
|
|
435
|
-
let N = a((await f(await m(e, h), 200, "Read retired Webhook binding")).binding, "Retired Webhook binding");
|
|
436
|
-
i(N.currentPublicationId, void 0, "Retired Webhook current Publication"), i(N.currentRevisionId, void 0, "Retired Webhook current Revision"), i(N.endpointUrl, void 0, "Retired Webhook endpoint URL"), i((await e.request(new Request(S, { method: "POST" }))).status, 404, "Retired Webhook callback status"), await p(await C("pause"), 404, "trigger.not-found", "Pause retired Webhook binding"), i(o((await f(await m(e, `${h}/activities`), 200, "Read retired Trigger Activities")).activities, "Retired Trigger Activities").length, 2, "Retired Trigger Activity count");
|
|
266
|
+
target: { kind: "flow" }
|
|
267
|
+
}]), 200, "Delete Webhook"), "Retired Trigger Revision"), l, "retire-trigger"), 201, "Publish retired Trigger"), i(a((await c(await u(e, _), 200, "Read retired Webhook")).binding, "Retired Webhook").currentPublicationId, void 0, "Retired Publication");
|
|
437
268
|
}
|
|
438
|
-
}],
|
|
439
|
-
name: "projects
|
|
269
|
+
}], S = [{
|
|
270
|
+
name: "projects the deployment Connector catalog and authorized Connections",
|
|
440
271
|
async verify(e) {
|
|
441
|
-
let t =
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
let
|
|
448
|
-
let n = a(e, `Connector Provider ${t}`), r = Object.hasOwn(n, "icon");
|
|
449
|
-
return c(n, [
|
|
450
|
-
"serviceId",
|
|
451
|
-
"serviceName",
|
|
452
|
-
...r ? ["icon"] : []
|
|
453
|
-
], `Connector Provider ${t}`), s(n.serviceId, `Connector Provider ${t} serviceId`), s(n.serviceName, `Connector Provider ${t} serviceName`), r && s(n.icon, `Connector Provider ${t} icon`), n;
|
|
454
|
-
});
|
|
455
|
-
p.length == 0 && r("Connector conformance deployment must expose at least one Provider.");
|
|
456
|
-
let h = await f(await m(e, `${n}/actions`), 200, "List all Connector Actions");
|
|
457
|
-
c(h, [
|
|
458
|
-
"actions",
|
|
459
|
-
"projectId",
|
|
460
|
-
"version"
|
|
461
|
-
], "Complete Connector Action page"), i(h.projectId, t, "Complete Connector Action page projectId"), i(h.version, 1, "Complete Connector Action page version");
|
|
462
|
-
let _ = o(h.actions, "Complete Connector Actions").map((e, t) => d(e, `Complete Connector Action ${t}`));
|
|
463
|
-
_.length == 0 && r("Connector conformance deployment must expose at least one Action.");
|
|
464
|
-
let v = _[0], y = s(v.serviceId, "Selected Connector Action serviceId");
|
|
465
|
-
p.some((e) => e.serviceId == y) || r("Selected Connector Action must refer to a listed Provider.");
|
|
466
|
-
let b = await f(await m(e, `${n}/actions?service=${encodeURIComponent(y)}`), 200, "List Provider Connector Actions");
|
|
467
|
-
c(b, [
|
|
468
|
-
"actions",
|
|
469
|
-
"projectId",
|
|
470
|
-
"version"
|
|
471
|
-
], "Provider Connector Action page"), i(b.projectId, t, "Provider Connector Action page projectId"), i(b.version, 1, "Provider Connector Action page version"), o(b.actions, "Provider Connector Actions").map((e, t) => d(e, `Provider Connector Action ${t}`)).some((e) => e.actionId == v.actionId) || r("Provider Action list must include the selected Action.");
|
|
472
|
-
let x = s(v.name, "Selected Connector Action name"), S = await f(await m(e, `${n}/actions?q=${encodeURIComponent(x)}`), 200, "Search Connector Actions");
|
|
473
|
-
c(S, [
|
|
474
|
-
"actions",
|
|
475
|
-
"projectId",
|
|
476
|
-
"version"
|
|
477
|
-
], "Searched Connector Action page"), i(S.projectId, t, "Searched Connector Action page projectId"), i(S.version, 1, "Searched Connector Action page version"), o(S.actions, "Searched Connector Actions").map((e, t) => d(e, `Searched Connector Action ${t}`)).some((e) => e.actionId == v.actionId) || r("Connector Action search must include an exact name match.");
|
|
478
|
-
let C = s(v.actionId, "Selected Connector Action actionId"), w = await f(await m(e, `${n}/actions/${encodeURIComponent(C)}`), 200, "Read Connector Action");
|
|
479
|
-
c(w, [
|
|
480
|
-
"action",
|
|
481
|
-
"projectId",
|
|
482
|
-
"version"
|
|
483
|
-
], "Connector Action detail"), i(d(w.action, "Connector Action detail Action"), v, "Connector Action detail"), i(w.projectId, t, "Connector Action detail projectId"), i(w.version, 1, "Connector Action detail version");
|
|
484
|
-
let T = await f(await m(e, `${n}/connections/${encodeURIComponent(y)}`), 200, "List Connector Connections");
|
|
485
|
-
c(T, [
|
|
486
|
-
"connections",
|
|
487
|
-
"projectId",
|
|
488
|
-
"serviceId",
|
|
489
|
-
"version"
|
|
490
|
-
], "Connector Connection page"), i(T.projectId, t, "Connector Connection page projectId"), i(T.serviceId, y, "Connector Connection page serviceId"), i(T.version, 1, "Connector Connection page version");
|
|
491
|
-
let E = o(T.connections, "Connector Connections").map((e, t) => l(e, `Connector Connection ${t}`)), D = Object.hasOwn(v, "defaultConnection") ? l(v.defaultConnection, "Selected Connector Action default Connection") : void 0;
|
|
492
|
-
D != null && !E.some((e) => e.connectionId == D.connectionId) && r("Connector Action default Connection must be present in the service Connection list.");
|
|
493
|
-
let O = await f(await m(e, `${n}/connections/${encodeURIComponent(y)}/page`, {
|
|
272
|
+
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"));
|
|
273
|
+
(t.length == 0 || n.length == 0) && r("Connector conformance deployment must expose a Provider and Action.");
|
|
274
|
+
let l = n[0], d = s(l.actionId, "Connector Action id"), f = s(l.serviceId, "Connector Action serviceId");
|
|
275
|
+
t.some((e) => e.serviceId == f) || r("Connector Action must refer to a listed Provider."), i((await c(await u(e, `/v1/connector/actions/${encodeURIComponent(d)}`), 200, "Read Connector Action")).action, l, "Connector Action detail");
|
|
276
|
+
let p = await c(await u(e, `/v1/connector/connections/${encodeURIComponent(f)}`), 200, "List Connector Connections");
|
|
277
|
+
Array.isArray(p.connections) || r("Connector Connections must be an array.");
|
|
278
|
+
let m = await c(await u(e, `/v1/connector/connections/${encodeURIComponent(f)}/page`, {
|
|
494
279
|
body: JSON.stringify({ version: 1 }),
|
|
495
280
|
method: "POST"
|
|
496
|
-
}), 200, "Create Connector Connection page");
|
|
497
|
-
|
|
498
|
-
let k = new URL(s(O.url, "Connector Connection external page URL"));
|
|
499
|
-
k.protocol != "http:" && k.protocol != "https:" && r("Connector Connection external page URL must use HTTP."), i(O.version, 1, "Connector Connection external page version");
|
|
281
|
+
}), 200, "Create Connector Connection page"), h = new URL(s(m.url, "Connector Connection page URL"));
|
|
282
|
+
h.protocol != "http:" && h.protocol != "https:" && r("Connector Connection page URL must use HTTP.");
|
|
500
283
|
}
|
|
501
284
|
}, {
|
|
502
|
-
name: "rejects invalid
|
|
285
|
+
name: "rejects invalid Connector discovery requests",
|
|
503
286
|
async verify(e) {
|
|
504
|
-
|
|
505
|
-
await p(await m(e, `${n}/actions?service=mail&q=send`), 400, "project.invalid", "Conflicting Connector Action query"), await p(await m(e, `${n}/actions?q=%20%20`), 400, "project.invalid", "Empty Connector Action query"), await p(await m(e, `${n}/actions?q=${"a".repeat(257)}`), 400, "project.invalid", "Oversized Connector Action query"), await p(await m(e, `${n}/connections/${"a".repeat(257)}`), 400, "project.invalid", "Oversized Connector service"), await p(await m(e, `${n}/connections/mail/page`, {
|
|
506
|
-
body: JSON.stringify({
|
|
507
|
-
extra: !0,
|
|
508
|
-
version: 1
|
|
509
|
-
}),
|
|
510
|
-
method: "POST"
|
|
511
|
-
}), 400, "project.invalid", "Malformed Connector Connection page"), await p(await m(e, "/v1/projects/00000000-0000-7000-8000-000000000000/connector/providers"), 404, "project.not-found", "Out-of-scope Connector Project"), await p(await m(e, `${n}/actions/conformance.missing`), 404, "connector.action-not-found", "Missing Connector Action");
|
|
287
|
+
await l(await u(e, "/v1/connector/actions?service=mail&q=send"), 400, "flow.invalid", "Conflicting Connector query"), await l(await u(e, "/v1/connector/actions?q=%20%20"), 400, "flow.invalid", "Empty Connector query"), await l(await u(e, `/v1/connector/connections/${"a".repeat(257)}`), 400, "flow.invalid", "Oversized Connector service"), await l(await u(e, "/v1/connector/actions/conformance.missing"), 404, "connector.action-not-found", "Missing Connector Action");
|
|
512
288
|
}
|
|
513
289
|
}];
|
|
514
290
|
//#endregion
|
|
515
|
-
export {
|
|
291
|
+
export { S as connectorControlApiConformanceCases, y as controlApiConformanceCases, b as publicationControlApiConformanceCases, x as triggerControlApiConformanceCases };
|