@absolutejs/voice 0.0.22-beta.151 → 0.0.22-beta.152
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.
- package/README.md +28 -0
- package/dist/angular/index.d.ts +2 -0
- package/dist/angular/index.js +479 -124
- package/dist/angular/voice-delivery-runtime.component.d.ts +14 -0
- package/dist/angular/voice-delivery-runtime.service.d.ts +12 -0
- package/dist/client/deliveryRuntime.d.ts +19 -0
- package/dist/client/deliveryRuntimeWidget.d.ts +34 -0
- package/dist/client/index.d.ts +4 -0
- package/dist/client/index.js +287 -100
- package/dist/deliveryRuntime.d.ts +1 -1
- package/dist/react/VoiceDeliveryRuntime.d.ts +6 -0
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.js +520 -256
- package/dist/react/useVoiceDeliveryRuntime.d.ts +8 -0
- package/dist/svelte/createVoiceDeliveryRuntime.d.ts +9 -0
- package/dist/svelte/index.d.ts +1 -0
- package/dist/svelte/index.js +309 -114
- package/dist/vue/VoiceDeliveryRuntime.d.ts +21 -0
- package/dist/vue/index.d.ts +2 -0
- package/dist/vue/index.js +534 -261
- package/dist/vue/useVoiceDeliveryRuntime.d.ts +9 -0
- package/package.json +1 -1
package/dist/angular/index.js
CHANGED
|
@@ -193,9 +193,133 @@ VoiceOpsStatusService = __decorateElement(_init, 0, "VoiceOpsStatusService", _de
|
|
|
193
193
|
__runInitializers(_init, 1, VoiceOpsStatusService);
|
|
194
194
|
__decoratorMetadata(_init, VoiceOpsStatusService);
|
|
195
195
|
let _VoiceOpsStatusService = VoiceOpsStatusService;
|
|
196
|
-
// src/angular/voice-
|
|
196
|
+
// src/angular/voice-delivery-runtime.service.ts
|
|
197
197
|
import { computed as computed2, Injectable as Injectable2, signal as signal2 } from "@angular/core";
|
|
198
198
|
|
|
199
|
+
// src/client/deliveryRuntime.ts
|
|
200
|
+
var fetchVoiceDeliveryRuntime = async (path = "/api/voice-delivery-runtime", options = {}) => {
|
|
201
|
+
const fetchImpl = options.fetch ?? globalThis.fetch;
|
|
202
|
+
const response = await fetchImpl(path);
|
|
203
|
+
if (!response.ok) {
|
|
204
|
+
throw new Error(`Voice delivery runtime failed: HTTP ${response.status}`);
|
|
205
|
+
}
|
|
206
|
+
return await response.json();
|
|
207
|
+
};
|
|
208
|
+
var createVoiceDeliveryRuntimeStore = (path = "/api/voice-delivery-runtime", options = {}) => {
|
|
209
|
+
const listeners = new Set;
|
|
210
|
+
let closed = false;
|
|
211
|
+
let timer;
|
|
212
|
+
let snapshot = {
|
|
213
|
+
error: null,
|
|
214
|
+
isLoading: false
|
|
215
|
+
};
|
|
216
|
+
const emit = () => {
|
|
217
|
+
for (const listener of listeners) {
|
|
218
|
+
listener();
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
const refresh = async () => {
|
|
222
|
+
if (closed) {
|
|
223
|
+
return snapshot.report;
|
|
224
|
+
}
|
|
225
|
+
snapshot = {
|
|
226
|
+
...snapshot,
|
|
227
|
+
error: null,
|
|
228
|
+
isLoading: true
|
|
229
|
+
};
|
|
230
|
+
emit();
|
|
231
|
+
try {
|
|
232
|
+
const report = await fetchVoiceDeliveryRuntime(path, options);
|
|
233
|
+
snapshot = {
|
|
234
|
+
error: null,
|
|
235
|
+
isLoading: false,
|
|
236
|
+
report,
|
|
237
|
+
updatedAt: Date.now()
|
|
238
|
+
};
|
|
239
|
+
emit();
|
|
240
|
+
return report;
|
|
241
|
+
} catch (error) {
|
|
242
|
+
snapshot = {
|
|
243
|
+
...snapshot,
|
|
244
|
+
error: error instanceof Error ? error.message : String(error),
|
|
245
|
+
isLoading: false
|
|
246
|
+
};
|
|
247
|
+
emit();
|
|
248
|
+
throw error;
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
const close = () => {
|
|
252
|
+
closed = true;
|
|
253
|
+
if (timer) {
|
|
254
|
+
clearInterval(timer);
|
|
255
|
+
timer = undefined;
|
|
256
|
+
}
|
|
257
|
+
listeners.clear();
|
|
258
|
+
};
|
|
259
|
+
if (typeof window !== "undefined" && options.intervalMs && options.intervalMs > 0) {
|
|
260
|
+
timer = setInterval(() => {
|
|
261
|
+
refresh().catch(() => {});
|
|
262
|
+
}, options.intervalMs);
|
|
263
|
+
}
|
|
264
|
+
return {
|
|
265
|
+
close,
|
|
266
|
+
getServerSnapshot: () => snapshot,
|
|
267
|
+
getSnapshot: () => snapshot,
|
|
268
|
+
refresh,
|
|
269
|
+
subscribe: (listener) => {
|
|
270
|
+
listeners.add(listener);
|
|
271
|
+
return () => {
|
|
272
|
+
listeners.delete(listener);
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
// src/angular/voice-delivery-runtime.service.ts
|
|
279
|
+
var _dec = [
|
|
280
|
+
Injectable2({ providedIn: "root" })
|
|
281
|
+
];
|
|
282
|
+
var _init = __decoratorStart(undefined);
|
|
283
|
+
|
|
284
|
+
class VoiceDeliveryRuntimeService {
|
|
285
|
+
connect(path = "/api/voice-delivery-runtime", options = {}) {
|
|
286
|
+
const store = createVoiceDeliveryRuntimeStore(path, options);
|
|
287
|
+
const errorSignal = signal2(null);
|
|
288
|
+
const isLoadingSignal = signal2(false);
|
|
289
|
+
const reportSignal = signal2(undefined);
|
|
290
|
+
const updatedAtSignal = signal2(undefined);
|
|
291
|
+
const sync = () => {
|
|
292
|
+
const snapshot = store.getSnapshot();
|
|
293
|
+
errorSignal.set(snapshot.error);
|
|
294
|
+
isLoadingSignal.set(snapshot.isLoading);
|
|
295
|
+
reportSignal.set(snapshot.report);
|
|
296
|
+
updatedAtSignal.set(snapshot.updatedAt);
|
|
297
|
+
};
|
|
298
|
+
const unsubscribe = store.subscribe(sync);
|
|
299
|
+
sync();
|
|
300
|
+
if (typeof window !== "undefined") {
|
|
301
|
+
store.refresh().catch(() => {});
|
|
302
|
+
}
|
|
303
|
+
return {
|
|
304
|
+
close: () => {
|
|
305
|
+
unsubscribe();
|
|
306
|
+
store.close();
|
|
307
|
+
},
|
|
308
|
+
error: computed2(() => errorSignal()),
|
|
309
|
+
isLoading: computed2(() => isLoadingSignal()),
|
|
310
|
+
refresh: store.refresh,
|
|
311
|
+
report: computed2(() => reportSignal()),
|
|
312
|
+
updatedAt: computed2(() => updatedAtSignal())
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
VoiceDeliveryRuntimeService = __decorateElement(_init, 0, "VoiceDeliveryRuntimeService", _dec, VoiceDeliveryRuntimeService);
|
|
317
|
+
__runInitializers(_init, 1, VoiceDeliveryRuntimeService);
|
|
318
|
+
__decoratorMetadata(_init, VoiceDeliveryRuntimeService);
|
|
319
|
+
let _VoiceDeliveryRuntimeService = VoiceDeliveryRuntimeService;
|
|
320
|
+
// src/angular/voice-campaign-dialer-proof.service.ts
|
|
321
|
+
import { computed as computed3, Injectable as Injectable3, signal as signal3 } from "@angular/core";
|
|
322
|
+
|
|
199
323
|
// src/client/campaignDialerProof.ts
|
|
200
324
|
var fetchVoiceCampaignDialerProofStatus = async (path = "/api/voice/campaigns/dialer-proof", options = {}) => {
|
|
201
325
|
const fetchImpl = options.fetch ?? globalThis.fetch;
|
|
@@ -316,18 +440,18 @@ var createVoiceCampaignDialerProofStore = (path = "/api/voice/campaigns/dialer-p
|
|
|
316
440
|
|
|
317
441
|
// src/angular/voice-campaign-dialer-proof.service.ts
|
|
318
442
|
var _dec = [
|
|
319
|
-
|
|
443
|
+
Injectable3({ providedIn: "root" })
|
|
320
444
|
];
|
|
321
445
|
var _init = __decoratorStart(undefined);
|
|
322
446
|
|
|
323
447
|
class VoiceCampaignDialerProofService {
|
|
324
448
|
connect(path = "/api/voice/campaigns/dialer-proof", options = {}) {
|
|
325
449
|
const store = createVoiceCampaignDialerProofStore(path, options);
|
|
326
|
-
const errorSignal =
|
|
327
|
-
const isLoadingSignal =
|
|
328
|
-
const reportSignal =
|
|
329
|
-
const statusSignal =
|
|
330
|
-
const updatedAtSignal =
|
|
450
|
+
const errorSignal = signal3(null);
|
|
451
|
+
const isLoadingSignal = signal3(false);
|
|
452
|
+
const reportSignal = signal3(undefined);
|
|
453
|
+
const statusSignal = signal3(undefined);
|
|
454
|
+
const updatedAtSignal = signal3(undefined);
|
|
331
455
|
const sync = () => {
|
|
332
456
|
const snapshot = store.getSnapshot();
|
|
333
457
|
errorSignal.set(snapshot.error);
|
|
@@ -344,13 +468,13 @@ class VoiceCampaignDialerProofService {
|
|
|
344
468
|
unsubscribe();
|
|
345
469
|
store.close();
|
|
346
470
|
},
|
|
347
|
-
error:
|
|
348
|
-
isLoading:
|
|
471
|
+
error: computed3(() => errorSignal()),
|
|
472
|
+
isLoading: computed3(() => isLoadingSignal()),
|
|
349
473
|
refresh: store.refresh,
|
|
350
|
-
report:
|
|
474
|
+
report: computed3(() => reportSignal()),
|
|
351
475
|
runProof: store.runProof,
|
|
352
|
-
status:
|
|
353
|
-
updatedAt:
|
|
476
|
+
status: computed3(() => statusSignal()),
|
|
477
|
+
updatedAt: computed3(() => updatedAtSignal())
|
|
354
478
|
};
|
|
355
479
|
}
|
|
356
480
|
}
|
|
@@ -359,7 +483,7 @@ __runInitializers(_init, 1, VoiceCampaignDialerProofService);
|
|
|
359
483
|
__decoratorMetadata(_init, VoiceCampaignDialerProofService);
|
|
360
484
|
let _VoiceCampaignDialerProofService = VoiceCampaignDialerProofService;
|
|
361
485
|
// src/angular/voice-stream.service.ts
|
|
362
|
-
import { computed as
|
|
486
|
+
import { computed as computed4, Injectable as Injectable4, signal as signal4 } from "@angular/core";
|
|
363
487
|
|
|
364
488
|
// src/client/actions.ts
|
|
365
489
|
var normalizeErrorMessage = (value) => {
|
|
@@ -1003,23 +1127,23 @@ var createVoiceStream = (path, options = {}) => {
|
|
|
1003
1127
|
|
|
1004
1128
|
// src/angular/voice-stream.service.ts
|
|
1005
1129
|
var _dec = [
|
|
1006
|
-
|
|
1130
|
+
Injectable4({ providedIn: "root" })
|
|
1007
1131
|
];
|
|
1008
1132
|
var _init = __decoratorStart(undefined);
|
|
1009
1133
|
|
|
1010
1134
|
class VoiceStreamService {
|
|
1011
1135
|
connect(path, options = {}) {
|
|
1012
1136
|
const stream = createVoiceStream(path, options);
|
|
1013
|
-
const assistantAudioSignal =
|
|
1014
|
-
const assistantTextsSignal =
|
|
1015
|
-
const callSignal =
|
|
1016
|
-
const errorSignal =
|
|
1017
|
-
const isConnectedSignal =
|
|
1018
|
-
const partialSignal =
|
|
1019
|
-
const reconnectSignal =
|
|
1020
|
-
const sessionIdSignal =
|
|
1021
|
-
const statusSignal =
|
|
1022
|
-
const turnsSignal =
|
|
1137
|
+
const assistantAudioSignal = signal4([]);
|
|
1138
|
+
const assistantTextsSignal = signal4([]);
|
|
1139
|
+
const callSignal = signal4(null);
|
|
1140
|
+
const errorSignal = signal4(null);
|
|
1141
|
+
const isConnectedSignal = signal4(false);
|
|
1142
|
+
const partialSignal = signal4("");
|
|
1143
|
+
const reconnectSignal = signal4(stream.reconnect);
|
|
1144
|
+
const sessionIdSignal = signal4(stream.sessionId);
|
|
1145
|
+
const statusSignal = signal4(stream.status);
|
|
1146
|
+
const turnsSignal = signal4([]);
|
|
1023
1147
|
const sync = () => {
|
|
1024
1148
|
assistantAudioSignal.set([...stream.assistantAudio]);
|
|
1025
1149
|
assistantTextsSignal.set([...stream.assistantTexts]);
|
|
@@ -1035,23 +1159,23 @@ class VoiceStreamService {
|
|
|
1035
1159
|
const unsubscribe = stream.subscribe(sync);
|
|
1036
1160
|
sync();
|
|
1037
1161
|
return {
|
|
1038
|
-
assistantAudio:
|
|
1039
|
-
assistantTexts:
|
|
1040
|
-
call:
|
|
1162
|
+
assistantAudio: computed4(() => assistantAudioSignal()),
|
|
1163
|
+
assistantTexts: computed4(() => assistantTextsSignal()),
|
|
1164
|
+
call: computed4(() => callSignal()),
|
|
1041
1165
|
callControl: (message) => stream.callControl(message),
|
|
1042
1166
|
close: () => {
|
|
1043
1167
|
unsubscribe();
|
|
1044
1168
|
stream.close();
|
|
1045
1169
|
},
|
|
1046
1170
|
endTurn: () => stream.endTurn(),
|
|
1047
|
-
error:
|
|
1048
|
-
isConnected:
|
|
1049
|
-
partial:
|
|
1050
|
-
reconnect:
|
|
1171
|
+
error: computed4(() => errorSignal()),
|
|
1172
|
+
isConnected: computed4(() => isConnectedSignal()),
|
|
1173
|
+
partial: computed4(() => partialSignal()),
|
|
1174
|
+
reconnect: computed4(() => reconnectSignal()),
|
|
1051
1175
|
sendAudio: (audio) => stream.sendAudio(audio),
|
|
1052
|
-
sessionId:
|
|
1053
|
-
status:
|
|
1054
|
-
turns:
|
|
1176
|
+
sessionId: computed4(() => sessionIdSignal()),
|
|
1177
|
+
status: computed4(() => statusSignal()),
|
|
1178
|
+
turns: computed4(() => turnsSignal())
|
|
1055
1179
|
};
|
|
1056
1180
|
}
|
|
1057
1181
|
}
|
|
@@ -1060,7 +1184,7 @@ __runInitializers(_init, 1, VoiceStreamService);
|
|
|
1060
1184
|
__decoratorMetadata(_init, VoiceStreamService);
|
|
1061
1185
|
let _VoiceStreamService = VoiceStreamService;
|
|
1062
1186
|
// src/angular/voice-controller.service.ts
|
|
1063
|
-
import { computed as
|
|
1187
|
+
import { computed as computed5, Injectable as Injectable5, signal as signal5 } from "@angular/core";
|
|
1064
1188
|
|
|
1065
1189
|
// src/client/htmx.ts
|
|
1066
1190
|
var DEFAULT_EVENT_NAME = "voice-refresh";
|
|
@@ -1705,24 +1829,24 @@ var createVoiceController = (path, options = {}) => {
|
|
|
1705
1829
|
|
|
1706
1830
|
// src/angular/voice-controller.service.ts
|
|
1707
1831
|
var _dec = [
|
|
1708
|
-
|
|
1832
|
+
Injectable5({ providedIn: "root" })
|
|
1709
1833
|
];
|
|
1710
1834
|
var _init = __decoratorStart(undefined);
|
|
1711
1835
|
|
|
1712
1836
|
class VoiceControllerService {
|
|
1713
1837
|
connect(path, options = {}) {
|
|
1714
1838
|
const controller = createVoiceController(path, options);
|
|
1715
|
-
const assistantAudioSignal =
|
|
1716
|
-
const assistantTextsSignal =
|
|
1717
|
-
const errorSignal =
|
|
1718
|
-
const isConnectedSignal =
|
|
1719
|
-
const isRecordingSignal =
|
|
1720
|
-
const partialSignal =
|
|
1721
|
-
const reconnectSignal =
|
|
1722
|
-
const recordingErrorSignal =
|
|
1723
|
-
const sessionIdSignal =
|
|
1724
|
-
const statusSignal =
|
|
1725
|
-
const turnsSignal =
|
|
1839
|
+
const assistantAudioSignal = signal5([]);
|
|
1840
|
+
const assistantTextsSignal = signal5([]);
|
|
1841
|
+
const errorSignal = signal5(null);
|
|
1842
|
+
const isConnectedSignal = signal5(false);
|
|
1843
|
+
const isRecordingSignal = signal5(false);
|
|
1844
|
+
const partialSignal = signal5("");
|
|
1845
|
+
const reconnectSignal = signal5(controller.reconnect);
|
|
1846
|
+
const recordingErrorSignal = signal5(null);
|
|
1847
|
+
const sessionIdSignal = signal5(controller.sessionId);
|
|
1848
|
+
const statusSignal = signal5(controller.status);
|
|
1849
|
+
const turnsSignal = signal5([]);
|
|
1726
1850
|
const sync = () => {
|
|
1727
1851
|
assistantAudioSignal.set([...controller.assistantAudio]);
|
|
1728
1852
|
assistantTextsSignal.set([...controller.assistantTexts]);
|
|
@@ -1739,27 +1863,27 @@ class VoiceControllerService {
|
|
|
1739
1863
|
const unsubscribe = controller.subscribe(sync);
|
|
1740
1864
|
sync();
|
|
1741
1865
|
return {
|
|
1742
|
-
assistantAudio:
|
|
1743
|
-
assistantTexts:
|
|
1866
|
+
assistantAudio: computed5(() => assistantAudioSignal()),
|
|
1867
|
+
assistantTexts: computed5(() => assistantTextsSignal()),
|
|
1744
1868
|
bindHTMX: controller.bindHTMX,
|
|
1745
1869
|
close: () => {
|
|
1746
1870
|
unsubscribe();
|
|
1747
1871
|
controller.close();
|
|
1748
1872
|
},
|
|
1749
1873
|
endTurn: () => controller.endTurn(),
|
|
1750
|
-
error:
|
|
1751
|
-
isConnected:
|
|
1752
|
-
isRecording:
|
|
1753
|
-
partial:
|
|
1754
|
-
reconnect:
|
|
1755
|
-
recordingError:
|
|
1874
|
+
error: computed5(() => errorSignal()),
|
|
1875
|
+
isConnected: computed5(() => isConnectedSignal()),
|
|
1876
|
+
isRecording: computed5(() => isRecordingSignal()),
|
|
1877
|
+
partial: computed5(() => partialSignal()),
|
|
1878
|
+
reconnect: computed5(() => reconnectSignal()),
|
|
1879
|
+
recordingError: computed5(() => recordingErrorSignal()),
|
|
1756
1880
|
sendAudio: (audio) => controller.sendAudio(audio),
|
|
1757
|
-
sessionId:
|
|
1881
|
+
sessionId: computed5(() => sessionIdSignal()),
|
|
1758
1882
|
startRecording: () => controller.startRecording(),
|
|
1759
|
-
status:
|
|
1883
|
+
status: computed5(() => statusSignal()),
|
|
1760
1884
|
stopRecording: () => controller.stopRecording(),
|
|
1761
1885
|
toggleRecording: () => controller.toggleRecording(),
|
|
1762
|
-
turns:
|
|
1886
|
+
turns: computed5(() => turnsSignal())
|
|
1763
1887
|
};
|
|
1764
1888
|
}
|
|
1765
1889
|
}
|
|
@@ -1768,7 +1892,7 @@ __runInitializers(_init, 1, VoiceControllerService);
|
|
|
1768
1892
|
__decoratorMetadata(_init, VoiceControllerService);
|
|
1769
1893
|
let _VoiceControllerService = VoiceControllerService;
|
|
1770
1894
|
// src/angular/voice-provider-capabilities.service.ts
|
|
1771
|
-
import { computed as
|
|
1895
|
+
import { computed as computed6, Injectable as Injectable6, signal as signal6 } from "@angular/core";
|
|
1772
1896
|
|
|
1773
1897
|
// src/client/providerCapabilities.ts
|
|
1774
1898
|
var fetchVoiceProviderCapabilities = async (path = "/api/provider-capabilities", options = {}) => {
|
|
@@ -1851,17 +1975,17 @@ var createVoiceProviderCapabilitiesStore = (path = "/api/provider-capabilities",
|
|
|
1851
1975
|
|
|
1852
1976
|
// src/angular/voice-provider-capabilities.service.ts
|
|
1853
1977
|
var _dec = [
|
|
1854
|
-
|
|
1978
|
+
Injectable6({ providedIn: "root" })
|
|
1855
1979
|
];
|
|
1856
1980
|
var _init = __decoratorStart(undefined);
|
|
1857
1981
|
|
|
1858
1982
|
class VoiceProviderCapabilitiesService {
|
|
1859
1983
|
connect(path = "/api/provider-capabilities", options = {}) {
|
|
1860
1984
|
const store = createVoiceProviderCapabilitiesStore(path, options);
|
|
1861
|
-
const errorSignal =
|
|
1862
|
-
const isLoadingSignal =
|
|
1863
|
-
const reportSignal =
|
|
1864
|
-
const updatedAtSignal =
|
|
1985
|
+
const errorSignal = signal6(null);
|
|
1986
|
+
const isLoadingSignal = signal6(false);
|
|
1987
|
+
const reportSignal = signal6(undefined);
|
|
1988
|
+
const updatedAtSignal = signal6(undefined);
|
|
1865
1989
|
const sync = () => {
|
|
1866
1990
|
const snapshot = store.getSnapshot();
|
|
1867
1991
|
errorSignal.set(snapshot.error);
|
|
@@ -1877,11 +2001,11 @@ class VoiceProviderCapabilitiesService {
|
|
|
1877
2001
|
unsubscribe();
|
|
1878
2002
|
store.close();
|
|
1879
2003
|
},
|
|
1880
|
-
error:
|
|
1881
|
-
isLoading:
|
|
2004
|
+
error: computed6(() => errorSignal()),
|
|
2005
|
+
isLoading: computed6(() => isLoadingSignal()),
|
|
1882
2006
|
refresh: store.refresh,
|
|
1883
|
-
report:
|
|
1884
|
-
updatedAt:
|
|
2007
|
+
report: computed6(() => reportSignal()),
|
|
2008
|
+
updatedAt: computed6(() => updatedAtSignal())
|
|
1885
2009
|
};
|
|
1886
2010
|
}
|
|
1887
2011
|
}
|
|
@@ -1890,7 +2014,7 @@ __runInitializers(_init, 1, VoiceProviderCapabilitiesService);
|
|
|
1890
2014
|
__decoratorMetadata(_init, VoiceProviderCapabilitiesService);
|
|
1891
2015
|
let _VoiceProviderCapabilitiesService = VoiceProviderCapabilitiesService;
|
|
1892
2016
|
// src/angular/voice-provider-status.service.ts
|
|
1893
|
-
import { computed as
|
|
2017
|
+
import { computed as computed7, Injectable as Injectable7, signal as signal7 } from "@angular/core";
|
|
1894
2018
|
|
|
1895
2019
|
// src/client/providerStatus.ts
|
|
1896
2020
|
var fetchVoiceProviderStatus = async (path = "/api/provider-status", options = {}) => {
|
|
@@ -1974,17 +2098,17 @@ var createVoiceProviderStatusStore = (path = "/api/provider-status", options = {
|
|
|
1974
2098
|
|
|
1975
2099
|
// src/angular/voice-provider-status.service.ts
|
|
1976
2100
|
var _dec = [
|
|
1977
|
-
|
|
2101
|
+
Injectable7({ providedIn: "root" })
|
|
1978
2102
|
];
|
|
1979
2103
|
var _init = __decoratorStart(undefined);
|
|
1980
2104
|
|
|
1981
2105
|
class VoiceProviderStatusService {
|
|
1982
2106
|
connect(path = "/api/provider-status", options = {}) {
|
|
1983
2107
|
const store = createVoiceProviderStatusStore(path, options);
|
|
1984
|
-
const errorSignal =
|
|
1985
|
-
const isLoadingSignal =
|
|
1986
|
-
const providersSignal =
|
|
1987
|
-
const updatedAtSignal =
|
|
2108
|
+
const errorSignal = signal7(null);
|
|
2109
|
+
const isLoadingSignal = signal7(false);
|
|
2110
|
+
const providersSignal = signal7([]);
|
|
2111
|
+
const updatedAtSignal = signal7(undefined);
|
|
1988
2112
|
const sync = () => {
|
|
1989
2113
|
const snapshot = store.getSnapshot();
|
|
1990
2114
|
errorSignal.set(snapshot.error);
|
|
@@ -2000,11 +2124,11 @@ class VoiceProviderStatusService {
|
|
|
2000
2124
|
unsubscribe();
|
|
2001
2125
|
store.close();
|
|
2002
2126
|
},
|
|
2003
|
-
error:
|
|
2004
|
-
isLoading:
|
|
2005
|
-
providers:
|
|
2127
|
+
error: computed7(() => errorSignal()),
|
|
2128
|
+
isLoading: computed7(() => isLoadingSignal()),
|
|
2129
|
+
providers: computed7(() => providersSignal()),
|
|
2006
2130
|
refresh: store.refresh,
|
|
2007
|
-
updatedAt:
|
|
2131
|
+
updatedAt: computed7(() => updatedAtSignal())
|
|
2008
2132
|
};
|
|
2009
2133
|
}
|
|
2010
2134
|
}
|
|
@@ -2013,7 +2137,7 @@ __runInitializers(_init, 1, VoiceProviderStatusService);
|
|
|
2013
2137
|
__decoratorMetadata(_init, VoiceProviderStatusService);
|
|
2014
2138
|
let _VoiceProviderStatusService = VoiceProviderStatusService;
|
|
2015
2139
|
// src/angular/voice-routing-status.service.ts
|
|
2016
|
-
import { Injectable as
|
|
2140
|
+
import { Injectable as Injectable8, signal as signal8 } from "@angular/core";
|
|
2017
2141
|
|
|
2018
2142
|
// src/client/routingStatus.ts
|
|
2019
2143
|
var fetchVoiceRoutingStatus = async (path = "/api/routing/latest", options = {}) => {
|
|
@@ -2097,17 +2221,17 @@ var createVoiceRoutingStatusStore = (path = "/api/routing/latest", options = {})
|
|
|
2097
2221
|
|
|
2098
2222
|
// src/angular/voice-routing-status.service.ts
|
|
2099
2223
|
var _dec = [
|
|
2100
|
-
|
|
2224
|
+
Injectable8({ providedIn: "root" })
|
|
2101
2225
|
];
|
|
2102
2226
|
var _init = __decoratorStart(undefined);
|
|
2103
2227
|
|
|
2104
2228
|
class VoiceRoutingStatusService {
|
|
2105
2229
|
connect(path = "/api/routing/latest", options = {}) {
|
|
2106
2230
|
const store = createVoiceRoutingStatusStore(path, options);
|
|
2107
|
-
const decisionSignal =
|
|
2108
|
-
const errorSignal =
|
|
2109
|
-
const isLoadingSignal =
|
|
2110
|
-
const updatedAtSignal =
|
|
2231
|
+
const decisionSignal = signal8(null);
|
|
2232
|
+
const errorSignal = signal8(null);
|
|
2233
|
+
const isLoadingSignal = signal8(false);
|
|
2234
|
+
const updatedAtSignal = signal8(undefined);
|
|
2111
2235
|
const sync = () => {
|
|
2112
2236
|
const snapshot = store.getSnapshot();
|
|
2113
2237
|
decisionSignal.set(snapshot.decision);
|
|
@@ -2136,7 +2260,7 @@ __runInitializers(_init, 1, VoiceRoutingStatusService);
|
|
|
2136
2260
|
__decoratorMetadata(_init, VoiceRoutingStatusService);
|
|
2137
2261
|
let _VoiceRoutingStatusService = VoiceRoutingStatusService;
|
|
2138
2262
|
// src/angular/voice-trace-timeline.service.ts
|
|
2139
|
-
import { computed as
|
|
2263
|
+
import { computed as computed8, Injectable as Injectable9, signal as signal9 } from "@angular/core";
|
|
2140
2264
|
|
|
2141
2265
|
// src/client/traceTimeline.ts
|
|
2142
2266
|
var fetchVoiceTraceTimeline = async (path = "/api/voice-traces", options = {}) => {
|
|
@@ -2220,17 +2344,17 @@ var createVoiceTraceTimelineStore = (path = "/api/voice-traces", options = {}) =
|
|
|
2220
2344
|
|
|
2221
2345
|
// src/angular/voice-trace-timeline.service.ts
|
|
2222
2346
|
var _dec = [
|
|
2223
|
-
|
|
2347
|
+
Injectable9({ providedIn: "root" })
|
|
2224
2348
|
];
|
|
2225
2349
|
var _init = __decoratorStart(undefined);
|
|
2226
2350
|
|
|
2227
2351
|
class VoiceTraceTimelineService {
|
|
2228
2352
|
connect(path = "/api/voice-traces", options = {}) {
|
|
2229
2353
|
const store = createVoiceTraceTimelineStore(path, options);
|
|
2230
|
-
const errorSignal =
|
|
2231
|
-
const isLoadingSignal =
|
|
2232
|
-
const reportSignal =
|
|
2233
|
-
const updatedAtSignal =
|
|
2354
|
+
const errorSignal = signal9(null);
|
|
2355
|
+
const isLoadingSignal = signal9(false);
|
|
2356
|
+
const reportSignal = signal9(null);
|
|
2357
|
+
const updatedAtSignal = signal9(undefined);
|
|
2234
2358
|
const sync = () => {
|
|
2235
2359
|
const snapshot = store.getSnapshot();
|
|
2236
2360
|
errorSignal.set(snapshot.error);
|
|
@@ -2246,11 +2370,11 @@ class VoiceTraceTimelineService {
|
|
|
2246
2370
|
unsubscribe();
|
|
2247
2371
|
store.close();
|
|
2248
2372
|
},
|
|
2249
|
-
error:
|
|
2250
|
-
isLoading:
|
|
2373
|
+
error: computed8(() => errorSignal()),
|
|
2374
|
+
isLoading: computed8(() => isLoadingSignal()),
|
|
2251
2375
|
refresh: store.refresh,
|
|
2252
|
-
report:
|
|
2253
|
-
updatedAt:
|
|
2376
|
+
report: computed8(() => reportSignal()),
|
|
2377
|
+
updatedAt: computed8(() => updatedAtSignal())
|
|
2254
2378
|
};
|
|
2255
2379
|
}
|
|
2256
2380
|
}
|
|
@@ -2259,7 +2383,7 @@ __runInitializers(_init, 1, VoiceTraceTimelineService);
|
|
|
2259
2383
|
__decoratorMetadata(_init, VoiceTraceTimelineService);
|
|
2260
2384
|
let _VoiceTraceTimelineService = VoiceTraceTimelineService;
|
|
2261
2385
|
// src/angular/voice-turn-latency.service.ts
|
|
2262
|
-
import { computed as
|
|
2386
|
+
import { computed as computed9, Injectable as Injectable10, signal as signal10 } from "@angular/core";
|
|
2263
2387
|
|
|
2264
2388
|
// src/client/turnLatency.ts
|
|
2265
2389
|
var fetchVoiceTurnLatency = async (path = "/api/turn-latency", options = {}) => {
|
|
@@ -2366,17 +2490,17 @@ var createVoiceTurnLatencyStore = (path = "/api/turn-latency", options = {}) =>
|
|
|
2366
2490
|
|
|
2367
2491
|
// src/angular/voice-turn-latency.service.ts
|
|
2368
2492
|
var _dec = [
|
|
2369
|
-
|
|
2493
|
+
Injectable10({ providedIn: "root" })
|
|
2370
2494
|
];
|
|
2371
2495
|
var _init = __decoratorStart(undefined);
|
|
2372
2496
|
|
|
2373
2497
|
class VoiceTurnLatencyService {
|
|
2374
2498
|
connect(path = "/api/turn-latency", options = {}) {
|
|
2375
2499
|
const store = createVoiceTurnLatencyStore(path, options);
|
|
2376
|
-
const errorSignal =
|
|
2377
|
-
const isLoadingSignal =
|
|
2378
|
-
const reportSignal =
|
|
2379
|
-
const updatedAtSignal =
|
|
2500
|
+
const errorSignal = signal10(null);
|
|
2501
|
+
const isLoadingSignal = signal10(false);
|
|
2502
|
+
const reportSignal = signal10(undefined);
|
|
2503
|
+
const updatedAtSignal = signal10(undefined);
|
|
2380
2504
|
const sync = () => {
|
|
2381
2505
|
const snapshot = store.getSnapshot();
|
|
2382
2506
|
errorSignal.set(snapshot.error);
|
|
@@ -2392,12 +2516,12 @@ class VoiceTurnLatencyService {
|
|
|
2392
2516
|
unsubscribe();
|
|
2393
2517
|
store.close();
|
|
2394
2518
|
},
|
|
2395
|
-
error:
|
|
2396
|
-
isLoading:
|
|
2519
|
+
error: computed9(() => errorSignal()),
|
|
2520
|
+
isLoading: computed9(() => isLoadingSignal()),
|
|
2397
2521
|
refresh: store.refresh,
|
|
2398
|
-
report:
|
|
2522
|
+
report: computed9(() => reportSignal()),
|
|
2399
2523
|
runProof: store.runProof,
|
|
2400
|
-
updatedAt:
|
|
2524
|
+
updatedAt: computed9(() => updatedAtSignal())
|
|
2401
2525
|
};
|
|
2402
2526
|
}
|
|
2403
2527
|
}
|
|
@@ -2406,7 +2530,7 @@ __runInitializers(_init, 1, VoiceTurnLatencyService);
|
|
|
2406
2530
|
__decoratorMetadata(_init, VoiceTurnLatencyService);
|
|
2407
2531
|
let _VoiceTurnLatencyService = VoiceTurnLatencyService;
|
|
2408
2532
|
// src/angular/voice-turn-quality.service.ts
|
|
2409
|
-
import { computed as
|
|
2533
|
+
import { computed as computed10, Injectable as Injectable11, signal as signal11 } from "@angular/core";
|
|
2410
2534
|
|
|
2411
2535
|
// src/client/turnQuality.ts
|
|
2412
2536
|
var fetchVoiceTurnQuality = async (path = "/api/turn-quality", options = {}) => {
|
|
@@ -2489,17 +2613,17 @@ var createVoiceTurnQualityStore = (path = "/api/turn-quality", options = {}) =>
|
|
|
2489
2613
|
|
|
2490
2614
|
// src/angular/voice-turn-quality.service.ts
|
|
2491
2615
|
var _dec = [
|
|
2492
|
-
|
|
2616
|
+
Injectable11({ providedIn: "root" })
|
|
2493
2617
|
];
|
|
2494
2618
|
var _init = __decoratorStart(undefined);
|
|
2495
2619
|
|
|
2496
2620
|
class VoiceTurnQualityService {
|
|
2497
2621
|
connect(path = "/api/turn-quality", options = {}) {
|
|
2498
2622
|
const store = createVoiceTurnQualityStore(path, options);
|
|
2499
|
-
const errorSignal =
|
|
2500
|
-
const isLoadingSignal =
|
|
2501
|
-
const reportSignal =
|
|
2502
|
-
const updatedAtSignal =
|
|
2623
|
+
const errorSignal = signal11(null);
|
|
2624
|
+
const isLoadingSignal = signal11(false);
|
|
2625
|
+
const reportSignal = signal11(undefined);
|
|
2626
|
+
const updatedAtSignal = signal11(undefined);
|
|
2503
2627
|
const sync = () => {
|
|
2504
2628
|
const snapshot = store.getSnapshot();
|
|
2505
2629
|
errorSignal.set(snapshot.error);
|
|
@@ -2515,11 +2639,11 @@ class VoiceTurnQualityService {
|
|
|
2515
2639
|
unsubscribe();
|
|
2516
2640
|
store.close();
|
|
2517
2641
|
},
|
|
2518
|
-
error:
|
|
2519
|
-
isLoading:
|
|
2642
|
+
error: computed10(() => errorSignal()),
|
|
2643
|
+
isLoading: computed10(() => isLoadingSignal()),
|
|
2520
2644
|
refresh: store.refresh,
|
|
2521
|
-
report:
|
|
2522
|
-
updatedAt:
|
|
2645
|
+
report: computed10(() => reportSignal()),
|
|
2646
|
+
updatedAt: computed10(() => updatedAtSignal())
|
|
2523
2647
|
};
|
|
2524
2648
|
}
|
|
2525
2649
|
}
|
|
@@ -2528,7 +2652,7 @@ __runInitializers(_init, 1, VoiceTurnQualityService);
|
|
|
2528
2652
|
__decoratorMetadata(_init, VoiceTurnQualityService);
|
|
2529
2653
|
let _VoiceTurnQualityService = VoiceTurnQualityService;
|
|
2530
2654
|
// src/angular/voice-workflow-status.service.ts
|
|
2531
|
-
import { computed as
|
|
2655
|
+
import { computed as computed11, Injectable as Injectable12, signal as signal12 } from "@angular/core";
|
|
2532
2656
|
|
|
2533
2657
|
// src/client/workflowStatus.ts
|
|
2534
2658
|
var fetchVoiceWorkflowStatus = async (path = "/evals/scenarios/json", options = {}) => {
|
|
@@ -2611,17 +2735,17 @@ var createVoiceWorkflowStatusStore = (path = "/evals/scenarios/json", options =
|
|
|
2611
2735
|
|
|
2612
2736
|
// src/angular/voice-workflow-status.service.ts
|
|
2613
2737
|
var _dec = [
|
|
2614
|
-
|
|
2738
|
+
Injectable12({ providedIn: "root" })
|
|
2615
2739
|
];
|
|
2616
2740
|
var _init = __decoratorStart(undefined);
|
|
2617
2741
|
|
|
2618
2742
|
class VoiceWorkflowStatusService {
|
|
2619
2743
|
connect(path = "/evals/scenarios/json", options = {}) {
|
|
2620
2744
|
const store = createVoiceWorkflowStatusStore(path, options);
|
|
2621
|
-
const errorSignal =
|
|
2622
|
-
const isLoadingSignal =
|
|
2623
|
-
const reportSignal =
|
|
2624
|
-
const updatedAtSignal =
|
|
2745
|
+
const errorSignal = signal12(null);
|
|
2746
|
+
const isLoadingSignal = signal12(false);
|
|
2747
|
+
const reportSignal = signal12(undefined);
|
|
2748
|
+
const updatedAtSignal = signal12(undefined);
|
|
2625
2749
|
const sync = () => {
|
|
2626
2750
|
const snapshot = store.getSnapshot();
|
|
2627
2751
|
errorSignal.set(snapshot.error);
|
|
@@ -2639,11 +2763,11 @@ class VoiceWorkflowStatusService {
|
|
|
2639
2763
|
unsubscribe();
|
|
2640
2764
|
store.close();
|
|
2641
2765
|
},
|
|
2642
|
-
error:
|
|
2643
|
-
isLoading:
|
|
2766
|
+
error: computed11(() => errorSignal()),
|
|
2767
|
+
isLoading: computed11(() => isLoadingSignal()),
|
|
2644
2768
|
refresh: store.refresh,
|
|
2645
|
-
report:
|
|
2646
|
-
updatedAt:
|
|
2769
|
+
report: computed11(() => reportSignal()),
|
|
2770
|
+
updatedAt: computed11(() => updatedAtSignal())
|
|
2647
2771
|
};
|
|
2648
2772
|
}
|
|
2649
2773
|
}
|
|
@@ -2651,6 +2775,235 @@ VoiceWorkflowStatusService = __decorateElement(_init, 0, "VoiceWorkflowStatusSer
|
|
|
2651
2775
|
__runInitializers(_init, 1, VoiceWorkflowStatusService);
|
|
2652
2776
|
__decoratorMetadata(_init, VoiceWorkflowStatusService);
|
|
2653
2777
|
let _VoiceWorkflowStatusService = VoiceWorkflowStatusService;
|
|
2778
|
+
// src/angular/voice-delivery-runtime.component.ts
|
|
2779
|
+
import { Component, Input, signal as signal13 } from "@angular/core";
|
|
2780
|
+
|
|
2781
|
+
// src/client/deliveryRuntimeWidget.ts
|
|
2782
|
+
var DEFAULT_TITLE = "Voice Delivery Runtime";
|
|
2783
|
+
var DEFAULT_DESCRIPTION = "Audit and trace delivery worker health from your AbsoluteJS voice app.";
|
|
2784
|
+
var escapeHtml = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
2785
|
+
var createSurface = (id, summary) => {
|
|
2786
|
+
if (!summary) {
|
|
2787
|
+
return {
|
|
2788
|
+
deadLettered: 0,
|
|
2789
|
+
detail: "Worker disabled",
|
|
2790
|
+
failed: 0,
|
|
2791
|
+
id,
|
|
2792
|
+
label: id === "audit" ? "Audit delivery" : "Trace delivery",
|
|
2793
|
+
pending: 0,
|
|
2794
|
+
status: "disabled",
|
|
2795
|
+
total: 0
|
|
2796
|
+
};
|
|
2797
|
+
}
|
|
2798
|
+
const blocked = summary.failed + summary.deadLettered;
|
|
2799
|
+
return {
|
|
2800
|
+
deadLettered: summary.deadLettered,
|
|
2801
|
+
detail: `${summary.delivered}/${summary.total} delivered, ${summary.pending} pending`,
|
|
2802
|
+
failed: summary.failed,
|
|
2803
|
+
id,
|
|
2804
|
+
label: id === "audit" ? "Audit delivery" : "Trace delivery",
|
|
2805
|
+
pending: summary.pending,
|
|
2806
|
+
status: blocked > 0 ? "warn" : "pass",
|
|
2807
|
+
total: summary.total
|
|
2808
|
+
};
|
|
2809
|
+
};
|
|
2810
|
+
var createVoiceDeliveryRuntimeViewModel = (snapshot, options = {}) => {
|
|
2811
|
+
const report = snapshot.report;
|
|
2812
|
+
const surfaces = [
|
|
2813
|
+
createSurface("audit", report?.summary.audit),
|
|
2814
|
+
createSurface("trace", report?.summary.trace)
|
|
2815
|
+
];
|
|
2816
|
+
const hasWarnings = surfaces.some((surface) => surface.status === "warn");
|
|
2817
|
+
return {
|
|
2818
|
+
description: options.description ?? DEFAULT_DESCRIPTION,
|
|
2819
|
+
error: snapshot.error,
|
|
2820
|
+
isLoading: snapshot.isLoading,
|
|
2821
|
+
isRunning: Boolean(report?.isRunning),
|
|
2822
|
+
label: snapshot.error ? "Unavailable" : report ? report.isRunning ? "Running" : "Stopped" : "Checking",
|
|
2823
|
+
status: snapshot.error ? "error" : report ? hasWarnings ? "warn" : "pass" : "loading",
|
|
2824
|
+
surfaces,
|
|
2825
|
+
title: options.title ?? DEFAULT_TITLE,
|
|
2826
|
+
updatedAt: snapshot.updatedAt
|
|
2827
|
+
};
|
|
2828
|
+
};
|
|
2829
|
+
var renderVoiceDeliveryRuntimeHTML = (snapshot, options = {}) => {
|
|
2830
|
+
const model = createVoiceDeliveryRuntimeViewModel(snapshot, options);
|
|
2831
|
+
const surfaces = model.surfaces.map((surface) => `<li class="absolute-voice-delivery-runtime__surface absolute-voice-delivery-runtime__surface--${escapeHtml(surface.status)}">
|
|
2832
|
+
<span>${escapeHtml(surface.label)}</span>
|
|
2833
|
+
<strong>${escapeHtml(surface.detail)}</strong>
|
|
2834
|
+
<small>${String(surface.failed)} failed · ${String(surface.deadLettered)} dead-lettered</small>
|
|
2835
|
+
</li>`).join("");
|
|
2836
|
+
return `<section class="absolute-voice-delivery-runtime absolute-voice-delivery-runtime--${escapeHtml(model.status)}">
|
|
2837
|
+
<header class="absolute-voice-delivery-runtime__header">
|
|
2838
|
+
<span class="absolute-voice-delivery-runtime__eyebrow">${escapeHtml(model.title)}</span>
|
|
2839
|
+
<strong class="absolute-voice-delivery-runtime__label">${escapeHtml(model.label)}</strong>
|
|
2840
|
+
</header>
|
|
2841
|
+
<p class="absolute-voice-delivery-runtime__description">${escapeHtml(model.description)}</p>
|
|
2842
|
+
<ul class="absolute-voice-delivery-runtime__surfaces">${surfaces}</ul>
|
|
2843
|
+
${model.error ? `<p class="absolute-voice-delivery-runtime__error">${escapeHtml(model.error)}</p>` : ""}
|
|
2844
|
+
</section>`;
|
|
2845
|
+
};
|
|
2846
|
+
var getVoiceDeliveryRuntimeCSS = () => `.absolute-voice-delivery-runtime{border:1px solid #c9d8cf;border-radius:20px;background:#f6fff9;color:#0d1b12;padding:18px;box-shadow:0 18px 40px rgba(19,55,35,.12);font-family:inherit}.absolute-voice-delivery-runtime--warn,.absolute-voice-delivery-runtime--error{border-color:#f2b56b;background:#fff9ed}.absolute-voice-delivery-runtime__header{align-items:start;display:flex;gap:12px;justify-content:space-between}.absolute-voice-delivery-runtime__eyebrow{color:#4e6b59;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.absolute-voice-delivery-runtime__label{font-size:28px;line-height:1}.absolute-voice-delivery-runtime__description{color:#33483b;margin:12px 0 0}.absolute-voice-delivery-runtime__surfaces{display:grid;gap:8px;list-style:none;margin:16px 0 0;padding:0}.absolute-voice-delivery-runtime__surface{background:#fff;border:1px solid #d9eadf;border-radius:14px;display:grid;gap:4px;padding:10px 12px}.absolute-voice-delivery-runtime__surface--warn{border-color:#f2b56b}.absolute-voice-delivery-runtime__surface--disabled{opacity:.72}.absolute-voice-delivery-runtime__surface span,.absolute-voice-delivery-runtime__surface small{color:#587063}.absolute-voice-delivery-runtime__error{color:#9f1239;font-weight:700}`;
|
|
2847
|
+
var mountVoiceDeliveryRuntime = (element, path = "/api/voice-delivery-runtime", options = {}) => {
|
|
2848
|
+
const store = createVoiceDeliveryRuntimeStore(path, options);
|
|
2849
|
+
const render = () => {
|
|
2850
|
+
element.innerHTML = renderVoiceDeliveryRuntimeHTML(store.getSnapshot(), options);
|
|
2851
|
+
};
|
|
2852
|
+
const unsubscribe = store.subscribe(render);
|
|
2853
|
+
render();
|
|
2854
|
+
store.refresh().catch(() => {});
|
|
2855
|
+
return {
|
|
2856
|
+
close: () => {
|
|
2857
|
+
unsubscribe();
|
|
2858
|
+
store.close();
|
|
2859
|
+
},
|
|
2860
|
+
refresh: store.refresh
|
|
2861
|
+
};
|
|
2862
|
+
};
|
|
2863
|
+
var defineVoiceDeliveryRuntimeElement = (tagName = "absolute-voice-delivery-runtime") => {
|
|
2864
|
+
if (typeof window === "undefined" || typeof customElements === "undefined" || customElements.get(tagName)) {
|
|
2865
|
+
return;
|
|
2866
|
+
}
|
|
2867
|
+
customElements.define(tagName, class AbsoluteVoiceDeliveryRuntimeElement extends HTMLElement {
|
|
2868
|
+
mounted;
|
|
2869
|
+
connectedCallback() {
|
|
2870
|
+
const intervalMs = Number(this.getAttribute("interval-ms") ?? 5000);
|
|
2871
|
+
this.mounted = mountVoiceDeliveryRuntime(this, this.getAttribute("path") ?? "/api/voice-delivery-runtime", {
|
|
2872
|
+
description: this.getAttribute("description") ?? undefined,
|
|
2873
|
+
intervalMs: Number.isFinite(intervalMs) ? intervalMs : 5000,
|
|
2874
|
+
title: this.getAttribute("title") ?? undefined
|
|
2875
|
+
});
|
|
2876
|
+
}
|
|
2877
|
+
disconnectedCallback() {
|
|
2878
|
+
this.mounted?.close();
|
|
2879
|
+
this.mounted = undefined;
|
|
2880
|
+
}
|
|
2881
|
+
});
|
|
2882
|
+
};
|
|
2883
|
+
|
|
2884
|
+
// src/angular/voice-delivery-runtime.component.ts
|
|
2885
|
+
var _dec = [
|
|
2886
|
+
Component({
|
|
2887
|
+
selector: "absolute-voice-delivery-runtime",
|
|
2888
|
+
standalone: true,
|
|
2889
|
+
template: `
|
|
2890
|
+
<section
|
|
2891
|
+
class="absolute-voice-delivery-runtime"
|
|
2892
|
+
[class.absolute-voice-delivery-runtime--pass]="model().status === 'pass'"
|
|
2893
|
+
[class.absolute-voice-delivery-runtime--warn]="model().status === 'warn'"
|
|
2894
|
+
[class.absolute-voice-delivery-runtime--loading]="
|
|
2895
|
+
model().status === 'loading'
|
|
2896
|
+
"
|
|
2897
|
+
[class.absolute-voice-delivery-runtime--error]="
|
|
2898
|
+
model().status === 'error'
|
|
2899
|
+
"
|
|
2900
|
+
>
|
|
2901
|
+
<header class="absolute-voice-delivery-runtime__header">
|
|
2902
|
+
<span class="absolute-voice-delivery-runtime__eyebrow">{{
|
|
2903
|
+
model().title
|
|
2904
|
+
}}</span>
|
|
2905
|
+
<strong class="absolute-voice-delivery-runtime__label">{{
|
|
2906
|
+
model().label
|
|
2907
|
+
}}</strong>
|
|
2908
|
+
</header>
|
|
2909
|
+
<p class="absolute-voice-delivery-runtime__description">
|
|
2910
|
+
{{ model().description }}
|
|
2911
|
+
</p>
|
|
2912
|
+
<ul class="absolute-voice-delivery-runtime__surfaces">
|
|
2913
|
+
@for (surface of model().surfaces; track surface.id) {
|
|
2914
|
+
<li
|
|
2915
|
+
class="absolute-voice-delivery-runtime__surface"
|
|
2916
|
+
[class.absolute-voice-delivery-runtime__surface--pass]="
|
|
2917
|
+
surface.status === 'pass'
|
|
2918
|
+
"
|
|
2919
|
+
[class.absolute-voice-delivery-runtime__surface--warn]="
|
|
2920
|
+
surface.status === 'warn'
|
|
2921
|
+
"
|
|
2922
|
+
[class.absolute-voice-delivery-runtime__surface--disabled]="
|
|
2923
|
+
surface.status === 'disabled'
|
|
2924
|
+
"
|
|
2925
|
+
>
|
|
2926
|
+
<span>{{ surface.label }}</span>
|
|
2927
|
+
<strong>{{ surface.detail }}</strong>
|
|
2928
|
+
<small
|
|
2929
|
+
>{{ surface.failed }} failed /
|
|
2930
|
+
{{ surface.deadLettered }} dead-lettered</small
|
|
2931
|
+
>
|
|
2932
|
+
</li>
|
|
2933
|
+
}
|
|
2934
|
+
</ul>
|
|
2935
|
+
@if (model().error) {
|
|
2936
|
+
<p class="absolute-voice-delivery-runtime__error">
|
|
2937
|
+
{{ model().error }}
|
|
2938
|
+
</p>
|
|
2939
|
+
}
|
|
2940
|
+
</section>
|
|
2941
|
+
`
|
|
2942
|
+
})
|
|
2943
|
+
];
|
|
2944
|
+
var _dec2 = [
|
|
2945
|
+
Input()
|
|
2946
|
+
];
|
|
2947
|
+
var _dec3 = [
|
|
2948
|
+
Input()
|
|
2949
|
+
];
|
|
2950
|
+
var _dec4 = [
|
|
2951
|
+
Input()
|
|
2952
|
+
];
|
|
2953
|
+
var _dec5 = [
|
|
2954
|
+
Input()
|
|
2955
|
+
];
|
|
2956
|
+
var _init = __decoratorStart(undefined);
|
|
2957
|
+
|
|
2958
|
+
class VoiceDeliveryRuntimeComponent {
|
|
2959
|
+
constructor() {
|
|
2960
|
+
this.description = __runInitializers(_init, 8, this);
|
|
2961
|
+
__runInitializers(_init, 11, this);
|
|
2962
|
+
this.intervalMs = __runInitializers(_init, 12, this);
|
|
2963
|
+
__runInitializers(_init, 15, this);
|
|
2964
|
+
this.path = __runInitializers(_init, 16, this, "/api/voice-delivery-runtime");
|
|
2965
|
+
__runInitializers(_init, 19, this);
|
|
2966
|
+
this.title = __runInitializers(_init, 20, this);
|
|
2967
|
+
__runInitializers(_init, 23, this);
|
|
2968
|
+
}
|
|
2969
|
+
cleanup = () => {};
|
|
2970
|
+
store;
|
|
2971
|
+
model = signal13(createVoiceDeliveryRuntimeViewModel({
|
|
2972
|
+
error: null,
|
|
2973
|
+
isLoading: true
|
|
2974
|
+
}));
|
|
2975
|
+
ngOnInit() {
|
|
2976
|
+
const options = this.options();
|
|
2977
|
+
this.store = createVoiceDeliveryRuntimeStore(this.path, options);
|
|
2978
|
+
const sync = () => {
|
|
2979
|
+
this.model.set(createVoiceDeliveryRuntimeViewModel(this.store.getSnapshot(), options));
|
|
2980
|
+
};
|
|
2981
|
+
this.cleanup = this.store.subscribe(sync);
|
|
2982
|
+
sync();
|
|
2983
|
+
if (typeof window !== "undefined") {
|
|
2984
|
+
this.store.refresh().catch(() => {});
|
|
2985
|
+
}
|
|
2986
|
+
}
|
|
2987
|
+
ngOnDestroy() {
|
|
2988
|
+
this.cleanup();
|
|
2989
|
+
this.store?.close();
|
|
2990
|
+
}
|
|
2991
|
+
options() {
|
|
2992
|
+
return {
|
|
2993
|
+
description: this.description,
|
|
2994
|
+
intervalMs: this.intervalMs,
|
|
2995
|
+
title: this.title
|
|
2996
|
+
};
|
|
2997
|
+
}
|
|
2998
|
+
}
|
|
2999
|
+
__decorateElement(_init, 5, "description", _dec2, VoiceDeliveryRuntimeComponent);
|
|
3000
|
+
__decorateElement(_init, 5, "intervalMs", _dec3, VoiceDeliveryRuntimeComponent);
|
|
3001
|
+
__decorateElement(_init, 5, "path", _dec4, VoiceDeliveryRuntimeComponent);
|
|
3002
|
+
__decorateElement(_init, 5, "title", _dec5, VoiceDeliveryRuntimeComponent);
|
|
3003
|
+
VoiceDeliveryRuntimeComponent = __decorateElement(_init, 0, "VoiceDeliveryRuntimeComponent", _dec, VoiceDeliveryRuntimeComponent);
|
|
3004
|
+
__runInitializers(_init, 1, VoiceDeliveryRuntimeComponent);
|
|
3005
|
+
__decoratorMetadata(_init, VoiceDeliveryRuntimeComponent);
|
|
3006
|
+
let _VoiceDeliveryRuntimeComponent = VoiceDeliveryRuntimeComponent;
|
|
2654
3007
|
export {
|
|
2655
3008
|
VoiceWorkflowStatusService,
|
|
2656
3009
|
VoiceTurnQualityService,
|
|
@@ -2661,6 +3014,8 @@ export {
|
|
|
2661
3014
|
VoiceProviderStatusService,
|
|
2662
3015
|
VoiceProviderCapabilitiesService,
|
|
2663
3016
|
VoiceOpsStatusService,
|
|
3017
|
+
VoiceDeliveryRuntimeService,
|
|
3018
|
+
VoiceDeliveryRuntimeComponent,
|
|
2664
3019
|
VoiceControllerService,
|
|
2665
3020
|
VoiceCampaignDialerProofService
|
|
2666
3021
|
};
|