@absolutejs/voice 0.0.22-beta.153 → 0.0.22-beta.154

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.
@@ -0,0 +1,50 @@
1
+ export type VoiceOpsActionMethod = 'GET' | 'POST';
2
+ export type VoiceOpsActionDescriptor = {
3
+ description?: string;
4
+ disabled?: boolean;
5
+ id: string;
6
+ label: string;
7
+ method?: VoiceOpsActionMethod;
8
+ path: string;
9
+ };
10
+ export type VoiceOpsActionCenterClientOptions = {
11
+ actions?: VoiceOpsActionDescriptor[];
12
+ fetch?: typeof fetch;
13
+ intervalMs?: number;
14
+ };
15
+ export type VoiceOpsActionRunResult = {
16
+ actionId: string;
17
+ body: unknown;
18
+ ok: boolean;
19
+ ranAt: number;
20
+ status: number;
21
+ };
22
+ export type VoiceOpsActionCenterSnapshot = {
23
+ actions: VoiceOpsActionDescriptor[];
24
+ error: string | null;
25
+ isRunning: boolean;
26
+ lastResult?: VoiceOpsActionRunResult;
27
+ runningActionId?: string;
28
+ updatedAt?: number;
29
+ };
30
+ export type VoiceOpsActionCenterPresetOptions = {
31
+ deliveryRuntimePath?: string;
32
+ includeDeliveryRuntime?: boolean;
33
+ includeProductionReadiness?: boolean;
34
+ includeProviderSimulation?: boolean;
35
+ includeTurnLatencyProof?: boolean;
36
+ productionReadinessPath?: string;
37
+ providerSimulationPathPrefix?: string;
38
+ providers?: readonly string[];
39
+ turnLatencyProofPath?: string;
40
+ };
41
+ export declare const createVoiceOpsActionCenterActions: (options?: VoiceOpsActionCenterPresetOptions) => VoiceOpsActionDescriptor[];
42
+ export declare const runVoiceOpsAction: (action: VoiceOpsActionDescriptor, options?: Pick<VoiceOpsActionCenterClientOptions, "fetch">) => Promise<VoiceOpsActionRunResult>;
43
+ export declare const createVoiceOpsActionCenterStore: (options?: VoiceOpsActionCenterClientOptions) => {
44
+ close: () => void;
45
+ getServerSnapshot: () => VoiceOpsActionCenterSnapshot;
46
+ getSnapshot: () => VoiceOpsActionCenterSnapshot;
47
+ run: (actionId: string) => Promise<VoiceOpsActionRunResult | undefined>;
48
+ setActions: (actions: VoiceOpsActionDescriptor[]) => void;
49
+ subscribe: (listener: () => void) => () => void;
50
+ };
@@ -0,0 +1,29 @@
1
+ import { type VoiceOpsActionCenterClientOptions, type VoiceOpsActionCenterSnapshot } from './opsActionCenter';
2
+ export type VoiceOpsActionCenterViewModel = {
3
+ actions: Array<{
4
+ description: string;
5
+ disabled: boolean;
6
+ id: string;
7
+ isRunning: boolean;
8
+ label: string;
9
+ }>;
10
+ description: string;
11
+ error: string | null;
12
+ isRunning: boolean;
13
+ label: string;
14
+ lastResultLabel: string;
15
+ status: 'ready' | 'running' | 'error' | 'completed';
16
+ title: string;
17
+ };
18
+ export type VoiceOpsActionCenterWidgetOptions = VoiceOpsActionCenterClientOptions & {
19
+ description?: string;
20
+ title?: string;
21
+ };
22
+ export declare const createVoiceOpsActionCenterViewModel: (snapshot: VoiceOpsActionCenterSnapshot, options?: VoiceOpsActionCenterWidgetOptions) => VoiceOpsActionCenterViewModel;
23
+ export declare const renderVoiceOpsActionCenterHTML: (snapshot: VoiceOpsActionCenterSnapshot, options?: VoiceOpsActionCenterWidgetOptions) => string;
24
+ export declare const getVoiceOpsActionCenterCSS: () => string;
25
+ export declare const mountVoiceOpsActionCenter: (element: Element, options?: VoiceOpsActionCenterWidgetOptions) => {
26
+ close: () => void;
27
+ run: (actionId: string) => Promise<import("./opsActionCenter").VoiceOpsActionRunResult | undefined>;
28
+ };
29
+ export declare const defineVoiceOpsActionCenterElement: (tagName?: string, options?: VoiceOpsActionCenterWidgetOptions) => void;
@@ -0,0 +1,5 @@
1
+ import { type VoiceOpsActionCenterWidgetOptions } from '../client/opsActionCenterWidget';
2
+ export type VoiceOpsActionCenterProps = VoiceOpsActionCenterWidgetOptions & {
3
+ className?: string;
4
+ };
5
+ export declare const VoiceOpsActionCenter: ({ className, ...options }: VoiceOpsActionCenterProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  export { VoiceOpsStatus } from './VoiceOpsStatus';
2
+ export { VoiceOpsActionCenter } from './VoiceOpsActionCenter';
2
3
  export { VoiceDeliveryRuntime } from './VoiceDeliveryRuntime';
3
4
  export { VoiceProviderSimulationControls } from './VoiceProviderSimulationControls';
4
5
  export { VoiceProviderCapabilities } from './VoiceProviderCapabilities';
@@ -8,6 +9,7 @@ export { VoiceTraceTimeline } from './VoiceTraceTimeline';
8
9
  export { VoiceTurnLatency } from './VoiceTurnLatency';
9
10
  export { VoiceTurnQuality } from './VoiceTurnQuality';
10
11
  export { useVoiceOpsStatus } from './useVoiceOpsStatus';
12
+ export { useVoiceOpsActionCenter } from './useVoiceOpsActionCenter';
11
13
  export { useVoiceDeliveryRuntime } from './useVoiceDeliveryRuntime';
12
14
  export { useVoiceCampaignDialerProof } from './useVoiceCampaignDialerProof';
13
15
  export { useVoiceStream } from './useVoiceStream';