announcements: play a sound, then continue

/api/announcements CRUD (sound must be a prompt, destination must exist
and not be itself, delete refused while referenced); the generator
renders sp-ann-{id} (Answer, Playback, destApp) and destApp sends
announcement destinations there. The ivr golden case gains "press 3:
hours announcement, then back to the menu". Announcements are managed in
a section of Sounds & music (05 updated); the DestinationPicker gains
"Announcement".

Task: M6-T5
This commit is contained in:
iamdoubz committed 2026-10-18 11:00:33 -05:00
1 parent 108547046c
commit dd640b368b
19 files changed
+553 -17

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
// Announcements (02 announcements, 03 §6.11): play a sound, then send the caller on.
import { z } from 'zod';
import { DestinationSchema, type Destination } from './destination.ts';
const AnnouncementFields = z.object({
name: z.string().trim().min(1, 'Required').max(40),
soundId: z.uuid('Pick a sound'),
destination: DestinationSchema,
});
export const AnnouncementCreateSchema = AnnouncementFields;
export const AnnouncementUpdateSchema = AnnouncementFields.partial();
export type AnnouncementCreate = z.input<typeof AnnouncementCreateSchema>;
export type AnnouncementUpdate = z.input<typeof AnnouncementUpdateSchema>;
export type AnnouncementDto = z.output<typeof AnnouncementFields> & {
id: string;
destination: Destination;
destinationSummary: string;
soundName: string;
};
+1
View File
@@ -15,3 +15,4 @@ export * from './sounds.ts';
export * from './ringgroups.ts';
export * from './ivrs.ts';
export * from './timeconditions.ts';
export * from './announcements.ts';