UNPKG

@statezero/core

Version:

The type-safe frontend client for StateZero - connect directly to your backend models with zero boilerplate

56 lines (55 loc) 1.72 kB
/** * Send notifications to multiple recipients * * @param string message - Notification message to send * @param any[] recipients - List of email addresses to notify * @param 'low' | 'high' priority - Notification priority level * @param {Object} [axiosOverrides] - Allows overriding Axios request parameters. * @returns {Promise<Object>} A promise that resolves with the action's result. */ export function sendNotification(message: any, recipients: any, priority?: string, axiosOverrides?: Object): Promise<Object>; export namespace sendNotification { let actionName: string; let title: string; let app: string; let permissions: string[]; let configKey: string; } /** * Zod schema for the input of sendNotification. * NOTE: This is an object schema for validating the data payload. */ export const sendNotificationInputSchema: z.ZodObject<{ message: z.ZodString; recipients: z.ZodArray<z.ZodAny, "many">; priority: z.ZodDefault<z.ZodOptional<z.ZodEnum<["low", "high"]>>>; }, "strip", z.ZodTypeAny, { message: string; priority: "low" | "high"; recipients: any[]; }, { message: string; recipients: any[]; priority?: "low" | "high" | undefined; }>; /** * Zod schema for the response of sendNotification. */ export const sendNotificationResponseSchema: z.ZodObject<{ success: z.ZodBoolean; message_id: z.ZodString; sent_to: z.ZodNumber; queued_at: z.ZodString; }, "strip", z.ZodTypeAny, { success: boolean; message_id: string; sent_to: number; queued_at: string; }, { success: boolean; message_id: string; sent_to: number; queued_at: string; }>; export default sendNotification; import { z } from 'zod';