A Promise that resolves to an array of NotiflyResult objects — one per URL, in order. The promise always resolves (never rejects), even if some services fail. Uses Promise.allSettled internally for full concurrency.
NotiflyResult
interface NotiflyResult { success: boolean; service: string; // e.g. 'discord', 'ntfy' error?: string; // present only when success is false}
Example
example
import { notify } from '@ambersecurityinc/notifly';const results = await notify( { urls: [ 'discord://1234567890/token', 'ntfy://my-topic', 'invalid-url', // gracefully handled ], }, { title: 'Deploy', body: 'v2.0 is live', type: 'success' });for (const result of results) { if (!result.success) { console.error(`${result.service}: ${result.error}`); }}
parseUrl()
Parse a notification URL string into a service config object.
signature
function parseUrl(url: string): ServiceConfig
Throws a ParseError if the URL scheme is unknown or the URL is malformed.