feat: enhance journey, campaign, and list management with unarchive f…#231
Open
RickieeeDev wants to merge 7 commits into
Open
feat: enhance journey, campaign, and list management with unarchive f…#231RickieeeDev wants to merge 7 commits into
RickieeeDev wants to merge 7 commits into
Conversation
…unctionality - Added `includeDeleted` parameter to `ListJourneys`, `ListCampaigns`, and `ListLists` methods to filter archived items. - Implemented `UnarchiveJourney`, `UnarchiveCampaign`, and `UnarchiveList` methods to restore deleted journeys, campaigns, and lists. - Updated the `OAPI` representation for campaigns and lists to include an `Archived` field indicating their status. - Modified SQL queries to accommodate the new filtering logic for deleted items.
There was a problem hiding this comment.
Pull request overview
This PR adds “include archived” listing support and unarchive operations for journeys, campaigns, and lists across the API, store layer, and console UI, plus updates the OpenAPI schema/generated clients accordingly.
Changes:
- Added
includeDeletedquery support to list endpoints/stores for journeys, campaigns, and lists. - Added unarchive endpoints/controllers and store methods to clear
deleted_atfor journeys, campaigns, and lists. - Extended the OpenAPI/clients to expose archive state (
archived) for campaigns/lists and regenerated OAPI clients with updated runtime deps.
Reviewed changes
Copilot reviewed 15 out of 19 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| oapi/webhooks_gen.go | Regenerated code (oapi-codegen version bump) and enum helpers. |
| internal/store/subjects/lists.go | Adds deleted_at selection/mapping, includeDeleted filtering, and UnarchiveList. |
| internal/store/management/campaigns.go | Adds includeDeleted filtering, exposes archived in OAPI model, and UnarchiveCampaign. |
| internal/store/journey/journeys.go | Adds includeDeleted filtering and UnarchiveJourney support. |
| internal/http/controllers/v1/management/oapi/resources.yml | Adds include_deleted query param + new unarchive endpoints + archived fields in schemas. |
| internal/http/controllers/v1/management/lists.go | Wires include_deleted into listing and adds UnarchiveList handler. |
| internal/http/controllers/v1/management/journeys.go | Wires include_deleted into listing and adds UnarchiveJourney handler. |
| internal/http/controllers/v1/management/campaigns.go | Wires include_deleted into listing and adds UnarchiveCampaign handler. |
| internal/http/controllers/v1/client/oapi/resources_gen.go | Regenerated OAPI client code (runtime updates, binding/options changes). |
| go.mod / go.sum | Bumps github.com/oapi-codegen/runtime and other dependency versions. |
| console/src/views/users/Lists.tsx | Adds archived-lists dialog + unarchive action in console. |
| console/src/views/journey/Journeys.tsx | Adds archived-journeys dialog + unarchive action in console. |
| console/src/views/campaign/Campaigns.tsx | Adds archived-campaigns dialog + unarchive action in console. |
| console/src/types.ts | Adds include_deleted search param and optional archived on list type. |
| console/src/oapi/management.generated.ts | Regenerated TS types/paths for include_deleted + unarchive endpoints + archived fields. |
💡 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.
…unctionality
includeDeletedparameter toListJourneys,ListCampaigns, andListListsmethods to filter archived items.UnarchiveJourney,UnarchiveCampaign, andUnarchiveListmethods to restore deleted journeys, campaigns, and lists.OAPIrepresentation for campaigns and lists to include anArchivedfield indicating their status.