@absolutejs/voice 0.0.22-beta.510 → 0.0.22-beta.512

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,6 +10,19 @@ var __name = (target, name) => {
10
10
  });
11
11
  return target;
12
12
  };
13
+ var __returnValue = (v) => v;
14
+ function __exportSetter(name, newValue) {
15
+ this[name] = __returnValue.bind(null, newValue);
16
+ }
17
+ var __export = (target, all) => {
18
+ for (var name in all)
19
+ __defProp(target, name, {
20
+ get: all[name],
21
+ enumerable: true,
22
+ configurable: true,
23
+ set: __exportSetter.bind(all, name)
24
+ });
25
+ };
13
26
  var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
14
27
  var __typeError = (msg) => {
15
28
  throw TypeError(msg);
@@ -0,0 +1,43 @@
1
+ import type { VoiceCalendarAdapter, VoiceCalendarAppointment } from "./calendarAdapter";
2
+ import type { VoiceCalendarSlot } from "./calendarSlots";
3
+ export type VoiceBookingFlowStep = "ask-service" | "ask-date" | "ask-time" | "confirm" | "booking" | "booked" | "failed";
4
+ export type VoiceBookingFlowState = {
5
+ step: VoiceBookingFlowStep;
6
+ serviceId?: string;
7
+ serviceDurationMinutes?: number;
8
+ attendees?: string[];
9
+ proposedSlots: VoiceCalendarSlot[];
10
+ selectedSlot?: VoiceCalendarSlot;
11
+ appointment?: VoiceCalendarAppointment;
12
+ error?: string;
13
+ };
14
+ export type VoiceBookingFlowServiceCatalog = {
15
+ id: string;
16
+ label: string;
17
+ durationMinutes: number;
18
+ }[];
19
+ export type CreateVoiceBookingFlowOptions = {
20
+ adapter: VoiceCalendarAdapter;
21
+ calendarId: string;
22
+ services?: VoiceBookingFlowServiceCatalog;
23
+ defaultDurationMinutes?: number;
24
+ initialStep?: VoiceBookingFlowStep;
25
+ maxSlotsPerDay?: number;
26
+ };
27
+ export declare const createVoiceBookingFlow: (options: CreateVoiceBookingFlowOptions) => {
28
+ chooseService: (serviceId: string) => void;
29
+ chooseSlot: (slotIndex: number) => void;
30
+ confirm: (input?: {
31
+ attendees?: string[];
32
+ title?: string;
33
+ notes?: string;
34
+ }) => Promise<VoiceCalendarAppointment | null>;
35
+ getState: () => VoiceBookingFlowState;
36
+ proposeSlotsForDay: (input: {
37
+ fromMs: number;
38
+ toMs: number;
39
+ }) => Promise<VoiceCalendarSlot[]>;
40
+ reset: () => void;
41
+ subscribe(listener: (state: VoiceBookingFlowState) => void): () => void;
42
+ };
43
+ export type VoiceBookingFlow = ReturnType<typeof createVoiceBookingFlow>;
@@ -0,0 +1,47 @@
1
+ import type { VoiceCalendarBookedRange, VoiceCalendarBusinessHours, VoiceCalendarSlot } from "./calendarSlots";
2
+ export type VoiceCalendarAppointment = {
3
+ id: string;
4
+ calendarId: string;
5
+ startMs: number;
6
+ endMs: number;
7
+ title?: string;
8
+ attendees?: string[];
9
+ notes?: string;
10
+ metadata?: Record<string, string>;
11
+ createdAt: number;
12
+ status: "scheduled" | "cancelled" | "completed" | "no-show";
13
+ };
14
+ export type VoiceCalendarAvailabilityQuery = {
15
+ calendarId: string;
16
+ fromMs: number;
17
+ toMs: number;
18
+ durationMinutes: number;
19
+ bufferMinutes?: number;
20
+ granularityMinutes?: number;
21
+ maxSlots?: number;
22
+ };
23
+ export type VoiceCalendarBookInput = {
24
+ calendarId: string;
25
+ startMs: number;
26
+ endMs: number;
27
+ title?: string;
28
+ attendees?: string[];
29
+ notes?: string;
30
+ metadata?: Record<string, string>;
31
+ };
32
+ export type VoiceCalendarAdapter = {
33
+ readonly providerName: string;
34
+ listAvailability(query: VoiceCalendarAvailabilityQuery): Promise<VoiceCalendarSlot[]>;
35
+ book(input: VoiceCalendarBookInput): Promise<VoiceCalendarAppointment>;
36
+ cancel(appointmentId: string): Promise<VoiceCalendarAppointment | null>;
37
+ get(appointmentId: string): Promise<VoiceCalendarAppointment | null>;
38
+ reschedule(appointmentId: string, nextStartMs: number, nextEndMs: number): Promise<VoiceCalendarAppointment | null>;
39
+ };
40
+ export type CreateVoiceInMemoryCalendarAdapterOptions = {
41
+ businessHours: VoiceCalendarBusinessHours[];
42
+ timezone?: string;
43
+ bookedRanges?: VoiceCalendarBookedRange[];
44
+ generateId?: () => string;
45
+ now?: () => number;
46
+ };
47
+ export declare const createVoiceInMemoryCalendarAdapter: (options: CreateVoiceInMemoryCalendarAdapterOptions) => VoiceCalendarAdapter;
@@ -0,0 +1,35 @@
1
+ export type VoiceCalendarBusinessHours = {
2
+ weekday: number;
3
+ start: string;
4
+ end: string;
5
+ };
6
+ export type VoiceCalendarBlackout = {
7
+ date: string;
8
+ reason?: string;
9
+ };
10
+ export type VoiceCalendarBookedRange = {
11
+ startMs: number;
12
+ endMs: number;
13
+ };
14
+ export type VoiceCalendarSlot = {
15
+ startMs: number;
16
+ endMs: number;
17
+ durationMinutes: number;
18
+ };
19
+ export type GenerateVoiceCalendarSlotsInput = {
20
+ fromMs: number;
21
+ toMs: number;
22
+ durationMinutes: number;
23
+ bufferMinutes?: number;
24
+ granularityMinutes?: number;
25
+ timezone?: string;
26
+ businessHours: VoiceCalendarBusinessHours[];
27
+ blackoutDates?: VoiceCalendarBlackout[];
28
+ bookedRanges?: VoiceCalendarBookedRange[];
29
+ maxSlots?: number;
30
+ };
31
+ export declare const generateVoiceCalendarSlots: (input: GenerateVoiceCalendarSlotsInput) => VoiceCalendarSlot[];
32
+ export declare const summarizeVoiceCalendarSlot: (slot: VoiceCalendarSlot, options?: {
33
+ timezone?: string;
34
+ locale?: string;
35
+ }) => string;
@@ -10,6 +10,19 @@ var __name = (target, name) => {
10
10
  });
11
11
  return target;
12
12
  };
13
+ var __returnValue = (v) => v;
14
+ function __exportSetter(name, newValue) {
15
+ this[name] = __returnValue.bind(null, newValue);
16
+ }
17
+ var __export = (target, all) => {
18
+ for (var name in all)
19
+ __defProp(target, name, {
20
+ get: all[name],
21
+ enumerable: true,
22
+ configurable: true,
23
+ set: __exportSetter.bind(all, name)
24
+ });
25
+ };
13
26
  var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
14
27
  var __typeError = (msg) => {
15
28
  throw TypeError(msg);
package/dist/index.d.ts CHANGED
@@ -311,4 +311,24 @@ export { createVoiceRetryPolicy } from "./retryPolicy";
311
311
  export type { VoiceRetryAttempt, VoiceRetryDecision, VoiceRetryDispositionAction, VoiceRetryDispositionRule, VoiceRetryPolicy, CreateVoiceRetryPolicyOptions, } from "./retryPolicy";
312
312
  export { collectVoiceCampaignTemplateVariables, DEFAULT_VOICE_CAMPAIGN_TEMPLATE_FILTERS, resolveVoiceCampaignTemplate, } from "./campaignTemplate";
313
313
  export type { ResolveVoiceCampaignTemplateOptions, VoiceCampaignTemplateFilter, VoiceCampaignTemplateResolveResult, VoiceCampaignTemplateScope, VoiceCampaignTemplateValue, } from "./campaignTemplate";
314
+ export { createVoiceWhisperChannel } from "./whisperChannel";
315
+ export type { CreateVoiceWhisperChannelOptions, VoiceWhisperChannel, VoiceWhisperEvent, VoiceWhisperFrame, VoiceWhisperRoute, } from "./whisperChannel";
316
+ export { createVoiceLiveCoach } from "./liveCoach";
317
+ export type { CreateVoiceLiveCoachOptions, VoiceCoachNudge, VoiceCoachNudgeInjection, VoiceCoachNudgeKind, VoiceLiveCoach, } from "./liveCoach";
318
+ export { createVoiceTranscriptAnnotator, DEFAULT_VOICE_ANNOTATION_KIND_SEVERITY, } from "./transcriptAnnotator";
319
+ export type { CreateVoiceTranscriptAnnotatorOptions, VoiceTranscriptAnnotation, VoiceTranscriptAnnotationKind, VoiceTranscriptAnnotator, } from "./transcriptAnnotator";
320
+ export { createVoiceSupervisorPresence } from "./supervisorPresence";
321
+ export type { CreateVoiceSupervisorPresenceOptions, VoiceSupervisorPresence, VoiceSupervisorPresenceEvent, VoiceSupervisorRole, VoiceSupervisorWatcher, } from "./supervisorPresence";
322
+ export { createVoiceSupervisorPermissions, VOICE_SUPERVISOR_TIER_CAPABILITIES, } from "./supervisorPermissions";
323
+ export type { CreateVoiceSupervisorPermissionsOptions, VoiceSupervisorCapability, VoiceSupervisorPermission, VoiceSupervisorPermissionCheck, VoiceSupervisorPermissions, VoiceSupervisorTier, } from "./supervisorPermissions";
324
+ export { generateVoiceCalendarSlots, summarizeVoiceCalendarSlot, } from "./calendarSlots";
325
+ export type { GenerateVoiceCalendarSlotsInput, VoiceCalendarBlackout, VoiceCalendarBookedRange, VoiceCalendarBusinessHours, VoiceCalendarSlot, } from "./calendarSlots";
326
+ export { createVoiceInMemoryCalendarAdapter } from "./calendarAdapter";
327
+ export type { CreateVoiceInMemoryCalendarAdapterOptions, VoiceCalendarAdapter, VoiceCalendarAppointment, VoiceCalendarAvailabilityQuery, VoiceCalendarBookInput, } from "./calendarAdapter";
328
+ export { createVoiceBookingFlow } from "./bookingFlow";
329
+ export type { CreateVoiceBookingFlowOptions, VoiceBookingFlow, VoiceBookingFlowServiceCatalog, VoiceBookingFlowState, VoiceBookingFlowStep, } from "./bookingFlow";
330
+ export { scoreVoiceNoShowRisk, summarizeVoiceNoShowVerdict, } from "./noShowPredictor";
331
+ export type { VoiceNoShowHistoricalRecord, VoiceNoShowScoreInput, VoiceNoShowSignal, VoiceNoShowVerdict, } from "./noShowPredictor";
332
+ export { createVoiceReminderScheduler, DEFAULT_VOICE_REMINDER_TRIGGERS, } from "./reminderScheduler";
333
+ export type { CreateVoiceReminderSchedulerOptions, ScheduleVoiceRemindersInput, VoiceReminderChannel, VoiceReminderJob, VoiceReminderScheduler, VoiceReminderTrigger, } from "./reminderScheduler";
314
334
  export * from "./types";