<commit_before># Action Service Interface

Exception ActionException(message: string);


/**
 * Executes multiple actions in the conext of the user given by the user_id.
 * All actions are successful if no exception is thrown, else no action was
 * processed.
 *
 *
 * @throws ActionException
 */
handle_request (payload: Action[], user_id: number): void

interface Action {
    action: string;
    data: object[];
}<commit_msg>Review.<commit_after># Action Service Interface

Exception ActionException(message: string);


/**
 * Executes multiple actions in the conext of the user given by the user_id.
 * All actions are processed independently.
 *
 * TODO: Check if we need an interface or flag to process actions all together.
 *
 *
 * @throws ActionException
 */
handle_request (payload: Action[], user_id: number): ActionResult[]

interface Action {
    action: string;
    data: object[]; # An array of action specific data. See JSON schema defintions.
}

interface ActionResult {
    success: boolean;
    message: string;
}
{'fraction_non_alphanumeric': 0.08914728682170543, 'fraction_numerical': 0.0, 'mean_word_length': 4.165, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '650221', 'n_tokens_mistral': 274, 'n_tokens_neox': 272, 'n_words': 117}