@oomol-lab/open-flow 0.1.0-beta.3 → 0.1.0-beta.30
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/{_virtual_open-flow-twemoji-DJwKsM_w.js → _virtual_open-flow-twemoji-CpHJOEsk.js} +4028 -2
- package/dist/browser/carbon-Cn-DTyjG.js +54 -0
- package/dist/browser/createResourceDialog-_y2xHaUA.js +110 -0
- package/dist/browser/{dist-DWADUsVB.js → dist-By46o5UV.js} +47 -47
- package/dist/browser/dist-CoszrK7m.js +4 -0
- package/dist/browser/{dist-CPuF50D9.js → dist-D1VYgicl.js} +426 -305
- package/dist/browser/dist-DSe6KRsr.js +1224 -0
- package/dist/browser/dist-DYjIVIZC.js +795 -0
- package/dist/browser/{dist-3Mj8q8Pr.js → dist-DmuE3M0R.js} +53 -54
- package/dist/browser/{dist-BN4ZCyOB.js → dist-DpDLsYtO.js} +14 -15
- package/dist/browser/{dist-CJpzJrLM.js → dist-DwvhuMxw.js} +894 -895
- package/dist/browser/dist-DxahK_I8.js +2688 -0
- package/dist/browser/{dist-C46JByB-.js → dist-Dz6Nglsd.js} +61 -61
- package/dist/browser/{dist-DUzA0Ukh.js → dist-TJfrvoIQ.js} +141 -142
- package/dist/browser/editorComponent-Dq4IKp5R.js +14790 -0
- package/dist/browser/{esm-C2UUqIUP.js → esm-B7A42FzW.js} +68 -59
- package/dist/browser/event-sources.d.ts +30 -0
- package/dist/browser/flow-authoring-module.d.ts +2 -2
- package/dist/browser/flow-authoring-node.d.ts +26 -8
- package/dist/browser/flow-authoring.d.ts +1 -1
- package/dist/browser/flow-authoring.js +5282 -313
- package/dist/browser/flow-change-schema.d.ts +11 -0
- package/dist/browser/flow-change.d.ts +193 -18
- package/dist/browser/flow-change.js +5192 -137
- package/dist/browser/flow-notifications.d.ts +11 -2
- package/dist/browser/flowChanges-AdN0Iqma.js +12304 -0
- package/dist/browser/{flowRunInputEditorStore-CwvOiIiU.js → flowRunInputEditorStore-CTORQcA2.js} +864 -4000
- package/dist/browser/flowWorkspace-BrtzLKWB.js +153066 -0
- package/dist/browser/host-conformance.d.ts +7 -0
- package/dist/browser/host-conformance.js +39 -0
- package/dist/browser/inputValues-DJfFraxG.js +43 -0
- package/dist/browser/licenses.md +195 -662
- package/dist/browser/lite-BuKZ8joP.js +8545 -0
- package/dist/browser/main-BDnNHhkU.js +50 -0
- package/dist/browser/{markdownContent-DUfLdnUt.js → markdownContent-D2oHGWc6.js} +53 -53
- package/dist/browser/theme.css +527 -34
- package/dist/browser/{typeScriptSession-mPCiA9sV.js → typeScriptSession-DnAmJCzu.js} +70 -71
- package/dist/browser/ui-input.d.ts +5 -0
- package/dist/browser/ui-label.d.ts +3 -0
- package/dist/browser/ui-textarea.d.ts +3 -0
- package/dist/browser/ui.css +2 -0
- package/dist/browser/ui.css.d.ts +1 -0
- package/dist/browser/ui.d.ts +34 -0
- package/dist/browser/ui.js +2632 -0
- package/dist/browser/value-DPg_9yXB.js +93 -0
- package/dist/browser/warmCodeTheme-DVv4-rDO.js +35 -0
- package/dist/browser/workbench-contract.d.ts +27 -2
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.d.ts +2 -0
- package/dist/browser/workbench.js +2767 -1406
- package/dist/browser/workbenchSelect-BDPIQxYK.js +5967 -0
- package/dist/common/authoringExamples.d.ts +28 -0
- package/dist/common/control-api-conformance.d.ts +7 -0
- package/dist/common/control-api-conformance.js +5568 -171
- package/dist/common/control-api-errors.d.ts +37 -0
- package/dist/common/control-api.d.ts +394 -47
- package/dist/common/control-api.js +6066 -569
- package/dist/common/control-requests.d.ts +98 -0
- package/dist/common/control-requests.js +5412 -0
- package/dist/common/cron-trigger.d.ts +2 -1
- package/dist/common/cron-trigger.js +27 -24
- package/dist/common/draftOperations.d.ts +14 -0
- package/dist/common/engine-contract.d.ts +3 -1
- package/dist/common/event-sources.d.ts +50 -0
- package/dist/common/feishu-events.d.ts +20 -0
- package/dist/common/feishu-subscriptions.d.ts +10 -0
- package/dist/common/flow-agent.d.ts +10 -0
- package/dist/common/flow-encoding.d.ts +16 -2
- package/dist/common/flow-encoding.js +5092 -68
- package/dist/common/flow-graph.d.ts +52 -0
- package/dist/common/flow-json.d.ts +2 -0
- package/dist/common/flow-modules.d.ts +20 -0
- package/dist/common/flow-notifications.d.ts +11 -2
- package/dist/common/flow-schema.d.ts +17 -0
- package/dist/common/flow-semantics.d.ts +12 -6
- package/dist/common/flow-semantics.js +15870 -9668
- package/dist/common/flowInspection.d.ts +16 -0
- package/dist/common/fr-iv1541dF.js +93 -0
- package/dist/common/integration-trigger.d.ts +29 -2
- package/dist/common/integration-trigger.js +192 -56
- package/dist/common/ja-Bq-ZDOD4.js +93 -0
- package/dist/common/ko-Z-k9R2c6.js +93 -0
- package/dist/common/localization.d.ts +2 -0
- package/dist/common/localization.js +37 -1
- package/dist/common/mcp-conformance.d.ts +2 -0
- package/dist/common/mcp.d.ts +767 -0
- package/dist/common/mcp.js +6733 -0
- package/dist/common/poll-trigger.d.ts +5 -0
- package/dist/common/poll-trigger.js +26 -22
- package/dist/common/provider-triggers.d.ts +4 -0
- package/dist/common/provider-triggers.js +7310 -1736
- package/dist/common/ru-B4gFecYZ.js +93 -0
- package/dist/common/run-events.d.ts +2 -2
- package/dist/common/run-events.js +13 -17
- package/dist/common/run-lifecycle.d.ts +21 -2
- package/dist/common/run-lifecycle.js +83 -2
- package/dist/common/run-results.d.ts +57 -0
- package/dist/common/runtime-contract.d.ts +38 -3
- package/dist/common/runtime-contract.js +291 -19
- package/dist/common/scheduler.d.ts +97 -19
- package/dist/common/scheduler.js +8234 -261
- package/dist/common/trigger-catalog.d.ts +17 -0
- package/dist/common/trigger-config-options.d.ts +13 -0
- package/dist/common/trigger-contract.d.ts +5 -0
- package/dist/common/trigger-localization.d.ts +7 -0
- package/dist/common/webhook-trigger.d.ts +3 -3
- package/dist/common/webhook-trigger.js +64 -18
- package/dist/common/zh-CN-ByQ6nYam.js +93 -0
- package/dist/common/zh-TW-QjIarvX9.js +93 -0
- package/dist/index.d.ts +6 -5
- package/package.json +21 -1
- package/dist/browser/carbon-DMCVsjHo.js +0 -53
- package/dist/browser/createResourceDialog-BkZns-oZ.js +0 -504
- package/dist/browser/diagnostics-SDCyFuxm.js +0 -11634
- package/dist/browser/dist-BMqL-qR5.js +0 -1894
- package/dist/browser/dist-BpopSHwP.js +0 -1543
- package/dist/browser/dist-CP0883sY.js +0 -4
- package/dist/browser/dist-CUSrALSX.js +0 -1620
- package/dist/browser/flowWorkspace-BZ_eiQNR.js +0 -45393
- package/dist/browser/getPseudoElementBounds-ESJExRFX.js +0 -7642
- package/dist/browser/languages-DgJehE1g.js +0 -62
- package/dist/browser/main-DmjVyuWr.js +0 -76
- package/dist/browser/workbenchSelect-B2s1HV-Y.js +0 -1374
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { TriggerKeySnapshot } from '../browser/flow-change.js';
|
|
2
|
+
import type { UiLanguage } from './localization.js';
|
|
3
|
+
export interface TriggerDisplay {
|
|
4
|
+
readonly displayName: string;
|
|
5
|
+
readonly description: string;
|
|
6
|
+
}
|
|
7
|
+
export interface TriggerCatalog {
|
|
8
|
+
readonly version: 1;
|
|
9
|
+
readonly locale: UiLanguage;
|
|
10
|
+
readonly definitions: readonly TriggerKeySnapshot[];
|
|
11
|
+
readonly display: Readonly<Record<string, TriggerDisplay>>;
|
|
12
|
+
}
|
|
13
|
+
export interface TriggerCatalogCache {
|
|
14
|
+
readonly data: TriggerCatalog;
|
|
15
|
+
readonly etag: string | null;
|
|
16
|
+
}
|
|
17
|
+
export declare function decodeTriggerCatalog(value: unknown): TriggerCatalog;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ConnectorProxy } from './connector-proxy.js';
|
|
2
|
+
import type { JsonValue } from '../browser/flow-change.js';
|
|
3
|
+
export interface TriggerConfigOption {
|
|
4
|
+
readonly value: string;
|
|
5
|
+
readonly label: string;
|
|
6
|
+
readonly color?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface TriggerConfigOptionsContext {
|
|
9
|
+
readonly field: string;
|
|
10
|
+
readonly config: Readonly<Record<string, JsonValue>>;
|
|
11
|
+
readonly connector: ConnectorProxy;
|
|
12
|
+
readonly signal?: AbortSignal;
|
|
13
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { JsonValue, Port, PortDefinition, TriggerNode } from '../browser/flow-change.js';
|
|
2
|
+
export declare const webhookOutputs: readonly Port[];
|
|
3
|
+
export declare function triggerOutputDefinitions(trigger: TriggerNode): readonly Port[];
|
|
4
|
+
export declare function triggerOutputPorts(trigger: TriggerNode): Readonly<Record<string, PortDefinition>>;
|
|
5
|
+
export declare function matchesTriggerOutputs(trigger: TriggerNode, outputs: unknown): outputs is Readonly<Record<string, JsonValue>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TriggerDisplay } from './trigger-catalog.js';
|
|
2
|
+
import type { TriggerKeySnapshot } from '../browser/flow-change.js';
|
|
3
|
+
import type { UiLanguage } from './localization.js';
|
|
4
|
+
type Translations = Readonly<Record<string, Partial<TriggerDisplay>>>;
|
|
5
|
+
export declare function loadTriggerTranslations(locale: UiLanguage): Promise<Translations>;
|
|
6
|
+
export declare function localizeTrigger(definition: TriggerKeySnapshot, locale: UiLanguage): Promise<TriggerDisplay>;
|
|
7
|
+
export {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type { JsonValue,
|
|
1
|
+
import type { JsonValue, WebhookBodyField, WebhookOptions } from '../browser/flow-change.js';
|
|
2
2
|
export declare const maximumWebhookBodyBytes: number;
|
|
3
3
|
export declare function webhookEndpointId(url: URL): string | undefined;
|
|
4
4
|
export declare function webhookOccurrenceId(endpointId: string, runtimeVersion: number, key: string | null): Promise<string | undefined>;
|
|
5
5
|
export interface WebhookConformanceFixture {
|
|
6
|
-
readonly
|
|
6
|
+
readonly bodyFields: readonly WebhookBodyField[];
|
|
7
7
|
readonly options?: WebhookOptions;
|
|
8
8
|
}
|
|
9
9
|
export interface WebhookConformanceHarness {
|
|
10
10
|
readonly endpointUrl: string;
|
|
11
11
|
dispose(): Promise<void>;
|
|
12
|
-
|
|
12
|
+
outputs(): Promise<readonly Readonly<Record<string, JsonValue>>[]>;
|
|
13
13
|
republish(): Promise<void>;
|
|
14
14
|
request(request: Request): Promise<Response>;
|
|
15
15
|
retire(): Promise<void>;
|
|
@@ -27,7 +27,7 @@ async function o(e, t, n) {
|
|
|
27
27
|
if (n == null) return `webhook_${crypto.randomUUID().replaceAll("-", "")}`;
|
|
28
28
|
if (n.trim().length == 0 || n.length > 256) return;
|
|
29
29
|
let r = JSON.stringify([
|
|
30
|
-
|
|
30
|
+
2,
|
|
31
31
|
"webhook-occurrence",
|
|
32
32
|
e,
|
|
33
33
|
t,
|
|
@@ -60,7 +60,53 @@ var u = [], d = [{
|
|
|
60
60
|
nullable: !1
|
|
61
61
|
}], f = { event: { message: "hello" } }, p = [
|
|
62
62
|
{
|
|
63
|
-
fixture: {
|
|
63
|
+
fixture: {
|
|
64
|
+
bodyFields: d,
|
|
65
|
+
options: { allowedMethods: ["POST", "PUT"] }
|
|
66
|
+
},
|
|
67
|
+
name: "stores complete outputs and compares method query and body for idempotency",
|
|
68
|
+
async verify(e) {
|
|
69
|
+
let t = `${e.endpointUrl}?tag=a&tag=b&single=x&__proto__=safe&constructor=value`, n = {
|
|
70
|
+
url: t,
|
|
71
|
+
body: JSON.stringify(f),
|
|
72
|
+
headers: {
|
|
73
|
+
"Idempotency-Key": "output-contract",
|
|
74
|
+
"X-Request-ID": "first",
|
|
75
|
+
"Content-Type": "application/json"
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
s((await Promise.all([l(e, n), l(e, n)])).map((e) => e.status), [200, 200], "Concurrent retry statuses");
|
|
79
|
+
let r = await e.outputs();
|
|
80
|
+
s(r.length, 1, "One admitted Run");
|
|
81
|
+
let i = r[0];
|
|
82
|
+
s(Object.keys(i).toSorted(), [
|
|
83
|
+
"body",
|
|
84
|
+
"headers",
|
|
85
|
+
"query",
|
|
86
|
+
"webhookUrl"
|
|
87
|
+
], "Exact output handles"), s(i.body, f, "Body"), s(i.query, JSON.parse("{\"tag\":[\"a\",\"b\"],\"single\":\"x\",\"__proto__\":\"safe\",\"constructor\":\"value\"}"), "Query"), s(i.webhookUrl, e.endpointUrl, "Endpoint without query"), s(i.headers["x-request-id"], "first", "Lowercase headers"), await c(await l(e, {
|
|
88
|
+
...n,
|
|
89
|
+
headers: {
|
|
90
|
+
...n.headers,
|
|
91
|
+
"X-Request-ID": "retry"
|
|
92
|
+
}
|
|
93
|
+
}), { status: 200 }, "Changed header retry"), await c(await l(e, {
|
|
94
|
+
...n,
|
|
95
|
+
url: t.replace(new URL(t).host, "retry.example.com")
|
|
96
|
+
}), { status: 200 }, "Changed request URL host"), s(await e.outputs(), r, "First outputs remain unchanged"), await c(await l(e, {
|
|
97
|
+
...n,
|
|
98
|
+
method: "PUT"
|
|
99
|
+
}), { status: 409 }, "Changed method"), await c(await l(e, {
|
|
100
|
+
...n,
|
|
101
|
+
url: `${t}&extra=1`
|
|
102
|
+
}), { status: 409 }, "Changed query"), await c(await l(e, {
|
|
103
|
+
...n,
|
|
104
|
+
body: JSON.stringify({ event: { message: "changed" } })
|
|
105
|
+
}), { status: 409 }, "Changed body");
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
fixture: { bodyFields: u },
|
|
64
110
|
name: "rejects malformed and unknown endpoint identities",
|
|
65
111
|
async verify(e) {
|
|
66
112
|
let t = new URL(e.endpointUrl);
|
|
@@ -76,7 +122,7 @@ var u = [], d = [{
|
|
|
76
122
|
}
|
|
77
123
|
},
|
|
78
124
|
{
|
|
79
|
-
fixture: {
|
|
125
|
+
fixture: { bodyFields: u },
|
|
80
126
|
name: "uses POST by default and decodes an empty body as an empty object",
|
|
81
127
|
async verify(e) {
|
|
82
128
|
await c(await l(e, { method: "GET" }), {
|
|
@@ -89,12 +135,12 @@ var u = [], d = [{
|
|
|
89
135
|
body: "",
|
|
90
136
|
headers: { "cache-control": "no-store" },
|
|
91
137
|
status: 200
|
|
92
|
-
}, "Empty payload"), s(await e.
|
|
138
|
+
}, "Empty payload"), s((await e.outputs()).map((e) => e.body), [{}], "Decoded empty payloads");
|
|
93
139
|
}
|
|
94
140
|
},
|
|
95
141
|
{
|
|
96
142
|
fixture: {
|
|
97
|
-
|
|
143
|
+
bodyFields: u,
|
|
98
144
|
options: {
|
|
99
145
|
allowedMethods: ["PUT"],
|
|
100
146
|
allowedOrigins: ["https://client.example"],
|
|
@@ -146,7 +192,7 @@ var u = [], d = [{
|
|
|
146
192
|
},
|
|
147
193
|
{
|
|
148
194
|
fixture: {
|
|
149
|
-
|
|
195
|
+
bodyFields: u,
|
|
150
196
|
options: {
|
|
151
197
|
responseData: "<script>globalThis.compromised = true<\/script>",
|
|
152
198
|
responseHeaders: {
|
|
@@ -179,7 +225,7 @@ var u = [], d = [{
|
|
|
179
225
|
}
|
|
180
226
|
},
|
|
181
227
|
{
|
|
182
|
-
fixture: {
|
|
228
|
+
fixture: { bodyFields: d },
|
|
183
229
|
name: "rejects invalid JSON, invalid payloads, invalid idempotency keys, and oversized bodies",
|
|
184
230
|
async verify(e) {
|
|
185
231
|
await c(await l(e, { body: "{" }), {
|
|
@@ -208,11 +254,11 @@ var u = [], d = [{
|
|
|
208
254
|
body: "",
|
|
209
255
|
headers: { "cache-control": "no-store" },
|
|
210
256
|
status: 413
|
|
211
|
-
}, "Oversized body"), s(await e.
|
|
257
|
+
}, "Oversized body"), s((await e.outputs()).map((e) => e.body), [], "Rejected payloads");
|
|
212
258
|
}
|
|
213
259
|
},
|
|
214
260
|
{
|
|
215
|
-
fixture: {
|
|
261
|
+
fixture: { bodyFields: d },
|
|
216
262
|
name: "replays one idempotent occurrence and rejects conflicting payloads",
|
|
217
263
|
async verify(e) {
|
|
218
264
|
let t = { "idempotency-key": "delivery-1" };
|
|
@@ -229,19 +275,19 @@ var u = [], d = [{
|
|
|
229
275
|
body: "",
|
|
230
276
|
headers: { "cache-control": "no-store" },
|
|
231
277
|
status: 409
|
|
232
|
-
}, "Conflicting delivery"), s(await e.
|
|
278
|
+
}, "Conflicting delivery"), s((await e.outputs()).map((e) => e.body), [f], "Idempotent payloads");
|
|
233
279
|
}
|
|
234
280
|
},
|
|
235
281
|
{
|
|
236
|
-
fixture: {
|
|
282
|
+
fixture: { bodyFields: d },
|
|
237
283
|
name: "admits requests without an idempotency key as separate occurrences",
|
|
238
284
|
async verify(e) {
|
|
239
285
|
let t = JSON.stringify(f);
|
|
240
|
-
await c(await l(e, { body: t }), { status: 200 }, "First unkeyed delivery"), await c(await l(e, { body: t }), { status: 200 }, "Second unkeyed delivery"), s(await e.
|
|
286
|
+
await c(await l(e, { body: t }), { status: 200 }, "First unkeyed delivery"), await c(await l(e, { body: t }), { status: 200 }, "Second unkeyed delivery"), s((await e.outputs()).map((e) => e.body), [f, f], "Unkeyed payloads");
|
|
241
287
|
}
|
|
242
288
|
},
|
|
243
289
|
{
|
|
244
|
-
fixture: {
|
|
290
|
+
fixture: { bodyFields: d },
|
|
245
291
|
name: "scopes occurrence identity to the current runtime version",
|
|
246
292
|
async verify(e) {
|
|
247
293
|
let t = JSON.stringify(f), n = { "idempotency-key": "delivery-across-publish" };
|
|
@@ -253,23 +299,23 @@ var u = [], d = [{
|
|
|
253
299
|
await e.republish(), s(e.endpointUrl, r, "Endpoint after publish"), await c(await l(e, {
|
|
254
300
|
body: t,
|
|
255
301
|
headers: n
|
|
256
|
-
}), { status: 200 }, "Delivery after publish"), s(await e.
|
|
302
|
+
}), { status: 200 }, "Delivery after publish"), s((await e.outputs()).map((e) => e.body), [f, f], "Payloads across publish");
|
|
257
303
|
}
|
|
258
304
|
},
|
|
259
305
|
{
|
|
260
|
-
fixture: {
|
|
306
|
+
fixture: { bodyFields: u },
|
|
261
307
|
name: "fails closed after its trigger is retired",
|
|
262
308
|
async verify(e) {
|
|
263
309
|
await e.retire(), await c(await l(e, { body: "{}" }), {
|
|
264
310
|
body: "",
|
|
265
311
|
headers: { "cache-control": "no-store" },
|
|
266
312
|
status: 404
|
|
267
|
-
}, "Retired endpoint"), s(await e.
|
|
313
|
+
}, "Retired endpoint"), s((await e.outputs()).map((e) => e.body), [], "Payloads after retirement");
|
|
268
314
|
}
|
|
269
315
|
},
|
|
270
316
|
{
|
|
271
317
|
fixture: {
|
|
272
|
-
|
|
318
|
+
bodyFields: u,
|
|
273
319
|
options: {
|
|
274
320
|
responseData: "ignored",
|
|
275
321
|
responseStatusCode: 204
|
|
@@ -285,7 +331,7 @@ var u = [], d = [{
|
|
|
285
331
|
},
|
|
286
332
|
{
|
|
287
333
|
fixture: {
|
|
288
|
-
|
|
334
|
+
bodyFields: u,
|
|
289
335
|
options: {
|
|
290
336
|
allowedMethods: ["HEAD"],
|
|
291
337
|
responseData: "ignored"
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
//#region src/trigger/providers/airtable/locales/zh-CN.json
|
|
2
|
+
var e = { "airtable.on_record_changed": {
|
|
3
|
+
displayName: "记录创建或更新",
|
|
4
|
+
description: "轮询 Airtable 表,按时间字段排序,在记录创建或更新时触发。"
|
|
5
|
+
} }, t = { "feishu_app_bot.on_event": {
|
|
6
|
+
displayName: "应用事件",
|
|
7
|
+
description: "通过共享事件源接收所选飞书应用事件。"
|
|
8
|
+
} }, n = {
|
|
9
|
+
"github.on_repo_event": {
|
|
10
|
+
displayName: "仓库事件",
|
|
11
|
+
description: "在仓库发生所选 GitHub webhook 事件时触发。"
|
|
12
|
+
},
|
|
13
|
+
"github.watch_pull_request": {
|
|
14
|
+
displayName: "关注拉取请求",
|
|
15
|
+
description: "通过通知和定期检查关注一个拉取请求。从当前状态开始,报告观察到的变化,不保证每次中间状态转换或评审事件都被报告。"
|
|
16
|
+
}
|
|
17
|
+
}, r = { "gitlab.on_project_event": {
|
|
18
|
+
displayName: "项目事件",
|
|
19
|
+
description: "在项目发生所选 GitLab webhook 事件时触发。"
|
|
20
|
+
} }, i = { "gmail.on_message_received": {
|
|
21
|
+
displayName: "收到新邮件",
|
|
22
|
+
description: "轮询 Gmail 邮箱,在收到新邮件时触发。"
|
|
23
|
+
} }, a = { "googlecalendar.on_event_changed": {
|
|
24
|
+
displayName: "日历事件变更",
|
|
25
|
+
description: "轮询 Google 日历,在事件创建、更新或取消时触发。"
|
|
26
|
+
} }, o = {
|
|
27
|
+
"googledrive.changes_detected": {
|
|
28
|
+
displayName: "检测到变更",
|
|
29
|
+
description: "使用 Google Drive changes.watch 通道,在有云端硬盘变更可用时触发。"
|
|
30
|
+
},
|
|
31
|
+
"googledrive.watch_changes": {
|
|
32
|
+
displayName: "关注变更",
|
|
33
|
+
description: "通过通知和对同一变更流的定期扫描监控云端硬盘变更。"
|
|
34
|
+
},
|
|
35
|
+
"googledrive.on_file_change": {
|
|
36
|
+
displayName: "文件夹内的文件或文件夹变更",
|
|
37
|
+
description: "轮询一个 Google Drive 文件夹,在其直属文件或文件夹创建或更新时触发。"
|
|
38
|
+
}
|
|
39
|
+
}, s = { "googlesheets.on_row_added": {
|
|
40
|
+
displayName: "新增行",
|
|
41
|
+
description: "轮询工作表,在上次已知的末行下方追加新行时,为每个新行触发一次。"
|
|
42
|
+
} }, c = { "linear.on_issue_changed": {
|
|
43
|
+
displayName: "议题创建或更新",
|
|
44
|
+
description: "定期检查 Linear 团队中新建和更新的议题。从现在开始,不触发已有议题。报告观察到的当前状态,不报告删除,也不保证涵盖每次中间状态变化。"
|
|
45
|
+
} }, l = { "notion.on_database_page_event": {
|
|
46
|
+
displayName: "数据库页面新增或更新",
|
|
47
|
+
description: "轮询 Notion 数据库,在新增页面或编辑现有页面时触发。"
|
|
48
|
+
} }, u = { "one_drive.on_item_changed": {
|
|
49
|
+
displayName: "文件或文件夹变更",
|
|
50
|
+
description: "轮询 OneDrive 变更流,在文件或文件夹创建、更新或删除时触发。"
|
|
51
|
+
} }, d = { "outlook.on_message_received": {
|
|
52
|
+
displayName: "收到新邮件",
|
|
53
|
+
description: "轮询 Microsoft Outlook 邮件文件夹,在新邮件到达时触发。"
|
|
54
|
+
} }, f = { "shopify.on_shop_event": {
|
|
55
|
+
displayName: "商店事件",
|
|
56
|
+
description: "在已连接商店发生所选 Shopify webhook 主题对应的事件时触发。"
|
|
57
|
+
} }, p = { "slack.on_message_posted": {
|
|
58
|
+
displayName: "频道新消息",
|
|
59
|
+
description: "轮询一个 Slack 会话,在有新消息发布时触发。"
|
|
60
|
+
} }, m = { "stripe.on_event": {
|
|
61
|
+
displayName: "账户事件",
|
|
62
|
+
description: "在已连接账户发生所选 Stripe 事件时触发。"
|
|
63
|
+
} }, h = { "telegram.on_update": {
|
|
64
|
+
displayName: "机器人更新",
|
|
65
|
+
description: "在已连接的 Telegram 机器人收到所选更新时触发。"
|
|
66
|
+
} }, g = { "woocommerce.on_store_event": {
|
|
67
|
+
displayName: "商店事件",
|
|
68
|
+
description: "在发生所选 WooCommerce 商店事件时触发。"
|
|
69
|
+
} }, _ = { "zendesk.on_event": {
|
|
70
|
+
displayName: "事件订阅",
|
|
71
|
+
description: "在发生任一所选 Zendesk 账户事件时触发。"
|
|
72
|
+
} }, v = {
|
|
73
|
+
...e,
|
|
74
|
+
...t,
|
|
75
|
+
...n,
|
|
76
|
+
...r,
|
|
77
|
+
...i,
|
|
78
|
+
...a,
|
|
79
|
+
...o,
|
|
80
|
+
...s,
|
|
81
|
+
...c,
|
|
82
|
+
...l,
|
|
83
|
+
...u,
|
|
84
|
+
...d,
|
|
85
|
+
...f,
|
|
86
|
+
...p,
|
|
87
|
+
...m,
|
|
88
|
+
...h,
|
|
89
|
+
...g,
|
|
90
|
+
..._
|
|
91
|
+
};
|
|
92
|
+
//#endregion
|
|
93
|
+
export { v as default };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
//#region src/trigger/providers/airtable/locales/zh-TW.json
|
|
2
|
+
var e = { "airtable.on_record_changed": {
|
|
3
|
+
displayName: "記錄建立或更新",
|
|
4
|
+
description: "輪詢 Airtable 資料表,依時間欄位排序,在記錄建立或更新時觸發。"
|
|
5
|
+
} }, t = { "feishu_app_bot.on_event": {
|
|
6
|
+
displayName: "應用程式事件",
|
|
7
|
+
description: "透過共用事件來源接收所選飛書應用程式事件。"
|
|
8
|
+
} }, n = {
|
|
9
|
+
"github.on_repo_event": {
|
|
10
|
+
displayName: "儲存庫事件",
|
|
11
|
+
description: "在儲存庫發生所選 GitHub webhook 事件時觸發。"
|
|
12
|
+
},
|
|
13
|
+
"github.watch_pull_request": {
|
|
14
|
+
displayName: "追蹤提取要求",
|
|
15
|
+
description: "透過通知與定期檢查追蹤一個提取要求。從目前狀態開始,回報觀察到的變更,不保證涵蓋每次中間狀態轉換或審查事件。"
|
|
16
|
+
}
|
|
17
|
+
}, r = { "gitlab.on_project_event": {
|
|
18
|
+
displayName: "專案事件",
|
|
19
|
+
description: "在專案發生所選 GitLab webhook 事件時觸發。"
|
|
20
|
+
} }, i = { "gmail.on_message_received": {
|
|
21
|
+
displayName: "收到新郵件",
|
|
22
|
+
description: "輪詢 Gmail 信箱,在收到新郵件時觸發。"
|
|
23
|
+
} }, a = { "googlecalendar.on_event_changed": {
|
|
24
|
+
displayName: "日曆事件變更",
|
|
25
|
+
description: "輪詢 Google 日曆,在事件建立、更新或取消時觸發。"
|
|
26
|
+
} }, o = {
|
|
27
|
+
"googledrive.changes_detected": {
|
|
28
|
+
displayName: "偵測到變更",
|
|
29
|
+
description: "使用 Google Drive changes.watch 通道,在有雲端硬碟變更可用時觸發。"
|
|
30
|
+
},
|
|
31
|
+
"googledrive.watch_changes": {
|
|
32
|
+
displayName: "追蹤變更",
|
|
33
|
+
description: "透過通知與對同一變更串流的定期掃描監控雲端硬碟變更。"
|
|
34
|
+
},
|
|
35
|
+
"googledrive.on_file_change": {
|
|
36
|
+
displayName: "資料夾內的檔案或資料夾變更",
|
|
37
|
+
description: "輪詢一個 Google Drive 資料夾,在其直屬檔案或資料夾建立或更新時觸發。"
|
|
38
|
+
}
|
|
39
|
+
}, s = { "googlesheets.on_row_added": {
|
|
40
|
+
displayName: "新增列",
|
|
41
|
+
description: "輪詢工作表,在上次已知的最後一列下方附加新列時,為每個新列觸發一次。"
|
|
42
|
+
} }, c = { "linear.on_issue_changed": {
|
|
43
|
+
displayName: "議題建立或更新",
|
|
44
|
+
description: "定期檢查 Linear 團隊中新建與更新的議題。從現在開始,不觸發既有議題。回報觀察到的目前狀態,不回報刪除,也不保證涵蓋每次中間狀態變更。"
|
|
45
|
+
} }, l = { "notion.on_database_page_event": {
|
|
46
|
+
displayName: "資料庫頁面新增或更新",
|
|
47
|
+
description: "輪詢 Notion 資料庫,在新增頁面或編輯現有頁面時觸發。"
|
|
48
|
+
} }, u = { "one_drive.on_item_changed": {
|
|
49
|
+
displayName: "檔案或資料夾變更",
|
|
50
|
+
description: "輪詢 OneDrive 變更串流,在檔案或資料夾建立、更新或刪除時觸發。"
|
|
51
|
+
} }, d = { "outlook.on_message_received": {
|
|
52
|
+
displayName: "收到新郵件",
|
|
53
|
+
description: "輪詢 Microsoft Outlook 郵件資料夾,在新郵件到達時觸發。"
|
|
54
|
+
} }, f = { "shopify.on_shop_event": {
|
|
55
|
+
displayName: "商店事件",
|
|
56
|
+
description: "在已連線商店發生所選 Shopify webhook 主題對應的事件時觸發。"
|
|
57
|
+
} }, p = { "slack.on_message_posted": {
|
|
58
|
+
displayName: "頻道新訊息",
|
|
59
|
+
description: "輪詢一個 Slack 對話,在有新訊息發布時觸發。"
|
|
60
|
+
} }, m = { "stripe.on_event": {
|
|
61
|
+
displayName: "帳戶事件",
|
|
62
|
+
description: "在已連線帳戶發生所選 Stripe 事件時觸發。"
|
|
63
|
+
} }, h = { "telegram.on_update": {
|
|
64
|
+
displayName: "機器人更新",
|
|
65
|
+
description: "在已連線的 Telegram 機器人收到所選更新時觸發。"
|
|
66
|
+
} }, g = { "woocommerce.on_store_event": {
|
|
67
|
+
displayName: "商店事件",
|
|
68
|
+
description: "在發生所選 WooCommerce 商店事件時觸發。"
|
|
69
|
+
} }, _ = { "zendesk.on_event": {
|
|
70
|
+
displayName: "事件訂閱",
|
|
71
|
+
description: "在發生任一所選 Zendesk 帳戶事件時觸發。"
|
|
72
|
+
} }, v = {
|
|
73
|
+
...e,
|
|
74
|
+
...t,
|
|
75
|
+
...n,
|
|
76
|
+
...r,
|
|
77
|
+
...i,
|
|
78
|
+
...a,
|
|
79
|
+
...o,
|
|
80
|
+
...s,
|
|
81
|
+
...c,
|
|
82
|
+
...l,
|
|
83
|
+
...u,
|
|
84
|
+
...d,
|
|
85
|
+
...f,
|
|
86
|
+
...p,
|
|
87
|
+
...m,
|
|
88
|
+
...h,
|
|
89
|
+
...g,
|
|
90
|
+
..._
|
|
91
|
+
};
|
|
92
|
+
//#endregion
|
|
93
|
+
export { v as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -48,19 +48,20 @@ export interface TaskLogger {
|
|
|
48
48
|
warn(message: string, data?: unknown): void;
|
|
49
49
|
error(message: string, data?: unknown): void;
|
|
50
50
|
}
|
|
51
|
-
export interface TaskContext<
|
|
51
|
+
export interface TaskContext<Actions extends object = Record<string, never>> {
|
|
52
|
+
readonly actions: Actions;
|
|
52
53
|
readonly signal: AbortSignal;
|
|
53
54
|
readonly flowId: string;
|
|
55
|
+
readonly inputs: Readonly<Record<string, unknown>>;
|
|
54
56
|
readonly runId: string;
|
|
55
57
|
readonly blockId: string;
|
|
56
58
|
readonly artifact: ArtifactCapability;
|
|
57
59
|
readonly fetch: typeof fetch;
|
|
58
60
|
readonly logger: TaskLogger;
|
|
59
|
-
output<Handle extends keyof Outputs & string>(handle: Handle, value: Outputs[Handle]): Promise<void>;
|
|
60
61
|
preview(payload: PreviewPayload, id?: string): Promise<void>;
|
|
61
62
|
reportProgress(progress: number): Promise<void>;
|
|
62
63
|
}
|
|
63
|
-
export type TaskResult<Outputs extends object> =
|
|
64
|
-
export interface Task<Inputs extends object = Record<string, unknown>, Outputs extends object = Record<string, unknown>> {
|
|
65
|
-
(inputs: Inputs, context: TaskContext<
|
|
64
|
+
export type TaskResult<Outputs extends object> = keyof Outputs extends never ? Outputs | void : Outputs;
|
|
65
|
+
export interface Task<Inputs extends object = Record<string, unknown>, Outputs extends object = Record<string, unknown>, Actions extends object = Record<string, never>> {
|
|
66
|
+
(inputs: Inputs, context: TaskContext<Actions>): TaskResult<Outputs> | Promise<TaskResult<Outputs>>;
|
|
66
67
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oomol-lab/open-flow",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.30",
|
|
4
4
|
"description": "TypeScript contracts and Browser runtime for Open Flow.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -21,6 +21,14 @@
|
|
|
21
21
|
"types": "./dist/common/connector-proxy.d.ts",
|
|
22
22
|
"import": "./dist/common/connector-proxy.js"
|
|
23
23
|
},
|
|
24
|
+
"./mcp": {
|
|
25
|
+
"types": "./dist/common/mcp.d.ts",
|
|
26
|
+
"import": "./dist/common/mcp.js"
|
|
27
|
+
},
|
|
28
|
+
"./control-requests": {
|
|
29
|
+
"types": "./dist/common/control-requests.d.ts",
|
|
30
|
+
"import": "./dist/common/control-requests.js"
|
|
31
|
+
},
|
|
24
32
|
"./control-api": {
|
|
25
33
|
"types": "./dist/common/control-api.d.ts",
|
|
26
34
|
"import": "./dist/common/control-api.js"
|
|
@@ -85,10 +93,22 @@
|
|
|
85
93
|
"types": "./dist/common/webhook-trigger.d.ts",
|
|
86
94
|
"import": "./dist/common/webhook-trigger.js"
|
|
87
95
|
},
|
|
96
|
+
"./workbench-host-conformance": {
|
|
97
|
+
"types": "./dist/browser/host-conformance.d.ts",
|
|
98
|
+
"import": "./dist/browser/host-conformance.js"
|
|
99
|
+
},
|
|
88
100
|
"./workbench": {
|
|
89
101
|
"types": "./dist/browser/workbench.d.ts",
|
|
90
102
|
"import": "./dist/browser/workbench.js"
|
|
91
103
|
},
|
|
104
|
+
"./ui": {
|
|
105
|
+
"types": "./dist/browser/ui.d.ts",
|
|
106
|
+
"import": "./dist/browser/ui.js"
|
|
107
|
+
},
|
|
108
|
+
"./ui.css": {
|
|
109
|
+
"types": "./dist/browser/ui.css.d.ts",
|
|
110
|
+
"default": "./dist/browser/ui.css"
|
|
111
|
+
},
|
|
92
112
|
"./workbench.css": {
|
|
93
113
|
"types": "./dist/browser/workbench.css.d.ts",
|
|
94
114
|
"default": "./dist/browser/workbench.css"
|