Repository navigation
FE-1984: Add a Read entity flow action - #10051
kostandinang wants to merge 4 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview Introduces Manual flow run UI lists Reviewed by Cursor Bugbot for commit 6d4b063. Bugbot is set up for automated code reviews on this repo. Configure here. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #10051 +/- ##
==========================================
+ Coverage 68.14% 68.25% +0.10%
==========================================
Files 1995 1996 +1
Lines 205552 205290 -262
Branches 8707 8731 +24
==========================================
+ Hits 140065 140111 +46
+ Misses 63823 63510 -313
- Partials 1664 1669 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
e6242dc to
c537ff9
Compare
c537ff9 to
b920e13
Compare
4ab604b to
e6a7071
Compare
e6a7071 to
7ccca86
Compare
Reads one property of an entity as Text, Number, Boolean or Date, so that later steps can use it as a plain value. The property and its kind are a constant `EntityProperty` input, shaped like Filter's entity property subject, and the step's `value` output takes the kind it declares (`kindDeclaredBy`), so later connections are checked against it when the flow is defined. The step checks the value has that kind when it runs. A missing property gives no output, so later steps connected with `whenMissing: "skip"` are skipped. A missing or unreadable entity, a property with a list of values, or a value of another kind is an error. Co-authored-by: Amp <[email protected]>
Report a subject that isn't an entity property as such, rather than for what it lacks as the subject it is, e.g. a field subject's object input. Also cover a null property value in the activity tests, and a property that isn't a constant in the builder's type tests. Co-authored-by: Amp <[email protected]>
… of the output's kinds Co-authored-by: Cursor <[email protected]>
7ccca86 to
10457ce
Compare
…-a-read-entity-flow-action Co-authored-by: Cursor <[email protected]> # Conflicts: # libs/@local/hash-isomorphic-utils/src/flows/filter-condition.ts # libs/@local/hash-isomorphic-utils/src/flows/flow-definition-schema.ts # libs/@local/hash-isomorphic-utils/src/flows/types.ts # libs/@local/hash-isomorphic-utils/src/flows/validate-flow-definition.ts
🌟 Purpose
Adds Read Entity: reads one property of an entity as a plain value, e.g. an email address for a later Send email step.
entityId(an ID, or an item of a stored list) andproperty, a constant naming the property type base URL and the kind to read it as: Text, Number, Boolean or Date.value, of that kind. Missing when the entity has no value, so later steps connected withwhenMissing: "skip"are skipped.🔍 Changes
flows/types.tsKindDeclaredByand theEntityPropertykind. Start here.flows/read-entity.tsEntityProperty(Filter's property subject, limited to four kinds) and its checks.flows/step-shapes.ts,flows/validate-flow-definition.tsflows/define-flow.tsvalueby the declared kind in the typed builder.process-flow-workflow.tsflow-activities/read-entity-action.ts🤔 Decisions to review
payloadKindandkindFrom, an output can take the kind a constant input declares (KindDeclaredBy). The validator checks the input is a constant and declares one of the output's kinds. ReusingkindFromwould need a required fallback value, so a missing value could never skip later steps.🛡 Tests
0andfalse), missing and empty values, missing or unreadable entities, lists and values of the wrong kind.