@w6w/embed 0.2.0 → 0.2.11
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/{ConfirmModal-RLbZT5_k.js → ConfirmModal-BE-SdX-O.js} +53 -49
- package/dist/{ConfirmModal-RLbZT5_k.js.map → ConfirmModal-BE-SdX-O.js.map} +1 -1
- package/dist/{CreateFunctionModal-DRsFx-FB.js → CreateFunctionModal-D6CQLpa_.js} +25 -25
- package/dist/{CreateFunctionModal-DRsFx-FB.js.map → CreateFunctionModal-D6CQLpa_.js.map} +1 -1
- package/dist/{DocumentFormModal-BExK1V-B.js → DocumentFormModal-YauVdolr.js} +5 -5
- package/dist/{DocumentFormModal-BExK1V-B.js.map → DocumentFormModal-YauVdolr.js.map} +1 -1
- package/dist/{ImportSpecModal-BDQIf6rg.js → ImportSpecModal-B7qd1Km2.js} +3 -3
- package/dist/{ImportSpecModal-BDQIf6rg.js.map → ImportSpecModal-B7qd1Km2.js.map} +1 -1
- package/dist/ModelRoutesManager-BGESQahw.js +345 -0
- package/dist/ModelRoutesManager-BGESQahw.js.map +1 -0
- package/dist/WorkflowEditor-CwvmAGp2.js +925 -0
- package/dist/WorkflowEditor-CwvmAGp2.js.map +1 -0
- package/dist/{apps-1FNUwbGv.js → apps-CboASBKr.js} +14 -14
- package/dist/{apps-1FNUwbGv.js.map → apps-CboASBKr.js.map} +1 -1
- package/dist/{callables-3mFrMVG_.js → callables-tOlflvbl.js} +11 -11
- package/dist/{callables-3mFrMVG_.js.map → callables-tOlflvbl.js.map} +1 -1
- package/dist/chrome/ConfirmModal.d.ts +4 -1
- package/dist/chrome/workspace.d.ts +4 -0
- package/dist/{coerce-input-BicYr7nc.js → coerce-input-DttlcSdO.js} +70 -58
- package/dist/coerce-input-DttlcSdO.js.map +1 -0
- package/dist/connections-D7cgXhDS.js +119 -0
- package/dist/connections-D7cgXhDS.js.map +1 -0
- package/dist/credentials-DaQU3Ca_.js +171 -0
- package/dist/credentials-DaQU3Ca_.js.map +1 -0
- package/dist/document-sources-UCwe8x77.js +91 -0
- package/dist/document-sources-UCwe8x77.js.map +1 -0
- package/dist/draft.mjs +1 -1
- package/dist/editor/BindingBanner.d.ts +13 -0
- package/dist/editor/CallableEditorFrame.d.ts +7 -0
- package/dist/editor/EndpointCards.d.ts +4 -1
- package/dist/editor/PublishControl.d.ts +19 -0
- package/dist/editor/TargetSelector.d.ts +15 -0
- package/dist/editor/TargetSelector.types.d.ts +2 -0
- package/dist/editor/definition.d.ts +2 -0
- package/dist/{editor-apps-BdenSV1o.js → editor-apps-BUZWld-m.js} +5 -5
- package/dist/{editor-apps-BdenSV1o.js.map → editor-apps-BUZWld-m.js.map} +1 -1
- package/dist/{editor-tools-RxmY5iyi.js → editor-tools-B_Lfx3kw.js} +11 -11
- package/dist/editor-tools-B_Lfx3kw.js.map +1 -0
- package/dist/editor.mjs +1 -1
- package/dist/editors.mjs +769 -622
- package/dist/editors.mjs.map +1 -1
- package/dist/{endpoints-B2ynbZo-.js → endpoints-DSRo1Lc5.js} +113 -107
- package/dist/endpoints-DSRo1Lc5.js.map +1 -0
- package/dist/fields-DvS8XZFc.js +21 -0
- package/dist/fields-DvS8XZFc.js.map +1 -0
- package/dist/forms/ModelBudgetsManager.d.ts +9 -0
- package/dist/forms/ModelRoutesManager.d.ts +14 -0
- package/dist/forms.d.ts +4 -0
- package/dist/forms.mjs +611 -212
- package/dist/forms.mjs.map +1 -1
- package/dist/index.mjs +119 -112
- package/dist/index.mjs.map +1 -1
- package/dist/lib/binding-problems.d.ts +38 -0
- package/dist/lib/code-rail.d.ts +4 -2
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/invoke-error.d.ts +1 -0
- package/dist/lib/sdk-snippets.d.ts +1 -1
- package/dist/lib/target-fields.d.ts +8 -0
- package/dist/lib/trigger-preview.d.ts +1 -0
- package/dist/lib/workflow-live-run.d.ts +9 -2
- package/dist/lib/workflow-nodes.d.ts +5 -0
- package/dist/lib/workflow-validity.d.ts +1 -0
- package/dist/lib.mjs +72 -70
- package/dist/lists/ConnectionDependents.d.ts +31 -0
- package/dist/lists/ConnectionDetail.d.ts +4 -1
- package/dist/lists/ConnectionList.d.ts +4 -1
- package/dist/lists/CredentialDetail.d.ts +15 -0
- package/dist/lists/CredentialList.d.ts +14 -0
- package/dist/lists/ModelCatalog.d.ts +12 -0
- package/dist/lists/ModelUsage.d.ts +12 -0
- package/dist/lists.d.ts +8 -0
- package/dist/lists.mjs +1322 -604
- package/dist/lists.mjs.map +1 -1
- package/dist/models-bAayQPJ_.js +270 -0
- package/dist/models-bAayQPJ_.js.map +1 -0
- package/dist/{project-context-BiCjv_E3.js → project-context-Tvp-La7A.js} +3 -3
- package/dist/{project-context-BiCjv_E3.js.map → project-context-Tvp-La7A.js.map} +1 -1
- package/dist/rail.mjs +4 -4
- package/dist/repos/agents-studio-agents.d.ts +52 -0
- package/dist/repos/agents-studio-assets.d.ts +68 -0
- package/dist/repos/connections.d.ts +30 -12
- package/dist/repos/credentials.d.ts +83 -0
- package/dist/repos/endpoints.d.ts +9 -3
- package/dist/repos/fields.d.ts +34 -0
- package/dist/repos/functions.d.ts +7 -5
- package/dist/repos/index.d.ts +5 -0
- package/dist/repos/models.d.ts +289 -0
- package/dist/repos.mjs +613 -176
- package/dist/repos.mjs.map +1 -1
- package/dist/{slug-C4ktDPdy.js → slug-BVdgiP_L.js} +64 -60
- package/dist/slug-BVdgiP_L.js.map +1 -0
- package/dist/{spec-export-Cf3VQSQS.js → spec-export-CBbloO_n.js} +7 -7
- package/dist/{spec-export-Cf3VQSQS.js.map → spec-export-CBbloO_n.js.map} +1 -1
- package/dist/{spec-import-CjmxyZDR.js → spec-import-CW6R_Wk1.js} +160 -156
- package/dist/spec-import-CW6R_Wk1.js.map +1 -0
- package/dist/theme-context-E2ZhlXDX.js +6 -0
- package/dist/theme-context-E2ZhlXDX.js.map +1 -0
- package/dist/theme-context.d.ts +2 -0
- package/dist/trigger-preview-DKxfjzUY.js +145 -0
- package/dist/trigger-preview-DKxfjzUY.js.map +1 -0
- package/dist/{use-callable-draft-zHLpcr-b.js → use-callable-draft-DsALnSfF.js} +22 -22
- package/dist/{use-callable-draft-zHLpcr-b.js.map → use-callable-draft-DsALnSfF.js.map} +1 -1
- package/dist/{workflow-blank-DyL3_RUA.js → workflow-blank-DFpGObrn.js} +6 -6
- package/dist/{workflow-blank-DyL3_RUA.js.map → workflow-blank-DFpGObrn.js.map} +1 -1
- package/package.json +1 -1
- package/src/styles.css +2 -6
- package/dist/WorkflowEditor-DlbVv6Fs.js +0 -854
- package/dist/WorkflowEditor-DlbVv6Fs.js.map +0 -1
- package/dist/coerce-input-BicYr7nc.js.map +0 -1
- package/dist/connections-CjjYeRqb.js +0 -78
- package/dist/connections-CjjYeRqb.js.map +0 -1
- package/dist/document-sources-C0grrtdq.js +0 -86
- package/dist/document-sources-C0grrtdq.js.map +0 -1
- package/dist/editor-tools-RxmY5iyi.js.map +0 -1
- package/dist/endpoints-B2ynbZo-.js.map +0 -1
- package/dist/slug-C4ktDPdy.js.map +0 -1
- package/dist/spec-import-CjmxyZDR.js.map +0 -1
- package/dist/trigger-preview-VPkrryDl.js +0 -120
- package/dist/trigger-preview-VPkrryDl.js.map +0 -1
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import { useQueryClient as c, useMutation as a, useQuery as y } from "@tanstack/react-query";
|
|
2
2
|
import { u as i } from "./client-context-CX61Bgw-.js";
|
|
3
|
-
import { isTerminalRunStatus as g, path as
|
|
4
|
-
import { i as
|
|
5
|
-
const p = "Step failed without reporting a reason.", C = "Run failed without reporting a reason.";
|
|
3
|
+
import { isTerminalRunStatus as g, path as b } from "@w6w/sdk";
|
|
4
|
+
import { i as C } from "./spec-import-invalidation-D3retX4Q.js";
|
|
6
5
|
function E(t) {
|
|
6
|
+
return (t == null ? void 0 : t.nodes) ?? (t == null ? void 0 : t.steps) ?? void 0;
|
|
7
|
+
}
|
|
8
|
+
const p = "Node failed without reporting a reason.", A = "Run failed without reporting a reason.";
|
|
9
|
+
function K(t) {
|
|
7
10
|
return t === void 0 || !g(t);
|
|
8
11
|
}
|
|
9
|
-
function
|
|
12
|
+
function F(t, e) {
|
|
10
13
|
return e || t === void 0 ? !1 : !g(t);
|
|
11
14
|
}
|
|
12
|
-
function
|
|
13
|
-
return
|
|
15
|
+
function et(t, e) {
|
|
16
|
+
return F(t, e) ? t === "queued" ? "Queued…" : "Running…" : "Run";
|
|
14
17
|
}
|
|
15
|
-
function
|
|
18
|
+
function nt(t) {
|
|
16
19
|
return t === "run_not_cancelable" ? "reconcile" : "surface";
|
|
17
20
|
}
|
|
18
|
-
function
|
|
21
|
+
function Q(t) {
|
|
19
22
|
return t ? Object.entries(t).map(([e, n]) => ({
|
|
20
23
|
id: e,
|
|
21
24
|
status: n.status,
|
|
@@ -24,10 +27,10 @@ function K(t) {
|
|
|
24
27
|
input: n.input,
|
|
25
28
|
output: n.output,
|
|
26
29
|
...n.meta !== void 0 && n.meta !== null ? { meta: n.meta } : {},
|
|
27
|
-
...
|
|
30
|
+
...M(n)
|
|
28
31
|
})) : [];
|
|
29
32
|
}
|
|
30
|
-
function
|
|
33
|
+
function M(t) {
|
|
31
34
|
const e = w(t.error);
|
|
32
35
|
return e ? { error: e } : t.status === "failed" ? { error: { message: p } } : {};
|
|
33
36
|
}
|
|
@@ -35,7 +38,7 @@ function w(t) {
|
|
|
35
38
|
if (t != null) {
|
|
36
39
|
if (typeof t == "string" && t !== "") return { message: t };
|
|
37
40
|
if (typeof t == "object") {
|
|
38
|
-
const e = t, n = typeof e.code == "string" ? e.code : void 0, o = typeof e.message == "string" && e.message !== "" ? e.message : n ||
|
|
41
|
+
const e = t, n = typeof e.code == "string" ? e.code : void 0, o = typeof e.message == "string" && e.message !== "" ? e.message : n || D(t);
|
|
39
42
|
return {
|
|
40
43
|
...n !== void 0 ? { code: n } : {},
|
|
41
44
|
message: o || "Unknown error.",
|
|
@@ -46,81 +49,81 @@ function w(t) {
|
|
|
46
49
|
return { message: String(t) || "Unknown error." };
|
|
47
50
|
}
|
|
48
51
|
}
|
|
49
|
-
function
|
|
52
|
+
function D(t) {
|
|
50
53
|
try {
|
|
51
54
|
return JSON.stringify(t) ?? "";
|
|
52
55
|
} catch {
|
|
53
56
|
return "";
|
|
54
57
|
}
|
|
55
58
|
}
|
|
56
|
-
function
|
|
59
|
+
function ot(t, e) {
|
|
57
60
|
if (!t) return {};
|
|
58
|
-
const n = new Set(e.filter((
|
|
59
|
-
e.filter((
|
|
60
|
-
),
|
|
61
|
-
stepId:
|
|
62
|
-
error: w(
|
|
63
|
-
})), u = w(t.error), l = (
|
|
64
|
-
let d = e.some((
|
|
65
|
-
return !d && t.status === "failed" && n.size === 0 &&
|
|
61
|
+
const n = new Set(e.filter((r) => r.error !== void 0).map((r) => r.id)), o = new Set(
|
|
62
|
+
e.filter((r) => r.error !== void 0 && r.error.message !== p).map((r) => r.id)
|
|
63
|
+
), s = (t.stepErrors ?? []).map((r) => ({ e: r, id: r.nodeId ?? r.stepId ?? "" })).filter(({ id: r }) => !o.has(r)).map(({ e: r, id: v }) => ({
|
|
64
|
+
stepId: v,
|
|
65
|
+
error: w(r.error) ?? { message: p }
|
|
66
|
+
})), u = w(t.error), l = (r) => u !== void 0 && (r == null ? void 0 : r.message) === u.message && (r == null ? void 0 : r.code) === u.code;
|
|
67
|
+
let d = e.some((r) => l(r.error)) || s.some((r) => l(r.error)) ? void 0 : u;
|
|
68
|
+
return !d && t.status === "failed" && n.size === 0 && s.length === 0 && (d = { message: A }), {
|
|
66
69
|
...d ? { runError: d } : {},
|
|
67
|
-
...
|
|
70
|
+
...s.length > 0 ? { stepErrors: s } : {}
|
|
68
71
|
};
|
|
69
72
|
}
|
|
70
|
-
function
|
|
73
|
+
function I(t) {
|
|
71
74
|
var n;
|
|
72
75
|
const e = (n = t == null ? void 0 : t[t.length - 1]) == null ? void 0 : n.with;
|
|
73
76
|
if (!(e === null || typeof e != "object" || Array.isArray(e)))
|
|
74
77
|
return e;
|
|
75
78
|
}
|
|
76
|
-
async function
|
|
79
|
+
async function rt(t, e) {
|
|
77
80
|
if (t)
|
|
78
81
|
try {
|
|
79
|
-
return
|
|
82
|
+
return I(await e(t));
|
|
80
83
|
} catch {
|
|
81
84
|
return;
|
|
82
85
|
}
|
|
83
86
|
}
|
|
84
|
-
const
|
|
87
|
+
const st = {
|
|
85
88
|
status: "",
|
|
86
89
|
kind: "",
|
|
87
90
|
from: "",
|
|
88
91
|
to: "",
|
|
89
92
|
q: "",
|
|
90
93
|
offset: 0
|
|
91
|
-
}, q = 25,
|
|
94
|
+
}, q = 25, T = /* @__PURE__ */ new Set([
|
|
92
95
|
"queued",
|
|
93
96
|
"running",
|
|
94
97
|
"succeeded",
|
|
95
98
|
"failed",
|
|
96
99
|
"canceled"
|
|
97
|
-
]),
|
|
100
|
+
]), N = /* @__PURE__ */ new Set(["function", "endpoint", "workflow"]), _ = /^\d{4}-\d{2}-\d{2}$/;
|
|
98
101
|
function m(t) {
|
|
99
|
-
if (!
|
|
100
|
-
const { y: e, m: n, d: o } = h(t),
|
|
101
|
-
return
|
|
102
|
+
if (!_.test(t)) return !1;
|
|
103
|
+
const { y: e, m: n, d: o } = h(t), s = new Date(e, n - 1, o);
|
|
104
|
+
return s.getFullYear() === e && s.getMonth() === n - 1 && s.getDate() === o;
|
|
102
105
|
}
|
|
103
106
|
function h(t) {
|
|
104
107
|
const [e, n, o] = t.split("-").map(Number);
|
|
105
108
|
return { y: e, m: n, d: o };
|
|
106
109
|
}
|
|
107
|
-
function
|
|
108
|
-
const e = new URLSearchParams(t), n = e.get("status") ?? "", o = e.get("kind") ?? "",
|
|
110
|
+
function it(t) {
|
|
111
|
+
const e = new URLSearchParams(t), n = e.get("status") ?? "", o = e.get("kind") ?? "", s = e.get("from") ?? "", u = e.get("to") ?? "", l = e.get("q") ?? "", f = e.get("offset");
|
|
109
112
|
let d = 0;
|
|
110
113
|
if (f !== null) {
|
|
111
|
-
const
|
|
112
|
-
Number.isInteger(
|
|
114
|
+
const r = Number(f);
|
|
115
|
+
Number.isInteger(r) && r >= 0 && (d = r);
|
|
113
116
|
}
|
|
114
117
|
return {
|
|
115
|
-
status:
|
|
116
|
-
kind:
|
|
117
|
-
from: m(
|
|
118
|
+
status: T.has(n) ? n : "",
|
|
119
|
+
kind: N.has(o) ? o : "",
|
|
120
|
+
from: m(s) ? s : "",
|
|
118
121
|
to: m(u) ? u : "",
|
|
119
122
|
q: l,
|
|
120
123
|
offset: d
|
|
121
124
|
};
|
|
122
125
|
}
|
|
123
|
-
function
|
|
126
|
+
function ut(t) {
|
|
124
127
|
const e = new URLSearchParams();
|
|
125
128
|
t.status !== "" && e.set("status", t.status), t.kind !== "" && e.set("kind", t.kind), t.from !== "" && e.set("from", t.from), t.to !== "" && e.set("to", t.to), t.q !== "" && e.set("q", t.q), t.offset > 0 && e.set("offset", String(t.offset));
|
|
126
129
|
const n = e.toString();
|
|
@@ -136,8 +139,8 @@ function k(t, e, n) {
|
|
|
136
139
|
const { y: u, m: l, d: f } = h(e.to);
|
|
137
140
|
o.to = new Date(u, l - 1, f + 1).toISOString();
|
|
138
141
|
}
|
|
139
|
-
const
|
|
140
|
-
return
|
|
142
|
+
const s = e.q.trim();
|
|
143
|
+
return s !== "" && (o.q = s), n.paged && (o.limit = String(n.limit ?? q), e.offset > 0 && (o.offset = String(e.offset))), o;
|
|
141
144
|
}
|
|
142
145
|
const R = {
|
|
143
146
|
root: ["history"],
|
|
@@ -154,35 +157,35 @@ const R = {
|
|
|
154
157
|
return ["history", "detail", t, e];
|
|
155
158
|
}
|
|
156
159
|
};
|
|
157
|
-
function
|
|
160
|
+
function at(t, e, n, o = q) {
|
|
158
161
|
return t.request({
|
|
159
162
|
method: "GET",
|
|
160
163
|
path: "/history",
|
|
161
164
|
query: k(e, n, { paged: !0, limit: o })
|
|
162
|
-
}).then((
|
|
165
|
+
}).then((s) => s.body);
|
|
163
166
|
}
|
|
164
|
-
function
|
|
167
|
+
function ct(t, e, n) {
|
|
165
168
|
return t.request({
|
|
166
169
|
method: "GET",
|
|
167
170
|
path: "/history/stats",
|
|
168
171
|
query: k(e, n, { paged: !1 })
|
|
169
172
|
}).then((o) => o.body.stats);
|
|
170
173
|
}
|
|
171
|
-
async function
|
|
174
|
+
async function lt(t, e) {
|
|
172
175
|
if (e.kind === "workflow") {
|
|
173
|
-
const
|
|
176
|
+
const s = await t.console.workflows.getRun(e.id);
|
|
174
177
|
return {
|
|
175
178
|
id: e.id,
|
|
176
179
|
kind: "workflow",
|
|
177
180
|
callableName: e.callableName,
|
|
178
|
-
status:
|
|
181
|
+
status: s.status,
|
|
179
182
|
startedAt: e.startedAt,
|
|
180
183
|
finishedAt: e.finishedAt,
|
|
181
184
|
durationMs: e.durationMs,
|
|
182
|
-
input:
|
|
183
|
-
output:
|
|
184
|
-
error:
|
|
185
|
-
steps:
|
|
185
|
+
input: s.variables,
|
|
186
|
+
output: s.output,
|
|
187
|
+
error: s.error,
|
|
188
|
+
steps: Q(E(s))
|
|
186
189
|
};
|
|
187
190
|
}
|
|
188
191
|
const o = (await t.request({
|
|
@@ -202,50 +205,50 @@ async function at(t, e) {
|
|
|
202
205
|
error: o.error
|
|
203
206
|
};
|
|
204
207
|
}
|
|
205
|
-
const
|
|
206
|
-
function
|
|
208
|
+
const j = /* @__PURE__ */ new Set(["succeeded", "failed", "canceled"]);
|
|
209
|
+
function L(t) {
|
|
207
210
|
return new Promise((e) => setTimeout(e, t));
|
|
208
211
|
}
|
|
209
|
-
async function
|
|
212
|
+
async function O(t, e = L) {
|
|
210
213
|
for (let n = 0; n < 600; n++) {
|
|
211
214
|
const o = await t();
|
|
212
|
-
if (
|
|
215
|
+
if (j.has(o.status)) return o;
|
|
213
216
|
await e(500);
|
|
214
217
|
}
|
|
215
218
|
return t();
|
|
216
219
|
}
|
|
217
|
-
const
|
|
218
|
-
function
|
|
220
|
+
const P = (t) => ["workflows", t];
|
|
221
|
+
function W(t, e) {
|
|
219
222
|
return t.workflows.list({ project: e });
|
|
220
223
|
}
|
|
221
|
-
function
|
|
224
|
+
function ft(t, e = !0) {
|
|
222
225
|
const n = i();
|
|
223
226
|
return y({
|
|
224
|
-
queryKey:
|
|
225
|
-
queryFn: () =>
|
|
227
|
+
queryKey: P(t),
|
|
228
|
+
queryFn: () => W(n, t),
|
|
226
229
|
enabled: e
|
|
227
230
|
});
|
|
228
231
|
}
|
|
229
|
-
const
|
|
230
|
-
function
|
|
232
|
+
const U = (t) => ["workflow", t];
|
|
233
|
+
function x(t, e) {
|
|
231
234
|
return t.workflows.get(e);
|
|
232
235
|
}
|
|
233
|
-
function
|
|
236
|
+
function dt(t, e = !0) {
|
|
234
237
|
const n = i();
|
|
235
238
|
return y({
|
|
236
|
-
queryKey:
|
|
237
|
-
queryFn: () =>
|
|
239
|
+
queryKey: U(t),
|
|
240
|
+
queryFn: () => x(n, t),
|
|
238
241
|
enabled: e
|
|
239
242
|
});
|
|
240
243
|
}
|
|
241
|
-
function
|
|
244
|
+
function yt(t) {
|
|
242
245
|
const e = i(), n = c();
|
|
243
246
|
return a({
|
|
244
247
|
mutationFn: (o) => t ? e.console.workflows.upsert(o, { project: t }) : Promise.reject(new Error("No project selected yet.")),
|
|
245
248
|
onSuccess: () => n.invalidateQueries({ queryKey: ["workflows"] })
|
|
246
249
|
});
|
|
247
250
|
}
|
|
248
|
-
function
|
|
251
|
+
function mt(t) {
|
|
249
252
|
const e = i(), n = c();
|
|
250
253
|
return a({
|
|
251
254
|
mutationFn: (o) => t ? e.console.workflows.upsert(o.definition, {
|
|
@@ -255,14 +258,14 @@ function dt(t) {
|
|
|
255
258
|
onSuccess: () => n.invalidateQueries({ queryKey: ["workflows"] })
|
|
256
259
|
});
|
|
257
260
|
}
|
|
258
|
-
function
|
|
261
|
+
function pt() {
|
|
259
262
|
const t = i(), e = c();
|
|
260
263
|
return a({
|
|
261
264
|
mutationFn: (n) => t.workflows.archive(n),
|
|
262
265
|
onSuccess: () => e.invalidateQueries({ queryKey: ["workflows"] })
|
|
263
266
|
});
|
|
264
267
|
}
|
|
265
|
-
function
|
|
268
|
+
function wt() {
|
|
266
269
|
const t = i(), e = c();
|
|
267
270
|
return a({
|
|
268
271
|
mutationFn: (n) => t.workflows.delete(n),
|
|
@@ -270,84 +273,84 @@ function mt() {
|
|
|
270
273
|
});
|
|
271
274
|
}
|
|
272
275
|
const S = (t) => ["runs", t];
|
|
273
|
-
function
|
|
276
|
+
function ht(t) {
|
|
274
277
|
const e = i();
|
|
275
278
|
return y({
|
|
276
279
|
queryKey: S(t),
|
|
277
280
|
queryFn: () => e.console.workflows.listRuns(t)
|
|
278
281
|
});
|
|
279
282
|
}
|
|
280
|
-
function
|
|
281
|
-
return t.workflows.run(e, { variables: n, input: o, allowUnpublished: !0 }).then((
|
|
283
|
+
function H(t, e, n, o) {
|
|
284
|
+
return t.workflows.run(e, { variables: n, input: o, allowUnpublished: !0 }).then((s) => O(() => t.console.workflows.getRun(s.runId)));
|
|
282
285
|
}
|
|
283
|
-
function
|
|
286
|
+
function St() {
|
|
284
287
|
const t = i(), e = c();
|
|
285
288
|
return a({
|
|
286
|
-
mutationFn: (n) =>
|
|
289
|
+
mutationFn: (n) => H(t, n.id, n.variables, n.input),
|
|
287
290
|
onSuccess: (n, o) => e.invalidateQueries({ queryKey: S(o.id) }),
|
|
288
291
|
onSettled: () => e.invalidateQueries({ queryKey: R.root })
|
|
289
292
|
});
|
|
290
293
|
}
|
|
291
|
-
function
|
|
294
|
+
function gt(t, e, n, o) {
|
|
292
295
|
return t.workflows.run(e, { variables: n, input: o, wait: !0 });
|
|
293
296
|
}
|
|
294
|
-
function
|
|
295
|
-
return t.workflows.run(e, { variables: n, input: o, allowUnpublished: !0 }).then((
|
|
297
|
+
function G(t, e, n, o) {
|
|
298
|
+
return t.workflows.run(e, { variables: n, input: o, allowUnpublished: !0 }).then((s) => ({ runId: s.runId }));
|
|
296
299
|
}
|
|
297
|
-
function
|
|
300
|
+
function qt() {
|
|
298
301
|
const t = i(), e = c();
|
|
299
302
|
return a({
|
|
300
|
-
mutationFn: (n) =>
|
|
303
|
+
mutationFn: (n) => G(t, n.id, n.variables, n.input),
|
|
301
304
|
onSuccess: (n, o) => e.invalidateQueries({ queryKey: S(o.id) }),
|
|
302
305
|
onSettled: () => e.invalidateQueries({ queryKey: R.root })
|
|
303
306
|
});
|
|
304
307
|
}
|
|
305
|
-
function
|
|
308
|
+
function Y(t, e) {
|
|
306
309
|
return t.workflows.cancel(e);
|
|
307
310
|
}
|
|
308
|
-
function
|
|
311
|
+
function kt() {
|
|
309
312
|
const t = i();
|
|
310
313
|
return a({
|
|
311
|
-
mutationFn: (e) =>
|
|
314
|
+
mutationFn: (e) => Y(t, e)
|
|
312
315
|
});
|
|
313
316
|
}
|
|
314
|
-
function
|
|
317
|
+
function $(t, e) {
|
|
315
318
|
return t.console.workflows.getRun(e);
|
|
316
319
|
}
|
|
317
|
-
const
|
|
318
|
-
function
|
|
320
|
+
const J = (t) => ["run", t];
|
|
321
|
+
function Rt(t) {
|
|
319
322
|
const e = i();
|
|
320
323
|
return y({
|
|
321
|
-
queryKey:
|
|
322
|
-
queryFn: () =>
|
|
324
|
+
queryKey: J(t ?? ""),
|
|
325
|
+
queryFn: () => $(e, t),
|
|
323
326
|
enabled: t != null,
|
|
324
327
|
refetchInterval: (n) => {
|
|
325
328
|
var o;
|
|
326
|
-
return
|
|
329
|
+
return K((o = n.state.data) == null ? void 0 : o.status) ? 500 : !1;
|
|
327
330
|
}
|
|
328
331
|
});
|
|
329
332
|
}
|
|
330
|
-
function
|
|
333
|
+
function vt(t) {
|
|
331
334
|
return t.shared ? t.sourceRepo == null ? "pending" : "synced" : "private";
|
|
332
335
|
}
|
|
333
|
-
function
|
|
336
|
+
function V(t) {
|
|
334
337
|
return ["documents", t];
|
|
335
338
|
}
|
|
336
|
-
function
|
|
339
|
+
function z(t, e) {
|
|
337
340
|
return ["documents", "detail", t, e];
|
|
338
341
|
}
|
|
339
|
-
function
|
|
342
|
+
function bt(t, e, n = !0) {
|
|
340
343
|
const o = i();
|
|
341
344
|
return y({
|
|
342
|
-
queryKey:
|
|
345
|
+
queryKey: z(t, e),
|
|
343
346
|
queryFn: async () => await o.documents.get(t, { project: e }),
|
|
344
347
|
enabled: n
|
|
345
348
|
});
|
|
346
349
|
}
|
|
347
|
-
function
|
|
350
|
+
function Ct(t, e = !0) {
|
|
348
351
|
const n = i();
|
|
349
352
|
return y({
|
|
350
|
-
queryKey:
|
|
353
|
+
queryKey: V(t),
|
|
351
354
|
// Cast to DocWithProvenance[], same as useDocumentQuery above: the wire
|
|
352
355
|
// response already carries `shared`/`source*`/`syncedAt` (repo.list()
|
|
353
356
|
// serializes every document the same way repo.get() does), but the SDK's
|
|
@@ -358,45 +361,45 @@ function vt(t, e = !0) {
|
|
|
358
361
|
enabled: e
|
|
359
362
|
});
|
|
360
363
|
}
|
|
361
|
-
function
|
|
364
|
+
function Et() {
|
|
362
365
|
const t = i(), e = c();
|
|
363
366
|
return a({
|
|
364
367
|
mutationFn: (n) => t.documents.create(n.input, { project: n.project }),
|
|
365
368
|
onSuccess: () => e.invalidateQueries({ queryKey: ["documents"] })
|
|
366
369
|
});
|
|
367
370
|
}
|
|
368
|
-
function
|
|
371
|
+
function At() {
|
|
369
372
|
const t = i(), e = c();
|
|
370
373
|
return a({
|
|
371
374
|
mutationFn: (n) => t.documents.update(n.id, n.patch, { project: n.project }),
|
|
372
375
|
onSuccess: () => e.invalidateQueries({ queryKey: ["documents"] })
|
|
373
376
|
});
|
|
374
377
|
}
|
|
375
|
-
function
|
|
378
|
+
function Kt() {
|
|
376
379
|
const t = i(), e = c();
|
|
377
380
|
return a({
|
|
378
381
|
mutationFn: (n) => t.documents.delete(n.id, { project: n.project }),
|
|
379
382
|
onSuccess: () => e.invalidateQueries({ queryKey: ["documents"] })
|
|
380
383
|
});
|
|
381
384
|
}
|
|
382
|
-
function
|
|
385
|
+
function Ft() {
|
|
383
386
|
const t = i(), e = c();
|
|
384
387
|
return a({
|
|
385
388
|
mutationFn: (n) => t.request({
|
|
386
389
|
method: "POST",
|
|
387
|
-
path:
|
|
390
|
+
path: b`/documents/${n.id}/sync`,
|
|
388
391
|
query: { project: n.project }
|
|
389
392
|
}),
|
|
390
393
|
onSuccess: () => e.invalidateQueries({ queryKey: ["documents"] })
|
|
391
394
|
});
|
|
392
395
|
}
|
|
393
|
-
function
|
|
396
|
+
function Qt(t, e) {
|
|
394
397
|
const n = i(), o = c();
|
|
395
398
|
return a({
|
|
396
|
-
mutationFn: async (
|
|
399
|
+
mutationFn: async (s) => (await n.request({
|
|
397
400
|
method: "POST",
|
|
398
401
|
path: "/spec/import",
|
|
399
|
-
body:
|
|
402
|
+
body: s
|
|
400
403
|
})).body,
|
|
401
404
|
// A row exists in every `201` outcome (T2.1.2 §E creates it even when
|
|
402
405
|
// some references stayed unresolved), so the list is stale either way —
|
|
@@ -404,62 +407,63 @@ function Kt(t, e) {
|
|
|
404
407
|
// unconditional `functionsKey` this used to invalidate left an imported
|
|
405
408
|
// Endpoint or Workflow's own list stale while pointlessly invalidating
|
|
406
409
|
// Functions.
|
|
407
|
-
onSuccess: (
|
|
410
|
+
onSuccess: (s) => C(o, s.kind, e, t)
|
|
408
411
|
});
|
|
409
412
|
}
|
|
410
413
|
export {
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
414
|
+
P as $,
|
|
415
|
+
J as A,
|
|
416
|
+
H as B,
|
|
417
|
+
gt as C,
|
|
418
|
+
S as D,
|
|
419
|
+
st as E,
|
|
420
|
+
K as F,
|
|
421
|
+
G,
|
|
418
422
|
q as H,
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
423
|
+
w as I,
|
|
424
|
+
pt as J,
|
|
425
|
+
kt as K,
|
|
426
|
+
yt as L,
|
|
427
|
+
Kt as M,
|
|
428
|
+
wt as N,
|
|
429
|
+
bt as O,
|
|
430
|
+
Ct as P,
|
|
431
|
+
Rt as Q,
|
|
432
|
+
A as R,
|
|
429
433
|
p as S,
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
434
|
+
St as T,
|
|
435
|
+
ht as U,
|
|
436
|
+
mt as V,
|
|
437
|
+
qt as W,
|
|
438
|
+
Ft as X,
|
|
439
|
+
dt as Y,
|
|
440
|
+
ft as Z,
|
|
441
|
+
U as _,
|
|
442
|
+
At as a,
|
|
443
|
+
Qt as b,
|
|
444
|
+
Y as c,
|
|
445
|
+
nt as d,
|
|
446
|
+
z as e,
|
|
447
|
+
vt as f,
|
|
448
|
+
V as g,
|
|
449
|
+
it as h,
|
|
450
|
+
ut as i,
|
|
451
|
+
lt as j,
|
|
452
|
+
at as k,
|
|
453
|
+
ct as l,
|
|
454
|
+
$ as m,
|
|
455
|
+
x as n,
|
|
456
|
+
R as o,
|
|
457
|
+
k as p,
|
|
458
|
+
F as q,
|
|
459
|
+
I as r,
|
|
460
|
+
W as s,
|
|
461
|
+
Q as t,
|
|
462
|
+
Et as u,
|
|
463
|
+
O as v,
|
|
464
|
+
rt as w,
|
|
465
|
+
et as x,
|
|
466
|
+
ot as y,
|
|
467
|
+
E as z
|
|
464
468
|
};
|
|
465
|
-
//# sourceMappingURL=spec-import-
|
|
469
|
+
//# sourceMappingURL=spec-import-CW6R_Wk1.js.map
|