Expand description
Storage operations for the approval queue.
Provides CRUD operations for queuing posts for human review
when approval_mode is enabled.
Structs§
- Approval
Item - A pending item in the approval queue.
- Approval
Stats - Counts of approval items grouped by status.
- Edit
History Entry - A single edit history entry for an approval item.
- Provenance
Input - Bundled provenance input for
enqueue_with_provenance_for. - Review
Action - Optional review metadata for approve/reject actions.
Functions§
- batch_
approve - Batch-approve the oldest N pending items, returning their IDs.
- batch_
approve_ for - Batch-approve the oldest N pending items for a specific account, returning their IDs.
- clear_
qa_ override - Clear QA override metadata (used when content changes and QA is re-run).
- clear_
qa_ override_ for - Clear QA override metadata for a specific account (used when content changes and QA is re-run).
- enqueue
- Insert a new item into the approval queue.
- enqueue_
for - Insert a new item into the approval queue for a specific account.
- enqueue_
with_ context - Insert a new item into the approval queue with optional reason and risks.
- enqueue_
with_ context_ for - Insert a new item into the approval queue with optional reason, risks, and scheduling intent for a specific account.
- enqueue_
with_ provenance_ for - Insert a new item into the approval queue with provenance for a specific account.
- expire_
old_ items - Expire old pending items (older than the specified hours).
- expire_
old_ items_ for - Expire old pending items for a specific account (older than the specified hours).
- get_
by_ id - Get a single approval item by ID.
- get_
by_ id_ for - Get a single approval item by ID for a specific account.
- get_
by_ statuses - Get approval items filtered by one or more statuses, with optional action type filter.
- get_
by_ statuses_ for - Get approval items filtered by one or more statuses for a specific account, with optional action type filter.
- get_
edit_ history - Get the edit history for an approval item, ordered by creation time.
- get_
filtered - Get approval items with optional filters for reviewer, date range, statuses, and action type.
- get_
filtered_ for - Get approval items with optional filters for a specific account.
- get_
next_ approved - Fetch the next approved item ready for posting.
- get_
next_ approved_ for - Fetch the next approved item ready for posting for a specific account.
- get_
pending - Get all pending approval items, ordered by creation time (oldest first).
- get_
pending_ for - Get all pending approval items for a specific account, ordered by creation time (oldest first).
- get_
stats - Get counts of items grouped by status.
- get_
stats_ for - Get counts of items grouped by status for a specific account.
- mark_
failed - Mark an approved item as failed, storing the error message.
- mark_
failed_ for - Mark an approved item as failed for a specific account, storing the error message.
- mark_
posted - Mark an approved item as posted, storing the returned tweet ID.
- mark_
posted_ for - Mark an approved item as posted for a specific account, storing the returned tweet ID.
- pending_
count - Get the count of pending items.
- pending_
count_ for - Get the count of pending items for a specific account.
- record_
edit - Record an edit to an approval item field.
- set_
qa_ override - Record an explicit QA override action.
- set_
qa_ override_ for - Record an explicit QA override action for a specific account.
- update_
content - Update the generated content of an item without changing its status.
- update_
content_ and_ approve - Update the content and status of an approval item (for edit-then-approve).
- update_
content_ and_ approve_ for - Update the content and status of an approval item for a specific account (for edit-then-approve).
- update_
content_ for - Update the generated content of an item for a specific account without changing its status.
- update_
media_ paths - Update the media paths of an approval item.
- update_
media_ paths_ for - Update the media paths of an approval item for a specific account.
- update_
qa_ fields - Update QA fields for an approval item.
- update_
qa_ fields_ for - Update QA fields for an approval item for a specific account.
- update_
status - Update the status of an approval item.
- update_
status_ for - Update the status of an approval item for a specific account.
- update_
status_ with_ review - Update the status of an approval item with review metadata.
- update_
status_ with_ review_ for - Update the status of an approval item with review metadata for a specific account.