// (C) 2021-2026 GoodData Corporation
/**
 * Creates the CreateScheduledEmail command.
 *
 * Dispatching this command will result in the creating scheduled email on the backend.
 *
 * @param scheduledEmail - specify scheduled email to create.
 * @param correlationId - specify correlation id to use for this command. this will be included in all
 *  events that will be emitted during the command processing

 * @beta
 */
export function createScheduledEmail(scheduledEmail, correlationId) {
    return {
        type: "GDC.DASH/CMD.SCHEDULED_EMAIL.CREATE",
        correlationId,
        payload: {
            scheduledEmail,
        },
    };
}
/**
 * Saves existing SaveScheduledEmail command. Dispatching this command will result in saving scheduled email on the backend.
 *
 * @param scheduledEmail - specify scheduled email to save.
 * @param correlationId - optionally specify correlation id to use for this command. this will be included in all
 *  events that will be emitted during the command processing

 * @beta
 */
export function saveScheduledEmail(scheduledEmail, correlationId) {
    return {
        type: "GDC.DASH/CMD.SCHEDULED_EMAIL.SAVE",
        correlationId,
        payload: {
            scheduledEmail,
        },
    };
}
/**
 * Creates the InitializeAutomations command.
 *
 * Dispatching this command will result in the initializing dashboard automations.
 * This initialization is necessary for working with alerts and scheduled exports.
 *
 * @param correlationId - specify correlation id to use for this command. this will be included in all
 *  events that will be emitted during the command processing

 * @beta
 */
export function initializeAutomations(correlationId) {
    return {
        type: "GDC.DASH/CMD.AUTOMATIONS.INITIALIZE",
        correlationId,
    };
}
/**
 * Creates the RefreshAutomations command.
 *
 * Dispatching this command will result in refreshing the current dashboard's automation data.
 * This is particularly useful after creating, updating, or removing alerts or scheduled exports,
 * ensuring that the local data remains synchronized with the backend.
 *
 * @param correlationId - specify correlation id to use for this command. this will be included in all
 *  events that will be emitted during the command processing

 * @beta
 */
export function refreshAutomations(correlationId) {
    return {
        type: "GDC.DASH/CMD.AUTOMATIONS.REFRESH",
        correlationId,
    };
}
