import { APIResource } from "../../core/resource.mjs"; import * as ExecuteAPI from "./execute.mjs"; import { Execute, ExecuteExecuteByIDParams, ExecuteExecuteByIDResponse, ExecuteExecuteParams, ExecuteExecuteResponse } from "./execute.mjs"; import { APIPromise } from "../../core/api-promise.mjs"; import { RequestOptions } from "../../internal/request-options.mjs"; export declare class Actions extends APIResource { execute: ExecuteAPI.Execute; /** * Create an action. */ create(body: ActionCreateParams, options?: RequestOptions): APIPromise; /** * Get an action by ID. */ retrieve(id: string, options?: RequestOptions): APIPromise; /** * Update an action. */ update(id: string, body: ActionUpdateParams, options?: RequestOptions): APIPromise; /** * List all available moderation actions for the authenticated organization. */ list(query?: ActionListParams | null | undefined, options?: RequestOptions): APIPromise; /** * Delete an action and all of its webhooks. */ delete(id: string, options?: RequestOptions): APIPromise; } export interface ActionCreateResponse { /** * The ID of the action. */ id: string; /** * Whether the action is a built-in action or a custom one. */ builtIn: boolean | null; /** * The date the action was created. */ createdAt: string; /** * The IDs of the queues the action is available in. */ filterInQueueIds: Array; /** * Whether the action allows any text to be entered as a value or if it must be one * of the possible values. */ freeText: boolean; /** * The name of the action. */ name: string; /** * Show the action in all queues, selected queues or no queues (to use via API * only). */ position: 'ALL_QUEUES' | 'SOME_QUEUES' | 'HIDDEN'; /** * The possible values of the action. The user will be prompted to select one of * these values when executing the action. */ possibleValues: Array; /** * Whether the action resolves and removes the item, unresolves and re-add it to * the queue, or does not change the resolve status. */ queueBehaviour: 'REMOVE' | 'ADD' | 'NO_CHANGE'; /** * Whether the action requires a value to be executed. */ valueRequired: boolean; /** * The description of the action. */ description?: string | null; /** * User defined key of the action. */ key?: string | null; /** * The type of the action. */ type?: 'AUTHOR_BLOCK' | 'AUTHOR_BLOCK_TEMP' | 'AUTHOR_UNBLOCK' | 'AUTHOR_DELETE' | 'AUTHOR_REPORT' | 'AUTHOR_WARN' | 'AUTHOR_CUSTOM' | 'ITEM_REJECT' | 'ITEM_ALLOW' | 'ITEM_CUSTOM' | null; } export declare namespace ActionCreateResponse { interface PossibleValue { /** * The value of the action. */ value: string; } } export interface ActionRetrieveResponse { /** * The ID of the action. */ id: string; /** * Whether the action is a built-in action or a custom one. */ builtIn: boolean | null; /** * The date the action was created. */ createdAt: string; /** * The IDs of the queues the action is available in. */ filterInQueueIds: Array; /** * Whether the action allows any text to be entered as a value or if it must be one * of the possible values. */ freeText: boolean; /** * The name of the action. */ name: string; /** * Show the action in all queues, selected queues or no queues (to use via API * only). */ position: 'ALL_QUEUES' | 'SOME_QUEUES' | 'HIDDEN'; /** * The possible values of the action. The user will be prompted to select one of * these values when executing the action. */ possibleValues: Array; /** * Whether the action resolves and removes the item, unresolves and re-add it to * the queue, or does not change the resolve status. */ queueBehaviour: 'REMOVE' | 'ADD' | 'NO_CHANGE'; /** * Whether the action requires a value to be executed. */ valueRequired: boolean; /** * The description of the action. */ description?: string | null; /** * User defined key of the action. */ key?: string | null; /** * The type of the action. */ type?: 'AUTHOR_BLOCK' | 'AUTHOR_BLOCK_TEMP' | 'AUTHOR_UNBLOCK' | 'AUTHOR_DELETE' | 'AUTHOR_REPORT' | 'AUTHOR_WARN' | 'AUTHOR_CUSTOM' | 'ITEM_REJECT' | 'ITEM_ALLOW' | 'ITEM_CUSTOM' | null; } export declare namespace ActionRetrieveResponse { interface PossibleValue { /** * The value of the action. */ value: string; } } export interface ActionUpdateResponse { /** * The ID of the action. */ id: string; /** * Whether the action is a built-in action or a custom one. */ builtIn: boolean | null; /** * The date the action was created. */ createdAt: string; /** * The IDs of the queues the action is available in. */ filterInQueueIds: Array; /** * Whether the action allows any text to be entered as a value or if it must be one * of the possible values. */ freeText: boolean; /** * The name of the action. */ name: string; /** * Show the action in all queues, selected queues or no queues (to use via API * only). */ position: 'ALL_QUEUES' | 'SOME_QUEUES' | 'HIDDEN'; /** * The possible values of the action. The user will be prompted to select one of * these values when executing the action. */ possibleValues: Array; /** * Whether the action resolves and removes the item, unresolves and re-add it to * the queue, or does not change the resolve status. */ queueBehaviour: 'REMOVE' | 'ADD' | 'NO_CHANGE'; /** * Whether the action requires a value to be executed. */ valueRequired: boolean; /** * The description of the action. */ description?: string | null; /** * User defined key of the action. */ key?: string | null; /** * The type of the action. */ type?: 'AUTHOR_BLOCK' | 'AUTHOR_BLOCK_TEMP' | 'AUTHOR_UNBLOCK' | 'AUTHOR_DELETE' | 'AUTHOR_REPORT' | 'AUTHOR_WARN' | 'AUTHOR_CUSTOM' | 'ITEM_REJECT' | 'ITEM_ALLOW' | 'ITEM_CUSTOM' | null; } export declare namespace ActionUpdateResponse { interface PossibleValue { /** * The value of the action. */ value: string; } } /** * List of moderation actions with their associated webhooks */ export type ActionListResponse = Array; export declare namespace ActionListResponse { interface ActionListResponseItem { /** * The ID of the action. */ id: string; /** * Whether the action is a built-in action or a custom one. */ builtIn: boolean | null; /** * The date the action was created. */ createdAt: string; /** * The IDs of the queues the action is available in. */ filterInQueueIds: Array; /** * Whether the action allows any text to be entered as a value or if it must be one * of the possible values. */ freeText: boolean; /** * The name of the action. */ name: string; /** * Show the action in all queues, selected queues or no queues (to use via API * only). */ position: 'ALL_QUEUES' | 'SOME_QUEUES' | 'HIDDEN'; /** * The possible values of the action. The user will be prompted to select one of * these values when executing the action. */ possibleValues: Array; /** * Whether the action resolves and removes the item, unresolves and re-add it to * the queue, or does not change the resolve status. */ queueBehaviour: 'REMOVE' | 'ADD' | 'NO_CHANGE'; /** * Whether the action requires a value to be executed. */ valueRequired: boolean; /** * The description of the action. */ description?: string | null; /** * User defined key of the action. */ key?: string | null; /** * The type of the action. */ type?: 'AUTHOR_BLOCK' | 'AUTHOR_BLOCK_TEMP' | 'AUTHOR_UNBLOCK' | 'AUTHOR_DELETE' | 'AUTHOR_REPORT' | 'AUTHOR_WARN' | 'AUTHOR_CUSTOM' | 'ITEM_REJECT' | 'ITEM_ALLOW' | 'ITEM_CUSTOM' | null; } namespace ActionListResponseItem { interface PossibleValue { /** * The value of the action. */ value: string; } } } export interface ActionDeleteResponse { /** * The ID of the action. */ id: string; /** * Whether the action was deleted. */ deleted: boolean; } export interface ActionCreateParams { /** * The name of the action. */ name: string; /** * Whether the action is a built-in action or a custom one. */ builtIn?: boolean | null; /** * The description of the action. */ description?: string | null; /** * The IDs of the queues the action is available in. */ filterInQueueIds?: Array; /** * Whether the action allows any text to be entered as a value or if it must be one * of the possible values. */ freeText?: boolean; /** * User defined key of the action. */ key?: string | null; /** * Show the action in all queues, selected queues or no queues (to use via API * only). */ position?: 'ALL_QUEUES' | 'SOME_QUEUES' | 'HIDDEN'; /** * The possible values of the action. The user will be prompted to select one of * these values when executing the action. */ possibleValues?: Array; /** * Whether the action resolves and removes the item, unresolves and re-add it to * the queue, or does not change the resolve status. */ queueBehaviour?: 'REMOVE' | 'ADD' | 'NO_CHANGE'; /** * The type of the action. */ type?: 'AUTHOR_BLOCK' | 'AUTHOR_BLOCK_TEMP' | 'AUTHOR_UNBLOCK' | 'AUTHOR_DELETE' | 'AUTHOR_REPORT' | 'AUTHOR_WARN' | 'AUTHOR_CUSTOM' | 'ITEM_REJECT' | 'ITEM_ALLOW' | 'ITEM_CUSTOM' | null; /** * Whether the action requires a value to be executed. */ valueRequired?: boolean; } export declare namespace ActionCreateParams { interface PossibleValue { /** * The value of the action. */ value: string; } } export interface ActionUpdateParams { /** * Whether the action is a built-in action or a custom one. */ builtIn?: boolean | null; /** * The description of the action. */ description?: string | null; /** * The IDs of the queues the action is available in. */ filterInQueueIds?: Array; /** * Whether the action allows any text to be entered as a value or if it must be one * of the possible values. */ freeText?: boolean; /** * User defined key of the action. */ key?: string | null; /** * The name of the action. */ name?: string; /** * Show the action in all queues, selected queues or no queues (to use via API * only). */ position?: 'ALL_QUEUES' | 'SOME_QUEUES' | 'HIDDEN'; /** * The possible values of the action. The user will be prompted to select one of * these values when executing the action. */ possibleValues?: Array; /** * Whether the action resolves and removes the item, unresolves and re-add it to * the queue, or does not change the resolve status. */ queueBehaviour?: 'REMOVE' | 'ADD' | 'NO_CHANGE'; /** * The type of the action. */ type?: 'AUTHOR_BLOCK' | 'AUTHOR_BLOCK_TEMP' | 'AUTHOR_UNBLOCK' | 'AUTHOR_DELETE' | 'AUTHOR_REPORT' | 'AUTHOR_WARN' | 'AUTHOR_CUSTOM' | 'ITEM_REJECT' | 'ITEM_ALLOW' | 'ITEM_CUSTOM' | null; /** * Whether the action requires a value to be executed. */ valueRequired?: boolean; } export declare namespace ActionUpdateParams { interface PossibleValue { /** * The value of the action. */ value: string; } } export interface ActionListParams { queueId?: string; } export declare namespace Actions { export { type ActionCreateResponse as ActionCreateResponse, type ActionRetrieveResponse as ActionRetrieveResponse, type ActionUpdateResponse as ActionUpdateResponse, type ActionListResponse as ActionListResponse, type ActionDeleteResponse as ActionDeleteResponse, type ActionCreateParams as ActionCreateParams, type ActionUpdateParams as ActionUpdateParams, type ActionListParams as ActionListParams, }; export { Execute as Execute, type ExecuteExecuteResponse as ExecuteExecuteResponse, type ExecuteExecuteByIDResponse as ExecuteExecuteByIDResponse, type ExecuteExecuteParams as ExecuteExecuteParams, type ExecuteExecuteByIDParams as ExecuteExecuteByIDParams, }; } //# sourceMappingURL=actions.d.mts.map