@oomol-lab/open-flow 0.1.0-beta.70 → 0.1.0-beta.71

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.
Files changed (32) hide show
  1. package/dist/browser/{FlowCanvas-CqtUDPGj.js → FlowCanvas-Dtf8_cQp.js} +31 -31
  2. package/dist/browser/{createResourceDialog-BAHYW9yu.js → createResourceDialog-BWJkjiOO.js} +2 -2
  3. package/dist/browser/{dialog-DcGOzUP2.js → dialog-CUy_fwx9.js} +4586 -4586
  4. package/dist/browser/{exportSvg-Dv5Qgrq7.js → exportSvg-BOoy7-Db.js} +1 -1
  5. package/dist/browser/flow-authoring.js +9467 -9467
  6. package/dist/browser/flow-change.d.ts +2 -14
  7. package/dist/browser/flow-change.js +23 -21
  8. package/dist/browser/{flowChanges-CYyehKer.js → flowChanges-9Ir2rdLx.js} +5731 -5637
  9. package/dist/browser/{flowWorkspace-qYUZPJHR.js → flowWorkspace-LvZ6HuMM.js} +4 -4
  10. package/dist/browser/preview.js +5278 -5182
  11. package/dist/browser/workbench.js +1576 -1461
  12. package/dist/browser/{workbenchSelect-D8_vP2p5.js → workbenchSelect-C3e4J93X.js} +1 -1
  13. package/dist/command/index.js +22 -22
  14. package/dist/common/connector-proxy.d.ts +4 -1
  15. package/dist/common/control-api-conformance.js +23 -21
  16. package/dist/common/control-api.js +3454 -3452
  17. package/dist/common/control-requests.js +2032 -2032
  18. package/dist/common/decision.js +29 -6403
  19. package/dist/common/event-source-definition.d.ts +45 -0
  20. package/dist/common/event-source.d.ts +200 -1
  21. package/dist/common/event-source.js +22 -1
  22. package/dist/common/flow-schema.d.ts +2 -1
  23. package/dist/common/flow-schemaKeywords.d.ts +15 -0
  24. package/dist/common/flow-semantics.js +9797 -9795
  25. package/dist/common/integration-trigger.js +53 -6517
  26. package/dist/common/mcp.js +3389 -3389
  27. package/dist/common/openapi.js +29 -6493
  28. package/dist/common/poll-trigger.js +29 -6517
  29. package/dist/common/provider-triggers.js +6 -65
  30. package/dist/common/webhook-trigger.js +5 -6449
  31. package/dist/common/workflow.js +31 -916
  32. package/package.json +1 -1
@@ -9379,1364 +9379,978 @@ var Validator = class {
9379
9379
  }
9380
9380
  };
9381
9381
  //#endregion
9382
- //#region src/openapi/common/authBindings.ts
9383
- /** Never allow credentials to enter a Revision as literal node inputs. */
9384
- function assertOpenApiAuthBindings(document) {
9385
- for (const node of Object.values(document.graph.nodes)) {
9386
- if (node.kind != "task" || !("executor" in node.task) || node.task.executor.kind != "openapi") continue;
9387
- for (const [handle, mapping] of Object.entries(node.inputs)) if (handle.startsWith("auth.") && mapping.kind == "value") throw new TypeError("OpenAPI authentication accepts deployment variables and upstream outputs only.");
9382
+ //#region src/json-schema-subset/utils.ts
9383
+ var nextId = 0;
9384
+ function createId() {
9385
+ const id = nextId;
9386
+ nextId += 1;
9387
+ return id;
9388
+ }
9389
+ function deepFreeze(target) {
9390
+ if (typeof target === "object" && target !== null && !Object.isFrozen(target)) {
9391
+ for (const key of Object.getOwnPropertyNames(target)) deepFreeze(Reflect.get(target, key));
9392
+ Object.freeze(target);
9388
9393
  }
9394
+ return target;
9389
9395
  }
9390
- //#endregion
9391
- //#region src/flow/common/inputValue.ts
9392
- /** Converts explicit user values at authoring boundaries, never persisted legacy data. */
9393
- function inputValues(values) {
9394
- return Object.fromEntries(Object.entries(values).map(([name, value]) => [name, {
9395
- kind: "value",
9396
- value
9397
- }]));
9396
+ function pick(target, keys) {
9397
+ const newTarget = {};
9398
+ for (const key of keys) if (key in target) newTarget[key] = target[key];
9399
+ return newTarget;
9400
+ }
9401
+ function deepCopy(value) {
9402
+ if (typeof value !== "object" || value === null) return value;
9403
+ else if (Array.isArray(value)) {
9404
+ const array = [];
9405
+ for (const [i, element] of value.entries()) array[i] = deepCopy(element);
9406
+ return array;
9407
+ } else {
9408
+ const newObject = {};
9409
+ for (const key in value) newObject[key] = deepCopy(value[key]);
9410
+ return newObject;
9411
+ }
9412
+ }
9413
+ function isDeepEquals(value1, value2) {
9414
+ if (value1 === value2) return true;
9415
+ if (value1 === null) return false;
9416
+ if (typeof value1 !== "object") return false;
9417
+ if (typeof value1 !== typeof value2) return false;
9418
+ if (Array.isArray(value1)) {
9419
+ if (!Array.isArray(value2)) return false;
9420
+ if (value1.length !== value2.length) return false;
9421
+ for (const [i, value1Element] of value1.entries()) if (!isDeepEquals(value1Element, value2[i])) return false;
9422
+ } else {
9423
+ if (Array.isArray(value2)) return false;
9424
+ for (const key in value1) {
9425
+ if (!(key in value2)) return false;
9426
+ if (!isDeepEquals(value1[key], value2[key])) return false;
9427
+ }
9428
+ for (const key in value2) if (!(key in value1)) return false;
9429
+ }
9430
+ return true;
9398
9431
  }
9399
9432
  //#endregion
9400
- //#region src/flow/common/condition.ts
9401
- var unaryOperator = (operator) => operator.startsWith("is");
9402
- var operandHandle = (caseIndex, groupIndex, expressionIndex, side) => `${caseIndex}/${groupIndex}/${expressionIndex}/${side}`;
9403
- /** Derived addresses let operand bindings use the ordinary input analysis and editor. Never persisted as node inputs. */
9404
- function conditionOperands(node) {
9405
- return node.cases.flatMap((item, c) => item.groups.flatMap((group, g) => group.expressions.flatMap((expression, e) => [{
9406
- handle: operandHandle(c, g, e, "left"),
9407
- operand: expression.left,
9408
- expression,
9409
- side: "left"
9410
- }, ...!unaryOperator(expression.operator) ? [{
9411
- handle: operandHandle(c, g, e, "right"),
9412
- operand: expression.right ?? { kind: "value" },
9413
- expression,
9414
- side: "right"
9415
- }] : []])));
9433
+ //#region src/json-schema-subset/expression/result.ts
9434
+ var ExpressionSingleResult = Object.freeze({
9435
+ Equals: 0,
9436
+ Containing: 1,
9437
+ ContainedBy: 2,
9438
+ Rejection: 3,
9439
+ Intersection: 4
9440
+ });
9441
+ var ExpressionEquals = toExpression(ExpressionSingleResult.Equals);
9442
+ var ExpressionContaining = toExpression(ExpressionSingleResult.Containing);
9443
+ var ExpressionContainedBy = toExpression(ExpressionSingleResult.ContainedBy);
9444
+ var ExpressionRejection = toExpression(ExpressionSingleResult.Rejection);
9445
+ var ExpressionIntersection = toExpression(ExpressionSingleResult.Intersection);
9446
+ var ExpressionMaskList = deepFreeze([
9447
+ [ExpressionSingleResult.Equals, ExpressionEquals],
9448
+ [ExpressionSingleResult.Containing, ExpressionContaining],
9449
+ [ExpressionSingleResult.ContainedBy, ExpressionContainedBy],
9450
+ [ExpressionSingleResult.Rejection, ExpressionRejection],
9451
+ [ExpressionSingleResult.Intersection, ExpressionIntersection]
9452
+ ]);
9453
+ var ExpressionAny = (() => {
9454
+ let expression = 0;
9455
+ for (const [_, mask] of ExpressionMaskList) expression |= mask;
9456
+ return expression;
9457
+ })();
9458
+ function hasEquals(expression) {
9459
+ return !!(expression & ExpressionEquals);
9416
9460
  }
9417
- function nodeInputMappings(node) {
9418
- if (node.kind == "outputs") return node.outputMappings;
9419
- if (node.kind != "condition") return "inputs" in node ? node.inputs : {};
9420
- return Object.fromEntries(conditionOperands(node).flatMap(({ handle, operand }) => operand.kind == "source" ? [[handle, {
9421
- kind: "sources",
9422
- sources: [operand.source]
9423
- }]] : operand.value === void 0 ? [] : [[handle, {
9424
- kind: "value",
9425
- value: operand.value
9426
- }]]));
9461
+ function hasContaining(expression) {
9462
+ return !!(expression & ExpressionContaining);
9427
9463
  }
9428
- function conditionInputPorts(node) {
9429
- return Object.fromEntries(conditionOperands(node).map(({ handle, operand }) => [handle, {
9430
- jsonSchema: operand.kind === "value" ? operand.jsonSchema ?? {} : {},
9431
- nullable: operand.kind === "value" ? operand.value === null : true
9432
- }]));
9464
+ function hasContainedBy(expression) {
9465
+ return !!(expression & ExpressionContainedBy);
9433
9466
  }
9434
- function setConditionInput(node, handle, mapping) {
9435
- const entry = conditionOperands(node).find((item) => item.handle == handle);
9436
- if (entry == null) throw new Error("Condition operand does not exist.");
9437
- if (mapping?.kind == "sources" && mapping.sources.length != 1) throw new Error("A Condition operand requires one Source.");
9438
- const value = mapping?.kind == "sources" ? {
9439
- kind: "source",
9440
- source: mapping.sources[0]
9441
- } : {
9442
- kind: "value",
9443
- ...entry.operand.kind === "value" && entry.operand.jsonSchema != null ? { jsonSchema: entry.operand.jsonSchema } : {},
9444
- ...mapping?.kind == "value" ? { value: mapping.value } : {}
9445
- };
9446
- const [c, g, e] = handle.split("/").map(Number);
9447
- return {
9448
- ...node,
9449
- cases: node.cases.map((item, ci) => ci != c ? item : {
9450
- ...item,
9451
- groups: item.groups.map((group, gi) => gi != g ? group : {
9452
- ...group,
9453
- expressions: group.expressions.map((expression, ei) => ei != e ? expression : {
9454
- ...expression,
9455
- [entry.side]: value
9456
- })
9457
- })
9458
- })
9459
- };
9467
+ function hasRejection(expression) {
9468
+ return !!(expression & ExpressionRejection);
9460
9469
  }
9461
- //#endregion
9462
- //#region src/flow/common/retry.ts
9463
- var retryNodeTypes = [
9464
- "code",
9465
- "connector",
9466
- "openapi",
9467
- "llm",
9468
- "decision"
9469
- ];
9470
- var nodeRetryLimits = {
9471
- maxRetries: 5,
9472
- minIntervalMs: 1e3,
9473
- maxIntervalMs: 6e4,
9474
- intervalStepMs: 1e3
9475
- };
9476
- var retryConfigurationSchema = strictObject({
9477
- maxRetries: number().int().min(0).max(nodeRetryLimits.maxRetries),
9478
- intervalMs: number().int().min(nodeRetryLimits.minIntervalMs).max(nodeRetryLimits.maxIntervalMs).multipleOf(nodeRetryLimits.intervalStepMs)
9479
- });
9480
- function supportsNodeRetry(node) {
9481
- return node.kind == "task" && retryNodeTypes.some((type) => type == ("moduleId" in node.task ? "code" : node.task.executor.kind));
9470
+ function hasIntersection(expression) {
9471
+ return !!(expression & ExpressionIntersection);
9472
+ }
9473
+ function toExpression(expression) {
9474
+ return 1 << expression;
9482
9475
  }
9483
9476
  //#endregion
9484
- //#region src/flow/common/errorHandling.ts
9485
- var nodeErrorSchema = {
9486
- type: "object",
9487
- additionalProperties: false,
9488
- required: [
9489
- "code",
9490
- "message",
9491
- "nodeId",
9492
- "nodeName",
9493
- "runId",
9494
- "executionId"
9495
- ],
9496
- properties: {
9497
- code: { type: "string" },
9498
- message: { type: "string" },
9499
- nodeId: { type: "string" },
9500
- nodeName: { type: "string" },
9501
- runId: { type: "string" },
9502
- executionId: { type: "string" }
9503
- }
9504
- };
9505
- function supportsNodeErrorHandling(node) {
9506
- return supportsNodeRetry(node);
9477
+ //#region src/json-schema-subset/expression/combination.ts
9478
+ function makeCombination(calculator) {
9479
+ let expression = 0;
9480
+ let count = 0;
9481
+ const quantum = { push: (newExpression) => {
9482
+ if (count === 0) expression = newExpression;
9483
+ else expression = forEach(expression, newExpression, calculator);
9484
+ count += 1;
9485
+ return expression;
9486
+ } };
9487
+ Object.defineProperties(quantum, {
9488
+ result: { get: () => expression },
9489
+ count: { get: () => count }
9490
+ });
9491
+ return quantum;
9507
9492
  }
9508
- function nodeSystemOutputPorts(node) {
9509
- return supportsNodeErrorHandling(node) && node.onError == "error" ? { error: {
9510
- jsonSchema: nodeErrorSchema,
9511
- nullable: true
9512
- } } : {};
9493
+ function forEach(e1, e2, calculator) {
9494
+ let expression = 0;
9495
+ for (const [singleResult1, mask1] of ExpressionMaskList) if (mask1 & e1) {
9496
+ for (const [singleResult2, mask2] of ExpressionMaskList) if (mask2 & e2) {
9497
+ expression |= calculator(singleResult1, singleResult2);
9498
+ if (expression === ExpressionAny) return expression;
9499
+ }
9500
+ }
9501
+ return expression;
9513
9502
  }
9514
- function resourceNameIssue(value) {
9515
- const name = value.trim();
9516
- if (name.length == 0) return "empty";
9517
- if (name.length > 80) return "tooLong";
9518
- for (const character of name) {
9519
- const code = character.charCodeAt(0);
9520
- if (code <= 31 || code >= 127 && code <= 159) return "controlCharacter";
9503
+ //#endregion
9504
+ //#region src/json-schema-subset/expression/calculator.ts
9505
+ var CalculatorOperator = Object.freeze({
9506
+ Save: 0,
9507
+ OneOf: 1,
9508
+ AllOf: 2,
9509
+ AnyOf: 3,
9510
+ Not: 4,
9511
+ Swap: 5
9512
+ });
9513
+ function calculate(operator, expressions) {
9514
+ switch (operator) {
9515
+ case CalculatorOperator.Save: return expressions[0];
9516
+ case CalculatorOperator.OneOf: return calculateOneOf(expressions);
9517
+ case CalculatorOperator.AllOf:
9518
+ case CalculatorOperator.AnyOf: return calculateCombination(operator, expressions);
9519
+ case CalculatorOperator.Not:
9520
+ case CalculatorOperator.Swap: return calculateUnary(operator, expressions[0]);
9521
9521
  }
9522
- if (!/^[\p{L}\p{N}](?:[\p{L}\p{N} _-]*[\p{L}\p{N}])?$/u.test(name)) return "specialCharacter";
9523
9522
  }
9524
- function portsByHandle(ports) {
9525
- return Object.fromEntries(ports.flatMap((port) => "handle" in port ? [[port.handle, port]] : []));
9526
- }
9527
- function decodeConnectorCapabilities(value) {
9528
- if (!Array.isArray(value)) throw new TypeError("Connector capabilities must be an array.");
9529
- if (value.length == 0) return [];
9530
- if (value.some((item) => item != null && typeof item == "object" && !Array.isArray(item) && Object.hasOwn(item, "mode"))) {
9531
- if (value.length != 1) throw new TypeError("Connector capability is declared more than once.");
9532
- const source = value[0];
9533
- if (source.mode == "shared") {
9534
- if (source.kind != "connector" || Object.keys(source).some((key) => !["kind", "mode"].includes(key))) throw new TypeError("Invalid shared Connector permission capability.");
9535
- return [{
9536
- kind: "connector",
9537
- mode: "shared"
9538
- }];
9539
- }
9540
- if (Object.keys(source).some((key) => ![
9541
- "kind",
9542
- "mode",
9543
- "actions"
9544
- ].includes(key)) || source.kind != "connector" || source.mode != "independent" || !Array.isArray(source.actions)) throw new TypeError("Invalid Connector permission capability.");
9545
- const actions = source.actions.map((entry) => {
9546
- if (entry == null || typeof entry != "object" || Array.isArray(entry)) throw new TypeError("Invalid Connector Action.");
9547
- const action = entry;
9548
- if (Object.keys(action).some((key) => !["action", "connectionId"].includes(key)) || typeof action.action != "string" || !/^[A-Za-z0-9_-]+\.[A-Za-z0-9_.-]+$/.test(action.action) || Object.hasOwn(action, "connectionId") && typeof action.connectionId != "string") throw new TypeError("Invalid Connector Action permission.");
9549
- return action.connectionId == null ? { action: action.action } : {
9550
- action: action.action,
9551
- connectionId: action.connectionId
9552
- };
9553
- });
9554
- if (new Set(actions.map((action) => action.action)).size != actions.length) throw new TypeError("Duplicate Connector Action permission.");
9555
- return [{
9556
- kind: "connector",
9557
- mode: "independent",
9558
- actions
9559
- }];
9560
- }
9561
- if (value.some((item) => item != null && typeof item == "object" && !Array.isArray(item) && !Object.hasOwn(item, "action"))) {
9562
- if (value.length != 1) throw new TypeError("Connector capability is declared more than once.");
9563
- const item = value[0];
9564
- if (item == null || typeof item != "object" || Array.isArray(item)) throw new TypeError("Invalid Connector capability.");
9565
- const source = item;
9566
- if (Object.keys(source).some((key) => ![
9567
- "kind",
9568
- "actionHints",
9569
- "connectionHints"
9570
- ].includes(key)) || source.kind != "connector" || Object.hasOwn(source, "actionHints") && !Array.isArray(source.actionHints) || Object.hasOwn(source, "connectionHints") && !Array.isArray(source.connectionHints)) throw new TypeError("Invalid Connector capability.");
9571
- const actionHints = (source.actionHints ?? []).map((action) => {
9572
- if (typeof action != "string" || !/^[A-Za-z0-9_-]+\.[A-Za-z0-9_.-]+$/.test(action)) throw new TypeError("Invalid Connector Action hint.");
9573
- return action;
9574
- });
9575
- if (new Set(actionHints).size != actionHints.length) throw new TypeError("Duplicate Connector Action hint.");
9576
- const keys = /* @__PURE__ */ new Set();
9577
- const connectionHints = (source.connectionHints ?? []).map((entry) => {
9578
- if (entry == null || typeof entry != "object" || Array.isArray(entry)) throw new TypeError("Invalid Connector Connection hint.");
9579
- const hint = entry;
9580
- if (Object.keys(hint).some((key) => ![
9581
- "action",
9582
- "connectionId",
9583
- "alias"
9584
- ].includes(key)) || typeof hint.action != "string" || !/^[A-Za-z0-9_-]+\.[A-Za-z0-9_.-]+$/.test(hint.action) || typeof hint.connectionId != "string" || hint.connectionId.length == 0 || Object.hasOwn(hint, "alias") && (typeof hint.alias != "string" || hint.alias.length == 0)) throw new TypeError("Invalid Connector Connection hint.");
9585
- const key = `${hint.action}\0${hint.alias ?? ""}`;
9586
- if (keys.has(key)) throw new TypeError("Duplicate Connector Connection hint.");
9587
- keys.add(key);
9588
- return hint.alias == null ? {
9589
- action: hint.action,
9590
- connectionId: hint.connectionId
9591
- } : {
9592
- action: hint.action,
9593
- connectionId: hint.connectionId,
9594
- alias: hint.alias
9595
- };
9596
- });
9597
- return [{
9598
- kind: "connector",
9599
- ...actionHints.length == 0 ? {} : { actionHints },
9600
- ...connectionHints.length == 0 ? {} : { connectionHints }
9601
- }];
9602
- }
9603
- const actions = /* @__PURE__ */ new Set();
9604
- return value.map((item) => {
9605
- if (item == null || typeof item != "object" || Array.isArray(item)) throw new TypeError("Invalid Connector capability.");
9606
- const source = item;
9607
- if (Object.keys(source).some((key) => ![
9608
- "kind",
9609
- "action",
9610
- "connections",
9611
- "connectionId"
9612
- ].includes(key)) || source.kind != "connector" || typeof source.action != "string" || !/^[A-Za-z0-9_-]+\.[A-Za-z0-9_.-]+$/.test(source.action) || !Array.isArray(source.connections)) throw new TypeError("Invalid Connector capability.");
9613
- if (actions.has(source.action)) throw new TypeError("Connector Action is declared more than once.");
9614
- actions.add(source.action);
9615
- const ids = /* @__PURE__ */ new Set();
9616
- const aliases = /* @__PURE__ */ new Set();
9617
- const connections = source.connections.map((entry) => {
9618
- if (entry == null || typeof entry != "object" || Array.isArray(entry)) throw new TypeError("Invalid Connector Connection.");
9619
- const connection = entry;
9620
- if (Object.keys(connection).some((key) => !["connectionId", "alias"].includes(key)) || typeof connection.connectionId != "string" || connection.connectionId.length == 0 || ids.has(connection.connectionId)) throw new TypeError("Invalid or duplicate Connector Connection ID.");
9621
- ids.add(connection.connectionId);
9622
- if (Object.hasOwn(connection, "alias")) {
9623
- if (typeof connection.alias != "string" || connection.alias.length == 0 || aliases.has(connection.alias)) throw new TypeError("Invalid or duplicate Connector alias.");
9624
- aliases.add(connection.alias);
9625
- }
9626
- return {
9627
- connectionId: connection.connectionId,
9628
- ...connection.alias == null ? {} : { alias: connection.alias }
9629
- };
9630
- });
9631
- if (Object.hasOwn(source, "connectionId") && (typeof source.connectionId != "string" || !ids.has(source.connectionId))) throw new TypeError("The default Connector Connection must be declared.");
9632
- return {
9633
- kind: "connector",
9634
- action: source.action,
9635
- connections,
9636
- ...source.connectionId == null ? {} : { connectionId: source.connectionId }
9637
- };
9638
- });
9639
- }
9640
- function isTriggerNode(node) {
9641
- return [
9642
- "manual",
9643
- "start",
9644
- "error",
9645
- "webhook",
9646
- "cron",
9647
- "poll",
9648
- "integration"
9649
- ].includes(node.kind);
9650
- }
9651
- /** Lossless upgrade of readable content. Historical content and its encoding stay unchanged. */
9652
- function upgradeRevisionContent(content) {
9653
- const upgraded = upgradeDecodedRevisionContent(decodeRevisionContent(content));
9654
- return dequal(content, upgraded) ? content : upgraded;
9655
- }
9656
- function upgradeDecodedRevisionContent(content) {
9657
- const graph = content.document.graph;
9658
- const hasManual = Object.values(graph.nodes).some((node) => node.kind == "manual");
9659
- if (!hasManual && content.modelVersion == 10) return content;
9660
- return {
9661
- ...content,
9662
- modelVersion: 10,
9663
- document: {
9664
- ...content.document,
9665
- graph: hasManual ? {
9666
- ...graph,
9667
- nodes: Object.fromEntries(Object.entries(graph.nodes).map(([id, node]) => [id, upgradeManualTrigger(node)]))
9668
- } : graph
9669
- }
9670
- };
9671
- }
9672
- function upgradeManualTrigger(node) {
9673
- return node.kind == "manual" ? {
9674
- ...node,
9675
- kind: "start",
9676
- inputDefs: []
9677
- } : node;
9678
- }
9679
- function normalizeNodeName(value) {
9680
- return value.trim().normalize("NFC");
9681
- }
9682
- function nodeNameIssue(graph, nodeId, value) {
9683
- const name = normalizeNodeName(value);
9684
- if (name.length == 0) return "empty";
9685
- return Object.entries(graph.nodes).some(([candidateId, node]) => candidateId != nodeId && node.name != null && normalizeNodeName(node.name) == name) ? "duplicate" : void 0;
9523
+ function swap(expression) {
9524
+ return calculateUnary(CalculatorOperator.Swap, expression);
9686
9525
  }
9687
- var FlowChangeError = class extends Error {
9688
- constructor(message) {
9689
- super(message);
9690
- this.name = "FlowChangeError";
9526
+ /**
9527
+ * The oneOf operator is indivisible, so `a + b + c` must be evaluated as one expression.
9528
+ * ![](../../doc/images/all_of_expression.png)
9529
+ */
9530
+ function calculateOneOf(expressions) {
9531
+ if (expressions.length === 1) return expressions[0];
9532
+ const unionSet = calculateCombination(CalculatorOperator.AnyOf, expressions);
9533
+ const intersectionList = [];
9534
+ for (let i = 0; i < expressions.length; ++i) for (let j = i + 1; j < expressions.length; ++j) {
9535
+ const left = expressions[i];
9536
+ const right = expressions[j];
9537
+ const intersection = calculateCombination(CalculatorOperator.AllOf, [left, right]);
9538
+ intersectionList.push(intersection);
9691
9539
  }
9692
- };
9693
- function invalid(message) {
9694
- throw new FlowChangeError(message);
9540
+ const banZone = calculateCombination(CalculatorOperator.AnyOf, intersectionList);
9541
+ const enableZone = calculateUnary(CalculatorOperator.Not, banZone);
9542
+ return calculateCombination(CalculatorOperator.AllOf, [unionSet, enableZone]);
9695
9543
  }
9696
- function applyFlowChanges(content, operations) {
9697
- const source = content.modelVersion != 10 || Object.values(content.document.graph.nodes).some((node) => node.kind == "manual") ? decodeRevisionContent(content) : content;
9698
- const document = { ...source.document };
9699
- const modules = { ...source.modules };
9700
- for (const operation of operations) switch (operation.kind) {
9701
- case "graph.trigger.sources.set": {
9702
- const graph = document.graph;
9703
- const node = graph.nodes[operation.nodeId];
9704
- if (node?.kind != "error") invalid("The Flow Error node does not exist.");
9705
- if (!dequal(node.sourceFlowIds, operation.before)) invalid("The Flow Error node’s sources changed before this operation was applied.");
9706
- const { sourceFlowIds: _, ...base } = node;
9707
- const updated = operation.value == null ? base : {
9708
- ...base,
9709
- sourceFlowIds: operation.value
9710
- };
9711
- document.graph = {
9712
- ...graph,
9713
- nodes: {
9714
- ...graph.nodes,
9715
- [operation.nodeId]: updated
9716
- }
9717
- };
9544
+ function calculateCombination(operator, expressions) {
9545
+ if (expressions.length < 0) throw new Error("invalid expressions: empty array");
9546
+ let combination;
9547
+ switch (operator) {
9548
+ case CalculatorOperator.AllOf:
9549
+ combination = makeCombination(calculateAllOf);
9718
9550
  break;
9719
- }
9720
- case "binding.create":
9721
- if (document.bindings[operation.bindingId] != null) invalid("A Binding with this ID already exists.");
9722
- document.bindings = {
9723
- ...document.bindings,
9724
- [operation.bindingId]: operation.binding
9725
- };
9551
+ case CalculatorOperator.AnyOf:
9552
+ combination = makeCombination(calculateAnyOf);
9726
9553
  break;
9727
- case "binding.delete": {
9728
- if (document.bindings[operation.bindingId] == null) invalid("The Binding does not exist.");
9729
- const bindings = { ...document.bindings };
9730
- delete bindings[operation.bindingId];
9731
- document.bindings = bindings;
9554
+ default: throw new Error(`invalid operator ${operator}`);
9555
+ }
9556
+ for (const expression of expressions) combination.push(expression);
9557
+ return combination.result;
9558
+ }
9559
+ function calculateUnary(operator, expression) {
9560
+ let calculator;
9561
+ let result = 0;
9562
+ switch (operator) {
9563
+ case CalculatorOperator.Not:
9564
+ calculator = calculateNot;
9732
9565
  break;
9733
- }
9734
- case "binding.target.set": {
9735
- const binding = document.bindings[operation.bindingId];
9736
- if (binding == null) invalid("The Binding does not exist.");
9737
- if (binding.target != operation.before) invalid("The Binding target changed before this operation was applied.");
9738
- document.bindings = {
9739
- ...document.bindings,
9740
- [operation.bindingId]: {
9741
- ...binding,
9742
- target: operation.value
9743
- }
9744
- };
9566
+ case CalculatorOperator.Swap:
9567
+ calculator = calculateSwap;
9745
9568
  break;
9746
- }
9747
- case "graph.edge.connect": {
9748
- const graph = document.graph;
9749
- if (graph.nodes[operation.edge.source] == null) invalid("The source Node does not exist.");
9750
- if (graph.nodes[operation.edge.source]?.kind == "outputs") invalid("Outputs cannot have downstream execution edges.");
9751
- const node = graph.nodes[operation.edge.target];
9752
- if (node == null || isTriggerNode(node)) invalid("The target Node does not accept execution dependencies.");
9753
- if (graph.edges.some((edge) => dequal(edge, operation.edge))) invalid("The Nodes are already connected.");
9754
- Object.assign(document, { graph: {
9755
- ...graph,
9756
- edges: [...graph.edges, operation.edge]
9757
- } });
9569
+ default: throw new Error(`invalid operator ${operator}`);
9570
+ }
9571
+ for (const [singleExpression, maskExpression] of ExpressionMaskList) if (maskExpression & expression) result |= calculator(singleExpression);
9572
+ return result;
9573
+ }
9574
+ function calculateAllOf(e1, e2) {
9575
+ let result = 0;
9576
+ switch (e1) {
9577
+ case ExpressionSingleResult.Equals:
9578
+ switch (e2) {
9579
+ case ExpressionSingleResult.Equals:
9580
+ result = ExpressionEquals;
9581
+ break;
9582
+ case ExpressionSingleResult.Containing:
9583
+ result = ExpressionEquals;
9584
+ break;
9585
+ case ExpressionSingleResult.ContainedBy:
9586
+ result = ExpressionContainedBy;
9587
+ break;
9588
+ case ExpressionSingleResult.Rejection:
9589
+ result = 0;
9590
+ break;
9591
+ case ExpressionSingleResult.Intersection: result = ExpressionContainedBy;
9592
+ }
9758
9593
  break;
9759
- }
9760
- case "graph.edge.disconnect": {
9761
- const graph = document.graph;
9762
- const edges = graph.edges.filter((edge) => !dequal(edge, operation.edge));
9763
- if (edges.length == graph.edges.length) invalid("The Nodes are not connected.");
9764
- Object.assign(document, { graph: {
9765
- ...graph,
9766
- edges
9767
- } });
9594
+ case ExpressionSingleResult.Containing:
9595
+ switch (e2) {
9596
+ case ExpressionSingleResult.Equals:
9597
+ result = ExpressionEquals;
9598
+ break;
9599
+ case ExpressionSingleResult.Containing:
9600
+ result = ExpressionEquals | ExpressionContaining;
9601
+ break;
9602
+ case ExpressionSingleResult.ContainedBy:
9603
+ result = ExpressionContainedBy;
9604
+ break;
9605
+ case ExpressionSingleResult.Rejection:
9606
+ result = ExpressionRejection;
9607
+ break;
9608
+ case ExpressionSingleResult.Intersection: result = ExpressionIntersection | ExpressionContainedBy;
9609
+ }
9768
9610
  break;
9769
- }
9770
- case "graph.node.additional-inputs.set": {
9771
- const graph = document.graph;
9772
- const node = graph.nodes[operation.nodeId];
9773
- if (node?.kind != "task") invalid("The Task Node does not exist.");
9774
- if (!dequal(node.additionalInputs, operation.before)) invalid("The Task Node inputs changed before this operation was applied.");
9775
- const { additionalInputs: _, ...rest } = node;
9776
- const updated = operation.value == null ? rest : {
9777
- ...rest,
9778
- additionalInputs: operation.value
9779
- };
9780
- Object.assign(document, { graph: {
9781
- ...graph,
9782
- nodes: {
9783
- ...graph.nodes,
9784
- [operation.nodeId]: updated
9785
- }
9786
- } });
9611
+ case ExpressionSingleResult.ContainedBy:
9612
+ switch (e2) {
9613
+ case ExpressionSingleResult.Equals:
9614
+ result = ExpressionContainedBy;
9615
+ break;
9616
+ case ExpressionSingleResult.Containing:
9617
+ result = ExpressionContainedBy;
9618
+ break;
9619
+ case ExpressionSingleResult.ContainedBy:
9620
+ result = ExpressionContainedBy;
9621
+ break;
9622
+ case ExpressionSingleResult.Rejection:
9623
+ result = 0;
9624
+ break;
9625
+ case ExpressionSingleResult.Intersection: result = ExpressionContainedBy;
9626
+ }
9787
9627
  break;
9788
- }
9789
- case "graph.node.condition.set": {
9790
- const graph = document.graph;
9791
- const node = graph.nodes[operation.nodeId];
9792
- if (node?.kind != "condition") invalid("The Condition Node does not exist.");
9793
- if (!dequal(node.cases, operation.before.cases) || node.matchMode != operation.before.matchMode) invalid("The Condition Node changed before this operation was applied.");
9794
- const updated = {
9795
- ...node,
9796
- ...operation.value
9797
- };
9798
- Object.assign(document, { graph: {
9799
- ...graph,
9800
- nodes: {
9801
- ...graph.nodes,
9802
- [operation.nodeId]: updated
9803
- }
9804
- } });
9628
+ case ExpressionSingleResult.Rejection:
9629
+ switch (e2) {
9630
+ case ExpressionSingleResult.Equals:
9631
+ result = 0;
9632
+ break;
9633
+ case ExpressionSingleResult.Containing:
9634
+ result = ExpressionRejection;
9635
+ break;
9636
+ case ExpressionSingleResult.ContainedBy:
9637
+ result = 0;
9638
+ break;
9639
+ case ExpressionSingleResult.Rejection:
9640
+ result = ExpressionRejection;
9641
+ break;
9642
+ case ExpressionSingleResult.Intersection: result = ExpressionRejection;
9643
+ }
9805
9644
  break;
9645
+ case ExpressionSingleResult.Intersection: switch (e2) {
9646
+ case ExpressionSingleResult.Equals:
9647
+ result = ExpressionContainedBy;
9648
+ break;
9649
+ case ExpressionSingleResult.Containing:
9650
+ result = ExpressionIntersection | ExpressionContainedBy;
9651
+ break;
9652
+ case ExpressionSingleResult.ContainedBy:
9653
+ result = ExpressionContainedBy;
9654
+ break;
9655
+ case ExpressionSingleResult.Rejection:
9656
+ result = ExpressionRejection;
9657
+ break;
9658
+ case ExpressionSingleResult.Intersection: result = ExpressionContainedBy | ExpressionRejection | ExpressionIntersection;
9806
9659
  }
9807
- case "graph.node.replace": {
9808
- const graph = document.graph;
9809
- if (!dequal(graph.nodes[operation.nodeId], operation.before)) invalid("The Node changed before this operation was applied.");
9810
- if (operation.node.kind != operation.before.kind) invalid("Replacing a Node cannot change its kind.");
9811
- if (operation.node.kind == "task" && "moduleId" in operation.node.task && operation.node.task.capabilities !== void 0) decodeConnectorCapabilities(operation.node.task.capabilities);
9812
- const name = normalizeNodeName(operation.node.name ?? "");
9813
- const issue = nodeNameIssue(graph, operation.nodeId, name);
9814
- if (issue != null) invalid(`Node name is ${issue}.`);
9815
- const node = name == operation.node.name ? operation.node : {
9816
- ...operation.node,
9817
- name
9818
- };
9819
- Object.assign(document, { graph: {
9820
- ...graph,
9821
- nodes: {
9822
- ...graph.nodes,
9823
- [operation.nodeId]: node
9824
- }
9825
- } });
9660
+ }
9661
+ return result;
9662
+ }
9663
+ function calculateAnyOf(e1, e2) {
9664
+ let result = 0;
9665
+ switch (e1) {
9666
+ case ExpressionSingleResult.Equals:
9667
+ switch (e2) {
9668
+ case ExpressionSingleResult.Equals:
9669
+ result = ExpressionEquals;
9670
+ break;
9671
+ case ExpressionSingleResult.Containing:
9672
+ result = ExpressionContaining;
9673
+ break;
9674
+ case ExpressionSingleResult.ContainedBy:
9675
+ result = ExpressionEquals;
9676
+ break;
9677
+ case ExpressionSingleResult.Rejection:
9678
+ result = ExpressionContaining;
9679
+ break;
9680
+ case ExpressionSingleResult.Intersection: result = ExpressionContaining;
9681
+ }
9826
9682
  break;
9827
- }
9828
- case "graph.node.create": {
9829
- const graph = document.graph;
9830
- if (graph.nodes[operation.nodeId] != null) invalid("A Node with this ID already exists in the target graph.");
9831
- if (operation.node.kind == "error" && Object.values(graph.nodes).some((node) => node.kind == "error")) invalid("A graph can contain only one Flow Error node.");
9832
- if ((operation.node.kind == "manual" || operation.node.kind == "start") && Object.values(graph.nodes).some((node) => node.kind == "manual" || node.kind == "start")) invalid("A graph can contain only one Start Trigger.");
9833
- if (operation.node.kind == "task" && "moduleId" in operation.node.task && operation.node.task.capabilities !== void 0) decodeConnectorCapabilities(operation.node.task.capabilities);
9834
- if (operation.node.name == null) invalid("A Node name cannot be empty.");
9835
- if (operation.node.kind == "outputs" && Object.values(graph.nodes).some((node) => node.kind == "outputs")) invalid("A graph can contain only one Outputs node.");
9836
- const name = normalizeNodeName(operation.node.name);
9837
- const issue = nodeNameIssue(graph, operation.nodeId, name);
9838
- if (issue == "empty") invalid("A Node name cannot be empty.");
9839
- if (issue == "duplicate") invalid("A Node with this name already exists in the target graph.");
9840
- const node = name == operation.node.name ? operation.node : {
9841
- ...operation.node,
9842
- name
9843
- };
9844
- Object.assign(document, { graph: {
9845
- ...graph,
9846
- nodes: {
9847
- ...graph.nodes,
9848
- [operation.nodeId]: node
9849
- }
9850
- } });
9683
+ case ExpressionSingleResult.Containing:
9684
+ switch (e2) {
9685
+ case ExpressionSingleResult.Equals:
9686
+ result = ExpressionContaining;
9687
+ break;
9688
+ case ExpressionSingleResult.Containing:
9689
+ result = ExpressionContaining;
9690
+ break;
9691
+ case ExpressionSingleResult.ContainedBy:
9692
+ result = ExpressionContaining;
9693
+ break;
9694
+ case ExpressionSingleResult.Rejection:
9695
+ result = ExpressionContaining;
9696
+ break;
9697
+ case ExpressionSingleResult.Intersection: result = ExpressionContaining;
9698
+ }
9851
9699
  break;
9852
- }
9853
- case "graph.node.delete": {
9854
- const graph = document.graph;
9855
- if (graph.nodes[operation.nodeId] == null) invalid("The Node does not exist in the target graph.");
9856
- const removed = /* @__PURE__ */ new Set([operation.nodeId]);
9857
- const nodes = Object.fromEntries(Object.entries(graph.nodes).filter(([nodeId]) => !removed.has(nodeId)));
9858
- Object.assign(document, { graph: {
9859
- ...graph,
9860
- edges: graph.edges.filter((edge) => !removed.has(edge.source) && !removed.has(edge.target)),
9861
- nodes
9862
- } });
9700
+ case ExpressionSingleResult.ContainedBy:
9701
+ switch (e2) {
9702
+ case ExpressionSingleResult.Equals:
9703
+ result = ExpressionEquals;
9704
+ break;
9705
+ case ExpressionSingleResult.Containing:
9706
+ result = ExpressionContaining;
9707
+ break;
9708
+ case ExpressionSingleResult.ContainedBy:
9709
+ result = ExpressionEquals | ExpressionContainedBy;
9710
+ break;
9711
+ case ExpressionSingleResult.Rejection:
9712
+ result = ExpressionIntersection;
9713
+ break;
9714
+ case ExpressionSingleResult.Intersection: result = ExpressionContaining | ExpressionIntersection;
9715
+ }
9863
9716
  break;
9864
- }
9865
- case "graph.node.field.set": {
9866
- const graph = document.graph;
9867
- const node = graph.nodes[operation.nodeId];
9868
- if (node == null) invalid("The Node does not exist in the target graph.");
9869
- if (operation.field == "onError" && operation.value != null && (!supportsNodeErrorHandling(node) || !["stop", "error"].includes(String(operation.value)))) invalid("This node does not support this error handling setting.");
9870
- if (operation.field == "retry" && operation.value != null && !supportsNodeRetry(node)) invalid("This node does not support retries.");
9871
- if (operation.field == "connectionId" && node.kind != "poll" && node.kind != "integration") invalid("Only provider Triggers select a node Connection.");
9872
- if (!dequal(Reflect.get(node, operation.field), operation.before)) invalid("The Node field changed before this operation was applied.");
9873
- const updated = { ...node };
9874
- if (operation.field == "name") {
9875
- if (typeof operation.value != "string") invalid("A Node name cannot be empty.");
9876
- const name = normalizeNodeName(operation.value);
9877
- const issue = nodeNameIssue(graph, operation.nodeId, name);
9878
- if (issue == "empty") invalid("A Node name cannot be empty.");
9879
- if (issue == "duplicate") invalid("A Node with this name already exists in the target graph.");
9880
- Object.assign(updated, { name });
9881
- } else if (operation.value == null) Reflect.deleteProperty(updated, operation.field);
9882
- else Object.assign(updated, { [operation.field]: operation.value });
9883
- Object.assign(document, { graph: {
9884
- ...graph,
9885
- nodes: {
9886
- ...graph.nodes,
9887
- [operation.nodeId]: updated
9888
- }
9889
- } });
9890
- break;
9891
- }
9892
- case "graph.node.input.set": {
9893
- const graph = document.graph;
9894
- const node = graph.nodes[operation.nodeId];
9895
- if (node == null || isTriggerNode(node)) invalid("The Node does not accept inputs.");
9896
- if (!dequal(nodeInputMappings(node)[operation.handle], operation.before)) invalid("The Node input changed before this operation was applied.");
9897
- const inputs = { ...nodeInputMappings(node) };
9898
- if (operation.value == null) delete inputs[operation.handle];
9899
- else inputs[operation.handle] = operation.value;
9900
- if (node.kind == "outputs") {
9901
- document.graph = {
9902
- ...graph,
9903
- nodes: {
9904
- ...graph.nodes,
9905
- [operation.nodeId]: {
9906
- ...node,
9907
- outputMappings: inputs
9908
- }
9909
- }
9910
- };
9911
- break;
9717
+ case ExpressionSingleResult.Rejection:
9718
+ switch (e2) {
9719
+ case ExpressionSingleResult.Equals:
9720
+ result = ExpressionContaining;
9721
+ break;
9722
+ case ExpressionSingleResult.Containing:
9723
+ result = ExpressionContaining;
9724
+ break;
9725
+ case ExpressionSingleResult.ContainedBy:
9726
+ result = ExpressionIntersection;
9727
+ break;
9728
+ case ExpressionSingleResult.Rejection:
9729
+ result = ExpressionRejection;
9730
+ break;
9731
+ case ExpressionSingleResult.Intersection: result = ExpressionIntersection;
9912
9732
  }
9913
- Object.assign(document, { graph: {
9914
- ...graph,
9915
- nodes: {
9916
- ...graph.nodes,
9917
- [operation.nodeId]: node.kind == "condition" ? setConditionInput(node, operation.handle, operation.value) : {
9918
- ...node,
9919
- inputs
9920
- }
9921
- }
9922
- } });
9923
9733
  break;
9734
+ case ExpressionSingleResult.Intersection: switch (e2) {
9735
+ case ExpressionSingleResult.Equals:
9736
+ result = ExpressionContaining;
9737
+ break;
9738
+ case ExpressionSingleResult.Containing:
9739
+ result = ExpressionContaining;
9740
+ break;
9741
+ case ExpressionSingleResult.ContainedBy:
9742
+ result = ExpressionContaining | ExpressionIntersection;
9743
+ break;
9744
+ case ExpressionSingleResult.Rejection:
9745
+ result = ExpressionIntersection;
9746
+ break;
9747
+ case ExpressionSingleResult.Intersection: result = ExpressionContaining | ExpressionIntersection;
9924
9748
  }
9925
- case "graph.node.task.capabilities.set": {
9926
- const graph = document.graph;
9927
- const node = graph.nodes[operation.nodeId];
9928
- if (node?.kind != "task" || !("moduleId" in node.task)) invalid("The inline Task Node does not exist.");
9929
- if (!dequal(node.task.capabilities, operation.before)) invalid("The inline Task capabilities changed before this operation was applied.");
9930
- const task = { ...node.task };
9931
- if (operation.value === void 0) delete task.capabilities;
9932
- else task.capabilities = decodeConnectorCapabilities(operation.value);
9933
- Object.assign(document, { graph: {
9934
- ...graph,
9935
- nodes: {
9936
- ...graph.nodes,
9937
- [operation.nodeId]: {
9938
- ...node,
9939
- task
9940
- }
9941
- }
9942
- } });
9749
+ }
9750
+ return result;
9751
+ }
9752
+ function calculateNot(expression) {
9753
+ let result = 0;
9754
+ switch (expression) {
9755
+ case ExpressionSingleResult.Equals:
9756
+ result = ExpressionRejection;
9943
9757
  break;
9944
- }
9945
- case "graph.node.task.name.set": {
9946
- const graph = document.graph;
9947
- const node = graph.nodes[operation.nodeId];
9948
- if (node?.kind != "task" || !("moduleId" in node.task)) invalid("The inline Task Node does not exist.");
9949
- if (node.task.name != operation.before) invalid("The inline Task name changed before this operation was applied.");
9950
- const updated = {
9951
- ...node,
9952
- task: {
9953
- ...node.task,
9954
- name: operation.value
9955
- }
9956
- };
9957
- Object.assign(document, { graph: {
9958
- ...graph,
9959
- nodes: {
9960
- ...graph.nodes,
9961
- [operation.nodeId]: updated
9962
- }
9963
- } });
9758
+ case ExpressionSingleResult.Containing:
9759
+ result = ExpressionRejection;
9964
9760
  break;
9965
- }
9966
- case "graph.node.task.ports.set": {
9967
- const graph = document.graph;
9968
- const node = graph.nodes[operation.nodeId];
9969
- if (node?.kind != "task" || !("moduleId" in node.task)) invalid("The inline Task Node does not exist.");
9970
- if (!dequal({
9971
- inputs: node.task.inputs,
9972
- outputs: node.task.outputs
9973
- }, operation.before)) invalid("The inline Task ports changed before this operation was applied.");
9974
- const updated = {
9975
- ...node,
9976
- task: {
9977
- ...node.task,
9978
- inputs: operation.value.inputs,
9979
- outputs: operation.value.outputs
9980
- }
9981
- };
9982
- Object.assign(document, { graph: {
9983
- ...graph,
9984
- nodes: {
9985
- ...graph.nodes,
9986
- [operation.nodeId]: updated
9987
- }
9988
- } });
9761
+ case ExpressionSingleResult.ContainedBy:
9762
+ result = ExpressionIntersection;
9989
9763
  break;
9990
- }
9991
- case "graph.node.values.set": {
9992
- const graph = document.graph;
9993
- const node = graph.nodes[operation.nodeId];
9994
- if (node?.kind != "value") invalid("The Value Node does not exist.");
9995
- if (!dequal(node.values, operation.before)) invalid("The Value Node changed before this operation was applied.");
9996
- Object.assign(document, { graph: {
9997
- ...graph,
9998
- nodes: {
9999
- ...graph.nodes,
10000
- [operation.nodeId]: {
10001
- ...node,
10002
- values: operation.value
10003
- }
10004
- }
10005
- } });
9764
+ case ExpressionSingleResult.Rejection:
9765
+ result = ExpressionEquals | ExpressionContaining;
10006
9766
  break;
10007
- }
10008
- case "graph.node.resolution.set": {
10009
- const graph = document.graph;
10010
- const node = graph.nodes[operation.nodeId];
10011
- if (node?.kind != "wait" && node?.kind != "approval" || !dequal({
10012
- inputDefinitions: node.inputDefinitions,
10013
- prompt: node.prompt,
10014
- ...node.kind == "wait" && node.autoContinue != null ? { autoContinue: node.autoContinue } : {}
10015
- }, operation.before)) invalid("The resolution node changed before this operation was applied.");
10016
- if (node.kind == "approval" && operation.value.autoContinue != null) invalid("Approval does not support automatic continuation.");
10017
- const updated = {
10018
- ...node,
10019
- ...operation.value
10020
- };
10021
- if (updated.kind == "wait" && operation.value.autoContinue == null) Reflect.deleteProperty(updated, "autoContinue");
10022
- document.graph = {
10023
- ...graph,
10024
- nodes: {
10025
- ...graph.nodes,
10026
- [operation.nodeId]: updated
10027
- }
10028
- };
9767
+ case ExpressionSingleResult.Intersection: result = ExpressionContainedBy | ExpressionIntersection;
9768
+ }
9769
+ return result;
9770
+ }
9771
+ function calculateSwap(expression) {
9772
+ let result = 0;
9773
+ switch (expression) {
9774
+ case ExpressionSingleResult.Equals:
9775
+ result = ExpressionEquals;
10029
9776
  break;
10030
- }
10031
- case "graph.node.webhook.set": {
10032
- const graph = document.graph;
10033
- const node = graph.nodes[operation.nodeId];
10034
- if (node?.kind != "webhook") invalid("The Webhook Node does not exist.");
10035
- if (node.method != operation.before.method || !dequal(node.bodyFields, operation.before.bodyFields) || !dequal(node.options, operation.before.options)) invalid("The Webhook Node changed before this operation was applied.");
10036
- const { options: _, ...rest } = node;
10037
- const updated = operation.value.options == null ? {
10038
- ...rest,
10039
- bodyFields: operation.value.bodyFields,
10040
- method: operation.value.method
10041
- } : {
10042
- ...node,
10043
- ...operation.value
10044
- };
10045
- Object.assign(document, { graph: {
10046
- ...graph,
10047
- nodes: {
10048
- ...graph.nodes,
10049
- [operation.nodeId]: updated
10050
- }
10051
- } });
9777
+ case ExpressionSingleResult.Containing:
9778
+ result = ExpressionContainedBy;
10052
9779
  break;
10053
- }
10054
- case "graph.trigger.config.set": {
10055
- const graph = document.graph;
10056
- const node = graph.nodes[operation.nodeId];
10057
- if (node == null || node.kind != "integration" && node.kind != "poll") invalid("The configurable Trigger Node does not exist.");
10058
- if (!dequal(node.config[operation.name], operation.before)) invalid("The Trigger configuration changed before this operation was applied.");
10059
- const config = { ...node.config };
10060
- if (operation.value === void 0) delete config[operation.name];
10061
- else config[operation.name] = operation.value;
10062
- document.graph = {
10063
- ...graph,
10064
- nodes: {
10065
- ...graph.nodes,
10066
- [operation.nodeId]: {
10067
- ...node,
10068
- config
10069
- }
10070
- }
10071
- };
9780
+ case ExpressionSingleResult.ContainedBy:
9781
+ result = ExpressionContaining;
10072
9782
  break;
10073
- }
10074
- case "graph.trigger.schedule.set": {
10075
- const graph = document.graph;
10076
- const node = graph.nodes[operation.nodeId];
10077
- if (node == null || node.kind != "cron" && node.kind != "poll") invalid("The scheduled Trigger Node does not exist.");
10078
- if (!dequal(node.kind == "cron" ? node.cronTimes : node.pollTimes, operation.before)) invalid("The Trigger schedule changed before this operation was applied.");
10079
- const updated = node.kind == "cron" ? {
10080
- ...node,
10081
- cronTimes: operation.value
10082
- } : {
10083
- ...node,
10084
- pollTimes: operation.value
10085
- };
10086
- document.graph = {
10087
- ...graph,
10088
- nodes: {
10089
- ...graph.nodes,
10090
- [operation.nodeId]: updated
10091
- }
10092
- };
9783
+ case ExpressionSingleResult.Rejection:
9784
+ result = ExpressionRejection;
10093
9785
  break;
9786
+ case ExpressionSingleResult.Intersection: result = ExpressionIntersection;
9787
+ }
9788
+ return result;
9789
+ }
9790
+ //#endregion
9791
+ //#region src/json-schema-subset/expression/types.ts
9792
+ var ExpressionKind = Object.freeze({
9793
+ Leaf: 0,
9794
+ Not: 1,
9795
+ AllOf: 2,
9796
+ AnyOf: 3,
9797
+ OneOf: 4
9798
+ });
9799
+ //#endregion
9800
+ //#region src/json-schema-subset/expression/expression.ts
9801
+ var expression$1 = (delegate) => (e1, e2) => {
9802
+ const rootNode = {
9803
+ parent: null,
9804
+ swapped: false,
9805
+ expressions: null,
9806
+ calculation: {
9807
+ operator: CalculatorOperator.Save,
9808
+ results: [0],
9809
+ willSwap: false,
9810
+ count: 0
10094
9811
  }
10095
- case "module.create":
10096
- if (modules[operation.moduleId] != null) invalid("A CodeModule with this ID already exists.");
10097
- modules[operation.moduleId] = operation.module;
10098
- break;
10099
- case "module.delete":
10100
- if (modules[operation.moduleId] == null) invalid("The CodeModule does not exist.");
10101
- delete modules[operation.moduleId];
10102
- break;
10103
- case "module.rename": {
10104
- const module = modules[operation.moduleId];
10105
- if (module == null) invalid("The CodeModule does not exist.");
10106
- if (module.name != operation.before) invalid("The CodeModule name changed before this operation was applied.");
10107
- modules[operation.moduleId] = {
10108
- ...module,
10109
- name: operation.name
10110
- };
10111
- break;
9812
+ };
9813
+ const extendQueue = [{
9814
+ parent: {
9815
+ node: rootNode,
9816
+ index: 0
9817
+ },
9818
+ swapped: false,
9819
+ expressions: [e1, e2],
9820
+ calculation: null
9821
+ }];
9822
+ const calculateQueue = [];
9823
+ while (extendQueue.length > 0 || calculateQueue.length > 0) {
9824
+ while (extendQueue.length > 0) extendNode(extendQueue.pop());
9825
+ while (calculateQueue.length > 0) calculateNode(calculateQueue.pop());
9826
+ }
9827
+ function extendNode(node) {
9828
+ let result = ExpressionEquals;
9829
+ const [leftExpression, rightExpression] = node.expressions;
9830
+ if (!delegate.equals(leftExpression, rightExpression)) {
9831
+ const expression1 = delegate.describe(leftExpression);
9832
+ if (expression1.kind !== ExpressionKind.Leaf) {
9833
+ const [calculation, expressions] = expendExpression(expression1, false);
9834
+ node.expressions = null;
9835
+ node.calculation = calculation;
9836
+ for (const [index, childExpression] of expressions.entries()) extendQueue.push({
9837
+ parent: {
9838
+ node,
9839
+ index
9840
+ },
9841
+ swapped: node.swapped,
9842
+ expressions: [childExpression, rightExpression],
9843
+ calculation: null
9844
+ });
9845
+ return;
9846
+ }
9847
+ const expression2 = delegate.describe(rightExpression);
9848
+ if (expression2.kind !== ExpressionKind.Leaf) {
9849
+ const [calculation, expressions] = expendExpression(expression2, true);
9850
+ node.expressions = null;
9851
+ node.calculation = calculation;
9852
+ for (const [index, childExpression] of expressions.entries()) extendQueue.push({
9853
+ parent: {
9854
+ node,
9855
+ index
9856
+ },
9857
+ swapped: !node.swapped,
9858
+ expressions: [childExpression, leftExpression],
9859
+ calculation: null
9860
+ });
9861
+ return;
9862
+ }
9863
+ result = delegate.calculate(leftExpression, rightExpression);
9864
+ delegate.observeCalculation?.(leftExpression, rightExpression, result, node.swapped);
9865
+ if (result === 0) throw new Error("cannot response expression as none");
10112
9866
  }
10113
- case "module.source.replace": {
10114
- const module = modules[operation.moduleId];
10115
- if (module == null) invalid("The CodeModule does not exist.");
10116
- if (module.source != operation.beforeSource || !dequal(module.imports, operation.beforeImports)) invalid("The CodeModule source changed before this operation was applied.");
10117
- modules[operation.moduleId] = {
10118
- ...module,
10119
- imports: operation.imports,
10120
- source: operation.source
10121
- };
10122
- break;
9867
+ node.expressions = null;
9868
+ node.calculation = {
9869
+ operator: CalculatorOperator.Save,
9870
+ results: [result],
9871
+ willSwap: false,
9872
+ count: 0
9873
+ };
9874
+ calculateQueue.push(node);
9875
+ }
9876
+ function expendExpression(description, willSwap) {
9877
+ let operator = CalculatorOperator.Save;
9878
+ let expressions;
9879
+ switch (description.kind) {
9880
+ case ExpressionKind.Not:
9881
+ operator = CalculatorOperator.Not;
9882
+ expressions = [description.expression];
9883
+ break;
9884
+ case ExpressionKind.AllOf:
9885
+ operator = CalculatorOperator.AllOf;
9886
+ expressions = [...description.expressions];
9887
+ break;
9888
+ case ExpressionKind.AnyOf:
9889
+ operator = CalculatorOperator.AnyOf;
9890
+ expressions = [...description.expressions];
9891
+ break;
9892
+ case ExpressionKind.OneOf:
9893
+ operator = CalculatorOperator.OneOf;
9894
+ expressions = [...description.expressions];
9895
+ break;
9896
+ default: throw new Error(`invalid kind ${description.kind}`);
10123
9897
  }
10124
- case "graph.node.task.set": {
10125
- const graph = document.graph;
10126
- const node = graph.nodes[operation.nodeId];
10127
- if (node?.kind != "task") invalid("The Task Node does not exist.");
10128
- if (!dequal(node.task, operation.before)) invalid("The Task configuration changed before this operation was applied.");
10129
- document.graph = {
10130
- ...graph,
10131
- nodes: {
10132
- ...graph.nodes,
10133
- [operation.nodeId]: {
10134
- ...node,
10135
- task: operation.value
10136
- }
10137
- }
10138
- };
10139
- break;
9898
+ return [{
9899
+ operator,
9900
+ willSwap,
9901
+ count: 0,
9902
+ results: Array(expressions.length).fill(-1)
9903
+ }, expressions];
9904
+ }
9905
+ function calculateNode(node) {
9906
+ const calculation = node.calculation;
9907
+ const parent = node.parent;
9908
+ let result = calculate(calculation.operator, calculation.results);
9909
+ if (result === 0) result = ExpressionContainedBy;
9910
+ if (calculation.willSwap) result = swap(result);
9911
+ if (parent) {
9912
+ const parentCalculation = parent.node.calculation;
9913
+ const parentResults = parentCalculation.results;
9914
+ parentResults[parent.index] = result;
9915
+ parentCalculation.count += 1;
9916
+ if (parentCalculation.count >= parentResults.length) calculateQueue.push(parent.node);
10140
9917
  }
10141
9918
  }
10142
- assertOpenApiAuthBindings(document);
10143
- return upgradeDecodedRevisionContent({
10144
- document,
10145
- modelVersion: 10,
10146
- modules
10147
- });
10148
- }
9919
+ const result = rootNode.calculation.results[0];
9920
+ if (result === 0) throw new Error("cannot find result of root");
9921
+ return result;
9922
+ };
10149
9923
  //#endregion
10150
- //#region src/json-schema-subset/utils.ts
10151
- var nextId = 0;
10152
- function createId() {
10153
- const id = nextId;
10154
- nextId += 1;
10155
- return id;
10156
- }
10157
- function deepFreeze(target) {
10158
- if (typeof target === "object" && target !== null && !Object.isFrozen(target)) {
10159
- for (const key of Object.getOwnPropertyNames(target)) deepFreeze(Reflect.get(target, key));
10160
- Object.freeze(target);
9924
+ //#region src/json-schema-subset/error.ts
9925
+ var SchemaError = class extends Error {
9926
+ constructor(items = []) {
9927
+ super(createSchemaErrorMessage(items));
9928
+ this.name = "SchemaError";
9929
+ this.items = items;
9930
+ }
9931
+ };
9932
+ var SchemaErrorItemKind = Object.freeze({
9933
+ Compiled: 0,
9934
+ External: 1
9935
+ });
9936
+ function stringifySchemaError(errorItem) {
9937
+ switch (errorItem.kind) {
9938
+ case SchemaErrorItemKind.Compiled: {
9939
+ const { message, path } = errorItem;
9940
+ return `${message} (at ${path.length > 0 ? path.join(".") : "$root"})`;
9941
+ }
9942
+ case SchemaErrorItemKind.External: return String(errorItem.error);
10161
9943
  }
10162
- return target;
10163
- }
10164
- function pick(target, keys) {
10165
- const newTarget = {};
10166
- for (const key of keys) if (key in target) newTarget[key] = target[key];
10167
- return newTarget;
10168
9944
  }
10169
- function deepCopy(value) {
10170
- if (typeof value !== "object" || value === null) return value;
10171
- else if (Array.isArray(value)) {
10172
- const array = [];
10173
- for (const [i, element] of value.entries()) array[i] = deepCopy(element);
10174
- return array;
10175
- } else {
10176
- const newObject = {};
10177
- for (const key in value) newObject[key] = deepCopy(value[key]);
10178
- return newObject;
9945
+ function createSchemaErrorMessage(items) {
9946
+ switch (items.length) {
9947
+ case 0: return "without any items";
9948
+ case 1: return stringifySchemaError(items[0]);
9949
+ default: return `${stringifySchemaError(items[0])} ... omit the rest ${items.length - 1} items`;
10179
9950
  }
10180
9951
  }
10181
- function isDeepEquals(value1, value2) {
10182
- if (value1 === value2) return true;
10183
- if (value1 === null) return false;
10184
- if (typeof value1 !== "object") return false;
10185
- if (typeof value1 !== typeof value2) return false;
10186
- if (Array.isArray(value1)) {
10187
- if (!Array.isArray(value2)) return false;
10188
- if (value1.length !== value2.length) return false;
10189
- for (const [i, value1Element] of value1.entries()) if (!isDeepEquals(value1Element, value2[i])) return false;
10190
- } else {
10191
- if (Array.isArray(value2)) return false;
10192
- for (const key in value1) {
10193
- if (!(key in value2)) return false;
10194
- if (!isDeepEquals(value1[key], value2[key])) return false;
10195
- }
10196
- for (const key in value2) if (!(key in value1)) return false;
10197
- }
10198
- return true;
10199
- }
10200
9952
  //#endregion
10201
- //#region src/json-schema-subset/expression/result.ts
10202
- var ExpressionSingleResult = Object.freeze({
10203
- Equals: 0,
10204
- Containing: 1,
10205
- ContainedBy: 2,
10206
- Rejection: 3,
10207
- Intersection: 4
10208
- });
10209
- var ExpressionEquals = toExpression(ExpressionSingleResult.Equals);
10210
- var ExpressionContaining = toExpression(ExpressionSingleResult.Containing);
10211
- var ExpressionContainedBy = toExpression(ExpressionSingleResult.ContainedBy);
10212
- var ExpressionRejection = toExpression(ExpressionSingleResult.Rejection);
10213
- var ExpressionIntersection = toExpression(ExpressionSingleResult.Intersection);
10214
- var ExpressionMaskList = deepFreeze([
10215
- [ExpressionSingleResult.Equals, ExpressionEquals],
10216
- [ExpressionSingleResult.Containing, ExpressionContaining],
10217
- [ExpressionSingleResult.ContainedBy, ExpressionContainedBy],
10218
- [ExpressionSingleResult.Rejection, ExpressionRejection],
10219
- [ExpressionSingleResult.Intersection, ExpressionIntersection]
9953
+ //#region src/json-schema-subset/compiler/common.ts
9954
+ var jsonSchemaKeys = /* @__PURE__ */ new Set([
9955
+ "type",
9956
+ "enum",
9957
+ "const",
9958
+ "multipleOf",
9959
+ "maximum",
9960
+ "exclusiveMaximum",
9961
+ "minimum",
9962
+ "exclusiveMinimum",
9963
+ "maxLength",
9964
+ "minLength",
9965
+ "pattern",
9966
+ "items",
9967
+ "additionalItems",
9968
+ "maxItems",
9969
+ "minItems",
9970
+ "uniqueItems",
9971
+ "contains",
9972
+ "maxProperties",
9973
+ "minProperties",
9974
+ "required",
9975
+ "properties",
9976
+ "patternProperties",
9977
+ "additionalProperties",
9978
+ "dependencies",
9979
+ "propertyNames",
9980
+ "if",
9981
+ "then",
9982
+ "else",
9983
+ "allOf",
9984
+ "anyOf",
9985
+ "oneOf",
9986
+ "not",
9987
+ "format",
9988
+ "contentMediaType",
9989
+ "contentEncoding",
9990
+ "definitions"
10220
9991
  ]);
10221
- var ExpressionAny = (() => {
10222
- let expression = 0;
10223
- for (const [_, mask] of ExpressionMaskList) expression |= mask;
10224
- return expression;
10225
- })();
10226
- function hasEquals(expression) {
10227
- return !!(expression & ExpressionEquals);
9992
+ function isJSONSchemaKey(key) {
9993
+ return jsonSchemaKeys.has(key);
10228
9994
  }
10229
- function hasContaining(expression) {
10230
- return !!(expression & ExpressionContaining);
9995
+ function isLogicEmptyObject(object) {
9996
+ for (const key in object) if (isJSONSchemaKey(key)) return false;
9997
+ return true;
10231
9998
  }
10232
- function hasContainedBy(expression) {
10233
- return !!(expression & ExpressionContainedBy);
9999
+ function joinPath(context, ...extraPath) {
10000
+ return {
10001
+ ...context,
10002
+ path: [...context.path, ...extraPath]
10003
+ };
10234
10004
  }
10235
- function hasRejection(expression) {
10236
- return !!(expression & ExpressionRejection);
10005
+ function unwrapJSONSchema7Definition(schema) {
10006
+ if (typeof schema === "boolean") throw new Error("JSONSchema7Definition cannot be boolean");
10007
+ return schema;
10237
10008
  }
10238
- function hasIntersection(expression) {
10239
- return !!(expression & ExpressionIntersection);
10009
+ function recordError({ path, errors }, message, ...extraPath) {
10010
+ errors.push(createSchemaError(path, extraPath, message));
10240
10011
  }
10241
- function toExpression(expression) {
10242
- return 1 << expression;
10012
+ function recordWarn({ path, warns }, message, ...extraPath) {
10013
+ warns.push(createSchemaError(path, extraPath, message));
10243
10014
  }
10244
- //#endregion
10245
- //#region src/json-schema-subset/expression/combination.ts
10246
- function makeCombination(calculator) {
10247
- let expression = 0;
10248
- let count = 0;
10249
- const quantum = { push: (newExpression) => {
10250
- if (count === 0) expression = newExpression;
10251
- else expression = forEach(expression, newExpression, calculator);
10252
- count += 1;
10253
- return expression;
10254
- } };
10255
- Object.defineProperties(quantum, {
10256
- result: { get: () => expression },
10257
- count: { get: () => count }
10258
- });
10259
- return quantum;
10015
+ function createSchemaError(path, extraPath, message) {
10016
+ return {
10017
+ kind: SchemaErrorItemKind.Compiled,
10018
+ message,
10019
+ path: [...path, ...extraPath]
10020
+ };
10260
10021
  }
10261
- function forEach(e1, e2, calculator) {
10262
- let expression = 0;
10263
- for (const [singleResult1, mask1] of ExpressionMaskList) if (mask1 & e1) {
10264
- for (const [singleResult2, mask2] of ExpressionMaskList) if (mask2 & e2) {
10265
- expression |= calculator(singleResult1, singleResult2);
10266
- if (expression === ExpressionAny) return expression;
10022
+ //#endregion
10023
+ //#region src/json-schema-subset/compiler/utils.ts
10024
+ function cleanEmptyValues(origin) {
10025
+ for (const key in origin) {
10026
+ const value = origin[key];
10027
+ if (value === void 0) delete origin[key];
10028
+ else if (value && typeof value === "object") {
10029
+ if (Array.isArray(value)) {
10030
+ if (value.length === 0) delete origin[key];
10031
+ } else if (isEmptyObject(value)) delete origin[key];
10267
10032
  }
10268
10033
  }
10269
- return expression;
10034
+ return origin;
10035
+ }
10036
+ function isEmptyObject(object) {
10037
+ for (const _ in object) return false;
10038
+ return true;
10270
10039
  }
10271
10040
  //#endregion
10272
- //#region src/json-schema-subset/expression/calculator.ts
10273
- var CalculatorOperator = Object.freeze({
10274
- Save: 0,
10275
- OneOf: 1,
10276
- AllOf: 2,
10277
- AnyOf: 3,
10278
- Not: 4,
10279
- Swap: 5
10041
+ //#region src/json-schema-subset/compiler/wrapper.ts
10042
+ var symbolID = Symbol("compiledId");
10043
+ var symbolKind = Symbol("compiledKind");
10044
+ var symbolPath = Symbol("compiledPath");
10045
+ var symbolValidatorLoader = Symbol("validatorLoader");
10046
+ var CompiledKind = Object.freeze({
10047
+ Extends: 0,
10048
+ Never: 1,
10049
+ Any: 2,
10050
+ Null: 3,
10051
+ String: 4,
10052
+ Numeric: 5,
10053
+ Boolean: 6,
10054
+ Object: 7,
10055
+ Array: 8,
10056
+ Not: 9,
10057
+ Combination: 10,
10058
+ EnumOrConst: 11
10280
10059
  });
10281
- function calculate(operator, expressions) {
10282
- switch (operator) {
10283
- case CalculatorOperator.Save: return expressions[0];
10284
- case CalculatorOperator.OneOf: return calculateOneOf(expressions);
10285
- case CalculatorOperator.AllOf:
10286
- case CalculatorOperator.AnyOf: return calculateCombination(operator, expressions);
10287
- case CalculatorOperator.Not:
10288
- case CalculatorOperator.Swap: return calculateUnary(operator, expressions[0]);
10289
- }
10060
+ var ANY = deepFreeze(toCompiledSchema(CompiledKind.Any, createId(), {}, () => () => true));
10061
+ var NEVER = deepFreeze(toCompiledSchema(CompiledKind.Never, createId(), {
10062
+ type: "string",
10063
+ maxLength: 0,
10064
+ minLength: 1
10065
+ }, () => () => false));
10066
+ function isCompiledObject(value) {
10067
+ if (value === null || typeof value !== "object") return false;
10068
+ return symbolID in value;
10290
10069
  }
10291
- function swap(expression) {
10292
- return calculateUnary(CalculatorOperator.Swap, expression);
10070
+ function isCompiledSchema(object) {
10071
+ if (object === null || typeof object !== "object") return false;
10072
+ return symbolID in object && symbolKind in object;
10293
10073
  }
10294
- /**
10295
- * The oneOf operator is indivisible, so `a + b + c` must be evaluated as one expression.
10296
- * ![](../../doc/images/all_of_expression.png)
10297
- */
10298
- function calculateOneOf(expressions) {
10299
- if (expressions.length === 1) return expressions[0];
10300
- const unionSet = calculateCombination(CalculatorOperator.AnyOf, expressions);
10301
- const intersectionList = [];
10302
- for (let i = 0; i < expressions.length; ++i) for (let j = i + 1; j < expressions.length; ++j) {
10303
- const left = expressions[i];
10304
- const right = expressions[j];
10305
- const intersection = calculateCombination(CalculatorOperator.AllOf, [left, right]);
10306
- intersectionList.push(intersection);
10307
- }
10308
- const banZone = calculateCombination(CalculatorOperator.AnyOf, intersectionList);
10309
- const enableZone = calculateUnary(CalculatorOperator.Not, banZone);
10310
- return calculateCombination(CalculatorOperator.AllOf, [unionSet, enableZone]);
10074
+ function getKind(schema) {
10075
+ if (isCompiledSchema(schema)) return schema[symbolKind];
10076
+ else return CompiledKind.Extends;
10311
10077
  }
10312
- function calculateCombination(operator, expressions) {
10313
- if (expressions.length < 0) throw new Error("invalid expressions: empty array");
10314
- let combination;
10315
- switch (operator) {
10316
- case CalculatorOperator.AllOf:
10317
- combination = makeCombination(calculateAllOf);
10318
- break;
10319
- case CalculatorOperator.AnyOf:
10320
- combination = makeCombination(calculateAnyOf);
10321
- break;
10322
- default: throw new Error(`invalid operator ${operator}`);
10323
- }
10324
- for (const expression of expressions) combination.push(expression);
10325
- return combination.result;
10078
+ function getId(schema) {
10079
+ if (isCompiledSchema(schema) || isCompiledObject(schema)) return schema[symbolID];
10080
+ else return schema.id;
10326
10081
  }
10327
- function calculateUnary(operator, expression) {
10328
- let calculator;
10329
- let result = 0;
10330
- switch (operator) {
10331
- case CalculatorOperator.Not:
10332
- calculator = calculateNot;
10333
- break;
10334
- case CalculatorOperator.Swap:
10335
- calculator = calculateSwap;
10336
- break;
10337
- default: throw new Error(`invalid operator ${operator}`);
10338
- }
10339
- for (const [singleExpression, maskExpression] of ExpressionMaskList) if (maskExpression & expression) result |= calculator(singleExpression);
10340
- return result;
10082
+ function getPath(schema) {
10083
+ return isCompiledSchema(schema) ? schema[symbolPath] : void 0;
10341
10084
  }
10342
- function calculateAllOf(e1, e2) {
10343
- let result = 0;
10344
- switch (e1) {
10345
- case ExpressionSingleResult.Equals:
10346
- switch (e2) {
10347
- case ExpressionSingleResult.Equals:
10348
- result = ExpressionEquals;
10349
- break;
10350
- case ExpressionSingleResult.Containing:
10351
- result = ExpressionEquals;
10352
- break;
10353
- case ExpressionSingleResult.ContainedBy:
10354
- result = ExpressionContainedBy;
10355
- break;
10356
- case ExpressionSingleResult.Rejection:
10357
- result = 0;
10358
- break;
10359
- case ExpressionSingleResult.Intersection: result = ExpressionContainedBy;
10360
- }
10361
- break;
10362
- case ExpressionSingleResult.Containing:
10363
- switch (e2) {
10364
- case ExpressionSingleResult.Equals:
10365
- result = ExpressionEquals;
10366
- break;
10367
- case ExpressionSingleResult.Containing:
10368
- result = ExpressionEquals | ExpressionContaining;
10369
- break;
10370
- case ExpressionSingleResult.ContainedBy:
10371
- result = ExpressionContainedBy;
10372
- break;
10373
- case ExpressionSingleResult.Rejection:
10374
- result = ExpressionRejection;
10375
- break;
10376
- case ExpressionSingleResult.Intersection: result = ExpressionIntersection | ExpressionContainedBy;
10377
- }
10378
- break;
10379
- case ExpressionSingleResult.ContainedBy:
10380
- switch (e2) {
10381
- case ExpressionSingleResult.Equals:
10382
- result = ExpressionContainedBy;
10383
- break;
10384
- case ExpressionSingleResult.Containing:
10385
- result = ExpressionContainedBy;
10386
- break;
10387
- case ExpressionSingleResult.ContainedBy:
10388
- result = ExpressionContainedBy;
10389
- break;
10390
- case ExpressionSingleResult.Rejection:
10391
- result = 0;
10392
- break;
10393
- case ExpressionSingleResult.Intersection: result = ExpressionContainedBy;
10394
- }
10395
- break;
10396
- case ExpressionSingleResult.Rejection:
10397
- switch (e2) {
10398
- case ExpressionSingleResult.Equals:
10399
- result = 0;
10400
- break;
10401
- case ExpressionSingleResult.Containing:
10402
- result = ExpressionRejection;
10403
- break;
10404
- case ExpressionSingleResult.ContainedBy:
10405
- result = 0;
10406
- break;
10407
- case ExpressionSingleResult.Rejection:
10408
- result = ExpressionRejection;
10409
- break;
10410
- case ExpressionSingleResult.Intersection: result = ExpressionRejection;
10085
+ function wrapCompiledValue(value) {
10086
+ if (value === null || typeof value !== "object") return value;
10087
+ Object.defineProperty(value, symbolID, {
10088
+ value: createId(),
10089
+ configurable: false,
10090
+ writable: false,
10091
+ enumerable: false
10092
+ });
10093
+ return value;
10094
+ }
10095
+ function wrapCompiledSchema(kind, schema, delegate, path = []) {
10096
+ return toCompiledSchema(kind, createId(), schema, delegate && (() => {
10097
+ return delegate.compile(schema);
10098
+ }), path);
10099
+ }
10100
+ function toNever(schema) {
10101
+ return toCompiledSchema(CompiledKind.Never, createId(), { ...schema }, schema[symbolValidatorLoader], schema[symbolPath]);
10102
+ }
10103
+ function toCompiledSchema(kind, id, schema, validatorLoader, path = []) {
10104
+ let validator = null;
10105
+ Object.defineProperties(schema, {
10106
+ [symbolKind]: {
10107
+ value: kind,
10108
+ configurable: false,
10109
+ writable: false,
10110
+ enumerable: false
10111
+ },
10112
+ [symbolID]: {
10113
+ value: id,
10114
+ configurable: false,
10115
+ writable: false,
10116
+ enumerable: false
10117
+ },
10118
+ [symbolPath]: {
10119
+ value: path,
10120
+ configurable: false,
10121
+ writable: false,
10122
+ enumerable: false
10123
+ },
10124
+ [symbolValidatorLoader]: {
10125
+ value: validatorLoader,
10126
+ configurable: false,
10127
+ writable: false,
10128
+ enumerable: false
10129
+ },
10130
+ isValid: {
10131
+ configurable: false,
10132
+ enumerable: false,
10133
+ get: () => {
10134
+ if (validatorLoader) {
10135
+ if (!validator) validator = validatorLoader();
10136
+ return validator;
10137
+ } else return;
10411
10138
  }
10412
- break;
10413
- case ExpressionSingleResult.Intersection: switch (e2) {
10414
- case ExpressionSingleResult.Equals:
10415
- result = ExpressionContainedBy;
10416
- break;
10417
- case ExpressionSingleResult.Containing:
10418
- result = ExpressionIntersection | ExpressionContainedBy;
10419
- break;
10420
- case ExpressionSingleResult.ContainedBy:
10421
- result = ExpressionContainedBy;
10422
- break;
10423
- case ExpressionSingleResult.Rejection:
10424
- result = ExpressionRejection;
10425
- break;
10426
- case ExpressionSingleResult.Intersection: result = ExpressionContainedBy | ExpressionRejection | ExpressionIntersection;
10427
10139
  }
10428
- }
10429
- return result;
10140
+ });
10141
+ return schema;
10430
10142
  }
10431
- function calculateAnyOf(e1, e2) {
10432
- let result = 0;
10433
- switch (e1) {
10434
- case ExpressionSingleResult.Equals:
10435
- switch (e2) {
10436
- case ExpressionSingleResult.Equals:
10437
- result = ExpressionEquals;
10438
- break;
10439
- case ExpressionSingleResult.Containing:
10440
- result = ExpressionContaining;
10441
- break;
10442
- case ExpressionSingleResult.ContainedBy:
10443
- result = ExpressionEquals;
10444
- break;
10445
- case ExpressionSingleResult.Rejection:
10446
- result = ExpressionContaining;
10447
- break;
10448
- case ExpressionSingleResult.Intersection: result = ExpressionContaining;
10449
- }
10450
- break;
10451
- case ExpressionSingleResult.Containing:
10452
- switch (e2) {
10453
- case ExpressionSingleResult.Equals:
10454
- result = ExpressionContaining;
10455
- break;
10456
- case ExpressionSingleResult.Containing:
10457
- result = ExpressionContaining;
10458
- break;
10459
- case ExpressionSingleResult.ContainedBy:
10460
- result = ExpressionContaining;
10461
- break;
10462
- case ExpressionSingleResult.Rejection:
10463
- result = ExpressionContaining;
10464
- break;
10465
- case ExpressionSingleResult.Intersection: result = ExpressionContaining;
10466
- }
10467
- break;
10468
- case ExpressionSingleResult.ContainedBy:
10469
- switch (e2) {
10470
- case ExpressionSingleResult.Equals:
10471
- result = ExpressionEquals;
10472
- break;
10473
- case ExpressionSingleResult.Containing:
10474
- result = ExpressionContaining;
10475
- break;
10476
- case ExpressionSingleResult.ContainedBy:
10477
- result = ExpressionEquals | ExpressionContainedBy;
10478
- break;
10479
- case ExpressionSingleResult.Rejection:
10480
- result = ExpressionIntersection;
10481
- break;
10482
- case ExpressionSingleResult.Intersection: result = ExpressionContaining | ExpressionIntersection;
10483
- }
10484
- break;
10485
- case ExpressionSingleResult.Rejection:
10486
- switch (e2) {
10487
- case ExpressionSingleResult.Equals:
10488
- result = ExpressionContaining;
10489
- break;
10490
- case ExpressionSingleResult.Containing:
10491
- result = ExpressionContaining;
10492
- break;
10493
- case ExpressionSingleResult.ContainedBy:
10494
- result = ExpressionIntersection;
10495
- break;
10496
- case ExpressionSingleResult.Rejection:
10497
- result = ExpressionRejection;
10498
- break;
10499
- case ExpressionSingleResult.Intersection: result = ExpressionIntersection;
10143
+ //#endregion
10144
+ //#region src/json-schema-subset/compiler/array.ts
10145
+ function compileArraySchema(context, schema) {
10146
+ let items = compileItems(context, schema);
10147
+ let maxItems = getItemsLimit(context, "maxItems", schema);
10148
+ const minItems = getItemsLimit(context, "minItems", schema);
10149
+ const contains = compileContains(context, schema);
10150
+ const uniqueItems = schema.uniqueItems;
10151
+ let additionalItems;
10152
+ if (Array.isArray(items)) additionalItems = compileAdditionalItems(context, schema);
10153
+ else if (schema.additionalItems) recordWarn(context, "it is needless when items is not array", "additionalItems");
10154
+ if (!items || !contains || additionalItems === null) return null;
10155
+ let isNever = false;
10156
+ let updateMaxItems = false;
10157
+ if (Array.isArray(items)) {
10158
+ if (maxItems !== void 0 && maxItems <= items.length) {
10159
+ items = items.splice(maxItems);
10160
+ additionalItems = variableToNever(additionalItems, context.delegate);
10161
+ }
10162
+ const firstNeverItemIndex = items.findIndex((item) => getKind(item) === CompiledKind.Never);
10163
+ if (firstNeverItemIndex !== -1) {
10164
+ items = items.splice(firstNeverItemIndex);
10165
+ additionalItems = variableToNever(additionalItems, context.delegate);
10166
+ if (maxItems === void 0) {
10167
+ maxItems = items.length;
10168
+ updateMaxItems = true;
10500
10169
  }
10501
- break;
10502
- case ExpressionSingleResult.Intersection: switch (e2) {
10503
- case ExpressionSingleResult.Equals:
10504
- result = ExpressionContaining;
10505
- break;
10506
- case ExpressionSingleResult.Containing:
10507
- result = ExpressionContaining;
10508
- break;
10509
- case ExpressionSingleResult.ContainedBy:
10510
- result = ExpressionContaining | ExpressionIntersection;
10511
- break;
10512
- case ExpressionSingleResult.Rejection:
10513
- result = ExpressionIntersection;
10514
- break;
10515
- case ExpressionSingleResult.Intersection: result = ExpressionContaining | ExpressionIntersection;
10516
10170
  }
10171
+ if (minItems !== void 0 && items.length < minItems) {
10172
+ recordWarn(context, `length(${items.length}) of items if less than minItems(${minItems})`);
10173
+ isNever = true;
10174
+ }
10175
+ if (items.length === 0 && additionalItems && getKind(additionalItems) === CompiledKind.Never) isNever = true;
10176
+ } else if (getKind(items) === CompiledKind.Never) isNever = true;
10177
+ if (maxItems !== void 0 && minItems !== void 0 && maxItems < minItems) {
10178
+ if (!updateMaxItems) recordWarn(context, `maxItems(${maxItems}) is less than minItems(${minItems})`);
10179
+ isNever = true;
10517
10180
  }
10518
- return result;
10519
- }
10520
- function calculateNot(expression) {
10521
- let result = 0;
10522
- switch (expression) {
10523
- case ExpressionSingleResult.Equals:
10524
- result = ExpressionRejection;
10525
- break;
10526
- case ExpressionSingleResult.Containing:
10527
- result = ExpressionRejection;
10528
- break;
10529
- case ExpressionSingleResult.ContainedBy:
10530
- result = ExpressionIntersection;
10531
- break;
10532
- case ExpressionSingleResult.Rejection:
10533
- result = ExpressionEquals | ExpressionContaining;
10534
- break;
10535
- case ExpressionSingleResult.Intersection: result = ExpressionContainedBy | ExpressionIntersection;
10181
+ return wrapCompiledSchema(isNever ? CompiledKind.Never : CompiledKind.Array, cleanEmptyValues({
10182
+ type: "array",
10183
+ items,
10184
+ contains,
10185
+ uniqueItems,
10186
+ maxItems,
10187
+ minItems,
10188
+ additionalItems
10189
+ }), context.delegate, context.path);
10190
+ }
10191
+ function compileItems(context, { items }) {
10192
+ if (!items) return wrapCompiledSchema(CompiledKind.Any, {}, context.delegate, context.path);
10193
+ if (Array.isArray(items)) {
10194
+ const schemas = [];
10195
+ let hasAnyError = false;
10196
+ for (const [i, item] of items.entries()) {
10197
+ const schema = compileSchema(joinPath(context, "items", i), unwrapJSONSchema7Definition(item));
10198
+ if (!schema) {
10199
+ hasAnyError = true;
10200
+ continue;
10201
+ }
10202
+ schemas.push(schema);
10203
+ }
10204
+ if (hasAnyError) return null;
10205
+ return schemas;
10206
+ } else return compileSchema(joinPath(context, "items"), unwrapJSONSchema7Definition(items));
10207
+ }
10208
+ function getItemsLimit(context, name, schema) {
10209
+ const propertiesLimit = schema[name];
10210
+ if (propertiesLimit === void 0) return;
10211
+ if (Number.isNaN(propertiesLimit)) {
10212
+ recordWarn(context, "find NaN", name);
10213
+ return;
10536
10214
  }
10537
- return result;
10215
+ if (propertiesLimit < 0) {
10216
+ recordWarn(context, `find invalid number ${propertiesLimit}`, name);
10217
+ return;
10218
+ }
10219
+ return propertiesLimit;
10538
10220
  }
10539
- function calculateSwap(expression) {
10540
- let result = 0;
10541
- switch (expression) {
10542
- case ExpressionSingleResult.Equals:
10543
- result = ExpressionEquals;
10544
- break;
10545
- case ExpressionSingleResult.Containing:
10546
- result = ExpressionContainedBy;
10221
+ function compileContains(context, { contains }) {
10222
+ if (!contains) return wrapCompiledSchema(CompiledKind.Any, {}, context.delegate, context.path);
10223
+ return compileSchema(joinPath(context, "contains"), unwrapJSONSchema7Definition(contains));
10224
+ }
10225
+ function compileAdditionalItems(context, { additionalItems }) {
10226
+ switch (typeof additionalItems) {
10227
+ case "boolean": if (additionalItems) return wrapCompiledSchema(CompiledKind.Any, {}, context.delegate, context.path);
10228
+ else return false;
10229
+ case "object": return compileSchema(joinPath(context, "additionalItems"), additionalItems);
10230
+ default: return wrapCompiledSchema(CompiledKind.Any, {}, context.delegate, context.path);
10231
+ }
10232
+ }
10233
+ function variableToNever(schema, delegate) {
10234
+ if (schema === void 0) return wrapCompiledSchema(CompiledKind.Never, {
10235
+ type: "string",
10236
+ maxLength: 0,
10237
+ minLength: 1
10238
+ }, delegate);
10239
+ else if (isCompiledSchema(schema)) return getKind(schema) === CompiledKind.Never ? schema : toNever(schema);
10240
+ else return schema;
10241
+ }
10242
+ //#endregion
10243
+ //#region src/json-schema-subset/compiler/combination.ts
10244
+ var COMBINATION_KEYS = Object.freeze([
10245
+ "allOf",
10246
+ "anyOf",
10247
+ "oneOf"
10248
+ ]);
10249
+ function compileCombinationSchema(context, key, combinationList, delegate) {
10250
+ if (combinationList.length === 0) {
10251
+ recordError(context, "disable empty list", key);
10252
+ return null;
10253
+ }
10254
+ const compiledCombinationList = [];
10255
+ for (const [i, element] of combinationList.entries()) {
10256
+ const compiledSchema = compileSchema(joinPath(context, key, i), unwrapJSONSchema7Definition(element));
10257
+ if (compiledSchema) compiledCombinationList.push(compiledSchema);
10258
+ }
10259
+ if (compiledCombinationList.length < combinationList.length) return null;
10260
+ let anyCount = 0;
10261
+ let neverCount = 0;
10262
+ for (const compiledSchema of compiledCombinationList) switch (getKind(compiledSchema)) {
10263
+ case CompiledKind.Any:
10264
+ anyCount += 1;
10547
10265
  break;
10548
- case ExpressionSingleResult.ContainedBy:
10549
- result = ExpressionContaining;
10266
+ case CompiledKind.Never: neverCount += 1;
10267
+ }
10268
+ let kind = CompiledKind.Combination;
10269
+ switch (key) {
10270
+ case "allOf":
10271
+ if (neverCount > 0) kind = CompiledKind.Never;
10272
+ else if (anyCount === compiledCombinationList.length) kind = CompiledKind.Any;
10273
+ else if (!areAllTypesTheSame(compiledCombinationList)) kind = CompiledKind.Never;
10550
10274
  break;
10551
- case ExpressionSingleResult.Rejection:
10552
- result = ExpressionRejection;
10275
+ case "anyOf":
10276
+ if (anyCount > 0) kind = CompiledKind.Any;
10277
+ else if (neverCount === compiledCombinationList.length) kind = CompiledKind.Never;
10553
10278
  break;
10554
- case ExpressionSingleResult.Intersection: result = ExpressionIntersection;
10279
+ case "oneOf": if (anyCount > 1) kind = CompiledKind.Never;
10280
+ else if (neverCount === compiledCombinationList.length) kind = CompiledKind.Never;
10281
+ else if (anyCount === 1 && neverCount === compiledCombinationList.length - 1) kind = CompiledKind.Any;
10555
10282
  }
10556
- return result;
10283
+ return wrapCompiledSchema(kind, { [key]: compiledCombinationList }, delegate, context.path);
10284
+ }
10285
+ function areAllTypesTheSame(combinationList) {
10286
+ let lastKind = null;
10287
+ for (const schema of combinationList) {
10288
+ const kind = getKind(schema);
10289
+ switch (kind) {
10290
+ case CompiledKind.Any:
10291
+ case CompiledKind.Never: break;
10292
+ default: if (lastKind === null) lastKind = kind;
10293
+ else if (lastKind !== kind) return false;
10294
+ }
10295
+ }
10296
+ return true;
10557
10297
  }
10558
10298
  //#endregion
10559
- //#region src/json-schema-subset/expression/types.ts
10560
- var ExpressionKind = Object.freeze({
10561
- Leaf: 0,
10562
- Not: 1,
10563
- AllOf: 2,
10564
- AnyOf: 3,
10565
- OneOf: 4
10299
+ //#region src/json-schema-subset/checker/validator.ts
10300
+ var ValidResult = Object.freeze({
10301
+ Valid: 0,
10302
+ Invalid: 1,
10303
+ Unknown: 2
10566
10304
  });
10305
+ function valid(compiledSchema, value) {
10306
+ const isValid = compiledSchema.isValid;
10307
+ if (isValid) {
10308
+ if (isValid(value) === true) return ValidResult.Valid;
10309
+ else return ValidResult.Invalid;
10310
+ } else return ValidResult.Unknown;
10311
+ }
10567
10312
  //#endregion
10568
- //#region src/json-schema-subset/expression/expression.ts
10569
- var expression$1 = (delegate) => (e1, e2) => {
10570
- const rootNode = {
10571
- parent: null,
10572
- swapped: false,
10573
- expressions: null,
10574
- calculation: {
10575
- operator: CalculatorOperator.Save,
10576
- results: [0],
10577
- willSwap: false,
10578
- count: 0
10313
+ //#region src/json-schema-subset/compiler/enumAndConst.ts
10314
+ function compileEnumAndConst(context, enumList, constValue, schema) {
10315
+ let compiledEnum;
10316
+ let isNever = false;
10317
+ if (enumList) {
10318
+ if (enumList.length === 0) {
10319
+ recordError(context, "disable empty list", "enum");
10320
+ return null;
10579
10321
  }
10580
- };
10581
- const extendQueue = [{
10582
- parent: {
10583
- node: rootNode,
10584
- index: 0
10585
- },
10586
- swapped: false,
10587
- expressions: [e1, e2],
10588
- calculation: null
10589
- }];
10590
- const calculateQueue = [];
10591
- while (extendQueue.length > 0 || calculateQueue.length > 0) {
10592
- while (extendQueue.length > 0) extendNode(extendQueue.pop());
10593
- while (calculateQueue.length > 0) calculateNode(calculateQueue.pop());
10322
+ compiledEnum = [];
10323
+ for (const [i, enumValue] of enumList.entries()) switch (valid(schema, enumValue)) {
10324
+ case ValidResult.Valid:
10325
+ compiledEnum.push(wrapCompiledValue(enumValue));
10326
+ break;
10327
+ case ValidResult.Invalid: recordWarn(context, "cannot pass JSON schema of currently schema object", "enum", i);
10328
+ }
10329
+ if (compiledEnum.length === 0) recordWarn(context, "all of elements from list is rejected by currently schema object", "enum");
10594
10330
  }
10595
- function extendNode(node) {
10596
- let result = ExpressionEquals;
10597
- const [leftExpression, rightExpression] = node.expressions;
10598
- if (!delegate.equals(leftExpression, rightExpression)) {
10599
- const expression1 = delegate.describe(leftExpression);
10600
- if (expression1.kind !== ExpressionKind.Leaf) {
10601
- const [calculation, expressions] = expendExpression(expression1, false);
10602
- node.expressions = null;
10603
- node.calculation = calculation;
10604
- for (const [index, childExpression] of expressions.entries()) extendQueue.push({
10605
- parent: {
10606
- node,
10607
- index
10608
- },
10609
- swapped: node.swapped,
10610
- expressions: [childExpression, rightExpression],
10611
- calculation: null
10612
- });
10613
- return;
10614
- }
10615
- const expression2 = delegate.describe(rightExpression);
10616
- if (expression2.kind !== ExpressionKind.Leaf) {
10617
- const [calculation, expressions] = expendExpression(expression2, true);
10618
- node.expressions = null;
10619
- node.calculation = calculation;
10620
- for (const [index, childExpression] of expressions.entries()) extendQueue.push({
10621
- parent: {
10622
- node,
10623
- index
10624
- },
10625
- swapped: !node.swapped,
10626
- expressions: [childExpression, leftExpression],
10627
- calculation: null
10628
- });
10629
- return;
10331
+ if (constValue !== void 0 && valid(schema, constValue) === ValidResult.Invalid) isNever = true;
10332
+ if (compiledEnum) {
10333
+ if (compiledEnum.length === 0) isNever = true;
10334
+ else if (constValue !== void 0) {
10335
+ let foundEquals = false;
10336
+ for (const enumValue of compiledEnum) if (isDeepEquals(enumValue, constValue)) {
10337
+ foundEquals = true;
10338
+ break;
10630
10339
  }
10631
- result = delegate.calculate(leftExpression, rightExpression);
10632
- delegate.observeCalculation?.(leftExpression, rightExpression, result, node.swapped);
10633
- if (result === 0) throw new Error("cannot response expression as none");
10340
+ if (!foundEquals) isNever = true;
10634
10341
  }
10635
- node.expressions = null;
10636
- node.calculation = {
10637
- operator: CalculatorOperator.Save,
10638
- results: [result],
10639
- willSwap: false,
10640
- count: 0
10641
- };
10642
- calculateQueue.push(node);
10643
- }
10644
- function expendExpression(description, willSwap) {
10645
- let operator = CalculatorOperator.Save;
10646
- let expressions;
10647
- switch (description.kind) {
10648
- case ExpressionKind.Not:
10649
- operator = CalculatorOperator.Not;
10650
- expressions = [description.expression];
10651
- break;
10652
- case ExpressionKind.AllOf:
10653
- operator = CalculatorOperator.AllOf;
10654
- expressions = [...description.expressions];
10655
- break;
10656
- case ExpressionKind.AnyOf:
10657
- operator = CalculatorOperator.AnyOf;
10658
- expressions = [...description.expressions];
10659
- break;
10660
- case ExpressionKind.OneOf:
10661
- operator = CalculatorOperator.OneOf;
10662
- expressions = [...description.expressions];
10663
- break;
10664
- default: throw new Error(`invalid kind ${description.kind}`);
10665
- }
10666
- return [{
10667
- operator,
10668
- willSwap,
10669
- count: 0,
10670
- results: Array(expressions.length).fill(-1)
10671
- }, expressions];
10672
- }
10673
- function calculateNode(node) {
10674
- const calculation = node.calculation;
10675
- const parent = node.parent;
10676
- let result = calculate(calculation.operator, calculation.results);
10677
- if (result === 0) result = ExpressionContainedBy;
10678
- if (calculation.willSwap) result = swap(result);
10679
- if (parent) {
10680
- const parentCalculation = parent.node.calculation;
10681
- const parentResults = parentCalculation.results;
10682
- parentResults[parent.index] = result;
10683
- parentCalculation.count += 1;
10684
- if (parentCalculation.count >= parentResults.length) calculateQueue.push(parent.node);
10685
- }
10686
- }
10687
- const result = rootNode.calculation.results[0];
10688
- if (result === 0) throw new Error("cannot find result of root");
10689
- return result;
10690
- };
10691
- //#endregion
10692
- //#region src/json-schema-subset/error.ts
10693
- var SchemaError = class extends Error {
10694
- constructor(items = []) {
10695
- super(createSchemaErrorMessage(items));
10696
- this.name = "SchemaError";
10697
- this.items = items;
10698
- }
10699
- };
10700
- var SchemaErrorItemKind = Object.freeze({
10701
- Compiled: 0,
10702
- External: 1
10703
- });
10704
- function stringifySchemaError(errorItem) {
10705
- switch (errorItem.kind) {
10706
- case SchemaErrorItemKind.Compiled: {
10707
- const { message, path } = errorItem;
10708
- return `${message} (at ${path.length > 0 ? path.join(".") : "$root"})`;
10709
- }
10710
- case SchemaErrorItemKind.External: return String(errorItem.error);
10711
- }
10712
- }
10713
- function createSchemaErrorMessage(items) {
10714
- switch (items.length) {
10715
- case 0: return "without any items";
10716
- case 1: return stringifySchemaError(items[0]);
10717
- default: return `${stringifySchemaError(items[0])} ... omit the rest ${items.length - 1} items`;
10718
10342
  }
10343
+ const kind = isNever ? CompiledKind.Never : CompiledKind.EnumOrConst;
10344
+ const compiledSchema = {};
10345
+ if (schema.type) compiledSchema.type = schema.type;
10346
+ if (compiledEnum) compiledSchema.enum = compiledEnum;
10347
+ if (constValue !== void 0) compiledSchema.const = wrapCompiledValue(deepCopy(constValue));
10348
+ return wrapCompiledSchema(kind, compiledSchema, context.delegate, context.path);
10719
10349
  }
10720
10350
  //#endregion
10721
- //#region src/json-schema-subset/compiler/common.ts
10722
- var jsonSchemaKeys = /* @__PURE__ */ new Set([
10351
+ //#region src/json-schema-subset/compiler/object.ts
10352
+ var OBJECT_KEYS = /* @__PURE__ */ new Set([
10723
10353
  "type",
10724
- "enum",
10725
- "const",
10726
- "multipleOf",
10727
- "maximum",
10728
- "exclusiveMaximum",
10729
- "minimum",
10730
- "exclusiveMinimum",
10731
- "maxLength",
10732
- "minLength",
10733
- "pattern",
10734
- "items",
10735
- "additionalItems",
10736
- "maxItems",
10737
- "minItems",
10738
- "uniqueItems",
10739
- "contains",
10740
10354
  "maxProperties",
10741
10355
  "minProperties",
10742
10356
  "required",
@@ -10744,824 +10358,442 @@ var jsonSchemaKeys = /* @__PURE__ */ new Set([
10744
10358
  "patternProperties",
10745
10359
  "additionalProperties",
10746
10360
  "dependencies",
10747
- "propertyNames",
10748
- "if",
10749
- "then",
10750
- "else",
10751
- "allOf",
10752
- "anyOf",
10753
- "oneOf",
10754
- "not",
10755
- "format",
10756
- "contentMediaType",
10757
- "contentEncoding",
10758
- "definitions"
10361
+ "propertyNames"
10759
10362
  ]);
10760
- function isJSONSchemaKey(key) {
10761
- return jsonSchemaKeys.has(key);
10363
+ function compileObjectSchema(context, schema) {
10364
+ const rejectKeys = Object.keys(schema).filter((k) => !OBJECT_KEYS.has(k) && isJSONSchemaKey(k));
10365
+ if (rejectKeys.length > 0) recordWarn(context, `type="object" will exclude other keys: ${rejectKeys.toSorted().join(", ")}`);
10366
+ const maxProperties = getPropertiesLimit(context, "maxProperties", schema);
10367
+ const minProperties = getPropertiesLimit(context, "minProperties", schema);
10368
+ const additionalPropertiesSchema = compileAdditionalProperties(context, schema);
10369
+ const patternProperties = compilePatternProperties(context, schema);
10370
+ const propertyNames = compilePropertyNames(context, schema);
10371
+ const dependentTuple = compileDependencies(context, schema);
10372
+ if (!additionalPropertiesSchema || !patternProperties || !propertyNames || !dependentTuple) return null;
10373
+ const properties = compileProperties(context, patternProperties, propertyNames, schema);
10374
+ if (!properties) return null;
10375
+ const required = compileRequired(context, createBanKeyChecker(additionalPropertiesSchema, patternProperties, propertyNames, properties), dependentTuple, schema);
10376
+ return wrapCompiledSchema(checkSchemaIsNever(context, additionalPropertiesSchema, properties, required, maxProperties, minProperties) ? CompiledKind.Never : CompiledKind.Object, cleanEmptyValues({
10377
+ type: "object",
10378
+ required,
10379
+ properties,
10380
+ minProperties,
10381
+ maxProperties,
10382
+ additionalProperties: additionalPropertiesSchema,
10383
+ patternProperties: unwrapPatternProperties(patternProperties),
10384
+ dependencies: mergeDependentTuple(dependentTuple, schema),
10385
+ propertyNames
10386
+ }), context.delegate, context.path);
10762
10387
  }
10763
- function isLogicEmptyObject(object) {
10764
- for (const key in object) if (isJSONSchemaKey(key)) return false;
10765
- return true;
10388
+ function getPropertiesLimit(context, name, schema) {
10389
+ const propertiesLimit = schema[name];
10390
+ if (propertiesLimit === void 0) return;
10391
+ if (Number.isNaN(propertiesLimit)) {
10392
+ recordWarn(context, "find NaN", name);
10393
+ return;
10394
+ }
10395
+ if (propertiesLimit < 0) {
10396
+ recordWarn(context, `find invalid number ${propertiesLimit}`, name);
10397
+ return;
10398
+ }
10399
+ return propertiesLimit;
10766
10400
  }
10767
- function joinPath(context, ...extraPath) {
10768
- return {
10769
- ...context,
10770
- path: [...context.path, ...extraPath]
10771
- };
10401
+ function compileAdditionalProperties(context, { additionalProperties }) {
10402
+ if (additionalProperties === false) return wrapCompiledSchema(CompiledKind.Never, {
10403
+ type: "string",
10404
+ maxLength: 0,
10405
+ minLength: 1
10406
+ }, context.delegate, context.path);
10407
+ if (typeof additionalProperties !== "object") return wrapCompiledSchema(CompiledKind.Any, {}, context.delegate, context.path);
10408
+ return compileSchema(joinPath(context, "additionalProperties"), unwrapJSONSchema7Definition(additionalProperties));
10772
10409
  }
10773
- function unwrapJSONSchema7Definition(schema) {
10774
- if (typeof schema === "boolean") throw new Error("JSONSchema7Definition cannot be boolean");
10410
+ function compilePatternProperties(context, { patternProperties }) {
10411
+ let foundSubError = false;
10412
+ const target = {};
10413
+ for (const key in patternProperties) {
10414
+ const regExp = wrapRegExp(key);
10415
+ if (regExp instanceof Error) {
10416
+ recordWarn(context, `property name invalid. ${key}`, "patternProperties", key);
10417
+ continue;
10418
+ }
10419
+ const schema = unwrapJSONSchema7Definition(patternProperties[key]);
10420
+ const compiledSchema = compileSchema(joinPath(context, "patternProperties", key), schema);
10421
+ if (!compiledSchema) {
10422
+ foundSubError = true;
10423
+ continue;
10424
+ }
10425
+ target[key] = [compiledSchema, regExp];
10426
+ }
10427
+ if (foundSubError) return null;
10428
+ return target;
10429
+ }
10430
+ function compilePropertyNames(context, { propertyNames }) {
10431
+ if (!propertyNames) return wrapCompiledSchema(CompiledKind.Any, {}, context.delegate, context.path);
10432
+ propertyNames = unwrapJSONSchema7Definition(propertyNames);
10433
+ const schema = compileSchema(joinPath(context, "propertyNames"), propertyNames);
10434
+ if (!schema) return null;
10435
+ const kind = getKind(schema);
10436
+ if (kind !== CompiledKind.String && kind !== CompiledKind.Any) return toNever(schema);
10775
10437
  return schema;
10776
10438
  }
10777
- function recordError({ path, errors }, message, ...extraPath) {
10778
- errors.push(createSchemaError(path, extraPath, message));
10439
+ function compileProperties(context, patternProperties, propertyNamesSchema, { properties }) {
10440
+ let foundSubError = false;
10441
+ if (!properties) return {};
10442
+ const target = {};
10443
+ for (const key in properties) {
10444
+ if (valid(propertyNamesSchema, key) === ValidResult.Invalid) {
10445
+ recordWarn(context, `key ${JSON.stringify(key)} cannot pass JSON schema from propertyNames`, "properties");
10446
+ continue;
10447
+ }
10448
+ const patternSchema = findPatternSchema(patternProperties, key);
10449
+ if (patternSchema && getKind(patternSchema) === CompiledKind.Never) {
10450
+ recordWarn(context, `key ${JSON.stringify(key)} matches a pattern that has a impossible(never) schema`, "properties");
10451
+ continue;
10452
+ }
10453
+ const schema = unwrapJSONSchema7Definition(properties[key]);
10454
+ const compiledSchema = compileSchema(joinPath(context, "properties", key), schema);
10455
+ if (!compiledSchema) {
10456
+ foundSubError = true;
10457
+ continue;
10458
+ }
10459
+ target[key] = compiledSchema;
10460
+ }
10461
+ if (foundSubError) return null;
10462
+ return target;
10779
10463
  }
10780
- function recordWarn({ path, warns }, message, ...extraPath) {
10781
- warns.push(createSchemaError(path, extraPath, message));
10464
+ function compileDependencies(context, { dependencies }) {
10465
+ if (!dependencies) return [{}, {}];
10466
+ const dependentRequired = {};
10467
+ const dependentSchemas = {};
10468
+ for (const key in dependencies) {
10469
+ const dependency = unwrapJSONSchema7Definition(dependencies[key]);
10470
+ if (Array.isArray(dependency)) {
10471
+ const { keys, duplicated } = checkUniqueKeys(dependency);
10472
+ if (duplicated) recordWarn(context, `found duplicated property names: ${duplicated.join(", ")}`, "dependencies", key);
10473
+ dependentRequired[key] = keys;
10474
+ } else {
10475
+ const compiledSchema = compileSchema(joinPath(context, "dependencies", key), dependency);
10476
+ if (compiledSchema) {
10477
+ const kind = getKind(compiledSchema);
10478
+ if (kind === CompiledKind.Object || kind === CompiledKind.Any) dependentSchemas[key] = compiledSchema;
10479
+ else if (kind === CompiledKind.Extends) dependentSchemas[key] = NEVER;
10480
+ else dependentSchemas[key] = toNever(compiledSchema);
10481
+ }
10482
+ }
10483
+ }
10484
+ return [dependentRequired, dependentSchemas];
10782
10485
  }
10783
- function createSchemaError(path, extraPath, message) {
10784
- return {
10785
- kind: SchemaErrorItemKind.Compiled,
10786
- message,
10787
- path: [...path, ...extraPath]
10486
+ function createBanKeyChecker(additionalPropertiesSchema, patternProperties, propertyNamesSchema, properties) {
10487
+ return (key) => {
10488
+ if (valid(propertyNamesSchema, key) === ValidResult.Invalid) return true;
10489
+ const patternSchema = findPatternSchema(patternProperties, key);
10490
+ if (patternSchema && getKind(patternSchema) === CompiledKind.Never) return true;
10491
+ if (getKind(properties[key] ?? additionalPropertiesSchema) === CompiledKind.Never) return true;
10492
+ return false;
10788
10493
  };
10789
10494
  }
10790
- //#endregion
10791
- //#region src/json-schema-subset/compiler/utils.ts
10792
- function cleanEmptyValues(origin) {
10793
- for (const key in origin) {
10794
- const value = origin[key];
10795
- if (value === void 0) delete origin[key];
10796
- else if (value && typeof value === "object") {
10797
- if (Array.isArray(value)) {
10798
- if (value.length === 0) delete origin[key];
10799
- } else if (isEmptyObject(value)) delete origin[key];
10800
- }
10801
- }
10802
- return origin;
10495
+ function compileRequired(context, isBan, dependentTuple, { required }) {
10496
+ if (!required) return [];
10497
+ const uniqueCheckedResult = checkUniqueKeys(required);
10498
+ if (uniqueCheckedResult.duplicated) recordWarn(context, `found duplicated required keys: ${uniqueCheckedResult.duplicated.join(", ")}`, "required");
10499
+ const requiredKeys = [];
10500
+ const banKeys = [];
10501
+ for (const requiredKey of uniqueCheckedResult.keys) if (collectDependencies(dependentTuple, requiredKey).some((key) => isBan(key))) banKeys.push(requiredKey);
10502
+ else requiredKeys.push(requiredKey);
10503
+ if (banKeys.length > 0) recordWarn(context, `key ${banKeys.map((k) => JSON.stringify(k)).join(", ")} will ban by another condition`, "required");
10504
+ return requiredKeys;
10803
10505
  }
10804
- function isEmptyObject(object) {
10805
- for (const _ in object) return false;
10506
+ function checkSchemaIsNever(context, additionalPropertiesSchema, properties, required, maxProperties, minProperties) {
10507
+ if (maxProperties !== void 0 && minProperties !== void 0 && maxProperties < minProperties) {
10508
+ recordWarn(context, `maxProperties(${maxProperties}) is less than minProperties(${minProperties})`);
10509
+ return true;
10510
+ }
10511
+ if (maxProperties !== void 0 && required.length > maxProperties) {
10512
+ recordWarn(context, `length(${required.length}) of required is greater than maxProperties(${maxProperties})`);
10513
+ return true;
10514
+ }
10515
+ if (minProperties !== void 0 && required.length < minProperties) {
10516
+ recordWarn(context, `length(${required.length}) of required is less than minProperties(${minProperties})`);
10517
+ return true;
10518
+ }
10519
+ if (getKind(additionalPropertiesSchema) !== CompiledKind.Never) return false;
10520
+ for (const key in properties) {
10521
+ const compiledSchema = properties[key];
10522
+ if (getKind(compiledSchema) !== CompiledKind.Never) return false;
10523
+ }
10806
10524
  return true;
10807
10525
  }
10808
- //#endregion
10809
- //#region src/json-schema-subset/compiler/wrapper.ts
10810
- var symbolID = Symbol("compiledId");
10811
- var symbolKind = Symbol("compiledKind");
10812
- var symbolPath = Symbol("compiledPath");
10813
- var symbolValidatorLoader = Symbol("validatorLoader");
10814
- var CompiledKind = Object.freeze({
10815
- Extends: 0,
10816
- Never: 1,
10817
- Any: 2,
10818
- Null: 3,
10819
- String: 4,
10820
- Numeric: 5,
10821
- Boolean: 6,
10822
- Object: 7,
10823
- Array: 8,
10824
- Not: 9,
10825
- Combination: 10,
10826
- EnumOrConst: 11
10827
- });
10828
- var ANY = deepFreeze(toCompiledSchema(CompiledKind.Any, createId(), {}, () => () => true));
10829
- var NEVER = deepFreeze(toCompiledSchema(CompiledKind.Never, createId(), {
10830
- type: "string",
10831
- maxLength: 0,
10832
- minLength: 1
10833
- }, () => () => false));
10834
- function isCompiledObject(value) {
10835
- if (value === null || typeof value !== "object") return false;
10836
- return symbolID in value;
10837
- }
10838
- function isCompiledSchema(object) {
10839
- if (object === null || typeof object !== "object") return false;
10840
- return symbolID in object && symbolKind in object;
10841
- }
10842
- function getKind(schema) {
10843
- if (isCompiledSchema(schema)) return schema[symbolKind];
10844
- else return CompiledKind.Extends;
10845
- }
10846
- function getId(schema) {
10847
- if (isCompiledSchema(schema) || isCompiledObject(schema)) return schema[symbolID];
10848
- else return schema.id;
10849
- }
10850
- function getPath(schema) {
10851
- return isCompiledSchema(schema) ? schema[symbolPath] : void 0;
10852
- }
10853
- function wrapCompiledValue(value) {
10854
- if (value === null || typeof value !== "object") return value;
10855
- Object.defineProperty(value, symbolID, {
10856
- value: createId(),
10857
- configurable: false,
10858
- writable: false,
10859
- enumerable: false
10860
- });
10861
- return value;
10862
- }
10863
- function wrapCompiledSchema(kind, schema, delegate, path = []) {
10864
- return toCompiledSchema(kind, createId(), schema, delegate && (() => {
10865
- return delegate.compile(schema);
10866
- }), path);
10867
- }
10868
- function toNever(schema) {
10869
- return toCompiledSchema(CompiledKind.Never, createId(), { ...schema }, schema[symbolValidatorLoader], schema[symbolPath]);
10870
- }
10871
- function toCompiledSchema(kind, id, schema, validatorLoader, path = []) {
10872
- let validator = null;
10873
- Object.defineProperties(schema, {
10874
- [symbolKind]: {
10875
- value: kind,
10876
- configurable: false,
10877
- writable: false,
10878
- enumerable: false
10879
- },
10880
- [symbolID]: {
10881
- value: id,
10882
- configurable: false,
10883
- writable: false,
10884
- enumerable: false
10885
- },
10886
- [symbolPath]: {
10887
- value: path,
10888
- configurable: false,
10889
- writable: false,
10890
- enumerable: false
10891
- },
10892
- [symbolValidatorLoader]: {
10893
- value: validatorLoader,
10894
- configurable: false,
10895
- writable: false,
10896
- enumerable: false
10897
- },
10898
- isValid: {
10899
- configurable: false,
10900
- enumerable: false,
10901
- get: () => {
10902
- if (validatorLoader) {
10903
- if (!validator) validator = validatorLoader();
10904
- return validator;
10905
- } else return;
10906
- }
10907
- }
10908
- });
10909
- return schema;
10910
- }
10911
- //#endregion
10912
- //#region src/json-schema-subset/compiler/array.ts
10913
- function compileArraySchema(context, schema) {
10914
- let items = compileItems(context, schema);
10915
- let maxItems = getItemsLimit(context, "maxItems", schema);
10916
- const minItems = getItemsLimit(context, "minItems", schema);
10917
- const contains = compileContains(context, schema);
10918
- const uniqueItems = schema.uniqueItems;
10919
- let additionalItems;
10920
- if (Array.isArray(items)) additionalItems = compileAdditionalItems(context, schema);
10921
- else if (schema.additionalItems) recordWarn(context, "it is needless when items is not array", "additionalItems");
10922
- if (!items || !contains || additionalItems === null) return null;
10923
- let isNever = false;
10924
- let updateMaxItems = false;
10925
- if (Array.isArray(items)) {
10926
- if (maxItems !== void 0 && maxItems <= items.length) {
10927
- items = items.splice(maxItems);
10928
- additionalItems = variableToNever(additionalItems, context.delegate);
10526
+ function collectDependencies([dependentRequired, dependentSchemas], seedKey) {
10527
+ const queue = [seedKey];
10528
+ const collection = new Set(queue);
10529
+ while (queue.length > 0) {
10530
+ const key = queue.pop();
10531
+ const schema = dependentSchemas[key];
10532
+ const requiredKeys = dependentRequired[key];
10533
+ if (schema) {
10534
+ if (getKind(schema) === CompiledKind.Object) collectKeys(schema.required);
10929
10535
  }
10930
- const firstNeverItemIndex = items.findIndex((item) => getKind(item) === CompiledKind.Never);
10931
- if (firstNeverItemIndex !== -1) {
10932
- items = items.splice(firstNeverItemIndex);
10933
- additionalItems = variableToNever(additionalItems, context.delegate);
10934
- if (maxItems === void 0) {
10935
- maxItems = items.length;
10936
- updateMaxItems = true;
10536
+ if (requiredKeys) collectKeys(requiredKeys);
10537
+ }
10538
+ function collectKeys(keys) {
10539
+ if (keys) {
10540
+ for (const key of keys) if (!collection.has(key)) {
10541
+ collection.add(key);
10542
+ queue.push(key);
10937
10543
  }
10938
10544
  }
10939
- if (minItems !== void 0 && items.length < minItems) {
10940
- recordWarn(context, `length(${items.length}) of items if less than minItems(${minItems})`);
10941
- isNever = true;
10942
- }
10943
- if (items.length === 0 && additionalItems && getKind(additionalItems) === CompiledKind.Never) isNever = true;
10944
- } else if (getKind(items) === CompiledKind.Never) isNever = true;
10945
- if (maxItems !== void 0 && minItems !== void 0 && maxItems < minItems) {
10946
- if (!updateMaxItems) recordWarn(context, `maxItems(${maxItems}) is less than minItems(${minItems})`);
10947
- isNever = true;
10948
10545
  }
10949
- return wrapCompiledSchema(isNever ? CompiledKind.Never : CompiledKind.Array, cleanEmptyValues({
10950
- type: "array",
10951
- items,
10952
- contains,
10953
- uniqueItems,
10954
- maxItems,
10955
- minItems,
10956
- additionalItems
10957
- }), context.delegate, context.path);
10546
+ return [...collection];
10958
10547
  }
10959
- function compileItems(context, { items }) {
10960
- if (!items) return wrapCompiledSchema(CompiledKind.Any, {}, context.delegate, context.path);
10961
- if (Array.isArray(items)) {
10962
- const schemas = [];
10963
- let hasAnyError = false;
10964
- for (const [i, item] of items.entries()) {
10965
- const schema = compileSchema(joinPath(context, "items", i), unwrapJSONSchema7Definition(item));
10966
- if (!schema) {
10967
- hasAnyError = true;
10968
- continue;
10969
- }
10970
- schemas.push(schema);
10971
- }
10972
- if (hasAnyError) return null;
10973
- return schemas;
10974
- } else return compileSchema(joinPath(context, "items"), unwrapJSONSchema7Definition(items));
10548
+ function checkUniqueKeys(keys) {
10549
+ const checking = /* @__PURE__ */ new Set();
10550
+ const duplicated = /* @__PURE__ */ new Set();
10551
+ for (const e of keys) if (checking.has(e)) duplicated.add(e);
10552
+ else checking.add(e);
10553
+ if (duplicated.size === 0) return {
10554
+ keys: [...keys],
10555
+ duplicated: null
10556
+ };
10557
+ else return {
10558
+ keys: [...checking],
10559
+ duplicated: [...duplicated]
10560
+ };
10975
10561
  }
10976
- function getItemsLimit(context, name, schema) {
10977
- const propertiesLimit = schema[name];
10978
- if (propertiesLimit === void 0) return;
10979
- if (Number.isNaN(propertiesLimit)) {
10980
- recordWarn(context, "find NaN", name);
10981
- return;
10562
+ function findPatternSchema(patternProperties, checkedKey) {
10563
+ for (const key in patternProperties) {
10564
+ const [schema, regExp] = patternProperties[key];
10565
+ if (regExp.test(checkedKey)) return schema;
10982
10566
  }
10983
- if (propertiesLimit < 0) {
10984
- recordWarn(context, `find invalid number ${propertiesLimit}`, name);
10985
- return;
10567
+ return null;
10568
+ }
10569
+ function wrapRegExp(pattern) {
10570
+ try {
10571
+ return new RegExp(pattern, "i");
10572
+ } catch (error) {
10573
+ if (error instanceof SyntaxError) return error;
10574
+ else throw error;
10986
10575
  }
10987
- return propertiesLimit;
10988
10576
  }
10989
- function compileContains(context, { contains }) {
10990
- if (!contains) return wrapCompiledSchema(CompiledKind.Any, {}, context.delegate, context.path);
10991
- return compileSchema(joinPath(context, "contains"), unwrapJSONSchema7Definition(contains));
10577
+ function unwrapPatternProperties(patternProperties) {
10578
+ const target = {};
10579
+ for (const key in patternProperties) target[key] = patternProperties[key][0];
10580
+ return target;
10992
10581
  }
10993
- function compileAdditionalItems(context, { additionalItems }) {
10994
- switch (typeof additionalItems) {
10995
- case "boolean": if (additionalItems) return wrapCompiledSchema(CompiledKind.Any, {}, context.delegate, context.path);
10996
- else return false;
10997
- case "object": return compileSchema(joinPath(context, "additionalItems"), additionalItems);
10998
- default: return wrapCompiledSchema(CompiledKind.Any, {}, context.delegate, context.path);
10582
+ function mergeDependentTuple([dependentRequired, dependentSchemas], { dependencies }) {
10583
+ const target = {};
10584
+ for (const key in dependencies) {
10585
+ const required = dependentRequired[key];
10586
+ const schema = dependentSchemas[key];
10587
+ target[key] = required || schema;
10999
10588
  }
11000
- }
11001
- function variableToNever(schema, delegate) {
11002
- if (schema === void 0) return wrapCompiledSchema(CompiledKind.Never, {
11003
- type: "string",
11004
- maxLength: 0,
11005
- minLength: 1
11006
- }, delegate);
11007
- else if (isCompiledSchema(schema)) return getKind(schema) === CompiledKind.Never ? schema : toNever(schema);
11008
- else return schema;
10589
+ return target;
11009
10590
  }
11010
10591
  //#endregion
11011
- //#region src/json-schema-subset/compiler/combination.ts
11012
- var COMBINATION_KEYS = Object.freeze([
11013
- "allOf",
11014
- "anyOf",
11015
- "oneOf"
10592
+ //#region src/json-schema-subset/compiler/primitive.ts
10593
+ var NUMERIC_KEYS = /* @__PURE__ */ new Set([
10594
+ "type",
10595
+ "multipleOf",
10596
+ "maximum",
10597
+ "exclusiveMaximum",
10598
+ "minimum",
10599
+ "exclusiveMinimum"
11016
10600
  ]);
11017
- function compileCombinationSchema(context, key, combinationList, delegate) {
11018
- if (combinationList.length === 0) {
11019
- recordError(context, "disable empty list", key);
11020
- return null;
11021
- }
11022
- const compiledCombinationList = [];
11023
- for (const [i, element] of combinationList.entries()) {
11024
- const compiledSchema = compileSchema(joinPath(context, key, i), unwrapJSONSchema7Definition(element));
11025
- if (compiledSchema) compiledCombinationList.push(compiledSchema);
11026
- }
11027
- if (compiledCombinationList.length < combinationList.length) return null;
11028
- let anyCount = 0;
11029
- let neverCount = 0;
11030
- for (const compiledSchema of compiledCombinationList) switch (getKind(compiledSchema)) {
11031
- case CompiledKind.Any:
11032
- anyCount += 1;
11033
- break;
11034
- case CompiledKind.Never: neverCount += 1;
11035
- }
11036
- let kind = CompiledKind.Combination;
11037
- switch (key) {
11038
- case "allOf":
11039
- if (neverCount > 0) kind = CompiledKind.Never;
11040
- else if (anyCount === compiledCombinationList.length) kind = CompiledKind.Any;
11041
- else if (!areAllTypesTheSame(compiledCombinationList)) kind = CompiledKind.Never;
11042
- break;
11043
- case "anyOf":
11044
- if (anyCount > 0) kind = CompiledKind.Any;
11045
- else if (neverCount === compiledCombinationList.length) kind = CompiledKind.Never;
11046
- break;
11047
- case "oneOf": if (anyCount > 1) kind = CompiledKind.Never;
11048
- else if (neverCount === compiledCombinationList.length) kind = CompiledKind.Never;
11049
- else if (anyCount === 1 && neverCount === compiledCombinationList.length - 1) kind = CompiledKind.Any;
11050
- }
11051
- return wrapCompiledSchema(kind, { [key]: compiledCombinationList }, delegate, context.path);
11052
- }
11053
- function areAllTypesTheSame(combinationList) {
11054
- let lastKind = null;
11055
- for (const schema of combinationList) {
11056
- const kind = getKind(schema);
11057
- switch (kind) {
11058
- case CompiledKind.Any:
11059
- case CompiledKind.Never: break;
11060
- default: if (lastKind === null) lastKind = kind;
11061
- else if (lastKind !== kind) return false;
10601
+ var STRING_KEYS = /* @__PURE__ */ new Set([
10602
+ "type",
10603
+ "format",
10604
+ "maxLength",
10605
+ "minLength",
10606
+ "pattern"
10607
+ ]);
10608
+ function compilePrimitiveSchema(context, schema) {
10609
+ const { type } = schema;
10610
+ switch (type) {
10611
+ case "number":
10612
+ case "integer": return compileNumericSchema(context, schema);
10613
+ case "string": return compileStringSchema(context, schema);
10614
+ case "boolean":
10615
+ case "null": {
10616
+ const rejectKeys = Object.keys(schema).filter((k) => isJSONSchemaKey(k) && k !== "type");
10617
+ if (rejectKeys.length > 0) recordWarn(context, `key "type" will exclude other keys: ${rejectKeys.toSorted().join(", ")}`);
10618
+ return wrapCompiledSchema(type === "null" ? CompiledKind.Null : CompiledKind.Boolean, { type }, context.delegate, context.path);
11062
10619
  }
10620
+ default:
10621
+ recordError(context, `invalid type ${JSON.stringify(type)}`);
10622
+ return null;
11063
10623
  }
11064
- return true;
11065
- }
11066
- //#endregion
11067
- //#region src/json-schema-subset/checker/validator.ts
11068
- var ValidResult = Object.freeze({
11069
- Valid: 0,
11070
- Invalid: 1,
11071
- Unknown: 2
11072
- });
11073
- function valid(compiledSchema, value) {
11074
- const isValid = compiledSchema.isValid;
11075
- if (isValid) {
11076
- if (isValid(value) === true) return ValidResult.Valid;
11077
- else return ValidResult.Invalid;
11078
- } else return ValidResult.Unknown;
11079
10624
  }
11080
- //#endregion
11081
- //#region src/json-schema-subset/compiler/enumAndConst.ts
11082
- function compileEnumAndConst(context, enumList, constValue, schema) {
11083
- let compiledEnum;
11084
- let isNever = false;
11085
- if (enumList) {
11086
- if (enumList.length === 0) {
11087
- recordError(context, "disable empty list", "enum");
11088
- return null;
11089
- }
11090
- compiledEnum = [];
11091
- for (const [i, enumValue] of enumList.entries()) switch (valid(schema, enumValue)) {
11092
- case ValidResult.Valid:
11093
- compiledEnum.push(wrapCompiledValue(enumValue));
11094
- break;
11095
- case ValidResult.Invalid: recordWarn(context, "cannot pass JSON schema of currently schema object", "enum", i);
10625
+ function compileNumericSchema(context, schema) {
10626
+ const rejectKeys = Object.keys(schema).filter((k) => !NUMERIC_KEYS.has(k) && isJSONSchemaKey(k));
10627
+ if (rejectKeys.length > 0) recordWarn(context, `type=${JSON.stringify(schema.type)} will exclude other keys: ${rejectKeys.toSorted().join(", ")}`);
10628
+ const compiledSchema = pick(schema, NUMERIC_KEYS);
10629
+ for (const key of NUMERIC_KEYS) {
10630
+ const value = compiledSchema[key];
10631
+ if (key !== "type" && value !== void 0 && Number.isNaN(value)) {
10632
+ recordWarn(context, "found NaN", key);
10633
+ delete compiledSchema[key];
11096
10634
  }
11097
- if (compiledEnum.length === 0) recordWarn(context, "all of elements from list is rejected by currently schema object", "enum");
11098
10635
  }
11099
- if (constValue !== void 0 && valid(schema, constValue) === ValidResult.Invalid) isNever = true;
11100
- if (compiledEnum) {
11101
- if (compiledEnum.length === 0) isNever = true;
11102
- else if (constValue !== void 0) {
11103
- let foundEquals = false;
11104
- for (const enumValue of compiledEnum) if (isDeepEquals(enumValue, constValue)) {
11105
- foundEquals = true;
11106
- break;
11107
- }
11108
- if (!foundEquals) isNever = true;
11109
- }
10636
+ const { maximum, exclusiveMaximum, minimum, exclusiveMinimum } = compiledSchema;
10637
+ if (maximum !== void 0 && exclusiveMaximum !== void 0) {
10638
+ if (maximum === exclusiveMaximum) delete compiledSchema.maximum;
10639
+ else if (maximum < exclusiveMaximum) delete compiledSchema.exclusiveMaximum;
10640
+ else if (maximum > exclusiveMaximum) delete compiledSchema.maximum;
11110
10641
  }
11111
- const kind = isNever ? CompiledKind.Never : CompiledKind.EnumOrConst;
11112
- const compiledSchema = {};
11113
- if (schema.type) compiledSchema.type = schema.type;
11114
- if (compiledEnum) compiledSchema.enum = compiledEnum;
11115
- if (constValue !== void 0) compiledSchema.const = wrapCompiledValue(deepCopy(constValue));
10642
+ if (minimum !== void 0 && exclusiveMinimum !== void 0) {
10643
+ if (minimum === exclusiveMinimum) delete compiledSchema.minimum;
10644
+ else if (minimum < exclusiveMinimum) delete compiledSchema.exclusiveMinimum;
10645
+ else if (minimum > exclusiveMinimum) delete compiledSchema.minimum;
10646
+ }
10647
+ const { multipleOf } = compiledSchema;
10648
+ if (multipleOf === 0) {
10649
+ delete compiledSchema.multipleOf;
10650
+ compiledSchema.type = "number";
10651
+ recordWarn(context, "cannot be 0", "multipleOf");
10652
+ }
10653
+ let kind = CompiledKind.Numeric;
10654
+ if (!isNumericPossibleInvalid(compiledSchema)) kind = CompiledKind.Never;
11116
10655
  return wrapCompiledSchema(kind, compiledSchema, context.delegate, context.path);
11117
10656
  }
11118
- //#endregion
11119
- //#region src/json-schema-subset/compiler/object.ts
11120
- var OBJECT_KEYS = /* @__PURE__ */ new Set([
11121
- "type",
11122
- "maxProperties",
11123
- "minProperties",
11124
- "required",
11125
- "properties",
11126
- "patternProperties",
11127
- "additionalProperties",
11128
- "dependencies",
11129
- "propertyNames"
11130
- ]);
11131
- function compileObjectSchema(context, schema) {
11132
- const rejectKeys = Object.keys(schema).filter((k) => !OBJECT_KEYS.has(k) && isJSONSchemaKey(k));
11133
- if (rejectKeys.length > 0) recordWarn(context, `type="object" will exclude other keys: ${rejectKeys.toSorted().join(", ")}`);
11134
- const maxProperties = getPropertiesLimit(context, "maxProperties", schema);
11135
- const minProperties = getPropertiesLimit(context, "minProperties", schema);
11136
- const additionalPropertiesSchema = compileAdditionalProperties(context, schema);
11137
- const patternProperties = compilePatternProperties(context, schema);
11138
- const propertyNames = compilePropertyNames(context, schema);
11139
- const dependentTuple = compileDependencies(context, schema);
11140
- if (!additionalPropertiesSchema || !patternProperties || !propertyNames || !dependentTuple) return null;
11141
- const properties = compileProperties(context, patternProperties, propertyNames, schema);
11142
- if (!properties) return null;
11143
- const required = compileRequired(context, createBanKeyChecker(additionalPropertiesSchema, patternProperties, propertyNames, properties), dependentTuple, schema);
11144
- return wrapCompiledSchema(checkSchemaIsNever(context, additionalPropertiesSchema, properties, required, maxProperties, minProperties) ? CompiledKind.Never : CompiledKind.Object, cleanEmptyValues({
11145
- type: "object",
11146
- required,
11147
- properties,
11148
- minProperties,
11149
- maxProperties,
11150
- additionalProperties: additionalPropertiesSchema,
11151
- patternProperties: unwrapPatternProperties(patternProperties),
11152
- dependencies: mergeDependentTuple(dependentTuple, schema),
11153
- propertyNames
11154
- }), context.delegate, context.path);
10657
+ function isNumericPossibleInvalid(compiledSchema) {
10658
+ const { maximum, exclusiveMaximum, minimum, exclusiveMinimum } = compiledSchema;
10659
+ if (maximum !== void 0 && minimum !== void 0) return maximum >= minimum;
10660
+ else if (exclusiveMaximum !== void 0 && minimum !== void 0) return exclusiveMaximum > minimum;
10661
+ else if (maximum !== void 0 && exclusiveMinimum !== void 0) return maximum > exclusiveMinimum;
10662
+ else if (exclusiveMaximum !== void 0 && exclusiveMinimum !== void 0) return exclusiveMaximum > exclusiveMinimum;
10663
+ else return true;
11155
10664
  }
11156
- function getPropertiesLimit(context, name, schema) {
11157
- const propertiesLimit = schema[name];
11158
- if (propertiesLimit === void 0) return;
11159
- if (Number.isNaN(propertiesLimit)) {
11160
- recordWarn(context, "find NaN", name);
11161
- return;
10665
+ function compileStringSchema(context, schema) {
10666
+ const rejectKeys = Object.keys(schema).filter((k) => !STRING_KEYS.has(k) && isJSONSchemaKey(k));
10667
+ if (rejectKeys.length > 0) recordWarn(context, `type="string" will exclude other keys: ${rejectKeys.toSorted().join(", ")}`);
10668
+ const compiledSchema = pick(schema, STRING_KEYS);
10669
+ cleanInvalidLength(context, compiledSchema, "maxLength");
10670
+ cleanInvalidLength(context, compiledSchema, "minLength");
10671
+ const max = compiledSchema.maxLength;
10672
+ const min = compiledSchema.minLength;
10673
+ let kind = CompiledKind.String;
10674
+ if (max !== void 0) {
10675
+ if (max < 0) kind = CompiledKind.Never;
10676
+ else if (max !== void 0 && min !== void 0 && max < min) kind = CompiledKind.Never;
11162
10677
  }
11163
- if (propertiesLimit < 0) {
11164
- recordWarn(context, `find invalid number ${propertiesLimit}`, name);
11165
- return;
10678
+ return wrapCompiledSchema(kind, compiledSchema, context.delegate, context.path);
10679
+ }
10680
+ function cleanInvalidLength(context, compiledSchema, key) {
10681
+ const length = compiledSchema[key];
10682
+ if (length !== void 0) {
10683
+ if (Number.isNaN(length)) {
10684
+ recordWarn(context, "found NaN", key);
10685
+ delete compiledSchema[key];
10686
+ }
11166
10687
  }
11167
- return propertiesLimit;
11168
10688
  }
11169
- function compileAdditionalProperties(context, { additionalProperties }) {
11170
- if (additionalProperties === false) return wrapCompiledSchema(CompiledKind.Never, {
11171
- type: "string",
11172
- maxLength: 0,
11173
- minLength: 1
11174
- }, context.delegate, context.path);
11175
- if (typeof additionalProperties !== "object") return wrapCompiledSchema(CompiledKind.Any, {}, context.delegate, context.path);
11176
- return compileSchema(joinPath(context, "additionalProperties"), unwrapJSONSchema7Definition(additionalProperties));
11177
- }
11178
- function compilePatternProperties(context, { patternProperties }) {
11179
- let foundSubError = false;
11180
- const target = {};
11181
- for (const key in patternProperties) {
11182
- const regExp = wrapRegExp(key);
11183
- if (regExp instanceof Error) {
11184
- recordWarn(context, `property name invalid. ${key}`, "patternProperties", key);
11185
- continue;
11186
- }
11187
- const schema = unwrapJSONSchema7Definition(patternProperties[key]);
11188
- const compiledSchema = compileSchema(joinPath(context, "patternProperties", key), schema);
11189
- if (!compiledSchema) {
11190
- foundSubError = true;
11191
- continue;
11192
- }
11193
- target[key] = [compiledSchema, regExp];
11194
- }
11195
- if (foundSubError) return null;
11196
- return target;
11197
- }
11198
- function compilePropertyNames(context, { propertyNames }) {
11199
- if (!propertyNames) return wrapCompiledSchema(CompiledKind.Any, {}, context.delegate, context.path);
11200
- propertyNames = unwrapJSONSchema7Definition(propertyNames);
11201
- const schema = compileSchema(joinPath(context, "propertyNames"), propertyNames);
11202
- if (!schema) return null;
11203
- const kind = getKind(schema);
11204
- if (kind !== CompiledKind.String && kind !== CompiledKind.Any) return toNever(schema);
11205
- return schema;
11206
- }
11207
- function compileProperties(context, patternProperties, propertyNamesSchema, { properties }) {
11208
- let foundSubError = false;
11209
- if (!properties) return {};
11210
- const target = {};
11211
- for (const key in properties) {
11212
- if (valid(propertyNamesSchema, key) === ValidResult.Invalid) {
11213
- recordWarn(context, `key ${JSON.stringify(key)} cannot pass JSON schema from propertyNames`, "properties");
11214
- continue;
11215
- }
11216
- const patternSchema = findPatternSchema(patternProperties, key);
11217
- if (patternSchema && getKind(patternSchema) === CompiledKind.Never) {
11218
- recordWarn(context, `key ${JSON.stringify(key)} matches a pattern that has a impossible(never) schema`, "properties");
11219
- continue;
11220
- }
11221
- const schema = unwrapJSONSchema7Definition(properties[key]);
11222
- const compiledSchema = compileSchema(joinPath(context, "properties", key), schema);
11223
- if (!compiledSchema) {
11224
- foundSubError = true;
11225
- continue;
11226
- }
11227
- target[key] = compiledSchema;
10689
+ //#endregion
10690
+ //#region src/json-schema-subset/compiler/compiler.ts
10691
+ var emptyList = Object.freeze([]);
10692
+ function compile(schema, extendsContext, payload, delegate) {
10693
+ if (isCompiledSchema(schema)) return {
10694
+ schema,
10695
+ warns: emptyList
10696
+ };
10697
+ if (extendsContext.isExtendsSchema(schema)) return {
10698
+ schema,
10699
+ warns: emptyList
10700
+ };
10701
+ if (delegate) {
10702
+ const isSchemaResult = delegate.isSchema(schema);
10703
+ if (typeof isSchemaResult === "object") {
10704
+ const items = [];
10705
+ for (const error of isSchemaResult) items.push({
10706
+ kind: SchemaErrorItemKind.External,
10707
+ error
10708
+ });
10709
+ if (items.length > 0) return items;
10710
+ } else if (isSchemaResult === false) throw new Error("it is not a JSON Schema 7");
11228
10711
  }
11229
- if (foundSubError) return null;
11230
- return target;
11231
- }
11232
- function compileDependencies(context, { dependencies }) {
11233
- if (!dependencies) return [{}, {}];
11234
- const dependentRequired = {};
11235
- const dependentSchemas = {};
11236
- for (const key in dependencies) {
11237
- const dependency = unwrapJSONSchema7Definition(dependencies[key]);
11238
- if (Array.isArray(dependency)) {
11239
- const { keys, duplicated } = checkUniqueKeys(dependency);
11240
- if (duplicated) recordWarn(context, `found duplicated property names: ${duplicated.join(", ")}`, "dependencies", key);
11241
- dependentRequired[key] = keys;
11242
- } else {
11243
- const compiledSchema = compileSchema(joinPath(context, "dependencies", key), dependency);
11244
- if (compiledSchema) {
11245
- const kind = getKind(compiledSchema);
11246
- if (kind === CompiledKind.Object || kind === CompiledKind.Any) dependentSchemas[key] = compiledSchema;
11247
- else if (kind === CompiledKind.Extends) dependentSchemas[key] = NEVER;
11248
- else dependentSchemas[key] = toNever(compiledSchema);
11249
- }
11250
- }
10712
+ const context = {
10713
+ delegate,
10714
+ payload,
10715
+ extends: extendsContext,
10716
+ path: [],
10717
+ errors: [],
10718
+ warns: []
10719
+ };
10720
+ const compiledSchema = compileSchema(context, schema);
10721
+ if (compiledSchema) assertCondition(context.errors.length === 0, "found errors (it should be empty)");
10722
+ else {
10723
+ assertCondition(context.errors.length > 0, "cannot found any errors");
10724
+ return context.errors;
11251
10725
  }
11252
- return [dependentRequired, dependentSchemas];
11253
- }
11254
- function createBanKeyChecker(additionalPropertiesSchema, patternProperties, propertyNamesSchema, properties) {
11255
- return (key) => {
11256
- if (valid(propertyNamesSchema, key) === ValidResult.Invalid) return true;
11257
- const patternSchema = findPatternSchema(patternProperties, key);
11258
- if (patternSchema && getKind(patternSchema) === CompiledKind.Never) return true;
11259
- if (getKind(properties[key] ?? additionalPropertiesSchema) === CompiledKind.Never) return true;
11260
- return false;
10726
+ return {
10727
+ schema: compiledSchema,
10728
+ warns: context.warns
11261
10729
  };
11262
10730
  }
11263
- function compileRequired(context, isBan, dependentTuple, { required }) {
11264
- if (!required) return [];
11265
- const uniqueCheckedResult = checkUniqueKeys(required);
11266
- if (uniqueCheckedResult.duplicated) recordWarn(context, `found duplicated required keys: ${uniqueCheckedResult.duplicated.join(", ")}`, "required");
11267
- const requiredKeys = [];
11268
- const banKeys = [];
11269
- for (const requiredKey of uniqueCheckedResult.keys) if (collectDependencies(dependentTuple, requiredKey).some((key) => isBan(key))) banKeys.push(requiredKey);
11270
- else requiredKeys.push(requiredKey);
11271
- if (banKeys.length > 0) recordWarn(context, `key ${banKeys.map((k) => JSON.stringify(k)).join(", ")} will ban by another condition`, "required");
11272
- return requiredKeys;
10731
+ function assertCondition(condition, message) {
10732
+ if (!condition) throw new Error(message);
11273
10733
  }
11274
- function checkSchemaIsNever(context, additionalPropertiesSchema, properties, required, maxProperties, minProperties) {
11275
- if (maxProperties !== void 0 && minProperties !== void 0 && maxProperties < minProperties) {
11276
- recordWarn(context, `maxProperties(${maxProperties}) is less than minProperties(${minProperties})`);
11277
- return true;
11278
- }
11279
- if (maxProperties !== void 0 && required.length > maxProperties) {
11280
- recordWarn(context, `length(${required.length}) of required is greater than maxProperties(${maxProperties})`);
11281
- return true;
11282
- }
11283
- if (minProperties !== void 0 && required.length < minProperties) {
11284
- recordWarn(context, `length(${required.length}) of required is less than minProperties(${minProperties})`);
11285
- return true;
11286
- }
11287
- if (getKind(additionalPropertiesSchema) !== CompiledKind.Never) return false;
11288
- for (const key in properties) {
11289
- const compiledSchema = properties[key];
11290
- if (getKind(compiledSchema) !== CompiledKind.Never) return false;
10734
+ function compileSchema(context, schema) {
10735
+ if (context.extends.isExtendsSchema(schema)) return schema;
10736
+ if (isCompiledSchema(schema)) return schema;
10737
+ const extendsSchema = context.extends.tryCompiledExtendsSchema(schema, context.payload);
10738
+ if (extendsSchema) return extendsSchema;
10739
+ let targetSchema = schema;
10740
+ let shouldHandleEnumAndConst = false;
10741
+ const { enum: enumList, const: constValue } = schema;
10742
+ if (enumList || constValue !== void 0) {
10743
+ const { enum: _0, const: _1, ...rest } = schema;
10744
+ targetSchema = rest;
10745
+ shouldHandleEnumAndConst = true;
11291
10746
  }
11292
- return true;
10747
+ let compiledSchema = checkAndCompileSchema(context, targetSchema);
10748
+ if (compiledSchema && shouldHandleEnumAndConst) compiledSchema = compileEnumAndConst(context, enumList, constValue, compiledSchema);
10749
+ if (!compiledSchema) return null;
10750
+ return compiledSchema;
11293
10751
  }
11294
- function collectDependencies([dependentRequired, dependentSchemas], seedKey) {
11295
- const queue = [seedKey];
11296
- const collection = new Set(queue);
11297
- while (queue.length > 0) {
11298
- const key = queue.pop();
11299
- const schema = dependentSchemas[key];
11300
- const requiredKeys = dependentRequired[key];
11301
- if (schema) {
11302
- if (getKind(schema) === CompiledKind.Object) collectKeys(schema.required);
10752
+ function checkAndCompileSchema(context, schema) {
10753
+ for (const key of COMBINATION_KEYS) {
10754
+ const combinationList = schema[key];
10755
+ if (combinationList) {
10756
+ const rejectKeys = Object.keys(schema).filter((k) => isJSONSchemaKey(k) && k !== key);
10757
+ if (rejectKeys.length > 0) recordWarn(context, `composition key ${JSON.stringify(key)} will exclude other keys: ${rejectKeys.toSorted().join(", ")}`);
10758
+ const compiledSchema = compileCombinationSchema(context, key, combinationList);
10759
+ if (!compiledSchema) return null;
10760
+ return compiledSchema;
11303
10761
  }
11304
- if (requiredKeys) collectKeys(requiredKeys);
11305
10762
  }
11306
- function collectKeys(keys) {
11307
- if (keys) {
11308
- for (const key of keys) if (!collection.has(key)) {
11309
- collection.add(key);
11310
- queue.push(key);
10763
+ {
10764
+ const notSchema = unwrapJSONSchema7Definition(schema.not);
10765
+ if (notSchema) {
10766
+ const rejectKeys = Object.keys(schema).filter((k) => isJSONSchemaKey(k) && k !== "not");
10767
+ if (rejectKeys.length > 0) recordWarn(context, `key "not" will exclude other keys: ${rejectKeys.toSorted().join(", ")}`);
10768
+ const subSchema = compileSchema(joinPath(context, "not"), notSchema);
10769
+ if (!subSchema) return null;
10770
+ let kind = CompiledKind.Not;
10771
+ switch (getKind(subSchema)) {
10772
+ case CompiledKind.Never:
10773
+ kind = CompiledKind.Any;
10774
+ break;
10775
+ case CompiledKind.Any: kind = CompiledKind.Never;
11311
10776
  }
10777
+ return wrapCompiledSchema(kind, { not: subSchema }, context.delegate, context.path);
11312
10778
  }
11313
10779
  }
11314
- return [...collection];
11315
- }
11316
- function checkUniqueKeys(keys) {
11317
- const checking = /* @__PURE__ */ new Set();
11318
- const duplicated = /* @__PURE__ */ new Set();
11319
- for (const e of keys) if (checking.has(e)) duplicated.add(e);
11320
- else checking.add(e);
11321
- if (duplicated.size === 0) return {
11322
- keys: [...keys],
11323
- duplicated: null
11324
- };
11325
- else return {
11326
- keys: [...checking],
11327
- duplicated: [...duplicated]
11328
- };
11329
- }
11330
- function findPatternSchema(patternProperties, checkedKey) {
11331
- for (const key in patternProperties) {
11332
- const [schema, regExp] = patternProperties[key];
11333
- if (regExp.test(checkedKey)) return schema;
10780
+ if (schema.type) {
10781
+ const { type } = schema;
10782
+ if (Array.isArray(type)) {
10783
+ const { type: _type, ...rest } = schema;
10784
+ return compileCombinationSchema(context, "anyOf", type.map((item) => ({
10785
+ ...rest,
10786
+ type: item
10787
+ })));
10788
+ }
10789
+ switch (type) {
10790
+ case "object": return compileObjectSchema(context, schema);
10791
+ case "array": return compileArraySchema(context, schema);
10792
+ default: return compilePrimitiveSchema(context, schema);
10793
+ }
11334
10794
  }
11335
- return null;
11336
- }
11337
- function wrapRegExp(pattern) {
11338
- try {
11339
- return new RegExp(pattern, "i");
11340
- } catch (error) {
11341
- if (error instanceof SyntaxError) return error;
11342
- else throw error;
11343
- }
11344
- }
11345
- function unwrapPatternProperties(patternProperties) {
11346
- const target = {};
11347
- for (const key in patternProperties) target[key] = patternProperties[key][0];
11348
- return target;
11349
- }
11350
- function mergeDependentTuple([dependentRequired, dependentSchemas], { dependencies }) {
11351
- const target = {};
11352
- for (const key in dependencies) {
11353
- const required = dependentRequired[key];
11354
- const schema = dependentSchemas[key];
11355
- target[key] = required || schema;
11356
- }
11357
- return target;
11358
- }
11359
- //#endregion
11360
- //#region src/json-schema-subset/compiler/primitive.ts
11361
- var NUMERIC_KEYS = /* @__PURE__ */ new Set([
11362
- "type",
11363
- "multipleOf",
11364
- "maximum",
11365
- "exclusiveMaximum",
11366
- "minimum",
11367
- "exclusiveMinimum"
11368
- ]);
11369
- var STRING_KEYS = /* @__PURE__ */ new Set([
11370
- "type",
11371
- "format",
11372
- "maxLength",
11373
- "minLength",
11374
- "pattern"
11375
- ]);
11376
- function compilePrimitiveSchema(context, schema) {
11377
- const { type } = schema;
11378
- switch (type) {
11379
- case "number":
11380
- case "integer": return compileNumericSchema(context, schema);
11381
- case "string": return compileStringSchema(context, schema);
11382
- case "boolean":
11383
- case "null": {
11384
- const rejectKeys = Object.keys(schema).filter((k) => isJSONSchemaKey(k) && k !== "type");
11385
- if (rejectKeys.length > 0) recordWarn(context, `key "type" will exclude other keys: ${rejectKeys.toSorted().join(", ")}`);
11386
- return wrapCompiledSchema(type === "null" ? CompiledKind.Null : CompiledKind.Boolean, { type }, context.delegate, context.path);
11387
- }
11388
- default:
11389
- recordError(context, `invalid type ${JSON.stringify(type)}`);
11390
- return null;
11391
- }
11392
- }
11393
- function compileNumericSchema(context, schema) {
11394
- const rejectKeys = Object.keys(schema).filter((k) => !NUMERIC_KEYS.has(k) && isJSONSchemaKey(k));
11395
- if (rejectKeys.length > 0) recordWarn(context, `type=${JSON.stringify(schema.type)} will exclude other keys: ${rejectKeys.toSorted().join(", ")}`);
11396
- const compiledSchema = pick(schema, NUMERIC_KEYS);
11397
- for (const key of NUMERIC_KEYS) {
11398
- const value = compiledSchema[key];
11399
- if (key !== "type" && value !== void 0 && Number.isNaN(value)) {
11400
- recordWarn(context, "found NaN", key);
11401
- delete compiledSchema[key];
11402
- }
11403
- }
11404
- const { maximum, exclusiveMaximum, minimum, exclusiveMinimum } = compiledSchema;
11405
- if (maximum !== void 0 && exclusiveMaximum !== void 0) {
11406
- if (maximum === exclusiveMaximum) delete compiledSchema.maximum;
11407
- else if (maximum < exclusiveMaximum) delete compiledSchema.exclusiveMaximum;
11408
- else if (maximum > exclusiveMaximum) delete compiledSchema.maximum;
11409
- }
11410
- if (minimum !== void 0 && exclusiveMinimum !== void 0) {
11411
- if (minimum === exclusiveMinimum) delete compiledSchema.minimum;
11412
- else if (minimum < exclusiveMinimum) delete compiledSchema.exclusiveMinimum;
11413
- else if (minimum > exclusiveMinimum) delete compiledSchema.minimum;
11414
- }
11415
- const { multipleOf } = compiledSchema;
11416
- if (multipleOf === 0) {
11417
- delete compiledSchema.multipleOf;
11418
- compiledSchema.type = "number";
11419
- recordWarn(context, "cannot be 0", "multipleOf");
11420
- }
11421
- let kind = CompiledKind.Numeric;
11422
- if (!isNumericPossibleInvalid(compiledSchema)) kind = CompiledKind.Never;
11423
- return wrapCompiledSchema(kind, compiledSchema, context.delegate, context.path);
11424
- }
11425
- function isNumericPossibleInvalid(compiledSchema) {
11426
- const { maximum, exclusiveMaximum, minimum, exclusiveMinimum } = compiledSchema;
11427
- if (maximum !== void 0 && minimum !== void 0) return maximum >= minimum;
11428
- else if (exclusiveMaximum !== void 0 && minimum !== void 0) return exclusiveMaximum > minimum;
11429
- else if (maximum !== void 0 && exclusiveMinimum !== void 0) return maximum > exclusiveMinimum;
11430
- else if (exclusiveMaximum !== void 0 && exclusiveMinimum !== void 0) return exclusiveMaximum > exclusiveMinimum;
11431
- else return true;
11432
- }
11433
- function compileStringSchema(context, schema) {
11434
- const rejectKeys = Object.keys(schema).filter((k) => !STRING_KEYS.has(k) && isJSONSchemaKey(k));
11435
- if (rejectKeys.length > 0) recordWarn(context, `type="string" will exclude other keys: ${rejectKeys.toSorted().join(", ")}`);
11436
- const compiledSchema = pick(schema, STRING_KEYS);
11437
- cleanInvalidLength(context, compiledSchema, "maxLength");
11438
- cleanInvalidLength(context, compiledSchema, "minLength");
11439
- const max = compiledSchema.maxLength;
11440
- const min = compiledSchema.minLength;
11441
- let kind = CompiledKind.String;
11442
- if (max !== void 0) {
11443
- if (max < 0) kind = CompiledKind.Never;
11444
- else if (max !== void 0 && min !== void 0 && max < min) kind = CompiledKind.Never;
11445
- }
11446
- return wrapCompiledSchema(kind, compiledSchema, context.delegate, context.path);
11447
- }
11448
- function cleanInvalidLength(context, compiledSchema, key) {
11449
- const length = compiledSchema[key];
11450
- if (length !== void 0) {
11451
- if (Number.isNaN(length)) {
11452
- recordWarn(context, "found NaN", key);
11453
- delete compiledSchema[key];
11454
- }
11455
- }
11456
- }
11457
- //#endregion
11458
- //#region src/json-schema-subset/compiler/compiler.ts
11459
- var emptyList = Object.freeze([]);
11460
- function compile(schema, extendsContext, payload, delegate) {
11461
- if (isCompiledSchema(schema)) return {
11462
- schema,
11463
- warns: emptyList
11464
- };
11465
- if (extendsContext.isExtendsSchema(schema)) return {
11466
- schema,
11467
- warns: emptyList
11468
- };
11469
- if (delegate) {
11470
- const isSchemaResult = delegate.isSchema(schema);
11471
- if (typeof isSchemaResult === "object") {
11472
- const items = [];
11473
- for (const error of isSchemaResult) items.push({
11474
- kind: SchemaErrorItemKind.External,
11475
- error
11476
- });
11477
- if (items.length > 0) return items;
11478
- } else if (isSchemaResult === false) throw new Error("it is not a JSON Schema 7");
11479
- }
11480
- const context = {
11481
- delegate,
11482
- payload,
11483
- extends: extendsContext,
11484
- path: [],
11485
- errors: [],
11486
- warns: []
11487
- };
11488
- const compiledSchema = compileSchema(context, schema);
11489
- if (compiledSchema) assertCondition(context.errors.length === 0, "found errors (it should be empty)");
11490
- else {
11491
- assertCondition(context.errors.length > 0, "cannot found any errors");
11492
- return context.errors;
11493
- }
11494
- return {
11495
- schema: compiledSchema,
11496
- warns: context.warns
11497
- };
11498
- }
11499
- function assertCondition(condition, message) {
11500
- if (!condition) throw new Error(message);
11501
- }
11502
- function compileSchema(context, schema) {
11503
- if (context.extends.isExtendsSchema(schema)) return schema;
11504
- if (isCompiledSchema(schema)) return schema;
11505
- const extendsSchema = context.extends.tryCompiledExtendsSchema(schema, context.payload);
11506
- if (extendsSchema) return extendsSchema;
11507
- let targetSchema = schema;
11508
- let shouldHandleEnumAndConst = false;
11509
- const { enum: enumList, const: constValue } = schema;
11510
- if (enumList || constValue !== void 0) {
11511
- const { enum: _0, const: _1, ...rest } = schema;
11512
- targetSchema = rest;
11513
- shouldHandleEnumAndConst = true;
11514
- }
11515
- let compiledSchema = checkAndCompileSchema(context, targetSchema);
11516
- if (compiledSchema && shouldHandleEnumAndConst) compiledSchema = compileEnumAndConst(context, enumList, constValue, compiledSchema);
11517
- if (!compiledSchema) return null;
11518
- return compiledSchema;
11519
- }
11520
- function checkAndCompileSchema(context, schema) {
11521
- for (const key of COMBINATION_KEYS) {
11522
- const combinationList = schema[key];
11523
- if (combinationList) {
11524
- const rejectKeys = Object.keys(schema).filter((k) => isJSONSchemaKey(k) && k !== key);
11525
- if (rejectKeys.length > 0) recordWarn(context, `composition key ${JSON.stringify(key)} will exclude other keys: ${rejectKeys.toSorted().join(", ")}`);
11526
- const compiledSchema = compileCombinationSchema(context, key, combinationList);
11527
- if (!compiledSchema) return null;
11528
- return compiledSchema;
11529
- }
11530
- }
11531
- {
11532
- const notSchema = unwrapJSONSchema7Definition(schema.not);
11533
- if (notSchema) {
11534
- const rejectKeys = Object.keys(schema).filter((k) => isJSONSchemaKey(k) && k !== "not");
11535
- if (rejectKeys.length > 0) recordWarn(context, `key "not" will exclude other keys: ${rejectKeys.toSorted().join(", ")}`);
11536
- const subSchema = compileSchema(joinPath(context, "not"), notSchema);
11537
- if (!subSchema) return null;
11538
- let kind = CompiledKind.Not;
11539
- switch (getKind(subSchema)) {
11540
- case CompiledKind.Never:
11541
- kind = CompiledKind.Any;
11542
- break;
11543
- case CompiledKind.Any: kind = CompiledKind.Never;
11544
- }
11545
- return wrapCompiledSchema(kind, { not: subSchema }, context.delegate, context.path);
11546
- }
11547
- }
11548
- if (schema.type) {
11549
- const { type } = schema;
11550
- if (Array.isArray(type)) {
11551
- const { type: _type, ...rest } = schema;
11552
- return compileCombinationSchema(context, "anyOf", type.map((item) => ({
11553
- ...rest,
11554
- type: item
11555
- })));
11556
- }
11557
- switch (type) {
11558
- case "object": return compileObjectSchema(context, schema);
11559
- case "array": return compileArraySchema(context, schema);
11560
- default: return compilePrimitiveSchema(context, schema);
11561
- }
11562
- }
11563
- if (isLogicEmptyObject(schema)) return wrapCompiledSchema(CompiledKind.Any, {}, context.delegate, context.path);
11564
- recordError(context, "unrecognized");
10795
+ if (isLogicEmptyObject(schema)) return wrapCompiledSchema(CompiledKind.Any, {}, context.delegate, context.path);
10796
+ recordError(context, "unrecognized");
11565
10797
  return null;
11566
10798
  }
11567
10799
  //#endregion
@@ -13052,11 +12284,42 @@ function decisionTask(questions = [defaultDecisionQuestion()], name = "AI Decisi
13052
12284
  outputs
13053
12285
  };
13054
12286
  }
12287
+ //#endregion
12288
+ //#region src/openapi/common/authBindings.ts
12289
+ /** Never allow credentials to enter a Revision as literal node inputs. */
12290
+ function assertOpenApiAuthBindings(document) {
12291
+ for (const node of Object.values(document.graph.nodes)) {
12292
+ if (node.kind != "task" || !("executor" in node.task) || node.task.executor.kind != "openapi") continue;
12293
+ for (const [handle, mapping] of Object.entries(node.inputs)) if (handle.startsWith("auth.") && mapping.kind == "value") throw new TypeError("OpenAPI authentication accepts deployment variables and upstream outputs only.");
12294
+ }
12295
+ }
13055
12296
  function checkJsonDepth(value, depth = 0) {
13056
12297
  if (depth > 64) throw new TypeError("Value exceeds the maximum JSON depth.");
13057
12298
  if (value != null && typeof value == "object") for (const child of Object.values(value)) checkJsonDepth(child, depth + 1);
13058
12299
  }
13059
12300
  //#endregion
12301
+ //#region src/flow/common/retry.ts
12302
+ var retryNodeTypes = [
12303
+ "code",
12304
+ "connector",
12305
+ "openapi",
12306
+ "llm",
12307
+ "decision"
12308
+ ];
12309
+ var nodeRetryLimits = {
12310
+ maxRetries: 5,
12311
+ minIntervalMs: 1e3,
12312
+ maxIntervalMs: 6e4,
12313
+ intervalStepMs: 1e3
12314
+ };
12315
+ var retryConfigurationSchema = strictObject({
12316
+ maxRetries: number().int().min(0).max(nodeRetryLimits.maxRetries),
12317
+ intervalMs: number().int().min(nodeRetryLimits.minIntervalMs).max(nodeRetryLimits.maxIntervalMs).multipleOf(nodeRetryLimits.intervalStepMs)
12318
+ });
12319
+ function supportsNodeRetry(node) {
12320
+ return node.kind == "task" && retryNodeTypes.some((type) => type == ("moduleId" in node.task ? "code" : node.task.executor.kind));
12321
+ }
12322
+ //#endregion
13060
12323
  //#region src/flow/common/triggerScheduleSchema.ts
13061
12324
  var triggerScheduleSchema = array(union([object$1({
13062
12325
  type: literal("cron"),
@@ -14960,6 +14223,743 @@ function connectorOutputMode(schema) {
14960
14223
  return properties != null && Object.keys(properties).length > 0 || root?.type == "object" && root.additionalProperties === false ? "fields" : "value";
14961
14224
  }
14962
14225
  //#endregion
14226
+ //#region src/flow/common/inputValue.ts
14227
+ /** Converts explicit user values at authoring boundaries, never persisted legacy data. */
14228
+ function inputValues(values) {
14229
+ return Object.fromEntries(Object.entries(values).map(([name, value]) => [name, {
14230
+ kind: "value",
14231
+ value
14232
+ }]));
14233
+ }
14234
+ //#endregion
14235
+ //#region src/flow/common/condition.ts
14236
+ var unaryOperator = (operator) => operator.startsWith("is");
14237
+ var operandHandle = (caseIndex, groupIndex, expressionIndex, side) => `${caseIndex}/${groupIndex}/${expressionIndex}/${side}`;
14238
+ /** Derived addresses let operand bindings use the ordinary input analysis and editor. Never persisted as node inputs. */
14239
+ function conditionOperands(node) {
14240
+ return node.cases.flatMap((item, c) => item.groups.flatMap((group, g) => group.expressions.flatMap((expression, e) => [{
14241
+ handle: operandHandle(c, g, e, "left"),
14242
+ operand: expression.left,
14243
+ expression,
14244
+ side: "left"
14245
+ }, ...!unaryOperator(expression.operator) ? [{
14246
+ handle: operandHandle(c, g, e, "right"),
14247
+ operand: expression.right ?? { kind: "value" },
14248
+ expression,
14249
+ side: "right"
14250
+ }] : []])));
14251
+ }
14252
+ function nodeInputMappings(node) {
14253
+ if (node.kind == "outputs") return node.outputMappings;
14254
+ if (node.kind != "condition") return "inputs" in node ? node.inputs : {};
14255
+ return Object.fromEntries(conditionOperands(node).flatMap(({ handle, operand }) => operand.kind == "source" ? [[handle, {
14256
+ kind: "sources",
14257
+ sources: [operand.source]
14258
+ }]] : operand.value === void 0 ? [] : [[handle, {
14259
+ kind: "value",
14260
+ value: operand.value
14261
+ }]]));
14262
+ }
14263
+ function conditionInputPorts(node) {
14264
+ return Object.fromEntries(conditionOperands(node).map(({ handle, operand }) => [handle, {
14265
+ jsonSchema: operand.kind === "value" ? operand.jsonSchema ?? {} : {},
14266
+ nullable: operand.kind === "value" ? operand.value === null : true
14267
+ }]));
14268
+ }
14269
+ function setConditionInput(node, handle, mapping) {
14270
+ const entry = conditionOperands(node).find((item) => item.handle == handle);
14271
+ if (entry == null) throw new Error("Condition operand does not exist.");
14272
+ if (mapping?.kind == "sources" && mapping.sources.length != 1) throw new Error("A Condition operand requires one Source.");
14273
+ const value = mapping?.kind == "sources" ? {
14274
+ kind: "source",
14275
+ source: mapping.sources[0]
14276
+ } : {
14277
+ kind: "value",
14278
+ ...entry.operand.kind === "value" && entry.operand.jsonSchema != null ? { jsonSchema: entry.operand.jsonSchema } : {},
14279
+ ...mapping?.kind == "value" ? { value: mapping.value } : {}
14280
+ };
14281
+ const [c, g, e] = handle.split("/").map(Number);
14282
+ return {
14283
+ ...node,
14284
+ cases: node.cases.map((item, ci) => ci != c ? item : {
14285
+ ...item,
14286
+ groups: item.groups.map((group, gi) => gi != g ? group : {
14287
+ ...group,
14288
+ expressions: group.expressions.map((expression, ei) => ei != e ? expression : {
14289
+ ...expression,
14290
+ [entry.side]: value
14291
+ })
14292
+ })
14293
+ })
14294
+ };
14295
+ }
14296
+ //#endregion
14297
+ //#region src/flow/common/errorHandling.ts
14298
+ var nodeErrorSchema = {
14299
+ type: "object",
14300
+ additionalProperties: false,
14301
+ required: [
14302
+ "code",
14303
+ "message",
14304
+ "nodeId",
14305
+ "nodeName",
14306
+ "runId",
14307
+ "executionId"
14308
+ ],
14309
+ properties: {
14310
+ code: { type: "string" },
14311
+ message: { type: "string" },
14312
+ nodeId: { type: "string" },
14313
+ nodeName: { type: "string" },
14314
+ runId: { type: "string" },
14315
+ executionId: { type: "string" }
14316
+ }
14317
+ };
14318
+ function supportsNodeErrorHandling(node) {
14319
+ return supportsNodeRetry(node);
14320
+ }
14321
+ function nodeSystemOutputPorts(node) {
14322
+ return supportsNodeErrorHandling(node) && node.onError == "error" ? { error: {
14323
+ jsonSchema: nodeErrorSchema,
14324
+ nullable: true
14325
+ } } : {};
14326
+ }
14327
+ function resourceNameIssue(value) {
14328
+ const name = value.trim();
14329
+ if (name.length == 0) return "empty";
14330
+ if (name.length > 80) return "tooLong";
14331
+ for (const character of name) {
14332
+ const code = character.charCodeAt(0);
14333
+ if (code <= 31 || code >= 127 && code <= 159) return "controlCharacter";
14334
+ }
14335
+ if (!/^[\p{L}\p{N}](?:[\p{L}\p{N} _-]*[\p{L}\p{N}])?$/u.test(name)) return "specialCharacter";
14336
+ }
14337
+ function portsByHandle(ports) {
14338
+ return Object.fromEntries(ports.flatMap((port) => "handle" in port ? [[port.handle, port]] : []));
14339
+ }
14340
+ function decodeConnectorCapabilities(value) {
14341
+ if (!Array.isArray(value)) throw new TypeError("Connector capabilities must be an array.");
14342
+ if (value.length == 0) return [];
14343
+ if (value.some((item) => item != null && typeof item == "object" && !Array.isArray(item) && Object.hasOwn(item, "mode"))) {
14344
+ if (value.length != 1) throw new TypeError("Connector capability is declared more than once.");
14345
+ const source = value[0];
14346
+ if (source.mode == "shared") {
14347
+ if (source.kind != "connector" || Object.keys(source).some((key) => !["kind", "mode"].includes(key))) throw new TypeError("Invalid shared Connector permission capability.");
14348
+ return [{
14349
+ kind: "connector",
14350
+ mode: "shared"
14351
+ }];
14352
+ }
14353
+ if (Object.keys(source).some((key) => ![
14354
+ "kind",
14355
+ "mode",
14356
+ "actions"
14357
+ ].includes(key)) || source.kind != "connector" || source.mode != "independent" || !Array.isArray(source.actions)) throw new TypeError("Invalid Connector permission capability.");
14358
+ const actions = source.actions.map((entry) => {
14359
+ if (entry == null || typeof entry != "object" || Array.isArray(entry)) throw new TypeError("Invalid Connector Action.");
14360
+ const action = entry;
14361
+ if (Object.keys(action).some((key) => !["action", "connectionId"].includes(key)) || typeof action.action != "string" || !/^[A-Za-z0-9_-]+\.[A-Za-z0-9_.-]+$/.test(action.action) || Object.hasOwn(action, "connectionId") && typeof action.connectionId != "string") throw new TypeError("Invalid Connector Action permission.");
14362
+ return action.connectionId == null ? { action: action.action } : {
14363
+ action: action.action,
14364
+ connectionId: action.connectionId
14365
+ };
14366
+ });
14367
+ if (new Set(actions.map((action) => action.action)).size != actions.length) throw new TypeError("Duplicate Connector Action permission.");
14368
+ return [{
14369
+ kind: "connector",
14370
+ mode: "independent",
14371
+ actions
14372
+ }];
14373
+ }
14374
+ if (value.some((item) => item != null && typeof item == "object" && !Array.isArray(item) && !Object.hasOwn(item, "action"))) {
14375
+ if (value.length != 1) throw new TypeError("Connector capability is declared more than once.");
14376
+ const item = value[0];
14377
+ if (item == null || typeof item != "object" || Array.isArray(item)) throw new TypeError("Invalid Connector capability.");
14378
+ const source = item;
14379
+ if (Object.keys(source).some((key) => ![
14380
+ "kind",
14381
+ "actionHints",
14382
+ "connectionHints"
14383
+ ].includes(key)) || source.kind != "connector" || Object.hasOwn(source, "actionHints") && !Array.isArray(source.actionHints) || Object.hasOwn(source, "connectionHints") && !Array.isArray(source.connectionHints)) throw new TypeError("Invalid Connector capability.");
14384
+ const actionHints = (source.actionHints ?? []).map((action) => {
14385
+ if (typeof action != "string" || !/^[A-Za-z0-9_-]+\.[A-Za-z0-9_.-]+$/.test(action)) throw new TypeError("Invalid Connector Action hint.");
14386
+ return action;
14387
+ });
14388
+ if (new Set(actionHints).size != actionHints.length) throw new TypeError("Duplicate Connector Action hint.");
14389
+ const keys = /* @__PURE__ */ new Set();
14390
+ const connectionHints = (source.connectionHints ?? []).map((entry) => {
14391
+ if (entry == null || typeof entry != "object" || Array.isArray(entry)) throw new TypeError("Invalid Connector Connection hint.");
14392
+ const hint = entry;
14393
+ if (Object.keys(hint).some((key) => ![
14394
+ "action",
14395
+ "connectionId",
14396
+ "alias"
14397
+ ].includes(key)) || typeof hint.action != "string" || !/^[A-Za-z0-9_-]+\.[A-Za-z0-9_.-]+$/.test(hint.action) || typeof hint.connectionId != "string" || hint.connectionId.length == 0 || Object.hasOwn(hint, "alias") && (typeof hint.alias != "string" || hint.alias.length == 0)) throw new TypeError("Invalid Connector Connection hint.");
14398
+ const key = `${hint.action}\0${hint.alias ?? ""}`;
14399
+ if (keys.has(key)) throw new TypeError("Duplicate Connector Connection hint.");
14400
+ keys.add(key);
14401
+ return hint.alias == null ? {
14402
+ action: hint.action,
14403
+ connectionId: hint.connectionId
14404
+ } : {
14405
+ action: hint.action,
14406
+ connectionId: hint.connectionId,
14407
+ alias: hint.alias
14408
+ };
14409
+ });
14410
+ return [{
14411
+ kind: "connector",
14412
+ ...actionHints.length == 0 ? {} : { actionHints },
14413
+ ...connectionHints.length == 0 ? {} : { connectionHints }
14414
+ }];
14415
+ }
14416
+ const actions = /* @__PURE__ */ new Set();
14417
+ return value.map((item) => {
14418
+ if (item == null || typeof item != "object" || Array.isArray(item)) throw new TypeError("Invalid Connector capability.");
14419
+ const source = item;
14420
+ if (Object.keys(source).some((key) => ![
14421
+ "kind",
14422
+ "action",
14423
+ "connections",
14424
+ "connectionId"
14425
+ ].includes(key)) || source.kind != "connector" || typeof source.action != "string" || !/^[A-Za-z0-9_-]+\.[A-Za-z0-9_.-]+$/.test(source.action) || !Array.isArray(source.connections)) throw new TypeError("Invalid Connector capability.");
14426
+ if (actions.has(source.action)) throw new TypeError("Connector Action is declared more than once.");
14427
+ actions.add(source.action);
14428
+ const ids = /* @__PURE__ */ new Set();
14429
+ const aliases = /* @__PURE__ */ new Set();
14430
+ const connections = source.connections.map((entry) => {
14431
+ if (entry == null || typeof entry != "object" || Array.isArray(entry)) throw new TypeError("Invalid Connector Connection.");
14432
+ const connection = entry;
14433
+ if (Object.keys(connection).some((key) => !["connectionId", "alias"].includes(key)) || typeof connection.connectionId != "string" || connection.connectionId.length == 0 || ids.has(connection.connectionId)) throw new TypeError("Invalid or duplicate Connector Connection ID.");
14434
+ ids.add(connection.connectionId);
14435
+ if (Object.hasOwn(connection, "alias")) {
14436
+ if (typeof connection.alias != "string" || connection.alias.length == 0 || aliases.has(connection.alias)) throw new TypeError("Invalid or duplicate Connector alias.");
14437
+ aliases.add(connection.alias);
14438
+ }
14439
+ return {
14440
+ connectionId: connection.connectionId,
14441
+ ...connection.alias == null ? {} : { alias: connection.alias }
14442
+ };
14443
+ });
14444
+ if (Object.hasOwn(source, "connectionId") && (typeof source.connectionId != "string" || !ids.has(source.connectionId))) throw new TypeError("The default Connector Connection must be declared.");
14445
+ return {
14446
+ kind: "connector",
14447
+ action: source.action,
14448
+ connections,
14449
+ ...source.connectionId == null ? {} : { connectionId: source.connectionId }
14450
+ };
14451
+ });
14452
+ }
14453
+ function isTriggerNode(node) {
14454
+ return [
14455
+ "manual",
14456
+ "start",
14457
+ "error",
14458
+ "webhook",
14459
+ "cron",
14460
+ "poll",
14461
+ "integration"
14462
+ ].includes(node.kind);
14463
+ }
14464
+ /** Lossless upgrade of readable content. Historical content and its encoding stay unchanged. */
14465
+ function upgradeRevisionContent(content) {
14466
+ const upgraded = upgradeDecodedRevisionContent(decodeRevisionContent(content));
14467
+ return dequal(content, upgraded) ? content : upgraded;
14468
+ }
14469
+ function upgradeDecodedRevisionContent(content) {
14470
+ const graph = content.document.graph;
14471
+ const hasManual = Object.values(graph.nodes).some((node) => node.kind == "manual");
14472
+ if (!hasManual && content.modelVersion == 10) return content;
14473
+ return {
14474
+ ...content,
14475
+ modelVersion: 10,
14476
+ document: {
14477
+ ...content.document,
14478
+ graph: hasManual ? {
14479
+ ...graph,
14480
+ nodes: Object.fromEntries(Object.entries(graph.nodes).map(([id, node]) => [id, upgradeManualTrigger(node)]))
14481
+ } : graph
14482
+ }
14483
+ };
14484
+ }
14485
+ function upgradeManualTrigger(node) {
14486
+ return node.kind == "manual" ? {
14487
+ ...node,
14488
+ kind: "start",
14489
+ inputDefs: []
14490
+ } : node;
14491
+ }
14492
+ function normalizeNodeName(value) {
14493
+ return value.trim().normalize("NFC");
14494
+ }
14495
+ function nodeNameIssue(graph, nodeId, value) {
14496
+ const name = normalizeNodeName(value);
14497
+ if (name.length == 0) return "empty";
14498
+ return Object.entries(graph.nodes).some(([candidateId, node]) => candidateId != nodeId && node.name != null && normalizeNodeName(node.name) == name) ? "duplicate" : void 0;
14499
+ }
14500
+ var FlowChangeError = class extends Error {
14501
+ constructor(message) {
14502
+ super(message);
14503
+ this.name = "FlowChangeError";
14504
+ }
14505
+ };
14506
+ function invalid(message) {
14507
+ throw new FlowChangeError(message);
14508
+ }
14509
+ function applyFlowChanges(content, operations) {
14510
+ const source = content.modelVersion != 10 || Object.values(content.document.graph.nodes).some((node) => node.kind == "manual") ? decodeRevisionContent(content) : content;
14511
+ const document = { ...source.document };
14512
+ const modules = { ...source.modules };
14513
+ for (const operation of operations) switch (operation.kind) {
14514
+ case "graph.trigger.sources.set": {
14515
+ const graph = document.graph;
14516
+ const node = graph.nodes[operation.nodeId];
14517
+ if (node?.kind != "error") invalid("The Flow Error node does not exist.");
14518
+ if (!dequal(node.sourceFlowIds, operation.before)) invalid("The Flow Error node’s sources changed before this operation was applied.");
14519
+ const { sourceFlowIds: _, ...base } = node;
14520
+ const updated = operation.value == null ? base : {
14521
+ ...base,
14522
+ sourceFlowIds: operation.value
14523
+ };
14524
+ document.graph = {
14525
+ ...graph,
14526
+ nodes: {
14527
+ ...graph.nodes,
14528
+ [operation.nodeId]: updated
14529
+ }
14530
+ };
14531
+ break;
14532
+ }
14533
+ case "binding.create":
14534
+ if (document.bindings[operation.bindingId] != null) invalid("A Binding with this ID already exists.");
14535
+ document.bindings = {
14536
+ ...document.bindings,
14537
+ [operation.bindingId]: operation.binding
14538
+ };
14539
+ break;
14540
+ case "binding.delete": {
14541
+ if (document.bindings[operation.bindingId] == null) invalid("The Binding does not exist.");
14542
+ const bindings = { ...document.bindings };
14543
+ delete bindings[operation.bindingId];
14544
+ document.bindings = bindings;
14545
+ break;
14546
+ }
14547
+ case "binding.target.set": {
14548
+ const binding = document.bindings[operation.bindingId];
14549
+ if (binding == null) invalid("The Binding does not exist.");
14550
+ if (binding.target != operation.before) invalid("The Binding target changed before this operation was applied.");
14551
+ document.bindings = {
14552
+ ...document.bindings,
14553
+ [operation.bindingId]: {
14554
+ ...binding,
14555
+ target: operation.value
14556
+ }
14557
+ };
14558
+ break;
14559
+ }
14560
+ case "graph.edge.connect": {
14561
+ const graph = document.graph;
14562
+ if (graph.nodes[operation.edge.source] == null) invalid("The source Node does not exist.");
14563
+ if (graph.nodes[operation.edge.source]?.kind == "outputs") invalid("Outputs cannot have downstream execution edges.");
14564
+ const node = graph.nodes[operation.edge.target];
14565
+ if (node == null || isTriggerNode(node)) invalid("The target Node does not accept execution dependencies.");
14566
+ if (graph.edges.some((edge) => dequal(edge, operation.edge))) invalid("The Nodes are already connected.");
14567
+ Object.assign(document, { graph: {
14568
+ ...graph,
14569
+ edges: [...graph.edges, operation.edge]
14570
+ } });
14571
+ break;
14572
+ }
14573
+ case "graph.edge.disconnect": {
14574
+ const graph = document.graph;
14575
+ const edges = graph.edges.filter((edge) => !dequal(edge, operation.edge));
14576
+ if (edges.length == graph.edges.length) invalid("The Nodes are not connected.");
14577
+ Object.assign(document, { graph: {
14578
+ ...graph,
14579
+ edges
14580
+ } });
14581
+ break;
14582
+ }
14583
+ case "graph.node.additional-inputs.set": {
14584
+ const graph = document.graph;
14585
+ const node = graph.nodes[operation.nodeId];
14586
+ if (node?.kind != "task") invalid("The Task Node does not exist.");
14587
+ if (!dequal(node.additionalInputs, operation.before)) invalid("The Task Node inputs changed before this operation was applied.");
14588
+ const { additionalInputs: _, ...rest } = node;
14589
+ const updated = operation.value == null ? rest : {
14590
+ ...rest,
14591
+ additionalInputs: operation.value
14592
+ };
14593
+ Object.assign(document, { graph: {
14594
+ ...graph,
14595
+ nodes: {
14596
+ ...graph.nodes,
14597
+ [operation.nodeId]: updated
14598
+ }
14599
+ } });
14600
+ break;
14601
+ }
14602
+ case "graph.node.condition.set": {
14603
+ const graph = document.graph;
14604
+ const node = graph.nodes[operation.nodeId];
14605
+ if (node?.kind != "condition") invalid("The Condition Node does not exist.");
14606
+ if (!dequal(node.cases, operation.before.cases) || node.matchMode != operation.before.matchMode) invalid("The Condition Node changed before this operation was applied.");
14607
+ const updated = {
14608
+ ...node,
14609
+ ...operation.value
14610
+ };
14611
+ Object.assign(document, { graph: {
14612
+ ...graph,
14613
+ nodes: {
14614
+ ...graph.nodes,
14615
+ [operation.nodeId]: updated
14616
+ }
14617
+ } });
14618
+ break;
14619
+ }
14620
+ case "graph.node.replace": {
14621
+ const graph = document.graph;
14622
+ if (!dequal(graph.nodes[operation.nodeId], operation.before)) invalid("The Node changed before this operation was applied.");
14623
+ if (operation.node.kind != operation.before.kind) invalid("Replacing a Node cannot change its kind.");
14624
+ if (operation.node.kind == "task" && "moduleId" in operation.node.task && operation.node.task.capabilities !== void 0) decodeConnectorCapabilities(operation.node.task.capabilities);
14625
+ const name = normalizeNodeName(operation.node.name ?? "");
14626
+ const issue = nodeNameIssue(graph, operation.nodeId, name);
14627
+ if (issue != null) invalid(`Node name is ${issue}.`);
14628
+ const node = name == operation.node.name ? operation.node : {
14629
+ ...operation.node,
14630
+ name
14631
+ };
14632
+ Object.assign(document, { graph: {
14633
+ ...graph,
14634
+ nodes: {
14635
+ ...graph.nodes,
14636
+ [operation.nodeId]: node
14637
+ }
14638
+ } });
14639
+ break;
14640
+ }
14641
+ case "graph.node.create": {
14642
+ const graph = document.graph;
14643
+ if (graph.nodes[operation.nodeId] != null) invalid("A Node with this ID already exists in the target graph.");
14644
+ if (operation.node.kind == "error" && Object.values(graph.nodes).some((node) => node.kind == "error")) invalid("A graph can contain only one Flow Error node.");
14645
+ if ((operation.node.kind == "manual" || operation.node.kind == "start") && Object.values(graph.nodes).some((node) => node.kind == "manual" || node.kind == "start")) invalid("A graph can contain only one Start Trigger.");
14646
+ if (operation.node.kind == "task" && "moduleId" in operation.node.task && operation.node.task.capabilities !== void 0) decodeConnectorCapabilities(operation.node.task.capabilities);
14647
+ if (operation.node.name == null) invalid("A Node name cannot be empty.");
14648
+ if (operation.node.kind == "outputs" && Object.values(graph.nodes).some((node) => node.kind == "outputs")) invalid("A graph can contain only one Outputs node.");
14649
+ const name = normalizeNodeName(operation.node.name);
14650
+ const issue = nodeNameIssue(graph, operation.nodeId, name);
14651
+ if (issue == "empty") invalid("A Node name cannot be empty.");
14652
+ if (issue == "duplicate") invalid("A Node with this name already exists in the target graph.");
14653
+ const node = name == operation.node.name ? operation.node : {
14654
+ ...operation.node,
14655
+ name
14656
+ };
14657
+ Object.assign(document, { graph: {
14658
+ ...graph,
14659
+ nodes: {
14660
+ ...graph.nodes,
14661
+ [operation.nodeId]: node
14662
+ }
14663
+ } });
14664
+ break;
14665
+ }
14666
+ case "graph.node.delete": {
14667
+ const graph = document.graph;
14668
+ if (graph.nodes[operation.nodeId] == null) invalid("The Node does not exist in the target graph.");
14669
+ const removed = /* @__PURE__ */ new Set([operation.nodeId]);
14670
+ const nodes = Object.fromEntries(Object.entries(graph.nodes).filter(([nodeId]) => !removed.has(nodeId)));
14671
+ Object.assign(document, { graph: {
14672
+ ...graph,
14673
+ edges: graph.edges.filter((edge) => !removed.has(edge.source) && !removed.has(edge.target)),
14674
+ nodes
14675
+ } });
14676
+ break;
14677
+ }
14678
+ case "graph.node.field.set": {
14679
+ const graph = document.graph;
14680
+ const node = graph.nodes[operation.nodeId];
14681
+ if (node == null) invalid("The Node does not exist in the target graph.");
14682
+ if (operation.field == "onError" && operation.value != null && (!supportsNodeErrorHandling(node) || !["stop", "error"].includes(String(operation.value)))) invalid("This node does not support this error handling setting.");
14683
+ if (operation.field == "retry" && operation.value != null && !supportsNodeRetry(node)) invalid("This node does not support retries.");
14684
+ if (operation.field == "connectionId" && node.kind != "poll" && node.kind != "integration") invalid("Only provider Triggers select a node Connection.");
14685
+ if (!dequal(Reflect.get(node, operation.field), operation.before)) invalid("The Node field changed before this operation was applied.");
14686
+ const updated = { ...node };
14687
+ if (operation.field == "name") {
14688
+ if (typeof operation.value != "string") invalid("A Node name cannot be empty.");
14689
+ const name = normalizeNodeName(operation.value);
14690
+ const issue = nodeNameIssue(graph, operation.nodeId, name);
14691
+ if (issue == "empty") invalid("A Node name cannot be empty.");
14692
+ if (issue == "duplicate") invalid("A Node with this name already exists in the target graph.");
14693
+ Object.assign(updated, { name });
14694
+ } else if (operation.value == null) Reflect.deleteProperty(updated, operation.field);
14695
+ else Object.assign(updated, { [operation.field]: operation.value });
14696
+ Object.assign(document, { graph: {
14697
+ ...graph,
14698
+ nodes: {
14699
+ ...graph.nodes,
14700
+ [operation.nodeId]: updated
14701
+ }
14702
+ } });
14703
+ break;
14704
+ }
14705
+ case "graph.node.input.set": {
14706
+ const graph = document.graph;
14707
+ const node = graph.nodes[operation.nodeId];
14708
+ if (node == null || isTriggerNode(node)) invalid("The Node does not accept inputs.");
14709
+ if (!dequal(nodeInputMappings(node)[operation.handle], operation.before)) invalid("The Node input changed before this operation was applied.");
14710
+ const inputs = { ...nodeInputMappings(node) };
14711
+ if (operation.value == null) delete inputs[operation.handle];
14712
+ else inputs[operation.handle] = operation.value;
14713
+ if (node.kind == "outputs") {
14714
+ document.graph = {
14715
+ ...graph,
14716
+ nodes: {
14717
+ ...graph.nodes,
14718
+ [operation.nodeId]: {
14719
+ ...node,
14720
+ outputMappings: inputs
14721
+ }
14722
+ }
14723
+ };
14724
+ break;
14725
+ }
14726
+ Object.assign(document, { graph: {
14727
+ ...graph,
14728
+ nodes: {
14729
+ ...graph.nodes,
14730
+ [operation.nodeId]: node.kind == "condition" ? setConditionInput(node, operation.handle, operation.value) : {
14731
+ ...node,
14732
+ inputs
14733
+ }
14734
+ }
14735
+ } });
14736
+ break;
14737
+ }
14738
+ case "graph.node.task.capabilities.set": {
14739
+ const graph = document.graph;
14740
+ const node = graph.nodes[operation.nodeId];
14741
+ if (node?.kind != "task" || !("moduleId" in node.task)) invalid("The inline Task Node does not exist.");
14742
+ if (!dequal(node.task.capabilities, operation.before)) invalid("The inline Task capabilities changed before this operation was applied.");
14743
+ const task = { ...node.task };
14744
+ if (operation.value === void 0) delete task.capabilities;
14745
+ else task.capabilities = decodeConnectorCapabilities(operation.value);
14746
+ Object.assign(document, { graph: {
14747
+ ...graph,
14748
+ nodes: {
14749
+ ...graph.nodes,
14750
+ [operation.nodeId]: {
14751
+ ...node,
14752
+ task
14753
+ }
14754
+ }
14755
+ } });
14756
+ break;
14757
+ }
14758
+ case "graph.node.task.name.set": {
14759
+ const graph = document.graph;
14760
+ const node = graph.nodes[operation.nodeId];
14761
+ if (node?.kind != "task" || !("moduleId" in node.task)) invalid("The inline Task Node does not exist.");
14762
+ if (node.task.name != operation.before) invalid("The inline Task name changed before this operation was applied.");
14763
+ const updated = {
14764
+ ...node,
14765
+ task: {
14766
+ ...node.task,
14767
+ name: operation.value
14768
+ }
14769
+ };
14770
+ Object.assign(document, { graph: {
14771
+ ...graph,
14772
+ nodes: {
14773
+ ...graph.nodes,
14774
+ [operation.nodeId]: updated
14775
+ }
14776
+ } });
14777
+ break;
14778
+ }
14779
+ case "graph.node.task.ports.set": {
14780
+ const graph = document.graph;
14781
+ const node = graph.nodes[operation.nodeId];
14782
+ if (node?.kind != "task" || !("moduleId" in node.task)) invalid("The inline Task Node does not exist.");
14783
+ if (!dequal({
14784
+ inputs: node.task.inputs,
14785
+ outputs: node.task.outputs
14786
+ }, operation.before)) invalid("The inline Task ports changed before this operation was applied.");
14787
+ const updated = {
14788
+ ...node,
14789
+ task: {
14790
+ ...node.task,
14791
+ inputs: operation.value.inputs,
14792
+ outputs: operation.value.outputs
14793
+ }
14794
+ };
14795
+ Object.assign(document, { graph: {
14796
+ ...graph,
14797
+ nodes: {
14798
+ ...graph.nodes,
14799
+ [operation.nodeId]: updated
14800
+ }
14801
+ } });
14802
+ break;
14803
+ }
14804
+ case "graph.node.values.set": {
14805
+ const graph = document.graph;
14806
+ const node = graph.nodes[operation.nodeId];
14807
+ if (node?.kind != "value") invalid("The Value Node does not exist.");
14808
+ if (!dequal(node.values, operation.before)) invalid("The Value Node changed before this operation was applied.");
14809
+ Object.assign(document, { graph: {
14810
+ ...graph,
14811
+ nodes: {
14812
+ ...graph.nodes,
14813
+ [operation.nodeId]: {
14814
+ ...node,
14815
+ values: operation.value
14816
+ }
14817
+ }
14818
+ } });
14819
+ break;
14820
+ }
14821
+ case "graph.node.resolution.set": {
14822
+ const graph = document.graph;
14823
+ const node = graph.nodes[operation.nodeId];
14824
+ if (node?.kind != "wait" && node?.kind != "approval" || !dequal({
14825
+ inputDefinitions: node.inputDefinitions,
14826
+ prompt: node.prompt,
14827
+ ...node.kind == "wait" && node.autoContinue != null ? { autoContinue: node.autoContinue } : {}
14828
+ }, operation.before)) invalid("The resolution node changed before this operation was applied.");
14829
+ if (node.kind == "approval" && operation.value.autoContinue != null) invalid("Approval does not support automatic continuation.");
14830
+ const updated = {
14831
+ ...node,
14832
+ ...operation.value
14833
+ };
14834
+ if (updated.kind == "wait" && operation.value.autoContinue == null) Reflect.deleteProperty(updated, "autoContinue");
14835
+ document.graph = {
14836
+ ...graph,
14837
+ nodes: {
14838
+ ...graph.nodes,
14839
+ [operation.nodeId]: updated
14840
+ }
14841
+ };
14842
+ break;
14843
+ }
14844
+ case "graph.node.webhook.set": {
14845
+ const graph = document.graph;
14846
+ const node = graph.nodes[operation.nodeId];
14847
+ if (node?.kind != "webhook") invalid("The Webhook Node does not exist.");
14848
+ if (node.method != operation.before.method || !dequal(node.bodyFields, operation.before.bodyFields) || !dequal(node.options, operation.before.options)) invalid("The Webhook Node changed before this operation was applied.");
14849
+ const { options: _, ...rest } = node;
14850
+ const updated = operation.value.options == null ? {
14851
+ ...rest,
14852
+ bodyFields: operation.value.bodyFields,
14853
+ method: operation.value.method
14854
+ } : {
14855
+ ...node,
14856
+ ...operation.value
14857
+ };
14858
+ Object.assign(document, { graph: {
14859
+ ...graph,
14860
+ nodes: {
14861
+ ...graph.nodes,
14862
+ [operation.nodeId]: updated
14863
+ }
14864
+ } });
14865
+ break;
14866
+ }
14867
+ case "graph.trigger.config.set": {
14868
+ const graph = document.graph;
14869
+ const node = graph.nodes[operation.nodeId];
14870
+ if (node == null || node.kind != "integration" && node.kind != "poll") invalid("The configurable Trigger Node does not exist.");
14871
+ if (!dequal(node.config[operation.name], operation.before)) invalid("The Trigger configuration changed before this operation was applied.");
14872
+ const config = { ...node.config };
14873
+ if (operation.value === void 0) delete config[operation.name];
14874
+ else config[operation.name] = operation.value;
14875
+ document.graph = {
14876
+ ...graph,
14877
+ nodes: {
14878
+ ...graph.nodes,
14879
+ [operation.nodeId]: {
14880
+ ...node,
14881
+ config
14882
+ }
14883
+ }
14884
+ };
14885
+ break;
14886
+ }
14887
+ case "graph.trigger.schedule.set": {
14888
+ const graph = document.graph;
14889
+ const node = graph.nodes[operation.nodeId];
14890
+ if (node == null || node.kind != "cron" && node.kind != "poll") invalid("The scheduled Trigger Node does not exist.");
14891
+ if (!dequal(node.kind == "cron" ? node.cronTimes : node.pollTimes, operation.before)) invalid("The Trigger schedule changed before this operation was applied.");
14892
+ const updated = node.kind == "cron" ? {
14893
+ ...node,
14894
+ cronTimes: operation.value
14895
+ } : {
14896
+ ...node,
14897
+ pollTimes: operation.value
14898
+ };
14899
+ document.graph = {
14900
+ ...graph,
14901
+ nodes: {
14902
+ ...graph.nodes,
14903
+ [operation.nodeId]: updated
14904
+ }
14905
+ };
14906
+ break;
14907
+ }
14908
+ case "module.create":
14909
+ if (modules[operation.moduleId] != null) invalid("A CodeModule with this ID already exists.");
14910
+ modules[operation.moduleId] = operation.module;
14911
+ break;
14912
+ case "module.delete":
14913
+ if (modules[operation.moduleId] == null) invalid("The CodeModule does not exist.");
14914
+ delete modules[operation.moduleId];
14915
+ break;
14916
+ case "module.rename": {
14917
+ const module = modules[operation.moduleId];
14918
+ if (module == null) invalid("The CodeModule does not exist.");
14919
+ if (module.name != operation.before) invalid("The CodeModule name changed before this operation was applied.");
14920
+ modules[operation.moduleId] = {
14921
+ ...module,
14922
+ name: operation.name
14923
+ };
14924
+ break;
14925
+ }
14926
+ case "module.source.replace": {
14927
+ const module = modules[operation.moduleId];
14928
+ if (module == null) invalid("The CodeModule does not exist.");
14929
+ if (module.source != operation.beforeSource || !dequal(module.imports, operation.beforeImports)) invalid("The CodeModule source changed before this operation was applied.");
14930
+ modules[operation.moduleId] = {
14931
+ ...module,
14932
+ imports: operation.imports,
14933
+ source: operation.source
14934
+ };
14935
+ break;
14936
+ }
14937
+ case "graph.node.task.set": {
14938
+ const graph = document.graph;
14939
+ const node = graph.nodes[operation.nodeId];
14940
+ if (node?.kind != "task") invalid("The Task Node does not exist.");
14941
+ if (!dequal(node.task, operation.before)) invalid("The Task configuration changed before this operation was applied.");
14942
+ document.graph = {
14943
+ ...graph,
14944
+ nodes: {
14945
+ ...graph.nodes,
14946
+ [operation.nodeId]: {
14947
+ ...node,
14948
+ task: operation.value
14949
+ }
14950
+ }
14951
+ };
14952
+ break;
14953
+ }
14954
+ }
14955
+ assertOpenApiAuthBindings(document);
14956
+ return upgradeDecodedRevisionContent({
14957
+ document,
14958
+ modelVersion: 10,
14959
+ modules
14960
+ });
14961
+ }
14962
+ //#endregion
14963
14963
  //#region src/flow/common/edgeChanges.ts
14964
14964
  function connect(content, edge) {
14965
14965
  const selected = content.document.graph;
@@ -17023,7 +17023,7 @@ function resolveDraftOperations(operations, definition) {
17023
17023
  }
17024
17024
  //#endregion
17025
17025
  //#region src/trigger/providers/catalog.generated.json
17026
- var catalog_generated_default = /*#__PURE__*/ JSON.parse("[{\"snapshot\":{\"configInputs\":[{\"handle\":\"baseId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^app[A-Za-z0-9]{14}$\"},\"nullable\":false},{\"handle\":\"formula\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false,\"value\":\"\"},{\"handle\":\"tableIdOrName\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":255},\"nullable\":false},{\"handle\":\"triggerField\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":255,\"pattern\":\"^[^}]*$\"},\"nullable\":false},{\"handle\":\"view\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false,\"value\":\"\"},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"fields\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"minLength\":1}},\"nullable\":false,\"value\":[]},{\"handle\":\"maxRecordsPerPoll\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":1000},\"nullable\":false,\"value\":200}],\"definitionVersion\":2,\"description\":\"Polls an Airtable table and triggers when a record is created or updated, ordered by a time field.\",\"displayName\":\"Record Created or Updated\",\"key\":\"airtable.on_record_changed\",\"name\":\"on_record_changed\",\"outputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"baseId\":{\"type\":\"string\"},\"createdTime\":{\"type\":\"string\"},\"fields\":{\"type\":\"object\"},\"recordId\":{\"type\":\"string\"},\"tableIdOrName\":{\"type\":\"string\"},\"triggerField\":{\"type\":\"string\"},\"triggerFieldValue\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"baseId\",\"tableIdOrName\",\"recordId\",\"createdTime\",\"triggerField\",\"triggerFieldValue\",\"fields\"]}},\"nullable\":false}],\"provider\":\"airtable\",\"type\":\"poll\"},\"options\":false},{\"snapshot\":{\"key\":\"asana.on_task_event\",\"provider\":\"asana\",\"name\":\"on_task_event\",\"displayName\":\"Project Task Event\",\"description\":\"Receives tasks added to a project, completion changes, and selected custom field changes. Task details represent current state, not historical state.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":true},\"successStatus\":200},\"configInputs\":[{\"handle\":\"projectId\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"title\":\"Project ID\"},\"nullable\":false},{\"handle\":\"eventTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"task.added\",\"task.completed\",\"task.field_changed\"]},\"minItems\":1,\"uniqueItems\":true,\"title\":\"Events\"},\"nullable\":false,\"value\":[\"task.added\",\"task.completed\"]},{\"handle\":\"customFieldId\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"title\":\"Custom field ID\"},\"nullable\":true}],\"outputs\":[{\"handle\":\"projectId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"event\":{\"type\":\"string\"},\"task\":{\"type\":\"object\"},\"change\":{\"type\":\"object\"}},\"required\":[\"event\",\"task\",\"change\"]}},\"nullable\":false}]},\"options\":false},{\"snapshot\":{\"key\":\"calendly.on_booking_event\",\"provider\":\"calendly\",\"name\":\"on_booking_event\",\"displayName\":\"Booking Created or Canceled\",\"description\":\"Receives bookings and cancellations, preserving reschedule links. Requires a Personal Access Token connection.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"scope\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"user\",\"organization\"],\"title\":\"Scope\"},\"nullable\":false,\"value\":\"user\"},{\"handle\":\"eventTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"invitee.created\",\"invitee.canceled\"]},\"minItems\":1,\"uniqueItems\":true,\"title\":\"Events\"},\"nullable\":false,\"value\":[\"invitee.created\",\"invitee.canceled\"]}],\"outputs\":[{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"invitee.created\",\"invitee.canceled\"]},\"nullable\":false},{\"handle\":\"inviteeUri\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"createdAt\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false}]},\"options\":false},{\"snapshot\":{\"key\":\"clickup.on_task_event\",\"provider\":\"clickup\",\"name\":\"on_task_event\",\"displayName\":\"Task Event\",\"description\":\"Receives task creation, status changes, and new comments in a ClickUp Workspace or List.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"workspaceId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^[0-9]+$\",\"title\":\"Workspace ID\"},\"nullable\":false},{\"handle\":\"listId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^[0-9]+$\",\"title\":\"List ID\"},\"nullable\":true},{\"handle\":\"eventTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"taskCreated\",\"taskStatusUpdated\",\"taskCommentPosted\"]},\"minItems\":1,\"uniqueItems\":true,\"title\":\"Events\"},\"nullable\":false,\"value\":[\"taskCreated\",\"taskStatusUpdated\",\"taskCommentPosted\"]}],\"outputs\":[{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"taskCreated\",\"taskStatusUpdated\",\"taskCommentPosted\"]},\"nullable\":false},{\"handle\":\"taskId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false}]},\"options\":false},{\"snapshot\":{\"key\":\"feishu_app_bot.on_event\",\"provider\":\"feishu_app_bot\",\"name\":\"on_event\",\"displayName\":\"Application Event\",\"description\":\"Receives selected Feishu application events through a shared event source.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"sourceId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^source_[0-9a-f]{32}$\",\"title\":\"Event source\"},\"nullable\":false},{\"handle\":\"eventTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9_.]{0,127}$\"},\"minItems\":1,\"maxItems\":200,\"uniqueItems\":true,\"title\":\"Event types\"},\"nullable\":false},{\"handle\":\"chatIds\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"maxItems\":100,\"uniqueItems\":true,\"title\":\"Chat IDs\"},\"nullable\":true,\"description\":\"Leave empty to receive events from all chats available to the source.\"},{\"handle\":\"resource\",\"jsonSchema\":{\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"enum\":[\"document\",\"calendar\",\"approval\"]},\"id\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"documentType\":{\"type\":\"string\",\"enum\":[\"doc\",\"docx\",\"sheet\",\"bitable\",\"file\",\"folder\"]}},\"additionalProperties\":false,\"required\":[\"kind\",\"id\"],\"title\":\"Resource subscription\"},\"nullable\":true}],\"outputs\":[{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"appId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"tenantKey\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"occurredAt\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":true},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false}]},\"options\":false,\"eventSource\":\"feishu\",\"source\":{\"createSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"feishu\"},\"version\":{\"type\":\"number\",\"const\":1},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"connectionId\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"teamId\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},{\"type\":\"null\"}]},\"verificationToken\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"encryptKey\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"eventTypes\":{\"minItems\":1,\"maxItems\":200,\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9_.:]{0,127}$\"}},\"manageSubscriptions\":{\"type\":\"boolean\"}},\"required\":[\"version\",\"name\",\"connectionId\",\"teamId\",\"verificationToken\",\"encryptKey\",\"eventTypes\",\"manageSubscriptions\"],\"additionalProperties\":false},\"updateSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"number\",\"const\":1},\"expectedRevision\":{\"type\":\"integer\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"enabled\":{\"type\":\"boolean\"},\"eventTypes\":{\"minItems\":1,\"maxItems\":200,\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9_.:]{0,127}$\"}},\"verificationToken\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"signingSecret\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"encryptKey\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256}},\"required\":[\"version\",\"expectedRevision\",\"name\",\"enabled\",\"eventTypes\"],\"additionalProperties\":false},\"kind\":\"feishu\",\"provider\":\"feishu_app_bot\",\"triggerId\":\"feishu_app_bot.on_event\",\"maximumBodyBytes\":65536,\"applicationIngress\":false,\"managed\":false}},{\"snapshot\":{\"key\":\"fireflies.on_meeting_ready\",\"provider\":\"fireflies\",\"name\":\"on_meeting_ready\",\"displayName\":\"Meeting Transcript or Summary Ready\",\"description\":\"Receives separate transcript and summary readiness events through Fireflies Webhooks V2 after checking meeting access.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"sourceId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^source_[0-9a-f]{32}$\",\"title\":\"Event source\"},\"nullable\":false},{\"handle\":\"eventTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"meeting.transcribed\",\"meeting.summarized\"]},\"minItems\":1,\"maxItems\":2,\"uniqueItems\":true,\"title\":\"Events\"},\"nullable\":false,\"value\":[\"meeting.transcribed\",\"meeting.summarized\"]}],\"outputs\":[{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"accountId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"meetingId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false}]},\"options\":false,\"eventSource\":\"fireflies\",\"source\":{\"createSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"fireflies\"},\"version\":{\"type\":\"number\",\"const\":1},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"connectionId\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"teamId\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},{\"type\":\"null\"}]},\"signingSecret\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"eventTypes\":{\"minItems\":1,\"maxItems\":2,\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"meeting.transcribed\",\"meeting.summarized\"]}}},\"required\":[\"kind\",\"version\",\"name\",\"connectionId\",\"teamId\",\"signingSecret\",\"eventTypes\"],\"additionalProperties\":false},\"updateSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"number\",\"const\":1},\"expectedRevision\":{\"type\":\"integer\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"enabled\":{\"type\":\"boolean\"},\"eventTypes\":{\"minItems\":1,\"maxItems\":200,\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9_.:]{0,127}$\"}},\"verificationToken\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"signingSecret\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"encryptKey\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256}},\"required\":[\"version\",\"expectedRevision\",\"name\",\"enabled\",\"eventTypes\"],\"additionalProperties\":false},\"kind\":\"fireflies\",\"provider\":\"fireflies\",\"triggerId\":\"fireflies.on_meeting_ready\",\"maximumBodyBytes\":65536,\"applicationIngress\":false,\"managed\":false}},{\"snapshot\":{\"configInputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"*\",\"branch_protection_configuration\",\"branch_protection_rule\",\"check_run\",\"check_suite\",\"code_scanning_alert\",\"commit_comment\",\"create\",\"custom_property_values\",\"delete\",\"dependabot_alert\",\"deploy_key\",\"deployment\",\"deployment_status\",\"discussion\",\"discussion_comment\",\"fork\",\"gollum\",\"issue_comment\",\"issue_dependencies\",\"issues\",\"label\",\"member\",\"meta\",\"milestone\",\"package\",\"page_build\",\"project\",\"project_card\",\"project_column\",\"public\",\"pull_request\",\"pull_request_review\",\"pull_request_review_comment\",\"pull_request_review_thread\",\"push\",\"registry_package\",\"release\",\"repository\",\"repository_advisory\",\"repository_import\",\"repository_ruleset\",\"repository_vulnerability_alert\",\"secret_scanning_alert\",\"secret_scanning_alert_location\",\"secret_scanning_scan\",\"security_and_analysis\",\"star\",\"status\",\"sub_issues\",\"team_add\",\"watch\",\"workflow_job\",\"workflow_run\"]},\"minItems\":1,\"uniqueItems\":true},\"nullable\":false},{\"handle\":\"owner\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^[a-zA-Z0-9](?:[a-zA-Z0-9]|-(?=[a-zA-Z0-9])){0,38}$\"},\"nullable\":false},{\"handle\":\"repo\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^(?!\\\\.{1,2}$)[a-zA-Z0-9._-]{1,100}$\"},\"nullable\":false},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"insecureSsl\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false}],\"definitionVersion\":2,\"description\":\"Triggers when selected GitHub webhook events occur in a repository.\",\"displayName\":\"Repository Event\",\"endpoint\":{\"body\":{\"allowArray\":false,\"allowEmpty\":false,\"formats\":[\"json\"]},\"methods\":[\"POST\"],\"successStatus\":202},\"key\":\"github.on_repo_event\",\"name\":\"on_repo_event\",\"outputs\":[{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false}],\"provider\":\"github\",\"type\":\"integration\"},\"options\":false},{\"snapshot\":{\"configInputs\":[{\"handle\":\"owner\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^[a-zA-Z0-9](?:[a-zA-Z0-9]|-(?=[a-zA-Z0-9])){0,38}$\"},\"nullable\":false},{\"handle\":\"repo\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^(?!\\\\.{1,2}$)[a-zA-Z0-9._-]{1,100}$\"},\"nullable\":false},{\"handle\":\"number\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1},\"nullable\":false,\"description\":\"Number of the pull request to watch.\"}],\"definitionVersion\":2,\"description\":\"Watches one pull request using notifications and periodic checks. Starts from its current state; reports observed changes, not every intermediate transition or review event.\",\"displayName\":\"Watch Pull Request\",\"endpoint\":{\"body\":{\"allowArray\":false,\"allowEmpty\":false,\"formats\":[\"json\"]},\"methods\":[\"POST\"],\"successStatus\":202},\"key\":\"github.watch_pull_request\",\"name\":\"watch_pull_request\",\"provider\":\"github\",\"type\":\"integration\",\"outputs\":[{\"handle\":\"pullRequest\",\"jsonSchema\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"integer\"},\"number\":{\"type\":\"integer\"},\"title\":{\"type\":\"string\"},\"url\":{\"type\":\"string\"},\"state\":{\"type\":\"string\",\"enum\":[\"open\",\"closed\"]},\"draft\":{\"type\":\"boolean\"},\"merged\":{\"type\":\"boolean\"},\"updatedAt\":{\"type\":\"string\"},\"headSha\":{\"type\":\"string\"},\"baseSha\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"id\",\"number\",\"title\",\"url\",\"state\",\"draft\",\"merged\",\"updatedAt\",\"headSha\",\"baseSha\"]},\"nullable\":false},{\"handle\":\"version\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false}]},\"options\":false,\"intervalMs\":300000},{\"snapshot\":{\"configInputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"push\",\"tag_push\",\"issues\",\"confidential_issues\",\"note\",\"confidential_note\",\"merge_requests\",\"job\",\"pipeline\",\"wiki_page\",\"deployment\",\"feature_flag\",\"releases\",\"milestone\",\"emoji\",\"resource_access_token\",\"resource_deploy_token\"]},\"minItems\":1,\"uniqueItems\":true},\"nullable\":false},{\"handle\":\"project\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":255,\"pattern\":\"^(?:[0-9]+|(?!\\\\.{1,2}(?:/|$))[A-Za-z0-9_.][A-Za-z0-9_.-]*(?:/(?!\\\\.{1,2}(?:/|$))[A-Za-z0-9_.][A-Za-z0-9_.-]*)*)$\"},\"nullable\":false},{\"handle\":\"pushBranchFilter\",\"jsonSchema\":{\"type\":\"string\",\"maxLength\":255},\"nullable\":false,\"value\":\"\"},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"insecureSsl\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false}],\"definitionVersion\":2,\"description\":\"Triggers when selected GitLab webhook events occur in a project.\",\"displayName\":\"Project Event\",\"endpoint\":{\"body\":{\"allowArray\":false,\"allowEmpty\":false,\"formats\":[\"json\"]},\"methods\":[\"POST\"],\"successStatus\":202},\"key\":\"gitlab.on_project_event\",\"name\":\"on_project_event\",\"outputs\":[{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"gitlabEvent\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false}],\"provider\":\"gitlab\",\"type\":\"integration\"},\"options\":false},{\"snapshot\":{\"configInputs\":[{\"handle\":\"labelNamesOrIds\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"minLength\":1}},\"nullable\":false,\"description\":\"Only trigger on messages carrying all of these labels, referenced by name or ID.\",\"value\":[]},{\"handle\":\"readStatus\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"Read\",\"Unread\",\"All\"]},\"nullable\":false,\"value\":\"All\"},{\"handle\":\"search\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false,\"description\":\"Gmail search-syntax query the message must match.\",\"value\":\"\"},{\"handle\":\"sender\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false,\"description\":\"Only trigger on messages whose sender matches this address or name.\",\"value\":\"\"},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"includeDrafts\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false,\"description\":\"Also trigger on draft messages.\"},{\"handle\":\"includeSpamAndTrash\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false,\"description\":\"Also trigger on messages in SPAM and TRASH.\"},{\"handle\":\"maxMessagesPerPoll\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":100},\"nullable\":false,\"value\":25}],\"definitionVersion\":2,\"description\":\"Polls the Gmail mailbox and triggers when a new message is received.\",\"displayName\":\"New Message Received\",\"key\":\"gmail.on_message_received\",\"name\":\"on_message_received\",\"outputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"historyId\":{\"type\":[\"string\",\"null\"]},\"labelIds\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"messageId\":{\"type\":\"string\"},\"messageTimestamp\":{\"type\":\"string\"},\"sender\":{\"type\":\"string\"},\"subject\":{\"type\":\"string\"},\"threadId\":{\"type\":\"string\"},\"to\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"messageId\",\"threadId\",\"historyId\",\"labelIds\",\"subject\",\"sender\",\"to\",\"messageTimestamp\"]}},\"nullable\":false}],\"provider\":\"gmail\",\"type\":\"poll\"},\"options\":false},{\"snapshot\":{\"configInputs\":[{\"handle\":\"calendarId\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":1024},\"nullable\":false},{\"handle\":\"changes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"created\",\"updated\",\"cancelled\"]},\"minItems\":1,\"uniqueItems\":true},\"nullable\":false,\"value\":[\"created\",\"updated\",\"cancelled\"]},{\"handle\":\"matchTerm\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false,\"value\":\"\"},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"maxEventsPerPoll\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":500},\"nullable\":false,\"value\":100}],\"definitionVersion\":2,\"description\":\"Polls a Google Calendar and triggers when an event is created, updated or cancelled.\",\"displayName\":\"Event Changed\",\"key\":\"googlecalendar.on_event_changed\",\"name\":\"on_event_changed\",\"outputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"attendeeEmails\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"calendarId\":{\"type\":\"string\"},\"changeType\":{\"type\":\"string\",\"enum\":[\"created\",\"updated\",\"cancelled\"]},\"created\":{\"type\":[\"string\",\"null\"]},\"creatorEmail\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"end\":{\"type\":[\"object\",\"null\"]},\"eventId\":{\"type\":\"string\"},\"eventType\":{\"type\":[\"string\",\"null\"]},\"htmlLink\":{\"type\":[\"string\",\"null\"]},\"isAllDay\":{\"type\":\"boolean\"},\"location\":{\"type\":[\"string\",\"null\"]},\"organizerEmail\":{\"type\":[\"string\",\"null\"]},\"recurringEventId\":{\"type\":[\"string\",\"null\"]},\"start\":{\"type\":[\"object\",\"null\"]},\"status\":{\"type\":\"string\"},\"summary\":{\"type\":[\"string\",\"null\"]},\"updated\":{\"type\":[\"string\",\"null\"]}},\"additionalProperties\":false,\"required\":[\"changeType\",\"calendarId\",\"eventId\",\"status\",\"summary\",\"description\",\"location\",\"htmlLink\",\"start\",\"end\",\"isAllDay\",\"organizerEmail\",\"creatorEmail\",\"attendeeEmails\",\"recurringEventId\",\"eventType\",\"created\",\"updated\"]}},\"nullable\":false}],\"provider\":\"googlecalendar\",\"type\":\"poll\"},\"options\":false},{\"snapshot\":{\"configInputs\":[{\"handle\":\"driveId\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"nullable\":true,\"description\":\"Optional shared drive ID. Omit it to monitor the connected account.\"},{\"handle\":\"includeRemoved\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":true,\"description\":\"Include changes caused by deletion or loss of access.\"},{\"handle\":\"restrictToMyDrive\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false,\"description\":\"Restrict changes to the My Drive hierarchy.\"},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"includeCorpusRemovals\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false,\"description\":\"Include the accessible file resource when an item leaves the change corpus.\"},{\"handle\":\"includeItemsFromAllDrives\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":true,\"description\":\"Include items from My Drive and shared drives.\"},{\"handle\":\"pageSize\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":100},\"nullable\":false,\"value\":100,\"description\":\"Maximum changes included in one Flow Run.\"}],\"definitionVersion\":2,\"description\":\"Uses a Google Drive changes.watch channel and triggers when Drive changes are available.\",\"displayName\":\"Changes Detected\",\"endpoint\":{\"body\":{\"allowArray\":false,\"allowEmpty\":true,\"formats\":[\"json\"]},\"methods\":[\"POST\"],\"successStatus\":204},\"key\":\"googledrive.changes_detected\",\"name\":\"changes_detected\",\"outputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"changeId\":{\"type\":\"string\"},\"changeType\":{\"type\":[\"string\",\"null\"]},\"driveId\":{\"type\":[\"string\",\"null\"]},\"file\":{\"type\":[\"object\",\"null\"]},\"fileId\":{\"type\":[\"string\",\"null\"]},\"notification\":{\"type\":\"object\",\"properties\":{\"changedTypes\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"messageNumber\":{\"type\":[\"string\",\"null\"]},\"resourceState\":{\"type\":\"string\"},\"resourceUri\":{\"type\":[\"string\",\"null\"]}},\"additionalProperties\":false,\"required\":[\"resourceState\",\"changedTypes\",\"messageNumber\",\"resourceUri\"]},\"removed\":{\"type\":\"boolean\"},\"time\":{\"type\":[\"string\",\"null\"]}},\"additionalProperties\":false,\"required\":[\"changeId\",\"changeType\",\"removed\",\"time\",\"fileId\",\"driveId\",\"file\",\"notification\"]}},\"nullable\":false}],\"provider\":\"googledrive\",\"type\":\"integration\"},\"options\":false},{\"snapshot\":{\"configInputs\":[{\"handle\":\"changeType\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"created\",\"updated\"]},\"nullable\":false},{\"handle\":\"driveId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^[A-Za-z0-9_-]{0,512}$\"},\"nullable\":false,\"value\":\"\"},{\"handle\":\"folderId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^[A-Za-z0-9_-]{2,512}$\"},\"nullable\":false},{\"handle\":\"itemTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"file\",\"folder\"]},\"minItems\":1,\"uniqueItems\":true},\"nullable\":false,\"value\":[\"file\"]},{\"handle\":\"mimeTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"minLength\":1}},\"nullable\":false,\"value\":[]},{\"handle\":\"namePrefix\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false,\"value\":\"\"},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"maxFilesPerPoll\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":200},\"nullable\":false,\"value\":50}],\"definitionVersion\":2,\"description\":\"Polls one Google Drive folder and triggers when a file or folder directly inside it is created or updated.\",\"displayName\":\"File or Folder Change in a Folder\",\"key\":\"googledrive.on_file_change\",\"name\":\"on_file_change\",\"outputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"createdTime\":{\"type\":[\"string\",\"null\"]},\"driveId\":{\"type\":[\"string\",\"null\"]},\"eventType\":{\"type\":\"string\",\"enum\":[\"file_created\",\"file_updated\",\"folder_created\",\"folder_updated\"]},\"fileId\":{\"type\":\"string\"},\"itemType\":{\"type\":\"string\",\"enum\":[\"file\",\"folder\"]},\"lastModifyingUser\":{\"type\":[\"object\",\"null\"]},\"mimeType\":{\"type\":\"string\"},\"modifiedTime\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":\"string\"},\"parents\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"size\":{\"type\":\"string\"},\"webViewLink\":{\"type\":[\"string\",\"null\"]}},\"additionalProperties\":false,\"required\":[\"eventType\",\"itemType\",\"fileId\",\"name\",\"mimeType\",\"createdTime\",\"modifiedTime\",\"parents\",\"webViewLink\",\"driveId\",\"lastModifyingUser\"]}},\"nullable\":false}],\"provider\":\"googledrive\",\"type\":\"poll\"},\"options\":false},{\"snapshot\":{\"configInputs\":[{\"handle\":\"driveId\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"nullable\":true,\"description\":\"Optional shared drive ID. Omit it to monitor the connected account.\"},{\"handle\":\"includeRemoved\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":true,\"description\":\"Include changes caused by deletion or loss of access.\"},{\"handle\":\"restrictToMyDrive\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false,\"description\":\"Restrict changes to the My Drive hierarchy.\"},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"includeCorpusRemovals\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false,\"description\":\"Include the accessible file resource when an item leaves the change corpus.\"},{\"handle\":\"includeItemsFromAllDrives\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":true,\"description\":\"Include items from My Drive and shared drives.\"},{\"handle\":\"pageSize\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":100},\"nullable\":false,\"value\":100,\"description\":\"Maximum changes included in one Flow Run.\"}],\"definitionVersion\":2,\"description\":\"Monitors Drive changes using notifications and periodic scans of the same change stream.\",\"displayName\":\"Watch Changes\",\"endpoint\":{\"body\":{\"allowArray\":false,\"allowEmpty\":true,\"formats\":[\"json\"]},\"methods\":[\"POST\"],\"successStatus\":204},\"key\":\"googledrive.watch_changes\",\"name\":\"watch_changes\",\"outputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\"}},\"nullable\":false}],\"provider\":\"googledrive\",\"type\":\"integration\"},\"options\":false,\"intervalMs\":300000},{\"snapshot\":{\"configInputs\":[{\"handle\":\"columnRange\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^[A-Za-z]{1,3}(?::[A-Za-z]{1,3})?$\"},\"nullable\":false,\"value\":\"A:ZZZ\"},{\"handle\":\"sheet\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1},\"nullable\":false},{\"handle\":\"spreadsheetId\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1},\"nullable\":false},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"dateTimeRender\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"FORMATTED_STRING\",\"SERIAL_NUMBER\"]},\"nullable\":false,\"value\":\"FORMATTED_STRING\"},{\"handle\":\"firstDataRow\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1},\"nullable\":false,\"value\":2},{\"handle\":\"headerRow\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1},\"nullable\":false,\"value\":1},{\"handle\":\"maxRowsPerPoll\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":500},\"nullable\":false,\"value\":100},{\"handle\":\"valueRender\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"UNFORMATTED_VALUE\",\"FORMATTED_VALUE\",\"FORMULA\"]},\"nullable\":false,\"value\":\"UNFORMATTED_VALUE\"}],\"definitionVersion\":2,\"description\":\"Polls a sheet and triggers once for every new row appended below the last row already seen.\",\"displayName\":\"New Row Added\",\"key\":\"googlesheets.on_row_added\",\"name\":\"on_row_added\",\"outputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"row\":{\"type\":\"object\"},\"rowNumber\":{\"type\":\"integer\"},\"sheetId\":{\"type\":\"integer\"},\"sheetTitle\":{\"type\":\"string\"},\"spreadsheetId\":{\"type\":\"string\"},\"values\":{\"type\":\"array\",\"items\":{}}},\"additionalProperties\":false,\"required\":[\"spreadsheetId\",\"sheetId\",\"sheetTitle\",\"rowNumber\",\"row\",\"values\"]}},\"nullable\":false}],\"provider\":\"googlesheets\",\"type\":\"poll\"},\"options\":false},{\"snapshot\":{\"key\":\"intercom.on_conversation_event\",\"provider\":\"intercom\",\"name\":\"on_conversation_event\",\"displayName\":\"Customer Conversation or Ticket\",\"description\":\"Receives customer conversations, customer replies and new tickets from a verified Intercom application event source. Administrator replies are excluded.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"sourceId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^source_[0-9a-f]{32}$\",\"title\":\"Event source\"},\"nullable\":false},{\"handle\":\"eventTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"conversation.user.created\",\"conversation.user.replied\",\"ticket.created\"]},\"minItems\":1,\"maxItems\":3,\"uniqueItems\":true,\"title\":\"Events\"},\"nullable\":false,\"value\":[\"conversation.user.created\",\"conversation.user.replied\",\"ticket.created\"]}],\"outputs\":[{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"workspaceId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"objectId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":true},\"nullable\":false}]},\"options\":false,\"eventSource\":\"intercom\",\"source\":{\"createSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"intercom\"},\"version\":{\"type\":\"number\",\"const\":1},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"connectionId\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"teamId\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},{\"type\":\"null\"}]},\"appId\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"signingSecret\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"eventTypes\":{\"minItems\":1,\"maxItems\":3,\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"conversation.user.created\",\"conversation.user.replied\",\"ticket.created\"]}}},\"required\":[\"kind\",\"version\",\"name\",\"connectionId\",\"teamId\",\"appId\",\"signingSecret\",\"eventTypes\"],\"additionalProperties\":false},\"updateSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"number\",\"const\":1},\"expectedRevision\":{\"type\":\"integer\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"enabled\":{\"type\":\"boolean\"},\"eventTypes\":{\"minItems\":1,\"maxItems\":200,\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9_.:]{0,127}$\"}},\"verificationToken\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"signingSecret\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"encryptKey\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256}},\"required\":[\"version\",\"expectedRevision\",\"name\",\"enabled\",\"eventTypes\"],\"additionalProperties\":false},\"kind\":\"intercom\",\"provider\":\"intercom\",\"triggerId\":\"intercom.on_conversation_event\",\"maximumBodyBytes\":65536,\"applicationIngress\":true,\"managed\":false}},{\"snapshot\":{\"key\":\"jira.on_issue_event\",\"provider\":\"jira\",\"name\":\"on_issue_event\",\"displayName\":\"Issue or Comment Event\",\"description\":\"Receives Jira Cloud issue creation, issue updates and new comments through a shared project webhook with automatic renewal.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"sourceId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^source_[0-9a-f]{32}$\",\"title\":\"Event source\"},\"nullable\":false},{\"handle\":\"eventTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"jira:issue_created\",\"jira:issue_updated\",\"comment_created\"]},\"minItems\":1,\"maxItems\":3,\"uniqueItems\":true,\"title\":\"Events\"},\"nullable\":false,\"value\":[\"jira:issue_created\",\"jira:issue_updated\",\"comment_created\"]}],\"outputs\":[{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"cloudId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"issueId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false}]},\"options\":false,\"eventSource\":\"jira\",\"source\":{\"createSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"jira\"},\"version\":{\"type\":\"number\",\"const\":1},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"connectionId\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"teamId\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},{\"type\":\"null\"}]},\"project\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"eventTypes\":{\"minItems\":1,\"maxItems\":3,\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"jira:issue_created\",\"jira:issue_updated\",\"comment_created\"]}}},\"required\":[\"kind\",\"version\",\"name\",\"connectionId\",\"teamId\",\"project\",\"eventTypes\"],\"additionalProperties\":false},\"updateSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"number\",\"const\":1},\"expectedRevision\":{\"type\":\"integer\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"enabled\":{\"type\":\"boolean\"},\"eventTypes\":{\"minItems\":1,\"maxItems\":200,\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9_.:]{0,127}$\"}},\"verificationToken\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"signingSecret\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"encryptKey\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256}},\"required\":[\"version\",\"expectedRevision\",\"name\",\"enabled\",\"eventTypes\"],\"additionalProperties\":false},\"kind\":\"jira\",\"provider\":\"jira\",\"triggerId\":\"jira.on_issue_event\",\"maximumBodyBytes\":65536,\"applicationIngress\":false,\"managed\":true}},{\"snapshot\":{\"configInputs\":[{\"handle\":\"teamId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\",\"title\":\"Team ID\"},\"nullable\":false,\"description\":\"Linear Team UUID. Use Copy model UUID in Linear to find it.\"},{\"handle\":\"stateIds\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\"},\"maxItems\":50,\"uniqueItems\":true,\"title\":\"Issue statuses\"},\"nullable\":false,\"value\":[],\"description\":\"Choose statuses from the selected Team. Empty means all statuses. Matches the current status, not every transition into it.\"}],\"definitionVersion\":2,\"description\":\"Watches new and updated issues in a Linear team with periodic checks. Starts from now without running existing issues. Reports observed current states, not deletions or every intermediate status change.\",\"displayName\":\"Issue Created or Updated\",\"key\":\"linear.on_issue_changed\",\"name\":\"on_issue_changed\",\"outputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"},\"identifier\":{\"type\":\"string\"},\"title\":{\"type\":\"string\"},\"url\":{\"type\":\"string\"},\"teamId\":{\"type\":\"string\"},\"createdAt\":{\"type\":\"string\"},\"updatedAt\":{\"type\":\"string\"},\"state\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"},\"type\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"id\",\"name\",\"type\"]}},\"additionalProperties\":false,\"required\":[\"id\",\"identifier\",\"title\",\"url\",\"teamId\",\"createdAt\",\"updatedAt\",\"state\"]}},\"nullable\":false}],\"provider\":\"linear\",\"type\":\"poll\"},\"options\":true},{\"snapshot\":{\"configInputs\":[{\"handle\":\"dataSourceId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^(?:|[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})$\"},\"nullable\":false,\"value\":\"\"},{\"handle\":\"databaseId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$\"},\"nullable\":false},{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"page_added\",\"page_updated\"]},\"minItems\":1,\"uniqueItems\":true},\"nullable\":false,\"value\":[\"page_added\"]},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"includeProperties\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":true},{\"handle\":\"maxItemsPerPoll\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":100},\"nullable\":false,\"value\":25}],\"definitionVersion\":2,\"description\":\"Polls a Notion database and triggers when a page is added to it or an existing page is edited.\",\"displayName\":\"Database Page Added or Updated\",\"key\":\"notion.on_database_page_event\",\"name\":\"on_database_page_event\",\"outputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"createdBy\":{\"type\":\"object\"},\"createdTime\":{\"type\":\"string\"},\"dataSourceId\":{\"type\":\"string\"},\"databaseId\":{\"type\":\"string\"},\"event\":{\"type\":\"string\",\"enum\":[\"page_added\",\"page_updated\"]},\"lastEditedBy\":{\"type\":\"object\"},\"lastEditedTime\":{\"type\":\"string\"},\"pageId\":{\"type\":\"string\"},\"properties\":{\"type\":\"object\"},\"title\":{\"type\":\"string\"},\"url\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"event\",\"pageId\",\"databaseId\",\"dataSourceId\",\"url\",\"title\",\"createdTime\",\"lastEditedTime\",\"createdBy\",\"lastEditedBy\"]}},\"nullable\":false}],\"provider\":\"notion\",\"type\":\"poll\"},\"options\":false},{\"snapshot\":{\"configInputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"created\",\"updated\",\"deleted\"]},\"minItems\":1,\"uniqueItems\":true},\"nullable\":false,\"value\":[\"created\",\"updated\"]},{\"handle\":\"itemId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false,\"value\":\"\"},{\"handle\":\"itemTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"file\",\"folder\"]},\"minItems\":1,\"uniqueItems\":true},\"nullable\":false,\"value\":[\"file\"]},{\"handle\":\"parentFolderId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false,\"value\":\"\"},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"maxItemsPerPoll\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":200},\"nullable\":false,\"value\":50}],\"definitionVersion\":2,\"description\":\"Polls the OneDrive change feed and triggers when a file or folder is created, updated or deleted.\",\"displayName\":\"File or Folder Changed\",\"key\":\"one_drive.on_item_changed\",\"name\":\"on_item_changed\",\"outputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"changeType\":{\"type\":\"string\",\"enum\":[\"created\",\"updated\",\"deleted\"]},\"createdDateTime\":{\"type\":[\"string\",\"null\"]},\"driveId\":{\"type\":[\"string\",\"null\"]},\"eTag\":{\"type\":[\"string\",\"null\"]},\"itemId\":{\"type\":\"string\"},\"itemType\":{\"type\":\"string\",\"enum\":[\"file\",\"folder\"]},\"lastModifiedDateTime\":{\"type\":[\"string\",\"null\"]},\"mimeType\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":\"string\"},\"parentFolderId\":{\"type\":[\"string\",\"null\"]},\"size\":{\"type\":[\"number\",\"null\"]},\"webUrl\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"itemId\",\"name\",\"changeType\",\"itemType\",\"size\",\"mimeType\",\"webUrl\",\"parentFolderId\",\"driveId\",\"createdDateTime\",\"lastModifiedDateTime\",\"eTag\"]}},\"nullable\":false}],\"provider\":\"one_drive\",\"type\":\"poll\"},\"options\":false},{\"snapshot\":{\"configInputs\":[{\"handle\":\"folder\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^[A-Za-z0-9_=-]*$\"},\"nullable\":false,\"value\":\"inbox\",\"description\":\"A well-known mail folder name, folder ID, or an empty string for the whole mailbox.\"},{\"handle\":\"readStatus\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"All\",\"Read\",\"Unread\"]},\"nullable\":false,\"value\":\"All\"},{\"handle\":\"senderAddress\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false,\"value\":\"\",\"description\":\"Exact sender address, or empty for any sender.\"},{\"handle\":\"subjectContains\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false,\"value\":\"\",\"description\":\"Case-insensitive subject text.\"},{\"handle\":\"withAttachmentsOnly\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"includeDrafts\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false},{\"handle\":\"maxMessagesPerPoll\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":100},\"nullable\":false,\"value\":25}],\"definitionVersion\":2,\"description\":\"Polls a Microsoft Outlook mail folder and triggers when a new message arrives.\",\"displayName\":\"New Message Received\",\"key\":\"outlook.on_message_received\",\"name\":\"on_message_received\",\"outputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"bodyPreview\":{\"type\":\"string\"},\"categories\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"conversationId\":{\"type\":\"string\"},\"from\":{\"type\":\"string\"},\"fromName\":{\"type\":\"string\"},\"hasAttachments\":{\"type\":\"boolean\"},\"importance\":{\"type\":\"string\"},\"internetMessageId\":{\"type\":\"string\"},\"isDraft\":{\"type\":\"boolean\"},\"isRead\":{\"type\":\"boolean\"},\"messageId\":{\"type\":\"string\"},\"parentFolderId\":{\"type\":\"string\"},\"receivedDateTime\":{\"type\":\"string\"},\"subject\":{\"type\":\"string\"},\"to\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"webLink\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"messageId\",\"internetMessageId\",\"conversationId\",\"subject\",\"bodyPreview\",\"from\",\"fromName\",\"to\",\"receivedDateTime\",\"hasAttachments\",\"isRead\",\"isDraft\",\"importance\",\"categories\",\"parentFolderId\",\"webLink\"]}},\"nullable\":false}],\"provider\":\"outlook\",\"type\":\"poll\"},\"options\":false},{\"snapshot\":{\"key\":\"pandadoc.on_document_event\",\"provider\":\"pandadoc\",\"name\":\"on_document_event\",\"displayName\":\"Document Status Changed\",\"description\":\"Receives document status changes in the connected workspace, optionally only when the entire document is completed.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":true,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"completedOnly\",\"jsonSchema\":{\"type\":\"boolean\",\"title\":\"Completed documents only\"},\"nullable\":false,\"value\":true}],\"outputs\":[{\"handle\":\"events\",\"nullable\":false,\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"event\":{\"type\":\"string\"},\"data\":{\"type\":\"object\"}},\"required\":[\"event\",\"data\"]}}}]},\"options\":false},{\"snapshot\":{\"key\":\"pipedrive.on_crm_event\",\"provider\":\"pipedrive\",\"name\":\"on_crm_event\",\"displayName\":\"Deal or Contact Event\",\"description\":\"Receives new deals or contacts, or actual changes to a deal stage or status using Pipedrive Webhooks v2.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"eventType\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"deal.created\",\"deal.stage_changed\",\"deal.status_changed\",\"person.created\"],\"title\":\"Event\"},\"nullable\":false,\"value\":\"deal.created\"}],\"outputs\":[{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"deal.created\",\"deal.stage_changed\",\"deal.status_changed\",\"person.created\"]},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"objectId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false}]},\"options\":false},{\"snapshot\":{\"key\":\"resend.on_email_event\",\"provider\":\"resend\",\"name\":\"on_email_event\",\"displayName\":\"Email Received, Bounced or Complained\",\"description\":\"Receives inbound email, bounce, and complaint notifications. Read message bodies and attachments with Actions.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"eventTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"email.received\",\"email.bounced\",\"email.complained\"]},\"minItems\":1,\"uniqueItems\":true,\"title\":\"Events\"},\"nullable\":false,\"value\":[\"email.received\",\"email.bounced\",\"email.complained\"]}],\"outputs\":[{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"email.received\",\"email.bounced\",\"email.complained\"]},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"emailId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"createdAt\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false}]},\"options\":false},{\"snapshot\":{\"key\":\"sentry.on_issue_alert\",\"provider\":\"sentry\",\"name\":\"on_issue_alert\",\"displayName\":\"Issue Alert\",\"description\":\"Receives Issue Alert Rule notifications from a verified Sentry Custom Integration installation.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"projectIds\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[0-9]+$\"},\"uniqueItems\":true,\"title\":\"Project IDs\"},\"nullable\":true},{\"handle\":\"ruleNames\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"minLength\":1},\"uniqueItems\":true,\"title\":\"Alert rule names\"},\"nullable\":true},{\"handle\":\"sourceId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^source_[0-9a-f]{32}$\",\"title\":\"Event source\"},\"nullable\":false},{\"handle\":\"eventTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"issue.alert\"]},\"minItems\":1,\"maxItems\":1,\"uniqueItems\":true,\"title\":\"Events\"},\"nullable\":false,\"value\":[\"issue.alert\"]}],\"outputs\":[{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"organizationId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"issueId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false}]},\"options\":false,\"eventSource\":\"sentry\",\"source\":{\"createSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"sentry\"},\"version\":{\"type\":\"number\",\"const\":1},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"connectionId\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"teamId\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},{\"type\":\"null\"}]},\"appId\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"installationId\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"organizationId\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"signingSecret\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"eventTypes\":{\"minItems\":1,\"maxItems\":1,\"type\":\"array\",\"items\":{\"type\":\"string\",\"const\":\"issue.alert\"}}},\"required\":[\"kind\",\"version\",\"name\",\"connectionId\",\"teamId\",\"appId\",\"installationId\",\"organizationId\",\"signingSecret\",\"eventTypes\"],\"additionalProperties\":false},\"updateSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"number\",\"const\":1},\"expectedRevision\":{\"type\":\"integer\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"enabled\":{\"type\":\"boolean\"},\"eventTypes\":{\"minItems\":1,\"maxItems\":200,\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9_.:]{0,127}$\"}},\"verificationToken\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"signingSecret\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"encryptKey\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256}},\"required\":[\"version\",\"expectedRevision\",\"name\",\"enabled\",\"eventTypes\"],\"additionalProperties\":false},\"kind\":\"sentry\",\"provider\":\"sentry\",\"triggerId\":\"sentry.on_issue_alert\",\"maximumBodyBytes\":65536,\"applicationIngress\":true,\"managed\":false}},{\"snapshot\":{\"configInputs\":[{\"handle\":\"topics\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"app/scopes_update\",\"app/uninstalled\",\"app_purchases_one_time/update\",\"app_subscriptions/approaching_capped_amount\",\"app_subscriptions/update\",\"bulk_operations/finish\",\"carts/create\",\"carts/update\",\"channels/delete\",\"checkout_and_accounts_configurations/update\",\"checkouts/create\",\"checkouts/delete\",\"checkouts/update\",\"collection_listings/add\",\"collection_listings/remove\",\"collection_listings/update\",\"collection_publications/create\",\"collection_publications/delete\",\"collection_publications/update\",\"collections/create\",\"collections/delete\",\"collections/update\",\"companies/create\",\"companies/delete\",\"companies/update\",\"company_contact_roles/assign\",\"company_contact_roles/revoke\",\"company_contacts/create\",\"company_contacts/delete\",\"company_contacts/update\",\"company_locations/create\",\"company_locations/delete\",\"company_locations/update\",\"customer.joined_segment\",\"customer.left_segment\",\"customer.tags_added\",\"customer.tags_removed\",\"customer_account_settings/update\",\"customer_groups/create\",\"customer_groups/delete\",\"customer_groups/update\",\"customers/create\",\"customers/delete\",\"customers/disable\",\"customers/enable\",\"customers/purchasing_summary\",\"customers/update\",\"customers_email_marketing_consent/update\",\"customers_marketing_consent/update\",\"delivery_promise_settings/update\",\"disputes/create\",\"disputes/update\",\"domains/create\",\"domains/destroy\",\"domains/update\",\"draft_orders/create\",\"draft_orders/delete\",\"draft_orders/update\",\"fulfillment_events/create\",\"fulfillment_events/delete\",\"fulfillment_holds/added\",\"fulfillment_holds/released\",\"fulfillment_orders/cancellation_request_accepted\",\"fulfillment_orders/cancellation_request_rejected\",\"fulfillment_orders/cancellation_request_submitted\",\"fulfillment_orders/cancelled\",\"fulfillment_orders/fulfillment_request_accepted\",\"fulfillment_orders/fulfillment_request_rejected\",\"fulfillment_orders/fulfillment_request_submitted\",\"fulfillment_orders/fulfillment_service_failed_to_complete\",\"fulfillment_orders/hold_released\",\"fulfillment_orders/line_items_prepared_for_local_delivery\",\"fulfillment_orders/line_items_prepared_for_pickup\",\"fulfillment_orders/manually_reported_progress_stopped\",\"fulfillment_orders/merged\",\"fulfillment_orders/moved\",\"fulfillment_orders/order_routing_complete\",\"fulfillment_orders/placed_on_hold\",\"fulfillment_orders/progress_reported\",\"fulfillment_orders/rescheduled\",\"fulfillment_orders/scheduled_fulfillment_order_ready\",\"fulfillment_orders/split\",\"fulfillments/create\",\"fulfillments/update\",\"inventory_items/create\",\"inventory_items/delete\",\"inventory_items/update\",\"inventory_levels/connect\",\"inventory_levels/disconnect\",\"inventory_levels/update\",\"locales/create\",\"locales/destroy\",\"locales/update\",\"locations/activate\",\"locations/create\",\"locations/deactivate\",\"locations/delete\",\"locations/update\",\"machine_translation_batch/completed\",\"metafield_definitions/create\",\"metafield_definitions/delete\",\"metafield_definitions/update\",\"order_transactions/create\",\"orders/cancelled\",\"orders/create\",\"orders/delete\",\"orders/edited\",\"orders/fulfilled\",\"orders/link_requested\",\"orders/paid\",\"orders/partially_fulfilled\",\"orders/risk_assessment_changed\",\"orders/shopify_protect_eligibility_changed\",\"orders/updated\",\"payment_schedules/due\",\"payment_terms/create\",\"payment_terms/delete\",\"payment_terms/update\",\"product_feeds/create\",\"product_feeds/full_sync\",\"product_feeds/full_sync_finish\",\"product_feeds/incremental_sync\",\"product_feeds/update\",\"product_listings/add\",\"product_listings/remove\",\"product_listings/update\",\"product_publications/create\",\"product_publications/delete\",\"product_publications/update\",\"products/create\",\"products/delete\",\"products/update\",\"profiles/create\",\"profiles/delete\",\"profiles/update\",\"publications/delete\",\"refunds/create\",\"returns/approve\",\"returns/cancel\",\"returns/close\",\"returns/decline\",\"returns/process\",\"returns/reopen\",\"returns/request\",\"returns/update\",\"reverse_deliveries/attach_deliverable\",\"reverse_fulfillment_orders/dispose\",\"scheduled_product_listings/add\",\"scheduled_product_listings/remove\",\"scheduled_product_listings/update\",\"segments/create\",\"segments/delete\",\"segments/update\",\"selling_plan_groups/create\",\"selling_plan_groups/delete\",\"selling_plan_groups/update\",\"shop/update\",\"subscription_billing_attempts/challenged\",\"subscription_billing_attempts/failure\",\"subscription_billing_attempts/success\",\"subscription_billing_cycle_edits/create\",\"subscription_billing_cycle_edits/delete\",\"subscription_billing_cycle_edits/update\",\"subscription_billing_cycles/skip\",\"subscription_billing_cycles/unskip\",\"subscription_contracts/activate\",\"subscription_contracts/cancel\",\"subscription_contracts/create\",\"subscription_contracts/expire\",\"subscription_contracts/fail\",\"subscription_contracts/pause\",\"subscription_contracts/update\",\"tax_partners/update\",\"tax_summaries/create\",\"tender_transactions/create\",\"themes/create\",\"themes/delete\",\"themes/publish\",\"themes/update\",\"variants/in_stock\",\"variants/out_of_stock\"]},\"minItems\":1,\"maxItems\":20,\"uniqueItems\":true},\"nullable\":false}],\"definitionVersion\":2,\"description\":\"Triggers when selected Shopify webhook topics occur in the connected store.\",\"displayName\":\"Store Event\",\"endpoint\":{\"body\":{\"allowArray\":false,\"allowEmpty\":false,\"formats\":[\"json\"]},\"methods\":[\"POST\"],\"successStatus\":202},\"key\":\"shopify.on_shop_event\",\"name\":\"on_shop_event\",\"outputs\":[{\"handle\":\"apiVersion\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false},{\"handle\":\"eventId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"shopDomain\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"topic\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"triggeredAt\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"webhookId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false}],\"provider\":\"shopify\",\"type\":\"integration\"},\"options\":false},{\"snapshot\":{\"configInputs\":[{\"handle\":\"channelId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^[CDG][A-Z0-9]{2,31}$\"},\"nullable\":false,\"description\":\"Slack conversation ID to watch, e.g. C0122KQ70S7E.\"},{\"handle\":\"fromUserIds\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[UW][A-Z0-9]{2,31}$\"}},\"nullable\":false,\"value\":[],\"description\":\"Only trigger on messages written by these Slack user IDs. Empty means any author.\"},{\"handle\":\"ignoreUserIds\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[UW][A-Z0-9]{2,31}$\"}},\"nullable\":false,\"value\":[],\"description\":\"Never trigger on messages written by these Slack user IDs.\"},{\"handle\":\"textContains\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false,\"value\":\"\",\"description\":\"Only trigger when message text contains this string, case-insensitively.\"},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"includeBotMessages\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false,\"description\":\"Also trigger on messages posted by bots and apps.\"},{\"handle\":\"includeSystemMessages\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false,\"description\":\"Also trigger on Slack system notices.\"},{\"handle\":\"maxMessagesPerPoll\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":100},\"nullable\":false,\"value\":15,\"description\":\"Maximum number of messages processed per poll.\"}],\"definitionVersion\":2,\"description\":\"Polls one Slack conversation and triggers when a new message is posted to it.\",\"displayName\":\"New Channel Message\",\"key\":\"slack.on_message_posted\",\"name\":\"on_message_posted\",\"outputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"botId\":{\"type\":[\"string\",\"null\"]},\"channelId\":{\"type\":\"string\"},\"files\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"},\"mimetype\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"id\",\"name\",\"mimetype\"]}},\"messageTs\":{\"type\":\"string\"},\"subtype\":{\"type\":[\"string\",\"null\"]},\"text\":{\"type\":\"string\"},\"threadTs\":{\"type\":[\"string\",\"null\"]},\"userId\":{\"type\":[\"string\",\"null\"]}},\"additionalProperties\":false,\"required\":[\"channelId\",\"messageTs\",\"threadTs\",\"userId\",\"botId\",\"subtype\",\"text\",\"files\"]}},\"nullable\":false}],\"provider\":\"slack\",\"type\":\"poll\"},\"options\":false},{\"snapshot\":{\"key\":\"slackbot.on_event\",\"provider\":\"slackbot\",\"name\":\"on_event\",\"displayName\":\"Mention or Direct Message\",\"description\":\"Receives user mentions and new direct messages through a shared Slack application event source. Slack Connect events are excluded.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"sourceId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^source_[0-9a-f]{32}$\",\"title\":\"Event source\"},\"nullable\":false},{\"handle\":\"eventTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"app_mention\",\"message.im\"]},\"minItems\":1,\"maxItems\":2,\"uniqueItems\":true,\"title\":\"Events\"},\"nullable\":false,\"value\":[\"app_mention\",\"message.im\"]},{\"handle\":\"channelIds\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"minLength\":1},\"maxItems\":100,\"uniqueItems\":true,\"title\":\"Channel IDs\"},\"nullable\":true}],\"outputs\":[{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"appId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"teamId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"channel\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"user\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"text\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"ts\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"threadTs\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":true},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false}]},\"options\":false,\"eventSource\":\"slack\",\"source\":{\"createSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"slack\"},\"version\":{\"type\":\"number\",\"const\":1},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"connectionId\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"teamId\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},{\"type\":\"null\"}]},\"appId\":{\"type\":\"string\",\"pattern\":\"^A[A-Z0-9]+$\"},\"workspaceId\":{\"type\":\"string\",\"pattern\":\"^T[A-Z0-9]+$\"},\"signingSecret\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"eventTypes\":{\"minItems\":1,\"maxItems\":2,\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"app_mention\",\"message.im\"]}}},\"required\":[\"kind\",\"version\",\"name\",\"connectionId\",\"teamId\",\"appId\",\"workspaceId\",\"signingSecret\",\"eventTypes\"],\"additionalProperties\":false},\"updateSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"number\",\"const\":1},\"expectedRevision\":{\"type\":\"integer\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"enabled\":{\"type\":\"boolean\"},\"eventTypes\":{\"minItems\":1,\"maxItems\":200,\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9_.:]{0,127}$\"}},\"verificationToken\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"signingSecret\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"encryptKey\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256}},\"required\":[\"version\",\"expectedRevision\",\"name\",\"enabled\",\"eventTypes\"],\"additionalProperties\":false},\"kind\":\"slack\",\"provider\":\"slackbot\",\"triggerId\":\"slackbot.on_event\",\"maximumBodyBytes\":65536,\"applicationIngress\":true,\"managed\":false}},{\"snapshot\":{\"configInputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"maxLength\":120,\"pattern\":\"^(\\\\*|[a-z0-9_]+(?:\\\\.[a-z0-9_]+)+)$\"},\"minItems\":1,\"uniqueItems\":true},\"nullable\":false},{\"handle\":\"includeConnectedAccounts\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"apiVersion\",\"jsonSchema\":{\"type\":\"string\",\"maxLength\":40},\"nullable\":false,\"value\":\"\"}],\"definitionVersion\":2,\"description\":\"Triggers when selected Stripe events happen on the connected account.\",\"displayName\":\"Account Event\",\"endpoint\":{\"body\":{\"allowArray\":false,\"allowEmpty\":false,\"formats\":[\"json\"]},\"methods\":[\"POST\"],\"successStatus\":202},\"key\":\"stripe.on_event\",\"name\":\"on_event\",\"outputs\":[{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false},{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"eventId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"livemode\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false}],\"provider\":\"stripe\",\"type\":\"integration\"},\"options\":false},{\"snapshot\":{\"configInputs\":[{\"handle\":\"formId\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128,\"title\":\"Form\"},\"nullable\":false,\"description\":\"Choose a form accessible to this Connection.\"}],\"definitionVersion\":2,\"description\":\"Receives new Tally form submissions through a signed, automatically managed webhook.\",\"displayName\":\"Form Response\",\"endpoint\":{\"body\":{\"allowArray\":false,\"allowEmpty\":false,\"formats\":[\"json\"]},\"methods\":[\"POST\"],\"successStatus\":200},\"key\":\"tally.on_form_response\",\"name\":\"on_form_response\",\"outputs\":[{\"handle\":\"response\",\"nullable\":false,\"jsonSchema\":{\"type\":\"object\",\"properties\":{\"eventId\":{\"type\":\"string\"},\"createdAt\":{\"type\":\"string\"},\"formId\":{\"type\":\"string\"},\"submissionId\":{\"type\":\"string\"},\"responseId\":{\"type\":\"string\"},\"fields\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"key\":{\"type\":\"string\"},\"type\":{\"type\":\"string\"},\"label\":{\"type\":[\"string\",\"null\"]},\"value\":{},\"options\":{\"type\":\"array\",\"items\":{\"type\":\"object\"}}},\"required\":[\"key\",\"type\",\"label\",\"value\"]}}},\"required\":[\"eventId\",\"createdAt\",\"formId\",\"submissionId\",\"responseId\",\"fields\"]}}],\"provider\":\"tally\",\"type\":\"integration\"},\"options\":true},{\"snapshot\":{\"configInputs\":[{\"handle\":\"chatIds\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^-?[0-9]{1,20}$\"},\"maxItems\":100,\"uniqueItems\":true},\"nullable\":false,\"value\":[],\"description\":\"Only accept updates from these numeric Telegram chat IDs. Empty means every chat.\"},{\"handle\":\"updates\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"enum\":[\"*\",\"message\",\"edited_message\",\"channel_post\",\"edited_channel_post\",\"business_connection\",\"business_message\",\"edited_business_message\",\"deleted_business_messages\",\"guest_message\",\"message_reaction\",\"message_reaction_count\",\"inline_query\",\"chosen_inline_result\",\"callback_query\",\"shipping_query\",\"pre_checkout_query\",\"purchased_paid_media\",\"poll\",\"poll_answer\",\"my_chat_member\",\"chat_member\",\"chat_join_request\",\"chat_boost\",\"removed_chat_boost\",\"managed_bot\",\"subscription\"]},\"minItems\":1,\"uniqueItems\":true},\"nullable\":false,\"description\":\"Telegram update types that trigger a Run. Use * for the Telegram default set.\"},{\"handle\":\"userIds\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[0-9]{1,20}$\"},\"maxItems\":100,\"uniqueItems\":true},\"nullable\":false,\"value\":[],\"description\":\"Only accept updates from these numeric Telegram user IDs. Empty means every user.\"},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"dropPendingUpdates\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":true,\"description\":\"Discard updates queued before the webhook is created or resumed.\"}],\"definitionVersion\":2,\"description\":\"Triggers when the connected Telegram bot receives a selected update.\",\"displayName\":\"Bot Update\",\"endpoint\":{\"body\":{\"allowArray\":false,\"allowEmpty\":false,\"formats\":[\"json\"]},\"methods\":[\"POST\"],\"successStatus\":200},\"key\":\"telegram.on_update\",\"name\":\"on_update\",\"outputs\":[{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false}],\"provider\":\"telegram\",\"type\":\"integration\"},\"options\":false},{\"snapshot\":{\"key\":\"typeform.on_form_response\",\"provider\":\"typeform\",\"name\":\"on_form_response\",\"displayName\":\"Completed Form Response\",\"description\":\"Receives complete Typeform submissions through an automatically managed signed webhook.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"formId\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128,\"title\":\"Form ID\"},\"nullable\":false}],\"outputs\":[{\"handle\":\"response\",\"nullable\":false,\"jsonSchema\":{\"type\":\"object\",\"properties\":{\"eventId\":{\"type\":\"string\"},\"form_id\":{\"type\":\"string\"},\"token\":{\"type\":\"string\"},\"submitted_at\":{\"type\":\"string\"},\"answers\":{\"type\":\"array\",\"items\":{\"type\":\"object\"}},\"definition\":{\"type\":\"object\"}},\"required\":[\"eventId\",\"form_id\",\"token\",\"submitted_at\",\"answers\"]}}]},\"options\":false},{\"snapshot\":{\"key\":\"vercel.on_deployment_event\",\"provider\":\"vercel\",\"name\":\"on_deployment_event\",\"displayName\":\"Deployment Ready or Failed\",\"description\":\"Receives successful and failed deployments for a Vercel project.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"teamId\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256,\"title\":\"Team ID\"},\"nullable\":false},{\"handle\":\"projectId\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256,\"title\":\"Project ID\"},\"nullable\":false},{\"handle\":\"environment\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"all\",\"production\",\"preview\"],\"title\":\"Environment\"},\"nullable\":false,\"value\":\"all\"}],\"outputs\":[{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"deployment.ready\",\"deployment.error\"]},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"deploymentId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"projectId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false}]},\"options\":false},{\"snapshot\":{\"configInputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"coupon.created\",\"coupon.updated\",\"coupon.deleted\",\"coupon.restored\",\"customer.created\",\"customer.updated\",\"customer.deleted\",\"order.created\",\"order.updated\",\"order.deleted\",\"order.restored\",\"product.created\",\"product.updated\",\"product.deleted\",\"product.restored\",\"product.published\"]},\"minItems\":1,\"maxItems\":16,\"uniqueItems\":true},\"nullable\":false},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"webhookName\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":120},\"nullable\":false,\"value\":\"OOMOL Trigger\"}],\"definitionVersion\":2,\"description\":\"Triggers when selected WooCommerce store events occur.\",\"displayName\":\"Store Event\",\"endpoint\":{\"body\":{\"allowArray\":false,\"allowEmpty\":false,\"formats\":[\"json\"]},\"methods\":[\"POST\"],\"successStatus\":202},\"key\":\"woocommerce.on_store_event\",\"name\":\"on_store_event\",\"outputs\":[{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"resource\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"source\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"topic\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"webhookId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false}],\"provider\":\"woocommerce\",\"type\":\"integration\"},\"options\":false},{\"snapshot\":{\"configInputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"zen:event-type:ticket.agent_assignment_changed\",\"zen:event-type:ticket.attachment_linked_to_comment\",\"zen:event-type:ticket.attachment_redacted_from_comment\",\"zen:event-type:ticket.brand_changed\",\"zen:event-type:ticket.comment_added\",\"zen:event-type:ticket.comment_made_private\",\"zen:event-type:ticket.comment_redacted\",\"zen:event-type:ticket.created\",\"zen:event-type:ticket.csat_received\",\"zen:event-type:ticket.csat_requested\",\"zen:event-type:ticket.custom_field_changed\",\"zen:event-type:ticket.custom_status_changed\",\"zen:event-type:ticket.description_changed\",\"zen:event-type:ticket.email_ccs_changed\",\"zen:event-type:ticket.external_id_changed\",\"zen:event-type:ticket.followers_changed\",\"zen:event-type:ticket.form_changed\",\"zen:event-type:ticket.group_assignment_changed\",\"zen:event-type:ticket.marked_as_spam\",\"zen:event-type:ticket.merged\",\"zen:event-type:ticket.next_sla_breach_changed\",\"zen:event-type:ticket.ola_policy_changed\",\"zen:event-type:ticket.organization_changed\",\"zen:event-type:ticket.permanently_deleted\",\"zen:event-type:ticket.priority_changed\",\"zen:event-type:ticket.problem_link_changed\",\"zen:event-type:ticket.requester_changed\",\"zen:event-type:ticket.schedule_changed\",\"zen:event-type:ticket.sla_policy_changed\",\"zen:event-type:ticket.soft_deleted\",\"zen:event-type:ticket.status_changed\",\"zen:event-type:ticket.subject_changed\",\"zen:event-type:ticket.submitter_changed\",\"zen:event-type:ticket.tags_changed\",\"zen:event-type:ticket.task_due_at_changed\",\"zen:event-type:ticket.type_changed\",\"zen:event-type:ticket.undeleted\",\"zen:event-type:organization.created\",\"zen:event-type:organization.custom_field_changed\",\"zen:event-type:organization.deleted\",\"zen:event-type:organization.external_id_changed\",\"zen:event-type:organization.name_changed\",\"zen:event-type:organization.tags_changed\",\"zen:event-type:user.active_changed\",\"zen:event-type:user.alias_changed\",\"zen:event-type:user.created\",\"zen:event-type:user.custom_field_changed\",\"zen:event-type:user.custom_role_changed\",\"zen:event-type:user.default_group_changed\",\"zen:event-type:user.deleted\",\"zen:event-type:user.details_changed\",\"zen:event-type:user.external_id_changed\",\"zen:event-type:user.group_membership_created\",\"zen:event-type:user.group_membership_deleted\",\"zen:event-type:user.identity_changed\",\"zen:event-type:user.identity_created\",\"zen:event-type:user.identity_deleted\",\"zen:event-type:user.last_login_changed\",\"zen:event-type:user.merged\",\"zen:event-type:user.name_changed\",\"zen:event-type:user.notes_changed\",\"zen:event-type:user.only_private_comments_changed\",\"zen:event-type:user.organization_membership_created\",\"zen:event-type:user.organization_membership_deleted\",\"zen:event-type:user.password_changed\",\"zen:event-type:user.photo_changed\",\"zen:event-type:user.role_changed\",\"zen:event-type:user.suspended_changed\",\"zen:event-type:user.tags_changed\",\"zen:event-type:user.time_zone_changed\"]},\"minItems\":1,\"uniqueItems\":true},\"nullable\":false}],\"definitionVersion\":2,\"description\":\"Triggers when one of the selected Zendesk account events occurs.\",\"displayName\":\"Event Subscription\",\"endpoint\":{\"body\":{\"allowArray\":false,\"allowEmpty\":false,\"formats\":[\"json\"]},\"methods\":[\"POST\"],\"successStatus\":202},\"key\":\"zendesk.on_event\",\"name\":\"on_event\",\"outputs\":[{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"subject\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false}],\"provider\":\"zendesk\",\"type\":\"integration\"},\"options\":false},{\"snapshot\":{\"key\":\"zoom.on_recording_ready\",\"provider\":\"zoom\",\"name\":\"on_recording_ready\",\"displayName\":\"Cloud Recording Ready\",\"description\":\"Receives completed cloud recordings hosted by the connected Zoom user through a verified application event source.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"sourceId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^source_[0-9a-f]{32}$\",\"title\":\"Event source\"},\"nullable\":false},{\"handle\":\"eventTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"recording.completed\"]},\"minItems\":1,\"maxItems\":1,\"uniqueItems\":true,\"title\":\"Events\"},\"nullable\":false,\"value\":[\"recording.completed\"]}],\"outputs\":[{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"accountId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"meetingUuid\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false}]},\"options\":false,\"eventSource\":\"zoom\",\"source\":{\"createSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"zoom\"},\"version\":{\"type\":\"number\",\"const\":1},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"connectionId\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"teamId\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},{\"type\":\"null\"}]},\"appId\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"signingSecret\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"eventTypes\":{\"minItems\":1,\"maxItems\":1,\"type\":\"array\",\"items\":{\"type\":\"string\",\"const\":\"recording.completed\"}}},\"required\":[\"kind\",\"version\",\"name\",\"connectionId\",\"teamId\",\"appId\",\"signingSecret\",\"eventTypes\"],\"additionalProperties\":false},\"updateSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"number\",\"const\":1},\"expectedRevision\":{\"type\":\"integer\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"enabled\":{\"type\":\"boolean\"},\"eventTypes\":{\"minItems\":1,\"maxItems\":200,\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9_.:]{0,127}$\"}},\"verificationToken\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"signingSecret\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"encryptKey\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256}},\"required\":[\"version\",\"expectedRevision\",\"name\",\"enabled\",\"eventTypes\"],\"additionalProperties\":false},\"kind\":\"zoom\",\"provider\":\"zoom\",\"triggerId\":\"zoom.on_recording_ready\",\"maximumBodyBytes\":65536,\"applicationIngress\":true,\"managed\":false}}]");
17026
+ var catalog_generated_default = /*#__PURE__*/ JSON.parse("[{\"snapshot\":{\"configInputs\":[{\"handle\":\"baseId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^app[A-Za-z0-9]{14}$\"},\"nullable\":false},{\"handle\":\"formula\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false,\"value\":\"\"},{\"handle\":\"tableIdOrName\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":255},\"nullable\":false},{\"handle\":\"triggerField\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":255,\"pattern\":\"^[^}]*$\"},\"nullable\":false},{\"handle\":\"view\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false,\"value\":\"\"},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"fields\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"minLength\":1}},\"nullable\":false,\"value\":[]},{\"handle\":\"maxRecordsPerPoll\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":1000},\"nullable\":false,\"value\":200}],\"definitionVersion\":2,\"description\":\"Polls an Airtable table and triggers when a record is created or updated, ordered by a time field.\",\"displayName\":\"Record Created or Updated\",\"key\":\"airtable.on_record_changed\",\"name\":\"on_record_changed\",\"outputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"baseId\":{\"type\":\"string\"},\"createdTime\":{\"type\":\"string\"},\"fields\":{\"type\":\"object\"},\"recordId\":{\"type\":\"string\"},\"tableIdOrName\":{\"type\":\"string\"},\"triggerField\":{\"type\":\"string\"},\"triggerFieldValue\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"baseId\",\"tableIdOrName\",\"recordId\",\"createdTime\",\"triggerField\",\"triggerFieldValue\",\"fields\"]}},\"nullable\":false}],\"provider\":\"airtable\",\"type\":\"poll\"},\"options\":false},{\"snapshot\":{\"key\":\"asana.on_task_event\",\"provider\":\"asana\",\"name\":\"on_task_event\",\"displayName\":\"Project Task Event\",\"description\":\"Receives tasks added to a project, completion changes, and selected custom field changes. Task details represent current state, not historical state.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":true},\"successStatus\":200},\"configInputs\":[{\"handle\":\"projectId\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"title\":\"Project ID\"},\"nullable\":false},{\"handle\":\"eventTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"task.added\",\"task.completed\",\"task.field_changed\"]},\"minItems\":1,\"uniqueItems\":true,\"title\":\"Events\"},\"nullable\":false,\"value\":[\"task.added\",\"task.completed\"]},{\"handle\":\"customFieldId\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"title\":\"Custom field ID\"},\"nullable\":true}],\"outputs\":[{\"handle\":\"projectId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"event\":{\"type\":\"string\"},\"task\":{\"type\":\"object\"},\"change\":{\"type\":\"object\"}},\"required\":[\"event\",\"task\",\"change\"]}},\"nullable\":false}]},\"callback\":{\"headers\":[\"x-hook-secret\",\"x-hook-signature\"],\"query\":[]},\"options\":false},{\"snapshot\":{\"key\":\"calendly.on_booking_event\",\"provider\":\"calendly\",\"name\":\"on_booking_event\",\"displayName\":\"Booking Created or Canceled\",\"description\":\"Receives bookings and cancellations, preserving reschedule links. Requires a Personal Access Token connection.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"scope\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"user\",\"organization\"],\"title\":\"Scope\"},\"nullable\":false,\"value\":\"user\"},{\"handle\":\"eventTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"invitee.created\",\"invitee.canceled\"]},\"minItems\":1,\"uniqueItems\":true,\"title\":\"Events\"},\"nullable\":false,\"value\":[\"invitee.created\",\"invitee.canceled\"]}],\"outputs\":[{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"invitee.created\",\"invitee.canceled\"]},\"nullable\":false},{\"handle\":\"inviteeUri\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"createdAt\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false}]},\"callback\":{\"headers\":[\"calendly-webhook-signature\"],\"query\":[]},\"options\":false},{\"snapshot\":{\"key\":\"clickup.on_task_event\",\"provider\":\"clickup\",\"name\":\"on_task_event\",\"displayName\":\"Task Event\",\"description\":\"Receives task creation, status changes, and new comments in a ClickUp Workspace or List.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"workspaceId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^[0-9]+$\",\"title\":\"Workspace ID\"},\"nullable\":false},{\"handle\":\"listId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^[0-9]+$\",\"title\":\"List ID\"},\"nullable\":true},{\"handle\":\"eventTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"taskCreated\",\"taskStatusUpdated\",\"taskCommentPosted\"]},\"minItems\":1,\"uniqueItems\":true,\"title\":\"Events\"},\"nullable\":false,\"value\":[\"taskCreated\",\"taskStatusUpdated\",\"taskCommentPosted\"]}],\"outputs\":[{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"taskCreated\",\"taskStatusUpdated\",\"taskCommentPosted\"]},\"nullable\":false},{\"handle\":\"taskId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false}]},\"callback\":{\"headers\":[\"x-signature\"],\"query\":[]},\"options\":false},{\"snapshot\":{\"key\":\"feishu_app_bot.on_event\",\"provider\":\"feishu_app_bot\",\"name\":\"on_event\",\"displayName\":\"Application Event\",\"description\":\"Receives selected Feishu application events through a shared event source.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"sourceId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^source_[0-9a-f]{32}$\",\"title\":\"Event source\"},\"nullable\":false},{\"handle\":\"eventTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9_.]{0,127}$\"},\"minItems\":1,\"maxItems\":200,\"uniqueItems\":true,\"title\":\"Event types\"},\"nullable\":false},{\"handle\":\"chatIds\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"maxItems\":100,\"uniqueItems\":true,\"title\":\"Chat IDs\"},\"nullable\":true,\"description\":\"Leave empty to receive events from all chats available to the source.\"},{\"handle\":\"resource\",\"jsonSchema\":{\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"enum\":[\"document\",\"calendar\",\"approval\"]},\"id\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"documentType\":{\"type\":\"string\",\"enum\":[\"doc\",\"docx\",\"sheet\",\"bitable\",\"file\",\"folder\"]}},\"additionalProperties\":false,\"required\":[\"kind\",\"id\"],\"title\":\"Resource subscription\"},\"nullable\":true}],\"outputs\":[{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"appId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"tenantKey\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"occurredAt\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":true},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false}]},\"source\":{\"createSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"feishu\"},\"version\":{\"type\":\"number\",\"const\":1},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"connectionId\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"teamId\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},{\"type\":\"null\"}]},\"verificationToken\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"encryptKey\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"eventTypes\":{\"minItems\":1,\"maxItems\":200,\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9_.:]{0,127}$\"}},\"manageSubscriptions\":{\"type\":\"boolean\"}},\"required\":[\"version\",\"name\",\"connectionId\",\"teamId\",\"verificationToken\",\"encryptKey\",\"eventTypes\",\"manageSubscriptions\"],\"additionalProperties\":false},\"updateSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"number\",\"const\":1},\"expectedRevision\":{\"type\":\"integer\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"enabled\":{\"type\":\"boolean\"},\"eventTypes\":{\"minItems\":1,\"maxItems\":200,\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9_.:]{0,127}$\"}},\"verificationToken\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"signingSecret\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"encryptKey\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256}},\"required\":[\"version\",\"expectedRevision\",\"name\",\"enabled\",\"eventTypes\"],\"additionalProperties\":false},\"kind\":\"feishu\",\"provider\":\"feishu_app_bot\",\"triggerId\":\"feishu_app_bot.on_event\",\"maximumBodyBytes\":65536,\"applicationIngress\":false,\"managed\":false},\"options\":false,\"eventSource\":\"feishu\"},{\"snapshot\":{\"key\":\"fireflies.on_meeting_ready\",\"provider\":\"fireflies\",\"name\":\"on_meeting_ready\",\"displayName\":\"Meeting Transcript or Summary Ready\",\"description\":\"Receives separate transcript and summary readiness events through Fireflies Webhooks V2 after checking meeting access.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"sourceId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^source_[0-9a-f]{32}$\",\"title\":\"Event source\"},\"nullable\":false},{\"handle\":\"eventTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"meeting.transcribed\",\"meeting.summarized\"]},\"minItems\":1,\"maxItems\":2,\"uniqueItems\":true,\"title\":\"Events\"},\"nullable\":false,\"value\":[\"meeting.transcribed\",\"meeting.summarized\"]}],\"outputs\":[{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"accountId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"meetingId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false}]},\"callback\":{\"headers\":[],\"query\":[]},\"source\":{\"createSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"fireflies\"},\"version\":{\"type\":\"number\",\"const\":1},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"connectionId\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"teamId\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},{\"type\":\"null\"}]},\"signingSecret\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"eventTypes\":{\"minItems\":1,\"maxItems\":2,\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"meeting.transcribed\",\"meeting.summarized\"]}}},\"required\":[\"kind\",\"version\",\"name\",\"connectionId\",\"teamId\",\"signingSecret\",\"eventTypes\"],\"additionalProperties\":false},\"updateSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"number\",\"const\":1},\"expectedRevision\":{\"type\":\"integer\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"enabled\":{\"type\":\"boolean\"},\"eventTypes\":{\"minItems\":1,\"maxItems\":200,\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9_.:]{0,127}$\"}},\"verificationToken\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"signingSecret\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"encryptKey\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256}},\"required\":[\"version\",\"expectedRevision\",\"name\",\"enabled\",\"eventTypes\"],\"additionalProperties\":false},\"kind\":\"fireflies\",\"provider\":\"fireflies\",\"triggerId\":\"fireflies.on_meeting_ready\",\"maximumBodyBytes\":65536,\"applicationIngress\":false,\"managed\":false},\"options\":false,\"eventSource\":\"fireflies\"},{\"snapshot\":{\"configInputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"*\",\"branch_protection_configuration\",\"branch_protection_rule\",\"check_run\",\"check_suite\",\"code_scanning_alert\",\"commit_comment\",\"create\",\"custom_property_values\",\"delete\",\"dependabot_alert\",\"deploy_key\",\"deployment\",\"deployment_status\",\"discussion\",\"discussion_comment\",\"fork\",\"gollum\",\"issue_comment\",\"issue_dependencies\",\"issues\",\"label\",\"member\",\"meta\",\"milestone\",\"package\",\"page_build\",\"project\",\"project_card\",\"project_column\",\"public\",\"pull_request\",\"pull_request_review\",\"pull_request_review_comment\",\"pull_request_review_thread\",\"push\",\"registry_package\",\"release\",\"repository\",\"repository_advisory\",\"repository_import\",\"repository_ruleset\",\"repository_vulnerability_alert\",\"secret_scanning_alert\",\"secret_scanning_alert_location\",\"secret_scanning_scan\",\"security_and_analysis\",\"star\",\"status\",\"sub_issues\",\"team_add\",\"watch\",\"workflow_job\",\"workflow_run\"]},\"minItems\":1,\"uniqueItems\":true},\"nullable\":false},{\"handle\":\"insecureSsl\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false},{\"handle\":\"owner\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^[a-zA-Z0-9](?:[a-zA-Z0-9]|-(?=[a-zA-Z0-9])){0,38}$\"},\"nullable\":false},{\"handle\":\"repo\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^(?!\\\\.{1,2}$)[a-zA-Z0-9._-]{1,100}$\"},\"nullable\":false}],\"definitionVersion\":2,\"description\":\"Triggers when selected GitHub webhook events occur in a repository.\",\"displayName\":\"Repository Event\",\"endpoint\":{\"body\":{\"allowArray\":false,\"allowEmpty\":false,\"formats\":[\"json\"]},\"methods\":[\"POST\"],\"successStatus\":202},\"key\":\"github.on_repo_event\",\"name\":\"on_repo_event\",\"outputs\":[{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false}],\"provider\":\"github\",\"type\":\"integration\"},\"callback\":{\"headers\":[\"x-github-delivery\",\"x-github-event\",\"x-hub-signature-256\"],\"query\":[]},\"options\":false},{\"snapshot\":{\"configInputs\":[{\"handle\":\"owner\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^[a-zA-Z0-9](?:[a-zA-Z0-9]|-(?=[a-zA-Z0-9])){0,38}$\"},\"nullable\":false},{\"handle\":\"repo\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^(?!\\\\.{1,2}$)[a-zA-Z0-9._-]{1,100}$\"},\"nullable\":false},{\"handle\":\"number\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1},\"nullable\":false,\"description\":\"Number of the pull request to watch.\"}],\"definitionVersion\":2,\"description\":\"Watches one pull request using notifications and periodic checks. Starts from its current state; reports observed changes, not every intermediate transition or review event.\",\"displayName\":\"Watch Pull Request\",\"endpoint\":{\"body\":{\"allowArray\":false,\"allowEmpty\":false,\"formats\":[\"json\"]},\"methods\":[\"POST\"],\"successStatus\":202},\"key\":\"github.watch_pull_request\",\"name\":\"watch_pull_request\",\"provider\":\"github\",\"type\":\"integration\",\"outputs\":[{\"handle\":\"pullRequest\",\"jsonSchema\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"integer\"},\"number\":{\"type\":\"integer\"},\"title\":{\"type\":\"string\"},\"url\":{\"type\":\"string\"},\"state\":{\"type\":\"string\",\"enum\":[\"open\",\"closed\"]},\"draft\":{\"type\":\"boolean\"},\"merged\":{\"type\":\"boolean\"},\"updatedAt\":{\"type\":\"string\"},\"headSha\":{\"type\":\"string\"},\"baseSha\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"id\",\"number\",\"title\",\"url\",\"state\",\"draft\",\"merged\",\"updatedAt\",\"headSha\",\"baseSha\"]},\"nullable\":false},{\"handle\":\"version\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false}]},\"callback\":{\"headers\":[\"x-github-delivery\",\"x-github-event\",\"x-hub-signature-256\"],\"query\":[]},\"options\":false,\"intervalMs\":300000},{\"snapshot\":{\"configInputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"push\",\"tag_push\",\"issues\",\"confidential_issues\",\"note\",\"confidential_note\",\"merge_requests\",\"job\",\"pipeline\",\"wiki_page\",\"deployment\",\"feature_flag\",\"releases\",\"milestone\",\"emoji\",\"resource_access_token\",\"resource_deploy_token\"]},\"minItems\":1,\"uniqueItems\":true},\"nullable\":false},{\"handle\":\"insecureSsl\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false},{\"handle\":\"project\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":255,\"pattern\":\"^(?:[0-9]+|(?!\\\\.{1,2}(?:/|$))[A-Za-z0-9_.][A-Za-z0-9_.-]*(?:/(?!\\\\.{1,2}(?:/|$))[A-Za-z0-9_.][A-Za-z0-9_.-]*)*)$\"},\"nullable\":false},{\"handle\":\"pushBranchFilter\",\"jsonSchema\":{\"type\":\"string\",\"maxLength\":255},\"nullable\":false,\"value\":\"\"}],\"definitionVersion\":2,\"description\":\"Triggers when selected GitLab webhook events occur in a project.\",\"displayName\":\"Project Event\",\"endpoint\":{\"body\":{\"allowArray\":false,\"allowEmpty\":false,\"formats\":[\"json\"]},\"methods\":[\"POST\"],\"successStatus\":202},\"key\":\"gitlab.on_project_event\",\"name\":\"on_project_event\",\"outputs\":[{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"gitlabEvent\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false}],\"provider\":\"gitlab\",\"type\":\"integration\"},\"callback\":{\"headers\":[\"idempotency-key\",\"x-gitlab-event\",\"x-gitlab-token\"],\"query\":[]},\"options\":false},{\"snapshot\":{\"configInputs\":[{\"handle\":\"labelNamesOrIds\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"minLength\":1}},\"nullable\":false,\"description\":\"Only trigger on messages carrying all of these labels, referenced by name or ID.\",\"value\":[]},{\"handle\":\"readStatus\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"Read\",\"Unread\",\"All\"]},\"nullable\":false,\"value\":\"All\"},{\"handle\":\"search\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false,\"description\":\"Gmail search-syntax query the message must match.\",\"value\":\"\"},{\"handle\":\"sender\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false,\"description\":\"Only trigger on messages whose sender matches this address or name.\",\"value\":\"\"},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"includeDrafts\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false,\"description\":\"Also trigger on draft messages.\"},{\"handle\":\"includeSpamAndTrash\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false,\"description\":\"Also trigger on messages in SPAM and TRASH.\"},{\"handle\":\"maxMessagesPerPoll\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":100},\"nullable\":false,\"value\":25}],\"definitionVersion\":2,\"description\":\"Polls the Gmail mailbox and triggers when a new message is received.\",\"displayName\":\"New Message Received\",\"key\":\"gmail.on_message_received\",\"name\":\"on_message_received\",\"outputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"historyId\":{\"type\":[\"string\",\"null\"]},\"labelIds\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"messageId\":{\"type\":\"string\"},\"messageTimestamp\":{\"type\":\"string\"},\"sender\":{\"type\":\"string\"},\"subject\":{\"type\":\"string\"},\"threadId\":{\"type\":\"string\"},\"to\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"messageId\",\"threadId\",\"historyId\",\"labelIds\",\"subject\",\"sender\",\"to\",\"messageTimestamp\"]}},\"nullable\":false}],\"provider\":\"gmail\",\"type\":\"poll\"},\"options\":false},{\"snapshot\":{\"configInputs\":[{\"handle\":\"calendarId\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":1024},\"nullable\":false},{\"handle\":\"changes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"created\",\"updated\",\"cancelled\"]},\"minItems\":1,\"uniqueItems\":true},\"nullable\":false,\"value\":[\"created\",\"updated\",\"cancelled\"]},{\"handle\":\"matchTerm\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false,\"value\":\"\"},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"maxEventsPerPoll\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":500},\"nullable\":false,\"value\":100}],\"definitionVersion\":2,\"description\":\"Polls a Google Calendar and triggers when an event is created, updated or cancelled.\",\"displayName\":\"Event Changed\",\"key\":\"googlecalendar.on_event_changed\",\"name\":\"on_event_changed\",\"outputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"attendeeEmails\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"calendarId\":{\"type\":\"string\"},\"changeType\":{\"type\":\"string\",\"enum\":[\"created\",\"updated\",\"cancelled\"]},\"created\":{\"type\":[\"string\",\"null\"]},\"creatorEmail\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"end\":{\"type\":[\"object\",\"null\"]},\"eventId\":{\"type\":\"string\"},\"eventType\":{\"type\":[\"string\",\"null\"]},\"htmlLink\":{\"type\":[\"string\",\"null\"]},\"isAllDay\":{\"type\":\"boolean\"},\"location\":{\"type\":[\"string\",\"null\"]},\"organizerEmail\":{\"type\":[\"string\",\"null\"]},\"recurringEventId\":{\"type\":[\"string\",\"null\"]},\"start\":{\"type\":[\"object\",\"null\"]},\"status\":{\"type\":\"string\"},\"summary\":{\"type\":[\"string\",\"null\"]},\"updated\":{\"type\":[\"string\",\"null\"]}},\"additionalProperties\":false,\"required\":[\"changeType\",\"calendarId\",\"eventId\",\"status\",\"summary\",\"description\",\"location\",\"htmlLink\",\"start\",\"end\",\"isAllDay\",\"organizerEmail\",\"creatorEmail\",\"attendeeEmails\",\"recurringEventId\",\"eventType\",\"created\",\"updated\"]}},\"nullable\":false}],\"provider\":\"googlecalendar\",\"type\":\"poll\"},\"options\":false},{\"snapshot\":{\"configInputs\":[{\"handle\":\"driveId\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"nullable\":true,\"description\":\"Optional shared drive ID. Omit it to monitor the connected account.\"},{\"handle\":\"includeCorpusRemovals\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false,\"description\":\"Include the accessible file resource when an item leaves the change corpus.\"},{\"handle\":\"includeItemsFromAllDrives\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":true,\"description\":\"Include items from My Drive and shared drives.\"},{\"handle\":\"includeRemoved\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":true,\"description\":\"Include changes caused by deletion or loss of access.\"},{\"handle\":\"pageSize\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":100},\"nullable\":false,\"value\":100,\"description\":\"Maximum changes included in one Flow Run.\"},{\"handle\":\"restrictToMyDrive\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false,\"description\":\"Restrict changes to the My Drive hierarchy.\"}],\"definitionVersion\":2,\"description\":\"Uses a Google Drive changes.watch channel and triggers when Drive changes are available.\",\"displayName\":\"Changes Detected\",\"endpoint\":{\"body\":{\"allowArray\":false,\"allowEmpty\":true,\"formats\":[\"json\"]},\"methods\":[\"POST\"],\"successStatus\":204},\"key\":\"googledrive.changes_detected\",\"name\":\"changes_detected\",\"outputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"changeId\":{\"type\":\"string\"},\"changeType\":{\"type\":[\"string\",\"null\"]},\"driveId\":{\"type\":[\"string\",\"null\"]},\"file\":{\"type\":[\"object\",\"null\"]},\"fileId\":{\"type\":[\"string\",\"null\"]},\"notification\":{\"type\":\"object\",\"properties\":{\"changedTypes\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"messageNumber\":{\"type\":[\"string\",\"null\"]},\"resourceState\":{\"type\":\"string\"},\"resourceUri\":{\"type\":[\"string\",\"null\"]}},\"additionalProperties\":false,\"required\":[\"resourceState\",\"changedTypes\",\"messageNumber\",\"resourceUri\"]},\"removed\":{\"type\":\"boolean\"},\"time\":{\"type\":[\"string\",\"null\"]}},\"additionalProperties\":false,\"required\":[\"changeId\",\"changeType\",\"removed\",\"time\",\"fileId\",\"driveId\",\"file\",\"notification\"]}},\"nullable\":false}],\"provider\":\"googledrive\",\"type\":\"integration\"},\"callback\":{\"headers\":[\"x-goog-changed\",\"x-goog-channel-id\",\"x-goog-channel-token\",\"x-goog-message-number\",\"x-goog-resource-id\",\"x-goog-resource-state\",\"x-goog-resource-uri\"],\"query\":[]},\"options\":false},{\"snapshot\":{\"configInputs\":[{\"handle\":\"changeType\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"created\",\"updated\"]},\"nullable\":false},{\"handle\":\"driveId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^[A-Za-z0-9_-]{0,512}$\"},\"nullable\":false,\"value\":\"\"},{\"handle\":\"folderId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^[A-Za-z0-9_-]{2,512}$\"},\"nullable\":false},{\"handle\":\"itemTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"file\",\"folder\"]},\"minItems\":1,\"uniqueItems\":true},\"nullable\":false,\"value\":[\"file\"]},{\"handle\":\"mimeTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"minLength\":1}},\"nullable\":false,\"value\":[]},{\"handle\":\"namePrefix\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false,\"value\":\"\"},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"maxFilesPerPoll\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":200},\"nullable\":false,\"value\":50}],\"definitionVersion\":2,\"description\":\"Polls one Google Drive folder and triggers when a file or folder directly inside it is created or updated.\",\"displayName\":\"File or Folder Change in a Folder\",\"key\":\"googledrive.on_file_change\",\"name\":\"on_file_change\",\"outputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"createdTime\":{\"type\":[\"string\",\"null\"]},\"driveId\":{\"type\":[\"string\",\"null\"]},\"eventType\":{\"type\":\"string\",\"enum\":[\"file_created\",\"file_updated\",\"folder_created\",\"folder_updated\"]},\"fileId\":{\"type\":\"string\"},\"itemType\":{\"type\":\"string\",\"enum\":[\"file\",\"folder\"]},\"lastModifyingUser\":{\"type\":[\"object\",\"null\"]},\"mimeType\":{\"type\":\"string\"},\"modifiedTime\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":\"string\"},\"parents\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"size\":{\"type\":\"string\"},\"webViewLink\":{\"type\":[\"string\",\"null\"]}},\"additionalProperties\":false,\"required\":[\"eventType\",\"itemType\",\"fileId\",\"name\",\"mimeType\",\"createdTime\",\"modifiedTime\",\"parents\",\"webViewLink\",\"driveId\",\"lastModifyingUser\"]}},\"nullable\":false}],\"provider\":\"googledrive\",\"type\":\"poll\"},\"options\":false},{\"snapshot\":{\"configInputs\":[{\"handle\":\"driveId\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"nullable\":true,\"description\":\"Optional shared drive ID. Omit it to monitor the connected account.\"},{\"handle\":\"includeCorpusRemovals\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false,\"description\":\"Include the accessible file resource when an item leaves the change corpus.\"},{\"handle\":\"includeItemsFromAllDrives\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":true,\"description\":\"Include items from My Drive and shared drives.\"},{\"handle\":\"includeRemoved\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":true,\"description\":\"Include changes caused by deletion or loss of access.\"},{\"handle\":\"pageSize\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":100},\"nullable\":false,\"value\":100,\"description\":\"Maximum changes included in one Flow Run.\"},{\"handle\":\"restrictToMyDrive\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false,\"description\":\"Restrict changes to the My Drive hierarchy.\"}],\"definitionVersion\":2,\"description\":\"Monitors Drive changes using notifications and periodic scans of the same change stream.\",\"displayName\":\"Watch Changes\",\"endpoint\":{\"body\":{\"allowArray\":false,\"allowEmpty\":true,\"formats\":[\"json\"]},\"methods\":[\"POST\"],\"successStatus\":204},\"key\":\"googledrive.watch_changes\",\"name\":\"watch_changes\",\"outputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\"}},\"nullable\":false}],\"provider\":\"googledrive\",\"type\":\"integration\"},\"callback\":{\"headers\":[\"x-goog-changed\",\"x-goog-channel-id\",\"x-goog-channel-token\",\"x-goog-message-number\",\"x-goog-resource-id\",\"x-goog-resource-state\",\"x-goog-resource-uri\"],\"query\":[]},\"options\":false,\"intervalMs\":300000},{\"snapshot\":{\"configInputs\":[{\"handle\":\"columnRange\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^[A-Za-z]{1,3}(?::[A-Za-z]{1,3})?$\"},\"nullable\":false,\"value\":\"A:ZZZ\"},{\"handle\":\"sheet\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1},\"nullable\":false},{\"handle\":\"spreadsheetId\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1},\"nullable\":false},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"dateTimeRender\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"FORMATTED_STRING\",\"SERIAL_NUMBER\"]},\"nullable\":false,\"value\":\"FORMATTED_STRING\"},{\"handle\":\"firstDataRow\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1},\"nullable\":false,\"value\":2},{\"handle\":\"headerRow\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1},\"nullable\":false,\"value\":1},{\"handle\":\"maxRowsPerPoll\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":500},\"nullable\":false,\"value\":100},{\"handle\":\"valueRender\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"UNFORMATTED_VALUE\",\"FORMATTED_VALUE\",\"FORMULA\"]},\"nullable\":false,\"value\":\"UNFORMATTED_VALUE\"}],\"definitionVersion\":2,\"description\":\"Polls a sheet and triggers once for every new row appended below the last row already seen.\",\"displayName\":\"New Row Added\",\"key\":\"googlesheets.on_row_added\",\"name\":\"on_row_added\",\"outputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"row\":{\"type\":\"object\"},\"rowNumber\":{\"type\":\"integer\"},\"sheetId\":{\"type\":\"integer\"},\"sheetTitle\":{\"type\":\"string\"},\"spreadsheetId\":{\"type\":\"string\"},\"values\":{\"type\":\"array\",\"items\":{}}},\"additionalProperties\":false,\"required\":[\"spreadsheetId\",\"sheetId\",\"sheetTitle\",\"rowNumber\",\"row\",\"values\"]}},\"nullable\":false}],\"provider\":\"googlesheets\",\"type\":\"poll\"},\"options\":false},{\"snapshot\":{\"key\":\"intercom.on_conversation_event\",\"provider\":\"intercom\",\"name\":\"on_conversation_event\",\"displayName\":\"Customer Conversation or Ticket\",\"description\":\"Receives customer conversations, customer replies and new tickets from a verified Intercom application event source. Administrator replies are excluded.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"sourceId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^source_[0-9a-f]{32}$\",\"title\":\"Event source\"},\"nullable\":false},{\"handle\":\"eventTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"conversation.user.created\",\"conversation.user.replied\",\"ticket.created\"]},\"minItems\":1,\"maxItems\":3,\"uniqueItems\":true,\"title\":\"Events\"},\"nullable\":false,\"value\":[\"conversation.user.created\",\"conversation.user.replied\",\"ticket.created\"]}],\"outputs\":[{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"workspaceId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"objectId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":true},\"nullable\":false}]},\"callback\":{\"headers\":[],\"query\":[]},\"source\":{\"createSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"intercom\"},\"version\":{\"type\":\"number\",\"const\":1},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"connectionId\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"teamId\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},{\"type\":\"null\"}]},\"appId\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"signingSecret\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"eventTypes\":{\"minItems\":1,\"maxItems\":3,\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"conversation.user.created\",\"conversation.user.replied\",\"ticket.created\"]}}},\"required\":[\"kind\",\"version\",\"name\",\"connectionId\",\"teamId\",\"appId\",\"signingSecret\",\"eventTypes\"],\"additionalProperties\":false},\"updateSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"number\",\"const\":1},\"expectedRevision\":{\"type\":\"integer\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"enabled\":{\"type\":\"boolean\"},\"eventTypes\":{\"minItems\":1,\"maxItems\":200,\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9_.:]{0,127}$\"}},\"verificationToken\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"signingSecret\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"encryptKey\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256}},\"required\":[\"version\",\"expectedRevision\",\"name\",\"enabled\",\"eventTypes\"],\"additionalProperties\":false},\"kind\":\"intercom\",\"provider\":\"intercom\",\"triggerId\":\"intercom.on_conversation_event\",\"maximumBodyBytes\":65536,\"applicationIngress\":true,\"managed\":false},\"options\":false,\"eventSource\":\"intercom\"},{\"snapshot\":{\"key\":\"jira.on_issue_event\",\"provider\":\"jira\",\"name\":\"on_issue_event\",\"displayName\":\"Issue or Comment Event\",\"description\":\"Receives Jira Cloud issue creation, issue updates and new comments through a shared project webhook with automatic renewal.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"sourceId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^source_[0-9a-f]{32}$\",\"title\":\"Event source\"},\"nullable\":false},{\"handle\":\"eventTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"jira:issue_created\",\"jira:issue_updated\",\"comment_created\"]},\"minItems\":1,\"maxItems\":3,\"uniqueItems\":true,\"title\":\"Events\"},\"nullable\":false,\"value\":[\"jira:issue_created\",\"jira:issue_updated\",\"comment_created\"]}],\"outputs\":[{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"cloudId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"issueId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false}]},\"callback\":{\"headers\":[],\"query\":[]},\"source\":{\"createSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"jira\"},\"version\":{\"type\":\"number\",\"const\":1},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"connectionId\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"teamId\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},{\"type\":\"null\"}]},\"project\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"eventTypes\":{\"minItems\":1,\"maxItems\":3,\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"jira:issue_created\",\"jira:issue_updated\",\"comment_created\"]}}},\"required\":[\"kind\",\"version\",\"name\",\"connectionId\",\"teamId\",\"project\",\"eventTypes\"],\"additionalProperties\":false},\"updateSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"number\",\"const\":1},\"expectedRevision\":{\"type\":\"integer\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"enabled\":{\"type\":\"boolean\"},\"eventTypes\":{\"minItems\":1,\"maxItems\":200,\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9_.:]{0,127}$\"}},\"verificationToken\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"signingSecret\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"encryptKey\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256}},\"required\":[\"version\",\"expectedRevision\",\"name\",\"enabled\",\"eventTypes\"],\"additionalProperties\":false},\"kind\":\"jira\",\"provider\":\"jira\",\"triggerId\":\"jira.on_issue_event\",\"maximumBodyBytes\":65536,\"applicationIngress\":false,\"managed\":true},\"options\":false,\"eventSource\":\"jira\"},{\"snapshot\":{\"configInputs\":[{\"handle\":\"teamId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\",\"title\":\"Team ID\"},\"nullable\":false,\"description\":\"Linear Team UUID. Use Copy model UUID in Linear to find it.\"},{\"handle\":\"stateIds\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\"},\"maxItems\":50,\"uniqueItems\":true,\"title\":\"Issue statuses\"},\"nullable\":false,\"value\":[],\"description\":\"Choose statuses from the selected Team. Empty means all statuses. Matches the current status, not every transition into it.\"}],\"definitionVersion\":2,\"description\":\"Watches new and updated issues in a Linear team with periodic checks. Starts from now without running existing issues. Reports observed current states, not deletions or every intermediate status change.\",\"displayName\":\"Issue Created or Updated\",\"key\":\"linear.on_issue_changed\",\"name\":\"on_issue_changed\",\"outputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"},\"identifier\":{\"type\":\"string\"},\"title\":{\"type\":\"string\"},\"url\":{\"type\":\"string\"},\"teamId\":{\"type\":\"string\"},\"createdAt\":{\"type\":\"string\"},\"updatedAt\":{\"type\":\"string\"},\"state\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"},\"type\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"id\",\"name\",\"type\"]}},\"additionalProperties\":false,\"required\":[\"id\",\"identifier\",\"title\",\"url\",\"teamId\",\"createdAt\",\"updatedAt\",\"state\"]}},\"nullable\":false}],\"provider\":\"linear\",\"type\":\"poll\"},\"options\":true},{\"snapshot\":{\"configInputs\":[{\"handle\":\"dataSourceId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^(?:|[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})$\"},\"nullable\":false,\"value\":\"\"},{\"handle\":\"databaseId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$\"},\"nullable\":false},{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"page_added\",\"page_updated\"]},\"minItems\":1,\"uniqueItems\":true},\"nullable\":false,\"value\":[\"page_added\"]},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"includeProperties\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":true},{\"handle\":\"maxItemsPerPoll\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":100},\"nullable\":false,\"value\":25}],\"definitionVersion\":2,\"description\":\"Polls a Notion database and triggers when a page is added to it or an existing page is edited.\",\"displayName\":\"Database Page Added or Updated\",\"key\":\"notion.on_database_page_event\",\"name\":\"on_database_page_event\",\"outputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"createdBy\":{\"type\":\"object\"},\"createdTime\":{\"type\":\"string\"},\"dataSourceId\":{\"type\":\"string\"},\"databaseId\":{\"type\":\"string\"},\"event\":{\"type\":\"string\",\"enum\":[\"page_added\",\"page_updated\"]},\"lastEditedBy\":{\"type\":\"object\"},\"lastEditedTime\":{\"type\":\"string\"},\"pageId\":{\"type\":\"string\"},\"properties\":{\"type\":\"object\"},\"title\":{\"type\":\"string\"},\"url\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"event\",\"pageId\",\"databaseId\",\"dataSourceId\",\"url\",\"title\",\"createdTime\",\"lastEditedTime\",\"createdBy\",\"lastEditedBy\"]}},\"nullable\":false}],\"provider\":\"notion\",\"type\":\"poll\"},\"options\":false},{\"snapshot\":{\"configInputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"created\",\"updated\",\"deleted\"]},\"minItems\":1,\"uniqueItems\":true},\"nullable\":false,\"value\":[\"created\",\"updated\"]},{\"handle\":\"itemId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false,\"value\":\"\"},{\"handle\":\"itemTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"file\",\"folder\"]},\"minItems\":1,\"uniqueItems\":true},\"nullable\":false,\"value\":[\"file\"]},{\"handle\":\"parentFolderId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false,\"value\":\"\"},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"maxItemsPerPoll\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":200},\"nullable\":false,\"value\":50}],\"definitionVersion\":2,\"description\":\"Polls the OneDrive change feed and triggers when a file or folder is created, updated or deleted.\",\"displayName\":\"File or Folder Changed\",\"key\":\"one_drive.on_item_changed\",\"name\":\"on_item_changed\",\"outputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"changeType\":{\"type\":\"string\",\"enum\":[\"created\",\"updated\",\"deleted\"]},\"createdDateTime\":{\"type\":[\"string\",\"null\"]},\"driveId\":{\"type\":[\"string\",\"null\"]},\"eTag\":{\"type\":[\"string\",\"null\"]},\"itemId\":{\"type\":\"string\"},\"itemType\":{\"type\":\"string\",\"enum\":[\"file\",\"folder\"]},\"lastModifiedDateTime\":{\"type\":[\"string\",\"null\"]},\"mimeType\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":\"string\"},\"parentFolderId\":{\"type\":[\"string\",\"null\"]},\"size\":{\"type\":[\"number\",\"null\"]},\"webUrl\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"itemId\",\"name\",\"changeType\",\"itemType\",\"size\",\"mimeType\",\"webUrl\",\"parentFolderId\",\"driveId\",\"createdDateTime\",\"lastModifiedDateTime\",\"eTag\"]}},\"nullable\":false}],\"provider\":\"one_drive\",\"type\":\"poll\"},\"options\":false},{\"snapshot\":{\"configInputs\":[{\"handle\":\"folder\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^[A-Za-z0-9_=-]*$\"},\"nullable\":false,\"value\":\"inbox\",\"description\":\"A well-known mail folder name, folder ID, or an empty string for the whole mailbox.\"},{\"handle\":\"readStatus\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"All\",\"Read\",\"Unread\"]},\"nullable\":false,\"value\":\"All\"},{\"handle\":\"senderAddress\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false,\"value\":\"\",\"description\":\"Exact sender address, or empty for any sender.\"},{\"handle\":\"subjectContains\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false,\"value\":\"\",\"description\":\"Case-insensitive subject text.\"},{\"handle\":\"withAttachmentsOnly\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"includeDrafts\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false},{\"handle\":\"maxMessagesPerPoll\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":100},\"nullable\":false,\"value\":25}],\"definitionVersion\":2,\"description\":\"Polls a Microsoft Outlook mail folder and triggers when a new message arrives.\",\"displayName\":\"New Message Received\",\"key\":\"outlook.on_message_received\",\"name\":\"on_message_received\",\"outputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"bodyPreview\":{\"type\":\"string\"},\"categories\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"conversationId\":{\"type\":\"string\"},\"from\":{\"type\":\"string\"},\"fromName\":{\"type\":\"string\"},\"hasAttachments\":{\"type\":\"boolean\"},\"importance\":{\"type\":\"string\"},\"internetMessageId\":{\"type\":\"string\"},\"isDraft\":{\"type\":\"boolean\"},\"isRead\":{\"type\":\"boolean\"},\"messageId\":{\"type\":\"string\"},\"parentFolderId\":{\"type\":\"string\"},\"receivedDateTime\":{\"type\":\"string\"},\"subject\":{\"type\":\"string\"},\"to\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"webLink\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"messageId\",\"internetMessageId\",\"conversationId\",\"subject\",\"bodyPreview\",\"from\",\"fromName\",\"to\",\"receivedDateTime\",\"hasAttachments\",\"isRead\",\"isDraft\",\"importance\",\"categories\",\"parentFolderId\",\"webLink\"]}},\"nullable\":false}],\"provider\":\"outlook\",\"type\":\"poll\"},\"options\":false},{\"snapshot\":{\"key\":\"pandadoc.on_document_event\",\"provider\":\"pandadoc\",\"name\":\"on_document_event\",\"displayName\":\"Document Status Changed\",\"description\":\"Receives document status changes in the connected workspace, optionally only when the entire document is completed.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":true,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"completedOnly\",\"jsonSchema\":{\"type\":\"boolean\",\"title\":\"Completed documents only\"},\"nullable\":false,\"value\":true}],\"outputs\":[{\"handle\":\"events\",\"nullable\":false,\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"event\":{\"type\":\"string\"},\"data\":{\"type\":\"object\"}},\"required\":[\"event\",\"data\"]}}}]},\"callback\":{\"headers\":[],\"query\":[\"signature\"]},\"options\":false},{\"snapshot\":{\"key\":\"pipedrive.on_crm_event\",\"provider\":\"pipedrive\",\"name\":\"on_crm_event\",\"displayName\":\"Deal or Contact Event\",\"description\":\"Receives new deals or contacts, or actual changes to a deal stage or status using Pipedrive Webhooks v2.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"eventType\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"deal.created\",\"deal.stage_changed\",\"deal.status_changed\",\"person.created\"],\"title\":\"Event\"},\"nullable\":false,\"value\":\"deal.created\"}],\"outputs\":[{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"deal.created\",\"deal.stage_changed\",\"deal.status_changed\",\"person.created\"]},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"objectId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false}]},\"callback\":{\"headers\":[\"authorization\"],\"query\":[]},\"options\":false},{\"snapshot\":{\"key\":\"resend.on_email_event\",\"provider\":\"resend\",\"name\":\"on_email_event\",\"displayName\":\"Email Received, Bounced or Complained\",\"description\":\"Receives inbound email, bounce, and complaint notifications. Read message bodies and attachments with Actions.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"eventTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"email.received\",\"email.bounced\",\"email.complained\"]},\"minItems\":1,\"uniqueItems\":true,\"title\":\"Events\"},\"nullable\":false,\"value\":[\"email.received\",\"email.bounced\",\"email.complained\"]}],\"outputs\":[{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"email.received\",\"email.bounced\",\"email.complained\"]},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"emailId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"createdAt\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false}]},\"callback\":{\"headers\":[\"svix-id\",\"svix-signature\",\"svix-timestamp\"],\"query\":[]},\"options\":false},{\"snapshot\":{\"key\":\"sentry.on_issue_alert\",\"provider\":\"sentry\",\"name\":\"on_issue_alert\",\"displayName\":\"Issue Alert\",\"description\":\"Receives Issue Alert Rule notifications from a verified Sentry Custom Integration installation.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"projectIds\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[0-9]+$\"},\"uniqueItems\":true,\"title\":\"Project IDs\"},\"nullable\":true},{\"handle\":\"ruleNames\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"minLength\":1},\"uniqueItems\":true,\"title\":\"Alert rule names\"},\"nullable\":true},{\"handle\":\"sourceId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^source_[0-9a-f]{32}$\",\"title\":\"Event source\"},\"nullable\":false},{\"handle\":\"eventTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"issue.alert\"]},\"minItems\":1,\"maxItems\":1,\"uniqueItems\":true,\"title\":\"Events\"},\"nullable\":false,\"value\":[\"issue.alert\"]}],\"outputs\":[{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"organizationId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"issueId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false}]},\"callback\":{\"headers\":[],\"query\":[]},\"source\":{\"createSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"sentry\"},\"version\":{\"type\":\"number\",\"const\":1},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"connectionId\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"teamId\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},{\"type\":\"null\"}]},\"appId\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"installationId\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"organizationId\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"signingSecret\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"eventTypes\":{\"minItems\":1,\"maxItems\":1,\"type\":\"array\",\"items\":{\"type\":\"string\",\"const\":\"issue.alert\"}}},\"required\":[\"kind\",\"version\",\"name\",\"connectionId\",\"teamId\",\"appId\",\"installationId\",\"organizationId\",\"signingSecret\",\"eventTypes\"],\"additionalProperties\":false},\"updateSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"number\",\"const\":1},\"expectedRevision\":{\"type\":\"integer\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"enabled\":{\"type\":\"boolean\"},\"eventTypes\":{\"minItems\":1,\"maxItems\":200,\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9_.:]{0,127}$\"}},\"verificationToken\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"signingSecret\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"encryptKey\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256}},\"required\":[\"version\",\"expectedRevision\",\"name\",\"enabled\",\"eventTypes\"],\"additionalProperties\":false},\"kind\":\"sentry\",\"provider\":\"sentry\",\"triggerId\":\"sentry.on_issue_alert\",\"maximumBodyBytes\":65536,\"applicationIngress\":true,\"managed\":false},\"options\":false,\"eventSource\":\"sentry\"},{\"snapshot\":{\"configInputs\":[{\"handle\":\"topics\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"app/scopes_update\",\"app/uninstalled\",\"app_purchases_one_time/update\",\"app_subscriptions/approaching_capped_amount\",\"app_subscriptions/update\",\"bulk_operations/finish\",\"carts/create\",\"carts/update\",\"channels/delete\",\"checkout_and_accounts_configurations/update\",\"checkouts/create\",\"checkouts/delete\",\"checkouts/update\",\"collection_listings/add\",\"collection_listings/remove\",\"collection_listings/update\",\"collection_publications/create\",\"collection_publications/delete\",\"collection_publications/update\",\"collections/create\",\"collections/delete\",\"collections/update\",\"companies/create\",\"companies/delete\",\"companies/update\",\"company_contact_roles/assign\",\"company_contact_roles/revoke\",\"company_contacts/create\",\"company_contacts/delete\",\"company_contacts/update\",\"company_locations/create\",\"company_locations/delete\",\"company_locations/update\",\"customer.joined_segment\",\"customer.left_segment\",\"customer.tags_added\",\"customer.tags_removed\",\"customer_account_settings/update\",\"customer_groups/create\",\"customer_groups/delete\",\"customer_groups/update\",\"customers/create\",\"customers/delete\",\"customers/disable\",\"customers/enable\",\"customers/purchasing_summary\",\"customers/update\",\"customers_email_marketing_consent/update\",\"customers_marketing_consent/update\",\"delivery_promise_settings/update\",\"disputes/create\",\"disputes/update\",\"domains/create\",\"domains/destroy\",\"domains/update\",\"draft_orders/create\",\"draft_orders/delete\",\"draft_orders/update\",\"fulfillment_events/create\",\"fulfillment_events/delete\",\"fulfillment_holds/added\",\"fulfillment_holds/released\",\"fulfillment_orders/cancellation_request_accepted\",\"fulfillment_orders/cancellation_request_rejected\",\"fulfillment_orders/cancellation_request_submitted\",\"fulfillment_orders/cancelled\",\"fulfillment_orders/fulfillment_request_accepted\",\"fulfillment_orders/fulfillment_request_rejected\",\"fulfillment_orders/fulfillment_request_submitted\",\"fulfillment_orders/fulfillment_service_failed_to_complete\",\"fulfillment_orders/hold_released\",\"fulfillment_orders/line_items_prepared_for_local_delivery\",\"fulfillment_orders/line_items_prepared_for_pickup\",\"fulfillment_orders/manually_reported_progress_stopped\",\"fulfillment_orders/merged\",\"fulfillment_orders/moved\",\"fulfillment_orders/order_routing_complete\",\"fulfillment_orders/placed_on_hold\",\"fulfillment_orders/progress_reported\",\"fulfillment_orders/rescheduled\",\"fulfillment_orders/scheduled_fulfillment_order_ready\",\"fulfillment_orders/split\",\"fulfillments/create\",\"fulfillments/update\",\"inventory_items/create\",\"inventory_items/delete\",\"inventory_items/update\",\"inventory_levels/connect\",\"inventory_levels/disconnect\",\"inventory_levels/update\",\"locales/create\",\"locales/destroy\",\"locales/update\",\"locations/activate\",\"locations/create\",\"locations/deactivate\",\"locations/delete\",\"locations/update\",\"machine_translation_batch/completed\",\"metafield_definitions/create\",\"metafield_definitions/delete\",\"metafield_definitions/update\",\"order_transactions/create\",\"orders/cancelled\",\"orders/create\",\"orders/delete\",\"orders/edited\",\"orders/fulfilled\",\"orders/link_requested\",\"orders/paid\",\"orders/partially_fulfilled\",\"orders/risk_assessment_changed\",\"orders/shopify_protect_eligibility_changed\",\"orders/updated\",\"payment_schedules/due\",\"payment_terms/create\",\"payment_terms/delete\",\"payment_terms/update\",\"product_feeds/create\",\"product_feeds/full_sync\",\"product_feeds/full_sync_finish\",\"product_feeds/incremental_sync\",\"product_feeds/update\",\"product_listings/add\",\"product_listings/remove\",\"product_listings/update\",\"product_publications/create\",\"product_publications/delete\",\"product_publications/update\",\"products/create\",\"products/delete\",\"products/update\",\"profiles/create\",\"profiles/delete\",\"profiles/update\",\"publications/delete\",\"refunds/create\",\"returns/approve\",\"returns/cancel\",\"returns/close\",\"returns/decline\",\"returns/process\",\"returns/reopen\",\"returns/request\",\"returns/update\",\"reverse_deliveries/attach_deliverable\",\"reverse_fulfillment_orders/dispose\",\"scheduled_product_listings/add\",\"scheduled_product_listings/remove\",\"scheduled_product_listings/update\",\"segments/create\",\"segments/delete\",\"segments/update\",\"selling_plan_groups/create\",\"selling_plan_groups/delete\",\"selling_plan_groups/update\",\"shop/update\",\"subscription_billing_attempts/challenged\",\"subscription_billing_attempts/failure\",\"subscription_billing_attempts/success\",\"subscription_billing_cycle_edits/create\",\"subscription_billing_cycle_edits/delete\",\"subscription_billing_cycle_edits/update\",\"subscription_billing_cycles/skip\",\"subscription_billing_cycles/unskip\",\"subscription_contracts/activate\",\"subscription_contracts/cancel\",\"subscription_contracts/create\",\"subscription_contracts/expire\",\"subscription_contracts/fail\",\"subscription_contracts/pause\",\"subscription_contracts/update\",\"tax_partners/update\",\"tax_summaries/create\",\"tender_transactions/create\",\"themes/create\",\"themes/delete\",\"themes/publish\",\"themes/update\",\"variants/in_stock\",\"variants/out_of_stock\"]},\"minItems\":1,\"maxItems\":20,\"uniqueItems\":true},\"nullable\":false}],\"definitionVersion\":2,\"description\":\"Triggers when selected Shopify webhook topics occur in the connected store.\",\"displayName\":\"Store Event\",\"endpoint\":{\"body\":{\"allowArray\":false,\"allowEmpty\":false,\"formats\":[\"json\"]},\"methods\":[\"POST\"],\"successStatus\":202},\"key\":\"shopify.on_shop_event\",\"name\":\"on_shop_event\",\"outputs\":[{\"handle\":\"apiVersion\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false},{\"handle\":\"eventId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"shopDomain\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"topic\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"triggeredAt\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"webhookId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false}],\"provider\":\"shopify\",\"type\":\"integration\"},\"callback\":{\"headers\":[\"x-shopify-api-version\",\"x-shopify-event-id\",\"x-shopify-shop-domain\",\"x-shopify-topic\",\"x-shopify-triggered-at\",\"x-shopify-webhook-id\"],\"query\":[\"open_flow_callback\"]},\"options\":false},{\"snapshot\":{\"configInputs\":[{\"handle\":\"channelId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^[CDG][A-Z0-9]{2,31}$\"},\"nullable\":false,\"description\":\"Slack conversation ID to watch, e.g. C0122KQ70S7E.\"},{\"handle\":\"fromUserIds\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[UW][A-Z0-9]{2,31}$\"}},\"nullable\":false,\"value\":[],\"description\":\"Only trigger on messages written by these Slack user IDs. Empty means any author.\"},{\"handle\":\"ignoreUserIds\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[UW][A-Z0-9]{2,31}$\"}},\"nullable\":false,\"value\":[],\"description\":\"Never trigger on messages written by these Slack user IDs.\"},{\"handle\":\"textContains\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false,\"value\":\"\",\"description\":\"Only trigger when message text contains this string, case-insensitively.\"},{\"group\":\"Advanced settings\",\"collapsed\":true},{\"handle\":\"includeBotMessages\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false,\"description\":\"Also trigger on messages posted by bots and apps.\"},{\"handle\":\"includeSystemMessages\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false,\"description\":\"Also trigger on Slack system notices.\"},{\"handle\":\"maxMessagesPerPoll\",\"jsonSchema\":{\"type\":\"integer\",\"minimum\":1,\"maximum\":100},\"nullable\":false,\"value\":15,\"description\":\"Maximum number of messages processed per poll.\"}],\"definitionVersion\":2,\"description\":\"Polls one Slack conversation and triggers when a new message is posted to it.\",\"displayName\":\"New Channel Message\",\"key\":\"slack.on_message_posted\",\"name\":\"on_message_posted\",\"outputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"botId\":{\"type\":[\"string\",\"null\"]},\"channelId\":{\"type\":\"string\"},\"files\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"},\"mimetype\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"id\",\"name\",\"mimetype\"]}},\"messageTs\":{\"type\":\"string\"},\"subtype\":{\"type\":[\"string\",\"null\"]},\"text\":{\"type\":\"string\"},\"threadTs\":{\"type\":[\"string\",\"null\"]},\"userId\":{\"type\":[\"string\",\"null\"]}},\"additionalProperties\":false,\"required\":[\"channelId\",\"messageTs\",\"threadTs\",\"userId\",\"botId\",\"subtype\",\"text\",\"files\"]}},\"nullable\":false}],\"provider\":\"slack\",\"type\":\"poll\"},\"options\":false},{\"snapshot\":{\"key\":\"slackbot.on_event\",\"provider\":\"slackbot\",\"name\":\"on_event\",\"displayName\":\"Mention or Direct Message\",\"description\":\"Receives user mentions and new direct messages through a shared Slack application event source. Slack Connect events are excluded.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"sourceId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^source_[0-9a-f]{32}$\",\"title\":\"Event source\"},\"nullable\":false},{\"handle\":\"eventTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"app_mention\",\"message.im\"]},\"minItems\":1,\"maxItems\":2,\"uniqueItems\":true,\"title\":\"Events\"},\"nullable\":false,\"value\":[\"app_mention\",\"message.im\"]},{\"handle\":\"channelIds\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"minLength\":1},\"maxItems\":100,\"uniqueItems\":true,\"title\":\"Channel IDs\"},\"nullable\":true}],\"outputs\":[{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"appId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"teamId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"channel\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"user\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"text\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"ts\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"threadTs\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":true},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false}]},\"callback\":{\"headers\":[],\"query\":[]},\"source\":{\"createSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"slack\"},\"version\":{\"type\":\"number\",\"const\":1},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"connectionId\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"teamId\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},{\"type\":\"null\"}]},\"appId\":{\"type\":\"string\",\"pattern\":\"^A[A-Z0-9]+$\"},\"workspaceId\":{\"type\":\"string\",\"pattern\":\"^T[A-Z0-9]+$\"},\"signingSecret\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"eventTypes\":{\"minItems\":1,\"maxItems\":2,\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"app_mention\",\"message.im\"]}}},\"required\":[\"kind\",\"version\",\"name\",\"connectionId\",\"teamId\",\"appId\",\"workspaceId\",\"signingSecret\",\"eventTypes\"],\"additionalProperties\":false},\"updateSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"number\",\"const\":1},\"expectedRevision\":{\"type\":\"integer\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"enabled\":{\"type\":\"boolean\"},\"eventTypes\":{\"minItems\":1,\"maxItems\":200,\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9_.:]{0,127}$\"}},\"verificationToken\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"signingSecret\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"encryptKey\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256}},\"required\":[\"version\",\"expectedRevision\",\"name\",\"enabled\",\"eventTypes\"],\"additionalProperties\":false},\"kind\":\"slack\",\"provider\":\"slackbot\",\"triggerId\":\"slackbot.on_event\",\"maximumBodyBytes\":65536,\"applicationIngress\":true,\"managed\":false},\"options\":false,\"eventSource\":\"slack\"},{\"snapshot\":{\"configInputs\":[{\"handle\":\"apiVersion\",\"jsonSchema\":{\"type\":\"string\",\"maxLength\":40},\"nullable\":false,\"value\":\"\"},{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"maxLength\":120,\"pattern\":\"^(\\\\*|[a-z0-9_]+(?:\\\\.[a-z0-9_]+)+)$\"},\"minItems\":1,\"uniqueItems\":true},\"nullable\":false},{\"handle\":\"includeConnectedAccounts\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":false}],\"definitionVersion\":2,\"description\":\"Triggers when selected Stripe events happen on the connected account.\",\"displayName\":\"Account Event\",\"endpoint\":{\"body\":{\"allowArray\":false,\"allowEmpty\":false,\"formats\":[\"json\"]},\"methods\":[\"POST\"],\"successStatus\":202},\"key\":\"stripe.on_event\",\"name\":\"on_event\",\"outputs\":[{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false},{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"eventId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"livemode\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false}],\"provider\":\"stripe\",\"type\":\"integration\"},\"callback\":{\"headers\":[\"stripe-signature\"],\"query\":[]},\"options\":false},{\"snapshot\":{\"configInputs\":[{\"handle\":\"formId\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128,\"title\":\"Form\"},\"nullable\":false,\"description\":\"Choose a form accessible to this Connection.\"}],\"definitionVersion\":2,\"description\":\"Receives new Tally form submissions through a signed, automatically managed webhook.\",\"displayName\":\"Form Response\",\"endpoint\":{\"body\":{\"allowArray\":false,\"allowEmpty\":false,\"formats\":[\"json\"]},\"methods\":[\"POST\"],\"successStatus\":200},\"key\":\"tally.on_form_response\",\"name\":\"on_form_response\",\"outputs\":[{\"handle\":\"response\",\"nullable\":false,\"jsonSchema\":{\"type\":\"object\",\"properties\":{\"eventId\":{\"type\":\"string\"},\"createdAt\":{\"type\":\"string\"},\"formId\":{\"type\":\"string\"},\"submissionId\":{\"type\":\"string\"},\"responseId\":{\"type\":\"string\"},\"fields\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"key\":{\"type\":\"string\"},\"type\":{\"type\":\"string\"},\"label\":{\"type\":[\"string\",\"null\"]},\"value\":{},\"options\":{\"type\":\"array\",\"items\":{\"type\":\"object\"}}},\"required\":[\"key\",\"type\",\"label\",\"value\"]}}},\"required\":[\"eventId\",\"createdAt\",\"formId\",\"submissionId\",\"responseId\",\"fields\"]}}],\"provider\":\"tally\",\"type\":\"integration\"},\"callback\":{\"headers\":[\"tally-signature\"],\"query\":[]},\"options\":true},{\"snapshot\":{\"configInputs\":[{\"handle\":\"chatIds\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^-?[0-9]{1,20}$\"},\"maxItems\":100,\"uniqueItems\":true},\"nullable\":false,\"value\":[],\"description\":\"Only accept updates from these numeric Telegram chat IDs. Empty means every chat.\"},{\"handle\":\"dropPendingUpdates\",\"jsonSchema\":{\"type\":\"boolean\"},\"nullable\":false,\"value\":true,\"description\":\"Discard updates queued before the webhook is created or resumed.\"},{\"handle\":\"updates\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"enum\":[\"*\",\"message\",\"edited_message\",\"channel_post\",\"edited_channel_post\",\"business_connection\",\"business_message\",\"edited_business_message\",\"deleted_business_messages\",\"guest_message\",\"message_reaction\",\"message_reaction_count\",\"inline_query\",\"chosen_inline_result\",\"callback_query\",\"shipping_query\",\"pre_checkout_query\",\"purchased_paid_media\",\"poll\",\"poll_answer\",\"my_chat_member\",\"chat_member\",\"chat_join_request\",\"chat_boost\",\"removed_chat_boost\",\"managed_bot\",\"subscription\"]},\"minItems\":1,\"uniqueItems\":true},\"nullable\":false,\"description\":\"Telegram update types that trigger a Run. Use * for the Telegram default set.\"},{\"handle\":\"userIds\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[0-9]{1,20}$\"},\"maxItems\":100,\"uniqueItems\":true},\"nullable\":false,\"value\":[],\"description\":\"Only accept updates from these numeric Telegram user IDs. Empty means every user.\"}],\"definitionVersion\":2,\"description\":\"Triggers when the connected Telegram bot receives a selected update.\",\"displayName\":\"Bot Update\",\"endpoint\":{\"body\":{\"allowArray\":false,\"allowEmpty\":false,\"formats\":[\"json\"]},\"methods\":[\"POST\"],\"successStatus\":200},\"key\":\"telegram.on_update\",\"name\":\"on_update\",\"outputs\":[{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false}],\"provider\":\"telegram\",\"type\":\"integration\"},\"callback\":{\"headers\":[\"x-telegram-bot-api-secret-token\"],\"query\":[]},\"options\":false},{\"snapshot\":{\"key\":\"typeform.on_form_response\",\"provider\":\"typeform\",\"name\":\"on_form_response\",\"displayName\":\"Completed Form Response\",\"description\":\"Receives complete Typeform submissions through an automatically managed signed webhook.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"formId\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128,\"title\":\"Form ID\"},\"nullable\":false}],\"outputs\":[{\"handle\":\"response\",\"nullable\":false,\"jsonSchema\":{\"type\":\"object\",\"properties\":{\"eventId\":{\"type\":\"string\"},\"form_id\":{\"type\":\"string\"},\"token\":{\"type\":\"string\"},\"submitted_at\":{\"type\":\"string\"},\"answers\":{\"type\":\"array\",\"items\":{\"type\":\"object\"}},\"definition\":{\"type\":\"object\"}},\"required\":[\"eventId\",\"form_id\",\"token\",\"submitted_at\",\"answers\"]}}]},\"callback\":{\"headers\":[\"typeform-signature\"],\"query\":[]},\"options\":false},{\"snapshot\":{\"key\":\"vercel.on_deployment_event\",\"provider\":\"vercel\",\"name\":\"on_deployment_event\",\"displayName\":\"Deployment Ready or Failed\",\"description\":\"Receives successful and failed deployments for a Vercel project.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"teamId\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256,\"title\":\"Team ID\"},\"nullable\":false},{\"handle\":\"projectId\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256,\"title\":\"Project ID\"},\"nullable\":false},{\"handle\":\"environment\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"all\",\"production\",\"preview\"],\"title\":\"Environment\"},\"nullable\":false,\"value\":\"all\"}],\"outputs\":[{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\",\"enum\":[\"deployment.ready\",\"deployment.error\"]},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"deploymentId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"projectId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false}]},\"callback\":{\"headers\":[\"x-vercel-signature\"],\"query\":[]},\"options\":false},{\"snapshot\":{\"configInputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"coupon.created\",\"coupon.updated\",\"coupon.deleted\",\"coupon.restored\",\"customer.created\",\"customer.updated\",\"customer.deleted\",\"order.created\",\"order.updated\",\"order.deleted\",\"order.restored\",\"product.created\",\"product.updated\",\"product.deleted\",\"product.restored\",\"product.published\"]},\"minItems\":1,\"maxItems\":16,\"uniqueItems\":true},\"nullable\":false},{\"handle\":\"webhookName\",\"jsonSchema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":120},\"nullable\":false,\"value\":\"OOMOL Trigger\"}],\"definitionVersion\":2,\"description\":\"Triggers when selected WooCommerce store events occur.\",\"displayName\":\"Store Event\",\"endpoint\":{\"body\":{\"allowArray\":false,\"allowEmpty\":false,\"formats\":[\"json\"]},\"methods\":[\"POST\"],\"successStatus\":202},\"key\":\"woocommerce.on_store_event\",\"name\":\"on_store_event\",\"outputs\":[{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"resource\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"source\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"topic\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"webhookId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false}],\"provider\":\"woocommerce\",\"type\":\"integration\"},\"callback\":{\"headers\":[\"x-wc-webhook-delivery-id\",\"x-wc-webhook-event\",\"x-wc-webhook-id\",\"x-wc-webhook-resource\",\"x-wc-webhook-signature\",\"x-wc-webhook-source\",\"x-wc-webhook-topic\"],\"query\":[]},\"options\":false},{\"snapshot\":{\"configInputs\":[{\"handle\":\"events\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"zen:event-type:ticket.agent_assignment_changed\",\"zen:event-type:ticket.attachment_linked_to_comment\",\"zen:event-type:ticket.attachment_redacted_from_comment\",\"zen:event-type:ticket.brand_changed\",\"zen:event-type:ticket.comment_added\",\"zen:event-type:ticket.comment_made_private\",\"zen:event-type:ticket.comment_redacted\",\"zen:event-type:ticket.created\",\"zen:event-type:ticket.csat_received\",\"zen:event-type:ticket.csat_requested\",\"zen:event-type:ticket.custom_field_changed\",\"zen:event-type:ticket.custom_status_changed\",\"zen:event-type:ticket.description_changed\",\"zen:event-type:ticket.email_ccs_changed\",\"zen:event-type:ticket.external_id_changed\",\"zen:event-type:ticket.followers_changed\",\"zen:event-type:ticket.form_changed\",\"zen:event-type:ticket.group_assignment_changed\",\"zen:event-type:ticket.marked_as_spam\",\"zen:event-type:ticket.merged\",\"zen:event-type:ticket.next_sla_breach_changed\",\"zen:event-type:ticket.ola_policy_changed\",\"zen:event-type:ticket.organization_changed\",\"zen:event-type:ticket.permanently_deleted\",\"zen:event-type:ticket.priority_changed\",\"zen:event-type:ticket.problem_link_changed\",\"zen:event-type:ticket.requester_changed\",\"zen:event-type:ticket.schedule_changed\",\"zen:event-type:ticket.sla_policy_changed\",\"zen:event-type:ticket.soft_deleted\",\"zen:event-type:ticket.status_changed\",\"zen:event-type:ticket.subject_changed\",\"zen:event-type:ticket.submitter_changed\",\"zen:event-type:ticket.tags_changed\",\"zen:event-type:ticket.task_due_at_changed\",\"zen:event-type:ticket.type_changed\",\"zen:event-type:ticket.undeleted\",\"zen:event-type:organization.created\",\"zen:event-type:organization.custom_field_changed\",\"zen:event-type:organization.deleted\",\"zen:event-type:organization.external_id_changed\",\"zen:event-type:organization.name_changed\",\"zen:event-type:organization.tags_changed\",\"zen:event-type:user.active_changed\",\"zen:event-type:user.alias_changed\",\"zen:event-type:user.created\",\"zen:event-type:user.custom_field_changed\",\"zen:event-type:user.custom_role_changed\",\"zen:event-type:user.default_group_changed\",\"zen:event-type:user.deleted\",\"zen:event-type:user.details_changed\",\"zen:event-type:user.external_id_changed\",\"zen:event-type:user.group_membership_created\",\"zen:event-type:user.group_membership_deleted\",\"zen:event-type:user.identity_changed\",\"zen:event-type:user.identity_created\",\"zen:event-type:user.identity_deleted\",\"zen:event-type:user.last_login_changed\",\"zen:event-type:user.merged\",\"zen:event-type:user.name_changed\",\"zen:event-type:user.notes_changed\",\"zen:event-type:user.only_private_comments_changed\",\"zen:event-type:user.organization_membership_created\",\"zen:event-type:user.organization_membership_deleted\",\"zen:event-type:user.password_changed\",\"zen:event-type:user.photo_changed\",\"zen:event-type:user.role_changed\",\"zen:event-type:user.suspended_changed\",\"zen:event-type:user.tags_changed\",\"zen:event-type:user.time_zone_changed\"]},\"minItems\":1,\"uniqueItems\":true},\"nullable\":false}],\"definitionVersion\":2,\"description\":\"Triggers when one of the selected Zendesk account events occurs.\",\"displayName\":\"Event Subscription\",\"endpoint\":{\"body\":{\"allowArray\":false,\"allowEmpty\":false,\"formats\":[\"json\"]},\"methods\":[\"POST\"],\"successStatus\":202},\"key\":\"zendesk.on_event\",\"name\":\"on_event\",\"outputs\":[{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"subject\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false}],\"provider\":\"zendesk\",\"type\":\"integration\"},\"callback\":{\"headers\":[\"x-zendesk-webhook-signature\",\"x-zendesk-webhook-signature-timestamp\"],\"query\":[]},\"options\":false},{\"snapshot\":{\"key\":\"zoom.on_recording_ready\",\"provider\":\"zoom\",\"name\":\"on_recording_ready\",\"displayName\":\"Cloud Recording Ready\",\"description\":\"Receives completed cloud recordings hosted by the connected Zoom user through a verified application event source.\",\"definitionVersion\":2,\"type\":\"integration\",\"endpoint\":{\"methods\":[\"POST\"],\"body\":{\"formats\":[\"json\"],\"allowArray\":false,\"allowEmpty\":false},\"successStatus\":200},\"configInputs\":[{\"handle\":\"sourceId\",\"jsonSchema\":{\"type\":\"string\",\"pattern\":\"^source_[0-9a-f]{32}$\",\"title\":\"Event source\"},\"nullable\":false},{\"handle\":\"eventTypes\",\"jsonSchema\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"recording.completed\"]},\"minItems\":1,\"maxItems\":1,\"uniqueItems\":true,\"title\":\"Events\"},\"nullable\":false,\"value\":[\"recording.completed\"]}],\"outputs\":[{\"handle\":\"event\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"deliveryId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"accountId\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"meetingUuid\",\"jsonSchema\":{\"type\":\"string\"},\"nullable\":false},{\"handle\":\"body\",\"jsonSchema\":{\"type\":\"object\"},\"nullable\":false}]},\"callback\":{\"headers\":[],\"query\":[]},\"source\":{\"createSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"kind\":{\"type\":\"string\",\"const\":\"zoom\"},\"version\":{\"type\":\"number\",\"const\":1},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"connectionId\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"teamId\":{\"anyOf\":[{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},{\"type\":\"null\"}]},\"appId\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"signingSecret\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"eventTypes\":{\"minItems\":1,\"maxItems\":1,\"type\":\"array\",\"items\":{\"type\":\"string\",\"const\":\"recording.completed\"}}},\"required\":[\"kind\",\"version\",\"name\",\"connectionId\",\"teamId\",\"appId\",\"signingSecret\",\"eventTypes\"],\"additionalProperties\":false},\"updateSchema\":{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"type\":\"object\",\"properties\":{\"version\":{\"type\":\"number\",\"const\":1},\"expectedRevision\":{\"type\":\"integer\",\"exclusiveMinimum\":0,\"maximum\":9007199254740991},\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":128},\"enabled\":{\"type\":\"boolean\"},\"eventTypes\":{\"minItems\":1,\"maxItems\":200,\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9_.:]{0,127}$\"}},\"verificationToken\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"signingSecret\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256},\"encryptKey\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":256}},\"required\":[\"version\",\"expectedRevision\",\"name\",\"enabled\",\"eventTypes\"],\"additionalProperties\":false},\"kind\":\"zoom\",\"provider\":\"zoom\",\"triggerId\":\"zoom.on_recording_ready\",\"maximumBodyBytes\":65536,\"applicationIngress\":true,\"managed\":false},\"options\":false,\"eventSource\":\"zoom\"}]");
17027
17027
  //#endregion
17028
17028
  //#region src/control/common/eventSourceSchemas.ts
17029
17029
  function requestSchema(schema) {