import { APIResource } from "../../core/resource.js"; import * as ItemsAPI from "./items.js"; import { ItemListParams, ItemListResponse, ItemResolveParams, ItemResolveResponse, ItemUnresolveParams, ItemUnresolveResponse, Items } from "./items.js"; import { APIPromise } from "../../core/api-promise.js"; import { RequestOptions } from "../../internal/request-options.js"; export declare class Queue extends APIResource { items: ItemsAPI.Items; /** * Get a queue */ retrieve(id: string, options?: RequestOptions): APIPromise; /** * Get detailed statistics about a moderation queue including review times, action * counts, and trends */ getStats(id: string, query?: QueueGetStatsParams | null | undefined, options?: RequestOptions): APIPromise; } /** * Discriminated union of every v2 webhook event. Switch on `type` to narrow to a * specific event shape. */ export type WebhookEvent = WebhookEvent.AuthorBlockedEvent | WebhookEvent.AuthorUnblockedEvent | WebhookEvent.AuthorSuspendedEvent | WebhookEvent.AuthorUpdatedEvent | WebhookEvent.AuthorTrustLevelChangedEvent | WebhookEvent.AuthorActionEvent | WebhookEvent.QueueItemCompletedEvent | WebhookEvent.QueueItemActionEvent | WebhookEvent.QueueItemRejectedEvent | WebhookEvent.QueueItemAllowedEvent; export declare namespace WebhookEvent { interface AuthorBlockedEvent { /** * Stable event ID. Use this to dedupe retries. */ id: string; api_version: 'v2'; /** * ISO 8601 timestamp of when the event was emitted. */ created: string; data: AuthorBlockedEvent.Data; /** * The event type. */ type: 'author.blocked'; } namespace AuthorBlockedEvent { interface Data { object: Data.Object; } namespace Data { interface Object { /** * Moderation action ID */ id: string; /** * The author the action was performed on */ author: Object.Author; /** * ISO 8601 timestamp of when the action was performed */ created_at: string; /** * Customer-defined key identifying this action */ key: string | null; /** * Display name of the action */ name: string | null; /** * The value passed to the action when it ran */ value: string | null; /** * The queue the item belongs to, if any */ queue?: Object.Queue; } namespace Object { /** * The author the action was performed on */ interface Author { /** * Author ID in Moderation API */ id: string; /** * Block or suspension details, if applicable. Null if the author is enabled. */ block: Author.Block | null; /** * Timestamp when author first appeared */ first_seen: number; /** * Timestamp of last activity */ last_seen: number; /** * Additional metadata provided by your system. We recommend including any relevant * information that may assist in the moderation process. */ metadata: Author.Metadata; metrics: Author.Metrics; /** * Risk assessment details, if available. */ risk_evaluation: Author.RiskEvaluation | null; /** * Current author status */ status: 'enabled' | 'suspended' | 'blocked'; trust_level: Author.TrustLevel; /** * The author's company or organization */ company?: string | null; /** * Author email address */ email?: string | null; /** * The author's ID from your system */ external_id?: string | null; /** * URL of the author's external profile */ external_link?: string | null; /** * Timestamp of last incident */ last_incident?: number | null; /** * Author name or identifier */ name?: string | null; /** * URL of the author's profile picture */ profile_picture?: string | null; } namespace Author { /** * Block or suspension details, if applicable. Null if the author is enabled. */ interface Block { /** * The moderators reason why the author was blocked or suspended. */ reason?: string | null; /** * The timestamp until which they are blocked if the author is suspended. */ until?: number | null; } /** * Additional metadata provided by your system. We recommend including any relevant * information that may assist in the moderation process. */ interface Metadata { /** * Whether the author's email is verified */ email_verified?: boolean | null; /** * Whether the author's identity is verified */ identity_verified?: boolean | null; /** * Whether the author is a paying customer */ is_paying_customer?: boolean | null; /** * Whether the author's phone number is verified */ phone_verified?: boolean | null; [k: string]: unknown; } interface Metrics { /** * Number of flagged content pieces */ flagged_content: number; /** * Total pieces of content */ total_content: number; /** * Average sentiment score of content (-1 to 1). Requires a sentiment model in your * project. */ average_sentiment?: number | null; } /** * Risk assessment details, if available. */ interface RiskEvaluation { /** * Calculated risk level based on more than 10 behavioral signals. */ risk_level?: number | null; } interface TrustLevel { /** * Author trust level (-1, 0, 1, 2, 3, or 4) */ level: number; /** * True if the trust level was set manually by a moderator */ manual: boolean; } } /** * The queue the item belongs to, if any */ interface Queue { id: string; } } } } interface AuthorUnblockedEvent { /** * Stable event ID. Use this to dedupe retries. */ id: string; api_version: 'v2'; /** * ISO 8601 timestamp of when the event was emitted. */ created: string; data: AuthorUnblockedEvent.Data; /** * The event type. */ type: 'author.unblocked'; } namespace AuthorUnblockedEvent { interface Data { object: Data.Object; } namespace Data { interface Object { /** * Moderation action ID */ id: string; /** * The author the action was performed on */ author: Object.Author; /** * ISO 8601 timestamp of when the action was performed */ created_at: string; /** * Customer-defined key identifying this action */ key: string | null; /** * Display name of the action */ name: string | null; /** * The value passed to the action when it ran */ value: string | null; /** * The queue the item belongs to, if any */ queue?: Object.Queue; } namespace Object { /** * The author the action was performed on */ interface Author { /** * Author ID in Moderation API */ id: string; /** * Block or suspension details, if applicable. Null if the author is enabled. */ block: Author.Block | null; /** * Timestamp when author first appeared */ first_seen: number; /** * Timestamp of last activity */ last_seen: number; /** * Additional metadata provided by your system. We recommend including any relevant * information that may assist in the moderation process. */ metadata: Author.Metadata; metrics: Author.Metrics; /** * Risk assessment details, if available. */ risk_evaluation: Author.RiskEvaluation | null; /** * Current author status */ status: 'enabled' | 'suspended' | 'blocked'; trust_level: Author.TrustLevel; /** * The author's company or organization */ company?: string | null; /** * Author email address */ email?: string | null; /** * The author's ID from your system */ external_id?: string | null; /** * URL of the author's external profile */ external_link?: string | null; /** * Timestamp of last incident */ last_incident?: number | null; /** * Author name or identifier */ name?: string | null; /** * URL of the author's profile picture */ profile_picture?: string | null; } namespace Author { /** * Block or suspension details, if applicable. Null if the author is enabled. */ interface Block { /** * The moderators reason why the author was blocked or suspended. */ reason?: string | null; /** * The timestamp until which they are blocked if the author is suspended. */ until?: number | null; } /** * Additional metadata provided by your system. We recommend including any relevant * information that may assist in the moderation process. */ interface Metadata { /** * Whether the author's email is verified */ email_verified?: boolean | null; /** * Whether the author's identity is verified */ identity_verified?: boolean | null; /** * Whether the author is a paying customer */ is_paying_customer?: boolean | null; /** * Whether the author's phone number is verified */ phone_verified?: boolean | null; [k: string]: unknown; } interface Metrics { /** * Number of flagged content pieces */ flagged_content: number; /** * Total pieces of content */ total_content: number; /** * Average sentiment score of content (-1 to 1). Requires a sentiment model in your * project. */ average_sentiment?: number | null; } /** * Risk assessment details, if available. */ interface RiskEvaluation { /** * Calculated risk level based on more than 10 behavioral signals. */ risk_level?: number | null; } interface TrustLevel { /** * Author trust level (-1, 0, 1, 2, 3, or 4) */ level: number; /** * True if the trust level was set manually by a moderator */ manual: boolean; } } /** * The queue the item belongs to, if any */ interface Queue { id: string; } } } } interface AuthorSuspendedEvent { /** * Stable event ID. Use this to dedupe retries. */ id: string; api_version: 'v2'; /** * ISO 8601 timestamp of when the event was emitted. */ created: string; data: AuthorSuspendedEvent.Data; /** * The event type. */ type: 'author.suspended'; } namespace AuthorSuspendedEvent { interface Data { object: Data.Object; } namespace Data { interface Object { /** * Moderation action ID */ id: string; /** * The author the action was performed on */ author: Object.Author; /** * ISO 8601 timestamp of when the action was performed */ created_at: string; /** * Customer-defined key identifying this action */ key: string | null; /** * Display name of the action */ name: string | null; /** * The value passed to the action when it ran */ value: string | null; /** * The queue the item belongs to, if any */ queue?: Object.Queue; } namespace Object { /** * The author the action was performed on */ interface Author { /** * Author ID in Moderation API */ id: string; /** * Block or suspension details, if applicable. Null if the author is enabled. */ block: Author.Block | null; /** * Timestamp when author first appeared */ first_seen: number; /** * Timestamp of last activity */ last_seen: number; /** * Additional metadata provided by your system. We recommend including any relevant * information that may assist in the moderation process. */ metadata: Author.Metadata; metrics: Author.Metrics; /** * Risk assessment details, if available. */ risk_evaluation: Author.RiskEvaluation | null; /** * Current author status */ status: 'enabled' | 'suspended' | 'blocked'; trust_level: Author.TrustLevel; /** * The author's company or organization */ company?: string | null; /** * Author email address */ email?: string | null; /** * The author's ID from your system */ external_id?: string | null; /** * URL of the author's external profile */ external_link?: string | null; /** * Timestamp of last incident */ last_incident?: number | null; /** * Author name or identifier */ name?: string | null; /** * URL of the author's profile picture */ profile_picture?: string | null; } namespace Author { /** * Block or suspension details, if applicable. Null if the author is enabled. */ interface Block { /** * The moderators reason why the author was blocked or suspended. */ reason?: string | null; /** * The timestamp until which they are blocked if the author is suspended. */ until?: number | null; } /** * Additional metadata provided by your system. We recommend including any relevant * information that may assist in the moderation process. */ interface Metadata { /** * Whether the author's email is verified */ email_verified?: boolean | null; /** * Whether the author's identity is verified */ identity_verified?: boolean | null; /** * Whether the author is a paying customer */ is_paying_customer?: boolean | null; /** * Whether the author's phone number is verified */ phone_verified?: boolean | null; [k: string]: unknown; } interface Metrics { /** * Number of flagged content pieces */ flagged_content: number; /** * Total pieces of content */ total_content: number; /** * Average sentiment score of content (-1 to 1). Requires a sentiment model in your * project. */ average_sentiment?: number | null; } /** * Risk assessment details, if available. */ interface RiskEvaluation { /** * Calculated risk level based on more than 10 behavioral signals. */ risk_level?: number | null; } interface TrustLevel { /** * Author trust level (-1, 0, 1, 2, 3, or 4) */ level: number; /** * True if the trust level was set manually by a moderator */ manual: boolean; } } /** * The queue the item belongs to, if any */ interface Queue { id: string; } } } } interface AuthorUpdatedEvent { /** * Stable event ID. Use this to dedupe retries. */ id: string; api_version: 'v2'; /** * ISO 8601 timestamp of when the event was emitted. */ created: string; data: AuthorUpdatedEvent.Data; /** * The event type. */ type: 'author.updated'; } namespace AuthorUpdatedEvent { interface Data { object: Data.Object; } namespace Data { interface Object { /** * Author ID in Moderation API */ id: string; /** * Block or suspension details, if applicable. Null if the author is enabled. */ block: Object.Block | null; /** * Timestamp when author first appeared */ first_seen: number; /** * Timestamp of last activity */ last_seen: number; /** * Additional metadata provided by your system. We recommend including any relevant * information that may assist in the moderation process. */ metadata: Object.Metadata; metrics: Object.Metrics; /** * Risk assessment details, if available. */ risk_evaluation: Object.RiskEvaluation | null; /** * Current author status */ status: 'enabled' | 'suspended' | 'blocked'; trust_level: Object.TrustLevel; /** * The author's company or organization */ company?: string | null; /** * Author email address */ email?: string | null; /** * The author's ID from your system */ external_id?: string | null; /** * URL of the author's external profile */ external_link?: string | null; /** * Timestamp of last incident */ last_incident?: number | null; /** * Author name or identifier */ name?: string | null; /** * URL of the author's profile picture */ profile_picture?: string | null; } namespace Object { /** * Block or suspension details, if applicable. Null if the author is enabled. */ interface Block { /** * The moderators reason why the author was blocked or suspended. */ reason?: string | null; /** * The timestamp until which they are blocked if the author is suspended. */ until?: number | null; } /** * Additional metadata provided by your system. We recommend including any relevant * information that may assist in the moderation process. */ interface Metadata { /** * Whether the author's email is verified */ email_verified?: boolean | null; /** * Whether the author's identity is verified */ identity_verified?: boolean | null; /** * Whether the author is a paying customer */ is_paying_customer?: boolean | null; /** * Whether the author's phone number is verified */ phone_verified?: boolean | null; [k: string]: unknown; } interface Metrics { /** * Number of flagged content pieces */ flagged_content: number; /** * Total pieces of content */ total_content: number; /** * Average sentiment score of content (-1 to 1). Requires a sentiment model in your * project. */ average_sentiment?: number | null; } /** * Risk assessment details, if available. */ interface RiskEvaluation { /** * Calculated risk level based on more than 10 behavioral signals. */ risk_level?: number | null; } interface TrustLevel { /** * Author trust level (-1, 0, 1, 2, 3, or 4) */ level: number; /** * True if the trust level was set manually by a moderator */ manual: boolean; } } } } interface AuthorTrustLevelChangedEvent { /** * Stable event ID. Use this to dedupe retries. */ id: string; api_version: 'v2'; /** * ISO 8601 timestamp of when the event was emitted. */ created: string; data: AuthorTrustLevelChangedEvent.Data; /** * The event type. */ type: 'author.trust_level_changed'; } namespace AuthorTrustLevelChangedEvent { interface Data { object: Data.Object; } namespace Data { interface Object { /** * Author ID in Moderation API */ id: string; /** * Block or suspension details, if applicable. Null if the author is enabled. */ block: Object.Block | null; /** * Timestamp when author first appeared */ first_seen: number; /** * Timestamp of last activity */ last_seen: number; /** * Additional metadata provided by your system. We recommend including any relevant * information that may assist in the moderation process. */ metadata: Object.Metadata; metrics: Object.Metrics; /** * Risk assessment details, if available. */ risk_evaluation: Object.RiskEvaluation | null; /** * Current author status */ status: 'enabled' | 'suspended' | 'blocked'; trust_level: Object.TrustLevel; /** * The author's company or organization */ company?: string | null; /** * Author email address */ email?: string | null; /** * The author's ID from your system */ external_id?: string | null; /** * URL of the author's external profile */ external_link?: string | null; /** * Timestamp of last incident */ last_incident?: number | null; /** * Author name or identifier */ name?: string | null; /** * URL of the author's profile picture */ profile_picture?: string | null; } namespace Object { /** * Block or suspension details, if applicable. Null if the author is enabled. */ interface Block { /** * The moderators reason why the author was blocked or suspended. */ reason?: string | null; /** * The timestamp until which they are blocked if the author is suspended. */ until?: number | null; } /** * Additional metadata provided by your system. We recommend including any relevant * information that may assist in the moderation process. */ interface Metadata { /** * Whether the author's email is verified */ email_verified?: boolean | null; /** * Whether the author's identity is verified */ identity_verified?: boolean | null; /** * Whether the author is a paying customer */ is_paying_customer?: boolean | null; /** * Whether the author's phone number is verified */ phone_verified?: boolean | null; [k: string]: unknown; } interface Metrics { /** * Number of flagged content pieces */ flagged_content: number; /** * Total pieces of content */ total_content: number; /** * Average sentiment score of content (-1 to 1). Requires a sentiment model in your * project. */ average_sentiment?: number | null; } /** * Risk assessment details, if available. */ interface RiskEvaluation { /** * Calculated risk level based on more than 10 behavioral signals. */ risk_level?: number | null; } interface TrustLevel { /** * Author trust level (-1, 0, 1, 2, 3, or 4) */ level: number; /** * True if the trust level was set manually by a moderator */ manual: boolean; } } } } interface AuthorActionEvent { /** * Stable event ID. Use this to dedupe retries. */ id: string; api_version: 'v2'; /** * ISO 8601 timestamp of when the event was emitted. */ created: string; data: AuthorActionEvent.Data; /** * The event type. */ type: 'author.action'; } namespace AuthorActionEvent { interface Data { object: Data.Object; } namespace Data { interface Object { /** * Moderation action ID */ id: string; /** * The author the action was performed on */ author: Object.Author; /** * ISO 8601 timestamp of when the action was performed */ created_at: string; /** * Customer-defined key identifying this action */ key: string | null; /** * Display name of the action */ name: string | null; /** * The value passed to the action when it ran */ value: string | null; /** * The queue the item belongs to, if any */ queue?: Object.Queue; } namespace Object { /** * The author the action was performed on */ interface Author { /** * Author ID in Moderation API */ id: string; /** * Block or suspension details, if applicable. Null if the author is enabled. */ block: Author.Block | null; /** * Timestamp when author first appeared */ first_seen: number; /** * Timestamp of last activity */ last_seen: number; /** * Additional metadata provided by your system. We recommend including any relevant * information that may assist in the moderation process. */ metadata: Author.Metadata; metrics: Author.Metrics; /** * Risk assessment details, if available. */ risk_evaluation: Author.RiskEvaluation | null; /** * Current author status */ status: 'enabled' | 'suspended' | 'blocked'; trust_level: Author.TrustLevel; /** * The author's company or organization */ company?: string | null; /** * Author email address */ email?: string | null; /** * The author's ID from your system */ external_id?: string | null; /** * URL of the author's external profile */ external_link?: string | null; /** * Timestamp of last incident */ last_incident?: number | null; /** * Author name or identifier */ name?: string | null; /** * URL of the author's profile picture */ profile_picture?: string | null; } namespace Author { /** * Block or suspension details, if applicable. Null if the author is enabled. */ interface Block { /** * The moderators reason why the author was blocked or suspended. */ reason?: string | null; /** * The timestamp until which they are blocked if the author is suspended. */ until?: number | null; } /** * Additional metadata provided by your system. We recommend including any relevant * information that may assist in the moderation process. */ interface Metadata { /** * Whether the author's email is verified */ email_verified?: boolean | null; /** * Whether the author's identity is verified */ identity_verified?: boolean | null; /** * Whether the author is a paying customer */ is_paying_customer?: boolean | null; /** * Whether the author's phone number is verified */ phone_verified?: boolean | null; [k: string]: unknown; } interface Metrics { /** * Number of flagged content pieces */ flagged_content: number; /** * Total pieces of content */ total_content: number; /** * Average sentiment score of content (-1 to 1). Requires a sentiment model in your * project. */ average_sentiment?: number | null; } /** * Risk assessment details, if available. */ interface RiskEvaluation { /** * Calculated risk level based on more than 10 behavioral signals. */ risk_level?: number | null; } interface TrustLevel { /** * Author trust level (-1, 0, 1, 2, 3, or 4) */ level: number; /** * True if the trust level was set manually by a moderator */ manual: boolean; } } /** * The queue the item belongs to, if any */ interface Queue { id: string; } } } } interface QueueItemCompletedEvent { /** * Stable event ID. Use this to dedupe retries. */ id: string; api_version: 'v2'; /** * ISO 8601 timestamp of when the event was emitted. */ created: string; data: QueueItemCompletedEvent.Data; /** * The event type. */ type: 'queue_item.resolved'; } namespace QueueItemCompletedEvent { interface Data { object: Data.Object; } namespace Data { interface Object { item: Object.Item; author?: Object.Author; queue?: Object.Queue; } namespace Object { interface Item { /** * Content ID from your system */ id: string; /** * External author ID (the customer's identifier, not Moderation API's internal id) */ author_id: string | null; /** * The channel the content was submitted to, identified by your customer-defined * channel key. */ channel_key: string | null; /** * A recommendation from your own client-side flagging. */ client_action: Item.ClientAction | null; /** * The original content payload */ content: Item.Text | Item.Image | Item.Video | Item.Audio | Item.Object; /** * Conversation grouping ID, if any */ conversation_id: string | null; /** * Whether the content was flagged by moderation */ flagged: boolean | null; /** * For object content, the field keys (e.g. "bio") that triggered a flag. Empty * when no fields were flagged or the content is not an object. */ flagged_fields: Array; /** * Moderation labels applied to the content */ labels: Array | null; /** * Detected ISO language code, if available */ language: string | null; /** * High-level content type (e.g. message, post, comment). Defaults to the channel's * configured content type but can be overridden per request via the moderation API * `type` field. */ meta_type: 'profile' | 'message' | 'post' | 'comment' | 'event' | 'product' | 'review' | 'voice' | 'other' | null; /** * Arbitrary key/value metadata. Top-level keys are strings. */ metadata: { [key: string]: unknown; } | null; /** * ISO 8601 timestamp of when the content was submitted */ timestamp: string; } namespace Item { /** * A recommendation from your own client-side flagging. */ interface ClientAction { /** * Your recommendation for the content: allow, review, or reject. */ action: 'review' | 'allow' | 'reject'; /** * How your recommendation combines with ours. Defaults to 'escalate', which only * applies it when stricter than ours; 'override' replaces ours outright. */ behavior?: 'override' | 'escalate'; /** * A human-readable explanation for your recommendation. */ reason?: string; /** * Where your recommendation came from, e.g. "banned-ip". */ source?: string; } /** * Text */ interface Text { /** * The content text */ text: string; type: 'text'; } /** * Image */ interface Image { type: 'image'; /** * Base64-encoded image data. Either url or data must be provided. Note: base64 * images are not stored and will not appear in the review queue. */ data?: string; /** * A public URL of the image content. Either url or data must be provided. */ url?: string; } /** * Video */ interface Video { type: 'video'; /** * A public URL of the video content */ url: string; } /** * Audio */ interface Audio { type: 'audio'; /** * The URL of the audio content */ url: string; } /** * Object */ interface Object { /** * Values in the object. Can be mixed content types. */ data: { [key: string]: Object.Text | Object.Image | Object.Video | Object.Audio; }; type: 'object'; } namespace Object { /** * Text */ interface Text { /** * The content text */ text: string; type: 'text'; } /** * Image */ interface Image { type: 'image'; /** * Base64-encoded image data. Either url or data must be provided. Note: base64 * images are not stored and will not appear in the review queue. */ data?: string; /** * A public URL of the image content. Either url or data must be provided. */ url?: string; } /** * Video */ interface Video { type: 'video'; /** * A public URL of the video content */ url: string; } /** * Audio */ interface Audio { type: 'audio'; /** * The URL of the audio content */ url: string; } } interface Label { /** * The label name */ label: string; /** * Confidence score between 0 and 1 */ score: number; /** * Whether this label crossed its flagging threshold */ flagged?: boolean; /** * True if the label was applied manually by a moderator */ manual?: boolean; matches?: Array; /** * Whether this label crossed its threshold under a shadowed policy — reported for * visibility, never counted toward a flagging decision */ shadow_flagged?: boolean; } namespace Label { interface Match { /** * The matched substring */ match: string; /** * Match confidence between 0 and 1 */ probability: number; /** * [start, end] character offsets in the source text */ span: Array; entity_type?: string; mask?: string | null; reasons?: Array; scripts?: Array; signals?: Match.Signals; skeleton?: string; } namespace Match { interface Signals { bot_protection: boolean | null; brand_impersonation: Signals.BrandImpersonation | null; domain_age_days: number | null; final_url: string | null; has_email_setup: boolean | null; has_suspicious_characters: boolean; is_link_shortener: boolean; is_reported: boolean; redirect_count: number | null; } namespace Signals { interface BrandImpersonation { brand: string; method: string; } } } } } interface Author { /** * Author ID in Moderation API */ id: string; /** * Block or suspension details, if applicable. Null if the author is enabled. */ block: Author.Block | null; /** * Timestamp when author first appeared */ first_seen: number; /** * Timestamp of last activity */ last_seen: number; /** * Additional metadata provided by your system. We recommend including any relevant * information that may assist in the moderation process. */ metadata: Author.Metadata; metrics: Author.Metrics; /** * Risk assessment details, if available. */ risk_evaluation: Author.RiskEvaluation | null; /** * Current author status */ status: 'enabled' | 'suspended' | 'blocked'; trust_level: Author.TrustLevel; /** * The author's company or organization */ company?: string | null; /** * Author email address */ email?: string | null; /** * The author's ID from your system */ external_id?: string | null; /** * URL of the author's external profile */ external_link?: string | null; /** * Timestamp of last incident */ last_incident?: number | null; /** * Author name or identifier */ name?: string | null; /** * URL of the author's profile picture */ profile_picture?: string | null; } namespace Author { /** * Block or suspension details, if applicable. Null if the author is enabled. */ interface Block { /** * The moderators reason why the author was blocked or suspended. */ reason?: string | null; /** * The timestamp until which they are blocked if the author is suspended. */ until?: number | null; } /** * Additional metadata provided by your system. We recommend including any relevant * information that may assist in the moderation process. */ interface Metadata { /** * Whether the author's email is verified */ email_verified?: boolean | null; /** * Whether the author's identity is verified */ identity_verified?: boolean | null; /** * Whether the author is a paying customer */ is_paying_customer?: boolean | null; /** * Whether the author's phone number is verified */ phone_verified?: boolean | null; [k: string]: unknown; } interface Metrics { /** * Number of flagged content pieces */ flagged_content: number; /** * Total pieces of content */ total_content: number; /** * Average sentiment score of content (-1 to 1). Requires a sentiment model in your * project. */ average_sentiment?: number | null; } /** * Risk assessment details, if available. */ interface RiskEvaluation { /** * Calculated risk level based on more than 10 behavioral signals. */ risk_level?: number | null; } interface TrustLevel { /** * Author trust level (-1, 0, 1, 2, 3, or 4) */ level: number; /** * True if the trust level was set manually by a moderator */ manual: boolean; } } interface Queue { id: string; } } } } interface QueueItemActionEvent { /** * Stable event ID. Use this to dedupe retries. */ id: string; api_version: 'v2'; /** * ISO 8601 timestamp of when the event was emitted. */ created: string; data: QueueItemActionEvent.Data; /** * The event type. */ type: 'queue_item.action'; } namespace QueueItemActionEvent { interface Data { object: Data.Object; } namespace Data { interface Object { /** * Moderation action ID */ id: string; /** * ISO 8601 timestamp of when the action was performed */ created_at: string; /** * Customer-defined key identifying this action */ key: string | null; /** * Display name of the action */ name: string | null; /** * The value passed to the action when it ran */ value: string | null; /** * The author the action was performed on, if any */ author?: Object.Author; /** * The content item the action was performed on, if any */ item?: Object.Item; /** * The queue the item belongs to, if any */ queue?: Object.Queue; } namespace Object { /** * The author the action was performed on, if any */ interface Author { /** * Author ID in Moderation API */ id: string; /** * Block or suspension details, if applicable. Null if the author is enabled. */ block: Author.Block | null; /** * Timestamp when author first appeared */ first_seen: number; /** * Timestamp of last activity */ last_seen: number; /** * Additional metadata provided by your system. We recommend including any relevant * information that may assist in the moderation process. */ metadata: Author.Metadata; metrics: Author.Metrics; /** * Risk assessment details, if available. */ risk_evaluation: Author.RiskEvaluation | null; /** * Current author status */ status: 'enabled' | 'suspended' | 'blocked'; trust_level: Author.TrustLevel; /** * The author's company or organization */ company?: string | null; /** * Author email address */ email?: string | null; /** * The author's ID from your system */ external_id?: string | null; /** * URL of the author's external profile */ external_link?: string | null; /** * Timestamp of last incident */ last_incident?: number | null; /** * Author name or identifier */ name?: string | null; /** * URL of the author's profile picture */ profile_picture?: string | null; } namespace Author { /** * Block or suspension details, if applicable. Null if the author is enabled. */ interface Block { /** * The moderators reason why the author was blocked or suspended. */ reason?: string | null; /** * The timestamp until which they are blocked if the author is suspended. */ until?: number | null; } /** * Additional metadata provided by your system. We recommend including any relevant * information that may assist in the moderation process. */ interface Metadata { /** * Whether the author's email is verified */ email_verified?: boolean | null; /** * Whether the author's identity is verified */ identity_verified?: boolean | null; /** * Whether the author is a paying customer */ is_paying_customer?: boolean | null; /** * Whether the author's phone number is verified */ phone_verified?: boolean | null; [k: string]: unknown; } interface Metrics { /** * Number of flagged content pieces */ flagged_content: number; /** * Total pieces of content */ total_content: number; /** * Average sentiment score of content (-1 to 1). Requires a sentiment model in your * project. */ average_sentiment?: number | null; } /** * Risk assessment details, if available. */ interface RiskEvaluation { /** * Calculated risk level based on more than 10 behavioral signals. */ risk_level?: number | null; } interface TrustLevel { /** * Author trust level (-1, 0, 1, 2, 3, or 4) */ level: number; /** * True if the trust level was set manually by a moderator */ manual: boolean; } } /** * The content item the action was performed on, if any */ interface Item { /** * Content ID from your system */ id: string; /** * External author ID (the customer's identifier, not Moderation API's internal id) */ author_id: string | null; /** * The channel the content was submitted to, identified by your customer-defined * channel key. */ channel_key: string | null; /** * A recommendation from your own client-side flagging. */ client_action: Item.ClientAction | null; /** * The original content payload */ content: Item.Text | Item.Image | Item.Video | Item.Audio | Item.Object; /** * Conversation grouping ID, if any */ conversation_id: string | null; /** * Whether the content was flagged by moderation */ flagged: boolean | null; /** * For object content, the field keys (e.g. "bio") that triggered a flag. Empty * when no fields were flagged or the content is not an object. */ flagged_fields: Array; /** * Moderation labels applied to the content */ labels: Array | null; /** * Detected ISO language code, if available */ language: string | null; /** * High-level content type (e.g. message, post, comment). Defaults to the channel's * configured content type but can be overridden per request via the moderation API * `type` field. */ meta_type: 'profile' | 'message' | 'post' | 'comment' | 'event' | 'product' | 'review' | 'voice' | 'other' | null; /** * Arbitrary key/value metadata. Top-level keys are strings. */ metadata: { [key: string]: unknown; } | null; /** * ISO 8601 timestamp of when the content was submitted */ timestamp: string; } namespace Item { /** * A recommendation from your own client-side flagging. */ interface ClientAction { /** * Your recommendation for the content: allow, review, or reject. */ action: 'review' | 'allow' | 'reject'; /** * How your recommendation combines with ours. Defaults to 'escalate', which only * applies it when stricter than ours; 'override' replaces ours outright. */ behavior?: 'override' | 'escalate'; /** * A human-readable explanation for your recommendation. */ reason?: string; /** * Where your recommendation came from, e.g. "banned-ip". */ source?: string; } /** * Text */ interface Text { /** * The content text */ text: string; type: 'text'; } /** * Image */ interface Image { type: 'image'; /** * Base64-encoded image data. Either url or data must be provided. Note: base64 * images are not stored and will not appear in the review queue. */ data?: string; /** * A public URL of the image content. Either url or data must be provided. */ url?: string; } /** * Video */ interface Video { type: 'video'; /** * A public URL of the video content */ url: string; } /** * Audio */ interface Audio { type: 'audio'; /** * The URL of the audio content */ url: string; } /** * Object */ interface Object { /** * Values in the object. Can be mixed content types. */ data: { [key: string]: Object.Text | Object.Image | Object.Video | Object.Audio; }; type: 'object'; } namespace Object { /** * Text */ interface Text { /** * The content text */ text: string; type: 'text'; } /** * Image */ interface Image { type: 'image'; /** * Base64-encoded image data. Either url or data must be provided. Note: base64 * images are not stored and will not appear in the review queue. */ data?: string; /** * A public URL of the image content. Either url or data must be provided. */ url?: string; } /** * Video */ interface Video { type: 'video'; /** * A public URL of the video content */ url: string; } /** * Audio */ interface Audio { type: 'audio'; /** * The URL of the audio content */ url: string; } } interface Label { /** * The label name */ label: string; /** * Confidence score between 0 and 1 */ score: number; /** * Whether this label crossed its flagging threshold */ flagged?: boolean; /** * True if the label was applied manually by a moderator */ manual?: boolean; matches?: Array; /** * Whether this label crossed its threshold under a shadowed policy — reported for * visibility, never counted toward a flagging decision */ shadow_flagged?: boolean; } namespace Label { interface Match { /** * The matched substring */ match: string; /** * Match confidence between 0 and 1 */ probability: number; /** * [start, end] character offsets in the source text */ span: Array; entity_type?: string; mask?: string | null; reasons?: Array; scripts?: Array; signals?: Match.Signals; skeleton?: string; } namespace Match { interface Signals { bot_protection: boolean | null; brand_impersonation: Signals.BrandImpersonation | null; domain_age_days: number | null; final_url: string | null; has_email_setup: boolean | null; has_suspicious_characters: boolean; is_link_shortener: boolean; is_reported: boolean; redirect_count: number | null; } namespace Signals { interface BrandImpersonation { brand: string; method: string; } } } } } /** * The queue the item belongs to, if any */ interface Queue { id: string; } } } } interface QueueItemRejectedEvent { /** * Stable event ID. Use this to dedupe retries. */ id: string; api_version: 'v2'; /** * ISO 8601 timestamp of when the event was emitted. */ created: string; data: QueueItemRejectedEvent.Data; /** * The event type. */ type: 'queue_item.rejected'; } namespace QueueItemRejectedEvent { interface Data { object: Data.Object; } namespace Data { interface Object { /** * Moderation action ID */ id: string; /** * ISO 8601 timestamp of when the action was performed */ created_at: string; /** * Customer-defined key identifying this action */ key: string | null; /** * Display name of the action */ name: string | null; /** * The value passed to the action when it ran */ value: string | null; /** * The author the action was performed on, if any */ author?: Object.Author; /** * The content item the action was performed on, if any */ item?: Object.Item; /** * The queue the item belongs to, if any */ queue?: Object.Queue; } namespace Object { /** * The author the action was performed on, if any */ interface Author { /** * Author ID in Moderation API */ id: string; /** * Block or suspension details, if applicable. Null if the author is enabled. */ block: Author.Block | null; /** * Timestamp when author first appeared */ first_seen: number; /** * Timestamp of last activity */ last_seen: number; /** * Additional metadata provided by your system. We recommend including any relevant * information that may assist in the moderation process. */ metadata: Author.Metadata; metrics: Author.Metrics; /** * Risk assessment details, if available. */ risk_evaluation: Author.RiskEvaluation | null; /** * Current author status */ status: 'enabled' | 'suspended' | 'blocked'; trust_level: Author.TrustLevel; /** * The author's company or organization */ company?: string | null; /** * Author email address */ email?: string | null; /** * The author's ID from your system */ external_id?: string | null; /** * URL of the author's external profile */ external_link?: string | null; /** * Timestamp of last incident */ last_incident?: number | null; /** * Author name or identifier */ name?: string | null; /** * URL of the author's profile picture */ profile_picture?: string | null; } namespace Author { /** * Block or suspension details, if applicable. Null if the author is enabled. */ interface Block { /** * The moderators reason why the author was blocked or suspended. */ reason?: string | null; /** * The timestamp until which they are blocked if the author is suspended. */ until?: number | null; } /** * Additional metadata provided by your system. We recommend including any relevant * information that may assist in the moderation process. */ interface Metadata { /** * Whether the author's email is verified */ email_verified?: boolean | null; /** * Whether the author's identity is verified */ identity_verified?: boolean | null; /** * Whether the author is a paying customer */ is_paying_customer?: boolean | null; /** * Whether the author's phone number is verified */ phone_verified?: boolean | null; [k: string]: unknown; } interface Metrics { /** * Number of flagged content pieces */ flagged_content: number; /** * Total pieces of content */ total_content: number; /** * Average sentiment score of content (-1 to 1). Requires a sentiment model in your * project. */ average_sentiment?: number | null; } /** * Risk assessment details, if available. */ interface RiskEvaluation { /** * Calculated risk level based on more than 10 behavioral signals. */ risk_level?: number | null; } interface TrustLevel { /** * Author trust level (-1, 0, 1, 2, 3, or 4) */ level: number; /** * True if the trust level was set manually by a moderator */ manual: boolean; } } /** * The content item the action was performed on, if any */ interface Item { /** * Content ID from your system */ id: string; /** * External author ID (the customer's identifier, not Moderation API's internal id) */ author_id: string | null; /** * The channel the content was submitted to, identified by your customer-defined * channel key. */ channel_key: string | null; /** * A recommendation from your own client-side flagging. */ client_action: Item.ClientAction | null; /** * The original content payload */ content: Item.Text | Item.Image | Item.Video | Item.Audio | Item.Object; /** * Conversation grouping ID, if any */ conversation_id: string | null; /** * Whether the content was flagged by moderation */ flagged: boolean | null; /** * For object content, the field keys (e.g. "bio") that triggered a flag. Empty * when no fields were flagged or the content is not an object. */ flagged_fields: Array; /** * Moderation labels applied to the content */ labels: Array | null; /** * Detected ISO language code, if available */ language: string | null; /** * High-level content type (e.g. message, post, comment). Defaults to the channel's * configured content type but can be overridden per request via the moderation API * `type` field. */ meta_type: 'profile' | 'message' | 'post' | 'comment' | 'event' | 'product' | 'review' | 'voice' | 'other' | null; /** * Arbitrary key/value metadata. Top-level keys are strings. */ metadata: { [key: string]: unknown; } | null; /** * ISO 8601 timestamp of when the content was submitted */ timestamp: string; } namespace Item { /** * A recommendation from your own client-side flagging. */ interface ClientAction { /** * Your recommendation for the content: allow, review, or reject. */ action: 'review' | 'allow' | 'reject'; /** * How your recommendation combines with ours. Defaults to 'escalate', which only * applies it when stricter than ours; 'override' replaces ours outright. */ behavior?: 'override' | 'escalate'; /** * A human-readable explanation for your recommendation. */ reason?: string; /** * Where your recommendation came from, e.g. "banned-ip". */ source?: string; } /** * Text */ interface Text { /** * The content text */ text: string; type: 'text'; } /** * Image */ interface Image { type: 'image'; /** * Base64-encoded image data. Either url or data must be provided. Note: base64 * images are not stored and will not appear in the review queue. */ data?: string; /** * A public URL of the image content. Either url or data must be provided. */ url?: string; } /** * Video */ interface Video { type: 'video'; /** * A public URL of the video content */ url: string; } /** * Audio */ interface Audio { type: 'audio'; /** * The URL of the audio content */ url: string; } /** * Object */ interface Object { /** * Values in the object. Can be mixed content types. */ data: { [key: string]: Object.Text | Object.Image | Object.Video | Object.Audio; }; type: 'object'; } namespace Object { /** * Text */ interface Text { /** * The content text */ text: string; type: 'text'; } /** * Image */ interface Image { type: 'image'; /** * Base64-encoded image data. Either url or data must be provided. Note: base64 * images are not stored and will not appear in the review queue. */ data?: string; /** * A public URL of the image content. Either url or data must be provided. */ url?: string; } /** * Video */ interface Video { type: 'video'; /** * A public URL of the video content */ url: string; } /** * Audio */ interface Audio { type: 'audio'; /** * The URL of the audio content */ url: string; } } interface Label { /** * The label name */ label: string; /** * Confidence score between 0 and 1 */ score: number; /** * Whether this label crossed its flagging threshold */ flagged?: boolean; /** * True if the label was applied manually by a moderator */ manual?: boolean; matches?: Array; /** * Whether this label crossed its threshold under a shadowed policy — reported for * visibility, never counted toward a flagging decision */ shadow_flagged?: boolean; } namespace Label { interface Match { /** * The matched substring */ match: string; /** * Match confidence between 0 and 1 */ probability: number; /** * [start, end] character offsets in the source text */ span: Array; entity_type?: string; mask?: string | null; reasons?: Array; scripts?: Array; signals?: Match.Signals; skeleton?: string; } namespace Match { interface Signals { bot_protection: boolean | null; brand_impersonation: Signals.BrandImpersonation | null; domain_age_days: number | null; final_url: string | null; has_email_setup: boolean | null; has_suspicious_characters: boolean; is_link_shortener: boolean; is_reported: boolean; redirect_count: number | null; } namespace Signals { interface BrandImpersonation { brand: string; method: string; } } } } } /** * The queue the item belongs to, if any */ interface Queue { id: string; } } } } interface QueueItemAllowedEvent { /** * Stable event ID. Use this to dedupe retries. */ id: string; api_version: 'v2'; /** * ISO 8601 timestamp of when the event was emitted. */ created: string; data: QueueItemAllowedEvent.Data; /** * The event type. */ type: 'queue_item.allowed'; } namespace QueueItemAllowedEvent { interface Data { object: Data.Object; } namespace Data { interface Object { /** * Moderation action ID */ id: string; /** * ISO 8601 timestamp of when the action was performed */ created_at: string; /** * Customer-defined key identifying this action */ key: string | null; /** * Display name of the action */ name: string | null; /** * The value passed to the action when it ran */ value: string | null; /** * The author the action was performed on, if any */ author?: Object.Author; /** * The content item the action was performed on, if any */ item?: Object.Item; /** * The queue the item belongs to, if any */ queue?: Object.Queue; } namespace Object { /** * The author the action was performed on, if any */ interface Author { /** * Author ID in Moderation API */ id: string; /** * Block or suspension details, if applicable. Null if the author is enabled. */ block: Author.Block | null; /** * Timestamp when author first appeared */ first_seen: number; /** * Timestamp of last activity */ last_seen: number; /** * Additional metadata provided by your system. We recommend including any relevant * information that may assist in the moderation process. */ metadata: Author.Metadata; metrics: Author.Metrics; /** * Risk assessment details, if available. */ risk_evaluation: Author.RiskEvaluation | null; /** * Current author status */ status: 'enabled' | 'suspended' | 'blocked'; trust_level: Author.TrustLevel; /** * The author's company or organization */ company?: string | null; /** * Author email address */ email?: string | null; /** * The author's ID from your system */ external_id?: string | null; /** * URL of the author's external profile */ external_link?: string | null; /** * Timestamp of last incident */ last_incident?: number | null; /** * Author name or identifier */ name?: string | null; /** * URL of the author's profile picture */ profile_picture?: string | null; } namespace Author { /** * Block or suspension details, if applicable. Null if the author is enabled. */ interface Block { /** * The moderators reason why the author was blocked or suspended. */ reason?: string | null; /** * The timestamp until which they are blocked if the author is suspended. */ until?: number | null; } /** * Additional metadata provided by your system. We recommend including any relevant * information that may assist in the moderation process. */ interface Metadata { /** * Whether the author's email is verified */ email_verified?: boolean | null; /** * Whether the author's identity is verified */ identity_verified?: boolean | null; /** * Whether the author is a paying customer */ is_paying_customer?: boolean | null; /** * Whether the author's phone number is verified */ phone_verified?: boolean | null; [k: string]: unknown; } interface Metrics { /** * Number of flagged content pieces */ flagged_content: number; /** * Total pieces of content */ total_content: number; /** * Average sentiment score of content (-1 to 1). Requires a sentiment model in your * project. */ average_sentiment?: number | null; } /** * Risk assessment details, if available. */ interface RiskEvaluation { /** * Calculated risk level based on more than 10 behavioral signals. */ risk_level?: number | null; } interface TrustLevel { /** * Author trust level (-1, 0, 1, 2, 3, or 4) */ level: number; /** * True if the trust level was set manually by a moderator */ manual: boolean; } } /** * The content item the action was performed on, if any */ interface Item { /** * Content ID from your system */ id: string; /** * External author ID (the customer's identifier, not Moderation API's internal id) */ author_id: string | null; /** * The channel the content was submitted to, identified by your customer-defined * channel key. */ channel_key: string | null; /** * A recommendation from your own client-side flagging. */ client_action: Item.ClientAction | null; /** * The original content payload */ content: Item.Text | Item.Image | Item.Video | Item.Audio | Item.Object; /** * Conversation grouping ID, if any */ conversation_id: string | null; /** * Whether the content was flagged by moderation */ flagged: boolean | null; /** * For object content, the field keys (e.g. "bio") that triggered a flag. Empty * when no fields were flagged or the content is not an object. */ flagged_fields: Array; /** * Moderation labels applied to the content */ labels: Array | null; /** * Detected ISO language code, if available */ language: string | null; /** * High-level content type (e.g. message, post, comment). Defaults to the channel's * configured content type but can be overridden per request via the moderation API * `type` field. */ meta_type: 'profile' | 'message' | 'post' | 'comment' | 'event' | 'product' | 'review' | 'voice' | 'other' | null; /** * Arbitrary key/value metadata. Top-level keys are strings. */ metadata: { [key: string]: unknown; } | null; /** * ISO 8601 timestamp of when the content was submitted */ timestamp: string; } namespace Item { /** * A recommendation from your own client-side flagging. */ interface ClientAction { /** * Your recommendation for the content: allow, review, or reject. */ action: 'review' | 'allow' | 'reject'; /** * How your recommendation combines with ours. Defaults to 'escalate', which only * applies it when stricter than ours; 'override' replaces ours outright. */ behavior?: 'override' | 'escalate'; /** * A human-readable explanation for your recommendation. */ reason?: string; /** * Where your recommendation came from, e.g. "banned-ip". */ source?: string; } /** * Text */ interface Text { /** * The content text */ text: string; type: 'text'; } /** * Image */ interface Image { type: 'image'; /** * Base64-encoded image data. Either url or data must be provided. Note: base64 * images are not stored and will not appear in the review queue. */ data?: string; /** * A public URL of the image content. Either url or data must be provided. */ url?: string; } /** * Video */ interface Video { type: 'video'; /** * A public URL of the video content */ url: string; } /** * Audio */ interface Audio { type: 'audio'; /** * The URL of the audio content */ url: string; } /** * Object */ interface Object { /** * Values in the object. Can be mixed content types. */ data: { [key: string]: Object.Text | Object.Image | Object.Video | Object.Audio; }; type: 'object'; } namespace Object { /** * Text */ interface Text { /** * The content text */ text: string; type: 'text'; } /** * Image */ interface Image { type: 'image'; /** * Base64-encoded image data. Either url or data must be provided. Note: base64 * images are not stored and will not appear in the review queue. */ data?: string; /** * A public URL of the image content. Either url or data must be provided. */ url?: string; } /** * Video */ interface Video { type: 'video'; /** * A public URL of the video content */ url: string; } /** * Audio */ interface Audio { type: 'audio'; /** * The URL of the audio content */ url: string; } } interface Label { /** * The label name */ label: string; /** * Confidence score between 0 and 1 */ score: number; /** * Whether this label crossed its flagging threshold */ flagged?: boolean; /** * True if the label was applied manually by a moderator */ manual?: boolean; matches?: Array; /** * Whether this label crossed its threshold under a shadowed policy — reported for * visibility, never counted toward a flagging decision */ shadow_flagged?: boolean; } namespace Label { interface Match { /** * The matched substring */ match: string; /** * Match confidence between 0 and 1 */ probability: number; /** * [start, end] character offsets in the source text */ span: Array; entity_type?: string; mask?: string | null; reasons?: Array; scripts?: Array; signals?: Match.Signals; skeleton?: string; } namespace Match { interface Signals { bot_protection: boolean | null; brand_impersonation: Signals.BrandImpersonation | null; domain_age_days: number | null; final_url: string | null; has_email_setup: boolean | null; has_suspicious_characters: boolean; is_link_shortener: boolean; is_reported: boolean; redirect_count: number | null; } namespace Signals { interface BrandImpersonation { brand: string; method: string; } } } } } /** * The queue the item belongs to, if any */ interface Queue { id: string; } } } } } export interface QueueRetrieveResponse { queue: QueueRetrieveResponse.Queue; } export declare namespace QueueRetrieveResponse { interface Queue { id: string; description: string; filter: Queue.Filter; name: string; resolvedItemsCount: number; totalItemsCount: number; unresolvedItemsCount: number; } namespace Queue { interface Filter { afterDate?: string; authorID?: string; authorTrustLevels?: Array; beforeDate?: string; casebookAgreement?: 'ALL' | 'OVERRULED' | 'AGREED'; casebookAnswer?: 'ALL' | 'ALLOWED' | 'REJECTED' | 'NO_ANSWER'; checkStatus?: 'all' | 'checked' | 'unchecked' | null; clearDateWindow?: boolean; contentID?: string; contentTypes?: Array<'profile' | 'message' | 'post' | 'comment' | 'event' | 'product' | 'review' | 'voice' | 'other'>; conversationIds?: Array; filteredActionIds?: Array; filteredChannelIds?: Array; filterLabels?: Array; isFlagged?: 'ALL' | 'FLAGGED' | 'NOT_FLAGGED' | 'SHADOW_FLAGGED'; labels?: Array; languages?: Array; maxSeverity?: number; mediaTypes?: Array<'text' | 'image' | 'video' | 'object' | 'audio'>; metadataFilters?: Array; minSeverity?: number; recommendationActions?: Array<'review' | 'allow' | 'reject'>; search?: Array; within?: number; withinUnit?: 'MINUTES' | 'HOURS' | 'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'; } namespace Filter { interface FilterLabel { label: string; type: 'FLAGGED' | 'NOT_FLAGGED' | 'THRESHOLDS' | 'MATCHED'; maxThreshold?: number | null; minThreshold?: number | null; } interface MetadataFilter { key: string; value: string; } } } } export interface QueueGetStatsResponse { actionStats: Array; reviewStats: QueueGetStatsResponse.ReviewStats; /** * List of top reviewers and their statistics */ topReviewers: Array; trends: QueueGetStatsResponse.Trends; } export declare namespace QueueGetStatsResponse { interface ActionStat { /** * ID of the moderation action */ actionId: string; /** * Name of the moderation action */ actionName: string; /** * Number of times this action was taken */ count: number; /** * Percentage this action represents of all actions */ percentageOfTotal: number; } interface ReviewStats { /** * Average time in milliseconds to review an item */ averageTimeToReview: number; /** * Total number of items pending review */ totalPending: number; /** * Total number of items reviewed */ totalReviewed: number; } interface TopReviewer { /** * Average review time in milliseconds */ averageTimePerReview: number; /** * Name of the reviewer */ name: string; /** * Number of items reviewed */ reviewCount: number; /** * Most common actions taken by this reviewer */ topActions: Array; /** * ID of the reviewer */ userId: string; /** * Optional accuracy score based on review quality metrics */ accuracyScore?: number; } namespace TopReviewer { interface TopAction { /** * Most used action by this reviewer */ actionId: string; /** * Name of the most used action */ actionName: string; /** * Number of times this action was used */ count: number; } } interface Trends { dailyReviewCounts: Array; flaggedContentTrends: Array; } namespace Trends { interface DailyReviewCount { /** * Number of reviews on this date */ count: number; /** * Date in YYYY-MM-DD format */ date: string; } interface FlaggedContentTrend { /** * Content flag/label */ label: string; /** * Trend indicator (-1 to 1) showing if this type of flagged content is increasing * or decreasing */ trend: number; } } } export interface QueueGetStatsParams { /** * Number of days to analyze statistics for */ withinDays?: string; } export declare namespace Queue { export { type WebhookEvent as WebhookEvent, type QueueRetrieveResponse as QueueRetrieveResponse, type QueueGetStatsResponse as QueueGetStatsResponse, type QueueGetStatsParams as QueueGetStatsParams, }; export { Items as Items, type ItemListResponse as ItemListResponse, type ItemResolveResponse as ItemResolveResponse, type ItemUnresolveResponse as ItemUnresolveResponse, type ItemListParams as ItemListParams, type ItemResolveParams as ItemResolveParams, type ItemUnresolveParams as ItemUnresolveParams, }; } //# sourceMappingURL=queue.d.ts.map