Feat: Add event instance cascade service to event and organization routes#194
Open
evanpetzoldt wants to merge 12 commits intodevfrom
Open
Feat: Add event instance cascade service to event and organization routes#194evanpetzoldt wants to merge 12 commits intodevfrom
evanpetzoldt wants to merge 12 commits intodevfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Introduces a new cascade service used by the API’s event and org routers to automatically manage recurring event instances (create/update/recreate on series changes, and cascade soft-deletes on series/org deletion).
Changes:
- Add
cascade-servicewith functions to create/update/recreate/delete futureevent_instancesfrom a recurring series. - Invoke cascade logic from
event.crupdateandevent.delete. - Invoke AO-specific cascade logic from
org.delete, and update route descriptions accordingly.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 14 comments.
| File | Description |
|---|---|
| packages/api/src/router/org.ts | Updates org delete behavior/docs and adds AO-only cascade soft-delete of series and future instances. |
| packages/api/src/router/event.ts | Adds cascade behavior to series create/update and cascaded future-instance soft-delete on event delete. |
| packages/api/src/lib/cascade-service.ts | New service implementing instance generation, future updates, and (soft/hard) deletion helpers. |
| packages/api/src/lib/cascade-service.test.ts | New integration-style tests for cascade-service behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This pull request introduces a service to manage instances of a series as the series and org endpoints are used. Now, changes to recurring events (series) will automatically propagate to their future instances, and deleting an event or organization will also handle related series and instances appropriately. The most important changes are grouped below.
Event Series Cascade Management:
event.ts) [1] [2].event.ts) [1] [2].Organization Cascade Management:
org.ts) [1] [2].👋 TL;DR
Added a service to
eventandorgroutes that manage underlying event instances.🥜 GIF