[feat]: Support unpublish action for collection items
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- api
Research direction
Start by locating the collection API and its existing publish() method in the TypeScript client, then review the related tests or examples. Add the corresponding unpublish behavior for collection items and verify that the client can call it with an item identifier while preserving the publish() usage pattern.
Written by the indexing model from the issue text.
Description
A clear and concise description of what the feature is
Currently, the strapi/client SDK supports publishing entries, but there is no built-in method to unpublish a collection item. This feature request is to add an unpublish() method (or similar) to allow programmatically unpublishing a collection entry via the client.
Why should this feature be included?
This would enable developers to fully manage the publishing lifecycle of content directly from the frontend or admin tool, especially when integrating custom workflows or headless CMS setups. It’s a natural counterpart to the existing publish() method and essential for building a complete editorial experience.
Please provide an example for how this would work
`import { strapi } from '@strapi/client';
const strapiClient = strapi({
baseURL: 'http://localhost:1337/api',
auth: STRAPI_API_TOKEN,
});
// Unpublish an article
await strapiClient.collection('articles').unpublish('article-id');`
This API should ideally mirror the structure and usage of the existing publish() method for consistency and developer experience.
- Dominant language
- TypeScript
- Stars
- 83
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from strapi/client
-
issue: bug status: to be confirmed
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
issue: enhancement
Difficulty 3/5 1-2 days Newbie friendliness 52/100
-
issue: enhancement
Difficulty 5/5 Over a week Newbie friendliness 48/100
-
issue: enhancement
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
issue: bug source: client status: to be confirmed
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·