@uipath/maestro-builder-sdk 6.102.0 → 6.104.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 +20 -18
- package/dist/api-members.md +18 -17
- package/dist/bpmn/check.js +4 -0
- package/dist/case/check.d.ts +1 -1
- package/dist/case/check.js +4 -0
- package/dist/check.js +4 -0
- package/dist/core/connector-checks.d.ts +7 -0
- package/dist/core/connector-checks.js +12 -2
- package/dist/core/entity-schema.d.ts +94 -0
- package/dist/core/entity-schema.js +58 -0
- package/dist/core/event-checks.d.ts +3 -0
- package/dist/core/event-checks.js +17 -3
- package/dist/core/lookup-connection.d.ts +90 -0
- package/dist/core/lookup-connection.js +165 -0
- package/dist/core/lookups.d.ts +26 -0
- package/dist/core/lookups.js +30 -4
- package/dist/core/refusals.d.ts +8 -0
- package/dist/core/refusals.js +8 -0
- package/dist/core/resource-resolution.d.ts +9 -0
- package/dist/nodes/data-fabric/flow/check.js +214 -0
- package/dist/nodes/trigger/flow/check.js +193 -2
- package/dist/nodes/trigger/flow/spec.d.ts +10 -1
- package/dist/registry/prepare/entity-schema.d.ts +40 -0
- package/dist/registry/prepare/entity-schema.js +135 -0
- package/dist/registry/prepare/ledger.js +20 -10
- package/dist/registry/prepare/resources.d.ts +12 -5
- package/dist/registry/prepare/resources.js +26 -4
- package/dist/registry/prepare-cli.js +38 -3
- package/dist/registry/uip/commands.d.ts +19 -0
- package/dist/registry/uip/commands.js +25 -0
- package/package.json +2 -2
package/dist/api-index.md
CHANGED
|
@@ -41,7 +41,7 @@ could hand you spans for a version you do not have.
|
|
|
41
41
|
|
|
42
42
|
## `@uipath/maestro-builder-sdk`
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
265 symbol(s). Import from `@uipath/maestro-builder-sdk`.
|
|
45
45
|
|
|
46
46
|
| Symbol | Kind | Declaration | Area | Summary |
|
|
47
47
|
| --- | --- | --- | --- | --- |
|
|
@@ -105,7 +105,7 @@ could hand you spans for a version you do not have.
|
|
|
105
105
|
| `conversationalAgent` | function | `dist/nodes/agent/flow/factories.d.ts:65-89` | Actions | A CONVERSATIONAL agent (`uipath.agent.conversational`) — it answers one turn of a live chat, reading the transcript… |
|
|
106
106
|
| `ConversationalAgentInputs` | interface | `dist/nodes/agent/flow/spec.d.ts:45-102` | Option shapes | What `conversationalAgent()` takes: the agent's instructions and model, how it gets its turn, and the resources it… |
|
|
107
107
|
| `ConversationalAgentSettings` | interface | `dist/nodes/agent/flow/spec.d.ts:13-37` | Supporting types | How a conversational agent gets its turn — the node's own `conversationalAgentSettings` sub-object. |
|
|
108
|
-
| `ConversationAppearance` | interface | `dist/nodes/trigger/flow/spec.d.ts:
|
|
108
|
+
| `ConversationAppearance` | interface | `dist/nodes/trigger/flow/spec.d.ts:64-80` | Supporting types | How the chat that starts a conversation-triggered flow looks: the conversation trigger's `appearance` (1.3), the same… |
|
|
109
109
|
| `conversationContext` | function | `dist/nodes/conversation/flow/factories.d.ts:44-58` | Actions | READ a conversation's transcript so far without waiting (`uipath.conversational.get-conversation-context`) — the shape a… |
|
|
110
110
|
| `ConversationContextInputs` | interface | `dist/nodes/conversation/flow/spec.d.ts:37-44` | Option shapes | 2 field(s) |
|
|
111
111
|
| `conversationTrigger` | function | `dist/nodes/trigger/flow/factories.d.ts:61-103` | Actions | Start the flow when a new CONVERSATION is created (`core.trigger.conversation`) — the entry point for a chat-driven… |
|
|
@@ -140,7 +140,7 @@ could hand you spans for a version you do not have.
|
|
|
140
140
|
| `EdgeRoute` | interface | `dist/flow-sdk.d.ts:634-648` | Supporting types | One edge's route: user-dragged bends and/or the auto-router's waypoints. |
|
|
141
141
|
| `endCall` | function | `dist/nodes/agent/flow/factories.d.ts:32-39` | Actions | Hang up (`uipath.conversational.voice.end-call`). |
|
|
142
142
|
| `EndCallInputs` | interface | `dist/nodes/agent/flow/spec.d.ts:113-121` | Option shapes | What `endCall()` takes: the call to hang up. |
|
|
143
|
-
| `EntityRef` | interface | `dist/core/resource-resolution.d.ts:
|
|
143
|
+
| `EntityRef` | interface | `dist/core/resource-resolution.d.ts:19-29` | Supporting types | A Data Fabric entity by name and folder path: a ResourceRef of kind `Entity`, spelled as the plain object a field that… |
|
|
144
144
|
| `entryInput` | function | `dist/core/expr.d.ts:62-72` | Expressions and types | Reference an ENTRY POINT's scoped input: `entryInput('nightly', 'batchDate')` reads `$vars.nightly.output.batchDate` —… |
|
|
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. |
|
|
@@ -207,10 +207,10 @@ could hand you spans for a version you do not have.
|
|
|
207
207
|
| `lookup` | function | `dist/core/lookups.d.ts:143-164` | Generated descriptors | Begin resolving a `where` parameter on a connector-EVENT descriptor. |
|
|
208
208
|
| `LookupBuilder` | type | `dist/core/lookups.d.ts:64-71` | Generated descriptors | What `lookup(...)` returns: the generic form plus any generated aliases. |
|
|
209
209
|
| `lookupKey` | function | `dist/core/lookups.d.ts:55-63` | Generated descriptors | The identity of one resolution, as `prepare` records it and `compile` reads it. |
|
|
210
|
-
| `LookupResolution` | interface | `dist/core/lookups.d.ts:165-
|
|
211
|
-
| `LookupResolutions` | type | `dist/core/lookups.d.ts:
|
|
210
|
+
| `LookupResolution` | interface | `dist/core/lookups.d.ts:165-182` | Generated descriptors | One recorded resolution, as `connectors-local/resolutions.json` stores it. |
|
|
211
|
+
| `LookupResolutions` | type | `dist/core/lookups.d.ts:183-184` | Generated descriptors | Every recorded resolution, keyed by lookupKey. |
|
|
212
212
|
| `LookupSpec` | interface | `dist/core/lookups.d.ts:11-36` | Generated descriptors | One lookup field's retrieval contract, generated from `reference`. |
|
|
213
|
-
| `lookupSpecOf` | function | `dist/core/lookups.d.ts:
|
|
213
|
+
| `lookupSpecOf` | function | `dist/core/lookups.d.ts:260-267` | Generated descriptors | The LookupSpec for one field, or `undefined` when it earns no helper. |
|
|
214
214
|
| `LookupStrategy` | type | `dist/core/lookups.d.ts:1-10` | Generated descriptors | How `prepare` should retrieve the collection, chosen from the metadata. |
|
|
215
215
|
| `LookupToken` | interface | `dist/core/lookups.d.ts:37-52` | Generated descriptors | An unresolved lookup: what `.byEmail(…)` returns. |
|
|
216
216
|
| `LoopOptions` | interface | `dist/flow-sdk.d.ts:411-435` | Option shapes | Loop-specific options. |
|
|
@@ -240,20 +240,22 @@ could hand you spans for a version you do not have.
|
|
|
240
240
|
| `QueuePriority` | type | `dist/nodes/queue/flow/spec.d.ts:9-10` | Supporting types | The three priorities an Orchestrator queue item can carry. |
|
|
241
241
|
| `ran` | function | `dist/core/expr.d.ts:95-141` | Expressions and types | Did this step run? |
|
|
242
242
|
| `rawNode` | function | `dist/raw-node.d.ts:9-89` | Supporting types | Place a node this SDK has no factory for, carrying its definition verbatim (`uipath.exotic.thing@2.1` and the manifest… |
|
|
243
|
-
| `RawReference` | type | `dist/core/lookups.d.ts:
|
|
243
|
+
| `RawReference` | type | `dist/core/lookups.d.ts:251-259` | Supporting types | |
|
|
244
|
+
| `recordedEventResolution` | function | `dist/core/lookups.d.ts:219-227` | Generated descriptors | The recorded row for a token on an event's `where`, under either key resolvedEventValue tries, or `undefined`. |
|
|
245
|
+
| `recordedResolution` | function | `dist/core/lookups.d.ts:193-201` | Generated descriptors | The recorded row for a token, or `undefined` — resolvedValue with the rest of the row (the connection it was resolved… |
|
|
244
246
|
| `RemoteA2aToolRef` | interface | `dist/core/actions.d.ts:488-508` | Supporting types | A remote A2A (agent-to-agent) endpoint the agent may delegate to. |
|
|
245
|
-
| `resolvedEventValue` | function | `dist/core/lookups.d.ts:
|
|
246
|
-
| `resolvedValue` | function | `dist/core/lookups.d.ts:
|
|
247
|
-
| `resolveEventWhere` | function | `dist/core/lookups.d.ts:
|
|
248
|
-
| `ResourceRef` | interface | `dist/core/resource-resolution.d.ts:
|
|
249
|
-
| `ResourceToken` | interface | `dist/core/resource-resolution.d.ts:
|
|
247
|
+
| `resolvedEventValue` | function | `dist/core/lookups.d.ts:202-218` | Generated descriptors | resolvedValue for a token on an event's `where`. |
|
|
248
|
+
| `resolvedValue` | function | `dist/core/lookups.d.ts:185-192` | Generated descriptors | The recorded id for a token, or `undefined`. |
|
|
249
|
+
| `resolveEventWhere` | function | `dist/core/lookups.d.ts:268-285` | Generated descriptors | An event subscription's `where` with every lookup token swapped for the id `registry prepare --resolve` recorded, or a… |
|
|
250
|
+
| `ResourceRef` | interface | `dist/core/resource-resolution.d.ts:4-18` | Supporting types | A solution resource by kind and name, and — for one in an Orchestrator folder — that folder's PATH (`Shared`,… |
|
|
251
|
+
| `ResourceToken` | interface | `dist/core/resource-resolution.d.ts:166-176` | Supporting types | A solution resource as a connector input: what `resource()` and `entity()` return. |
|
|
250
252
|
| `ReturnFieldType` | type | `dist/core/actions.d.ts:285-302` | Supporting types | A JSON-schema-ish type for one field of a step's declared `returns`. |
|
|
251
253
|
| `ReturnOptions` | interface | `dist/flow-sdk.d.ts:369-410` | Option shapes | `.return(...)`-specific options. |
|
|
252
254
|
| `rpaWorkflow` | function | `dist/nodes/process/flow/factories.d.ts:8-52` | Actions | Invoke a deployed RPA (robotic process automation) workflow — a classic UI-automation process, published to… |
|
|
253
255
|
| `RpaWorkflowInputs` | interface | `dist/nodes/process/flow/spec.d.ts:11-71` | Option shapes | 7 field(s) |
|
|
254
256
|
| `SCHEDULE_PRESETS` | const | `dist/nodes/trigger/flow/spec.d.ts:8-15` | Actions | The eight intervals the designer offers in its Frequency dropdown. |
|
|
255
257
|
| `scheduled` | function | `dist/nodes/trigger/flow/factories.d.ts:12-31` | Actions | Start the flow on a recurring schedule instead of on demand. |
|
|
256
|
-
| `ScheduledInputs` | interface | `dist/nodes/trigger/flow/spec.d.ts:29-
|
|
258
|
+
| `ScheduledInputs` | interface | `dist/nodes/trigger/flow/spec.d.ts:29-51` | Option shapes | 1 field(s) |
|
|
257
259
|
| `ScheduleEvery` | type | `dist/nodes/trigger/flow/spec.d.ts:17-28` | Supporting types | How often a scheduled flow runs, as an ISO-8601 repeating interval: `R/` followed by a duration. |
|
|
258
260
|
| `SchedulePreset` | type | `dist/nodes/trigger/flow/spec.d.ts:16` | Supporting types | |
|
|
259
261
|
| `script` | function | `dist/nodes/script/flow/factories.d.ts:8-38` | Actions | Declare an inline script action, as a TypeScript function the compiler checks. |
|
|
@@ -267,7 +269,7 @@ could hand you spans for a version you do not have.
|
|
|
267
269
|
| `sendMessage` | function | `dist/nodes/conversation/flow/factories.d.ts:8-26` | Actions | Post an assistant message into a live conversation (`uipath.conversational.send-message`). |
|
|
268
270
|
| `SendMessageInputs` | interface | `dist/nodes/conversation/flow/spec.d.ts:8-27` | Option shapes | 4 field(s) |
|
|
269
271
|
| `ShownField` | interface | `dist/core/actions.d.ts:222-237` | Supporting types | A value the reviewer READS: shown on the form, filled in from the flow. |
|
|
270
|
-
| `StartingPrompt` | interface | `dist/nodes/trigger/flow/spec.d.ts:
|
|
272
|
+
| `StartingPrompt` | interface | `dist/nodes/trigger/flow/spec.d.ts:52-63` | Supporting types | One suggestion the chat shows before the user types: a chip labelled `displayPrompt` that sends `actualPrompt` to the… |
|
|
271
273
|
| `Step` | type | `dist/flow-sdk.d.ts:446-566` | Supporting types | |
|
|
272
274
|
| `StepList` | class | `dist/flow-sdk.d.ts:771-1255` | Builders | Collects a sequence of steps. |
|
|
273
275
|
| `StepOptions` | interface | `dist/flow-sdk.d.ts:298-318` | Option shapes | The options of `.step()`: the NodeOptions, plus `draft` for a node the canvas saved unfinished. |
|
|
@@ -292,11 +294,11 @@ could hand you spans for a version you do not have.
|
|
|
292
294
|
| `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
295
|
| `TriggerMeta` | interface | `dist/core/connectors.d.ts:133-142` | Generated descriptors | Runtime metadata a generated trigger descriptor carries. |
|
|
294
296
|
| `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
|
-
| `TriggerSpec` | type | `dist/nodes/trigger/flow/spec.d.ts:
|
|
297
|
+
| `TriggerSpec` | type | `dist/nodes/trigger/flow/spec.d.ts:81-100` | Supporting types | What starts the flow. |
|
|
296
298
|
| `TypeDesc` | type | `dist/core/expr.d.ts:404` | Supporting types | |
|
|
297
299
|
| `types` | const | `dist/core/expr.d.ts:388-403` | Expressions and types | Variable type descriptors (map to Flow variable `type` values). |
|
|
298
|
-
| `unresolvedLookupMessage` | function | `dist/core/lookups.d.ts:
|
|
299
|
-
| `unresolvedLookupsMessage` | function | `dist/core/lookups.d.ts:
|
|
300
|
+
| `unresolvedLookupMessage` | function | `dist/core/lookups.d.ts:228-237` | Generated descriptors | The message for a lookup nothing has resolved — the command that fixes it. |
|
|
301
|
+
| `unresolvedLookupsMessage` | function | `dist/core/lookups.d.ts:238-250` | Generated descriptors | The message for every lookup one node still owes, with the ONE `prepare` that records them all (it takes every… |
|
|
300
302
|
| `v` | function | `dist/core/expr.d.ts:29-41` | Expressions and types | Reference a flow variable or output by name → `$vars.<name>`. |
|
|
301
303
|
| `VarDecl` | interface | `dist/flow-sdk.d.ts:67-79` | Supporting types | 7 field(s) |
|
|
302
304
|
| `VarSpec` | interface | `dist/flow-sdk.d.ts:80-135` | Supporting types | The rich spelling of a variable declaration: pass it instead of a bare `types.*` descriptor wherever `.input()` /… |
|
|
@@ -466,7 +468,7 @@ could hand you spans for a version you do not have.
|
|
|
466
468
|
| `DataServiceOpts` | interface | `dist/bpmn/bpmn-sdk.d.ts:1241-1299` | Option shapes | Options for `.dataService()` — one UiPath Data Fabric (Data Service) record or file operation. |
|
|
467
469
|
| `DefinitionsRegistry` | class | `dist/bpmn/bpmn-sdk.d.ts:2273-2296` | Supporting types | Collects definitions-level message/error declarations, de-duped by name. |
|
|
468
470
|
| `EndOpts` | interface | `dist/bpmn/bpmn-sdk.d.ts:827-851` | Option shapes | Options for `.endEvent()`. |
|
|
469
|
-
| `EntityRef` | interface | `dist/core/resource-resolution.d.ts:
|
|
471
|
+
| `EntityRef` | interface | `dist/core/resource-resolution.d.ts:19-29` | Supporting types | A Data Fabric entity by name and folder path: a ResourceRef of kind `Entity`, spelled as the plain object a field that… |
|
|
470
472
|
| `ErrorDecl` | interface | `dist/bpmn/bpmn-sdk.d.ts:496-504` | Supporting types | A definitions-level `bpmn:error` declaration, referenced by error events. |
|
|
471
473
|
| `ErrorHandlerOpts` | interface | `dist/bpmn/bpmn-sdk.d.ts:1997-2009` | Option shapes | Options for ActivityBuilder.onError. |
|
|
472
474
|
| `ErrorLike` | type | `dist/bpmn/bpmn-sdk.d.ts:44-55` | Supporting types | What an author passes for an error definition. |
|
package/dist/api-members.md
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
# Maestro Builder SDK — member index
|
|
7
7
|
|
|
8
|
-
**A lookup table of
|
|
8
|
+
**A lookup table of 1344 rows — match one name in it, do not read it.**
|
|
9
9
|
Grep or search for the member you have; the row it lands on is the whole
|
|
10
10
|
answer. Reading top to bottom costs ~20x what the one row does and tells you
|
|
11
11
|
nothing you asked for.
|
|
12
12
|
|
|
13
|
-
Every field and method of every exported shape —
|
|
13
|
+
Every field and method of every exported shape — 1344 across
|
|
14
14
|
249 interfaces and classes — keyed by the MEMBER's own name.
|
|
15
15
|
|
|
16
16
|
**Use this when the name you have is a field or a method**, which is usually
|
|
@@ -32,7 +32,7 @@ truncated summary would, for less. Read the span.
|
|
|
32
32
|
Member names repeat across shapes (`name` is declared on 69 of them), so the
|
|
33
33
|
`Declared on` column is what makes a match actionable. For the whole shape
|
|
34
34
|
rather than the one field, look that name up in [`api-index.md`](api-index.md) —
|
|
35
|
-
which is why its span is not repeated on all
|
|
35
|
+
which is why its span is not repeated on all 1344 rows here.
|
|
36
36
|
|
|
37
37
|
**A name that misses both indexes is probably not part of the API.** The one
|
|
38
38
|
that comes up is a RUNTIME output key — a human task's `Action`, a step's
|
|
@@ -46,7 +46,7 @@ not find it either.
|
|
|
46
46
|
| --- | --- | --- | --- |
|
|
47
47
|
| `__lookup` | property | `LookupToken` | `dist/core/lookups.d.ts:46-51` |
|
|
48
48
|
| `__outputs` | property | `FlowNode` | `dist/core/node-classes.d.ts:146-150` |
|
|
49
|
-
| `__resource` | property | `ResourceToken` | `dist/core/resource-resolution.d.ts:
|
|
49
|
+
| `__resource` | property | `ResourceToken` | `dist/core/resource-resolution.d.ts:175` |
|
|
50
50
|
| `$guardrailType` | property | `BuiltInValidatorGuardrail` | `dist/core/actions.d.ts:372` |
|
|
51
51
|
| `$guardrailType` | property | `CustomGuardrail` | `dist/core/actions.d.ts:359` |
|
|
52
52
|
| `action` | property | `BuiltInValidatorGuardrail` | `dist/core/actions.d.ts:376` |
|
|
@@ -59,7 +59,7 @@ not find it either.
|
|
|
59
59
|
| `actions` | property | `HumanTaskAppOpts` | `dist/bpmn/bpmn-sdk.d.ts:1558-1567` |
|
|
60
60
|
| `actionSchema` | property | `AppRef` | `dist/nodes/hitl/flow/spec.d.ts:220-244` |
|
|
61
61
|
| `activity` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3205-3243` |
|
|
62
|
-
| `actualPrompt` | property | `StartingPrompt` | `dist/nodes/trigger/flow/spec.d.ts:
|
|
62
|
+
| `actualPrompt` | property | `StartingPrompt` | `dist/nodes/trigger/flow/spec.d.ts:59-60` |
|
|
63
63
|
| `additionalOutputs` | property | `RegistryTypeSpec` | `dist/bpmn/typed-node.d.ts:98-102` |
|
|
64
64
|
| `agent` | property | `FlowActionSpecs` | `dist/nodes/process/flow/spec.d.ts:415-418` |
|
|
65
65
|
| `agent` | method | `TaskBuilder` | `dist/case/case-sdk.d.ts:1326-1335` |
|
|
@@ -178,6 +178,7 @@ not find it either.
|
|
|
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
180
|
| `connection` | property | `TriggerOptions` | `dist/core/actions.d.ts:1151-1155` |
|
|
181
|
+
| `connectionId` | property | `LookupResolution` | `dist/core/lookups.d.ts:174-181` |
|
|
181
182
|
| `connections` | property | `HitlRecipient` | `dist/nodes/hitl/flow/spec.d.ts:70-74` |
|
|
182
183
|
| `connector` | property | `BuiltTask` | `dist/case/case-sdk.d.ts:1001` |
|
|
183
184
|
| `connector` | property | `CaseHttpRequestSpec` | `dist/case/case-sdk.d.ts:605-609` |
|
|
@@ -314,7 +315,7 @@ not find it either.
|
|
|
314
315
|
| `displayName` | property | `RegistryInputField` | `dist/bpmn/typed-node.d.ts:65` |
|
|
315
316
|
| `displayName` | property | `SlaOpts` | `dist/case/case-sdk.d.ts:255-260` |
|
|
316
317
|
| `displayName` | property | `TriggerMeta` | `dist/core/connectors.d.ts:140-141` |
|
|
317
|
-
| `displayPrompt` | property | `StartingPrompt` | `dist/nodes/trigger/flow/spec.d.ts:
|
|
318
|
+
| `displayPrompt` | property | `StartingPrompt` | `dist/nodes/trigger/flow/spec.d.ts:57-58` |
|
|
318
319
|
| `document` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:419-423` |
|
|
319
320
|
| `documentClassify` | property | `FlowActionSpecs` | `dist/nodes/document/flow/spec.d.ts:187-190` |
|
|
320
321
|
| `documentExtraction` | property | `BuiltTask` | `dist/case/case-sdk.d.ts:1004-1005` |
|
|
@@ -388,7 +389,7 @@ not find it either.
|
|
|
388
389
|
| `eventSubProcess` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3254-3307` |
|
|
389
390
|
| `eventSubscription` | property | `BuiltTrigger` | `dist/case/case-sdk.d.ts:290-291` |
|
|
390
391
|
| `eventTrigger` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3126-3148` |
|
|
391
|
-
| `every` | property | `ScheduledInputs` | `dist/nodes/trigger/flow/spec.d.ts:30-
|
|
392
|
+
| `every` | property | `ScheduledInputs` | `dist/nodes/trigger/flow/spec.d.ts:30-50` |
|
|
392
393
|
| `every` | property | `TimerTriggerOpts` | `dist/case/case-sdk.d.ts:300-308` |
|
|
393
394
|
| `exception` | property | `BuiltStage` | `dist/case/case-sdk.d.ts:1029` |
|
|
394
395
|
| `exceptionStage` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:2112-2119` |
|
|
@@ -451,7 +452,7 @@ not find it either.
|
|
|
451
452
|
| `folder` | property | `ConnectorOpts` | `dist/core/actions.d.ts:24-25` |
|
|
452
453
|
| `folder` | property | `ConnectorToolRef` | `dist/core/actions.d.ts:685-690` |
|
|
453
454
|
| `folder` | property | `DataServiceOpts` | `dist/bpmn/bpmn-sdk.d.ts:1276-1288` |
|
|
454
|
-
| `folder` | property | `EntityRef` | `dist/core/resource-resolution.d.ts:
|
|
455
|
+
| `folder` | property | `EntityRef` | `dist/core/resource-resolution.d.ts:27-28` |
|
|
455
456
|
| `folder` | property | `EventSubscription` | `dist/core/actions.d.ts:1199-1200` |
|
|
456
457
|
| `folder` | property | `ExternalTaskOptions` | `dist/case/case-sdk.d.ts:717-718` |
|
|
457
458
|
| `folder` | property | `ExternalTaskOpts` | `dist/bpmn/bpmn-sdk.d.ts:1748-1749` |
|
|
@@ -459,7 +460,7 @@ not find it either.
|
|
|
459
460
|
| `folder` | property | `HttpRequestConnector` | `dist/case/case-sdk.d.ts:617-618` |
|
|
460
461
|
| `folder` | property | `OrchestratorOpts` | `dist/bpmn/bpmn-sdk.d.ts:1424-1425` |
|
|
461
462
|
| `folder` | property | `QueueItemOpts` | `dist/bpmn/bpmn-sdk.d.ts:1490-1491` |
|
|
462
|
-
| `folder` | property | `ResourceRef` | `dist/core/resource-resolution.d.ts:
|
|
463
|
+
| `folder` | property | `ResourceRef` | `dist/core/resource-resolution.d.ts:16-17` |
|
|
463
464
|
| `folder` | property | `TriggerOptions` | `dist/core/actions.d.ts:1156-1157` |
|
|
464
465
|
| `folderKey` | property | `AgentMemoryRef` | `dist/core/actions.d.ts:583-584` |
|
|
465
466
|
| `folderKey` | property | `CaseDocumentExtractionSpec` | `dist/case/case-sdk.d.ts:639-644` |
|
|
@@ -548,7 +549,7 @@ not find it either.
|
|
|
548
549
|
| `id` | property | `PinnedFlowId` | `dist/bpmn/bpmn-sdk.d.ts:1887-1888` |
|
|
549
550
|
| `id` | property | `SchemaEntry` | `dist/bpmn/bpmn-sdk.d.ts:1168-1169` |
|
|
550
551
|
| `id` | property | `ShownField` | `dist/core/actions.d.ts:224-225` |
|
|
551
|
-
| `id` | property | `StartingPrompt` | `dist/nodes/trigger/flow/spec.d.ts:
|
|
552
|
+
| `id` | property | `StartingPrompt` | `dist/nodes/trigger/flow/spec.d.ts:61-62` |
|
|
552
553
|
| `id` | property | `StickyNote` | `dist/flow-sdk.d.ts:673-682` |
|
|
553
554
|
| `id` | property | `SwitchArm` | `dist/flow-sdk.d.ts:213-219` |
|
|
554
555
|
| `id` | property | `VarEntry` | `dist/bpmn/bpmn-sdk.d.ts:1159-1160` |
|
|
@@ -648,7 +649,7 @@ not find it either.
|
|
|
648
649
|
| `kind` | property | `McpToolRef` | `dist/core/actions.d.ts:466` |
|
|
649
650
|
| `kind` | property | `ProcessToolRef` | `dist/core/actions.d.ts:743` |
|
|
650
651
|
| `kind` | property | `RemoteA2aToolRef` | `dist/core/actions.d.ts:494` |
|
|
651
|
-
| `kind` | property | `ResourceRef` | `dist/core/resource-resolution.d.ts:
|
|
652
|
+
| `kind` | property | `ResourceRef` | `dist/core/resource-resolution.d.ts:12-13` |
|
|
652
653
|
| `kind` | property | `SubflowSpec` | `dist/flow-sdk.d.ts:55` |
|
|
653
654
|
| `kind` | property | `WhenExpression` | `dist/case/case-sdk.d.ts:166-167` |
|
|
654
655
|
| `kValue` | property | `AgentMemoryRef` | `dist/core/actions.d.ts:589-590` |
|
|
@@ -784,7 +785,7 @@ not find it either.
|
|
|
784
785
|
| `name` | property | `DataServiceFolderEntity` | `dist/bpmn/data-service.d.ts:141-142` |
|
|
785
786
|
| `name` | property | `DataServiceOpts` | `dist/bpmn/bpmn-sdk.d.ts:1255-1256` |
|
|
786
787
|
| `name` | property | `EndOpts` | `dist/bpmn/bpmn-sdk.d.ts:832-833` |
|
|
787
|
-
| `name` | property | `EntityRef` | `dist/core/resource-resolution.d.ts:
|
|
788
|
+
| `name` | property | `EntityRef` | `dist/core/resource-resolution.d.ts:25-26` |
|
|
788
789
|
| `name` | property | `ErrorDecl` | `dist/bpmn/bpmn-sdk.d.ts:500-501` |
|
|
789
790
|
| `name` | property | `EscalationRef` | `dist/core/actions.d.ts:814-815` |
|
|
790
791
|
| `name` | property | `EventSubProcessOpts` | `dist/bpmn/bpmn-sdk.d.ts:2097-2098` |
|
|
@@ -819,7 +820,7 @@ not find it either.
|
|
|
819
820
|
| `name` | property | `RegistryOutput` | `dist/bpmn/typed-node.d.ts:79` |
|
|
820
821
|
| `name` | property | `RemoteA2aToolRef` | `dist/core/actions.d.ts:495-496` |
|
|
821
822
|
| `name` | property | `ResolvedEventTriggerOpts` | `dist/case/case-sdk.d.ts:369-370` |
|
|
822
|
-
| `name` | property | `ResourceRef` | `dist/core/resource-resolution.d.ts:
|
|
823
|
+
| `name` | property | `ResourceRef` | `dist/core/resource-resolution.d.ts:14-15` |
|
|
823
824
|
| `name` | property | `ReturnOptions` | `dist/flow-sdk.d.ts:384-409` |
|
|
824
825
|
| `name` | property | `RpaWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:23-24` |
|
|
825
826
|
| `name` | property | `ScriptTaskOpts` | `dist/bpmn/bpmn-sdk.d.ts:991-992` |
|
|
@@ -945,7 +946,7 @@ not find it either.
|
|
|
945
946
|
| `payload` | property | `SubProcessOpts` | `dist/bpmn/bpmn-sdk.d.ts:1145-1152` |
|
|
946
947
|
| `payload` | property | `ThrowOpts` | `dist/bpmn/bpmn-sdk.d.ts:872-873` |
|
|
947
948
|
| `persona` | property | `VoiceSettings` | `dist/nodes/agent/flow/spec.d.ts:136-137` |
|
|
948
|
-
| `personalWorkspaceConnectionsOnly` | property | `ConversationAppearance` | `dist/nodes/trigger/flow/spec.d.ts:
|
|
949
|
+
| `personalWorkspaceConnectionsOnly` | property | `ConversationAppearance` | `dist/nodes/trigger/flow/spec.d.ts:75-79` |
|
|
949
950
|
| `pinnedFlowIds` | property | `SugarRegistry` | `dist/bpmn/bpmn-sdk.d.ts:2212-2219` |
|
|
950
951
|
| `placements` | property | `RegistryTypeSpec` | `dist/bpmn/typed-node.d.ts:116-129` |
|
|
951
952
|
| `plainTask` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:2586-2619` |
|
|
@@ -1177,7 +1178,7 @@ not find it either.
|
|
|
1177
1178
|
| `startEntryPointId` | property | `EventSubProcessOpts` | `dist/bpmn/bpmn-sdk.d.ts:2150-2151` |
|
|
1178
1179
|
| `startEvent` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:2467-2483` |
|
|
1179
1180
|
| `startId` | property | `EventSubProcessOpts` | `dist/bpmn/bpmn-sdk.d.ts:2144-2145` |
|
|
1180
|
-
| `startingPrompts` | property | `ConversationAppearance` | `dist/nodes/trigger/flow/spec.d.ts:
|
|
1181
|
+
| `startingPrompts` | property | `ConversationAppearance` | `dist/nodes/trigger/flow/spec.d.ts:73-74` |
|
|
1181
1182
|
| `startName` | property | `EventSubProcessOpts` | `dist/bpmn/bpmn-sdk.d.ts:2146-2147` |
|
|
1182
1183
|
| `startPayload` | property | `EventSubProcessOpts` | `dist/bpmn/bpmn-sdk.d.ts:2148-2149` |
|
|
1183
1184
|
| `startProcess` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:2804-2823` |
|
|
@@ -1375,8 +1376,8 @@ not find it either.
|
|
|
1375
1376
|
| `waitForTimer` | method | `TaskBuilder` | `dist/case/case-sdk.d.ts:1514-1520` |
|
|
1376
1377
|
| `waypoints` | property | `EdgeRoute` | `dist/flow-sdk.d.ts:636-641` |
|
|
1377
1378
|
| `webSearchGrounding` | property | `BuiltinToolRef` | `dist/core/actions.d.ts:616-620` |
|
|
1378
|
-
| `welcomeDescription` | property | `ConversationAppearance` | `dist/nodes/trigger/flow/spec.d.ts:
|
|
1379
|
-
| `welcomeTitle` | property | `ConversationAppearance` | `dist/nodes/trigger/flow/spec.d.ts:
|
|
1379
|
+
| `welcomeDescription` | property | `ConversationAppearance` | `dist/nodes/trigger/flow/spec.d.ts:71-72` |
|
|
1380
|
+
| `welcomeTitle` | property | `ConversationAppearance` | `dist/nodes/trigger/flow/spec.d.ts:69-70` |
|
|
1380
1381
|
| `when` | property | `FormFieldCondition` | `dist/core/actions.d.ts:136-137` |
|
|
1381
1382
|
| `when` | property | `SlaOpts` | `dist/case/case-sdk.d.ts:261-267` |
|
|
1382
1383
|
| `when` | property | `SwitchArm` | `dist/flow-sdk.d.ts:206-211` |
|
package/dist/bpmn/check.js
CHANGED
|
@@ -26,6 +26,7 @@ import { bindingRequiredFields, CASE_RUNTIME_INTERNAL_TYPES, CONNECTOR_ACTIVITY_
|
|
|
26
26
|
import { ownEntry } from '../core/own-entry.js';
|
|
27
27
|
import { MANAGED_HTTP_TYPE, isManagedHttpV2, managedHttpAbsoluteUrl, managedHttpMissing } from './managed-http.js';
|
|
28
28
|
import { connectorV2Missing, isConnectorV2 } from './connector.js';
|
|
29
|
+
import { lookupConnectionIndex } from '../core/lookup-connection.js';
|
|
29
30
|
/**
|
|
30
31
|
* The node row a diagnostic is about, where two rules can report one row: the
|
|
31
32
|
* authored-task rules (`checkIntsvcActivities`, EMPTY_REQUIRED_FIELD) and the
|
|
@@ -120,6 +121,9 @@ export function check(built, opts = {}) {
|
|
|
120
121
|
}
|
|
121
122
|
/** {@link check}, saying whether the serializer pass stopped early, for `check --baseline` (check-baseline.ts). */
|
|
122
123
|
export function checkModel(built, opts = {}) {
|
|
124
|
+
// Which steps share a recorded lookup row across connections (LOOKUP_CONNECTION_MISMATCH), file-wide.
|
|
125
|
+
if (opts.resolutions && !opts.lookupConnections)
|
|
126
|
+
opts = { ...opts, lookupConnections: lookupConnectionIndex(built, opts.resolutions, opts.bindings) };
|
|
123
127
|
const diags = [];
|
|
124
128
|
// Duplicate and missing ids (`documentIdProblems`) are the serializer's.
|
|
125
129
|
checkScope(built.nodes, built.flows, 'process', diags, true);
|
package/dist/case/check.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export interface Diagnostic {
|
|
|
40
40
|
* Every hook fails open: without a library, `check` judges a connector task up
|
|
41
41
|
* to the library, as `compile` would.
|
|
42
42
|
*/
|
|
43
|
-
export type CaseCheckOpts = Pick<ConnectorCheckOpts, 'lookups' | 'resolutions' | 'resources' | 'schemaReadiness' | 'bindings'> & {
|
|
43
|
+
export type CaseCheckOpts = Pick<ConnectorCheckOpts, 'lookups' | 'resolutions' | 'resources' | 'schemaReadiness' | 'bindings' | 'lookupConnections'> & {
|
|
44
44
|
/** The library `compile` serializes against, for the serializer `check` runs. */
|
|
45
45
|
library?: Library;
|
|
46
46
|
};
|
package/dist/case/check.js
CHANGED
|
@@ -13,6 +13,7 @@ import { checkRuleSemantics } from './check-rule-semantics.js';
|
|
|
13
13
|
import { serialize } from './serialize.js';
|
|
14
14
|
import { lintPlanFindings, planReport } from './plan-check/index.js';
|
|
15
15
|
import { caseExprLints } from './case-expr-check.js';
|
|
16
|
+
import { lookupConnectionIndex } from '../core/lookup-connection.js';
|
|
16
17
|
const TYPE_NAMES = new Set(Object.values(types));
|
|
17
18
|
// audit-case-coverage: rule-slot table start
|
|
18
19
|
// This runtime table must equal the committed matrix's rejected cells. The audit
|
|
@@ -27,6 +28,9 @@ const ILLEGAL = [];
|
|
|
27
28
|
* @returns Every diagnostic found. An `error` fails `check`; only a `lowering` error stops `compile`.
|
|
28
29
|
*/
|
|
29
30
|
export function check(built, opts = {}) {
|
|
31
|
+
// Which steps share a recorded lookup row across connections (LOOKUP_CONNECTION_MISMATCH), file-wide.
|
|
32
|
+
if (opts.resolutions && !opts.lookupConnections)
|
|
33
|
+
opts = { ...opts, lookupConnections: lookupConnectionIndex(built, opts.resolutions, opts.bindings) };
|
|
30
34
|
const diags = [];
|
|
31
35
|
if (!built.id)
|
|
32
36
|
diags.push({ level: 'error', code: 'NO_ID', message: 'casePlan() requires an id.' });
|
package/dist/check.js
CHANGED
|
@@ -26,6 +26,7 @@ import { loopParallelWarning, resolveLoopDefinition, loopVersion } from './loop-
|
|
|
26
26
|
import { refusalClass } from './core/refusals.js';
|
|
27
27
|
import { classifyDrafts, placeDiagnostics } from './edit-scope.js';
|
|
28
28
|
import { preExistingFindings, scopeFindings } from './core/baseline-scope.js';
|
|
29
|
+
import { lookupConnectionIndex } from './core/lookup-connection.js';
|
|
29
30
|
export function check(built, opts = {}) {
|
|
30
31
|
return checkCompiled(built, opts).diagnostics;
|
|
31
32
|
}
|
|
@@ -36,6 +37,9 @@ export function check(built, opts = {}) {
|
|
|
36
37
|
* code's `class`.
|
|
37
38
|
*/
|
|
38
39
|
export function checkCompiled(built, opts = {}) {
|
|
40
|
+
// Which steps share a recorded lookup row across connections (LOOKUP_CONNECTION_MISMATCH), file-wide.
|
|
41
|
+
if (opts.resolutions && !opts.lookupConnections)
|
|
42
|
+
opts = { ...opts, lookupConnections: lookupConnectionIndex(built, opts.resolutions, opts.bindings) };
|
|
39
43
|
// A connection two connectors use, and an agent resource's `nodeId` another
|
|
40
44
|
// node of the file has, are the serializer's CONNECTION_CONNECTOR_CONFLICT /
|
|
41
45
|
// FLOW_AGENT_RESOURCE_NODE_ID: it claims ids and resolves connections file-wide.
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
import { type LookupResolutions, type LookupSpec } from './lookups.js';
|
|
26
26
|
import type { SchemaReadiness } from './library.js';
|
|
27
27
|
import { CompileRefusal } from './compile-refusal.js';
|
|
28
|
+
import { type LookupConnectionIndex } from './lookup-connection.js';
|
|
28
29
|
import { type ResourceResolutions } from './resource-resolution.js';
|
|
29
30
|
import { type BindingsView, type PrepareTarget } from './binding-messages.js';
|
|
30
31
|
/** One connector activity, as every family already models it. */
|
|
@@ -152,6 +153,12 @@ export interface ConnectorCheckOpts {
|
|
|
152
153
|
}, inputs: Record<string, unknown>) => string | undefined;
|
|
153
154
|
/** The project's `bindings.json`, for the label rules. */
|
|
154
155
|
bindings?: BindingsView;
|
|
156
|
+
/**
|
|
157
|
+
* Which bound connections use each recorded lookup row, file-wide
|
|
158
|
+
* (`lookupConnectionIndex`), so LOOKUP_CONNECTION_MISMATCH can tell a row two
|
|
159
|
+
* steps share across connections from one `prepare` can fix.
|
|
160
|
+
*/
|
|
161
|
+
lookupConnections?: LookupConnectionIndex;
|
|
155
162
|
}
|
|
156
163
|
/**
|
|
157
164
|
* The `resource()` / `entity()` inputs.
|
|
@@ -22,12 +22,13 @@
|
|
|
22
22
|
* over `vars`. Without this a BPMN `'=vars.channelId'` would read as a pasted
|
|
23
23
|
* literal id and warn about itself.
|
|
24
24
|
*/
|
|
25
|
-
import { isLookupToken,
|
|
25
|
+
import { isLookupToken, recordedResolution, } from './lookups.js';
|
|
26
26
|
import { Expr } from './expr.js';
|
|
27
27
|
import { isRecord } from './node-envelope.js';
|
|
28
28
|
import { extractRefs } from './expr-check.js';
|
|
29
29
|
import { prepareCommand, resolveFlagArg } from './cli-spelling.js';
|
|
30
30
|
import { CompileRefusal } from './compile-refusal.js';
|
|
31
|
+
import { LOOKUP_CONNECTION_MISMATCH, lookupConnectionMismatch } from './lookup-connection.js';
|
|
31
32
|
import { isResourceToken, resolveRecordedResource } from './resource-resolution.js';
|
|
32
33
|
import { bindingLabelRefusal, bindingMissingMessage, missingBindingLabels, } from './binding-messages.js';
|
|
33
34
|
/**
|
|
@@ -187,6 +188,9 @@ unresolvedWarning = true) {
|
|
|
187
188
|
// `integration_service_boundary` eval card went from 70 turns to 86 and from
|
|
188
189
|
// 0/3 to 3/3 `max_turns_exhausted` when BPMN started reporting them at all.
|
|
189
190
|
const unresolved = [];
|
|
191
|
+
// Recorded lookups, for LOOKUP_CONNECTION_MISMATCH: each row names the
|
|
192
|
+
// connection it was resolved on, and the step names the one it runs on.
|
|
193
|
+
const resolved = [];
|
|
190
194
|
const literals = [];
|
|
191
195
|
const visit = (value, path) => {
|
|
192
196
|
if (isLookupToken(value)) {
|
|
@@ -213,8 +217,11 @@ unresolvedWarning = true) {
|
|
|
213
217
|
});
|
|
214
218
|
return;
|
|
215
219
|
}
|
|
216
|
-
|
|
220
|
+
const row = recordedResolution(value, resolutions);
|
|
221
|
+
if (row?.value === undefined)
|
|
217
222
|
unresolved.push(value);
|
|
223
|
+
else
|
|
224
|
+
resolved.push({ token: value, row, name: named });
|
|
218
225
|
return;
|
|
219
226
|
}
|
|
220
227
|
const reading = dialect.classify(value);
|
|
@@ -263,6 +270,9 @@ unresolvedWarning = true) {
|
|
|
263
270
|
visit(value, [name]);
|
|
264
271
|
if (unresolved.length && unresolvedWarning)
|
|
265
272
|
report(unresolvedDiagnostic(where, spec, unresolved));
|
|
273
|
+
const mismatch = lookupConnectionMismatch(where, resolved, spec.connection, opts.bindings, { key: spec.key, action: spec.action }, opts.lookupConnections);
|
|
274
|
+
if (mismatch)
|
|
275
|
+
report({ level: 'error', code: LOOKUP_CONNECTION_MISMATCH, message: mismatch });
|
|
266
276
|
if (literals.length)
|
|
267
277
|
report(literalIdDiagnostic(where, spec, literals, dialect.descriptors));
|
|
268
278
|
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A Data Fabric entity's columns, as `registry prepare --entity` records them
|
|
3
|
+
* beside the entity's keys in the resource ledger (#1980).
|
|
4
|
+
*
|
|
5
|
+
* Data Fabric DROPS a column it does not know instead of rejecting it, and only
|
|
6
|
+
* logs a write it refuses, so a typo in a filter, a sort, a `set` key or a
|
|
7
|
+
* choice-set label validates clean and runs green. The schema is tenant data:
|
|
8
|
+
* nothing offline can tell a real column from a typo. `prepare` reads it once
|
|
9
|
+
* (`uip df entities get`, and `uip df choice-sets list-values` for each choice
|
|
10
|
+
* set) and `check` reads it from the ledger, the way it reads the keys.
|
|
11
|
+
*
|
|
12
|
+
* This module is the portable half: the recorded shape and the lookup `check`
|
|
13
|
+
* makes. Reading the tenant is `registry/prepare/entity-schema.ts`'s.
|
|
14
|
+
*/
|
|
15
|
+
import { type EntityRef, type ResourceResolution, type ResourceResolutions } from './resource-resolution.js';
|
|
16
|
+
/** One value of a choice set: the label an author sees, and the number Data Fabric stores and compares. */
|
|
17
|
+
export interface EntityChoiceValue {
|
|
18
|
+
/** The value's name, e.g. `'Active'`. */
|
|
19
|
+
name: string;
|
|
20
|
+
/** Its display name, when it differs from the name. */
|
|
21
|
+
displayName?: string;
|
|
22
|
+
/** What a filter compares and a write stores: `0`, `1`, … */
|
|
23
|
+
numberId: number;
|
|
24
|
+
}
|
|
25
|
+
/** One column of a Data Fabric entity, as `prepare` recorded it. */
|
|
26
|
+
export interface EntityFieldSchema {
|
|
27
|
+
/** The column's name, exactly as Data Fabric spells it (names are case-sensitive). */
|
|
28
|
+
name: string;
|
|
29
|
+
/** Its display name, when it differs from the name. */
|
|
30
|
+
displayName?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Data Fabric's type name, `FieldDataType.Name`: `STRING`, `MULTILINE_TEXT`,
|
|
33
|
+
* `INTEGER`, `DECIMAL`, `BOOLEAN`, `DATE`, `DATETIME_WITH_TZ`, `UUID`,
|
|
34
|
+
* `RELATIONSHIP`, `CHOICE_SET_SINGLE`, `CHOICE_SET_MULTIPLE`, `FILE`, …
|
|
35
|
+
*/
|
|
36
|
+
type: string;
|
|
37
|
+
/** `IsRequired`: Data Fabric rejects a write that sends null for this column. */
|
|
38
|
+
required: boolean;
|
|
39
|
+
/** A column Data Fabric assigns (`Id`, `CreateTime`, …): never writable. */
|
|
40
|
+
system?: true;
|
|
41
|
+
/** The column has a server default, so an insert may leave it out. */
|
|
42
|
+
hasDefault?: true;
|
|
43
|
+
/** A unique or primary-key column. */
|
|
44
|
+
unique?: true;
|
|
45
|
+
/** A file column: the native family cannot write it. */
|
|
46
|
+
attachment?: true;
|
|
47
|
+
/** An auto-number column, which Data Fabric assigns. */
|
|
48
|
+
autoNumber?: true;
|
|
49
|
+
/** The longest text the column holds, for a text type. */
|
|
50
|
+
lengthLimit?: number;
|
|
51
|
+
/** For a `RELATIONSHIP` column: the related entity, and the display column the reference carries. */
|
|
52
|
+
reference?: {
|
|
53
|
+
entity: string;
|
|
54
|
+
entityId?: string;
|
|
55
|
+
displayField?: string;
|
|
56
|
+
};
|
|
57
|
+
/** For a choice-set column: the set, and its values when `prepare` could read them. */
|
|
58
|
+
choiceSet?: {
|
|
59
|
+
name: string;
|
|
60
|
+
id: string;
|
|
61
|
+
values?: EntityChoiceValue[];
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
/** Where a step's entity lives, as the step names it. */
|
|
65
|
+
export interface EntityScopeRef {
|
|
66
|
+
entity: string | EntityRef;
|
|
67
|
+
folderKey?: string;
|
|
68
|
+
}
|
|
69
|
+
/** The recorded schema for a step's entity, and the row it came from. */
|
|
70
|
+
export interface RecordedEntitySchema {
|
|
71
|
+
fields: readonly EntityFieldSchema[];
|
|
72
|
+
row: ResourceResolution;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* The schema `prepare --entity` recorded for the entity a step names, or
|
|
76
|
+
* `undefined` when there is none to trust.
|
|
77
|
+
*
|
|
78
|
+
* - `{ name, folder }` reads its own row ({@link lookupResource}), the one
|
|
79
|
+
* `compile` takes its keys from.
|
|
80
|
+
* - A plain name reads the fresh `Entity` rows of that name whose scope is the
|
|
81
|
+
* step's: the row with the step's `folderKey`, or a tenant-level row when the
|
|
82
|
+
* step has none. Exactly one distinct entity must match; two (a name in two
|
|
83
|
+
* folders, recorded under different references) is no answer, never a guess.
|
|
84
|
+
*
|
|
85
|
+
* A row older than one session counts as absent, as it does for the keys: an
|
|
86
|
+
* entity edited since would be judged by its old columns.
|
|
87
|
+
*
|
|
88
|
+
* @param resources - The ledger rows `check` was given.
|
|
89
|
+
* @param scope - The step's `entity` and `folderKey`.
|
|
90
|
+
* @param now - The clock, for freshness.
|
|
91
|
+
*/
|
|
92
|
+
export declare function recordedEntitySchema(resources: ResourceResolutions | undefined, scope: EntityScopeRef, now?: number): RecordedEntitySchema | undefined;
|
|
93
|
+
/** The column named exactly `name`, or `undefined`. */
|
|
94
|
+
export declare function entityField(fields: readonly EntityFieldSchema[], name: string): EntityFieldSchema | undefined;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A Data Fabric entity's columns, as `registry prepare --entity` records them
|
|
3
|
+
* beside the entity's keys in the resource ledger (#1980).
|
|
4
|
+
*
|
|
5
|
+
* Data Fabric DROPS a column it does not know instead of rejecting it, and only
|
|
6
|
+
* logs a write it refuses, so a typo in a filter, a sort, a `set` key or a
|
|
7
|
+
* choice-set label validates clean and runs green. The schema is tenant data:
|
|
8
|
+
* nothing offline can tell a real column from a typo. `prepare` reads it once
|
|
9
|
+
* (`uip df entities get`, and `uip df choice-sets list-values` for each choice
|
|
10
|
+
* set) and `check` reads it from the ledger, the way it reads the keys.
|
|
11
|
+
*
|
|
12
|
+
* This module is the portable half: the recorded shape and the lookup `check`
|
|
13
|
+
* makes. Reading the tenant is `registry/prepare/entity-schema.ts`'s.
|
|
14
|
+
*/
|
|
15
|
+
import { ENTITY_KIND, entityResource, isEntityRef, lookupResource, resourceRowIsFresh, } from './resource-resolution.js';
|
|
16
|
+
/**
|
|
17
|
+
* The schema `prepare --entity` recorded for the entity a step names, or
|
|
18
|
+
* `undefined` when there is none to trust.
|
|
19
|
+
*
|
|
20
|
+
* - `{ name, folder }` reads its own row ({@link lookupResource}), the one
|
|
21
|
+
* `compile` takes its keys from.
|
|
22
|
+
* - A plain name reads the fresh `Entity` rows of that name whose scope is the
|
|
23
|
+
* step's: the row with the step's `folderKey`, or a tenant-level row when the
|
|
24
|
+
* step has none. Exactly one distinct entity must match; two (a name in two
|
|
25
|
+
* folders, recorded under different references) is no answer, never a guess.
|
|
26
|
+
*
|
|
27
|
+
* A row older than one session counts as absent, as it does for the keys: an
|
|
28
|
+
* entity edited since would be judged by its old columns.
|
|
29
|
+
*
|
|
30
|
+
* @param resources - The ledger rows `check` was given.
|
|
31
|
+
* @param scope - The step's `entity` and `folderKey`.
|
|
32
|
+
* @param now - The clock, for freshness.
|
|
33
|
+
*/
|
|
34
|
+
export function recordedEntitySchema(resources, scope, now = Date.now()) {
|
|
35
|
+
if (resources === undefined)
|
|
36
|
+
return undefined;
|
|
37
|
+
if (isEntityRef(scope.entity)) {
|
|
38
|
+
const row = lookupResource(resources, entityResource(scope.entity), now);
|
|
39
|
+
return row?.fields !== undefined ? { fields: row.fields, row } : undefined;
|
|
40
|
+
}
|
|
41
|
+
const name = scope.entity;
|
|
42
|
+
const matches = new Map();
|
|
43
|
+
for (const row of Object.values(resources)) {
|
|
44
|
+
if (row.kind !== ENTITY_KIND || row.name !== name || row.fields === undefined || !resourceRowIsFresh(row, now))
|
|
45
|
+
continue;
|
|
46
|
+
const sameScope = scope.folderKey !== undefined ? row.folderKey === scope.folderKey : row.scope === 'tenant';
|
|
47
|
+
if (sameScope)
|
|
48
|
+
matches.set(row.folderKey ?? '', row);
|
|
49
|
+
}
|
|
50
|
+
if (matches.size !== 1)
|
|
51
|
+
return undefined;
|
|
52
|
+
const row = [...matches.values()][0];
|
|
53
|
+
return { fields: row.fields, row };
|
|
54
|
+
}
|
|
55
|
+
/** The column named exactly `name`, or `undefined`. */
|
|
56
|
+
export function entityField(fields, name) {
|
|
57
|
+
return fields.find((f) => f.name === name);
|
|
58
|
+
}
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
* question, and in run 12 on having nowhere to put a payload condition.
|
|
20
20
|
*/
|
|
21
21
|
import { type LookupResolutions } from './lookups.js';
|
|
22
|
+
import { type LookupConnectionIndex } from './lookup-connection.js';
|
|
22
23
|
import { type ByoaEventFacts, type ByoaLedger } from './byoa.js';
|
|
23
24
|
import type { BindingsView } from './binding-messages.js';
|
|
24
25
|
/** A code/message sink, as each family's check supplies one. */
|
|
@@ -95,6 +96,8 @@ export interface EventCheckOpts {
|
|
|
95
96
|
resolutions?: LookupResolutions;
|
|
96
97
|
/** The project's `bindings.json`, for the BYOA connection check. */
|
|
97
98
|
bindings?: BindingsView;
|
|
99
|
+
/** Which bound connections use each recorded lookup row, file-wide (`lookupConnectionIndex`). */
|
|
100
|
+
lookupConnections?: LookupConnectionIndex;
|
|
98
101
|
}
|
|
99
102
|
/**
|
|
100
103
|
* Ask the library what event parameters a subscription's operation declares.
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
* `skill-bpmn-outlook-waitfor-email` in `flow-v2-run-8` failed on exactly that last
|
|
19
19
|
* question, and in run 12 on having nowhere to put a payload condition.
|
|
20
20
|
*/
|
|
21
|
-
import { isLookupToken,
|
|
21
|
+
import { isLookupToken, recordedEventResolution, unresolvedLookupMessage, } from './lookups.js';
|
|
22
|
+
import { LOOKUP_CONNECTION_MISMATCH, lookupConnectionMismatch } from './lookup-connection.js';
|
|
22
23
|
import { prepareCommand } from './cli-spelling.js';
|
|
23
24
|
import { EVENT_FILTER_OPERATORS, eventFiltersNotArray, readEventFilter, eventFilterExpressionRefusal, eventFilterProblem, jmesStringProblem } from './event-filters.js';
|
|
24
25
|
import { EVENT_BYOA_UNVERIFIED, byoaUnverified } from './byoa.js';
|
|
@@ -134,14 +135,27 @@ compileRefusals = true) {
|
|
|
134
135
|
const resolutions = opts.resolutions ?? {};
|
|
135
136
|
const scope = sub.where && typeof sub.where === 'object'
|
|
136
137
|
? Object.entries(sub.where) : [];
|
|
137
|
-
|
|
138
|
+
// Recorded `where` lookups, for LOOKUP_CONNECTION_MISMATCH. Reported whatever
|
|
139
|
+
// `compileRefusals` says: compile writes a mismatched id without a word.
|
|
140
|
+
const recorded = [];
|
|
141
|
+
for (const [key, value] of scope) {
|
|
138
142
|
if (!isLookupToken(value))
|
|
139
143
|
continue;
|
|
140
|
-
|
|
144
|
+
const row = recordedEventResolution(value, resolutions);
|
|
145
|
+
if (row?.value !== undefined) {
|
|
146
|
+
recorded.push({ token: value, row, name: `where.${key}` });
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
if (!compileRefusals)
|
|
141
150
|
continue;
|
|
142
151
|
warn('LOOKUP_UNRESOLVED', `${where}: \`where.${key}\` ` + unresolvedLookupMessage(value)
|
|
143
152
|
+ `\nCompile will fail until this is recorded.`);
|
|
144
153
|
}
|
|
154
|
+
const mismatch = lookupConnectionMismatch(where, recorded, sub.connection, opts.bindings, {
|
|
155
|
+
key: connectorKey, action: eventName, ...(object ? { extra: ['--object', object] } : {}),
|
|
156
|
+
}, opts.lookupConnections);
|
|
157
|
+
if (mismatch)
|
|
158
|
+
error(LOOKUP_CONNECTION_MISMATCH, mismatch);
|
|
145
159
|
const names = opts.eventFilterFields?.(sub.connector, sub.event, object);
|
|
146
160
|
if (names && names.length > 0 && Array.isArray(sub.filters)) {
|
|
147
161
|
const known = new Set(names);
|