Skip to content

feat(sites): add restore command and deleted listing - #12

Merged
vigneshrajsb merged 2 commits into
mainfrom
sites-restore
Oct 9, 2026
Merged

vigneshrajsb merged 2 commits into
mainfrom
sites-restore

Conversation

@vigneshrajsb

@vigneshrajsb vigneshrajsb commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Depends on GoodRxOSS/lifecycle#256 (site soft delete). Merge after it ships.

  • lfc sites restore <id>: restores a deleted site at the same id and URL. The revision comes from the deleted list, because GET /sites/{id} returns 404 for deleted sites.
  • lfc sites list --deleted: shows your restorable sites, when each stops being restorable, and how long deleted sites are kept (from deletedRetentionDays in sites capabilities). --deleted implies --mine and can't be combined with --public.
  • lfc sites delete: the prompt says how many days the site can be restored, and the output says until when lfc sites restore will work.
  • Docs: lfc llms and the README are updated.
  • Generated types: the first commit adds only the Sites types this change uses (site, sitePermissions, siteStatus, listSitesView, listSitesParams, sitesCapabilities), taken unmodified from pnpm generate:api. The rest of the regenerated backlog is left out for now.

Test plan

  • pnpm lint, pnpm typecheck, pnpm test, pnpm format:check pass, with new tests for restore, list --deleted, flag combinations, and the delete message.
  • Against a server running lifecycle#256: delete a site, lfc sites list --deleted, lfc sites restore <id>, and check the original URL works again.

@vigneshrajsb
vigneshrajsb marked this pull request as ready for review October 9, 2026 22:23
Regenerated with pnpm generate:api; only the Sites types this change
uses are committed.
Add lfc sites restore <id> and lfc sites list --deleted, show how long
deleted sites are kept (from sites capabilities), and point delete output
at restore. The delete prompt only promises a restore window when the
server reports one.
@vigneshrajsb
vigneshrajsb merged commit 467dd28 into main Oct 9, 2026
1 check passed
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.

1 participant