Skip to content

feat: enhance journey, campaign, and list management with unarchive f…#231

Open
RickieeeDev wants to merge 7 commits into
mainfrom
feat/recover-archived-files
Open

feat: enhance journey, campaign, and list management with unarchive f…#231
RickieeeDev wants to merge 7 commits into
mainfrom
feat/recover-archived-files

Conversation

@RickieeeDev
Copy link
Copy Markdown
Contributor

…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.

…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.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 includeDeleted query support to list endpoints/stores for journeys, campaigns, and lists.
  • Added unarchive endpoints/controllers and store methods to clear deleted_at for 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.

Comment thread internal/http/controllers/v1/management/campaigns.go
Comment thread internal/http/controllers/v1/management/lists.go
Comment thread internal/store/management/campaigns.go Outdated
Comment thread internal/store/subjects/lists.go Outdated
Comment thread internal/store/subjects/lists.go
Comment thread console/src/views/users/Lists.tsx Outdated
Comment thread console/src/views/journey/Journeys.tsx Outdated
Comment thread console/src/views/campaign/Campaigns.tsx Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants