Isomorphic JavaScript client for Supabase providing authentication, database, real-time, storage, and edge functions capabilities.
89
A service client library that sends various types of notifications through a remote API endpoint.
@generates
/**
* Creates a notification service client instance.
*
* @param serviceUrl - The base URL of the notification service
* @param serviceKey - The API key for authentication
* @returns A client instance with notification methods
*/
export function createNotificationClient(serviceUrl: string, serviceKey: string): NotificationClient;
/**
* Notification client interface
*/
export interface NotificationClient {
/**
* Sends a text notification message.
*
* @param message - The text message to send
* @returns Promise with success indicator and message ID
*/
sendTextNotification(message: string): Promise<{ success: boolean; messageId?: string; error?: string }>;
/**
* Sends a structured notification with metadata.
*
* @param notification - Object containing title, body, priority, and optional metadata
* @returns Promise with success indicator and message ID
*/
sendStructuredNotification(notification: {
title: string;
body: string;
priority: 'low' | 'medium' | 'high';
metadata?: Record<string, any>;
}): Promise<{ success: boolean; messageId?: string; error?: string }>;
/**
* Retrieves the delivery status of a notification.
*
* @param messageId - The ID of the notification to check
* @returns Promise with status information
*/
getNotificationStatus(messageId: string): Promise<{ status: string; error?: string }>;
}Provides backend communication capabilities for the notification service.
Install with Tessl CLI
npx tessl i tessl/npm-supabase--supabase-jsevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10