Skip to main content

Module approval_queue

Module approval_queue 

Source
Expand description

Storage operations for the approval queue.

Provides CRUD operations for queuing posts for human review when approval_mode is enabled.

Structs§

ApprovalItem
A pending item in the approval queue.
ApprovalStats
Counts of approval items grouped by status.
EditHistoryEntry
A single edit history entry for an approval item.
ProvenanceInput
Bundled provenance input for enqueue_with_provenance_for.
ReviewAction
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.