feat(node-type-registry): add max_depth parameter to EventReferral#1201
Merged
Conversation
Adds max_depth (integer, 1-10, default 1) to EventReferral parameter_schema. When >1, the trigger generator walks the claimed_invites chain up to max_depth levels, enabling multi-level referral rewards. App-level only — cannot be combined with entity_field. Closes constructive-io/constructive-planning#904
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
max_depthtoEventReferral'sparameter_schemain the node-type-registry package. This enables the downstream generator inconstructive-dbto build multi-level referral chain walks.Change: One new property in
packages/node-type-registry/src/event/referral.ts:The generator implementation that consumes this is in constructive-db PR #1261.
Closes constructive-io/constructive-planning#904
Review & Testing Checklist for Human
auto_register_type, afterentity_field) is consistent with other node typesNotes
This is a purely additive schema change — no existing behavior changes since the default is 1 (today's single-hop behavior). The downstream
constructive-dbPR has the generator implementation + integration tests.Link to Devin session: https://app.devin.ai/sessions/2ad5d38ab24e4d43ba283eb9ae8b5c81
Requested by: @pyramation