@uipath/maestro-builder-sdk 6.101.0 → 6.102.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-index.md +14 -14
- package/dist/api-members.md +16 -16
- package/dist/core/actions.d.ts +6 -0
- package/dist/core/actions.js +7 -0
- package/dist/core/binding-messages.d.ts +33 -1
- package/dist/core/binding-messages.js +51 -0
- package/dist/core/connector-option-keys.d.ts +4 -0
- package/dist/core/connector-option-keys.js +9 -0
- package/dist/core/event-subscription.d.ts +8 -0
- package/dist/core/event-subscription.js +2 -4
- package/dist/core/nodes/node-type.d.ts +25 -0
- package/dist/core/nodes/versioned.d.ts +3 -1
- package/dist/core/nodes/versioned.js +1 -0
- package/dist/core/option-keys.d.ts +62 -0
- package/dist/core/option-keys.js +66 -0
- package/dist/core/refusals.d.ts +3 -0
- package/dist/core/refusals.js +5 -0
- package/dist/flow-node-type.d.ts +31 -1
- package/dist/flow-option-keys.d.ts +22 -0
- package/dist/flow-option-keys.js +33 -0
- package/dist/flow-sdk.js +5 -9
- package/dist/nodes/agent/flow/inline-agent.js +2 -4
- package/dist/nodes/agent/flow/node-type.js +12 -0
- package/dist/nodes/ai-patterns/flow/node-type.js +6 -0
- package/dist/nodes/connector/flow/event-trigger.js +4 -2
- package/dist/nodes/connector/flow/event-wait.js +4 -2
- package/dist/nodes/connector/flow/node-type.js +5 -4
- package/dist/nodes/connector/flow/raw-node.js +1 -1
- package/dist/nodes/conversation/flow/node-type.js +9 -0
- package/dist/nodes/data-fabric/flow/verbs.js +10 -0
- package/dist/nodes/delay/flow/node-type.js +4 -0
- package/dist/nodes/document/flow/ixp.js +4 -0
- package/dist/nodes/document/flow/node-type.js +6 -0
- package/dist/nodes/hitl/flow/node-type.js +4 -0
- package/dist/nodes/http/flow/check.js +55 -0
- package/dist/nodes/http/flow/node-type.js +7 -4
- package/dist/nodes/process/flow/node-type.js +10 -0
- package/dist/nodes/queue/flow/node-type.js +4 -0
- package/dist/nodes/script/flow/node-type.js +4 -0
- package/dist/nodes/transform/flow/node-type.js +4 -0
- package/dist/nodes/trigger/flow/node-type.js +6 -0
- package/dist/serialize.js +73 -1
- package/package.json +2 -2
package/dist/api-index.md
CHANGED
|
@@ -49,7 +49,7 @@ could hand you spans for a version you do not have.
|
|
|
49
49
|
| `ActionSchemaFile` | interface | `dist/nodes/hitl/flow/spec.d.ts:281-291` | Supporting types | A coded action app's `action-schema.json`. |
|
|
50
50
|
| `ActionSchemaProperty` | interface | `dist/nodes/hitl/flow/spec.d.ts:255-273` | Supporting types | One property of an `action-schema.json` section. |
|
|
51
51
|
| `ActionSchemaSection` | interface | `dist/nodes/hitl/flow/spec.d.ts:274-280` | Supporting types | One section (`inputs`, `outputs`, `inOuts`, `outcomes`) of an `action-schema.json`. |
|
|
52
|
-
| `ActionSpec` | type | `dist/core/actions.d.ts:
|
|
52
|
+
| `ActionSpec` | type | `dist/core/actions.d.ts:958-966` | Supporting types | One action step's spec: `{ kind }` plus that kind's body from FlowActionSpecs, for every kind there. |
|
|
53
53
|
| `agent` | function | `dist/nodes/process/flow/factories.d.ts:159-213` | Actions | Invoke an AGENT resource — either one published to Orchestrator or a sibling agent project registered in the same… |
|
|
54
54
|
| `AgentFlavour` | type | `dist/nodes/process/flow/spec.d.ts:294-298` | Supporting types | Which KIND of agent project was published behind a `uipath.core.agent.<key>` resource. |
|
|
55
55
|
| `AgentGuardrail` | type | `dist/core/actions.d.ts:410` | Supporting types | |
|
|
@@ -89,8 +89,8 @@ could hand you spans for a version you do not have.
|
|
|
89
89
|
| `ClassificationClass` | interface | `dist/nodes/document/flow/spec.d.ts:47-55` | Supporting types | One document type in a ClassificationSchema. |
|
|
90
90
|
| `ClassificationSchema` | interface | `dist/nodes/document/flow/spec.d.ts:40-46` | Supporting types | The taxonomy of a `documentClassify()` step: what the classifier chooses between. |
|
|
91
91
|
| `ClientSideToolRef` | interface | `dist/core/actions.d.ts:509-538` | Supporting types | A CLIENT-side tool: the agent asks the CALLING application to run it and hand the answer back… |
|
|
92
|
-
| `connector` | function | `dist/core/actions.d.ts:
|
|
93
|
-
| `connector` | function | `dist/core/actions.d.ts:
|
|
92
|
+
| `connector` | function | `dist/core/actions.d.ts:995-1018` | Actions | Declare an Integration Service connector action — the typed form, where a generated descriptor supplies the nodeType and… |
|
|
93
|
+
| `connector` | function | `dist/core/actions.d.ts:1019-1035` | Actions | Stringly form, for a connector with no prepared module — `connector('uipath-salesforce-slack',… |
|
|
94
94
|
| `ConnectorDescriptor` | type | `dist/core/connectors.d.ts:102-110` | Generated descriptors | A generated, typed connector descriptor: ConnectorMeta branded with phantom input/output types. |
|
|
95
95
|
| `ConnectorLookupValue` | type | `dist/core/connectors.d.ts:63-72` | Generated descriptors | ConnectorValue for a field that also accepts an unresolved lookup. |
|
|
96
96
|
| `ConnectorMeta` | interface | `dist/core/connectors.d.ts:73-101` | Generated descriptors | Runtime metadata a generated descriptor carries. |
|
|
@@ -145,8 +145,8 @@ could hand you spans for a version you do not have.
|
|
|
145
145
|
| `err` | function | `dist/core/expr.d.ts:153-246` | Expressions and types | Reference a FAILED step's error → `$vars.<step>.error[.<field>]`. |
|
|
146
146
|
| `ErrorEnvelopeField` | type | `dist/core/expr.d.ts:142-152` | Supporting types | The fields a failure envelope carries. |
|
|
147
147
|
| `EscalationRef` | interface | `dist/core/actions.d.ts:808-874` | Supporting types | One escalation an inline agent may raise — an Action Center app task a human completes (the `coded-action-app` variant,… |
|
|
148
|
-
| `EventFilter` | type | `dist/core/actions.d.ts:
|
|
149
|
-
| `EventSubscription` | interface | `dist/core/actions.d.ts:
|
|
148
|
+
| `EventFilter` | type | `dist/core/actions.d.ts:1036-1087` | Supporting types | One filter condition on the event payload. |
|
|
149
|
+
| `EventSubscription` | interface | `dist/core/actions.d.ts:1161-1202` | Option shapes | What a connector event subscribes to. |
|
|
150
150
|
| `Expr` | class | `dist/core/expr.d.ts:11-21` | Supporting types | A Flow expression. |
|
|
151
151
|
| `FieldMapping` | interface | `dist/nodes/transform/flow/spec.d.ts:27-34` | Supporting types | 3 field(s) |
|
|
152
152
|
| `FilterCondition` | type | `dist/nodes/transform/flow/spec.d.ts:10-11` | Supporting types | Comparison a filter rule applies to a field. |
|
|
@@ -155,7 +155,7 @@ could hand you spans for a version you do not have.
|
|
|
155
155
|
| `flow` | function | `dist/flow-sdk.d.ts:1664-1679` | Flow construction | Start building a flow with the given id. |
|
|
156
156
|
| `FlowAction` | class | `dist/core/node-classes.d.ts:171-177` | Supporting types | A node placed as a step — pass an instance to `.step(name, …)`. |
|
|
157
157
|
| `FlowActionSpec` | type | `dist/flow-sdk.d.ts:61-62` | Supporting types | What `.step()` accepts here: the shared actions plus this SDK's subflow. |
|
|
158
|
-
| `FlowActionSpecs` | interface | `dist/core/actions.d.ts:916-
|
|
158
|
+
| `FlowActionSpecs` | interface | `dist/core/actions.d.ts:916-957` | Supporting types | Every action kind, keyed by kind, to the body of its spec — the arm's fields other than `kind`. |
|
|
159
159
|
| `FlowBuilder` | class | `dist/flow-sdk.d.ts:1280-1663` | Builders | 15 member(s) |
|
|
160
160
|
| `FlowLayout` | interface | `dist/flow-sdk.d.ts:696-709` | Supporting types | Designer layout for a flow, keyed by AUTHOR-level ids: node entries by step name (plus the trigger id and `end`), edge… |
|
|
161
161
|
| `FlowMetadata` | interface | `dist/nodes/script/flow/spec.d.ts:63-95` | Actions | The instance metadata, as a script function's second parameter sees it. |
|
|
@@ -291,7 +291,7 @@ could hand you spans for a version you do not have.
|
|
|
291
291
|
| `triggerDescriptor` | function | `dist/core/connectors.d.ts:152-164` | Generated descriptors | Brand a trigger descriptor literal with its where/output types. |
|
|
292
292
|
| `TriggerDescriptor` | type | `dist/core/connectors.d.ts:143-151` | Generated descriptors | A generated, typed connector-trigger descriptor: TriggerMeta branded with phantom `where`/output types. |
|
|
293
293
|
| `TriggerMeta` | interface | `dist/core/connectors.d.ts:133-142` | Generated descriptors | Runtime metadata a generated trigger descriptor carries. |
|
|
294
|
-
| `TriggerOptions` | interface | `dist/core/actions.d.ts:
|
|
294
|
+
| `TriggerOptions` | interface | `dist/core/actions.d.ts:1113-1160` | Option shapes | The typed `onEvent`/`waitForEvent` options — everything an EventSubscription carries except `connector`/`event`, which… |
|
|
295
295
|
| `TriggerSpec` | type | `dist/nodes/trigger/flow/spec.d.ts:72-91` | Supporting types | What starts the flow. |
|
|
296
296
|
| `TypeDesc` | type | `dist/core/expr.d.ts:404` | Supporting types | |
|
|
297
297
|
| `types` | const | `dist/core/expr.d.ts:388-403` | Expressions and types | Variable type descriptors (map to Flow variable `type` values). |
|
|
@@ -304,8 +304,8 @@ could hand you spans for a version you do not have.
|
|
|
304
304
|
| `VoiceAgentInputs` | interface | `dist/nodes/agent/flow/spec.d.ts:145-183` | Option shapes | What `voiceAgent()` takes: the agent's instructions, the call it joins, how it sounds, and the resources it attaches… |
|
|
305
305
|
| `VoiceSettings` | interface | `dist/nodes/agent/flow/spec.d.ts:122-144` | Supporting types | The audio settings a voice agent speaks with. |
|
|
306
306
|
| `voiceTrigger` | function | `dist/nodes/trigger/flow/factories.d.ts:104-134` | Actions | Start the flow when a phone call comes IN (`core.trigger.voice`). |
|
|
307
|
-
| `waitForEvent` | function | `dist/core/actions.d.ts:
|
|
308
|
-
| `waitForEvent` | function | `dist/core/actions.d.ts:
|
|
307
|
+
| `waitForEvent` | function | `dist/core/actions.d.ts:1212-1247` | Actions | Wait mid-flow until a connector event fires, then continue with its payload — the typed form, where a generated trigger… |
|
|
308
|
+
| `waitForEvent` | function | `dist/core/actions.d.ts:1248-1255` | Actions | Stringly form, for an event with no prepared module. |
|
|
309
309
|
| `waitForMessage` | function | `dist/nodes/conversation/flow/factories.d.ts:27-43` | Actions | PAUSE until the person sends their next message (`uipath.conversational.wait-for-message`) — a catch event, like… |
|
|
310
310
|
| `WaitForMessageInputs` | interface | `dist/nodes/conversation/flow/spec.d.ts:28-36` | Option shapes | 2 field(s) |
|
|
311
311
|
|
|
@@ -343,7 +343,7 @@ could hand you spans for a version you do not have.
|
|
|
343
343
|
| `CaseBuilder` | class | `dist/case/case-sdk.d.ts:1868-2157` | Builders | 18 member(s) |
|
|
344
344
|
| `CaseConnectorOpts` | interface | `dist/case/case-sdk.d.ts:524-547` | Option shapes | TaskBuilder.connector's options: the Flow `connector()` options, plus the fields a decompiled task carries. |
|
|
345
345
|
| `CaseDocumentExtractionSpec` | interface | `dist/case/case-sdk.d.ts:620-665` | Supporting types | A document-extraction task's IXP deployment and inputs (`.documentExtraction()`). |
|
|
346
|
-
| `CaseEventFilter` | type | `dist/core/actions.d.ts:
|
|
346
|
+
| `CaseEventFilter` | type | `dist/core/actions.d.ts:1088-1112` | Supporting types | A Case event filter: an EventFilter, or a text test or equality whose value is computed at runtime from a Case… |
|
|
347
347
|
| `CaseEventSubscription` | type | `dist/case/case-sdk.d.ts:492-499` | Option shapes | A Case wait's connector subscription: an EventSubscription whose `filters` may compare against a case expression… |
|
|
348
348
|
| `CaseHttpRequestSpec` | interface | `dist/case/case-sdk.d.ts:568-610` | Supporting types | An HTTP request task's request (`.httpRequest()`). |
|
|
349
349
|
| `CaseLayout` | interface | `dist/case/case-sdk.d.ts:1149-1160` | Supporting types | Optional Case designer layout, keyed by author-level stage and trigger names. |
|
|
@@ -368,9 +368,9 @@ could hand you spans for a version you do not have.
|
|
|
368
368
|
| `EscalationOpts` | interface | `dist/case/case-sdk.d.ts:194-206` | Option shapes | 4 field(s) |
|
|
369
369
|
| `EscalationRecipient` | interface | `dist/case/case-sdk.d.ts:186-193` | Supporting types | Who an escalation notifies. |
|
|
370
370
|
| `EscalationTrigger` | type | `dist/case/case-sdk.d.ts:184-185` | Supporting types | When an escalation fires: as the deadline approaches (`at-risk`) or once it passes (`sla-breached`). |
|
|
371
|
-
| `EventFilter` | type | `dist/core/actions.d.ts:
|
|
371
|
+
| `EventFilter` | type | `dist/core/actions.d.ts:1036-1087` | Supporting types | One filter condition on the event payload. |
|
|
372
372
|
| `EventFilterExpression` | interface | `dist/core/event-filters.d.ts:131-146` | Supporting types | A filter value computed at runtime: the field is compared against a Case expression, `=vars.<path>` or… |
|
|
373
|
-
| `EventSubscription` | interface | `dist/core/actions.d.ts:
|
|
373
|
+
| `EventSubscription` | interface | `dist/core/actions.d.ts:1161-1202` | Option shapes | What a connector event subscribes to. |
|
|
374
374
|
| `eventTrigger` | function | `dist/case/case-sdk.d.ts:379-389` | Case authoring | An Integration Service **event** trigger — an external event (a new row, an email, a webhook) starts the case. |
|
|
375
375
|
| `eventTrigger` | function | `dist/case/case-sdk.d.ts:390-396` | Case authoring | An Integration Service event trigger in placeholder or stringly-resolved form. |
|
|
376
376
|
| `EventTriggerOpts` | interface | `dist/case/case-sdk.d.ts:326-366` | Option shapes | 5 field(s) |
|
|
@@ -413,7 +413,7 @@ could hand you spans for a version you do not have.
|
|
|
413
413
|
| `toUser` | function | `dist/case/case-sdk.d.ts:217-232` | Case authoring | An escalation recipient that is a single user. |
|
|
414
414
|
| `TriggerDescriptor` | type | `dist/core/connectors.d.ts:143-151` | Supporting types | A generated, typed connector-trigger descriptor: TriggerMeta branded with phantom `where`/output types. |
|
|
415
415
|
| `TriggerMeta` | interface | `dist/core/connectors.d.ts:133-142` | Supporting types | Runtime metadata a generated trigger descriptor carries. |
|
|
416
|
-
| `TriggerOptions` | interface | `dist/core/actions.d.ts:
|
|
416
|
+
| `TriggerOptions` | interface | `dist/core/actions.d.ts:1113-1160` | Option shapes | The typed `onEvent`/`waitForEvent` options — everything an EventSubscription carries except `connector`/`event`, which… |
|
|
417
417
|
| `TypeDesc` | type | `dist/core/expr.d.ts:404` | Supporting types | |
|
|
418
418
|
| `UnresolvedReferenceTaskKind` | type | `dist/case/case-sdk.d.ts:461-470` | Supporting types | Task kinds that the Case schema permits as unresolved skeletons: the published-resource kinds, `action` (a human task… |
|
|
419
419
|
| `WaitConnectorPlaceholderSpec` | interface | `dist/case/case-sdk.d.ts:471-486` | Supporting types | A `wait-for-connector` subscription: suspend on an Integration Service event. |
|
|
@@ -474,7 +474,7 @@ could hand you spans for a version you do not have.
|
|
|
474
474
|
| `errorSchema` | const | `dist/bpmn/bpmn-sdk.d.ts:3924-3965` | BPMN authoring | The `Error` variable's shape — the platform's own error envelope. |
|
|
475
475
|
| `errorSchemaWithResponse` | const | `dist/bpmn/bpmn-sdk.d.ts:3966-3998` | BPMN authoring | The same envelope plus `response` — what a node whose failure carries a payload writes, and what the same source calls… |
|
|
476
476
|
| `EventDef` | type | `dist/bpmn/bpmn-sdk.d.ts:56-74` | Supporting types | The resolved event definition attached to an event node. |
|
|
477
|
-
| `EventFilter` | type | `dist/core/actions.d.ts:
|
|
477
|
+
| `EventFilter` | type | `dist/core/actions.d.ts:1036-1087` | Supporting types | One filter condition on the event payload. |
|
|
478
478
|
| `EventKind` | type | `dist/bpmn/bpmn-sdk.d.ts:77-78` | Supporting types | The four non-boundary event element kinds a BpmnNode can be. |
|
|
479
479
|
| `EventSubProcessOpts` | interface | `dist/bpmn/bpmn-sdk.d.ts:2092-2156` | Option shapes | Options for ScopeBuilder.eventSubProcess. |
|
|
480
480
|
| `ExtensionPayload` | interface | `dist/bpmn/bpmn-sdk.d.ts:627-719` | Supporting types | An extension payload carried by an element the payload does not describe. |
|
package/dist/api-members.md
CHANGED
|
@@ -172,19 +172,19 @@ not find it either.
|
|
|
172
172
|
| `connection` | property | `ConnectorOpts` | `dist/core/actions.d.ts:19-23` |
|
|
173
173
|
| `connection` | property | `ConnectorToolRef` | `dist/core/actions.d.ts:677-684` |
|
|
174
174
|
| `connection` | property | `DataServiceOpts` | `dist/bpmn/bpmn-sdk.d.ts:1269-1275` |
|
|
175
|
-
| `connection` | property | `EventSubscription` | `dist/core/actions.d.ts:
|
|
175
|
+
| `connection` | property | `EventSubscription` | `dist/core/actions.d.ts:1194-1198` |
|
|
176
176
|
| `connection` | property | `ExternalTaskOptions` | `dist/case/case-sdk.d.ts:715-716` |
|
|
177
177
|
| `connection` | property | `ExternalTaskOpts` | `dist/bpmn/bpmn-sdk.d.ts:1746-1747` |
|
|
178
178
|
| `connection` | property | `HttpOpts` | `dist/bpmn/bpmn-sdk.d.ts:1332-1360` |
|
|
179
179
|
| `connection` | property | `HttpRequestConnector` | `dist/case/case-sdk.d.ts:615-616` |
|
|
180
|
-
| `connection` | property | `TriggerOptions` | `dist/core/actions.d.ts:
|
|
180
|
+
| `connection` | property | `TriggerOptions` | `dist/core/actions.d.ts:1151-1155` |
|
|
181
181
|
| `connections` | property | `HitlRecipient` | `dist/nodes/hitl/flow/spec.d.ts:70-74` |
|
|
182
182
|
| `connector` | property | `BuiltTask` | `dist/case/case-sdk.d.ts:1001` |
|
|
183
183
|
| `connector` | property | `CaseHttpRequestSpec` | `dist/case/case-sdk.d.ts:605-609` |
|
|
184
184
|
| `connector` | property | `ConnectorToolRef` | `dist/core/actions.d.ts:662-663` |
|
|
185
|
-
| `connector` | property | `EventSubscription` | `dist/core/actions.d.ts:
|
|
185
|
+
| `connector` | property | `EventSubscription` | `dist/core/actions.d.ts:1163-1164` |
|
|
186
186
|
| `connector` | property | `ExternalTaskSpecData` | `dist/case/case-sdk.d.ts:743-744` |
|
|
187
|
-
| `connector` | property | `FlowActionSpecs` | `dist/core/actions.d.ts:928-
|
|
187
|
+
| `connector` | property | `FlowActionSpecs` | `dist/core/actions.d.ts:928-952` |
|
|
188
188
|
| `connector` | property | `RuleOpts` | `dist/case/case-sdk.d.ts:65-71` |
|
|
189
189
|
| `connector` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:2620-2640` |
|
|
190
190
|
| `connector` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:2641-2653` |
|
|
@@ -377,7 +377,7 @@ not find it either.
|
|
|
377
377
|
| `escalation` | property | `RuleOpts` | `dist/case/case-sdk.d.ts:78-84` |
|
|
378
378
|
| `escalations` | property | `BuiltSla` | `dist/case/case-sdk.d.ts:278` |
|
|
379
379
|
| `escalations` | property | `SlaOpts` | `dist/case/case-sdk.d.ts:268-269` |
|
|
380
|
-
| `event` | property | `EventSubscription` | `dist/core/actions.d.ts:
|
|
380
|
+
| `event` | property | `EventSubscription` | `dist/core/actions.d.ts:1165-1166` |
|
|
381
381
|
| `event` | property | `ExternalTaskOptions` | `dist/case/case-sdk.d.ts:728-733` |
|
|
382
382
|
| `event` | property | `ExternalTaskSpecData` | `dist/case/case-sdk.d.ts:741-742` |
|
|
383
383
|
| `event` | property | `TriggerMeta` | `dist/core/connectors.d.ts:137-138` |
|
|
@@ -436,8 +436,8 @@ not find it either.
|
|
|
436
436
|
| `filter` | property | `ConnectorEventOpts` | `dist/bpmn/bpmn-sdk.d.ts:1682-1697` |
|
|
437
437
|
| `filters` | property | `ConnectorEventOpts` | `dist/bpmn/bpmn-sdk.d.ts:1698-1713` |
|
|
438
438
|
| `filters` | property | `DataFabricReadInputs` | `dist/nodes/data-fabric/flow/spec.d.ts:85-86` |
|
|
439
|
-
| `filters` | property | `EventSubscription` | `dist/core/actions.d.ts:
|
|
440
|
-
| `filters` | property | `TriggerOptions` | `dist/core/actions.d.ts:
|
|
439
|
+
| `filters` | property | `EventSubscription` | `dist/core/actions.d.ts:1192-1193` |
|
|
440
|
+
| `filters` | property | `TriggerOptions` | `dist/core/actions.d.ts:1149-1150` |
|
|
441
441
|
| `flavour` | property | `AgentInputs` | `dist/nodes/process/flow/spec.d.ts:381-395` |
|
|
442
442
|
| `flowIds` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3407-3450` |
|
|
443
443
|
| `flowMode` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:2347-2386` |
|
|
@@ -452,7 +452,7 @@ not find it either.
|
|
|
452
452
|
| `folder` | property | `ConnectorToolRef` | `dist/core/actions.d.ts:685-690` |
|
|
453
453
|
| `folder` | property | `DataServiceOpts` | `dist/bpmn/bpmn-sdk.d.ts:1276-1288` |
|
|
454
454
|
| `folder` | property | `EntityRef` | `dist/core/resource-resolution.d.ts:26-27` |
|
|
455
|
-
| `folder` | property | `EventSubscription` | `dist/core/actions.d.ts:
|
|
455
|
+
| `folder` | property | `EventSubscription` | `dist/core/actions.d.ts:1199-1200` |
|
|
456
456
|
| `folder` | property | `ExternalTaskOptions` | `dist/case/case-sdk.d.ts:717-718` |
|
|
457
457
|
| `folder` | property | `ExternalTaskOpts` | `dist/bpmn/bpmn-sdk.d.ts:1748-1749` |
|
|
458
458
|
| `folder` | property | `HttpOpts` | `dist/bpmn/bpmn-sdk.d.ts:1361-1362` |
|
|
@@ -460,7 +460,7 @@ not find it either.
|
|
|
460
460
|
| `folder` | property | `OrchestratorOpts` | `dist/bpmn/bpmn-sdk.d.ts:1424-1425` |
|
|
461
461
|
| `folder` | property | `QueueItemOpts` | `dist/bpmn/bpmn-sdk.d.ts:1490-1491` |
|
|
462
462
|
| `folder` | property | `ResourceRef` | `dist/core/resource-resolution.d.ts:15-16` |
|
|
463
|
-
| `folder` | property | `TriggerOptions` | `dist/core/actions.d.ts:
|
|
463
|
+
| `folder` | property | `TriggerOptions` | `dist/core/actions.d.ts:1156-1157` |
|
|
464
464
|
| `folderKey` | property | `AgentMemoryRef` | `dist/core/actions.d.ts:583-584` |
|
|
465
465
|
| `folderKey` | property | `CaseDocumentExtractionSpec` | `dist/case/case-sdk.d.ts:639-644` |
|
|
466
466
|
| `folderKey` | property | `ContextIndexRef` | `dist/core/actions.d.ts:894-895` |
|
|
@@ -849,9 +849,9 @@ not find it either.
|
|
|
849
849
|
| `object` | property | `ConnectorEventOpts` | `dist/bpmn/bpmn-sdk.d.ts:1672-1681` |
|
|
850
850
|
| `object` | property | `ConnectorOpts` | `dist/core/actions.d.ts:26-58` |
|
|
851
851
|
| `object` | property | `ConnectorToolRef` | `dist/core/actions.d.ts:668-669` |
|
|
852
|
-
| `object` | property | `EventSubscription` | `dist/core/actions.d.ts:
|
|
852
|
+
| `object` | property | `EventSubscription` | `dist/core/actions.d.ts:1186-1191` |
|
|
853
853
|
| `object` | property | `EventTriggerOpts` | `dist/case/case-sdk.d.ts:336-349` |
|
|
854
|
-
| `object` | property | `TriggerOptions` | `dist/core/actions.d.ts:
|
|
854
|
+
| `object` | property | `TriggerOptions` | `dist/core/actions.d.ts:1138-1148` |
|
|
855
855
|
| `objectName` | property | `ConnectorMeta` | `dist/core/connectors.d.ts:79-88` |
|
|
856
856
|
| `objectName` | property | `LookupSpec` | `dist/core/lookups.d.ts:23-24` |
|
|
857
857
|
| `objectName` | property | `SelectNextStageSpec` | `dist/case/case-sdk.d.ts:405-406` |
|
|
@@ -1353,12 +1353,12 @@ not find it either.
|
|
|
1353
1353
|
| `version` | property | `ConnectorMeta` | `dist/core/connectors.d.ts:76` |
|
|
1354
1354
|
| `version` | property | `ConnectorOpts` | `dist/core/actions.d.ts:17-18` |
|
|
1355
1355
|
| `version` | property | `ConnectorToolRef` | `dist/core/actions.d.ts:666-667` |
|
|
1356
|
-
| `version` | property | `EventSubscription` | `dist/core/actions.d.ts:
|
|
1356
|
+
| `version` | property | `EventSubscription` | `dist/core/actions.d.ts:1201` |
|
|
1357
1357
|
| `version` | property | `ExternalTaskOpts` | `dist/bpmn/bpmn-sdk.d.ts:1750-1751` |
|
|
1358
1358
|
| `version` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1460-1473` |
|
|
1359
1359
|
| `version` | property | `NodeOptions` | `dist/flow-sdk.d.ts:241-248` |
|
|
1360
1360
|
| `version` | property | `TriggerMeta` | `dist/core/connectors.d.ts:139` |
|
|
1361
|
-
| `version` | property | `TriggerOptions` | `dist/core/actions.d.ts:
|
|
1361
|
+
| `version` | property | `TriggerOptions` | `dist/core/actions.d.ts:1158-1159` |
|
|
1362
1362
|
| `versions` | method | `NodeCatalog` | `dist/core/node-catalog.d.ts:15-16` |
|
|
1363
1363
|
| `versionTag` | property | `IxpExtractInputs` | `dist/nodes/document/flow/spec.d.ts:167-168` |
|
|
1364
1364
|
| `versionTag` | property | `IxpToolRef` | `dist/core/actions.d.ts:796-797` |
|
|
@@ -1367,7 +1367,7 @@ not find it either.
|
|
|
1367
1367
|
| `wait` | property | `QueueItemInputs` | `dist/nodes/queue/flow/spec.d.ts:52-62` |
|
|
1368
1368
|
| `wait` | property | `QueueItemOpts` | `dist/bpmn/bpmn-sdk.d.ts:1494-1498` |
|
|
1369
1369
|
| `waitConnector` | property | `BuiltTask` | `dist/case/case-sdk.d.ts:1013-1014` |
|
|
1370
|
-
| `waitEvent` | property | `FlowActionSpecs` | `dist/core/actions.d.ts:
|
|
1370
|
+
| `waitEvent` | property | `FlowActionSpecs` | `dist/core/actions.d.ts:953-956` |
|
|
1371
1371
|
| `waitForConnector` | method | `TaskBuilder` | `dist/case/case-sdk.d.ts:1496-1505` |
|
|
1372
1372
|
| `waitForConnector` | method | `TaskBuilder` | `dist/case/case-sdk.d.ts:1506-1513` |
|
|
1373
1373
|
| `waitForEvent` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3084-3125` |
|
|
@@ -1380,8 +1380,8 @@ not find it either.
|
|
|
1380
1380
|
| `when` | property | `FormFieldCondition` | `dist/core/actions.d.ts:136-137` |
|
|
1381
1381
|
| `when` | property | `SlaOpts` | `dist/case/case-sdk.d.ts:261-267` |
|
|
1382
1382
|
| `when` | property | `SwitchArm` | `dist/flow-sdk.d.ts:206-211` |
|
|
1383
|
-
| `where` | property | `EventSubscription` | `dist/core/actions.d.ts:
|
|
1384
|
-
| `where` | property | `TriggerOptions` | `dist/core/actions.d.ts:
|
|
1383
|
+
| `where` | property | `EventSubscription` | `dist/core/actions.d.ts:1167-1185` |
|
|
1384
|
+
| `where` | property | `TriggerOptions` | `dist/core/actions.d.ts:1120-1137` |
|
|
1385
1385
|
| `width` | property | `CaseNodeLayout` | `dist/case/case-sdk.d.ts:1142-1143` |
|
|
1386
1386
|
| `width` | property | `StickyNote` | `dist/flow-sdk.d.ts:691-692` |
|
|
1387
1387
|
| `x` | property | `StickyNote` | `dist/flow-sdk.d.ts:687-688` |
|
package/dist/core/actions.d.ts
CHANGED
|
@@ -943,6 +943,12 @@ export interface FlowActionSpecs {
|
|
|
943
943
|
carried?: CarriedConnectorOperation;
|
|
944
944
|
/** The operation's inputs, by field. */
|
|
945
945
|
inputs: Record<string, unknown>;
|
|
946
|
+
/**
|
|
947
|
+
* The author's options object, kept only when it holds a key
|
|
948
|
+
* {@link ConnectorOpts} does not name, so the serializer can refuse that
|
|
949
|
+
* key (FLOW_UNKNOWN_OPTION) instead of dropping it (builder-sdk#1990).
|
|
950
|
+
*/
|
|
951
|
+
options?: Readonly<Record<string, unknown>>;
|
|
946
952
|
};
|
|
947
953
|
/** The spec {@link waitForEvent} builds. */
|
|
948
954
|
waitEvent: {
|
package/dist/core/actions.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { splitConnectorNodeType, isTriggerDescriptor, } from './connectors.js';
|
|
2
2
|
import { FlowAction, FlowTrigger } from './node-classes.js';
|
|
3
|
+
import { CONNECTOR_OPTION_KEYS } from './connector-option-keys.js';
|
|
3
4
|
// ── Built-in spec adapters ──────────────────────────────────────────────────
|
|
4
5
|
// Every factory result IS a FlowAction/FlowTrigger instance (design §4.4 pass
|
|
5
6
|
// 1), so `instanceof` can tell an SDK-owned construct from a raw literal. The
|
|
@@ -49,6 +50,10 @@ export function builtinActionSpec(spec) {
|
|
|
49
50
|
export function builtinTriggerSpec(spec) {
|
|
50
51
|
return new BuiltinTrigger(spec);
|
|
51
52
|
}
|
|
53
|
+
/** The author's options, as the spec keeps them: only when one of their keys is unknown (see the spec's `options`). */
|
|
54
|
+
function unreadOptions(opts) {
|
|
55
|
+
return Object.keys(opts).some((k) => !CONNECTOR_OPTION_KEYS.includes(k)) ? { options: opts } : {};
|
|
56
|
+
}
|
|
52
57
|
export function connector(a, b, c, d) {
|
|
53
58
|
if (typeof a === 'string') {
|
|
54
59
|
const opts = (d ?? {});
|
|
@@ -62,6 +67,7 @@ export function connector(a, b, c, d) {
|
|
|
62
67
|
object: opts.object,
|
|
63
68
|
...(opts.carried !== undefined ? { carried: opts.carried } : {}),
|
|
64
69
|
inputs: c ?? {},
|
|
70
|
+
...unreadOptions(opts),
|
|
65
71
|
});
|
|
66
72
|
}
|
|
67
73
|
// Descriptor form: (descriptor, inputs, opts) — derive key/action from the nodeType.
|
|
@@ -77,6 +83,7 @@ export function connector(a, b, c, d) {
|
|
|
77
83
|
object: opts.object ?? a.objectName,
|
|
78
84
|
...(opts.carried !== undefined ? { carried: opts.carried } : {}),
|
|
79
85
|
inputs: b ?? {},
|
|
86
|
+
...unreadOptions(opts),
|
|
80
87
|
});
|
|
81
88
|
}
|
|
82
89
|
/**
|
|
@@ -13,7 +13,9 @@ export type BindingRefusalCode = 'BINDING_SELF_NAME' | 'BINDING_UNDECLARED'
|
|
|
13
13
|
/** Two steps on one connection disagree on which connector it belongs to (#866). */
|
|
14
14
|
| 'CONNECTION_CONNECTOR_CONFLICT'
|
|
15
15
|
/** A connector-bound node names no `connection` or no `folder` label (#890). */
|
|
16
|
-
| 'BINDING_MISSING'
|
|
16
|
+
| 'BINDING_MISSING'
|
|
17
|
+
/** A node's `connection` and `folder` are one label, or resolve to one resource key (#1968). */
|
|
18
|
+
| 'BINDING_CONNECTION_IS_FOLDER';
|
|
17
19
|
/**
|
|
18
20
|
* What `serialize` throws for a label it refuses. It is an ordinary `Error` whose
|
|
19
21
|
* message is the sentence `check` prints; the `code` lets `compile --no-check`
|
|
@@ -123,6 +125,36 @@ export declare function missingBindingLabels(labels: {
|
|
|
123
125
|
} | undefined): ('connection' | 'folder')[];
|
|
124
126
|
/** Why compile refuses a connector-bound node with no `connection` / `folder` label, and how to bind it. */
|
|
125
127
|
export declare function bindingMissingMessage(where: string, missing: readonly ('connection' | 'folder')[], target?: PrepareTarget): string;
|
|
128
|
+
/**
|
|
129
|
+
* BINDING_CONNECTION_IS_FOLDER (#1968): a node whose connection and folder are
|
|
130
|
+
* the same value. The node then sends one id as both its `connectionId` and its
|
|
131
|
+
* `connectionFolderKey`, and no tenant has a connection whose id is its folder's
|
|
132
|
+
* key. `check`, `compile` and `flow validate` used to pass it; the run faulted
|
|
133
|
+
* at dispatch with `401 Invalid Organization or User secret`.
|
|
134
|
+
*
|
|
135
|
+
* Two routes in, both refused:
|
|
136
|
+
*
|
|
137
|
+
* - ONE LABEL for both (`connection: 'slack', folder: 'slack'`). bindings.json
|
|
138
|
+
* answers a label with one `resourceKey`, so the two halves cannot differ.
|
|
139
|
+
* `prepare` with such a source also writes one row for the label, the
|
|
140
|
+
* `FolderKey` row last, so the connection resolves to the folder key. Refused
|
|
141
|
+
* with or without a bindings.json: the labels alone decide it. Except when
|
|
142
|
+
* the label is itself a placeholder (an all-zero GUID or an `<angle>` value,
|
|
143
|
+
* as decompile writes for a node saved with a stub in both keys): that is
|
|
144
|
+
* offline authoring, and `CONNECTION_STUB` warns about it.
|
|
145
|
+
* - TWO LABELS, ONE KEY (`slack` and `shared` both carry the same GUID, say the
|
|
146
|
+
* connection's `Id` pasted into the folder row). Refused only when that key
|
|
147
|
+
* could be a real tenant id: two placeholder rows that share an all-zero GUID
|
|
148
|
+
* or an `<angle>` value are offline authoring, which `CONNECTION_STUB` already
|
|
149
|
+
* warns about.
|
|
150
|
+
*
|
|
151
|
+
* Call it with the labels the node names; `undefined` when either is absent
|
|
152
|
+
* (that is `BINDING_MISSING`'s) or the pair is fine.
|
|
153
|
+
*/
|
|
154
|
+
export declare function bindingPairRefusal(bindings: BindingsView | undefined, labels: {
|
|
155
|
+
connection?: unknown;
|
|
156
|
+
folder?: unknown;
|
|
157
|
+
}, where: string, target?: PrepareTarget): BindingRefusal | undefined;
|
|
126
158
|
/**
|
|
127
159
|
* The all-zero prefix authors reach for when they need "a GUID" and have none:
|
|
128
160
|
* `00000000-0000-0000-0000-000000000001`. No tenant issues these. The same
|
|
@@ -174,6 +174,55 @@ export function bindingMissingMessage(where, missing, target) {
|
|
|
174
174
|
+ `with nothing real to bind yet, declare both labels in bindings.json with a placeholder resourceKey (a `
|
|
175
175
|
+ `CONNECTION_STUB warning, never an invented GUID).`;
|
|
176
176
|
}
|
|
177
|
+
/**
|
|
178
|
+
* BINDING_CONNECTION_IS_FOLDER (#1968): a node whose connection and folder are
|
|
179
|
+
* the same value. The node then sends one id as both its `connectionId` and its
|
|
180
|
+
* `connectionFolderKey`, and no tenant has a connection whose id is its folder's
|
|
181
|
+
* key. `check`, `compile` and `flow validate` used to pass it; the run faulted
|
|
182
|
+
* at dispatch with `401 Invalid Organization or User secret`.
|
|
183
|
+
*
|
|
184
|
+
* Two routes in, both refused:
|
|
185
|
+
*
|
|
186
|
+
* - ONE LABEL for both (`connection: 'slack', folder: 'slack'`). bindings.json
|
|
187
|
+
* answers a label with one `resourceKey`, so the two halves cannot differ.
|
|
188
|
+
* `prepare` with such a source also writes one row for the label, the
|
|
189
|
+
* `FolderKey` row last, so the connection resolves to the folder key. Refused
|
|
190
|
+
* with or without a bindings.json: the labels alone decide it. Except when
|
|
191
|
+
* the label is itself a placeholder (an all-zero GUID or an `<angle>` value,
|
|
192
|
+
* as decompile writes for a node saved with a stub in both keys): that is
|
|
193
|
+
* offline authoring, and `CONNECTION_STUB` warns about it.
|
|
194
|
+
* - TWO LABELS, ONE KEY (`slack` and `shared` both carry the same GUID, say the
|
|
195
|
+
* connection's `Id` pasted into the folder row). Refused only when that key
|
|
196
|
+
* could be a real tenant id: two placeholder rows that share an all-zero GUID
|
|
197
|
+
* or an `<angle>` value are offline authoring, which `CONNECTION_STUB` already
|
|
198
|
+
* warns about.
|
|
199
|
+
*
|
|
200
|
+
* Call it with the labels the node names; `undefined` when either is absent
|
|
201
|
+
* (that is `BINDING_MISSING`'s) or the pair is fine.
|
|
202
|
+
*/
|
|
203
|
+
export function bindingPairRefusal(bindings, labels, where, target) {
|
|
204
|
+
const { connection, folder } = labels;
|
|
205
|
+
if (typeof connection !== 'string' || typeof folder !== 'string' || connection === '' || folder === '')
|
|
206
|
+
return undefined;
|
|
207
|
+
const remedy = `A connection and its folder are two bindings.json entries: a \`ConnectionId\` row whose resourceKey `
|
|
208
|
+
+ `is the connection's \`Id\`, and a \`FolderKey\` row whose resourceKey is its \`FolderKey\` (both from `
|
|
209
|
+
+ `\`uip is connections list --all-folders --output json\`). Give \`folder:\` its own label (for example `
|
|
210
|
+
+ `\`folder: 'shared'\`) and re-run \`${prepareFor(target)}\`, which writes both entries.`;
|
|
211
|
+
const fault = 'the run faults at dispatch with "401 Invalid Organization or User secret"';
|
|
212
|
+
if (connection === folder) {
|
|
213
|
+
if (STUB_GUID_RE.test(connection) || ANGLE_PLACEHOLDER_RE.test(connection))
|
|
214
|
+
return undefined;
|
|
215
|
+
return new BindingRefusal('BINDING_CONNECTION_IS_FOLDER', `${where}: \`connection\` and \`folder\` are both "${connection}". One label resolves to one resource key, so `
|
|
216
|
+
+ `the node would send the same id as its connection id and its folder key, and ${fault} (check, compile and `
|
|
217
|
+
+ `\`flow validate\` cannot tell). ${remedy}`);
|
|
218
|
+
}
|
|
219
|
+
const key = bindings?.resolve(connection) ?? connection;
|
|
220
|
+
if (key !== (bindings?.resolve(folder) ?? folder) || !GUID_RE.test(key) || STUB_GUID_RE.test(key))
|
|
221
|
+
return undefined;
|
|
222
|
+
return new BindingRefusal('BINDING_CONNECTION_IS_FOLDER', `${where}: connection "${connection}" and folder "${folder}" both resolve to "${key}", so the node would send the `
|
|
223
|
+
+ `same id as its connection id and its folder key, and ${fault}. One of the two bindings.json entries carries `
|
|
224
|
+
+ `the wrong resourceKey. ${remedy}`);
|
|
225
|
+
}
|
|
177
226
|
/**
|
|
178
227
|
* The all-zero prefix authors reach for when they need "a GUID" and have none:
|
|
179
228
|
* `00000000-0000-0000-0000-000000000001`. No tenant issues these. The same
|
|
@@ -181,6 +230,8 @@ export function bindingMissingMessage(where, missing, target) {
|
|
|
181
230
|
* agree on what a stub is.
|
|
182
231
|
*/
|
|
183
232
|
export const STUB_GUID_RE = /^0{8}-0{4}-0{4}-0{4}-/;
|
|
233
|
+
/** An `<angle-bracket>` placeholder copied from an example (`<id>`, `<connection-id>`). */
|
|
234
|
+
const ANGLE_PLACEHOLDER_RE = /^<[^<>]*>$/;
|
|
184
235
|
/**
|
|
185
236
|
* Why `value` can never be a tenant resource key, or `undefined` when it could be.
|
|
186
237
|
* Measured on 369 archived `bindings.json` files (2026-09-02): all-zero GUIDs,
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Every key of `connector()`'s options. */
|
|
2
|
+
export declare const CONNECTOR_OPTION_KEYS: readonly string[];
|
|
3
|
+
/** Every key of an event subscription, as the stringly `waitForEvent({ … })` / `onEvent({ … })` take it. */
|
|
4
|
+
export declare const EVENT_SUBSCRIPTION_KEYS: readonly string[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { declareKeys } from './option-keys.js';
|
|
2
|
+
/** Every key of `connector()`'s options. */
|
|
3
|
+
export const CONNECTOR_OPTION_KEYS = declareKeys({
|
|
4
|
+
version: true, connection: true, folder: true, object: true, carried: true,
|
|
5
|
+
});
|
|
6
|
+
/** Every key of an event subscription, as the stringly `waitForEvent({ … })` / `onEvent({ … })` take it. */
|
|
7
|
+
export const EVENT_SUBSCRIPTION_KEYS = declareKeys({
|
|
8
|
+
connector: true, event: true, where: true, object: true, filters: true, connection: true, folder: true, version: true,
|
|
9
|
+
});
|
|
@@ -21,6 +21,14 @@ export interface EventEmitEnv {
|
|
|
21
21
|
readonly bindings?: BindingsView;
|
|
22
22
|
/** A connection or folder label to the key the node carries, with compile's refusals and warnings. */
|
|
23
23
|
resolveBinding(name: string | undefined, attribute: 'connection' | 'folder', where: string, target?: PrepareTarget): string | undefined;
|
|
24
|
+
/** Both labels of a subscription's pair, resolved and judged as one (BINDING_CONNECTION_IS_FOLDER). */
|
|
25
|
+
resolveBindingPair(labels: {
|
|
26
|
+
connection?: string;
|
|
27
|
+
folder?: string;
|
|
28
|
+
}, where: string, target?: PrepareTarget): {
|
|
29
|
+
connectionId: string | undefined;
|
|
30
|
+
folderKey: string | undefined;
|
|
31
|
+
};
|
|
24
32
|
}
|
|
25
33
|
/** What `registry prepare` takes for an event subscription: its connector key and curated event name. */
|
|
26
34
|
export declare function eventTarget(sub: {
|
|
@@ -79,8 +79,7 @@ export function libraryRequiredForEvent(env, sub, nodeId, site, call) {
|
|
|
79
79
|
}
|
|
80
80
|
eventFilterReads(sub.filters, nodeId);
|
|
81
81
|
requireBindingPair(site, sub, eventTarget(sub));
|
|
82
|
-
const connection = env.
|
|
83
|
-
env.resolveBinding(sub.folder, 'folder', `event node "${nodeId}"`, eventTarget(sub));
|
|
82
|
+
const { connectionId: connection } = env.resolveBindingPair(sub, `event node "${nodeId}"`, eventTarget(sub));
|
|
84
83
|
const connector = eventTarget(sub)?.key;
|
|
85
84
|
if (connection !== undefined && connector !== undefined)
|
|
86
85
|
use = { connector, connection };
|
|
@@ -271,8 +270,7 @@ export function eventDetail(rc, sub, nodeId, env, site, opts = {}) {
|
|
|
271
270
|
// An unbound draft the canvas saved (`opts.unbound`, a draft compile) is written with no connection, as the file has it.
|
|
272
271
|
if (!opts.unbound)
|
|
273
272
|
requireBindingPair(site, sub, eventTarget(sub));
|
|
274
|
-
const conn = env.
|
|
275
|
-
const folder = env.resolveBinding(sub.folder, 'folder', `event node "${nodeId}"`, eventTarget(sub));
|
|
273
|
+
const { connectionId: conn, folderKey: folder } = env.resolveBindingPair(sub, `event node "${nodeId}"`, eventTarget(sub));
|
|
276
274
|
const op = (rc.entry?.operation ?? {});
|
|
277
275
|
// A GENERIC event with no `object` would carry `objectName: ""`: it validates
|
|
278
276
|
// and the platform's dispatcher refuses it. Refused here, at the layer that
|
|
@@ -141,6 +141,13 @@ export interface ErrorHandlerCheckContext {
|
|
|
141
141
|
readonly step: string;
|
|
142
142
|
report(code: string, message: string, suggestion?: string): void;
|
|
143
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
* The option objects of a spec (`inputs`, a trigger's `appearance`) and every key
|
|
146
|
+
* each may carry. See {@link NodeType.optionKeys}.
|
|
147
|
+
*/
|
|
148
|
+
export type OptionKeyLists<Spec> = {
|
|
149
|
+
readonly [F in keyof Spec]?: readonly string[];
|
|
150
|
+
};
|
|
144
151
|
/** One node type at one version, for one artifact. See the module header. */
|
|
145
152
|
export interface NodeType<Spec, Serialized, Ctx extends ArtifactContexts> {
|
|
146
153
|
/** The spec discriminator, e.g. `'dataFabricRead'`. Unique within the artifact's registry. */
|
|
@@ -151,6 +158,24 @@ export interface NodeType<Spec, Serialized, Ctx extends ArtifactContexts> {
|
|
|
151
158
|
readonly version: string;
|
|
152
159
|
/** The public factory that produces this spec, e.g. `'dataFabricRead'`. */
|
|
153
160
|
readonly factory: string;
|
|
161
|
+
/**
|
|
162
|
+
* The option objects of this type's spec, each with every key it may carry
|
|
163
|
+
* (builder-sdk#1990). The artifact's serializer refuses any other key (Flow:
|
|
164
|
+
* FLOW_UNKNOWN_OPTION), because it would drop it: for instance
|
|
165
|
+
* `http({ url, managed: true, retryCont: 2 })` would compile with no retry.
|
|
166
|
+
* Build each list with `declareKeys<T>()` (`core/option-keys.ts`), which `tsc`
|
|
167
|
+
* holds to the option type, so the list cannot drift from it:
|
|
168
|
+
*
|
|
169
|
+
* ```ts
|
|
170
|
+
* optionKeys: { inputs: declareKeys<HttpInputs>({ url: true, method: true, ... }) }
|
|
171
|
+
* ```
|
|
172
|
+
*
|
|
173
|
+
* Omit it, or a field, and that object stays open: a connector's `inputs` (the
|
|
174
|
+
* connector's own fields, which its library checks), or a node-type
|
|
175
|
+
* package's spec. On a versioned type, declare it once on the
|
|
176
|
+
* `VersionedNodeType`: the option types are the kind's, not a version's.
|
|
177
|
+
*/
|
|
178
|
+
readonly optionKeys?: OptionKeyLists<Spec>;
|
|
154
179
|
/** Where the definition comes from; decides who answers `errorPort` (see below). */
|
|
155
180
|
readonly definition: DefinitionSource;
|
|
156
181
|
/**
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* is a new entry (usually a subclass of the previous one), so adding it cannot
|
|
8
8
|
* change how a node at an older version serializes, deserializes or prints.
|
|
9
9
|
*/
|
|
10
|
-
import type { ArtifactContexts, NodeType } from './node-type.js';
|
|
10
|
+
import type { ArtifactContexts, NodeType, OptionKeyLists } from './node-type.js';
|
|
11
11
|
export interface VersionedNodeType<Spec, Serialized, Ctx extends ArtifactContexts,
|
|
12
12
|
/** The implementation type: an artifact's own extension of NodeType, when it has one. */
|
|
13
13
|
Impl extends NodeType<Spec, Serialized, Ctx> = NodeType<Spec, Serialized, Ctx>> {
|
|
@@ -45,6 +45,8 @@ Impl extends NodeType<Spec, Serialized, Ctx> = NodeType<Spec, Serialized, Ctx>>
|
|
|
45
45
|
readonly defaultVersion: string;
|
|
46
46
|
/** Every registered version → its implementation. Keys equal each entry's `version`. */
|
|
47
47
|
readonly versions: Readonly<Record<string, Impl>>;
|
|
48
|
+
/** The option keys of the kind's spec, for every version (see NodeType.optionKeys). */
|
|
49
|
+
readonly optionKeys?: OptionKeyLists<Spec>;
|
|
48
50
|
/**
|
|
49
51
|
* The version a spec needs when the author named none (`requested` undefined),
|
|
50
52
|
* e.g. a read that sets `resultMode` needs `core.datafabric.read@1.4`. Omit it
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Option keys: the keys an author may put in a builder's option object, and the
|
|
3
|
+
* refusal for any other key (builder-sdk#1990).
|
|
4
|
+
*
|
|
5
|
+
* Why it exists: an authored `.flow.ts` runs with its types erased
|
|
6
|
+
* (`--experimental-strip-types`), so TypeScript's own "Object literal may only
|
|
7
|
+
* specify known properties" never fires. Without this, a key the SDK does not
|
|
8
|
+
* know was dropped with no word: `http({ url, managed: true, retryCont: 2 })`
|
|
9
|
+
* compiled with no retry, and an option a NEWER SDK added (`inlineAgent({ tools })`
|
|
10
|
+
* on an SDK that predates `tools`) compiled the node without the feature.
|
|
11
|
+
*
|
|
12
|
+
* Two halves:
|
|
13
|
+
*
|
|
14
|
+
* - {@link declareKeys} turns an object literal into the key list. Its parameter
|
|
15
|
+
* type requires EVERY key of the option type and admits NO other, so the list
|
|
16
|
+
* cannot drift from the type: adding `retryDelay?: string` to `HttpInputs`
|
|
17
|
+
* and not to the list is a `tsc` error in `npm run build`.
|
|
18
|
+
* - {@link unknownOptionRefusal} compares one option object with its list and
|
|
19
|
+
* returns the `FLOW_UNKNOWN_OPTION` refusal, with the nearest known key as
|
|
20
|
+
* the suggestion.
|
|
21
|
+
*
|
|
22
|
+
* The refusal is class `lowering` (core/refusals.ts): the serializer would drop
|
|
23
|
+
* the key, so `compile` must not write the file without it
|
|
24
|
+
* (docs/CHECK_COMPILE_CONTRACT_DESIGN.md §3.1), and `check` reports it through
|
|
25
|
+
* the serializer's collect mode, on the step that carries it.
|
|
26
|
+
*/
|
|
27
|
+
import { CompileRefusal } from './compile-refusal.js';
|
|
28
|
+
/** Every key of every member of a union: `keyof (A | B)` is only the keys they share. */
|
|
29
|
+
export type KeysOfUnion<T> = T extends unknown ? keyof T : never;
|
|
30
|
+
/**
|
|
31
|
+
* An object literal that names each option key of `T` once, as `true`: no key
|
|
32
|
+
* missing (the mapped keys are required) and no key extra (an object literal's
|
|
33
|
+
* excess-property check). For instance, for `{ a: string; b?: number }`:
|
|
34
|
+
*
|
|
35
|
+
* ```ts
|
|
36
|
+
* declareKeys<{ a: string; b?: number }>({ a: true, b: true }) // ok
|
|
37
|
+
* declareKeys<{ a: string; b?: number }>({ a: true }) // tsc: 'b' is missing
|
|
38
|
+
* declareKeys<{ a: string; b?: number }>({ a: true, b: true, c: true }) // tsc: 'c' is not a key
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export type OptionKeySet<T> = {
|
|
42
|
+
readonly [K in KeysOfUnion<T> & string]-?: true;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* The option keys of `T`, as a list, checked against `T` by `tsc` (see
|
|
46
|
+
* {@link OptionKeySet}). Declare a family's list with it, never by hand.
|
|
47
|
+
*/
|
|
48
|
+
export declare function declareKeys<T>(keys: OptionKeySet<T>): readonly string[];
|
|
49
|
+
/**
|
|
50
|
+
* The FLOW_UNKNOWN_OPTION refusal for the first key of `bag` that is not in
|
|
51
|
+
* `known`, or `undefined` when every key is known. A key whose value is
|
|
52
|
+
* `undefined` is skipped: it sets nothing, so nothing is dropped. Anything that
|
|
53
|
+
* is not a plain object (an array, an `Expr`, a missing bag) is not judged here.
|
|
54
|
+
*
|
|
55
|
+
* `call` names the option object as the author wrote it, e.g. `http()` or
|
|
56
|
+
* `.loop() options`; `where` places it, e.g. `step "fetch"`.
|
|
57
|
+
*
|
|
58
|
+
* For instance `unknownOptionRefusal({ url: 'x', retryCont: 2 }, HTTP_KEYS, 'http()', 'step "fetch"')`
|
|
59
|
+
* reads `step "fetch": http() has no option "retryCont". This SDK knows: …`, with the
|
|
60
|
+
* suggestion `retryCount` (the CLI prints it as `(did you mean "retryCount"?)`).
|
|
61
|
+
*/
|
|
62
|
+
export declare function unknownOptionRefusal(bag: unknown, known: readonly string[], call: string, where: string): CompileRefusal | undefined;
|