@fonoster/apiserver 0.27.0 → 0.31.0

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.
Files changed (376) hide show
  1. package/dist/applications/buildService.d.ts +5 -1
  2. package/dist/applications/buildService.js +10 -7
  3. package/dist/applications/createCreateApplication.d.ts +6 -2
  4. package/dist/applications/createCreateApplication.js +24 -16
  5. package/dist/applications/createCreateTestToken.d.ts +3 -1
  6. package/dist/applications/createCreateTestToken.js +18 -13
  7. package/dist/applications/createGetApplication.js +2 -2
  8. package/dist/applications/createGetFnUtil.d.ts +22 -18
  9. package/dist/applications/createGetFnUtil.js +3 -5
  10. package/dist/applications/createListApplications.js +3 -4
  11. package/dist/applications/createRotateSigningSecret.d.ts +9 -0
  12. package/dist/{calls/createFetchSingleCall.js → applications/createRotateSigningSecret.js} +23 -20
  13. package/dist/applications/createUpdateApplication.d.ts +6 -2
  14. package/dist/applications/createUpdateApplication.js +35 -36
  15. package/dist/applications/evalKeys.d.ts +9 -0
  16. package/dist/{voice/handlers/dial/recordChannel.js → applications/evalKeys.js} +17 -12
  17. package/dist/applications/session/appModel.d.ts +225 -0
  18. package/dist/applications/session/appModel.js +331 -0
  19. package/dist/applications/types.d.ts +1 -27
  20. package/dist/billing/buildService.d.ts +24 -0
  21. package/dist/billing/buildService.js +116 -0
  22. package/dist/bin/entrypoint.d.ts +1 -0
  23. package/dist/bin/entrypoint.js +180 -0
  24. package/dist/bin/healthcheck.d.ts +2 -0
  25. package/dist/{voice/utils/VoiceServiceClientConstructor.js → bin/healthcheck.js} +24 -9
  26. package/dist/bin/regionHubSetup.d.ts +2 -0
  27. package/dist/bin/regionHubSetup.js +67 -0
  28. package/dist/bin/usage.d.ts +2 -0
  29. package/dist/bin/usage.js +119 -0
  30. package/dist/calls/buildService.d.ts +1 -20
  31. package/dist/calls/buildService.js +59 -6
  32. package/dist/calls/createCall.d.ts +17 -2
  33. package/dist/calls/createCall.js +64 -11
  34. package/dist/calls/createCallPublisher.d.ts +40 -2
  35. package/dist/calls/createCallPublisher.js +43 -9
  36. package/dist/calls/createIsWorkspaceNumber.d.ts +41 -0
  37. package/dist/calls/createIsWorkspaceNumber.js +39 -0
  38. package/dist/calls/createTrackCall.d.ts +55 -2
  39. package/dist/calls/createTrackCall.js +230 -16
  40. package/dist/calls/getCall.d.ts +4 -2
  41. package/dist/calls/getCall.js +2 -3
  42. package/dist/calls/listCalls.d.ts +4 -2
  43. package/dist/calls/listCalls.js +2 -3
  44. package/dist/calls/types.d.ts +11 -2
  45. package/dist/calls/types.js +10 -0
  46. package/dist/{core/buildWelcomeDemoService.d.ts → capabilities/buildService.d.ts} +8 -8
  47. package/dist/capabilities/buildService.js +17 -0
  48. package/dist/capabilities/createGetCapabilities.d.ts +78 -0
  49. package/dist/capabilities/createGetCapabilities.js +98 -0
  50. package/dist/{voice/handlers/utils → capabilities}/index.d.ts +2 -3
  51. package/dist/{voice/handlers/utils → capabilities}/index.js +4 -3
  52. package/dist/config/index.d.ts +23 -0
  53. package/dist/config/index.js +102 -0
  54. package/dist/config/schema.d.ts +1919 -0
  55. package/dist/config/schema.js +357 -0
  56. package/dist/core/allowList.js +2 -1
  57. package/dist/core/applyCatalog.d.ts +10 -0
  58. package/dist/{voice/client/GrpcClientHandler.js → core/applyCatalog.js} +45 -51
  59. package/dist/core/db.d.ts +3 -1
  60. package/dist/core/db.js +2 -1
  61. package/dist/core/durableConsumer.d.ts +41 -0
  62. package/dist/core/durableConsumer.js +104 -0
  63. package/dist/core/httpBridge.d.ts +24 -6
  64. package/dist/core/httpBridge.js +3 -25
  65. package/dist/core/identityConfig.d.ts +2 -35
  66. package/dist/core/identityConfig.js +3 -36
  67. package/dist/core/regionHooks.d.ts +15 -0
  68. package/dist/{calls/influxdb.js → core/regionHooks.js} +4 -8
  69. package/dist/core/runServices.js +98 -15
  70. package/dist/core/services.d.ts +96 -6
  71. package/dist/core/services.js +49 -10
  72. package/dist/{voice/errors/index.d.ts → core/telemetry.d.ts} +2 -2
  73. package/dist/core/telemetry.js +42 -0
  74. package/dist/{applications/utils/convertToApplicationData.d.ts → core/telemetryInterceptor.d.ts} +10 -4
  75. package/dist/core/telemetryInterceptor.js +57 -0
  76. package/dist/core/testTokenConfig.js +4 -1
  77. package/dist/core/upsertRoomrPeer.d.ts +6 -0
  78. package/dist/core/{upsertDefaultPeer.js → upsertRoomrPeer.js} +31 -30
  79. package/dist/envs.d.ts +136 -23
  80. package/dist/envs.js +108 -143
  81. package/dist/index.js +39 -21
  82. package/dist/outbound/createNodeDirectory.d.ts +86 -0
  83. package/dist/outbound/createNodeDirectory.js +140 -0
  84. package/dist/{voice/integrations → outbound}/index.d.ts +4 -1
  85. package/dist/{voice/errors → outbound}/index.js +4 -2
  86. package/dist/outbound/placeOutboundCall.d.ts +96 -0
  87. package/dist/outbound/placeOutboundCall.js +172 -0
  88. package/dist/outbound/placementSweep.d.ts +56 -0
  89. package/dist/outbound/placementSweep.js +127 -0
  90. package/dist/outbound/runOutboundCalls.d.ts +52 -0
  91. package/dist/outbound/runOutboundCalls.js +171 -0
  92. package/dist/providers/createProvidersHandlers.d.ts +39 -0
  93. package/dist/providers/createProvidersHandlers.js +229 -0
  94. package/dist/providers/index.d.ts +47 -0
  95. package/dist/{voice/client → providers}/index.js +15 -6
  96. package/dist/providers/registryUsage.d.ts +48 -0
  97. package/dist/providers/registryUsage.js +236 -0
  98. package/dist/records/createIndexRecord.d.ts +42 -0
  99. package/dist/records/createIndexRecord.js +185 -0
  100. package/dist/records/createRecordsRouter.d.ts +61 -0
  101. package/dist/records/createRecordsRouter.js +330 -0
  102. package/dist/records/createSearchRecords.d.ts +51 -0
  103. package/dist/records/createSearchRecords.js +134 -0
  104. package/dist/{voice/filters → records}/index.d.ts +6 -6
  105. package/dist/{voice/filters → records}/index.js +6 -6
  106. package/dist/records/maintenance.d.ts +33 -0
  107. package/dist/records/maintenance.js +166 -0
  108. package/dist/records/runCallRecords.d.ts +48 -0
  109. package/dist/records/runCallRecords.js +49 -0
  110. package/dist/{events/createPerCallCache.d.ts → records/stores.d.ts} +4 -7
  111. package/dist/{voice/handlers/utils/isDtmf.js → records/stores.js} +9 -3
  112. package/dist/records/types.d.ts +104 -0
  113. package/dist/regions/configSync.d.ts +130 -0
  114. package/dist/regions/configSync.js +316 -0
  115. package/dist/regions/createRegionsRouter.d.ts +151 -0
  116. package/dist/regions/createRegionsRouter.js +391 -0
  117. package/dist/regions/endpoints.d.ts +41 -0
  118. package/dist/regions/endpoints.js +90 -0
  119. package/dist/regions/enrollmentToken.d.ts +41 -0
  120. package/dist/regions/enrollmentToken.js +94 -0
  121. package/dist/regions/httpAuth.d.ts +39 -0
  122. package/dist/regions/httpAuth.js +78 -0
  123. package/dist/regions/ids.d.ts +15 -0
  124. package/dist/regions/ids.js +81 -0
  125. package/dist/{voice/client → regions}/index.d.ts +17 -6
  126. package/dist/regions/index.js +51 -0
  127. package/dist/regions/link.d.ts +17 -0
  128. package/dist/regions/link.js +170 -0
  129. package/dist/regions/natsAuth.d.ts +41 -0
  130. package/dist/regions/natsAuth.js +64 -0
  131. package/dist/regions/natsJwt.d.ts +23 -0
  132. package/dist/regions/natsJwt.js +26 -0
  133. package/dist/regions/relay.d.ts +45 -0
  134. package/dist/regions/relay.js +203 -0
  135. package/dist/regions/relayHttp.d.ts +7 -0
  136. package/dist/regions/relayHttp.js +107 -0
  137. package/dist/regions/relaySlots.d.ts +18 -0
  138. package/dist/regions/relaySlots.js +118 -0
  139. package/dist/regions/runRegions.d.ts +111 -0
  140. package/dist/regions/runRegions.js +235 -0
  141. package/dist/regions/service.d.ts +129 -0
  142. package/dist/regions/service.js +558 -0
  143. package/dist/regions/sources.d.ts +20 -0
  144. package/dist/regions/sources.js +191 -0
  145. package/dist/regions/status.d.ts +35 -0
  146. package/dist/regions/status.js +63 -0
  147. package/dist/regions/types.d.ts +123 -0
  148. package/dist/regions/types.js +41 -0
  149. package/dist/{voice/integrations/getSttConfig.d.ts → regions/withConfigChangeHook.d.ts} +13 -7
  150. package/dist/regions/withConfigChangeHook.js +44 -0
  151. package/dist/secrets/createGetFnUtil.d.ts +2 -2
  152. package/dist/session/createSessionRouter.d.ts +49 -0
  153. package/dist/session/createSessionRouter.js +206 -0
  154. package/dist/{voice/handlers/dial → session}/index.d.ts +1 -1
  155. package/dist/{voice/handlers/dial → session}/index.js +1 -1
  156. package/dist/usage/buildService.d.ts +16 -0
  157. package/dist/{voice/integrations/getTtsConfig.js → usage/buildService.js} +13 -7
  158. package/dist/{voice/tts/utils/convertUlawToPCM16.d.ts → usage/createGetUsage.d.ts} +7 -6
  159. package/dist/usage/createGetUsage.js +118 -0
  160. package/dist/usage/ingestUsage.d.ts +7 -0
  161. package/dist/usage/ingestUsage.js +87 -0
  162. package/dist/usage/publishRecordedUsage.d.ts +52 -0
  163. package/dist/usage/publishRecordedUsage.js +103 -0
  164. package/dist/{utils/createHandleDialEventsWithNats.d.ts → usage/publishUsage.d.ts} +10 -4
  165. package/dist/usage/publishUsage.js +50 -0
  166. package/dist/usage/rebuildUsage.d.ts +48 -0
  167. package/dist/usage/rebuildUsage.js +104 -0
  168. package/dist/usage/runUsageConsumer.d.ts +22 -0
  169. package/dist/usage/runUsageConsumer.js +78 -0
  170. package/dist/usage/snapshotStorage.d.ts +14 -0
  171. package/dist/usage/snapshotStorage.js +95 -0
  172. package/dist/{voice/integrations/getTtsConfig.d.ts → usage/types.d.ts} +17 -6
  173. package/dist/utils/createCheckNumberPreconditions.js +4 -0
  174. package/dist/utils/index.d.ts +0 -2
  175. package/dist/utils/index.js +0 -2
  176. package/dist/voice/stt/Deepgram.d.ts +4 -57
  177. package/dist/voice/stt/Deepgram.js +15 -286
  178. package/dist/voice/stt/Google.d.ts +4 -15
  179. package/dist/voice/stt/Google.js +7 -103
  180. package/dist/voice/stt/types.d.ts +2 -38
  181. package/dist/voice/stt/types.js +25 -3
  182. package/dist/voice/tts/Azure.d.ts +4 -34
  183. package/dist/voice/tts/Azure.js +25 -105
  184. package/dist/voice/tts/Deepgram.d.ts +4 -38
  185. package/dist/voice/tts/Deepgram.js +25 -82
  186. package/dist/voice/tts/ElevenLabs.d.ts +4 -18
  187. package/dist/voice/tts/ElevenLabs.js +6 -97
  188. package/dist/voice/tts/Google.d.ts +4 -38
  189. package/dist/voice/tts/Google.js +25 -91
  190. package/dist/webhooks/createWebhooksHandlers.d.ts +37 -0
  191. package/dist/webhooks/createWebhooksHandlers.js +217 -0
  192. package/dist/webhooks/index.d.ts +37 -0
  193. package/dist/webhooks/index.js +51 -0
  194. package/dist/webhooks/lostCalls.d.ts +49 -0
  195. package/dist/webhooks/lostCalls.js +147 -0
  196. package/dist/webhooks/nodeCallEvents.d.ts +73 -0
  197. package/dist/webhooks/nodeCallEvents.js +177 -0
  198. package/dist/webhooks/runWebhookFanout.d.ts +44 -0
  199. package/dist/webhooks/runWebhookFanout.js +202 -0
  200. package/package.json +21 -31
  201. package/dist/applications/utils/applicationWithEncodedStruct.d.ts +0 -3
  202. package/dist/applications/utils/applicationWithEncodedStruct.js +0 -50
  203. package/dist/applications/utils/convertToApplicationData.js +0 -37
  204. package/dist/applications/validation/assistantWithoutApiKeySchema.d.ts +0 -786
  205. package/dist/applications/validation/assistantWithoutApiKeySchema.js +0 -35
  206. package/dist/applications/validation/createValidationSchema.d.ts +0 -1474
  207. package/dist/applications/validation/createValidationSchema.js +0 -67
  208. package/dist/applications/validation/prepareForValidation.d.ts +0 -21
  209. package/dist/applications/validation/prepareForValidation.js +0 -35
  210. package/dist/applications/validation/speechValidators.d.ts +0 -47
  211. package/dist/applications/validation/speechValidators.js +0 -50
  212. package/dist/applications/validation/validOrThrow.d.ts +0 -21
  213. package/dist/applications/validation/validOrThrow.js +0 -15
  214. package/dist/calls/createFetchCalls.d.ts +0 -22
  215. package/dist/calls/createFetchCalls.js +0 -88
  216. package/dist/calls/createFetchSingleCall.d.ts +0 -22
  217. package/dist/calls/influxdb.d.ts +0 -2
  218. package/dist/calls/runCallManager.d.ts +0 -8
  219. package/dist/calls/runCallManager.js +0 -75
  220. package/dist/core/buildWelcomeDemoService.js +0 -97
  221. package/dist/core/upsertDefaultPeer.d.ts +0 -2
  222. package/dist/events/amdResultCache.d.ts +0 -23
  223. package/dist/events/amdResultCache.js +0 -35
  224. package/dist/events/createInfluxDbPub.d.ts +0 -13
  225. package/dist/events/createInfluxDbPub.js +0 -89
  226. package/dist/events/createPerCallCache.js +0 -46
  227. package/dist/events/mapCallDirectionToEnum.d.ts +0 -21
  228. package/dist/events/mapCallDirectionToEnum.js +0 -37
  229. package/dist/events/nats.d.ts +0 -10
  230. package/dist/events/nats.js +0 -82
  231. package/dist/events/transformEvent.d.ts +0 -2
  232. package/dist/events/transformEvent.js +0 -87
  233. package/dist/events/types.d.ts +0 -26
  234. package/dist/utils/createHandleDialEventsWithNats.js +0 -24
  235. package/dist/utils/createHandleDialEventsWithVoiceClient.d.ts +0 -23
  236. package/dist/utils/createHandleDialEventsWithVoiceClient.js +0 -27
  237. package/dist/utils/getIntegrationsFromFile.d.ts +0 -2
  238. package/dist/utils/getIntegrationsFromFile.js +0 -49
  239. package/dist/utils/mapDialStatus.d.ts +0 -21
  240. package/dist/utils/mapDialStatus.js +0 -38
  241. package/dist/voice/VoiceDispatcher.d.ts +0 -21
  242. package/dist/voice/VoiceDispatcher.js +0 -122
  243. package/dist/voice/amd/mapAsteriskAmd.d.ts +0 -38
  244. package/dist/voice/amd/mapAsteriskAmd.js +0 -68
  245. package/dist/voice/client/AudioSocketHandler.d.ts +0 -38
  246. package/dist/voice/client/AudioSocketHandler.js +0 -70
  247. package/dist/voice/client/AuthorizationHandler.d.ts +0 -13
  248. package/dist/voice/client/AuthorizationHandler.js +0 -78
  249. package/dist/voice/client/ExternalMediaHandler.d.ts +0 -32
  250. package/dist/voice/client/ExternalMediaHandler.js +0 -59
  251. package/dist/voice/client/GrpcClientHandler.d.ts +0 -36
  252. package/dist/voice/client/SpeechHandler.d.ts +0 -60
  253. package/dist/voice/client/SpeechHandler.js +0 -120
  254. package/dist/voice/client/VoiceClientImpl.d.ts +0 -79
  255. package/dist/voice/client/VoiceClientImpl.js +0 -198
  256. package/dist/voice/connectToAri.d.ts +0 -2
  257. package/dist/voice/connectToAri.js +0 -81
  258. package/dist/voice/createCreateVoiceClient.d.ts +0 -9
  259. package/dist/voice/createCreateVoiceClient.js +0 -97
  260. package/dist/voice/errors/ChannelVarNotFoundError.d.ts +0 -23
  261. package/dist/voice/errors/ChannelVarNotFoundError.js +0 -10
  262. package/dist/voice/errors/MethodNotImplementedError.d.ts +0 -22
  263. package/dist/voice/errors/MethodNotImplementedError.js +0 -27
  264. package/dist/voice/filters/AudioFilterFactory.d.ts +0 -35
  265. package/dist/voice/filters/AudioFilterFactory.js +0 -94
  266. package/dist/voice/filters/aiCoustics/createAiCousticsFilter.d.ts +0 -64
  267. package/dist/voice/filters/aiCoustics/createAiCousticsFilter.js +0 -252
  268. package/dist/voice/filters/aiCoustics/types.d.ts +0 -45
  269. package/dist/voice/filters/aiCoustics/types.js +0 -29
  270. package/dist/voice/filters/createAudioFilterChain.d.ts +0 -9
  271. package/dist/voice/filters/createAudioFilterChain.js +0 -171
  272. package/dist/voice/filters/createAudioFilterSession.d.ts +0 -15
  273. package/dist/voice/filters/createAudioFilterSession.js +0 -114
  274. package/dist/voice/filters/pcm.d.ts +0 -21
  275. package/dist/voice/filters/pcm.js +0 -37
  276. package/dist/voice/filters/types.d.ts +0 -61
  277. package/dist/voice/filters/types.js +0 -26
  278. package/dist/voice/handlers/createAnswerHandler.d.ts +0 -23
  279. package/dist/voice/handlers/createAnswerHandler.js +0 -24
  280. package/dist/voice/handlers/createHangupHandler.d.ts +0 -23
  281. package/dist/voice/handlers/createHangupHandler.js +0 -28
  282. package/dist/voice/handlers/createMuteHandler.d.ts +0 -4
  283. package/dist/voice/handlers/createMuteHandler.js +0 -27
  284. package/dist/voice/handlers/createPlayDtmfHandler.d.ts +0 -4
  285. package/dist/voice/handlers/createPlayDtmfHandler.js +0 -27
  286. package/dist/voice/handlers/createPlayHandler.d.ts +0 -4
  287. package/dist/voice/handlers/createPlayHandler.js +0 -33
  288. package/dist/voice/handlers/createPlaybackControlHandler.d.ts +0 -4
  289. package/dist/voice/handlers/createPlaybackControlHandler.js +0 -62
  290. package/dist/voice/handlers/createRecordHandler.d.ts +0 -4
  291. package/dist/voice/handlers/createRecordHandler.js +0 -58
  292. package/dist/voice/handlers/createSayHandler.d.ts +0 -4
  293. package/dist/voice/handlers/createSayHandler.js +0 -31
  294. package/dist/voice/handlers/createSetAudioFiltersHandler.d.ts +0 -11
  295. package/dist/voice/handlers/createSetAudioFiltersHandler.js +0 -74
  296. package/dist/voice/handlers/createStopSayHandler.d.ts +0 -3
  297. package/dist/voice/handlers/createStopSayHandler.js +0 -34
  298. package/dist/voice/handlers/createStreamGatherHandler.d.ts +0 -3
  299. package/dist/voice/handlers/createStreamGatherHandler.js +0 -74
  300. package/dist/voice/handlers/createStreamHandler.d.ts +0 -3
  301. package/dist/voice/handlers/createStreamHandler.js +0 -70
  302. package/dist/voice/handlers/createUnmuteHandler.d.ts +0 -4
  303. package/dist/voice/handlers/createUnmuteHandler.js +0 -27
  304. package/dist/voice/handlers/dial/createDialHandler.d.ts +0 -23
  305. package/dist/voice/handlers/dial/createDialHandler.js +0 -78
  306. package/dist/voice/handlers/dial/handleChannelLeftBridge.d.ts +0 -24
  307. package/dist/voice/handlers/dial/handleChannelLeftBridge.js +0 -29
  308. package/dist/voice/handlers/dial/handleStasisEnd.d.ts +0 -21
  309. package/dist/voice/handlers/dial/handleStasisEnd.js +0 -19
  310. package/dist/voice/handlers/dial/handleStasisStart.d.ts +0 -27
  311. package/dist/voice/handlers/dial/handleStasisStart.js +0 -52
  312. package/dist/voice/handlers/dial/recordChannel.d.ts +0 -22
  313. package/dist/voice/handlers/gather/createGatherHandler.d.ts +0 -3
  314. package/dist/voice/handlers/gather/createGatherHandler.js +0 -86
  315. package/dist/voice/handlers/gather/getTimeoutPromise.d.ts +0 -26
  316. package/dist/voice/handlers/gather/getTimeoutPromise.js +0 -18
  317. package/dist/voice/handlers/index.d.ts +0 -33
  318. package/dist/voice/handlers/index.js +0 -49
  319. package/dist/voice/handlers/utils/awaitForPlaybackFinished.d.ts +0 -21
  320. package/dist/voice/handlers/utils/awaitForPlaybackFinished.js +0 -25
  321. package/dist/voice/handlers/utils/awaitForRecordingFinished.d.ts +0 -5
  322. package/dist/voice/handlers/utils/awaitForRecordingFinished.js +0 -53
  323. package/dist/voice/handlers/utils/isDtmf.d.ts +0 -20
  324. package/dist/voice/handlers/utils/textChunksByClause.d.ts +0 -2
  325. package/dist/voice/handlers/utils/textChunksByClause.js +0 -41
  326. package/dist/voice/handlers/utils/textChunksByFirstNaturalPause.d.ts +0 -2
  327. package/dist/voice/handlers/utils/textChunksByFirstNaturalPause.js +0 -34
  328. package/dist/voice/handlers/utils/withErrorHandling.d.ts +0 -22
  329. package/dist/voice/handlers/utils/withErrorHandling.js +0 -38
  330. package/dist/voice/integrations/ApplicationNotFoundError.d.ts +0 -22
  331. package/dist/voice/integrations/ApplicationNotFoundError.js +0 -28
  332. package/dist/voice/integrations/createCreateContainer.d.ts +0 -4
  333. package/dist/voice/integrations/createCreateContainer.js +0 -76
  334. package/dist/voice/integrations/getSttConfig.js +0 -30
  335. package/dist/voice/integrations/index.js +0 -35
  336. package/dist/voice/integrations/types.d.ts +0 -29
  337. package/dist/voice/stt/AbstractSpeechToText.d.ts +0 -33
  338. package/dist/voice/stt/AbstractSpeechToText.js +0 -19
  339. package/dist/voice/stt/SpeechToTextFactory.d.ts +0 -9
  340. package/dist/voice/stt/SpeechToTextFactory.js +0 -43
  341. package/dist/voice/transcribeOnConnection.d.ts +0 -35
  342. package/dist/voice/transcribeOnConnection.js +0 -91
  343. package/dist/voice/tts/AbstractTextToSpeech.d.ts +0 -40
  344. package/dist/voice/tts/AbstractTextToSpeech.js +0 -50
  345. package/dist/voice/tts/TextToSpeechFactory.d.ts +0 -8
  346. package/dist/voice/tts/TextToSpeechFactory.js +0 -47
  347. package/dist/voice/tts/types.d.ts +0 -48
  348. package/dist/voice/tts/types.js +0 -2
  349. package/dist/voice/tts/utils/convertUlawToPCM16.js +0 -40
  350. package/dist/voice/tts/utils/createChunkedSynthesisStream.d.ts +0 -28
  351. package/dist/voice/tts/utils/createChunkedSynthesisStream.js +0 -78
  352. package/dist/voice/tts/utils/createErrorStream.d.ts +0 -21
  353. package/dist/voice/tts/utils/createErrorStream.js +0 -28
  354. package/dist/voice/tts/utils/index.d.ts +0 -23
  355. package/dist/voice/tts/utils/index.js +0 -39
  356. package/dist/voice/tts/utils/isSsml.d.ts +0 -20
  357. package/dist/voice/tts/utils/isSsml.js +0 -25
  358. package/dist/voice/tts/utils/streamToBuffer.d.ts +0 -20
  359. package/dist/voice/tts/utils/streamToBuffer.js +0 -60
  360. package/dist/voice/types/ari.d.ts +0 -43
  361. package/dist/voice/types/ari.js +0 -48
  362. package/dist/voice/types/index.d.ts +0 -20
  363. package/dist/voice/types/index.js +0 -36
  364. package/dist/voice/types/voice.d.ts +0 -67
  365. package/dist/voice/types/voice.js +0 -2
  366. package/dist/voice/utils/VoiceServiceClientConstructor.d.ts +0 -3
  367. package/dist/voice/utils/createExternalMediaConfig.d.ts +0 -12
  368. package/dist/voice/utils/createExternalMediaConfig.js +0 -37
  369. package/dist/voice/utils/createGetChannelVar.d.ts +0 -22
  370. package/dist/voice/utils/createGetChannelVar.js +0 -27
  371. package/dist/voice/utils/createGetChannelVarWithoutThrow.d.ts +0 -22
  372. package/dist/voice/utils/createGetChannelVarWithoutThrow.js +0 -26
  373. package/dist/voice/utils/index.d.ts +0 -22
  374. package/dist/voice/utils/index.js +0 -38
  375. /package/dist/{events → records}/types.js +0 -0
  376. /package/dist/{voice/integrations → usage}/types.js +0 -0
@@ -0,0 +1,1919 @@
1
+ import { z } from "zod";
2
+ /** Product features. Code checks these, never an edition. Community defaults. */
3
+ declare const featuresSchema: z.ZodDefault<z.ZodObject<{
4
+ auth: z.ZodDefault<z.ZodObject<{
5
+ methods: z.ZodDefault<z.ZodArray<z.ZodEnum<["password", "email_code", "github"]>, "atleastone">>;
6
+ signup: z.ZodDefault<z.ZodEnum<["invite", "open"]>>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ methods?: ["password" | "email_code" | "github", ...("password" | "email_code" | "github")[]];
9
+ signup?: "invite" | "open";
10
+ }, {
11
+ methods?: ["password" | "email_code" | "github", ...("password" | "email_code" | "github")[]];
12
+ signup?: "invite" | "open";
13
+ }>>;
14
+ billing: z.ZodDefault<z.ZodObject<{
15
+ enabled: z.ZodDefault<z.ZodBoolean>;
16
+ /** The billing service's Billing API (host:port); defaults to authz.host:50073. */
17
+ address: z.ZodOptional<z.ZodString>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ enabled?: boolean;
20
+ address?: string;
21
+ }, {
22
+ enabled?: boolean;
23
+ address?: string;
24
+ }>>;
25
+ costs: z.ZodDefault<z.ZodObject<{
26
+ display: z.ZodDefault<z.ZodEnum<["none", "usage", "prices"]>>;
27
+ }, "strip", z.ZodTypeAny, {
28
+ display?: "none" | "usage" | "prices";
29
+ }, {
30
+ display?: "none" | "usage" | "prices";
31
+ }>>;
32
+ calls: z.ZodDefault<z.ZodObject<{
33
+ transcripts: z.ZodDefault<z.ZodObject<{
34
+ store: z.ZodDefault<z.ZodBoolean>;
35
+ retentionDays: z.ZodDefault<z.ZodNumber>;
36
+ }, "strip", z.ZodTypeAny, {
37
+ store?: boolean;
38
+ retentionDays?: number;
39
+ }, {
40
+ store?: boolean;
41
+ retentionDays?: number;
42
+ }>>;
43
+ recordings: z.ZodDefault<z.ZodObject<{
44
+ store: z.ZodDefault<z.ZodBoolean>;
45
+ }, "strip", z.ZodTypeAny, {
46
+ store?: boolean;
47
+ }, {
48
+ store?: boolean;
49
+ }>>;
50
+ }, "strip", z.ZodTypeAny, {
51
+ transcripts?: {
52
+ store?: boolean;
53
+ retentionDays?: number;
54
+ };
55
+ recordings?: {
56
+ store?: boolean;
57
+ };
58
+ }, {
59
+ transcripts?: {
60
+ store?: boolean;
61
+ retentionDays?: number;
62
+ };
63
+ recordings?: {
64
+ store?: boolean;
65
+ };
66
+ }>>;
67
+ /**
68
+ * SIP names (trunk inbound URIs, domains): "domain" requires one DNS label
69
+ * under `sip.<domain>` (carriers and phones reach a wildcard `*.sip.<domain>`);
70
+ * "any" accepts any host or IP, for installs reached by address.
71
+ */
72
+ sip: z.ZodDefault<z.ZodObject<{
73
+ names: z.ZodDefault<z.ZodEnum<["domain", "any"]>>;
74
+ }, "strip", z.ZodTypeAny, {
75
+ names?: "domain" | "any";
76
+ }, {
77
+ names?: "domain" | "any";
78
+ }>>;
79
+ }, "strip", z.ZodTypeAny, {
80
+ auth?: {
81
+ methods?: ["password" | "email_code" | "github", ...("password" | "email_code" | "github")[]];
82
+ signup?: "invite" | "open";
83
+ };
84
+ billing?: {
85
+ enabled?: boolean;
86
+ address?: string;
87
+ };
88
+ costs?: {
89
+ display?: "none" | "usage" | "prices";
90
+ };
91
+ calls?: {
92
+ transcripts?: {
93
+ store?: boolean;
94
+ retentionDays?: number;
95
+ };
96
+ recordings?: {
97
+ store?: boolean;
98
+ };
99
+ };
100
+ sip?: {
101
+ names?: "domain" | "any";
102
+ };
103
+ }, {
104
+ auth?: {
105
+ methods?: ["password" | "email_code" | "github", ...("password" | "email_code" | "github")[]];
106
+ signup?: "invite" | "open";
107
+ };
108
+ billing?: {
109
+ enabled?: boolean;
110
+ address?: string;
111
+ };
112
+ costs?: {
113
+ display?: "none" | "usage" | "prices";
114
+ };
115
+ calls?: {
116
+ transcripts?: {
117
+ store?: boolean;
118
+ retentionDays?: number;
119
+ };
120
+ recordings?: {
121
+ store?: boolean;
122
+ };
123
+ };
124
+ sip?: {
125
+ names?: "domain" | "any";
126
+ };
127
+ }>>;
128
+ /** fonoster.yaml: everything the API server (and embedded Identity) needs. */
129
+ declare const fonosterConfigSchema: z.ZodEffects<z.ZodObject<{
130
+ /** Public hostname. Sets the defaults for appUrl, signalingServer and the SIP root domain. */
131
+ domain: z.ZodString;
132
+ /** Links in emails. Defaults to https://<domain>. */
133
+ appUrl: z.ZodOptional<z.ZodString>;
134
+ /** Browser test calls: SIP over WebSocket. Defaults to ws(s)://<appUrl host>/sip. */
135
+ signalingServer: z.ZodOptional<z.ZodString>;
136
+ server: z.ZodDefault<z.ZodObject<{
137
+ bindAddr: z.ZodDefault<z.ZodString>;
138
+ httpBridgePort: z.ZodDefault<z.ZodNumber>;
139
+ /** How other services reach this one. */
140
+ host: z.ZodDefault<z.ZodString>;
141
+ }, "strip", z.ZodTypeAny, {
142
+ host?: string;
143
+ bindAddr?: string;
144
+ httpBridgePort?: number;
145
+ }, {
146
+ host?: string;
147
+ bindAddr?: string;
148
+ httpBridgePort?: number;
149
+ }>>;
150
+ logs: z.ZodDefault<z.ZodEffects<z.ZodObject<{
151
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info", "http", "verbose", "debug", "silly"]>>;
152
+ format: z.ZodDefault<z.ZodEnum<["json", "text"]>>;
153
+ transport: z.ZodDefault<z.ZodEnum<["console", "fluent"]>>;
154
+ fluent: z.ZodOptional<z.ZodObject<{
155
+ host: z.ZodString;
156
+ port: z.ZodDefault<z.ZodNumber>;
157
+ tagPrefix: z.ZodDefault<z.ZodString>;
158
+ }, "strip", z.ZodTypeAny, {
159
+ host?: string;
160
+ port?: number;
161
+ tagPrefix?: string;
162
+ }, {
163
+ host?: string;
164
+ port?: number;
165
+ tagPrefix?: string;
166
+ }>>;
167
+ }, "strip", z.ZodTypeAny, {
168
+ format?: "text" | "json";
169
+ level?: "error" | "warn" | "info" | "http" | "verbose" | "debug" | "silly";
170
+ fluent?: {
171
+ host?: string;
172
+ port?: number;
173
+ tagPrefix?: string;
174
+ };
175
+ transport?: "console" | "fluent";
176
+ }, {
177
+ format?: "text" | "json";
178
+ level?: "error" | "warn" | "info" | "http" | "verbose" | "debug" | "silly";
179
+ fluent?: {
180
+ host?: string;
181
+ port?: number;
182
+ tagPrefix?: string;
183
+ };
184
+ transport?: "console" | "fluent";
185
+ }>, {
186
+ format?: "text" | "json";
187
+ level?: "error" | "warn" | "info" | "http" | "verbose" | "debug" | "silly";
188
+ fluent?: {
189
+ host?: string;
190
+ port?: number;
191
+ tagPrefix?: string;
192
+ };
193
+ transport?: "console" | "fluent";
194
+ }, {
195
+ format?: "text" | "json";
196
+ level?: "error" | "warn" | "info" | "http" | "verbose" | "debug" | "silly";
197
+ fluent?: {
198
+ host?: string;
199
+ port?: number;
200
+ tagPrefix?: string;
201
+ };
202
+ transport?: "console" | "fluent";
203
+ }>>;
204
+ /** OTLP export (empty = off): `otlpEndpoint: "${OTEL_EXPORTER_OTLP_ENDPOINT:-}"`. */
205
+ telemetry: z.ZodOptional<z.ZodObject<{
206
+ otlpEndpoint: z.ZodOptional<z.ZodString>;
207
+ }, "strip", z.ZodTypeAny, {
208
+ otlpEndpoint?: string;
209
+ }, {
210
+ otlpEndpoint?: string;
211
+ }>>;
212
+ database: z.ZodObject<{
213
+ url: z.ZodString;
214
+ }, "strip", z.ZodTypeAny, {
215
+ url?: string;
216
+ }, {
217
+ url?: string;
218
+ }>;
219
+ encryption: z.ZodObject<{
220
+ key: z.ZodString;
221
+ }, "strip", z.ZodTypeAny, {
222
+ key?: string;
223
+ }, {
224
+ key?: string;
225
+ }>;
226
+ smtp: z.ZodOptional<z.ZodObject<{
227
+ host: z.ZodString;
228
+ port: z.ZodDefault<z.ZodNumber>;
229
+ secure: z.ZodDefault<z.ZodBoolean>;
230
+ sender: z.ZodString;
231
+ user: z.ZodDefault<z.ZodString>;
232
+ password: z.ZodDefault<z.ZodString>;
233
+ }, "strip", z.ZodTypeAny, {
234
+ user?: string;
235
+ password?: string;
236
+ host?: string;
237
+ port?: number;
238
+ secure?: boolean;
239
+ sender?: string;
240
+ }, {
241
+ user?: string;
242
+ password?: string;
243
+ host?: string;
244
+ port?: number;
245
+ secure?: boolean;
246
+ sender?: string;
247
+ }>>;
248
+ authz: z.ZodDefault<z.ZodObject<{
249
+ enabled: z.ZodDefault<z.ZodBoolean>;
250
+ host: z.ZodOptional<z.ZodString>;
251
+ port: z.ZodDefault<z.ZodNumber>;
252
+ methods: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
253
+ }, "strip", z.ZodTypeAny, {
254
+ enabled?: boolean;
255
+ host?: string;
256
+ port?: number;
257
+ methods?: string[];
258
+ }, {
259
+ enabled?: boolean;
260
+ host?: string;
261
+ port?: number;
262
+ methods?: string[];
263
+ }>>;
264
+ features: z.ZodDefault<z.ZodObject<{
265
+ auth: z.ZodDefault<z.ZodObject<{
266
+ methods: z.ZodDefault<z.ZodArray<z.ZodEnum<["password", "email_code", "github"]>, "atleastone">>;
267
+ signup: z.ZodDefault<z.ZodEnum<["invite", "open"]>>;
268
+ }, "strip", z.ZodTypeAny, {
269
+ methods?: ["password" | "email_code" | "github", ...("password" | "email_code" | "github")[]];
270
+ signup?: "invite" | "open";
271
+ }, {
272
+ methods?: ["password" | "email_code" | "github", ...("password" | "email_code" | "github")[]];
273
+ signup?: "invite" | "open";
274
+ }>>;
275
+ billing: z.ZodDefault<z.ZodObject<{
276
+ enabled: z.ZodDefault<z.ZodBoolean>;
277
+ /** The billing service's Billing API (host:port); defaults to authz.host:50073. */
278
+ address: z.ZodOptional<z.ZodString>;
279
+ }, "strip", z.ZodTypeAny, {
280
+ enabled?: boolean;
281
+ address?: string;
282
+ }, {
283
+ enabled?: boolean;
284
+ address?: string;
285
+ }>>;
286
+ costs: z.ZodDefault<z.ZodObject<{
287
+ display: z.ZodDefault<z.ZodEnum<["none", "usage", "prices"]>>;
288
+ }, "strip", z.ZodTypeAny, {
289
+ display?: "none" | "usage" | "prices";
290
+ }, {
291
+ display?: "none" | "usage" | "prices";
292
+ }>>;
293
+ calls: z.ZodDefault<z.ZodObject<{
294
+ transcripts: z.ZodDefault<z.ZodObject<{
295
+ store: z.ZodDefault<z.ZodBoolean>;
296
+ retentionDays: z.ZodDefault<z.ZodNumber>;
297
+ }, "strip", z.ZodTypeAny, {
298
+ store?: boolean;
299
+ retentionDays?: number;
300
+ }, {
301
+ store?: boolean;
302
+ retentionDays?: number;
303
+ }>>;
304
+ recordings: z.ZodDefault<z.ZodObject<{
305
+ store: z.ZodDefault<z.ZodBoolean>;
306
+ }, "strip", z.ZodTypeAny, {
307
+ store?: boolean;
308
+ }, {
309
+ store?: boolean;
310
+ }>>;
311
+ }, "strip", z.ZodTypeAny, {
312
+ transcripts?: {
313
+ store?: boolean;
314
+ retentionDays?: number;
315
+ };
316
+ recordings?: {
317
+ store?: boolean;
318
+ };
319
+ }, {
320
+ transcripts?: {
321
+ store?: boolean;
322
+ retentionDays?: number;
323
+ };
324
+ recordings?: {
325
+ store?: boolean;
326
+ };
327
+ }>>;
328
+ /**
329
+ * SIP names (trunk inbound URIs, domains): "domain" requires one DNS label
330
+ * under `sip.<domain>` (carriers and phones reach a wildcard `*.sip.<domain>`);
331
+ * "any" accepts any host or IP, for installs reached by address.
332
+ */
333
+ sip: z.ZodDefault<z.ZodObject<{
334
+ names: z.ZodDefault<z.ZodEnum<["domain", "any"]>>;
335
+ }, "strip", z.ZodTypeAny, {
336
+ names?: "domain" | "any";
337
+ }, {
338
+ names?: "domain" | "any";
339
+ }>>;
340
+ }, "strip", z.ZodTypeAny, {
341
+ auth?: {
342
+ methods?: ["password" | "email_code" | "github", ...("password" | "email_code" | "github")[]];
343
+ signup?: "invite" | "open";
344
+ };
345
+ billing?: {
346
+ enabled?: boolean;
347
+ address?: string;
348
+ };
349
+ costs?: {
350
+ display?: "none" | "usage" | "prices";
351
+ };
352
+ calls?: {
353
+ transcripts?: {
354
+ store?: boolean;
355
+ retentionDays?: number;
356
+ };
357
+ recordings?: {
358
+ store?: boolean;
359
+ };
360
+ };
361
+ sip?: {
362
+ names?: "domain" | "any";
363
+ };
364
+ }, {
365
+ auth?: {
366
+ methods?: ["password" | "email_code" | "github", ...("password" | "email_code" | "github")[]];
367
+ signup?: "invite" | "open";
368
+ };
369
+ billing?: {
370
+ enabled?: boolean;
371
+ address?: string;
372
+ };
373
+ costs?: {
374
+ display?: "none" | "usage" | "prices";
375
+ };
376
+ calls?: {
377
+ transcripts?: {
378
+ store?: boolean;
379
+ retentionDays?: number;
380
+ };
381
+ recordings?: {
382
+ store?: boolean;
383
+ };
384
+ };
385
+ sip?: {
386
+ names?: "domain" | "any";
387
+ };
388
+ }>>;
389
+ routr: z.ZodDefault<z.ZodObject<{
390
+ apiEndpoint: z.ZodDefault<z.ZodString>;
391
+ /**
392
+ * host:port of Routr's SIP listener: API-originated calls are dialed through it
393
+ * (CreateCall's to.proxy), as the roomr peer below (to.auth).
394
+ */
395
+ sipProxy: z.ZodDefault<z.ZodString>;
396
+ /**
397
+ * The peer Go Roomr nodes register under (least-sessions, add-roomr 4.1). Without a
398
+ * password the apiserver does not create it.
399
+ */
400
+ roomrPeer: z.ZodDefault<z.ZodObject<{
401
+ aor: z.ZodDefault<z.ZodString>;
402
+ name: z.ZodDefault<z.ZodString>;
403
+ username: z.ZodDefault<z.ZodString>;
404
+ password: z.ZodOptional<z.ZodString>;
405
+ }, "strip", z.ZodTypeAny, {
406
+ name?: string;
407
+ aor?: string;
408
+ username?: string;
409
+ password?: string;
410
+ }, {
411
+ name?: string;
412
+ aor?: string;
413
+ username?: string;
414
+ password?: string;
415
+ }>>;
416
+ }, "strip", z.ZodTypeAny, {
417
+ apiEndpoint?: string;
418
+ sipProxy?: string;
419
+ roomrPeer?: {
420
+ name?: string;
421
+ aor?: string;
422
+ username?: string;
423
+ password?: string;
424
+ };
425
+ }, {
426
+ apiEndpoint?: string;
427
+ sipProxy?: string;
428
+ roomrPeer?: {
429
+ name?: string;
430
+ aor?: string;
431
+ username?: string;
432
+ password?: string;
433
+ };
434
+ }>>;
435
+ nats: z.ZodObject<{
436
+ url: z.ZodString;
437
+ user: z.ZodOptional<z.ZodString>;
438
+ password: z.ZodOptional<z.ZodString>;
439
+ }, "strip", z.ZodTypeAny, {
440
+ url?: string;
441
+ password?: string;
442
+ user?: string;
443
+ }, {
444
+ url?: string;
445
+ password?: string;
446
+ user?: string;
447
+ }>;
448
+ evaluations: z.ZodDefault<z.ZodObject<{
449
+ credentials: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
450
+ }, "strip", z.ZodTypeAny, {
451
+ credentials?: Record<string, string>;
452
+ }, {
453
+ credentials?: Record<string, string>;
454
+ }>>;
455
+ templatesDir: z.ZodOptional<z.ZodString>;
456
+ twilio: z.ZodOptional<z.ZodObject<{
457
+ phoneNumber: z.ZodString;
458
+ accountSid: z.ZodString;
459
+ authToken: z.ZodString;
460
+ }, "strip", z.ZodTypeAny, {
461
+ phoneNumber?: string;
462
+ accountSid?: string;
463
+ authToken?: string;
464
+ }, {
465
+ phoneNumber?: string;
466
+ accountSid?: string;
467
+ authToken?: string;
468
+ }>>;
469
+ identity: z.ZodDefault<z.ZodObject<{
470
+ database: z.ZodOptional<z.ZodObject<{
471
+ url: z.ZodString;
472
+ }, "strip", z.ZodTypeAny, {
473
+ url?: string;
474
+ }, {
475
+ url?: string;
476
+ }>>;
477
+ issuer: z.ZodOptional<z.ZodString>;
478
+ audience: z.ZodDefault<z.ZodString>;
479
+ keys: z.ZodEffects<z.ZodDefault<z.ZodObject<{
480
+ privateKey: z.ZodOptional<z.ZodString>;
481
+ publicKey: z.ZodOptional<z.ZodString>;
482
+ privateKeyPath: z.ZodOptional<z.ZodString>;
483
+ publicKeyPath: z.ZodOptional<z.ZodString>;
484
+ }, "strip", z.ZodTypeAny, {
485
+ privateKey?: string;
486
+ publicKey?: string;
487
+ privateKeyPath?: string;
488
+ publicKeyPath?: string;
489
+ }, {
490
+ privateKey?: string;
491
+ publicKey?: string;
492
+ privateKeyPath?: string;
493
+ publicKeyPath?: string;
494
+ }>>, {
495
+ privateKey: string;
496
+ publicKey: string;
497
+ privateKeyPath: string;
498
+ publicKeyPath: string;
499
+ }, {
500
+ privateKey?: string;
501
+ publicKey?: string;
502
+ privateKeyPath?: string;
503
+ publicKeyPath?: string;
504
+ }>;
505
+ tokens: z.ZodDefault<z.ZodObject<{
506
+ accessTokenExpiresIn: z.ZodDefault<z.ZodString>;
507
+ idTokenExpiresIn: z.ZodDefault<z.ZodString>;
508
+ refreshTokenExpiresIn: z.ZodDefault<z.ZodString>;
509
+ }, "strip", z.ZodTypeAny, {
510
+ accessTokenExpiresIn?: string;
511
+ idTokenExpiresIn?: string;
512
+ refreshTokenExpiresIn?: string;
513
+ }, {
514
+ accessTokenExpiresIn?: string;
515
+ idTokenExpiresIn?: string;
516
+ refreshTokenExpiresIn?: string;
517
+ }>>;
518
+ security: z.ZodDefault<z.ZodObject<{
519
+ contactVerificationRequired: z.ZodDefault<z.ZodBoolean>;
520
+ twoFactorAuthenticationRequired: z.ZodDefault<z.ZodBoolean>;
521
+ }, "strip", z.ZodTypeAny, {
522
+ contactVerificationRequired?: boolean;
523
+ twoFactorAuthenticationRequired?: boolean;
524
+ }, {
525
+ contactVerificationRequired?: boolean;
526
+ twoFactorAuthenticationRequired?: boolean;
527
+ }>>;
528
+ invites: z.ZodDefault<z.ZodObject<{
529
+ url: z.ZodOptional<z.ZodString>;
530
+ failUrl: z.ZodOptional<z.ZodString>;
531
+ expiration: z.ZodDefault<z.ZodString>;
532
+ }, "strip", z.ZodTypeAny, {
533
+ url? /** Relays in flight per region (HTTP 429 beyond). */: string;
534
+ failUrl?: string;
535
+ expiration?: string;
536
+ }, {
537
+ url?: string;
538
+ failUrl?: string;
539
+ expiration?: string;
540
+ }>>;
541
+ oauth2: z.ZodOptional<z.ZodObject<{
542
+ github: z.ZodObject<{
543
+ clientId: z.ZodString;
544
+ clientSecret: z.ZodString;
545
+ url: z.ZodEffects<z.ZodDefault<z.ZodString>, string, string>;
546
+ apiUrl: z.ZodEffects<z.ZodDefault<z.ZodString>, string, string>;
547
+ }, "strip", z.ZodTypeAny, {
548
+ url?: string;
549
+ clientId?: string;
550
+ clientSecret?: string;
551
+ apiUrl?: string;
552
+ }, {
553
+ url?: string;
554
+ clientId?: string;
555
+ clientSecret?: string;
556
+ apiUrl?: string;
557
+ }>;
558
+ }, "strip", z.ZodTypeAny, {
559
+ github?: {
560
+ url?: string;
561
+ clientId?: string;
562
+ clientSecret?: string;
563
+ apiUrl?: string;
564
+ };
565
+ }, {
566
+ github?: {
567
+ url? /** OTLP export (empty = off): `otlpEndpoint: "${OTEL_EXPORTER_OTLP_ENDPOINT:-}"`. */: string;
568
+ clientId?: string;
569
+ clientSecret?: string;
570
+ apiUrl?: string;
571
+ };
572
+ }>>;
573
+ owner: z.ZodOptional<z.ZodObject<{
574
+ name: z.ZodDefault<z.ZodString>;
575
+ email: z.ZodString;
576
+ password: z.ZodString;
577
+ }, "strip", z.ZodTypeAny, {
578
+ name?: string;
579
+ email?: string;
580
+ password?: string;
581
+ }, {
582
+ name?: string;
583
+ email?: string;
584
+ password?: string;
585
+ }>>;
586
+ }, "strip", z.ZodTypeAny, {
587
+ keys?: {
588
+ privateKey: string;
589
+ publicKey: string;
590
+ privateKeyPath: string;
591
+ publicKeyPath: string;
592
+ };
593
+ owner?: {
594
+ name?: string;
595
+ email?: string;
596
+ password? /**
597
+ * host:port of Routr's SIP listener: API-originated calls are dialed through it
598
+ * (CreateCall's to.proxy), as the roomr peer below (to.auth).
599
+ */: string;
600
+ };
601
+ database?: {
602
+ url?: string;
603
+ };
604
+ issuer?: string;
605
+ audience?: string;
606
+ tokens?: {
607
+ accessTokenExpiresIn?: string;
608
+ idTokenExpiresIn?: string;
609
+ refreshTokenExpiresIn?: string;
610
+ };
611
+ security?: {
612
+ contactVerificationRequired?: boolean;
613
+ twoFactorAuthenticationRequired?: boolean;
614
+ };
615
+ invites?: {
616
+ url?: string;
617
+ failUrl?: string;
618
+ expiration?: string;
619
+ };
620
+ oauth2?: {
621
+ github?: {
622
+ url?: string;
623
+ clientId?: string;
624
+ clientSecret?: string;
625
+ apiUrl?: string;
626
+ };
627
+ };
628
+ }, {
629
+ keys?: {
630
+ privateKey?: string;
631
+ publicKey?: string;
632
+ privateKeyPath?: string;
633
+ publicKeyPath?: string;
634
+ };
635
+ owner?: {
636
+ name?: string;
637
+ email?: string;
638
+ password?: string;
639
+ };
640
+ database?: {
641
+ url?: string;
642
+ };
643
+ issuer?: string;
644
+ audience?: string;
645
+ tokens?: {
646
+ accessTokenExpiresIn?: string;
647
+ idTokenExpiresIn?: string;
648
+ refreshTokenExpiresIn?: string;
649
+ };
650
+ security?: {
651
+ contactVerificationRequired?: boolean;
652
+ twoFactorAuthenticationRequired?: boolean;
653
+ };
654
+ invites?: {
655
+ url?: string;
656
+ failUrl?: string;
657
+ expiration?: string;
658
+ };
659
+ oauth2?: {
660
+ github?: {
661
+ url?: string;
662
+ clientId?: string;
663
+ clientSecret?: string;
664
+ apiUrl?: string;
665
+ };
666
+ };
667
+ }>>;
668
+ callRecords: z.ZodDefault<z.ZodObject<{
669
+ enabled: z.ZodDefault<z.ZodBoolean>;
670
+ stores: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodObject<{
671
+ dir: z.ZodString;
672
+ }, "strip", z.ZodTypeAny, {
673
+ dir?: string;
674
+ }, {
675
+ dir?: string;
676
+ }>, z.ZodObject<{
677
+ s3: z.ZodObject<{
678
+ bucket: z.ZodString;
679
+ prefix: z.ZodOptional<z.ZodString>;
680
+ region: z.ZodOptional<z.ZodString>;
681
+ endpoint: z.ZodOptional<z.ZodString>;
682
+ forcePathStyle: z.ZodOptional<z.ZodBoolean>;
683
+ credentials: z.ZodOptional<z.ZodObject<{
684
+ accessKeyId: z.ZodString;
685
+ secretAccessKey: z.ZodString;
686
+ }, "strip", z.ZodTypeAny, {
687
+ accessKeyId?: string;
688
+ secretAccessKey?: string;
689
+ }, {
690
+ accessKeyId?: string;
691
+ secretAccessKey?: string;
692
+ }>>;
693
+ }, "strip", z.ZodTypeAny, {
694
+ bucket?: string;
695
+ prefix?: string;
696
+ region?: string;
697
+ endpoint?: string;
698
+ forcePathStyle?: boolean;
699
+ credentials?: {
700
+ accessKeyId?: string;
701
+ secretAccessKey?: string;
702
+ };
703
+ }, {
704
+ bucket?: string;
705
+ prefix?: string;
706
+ region?: string;
707
+ endpoint?: string;
708
+ forcePathStyle?: boolean;
709
+ credentials?: {
710
+ accessKeyId?: string;
711
+ secretAccessKey?: string;
712
+ };
713
+ }>;
714
+ }, "strip", z.ZodTypeAny, {
715
+ s3?: {
716
+ bucket?: string;
717
+ prefix?: string;
718
+ region?: string;
719
+ endpoint?: string;
720
+ forcePathStyle?: boolean;
721
+ credentials?: {
722
+ accessKeyId?: string;
723
+ secretAccessKey?: string;
724
+ };
725
+ };
726
+ }, {
727
+ s3?: {
728
+ bucket?: string;
729
+ prefix?: string;
730
+ region?: string;
731
+ endpoint?: string;
732
+ forcePathStyle?: boolean;
733
+ credentials?: {
734
+ accessKeyId?: string;
735
+ secretAccessKey?: string;
736
+ };
737
+ };
738
+ }>]>, "many">>;
739
+ retentionIntervalMinutes: z.ZodDefault<z.ZodNumber>;
740
+ maintenanceTimeoutMs: z.ZodDefault<z.ZodNumber>;
741
+ }, "strip", z.ZodTypeAny, {
742
+ enabled?: boolean;
743
+ stores?: ({
744
+ dir?: string;
745
+ } | {
746
+ s3?: {
747
+ bucket?: string;
748
+ prefix?: string;
749
+ region?: string;
750
+ endpoint?: string;
751
+ forcePathStyle?: boolean;
752
+ credentials?: {
753
+ accessKeyId?: string;
754
+ secretAccessKey?: string;
755
+ };
756
+ };
757
+ })[];
758
+ retentionIntervalMinutes?: number;
759
+ maintenanceTimeoutMs?: number;
760
+ }, {
761
+ enabled?: boolean;
762
+ stores?: ({
763
+ dir?: string;
764
+ } | {
765
+ s3?: {
766
+ bucket?: string;
767
+ prefix?: string;
768
+ region?: string;
769
+ endpoint?: string;
770
+ forcePathStyle?: boolean;
771
+ credentials?: {
772
+ accessKeyId?: string;
773
+ secretAccessKey?: string;
774
+ };
775
+ };
776
+ })[];
777
+ retentionIntervalMinutes?: number;
778
+ maintenanceTimeoutMs?: number;
779
+ }>>;
780
+ apps: z.ZodDefault<z.ZodObject<{
781
+ autopilotUrl: z.ZodDefault<z.ZodString>;
782
+ autopilotSigningSecret: z.ZodOptional<z.ZodString>;
783
+ /** Plain http:// webhook endpoints (local testing only). */
784
+ allowInsecureWebhooks: z.ZodDefault<z.ZodBoolean>;
785
+ /**
786
+ * Private hosts, IPs or CIDRs app and listener URLs may use (self-hosting); default
787
+ * FONOSTER_ALLOWED_DESTINATIONS.
788
+ */
789
+ allowedDestinations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
790
+ }, "strip", z.ZodTypeAny, {
791
+ autopilotUrl?: string;
792
+ autopilotSigningSecret?: string;
793
+ allowInsecureWebhooks?: boolean;
794
+ allowedDestinations?: string[];
795
+ }, {
796
+ autopilotUrl?: string;
797
+ autopilotSigningSecret?: string;
798
+ allowInsecureWebhooks?: boolean;
799
+ allowedDestinations?: string[];
800
+ }>>;
801
+ webhooks: z.ZodDefault<z.ZodObject<{
802
+ fanout: z.ZodDefault<z.ZodBoolean>;
803
+ intervalMs: z.ZodDefault<z.ZodNumber>;
804
+ refreshMs: z.ZodDefault<z.ZodNumber>;
805
+ }, "strip", z.ZodTypeAny, {
806
+ fanout?: boolean;
807
+ intervalMs?: number;
808
+ refreshMs?: number;
809
+ }, {
810
+ fanout?: boolean;
811
+ intervalMs?: number;
812
+ refreshMs?: number;
813
+ }>>;
814
+ catalog: z.ZodOptional<z.ZodObject<{
815
+ file: z.ZodString;
816
+ files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
817
+ }, "strip", z.ZodTypeAny, {
818
+ file?: string;
819
+ files?: string[];
820
+ }, {
821
+ file?: string;
822
+ files?: string[];
823
+ }>>;
824
+ regions: z.ZodDefault<z.ZodObject<{
825
+ public: z.ZodDefault<z.ZodArray<z.ZodObject<{
826
+ id: z.ZodString;
827
+ name: z.ZodString;
828
+ default: z.ZodOptional<z.ZodBoolean>;
829
+ /** Where carriers and softphones reach this region (contract §3a). */
830
+ endpoints: z.ZodOptional<z.ZodObject<{
831
+ sip: z.ZodDefault<z.ZodArray<z.ZodObject<{
832
+ host: z.ZodString;
833
+ port: z.ZodNumber;
834
+ transport: z.ZodEnum<["udp", "tcp", "tls", "ws", "wss"]>;
835
+ }, "strip", z.ZodTypeAny, {
836
+ host?: string;
837
+ port?: number;
838
+ transport?: "udp" | "tcp" | "tls" | "ws" | "wss";
839
+ }, {
840
+ host?: string;
841
+ port?: number;
842
+ transport?: "udp" | "tcp" | "tls" | "ws" | "wss";
843
+ }>, "many">>;
844
+ signalingAddresses: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
845
+ mediaAddresses: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
846
+ rtpPorts: z.ZodOptional<z.ZodObject<{
847
+ min: z.ZodNumber;
848
+ max: z.ZodNumber;
849
+ }, "strip", z.ZodTypeAny, {
850
+ min?: number;
851
+ max?: number;
852
+ }, {
853
+ min?: number;
854
+ max?: number;
855
+ }>>;
856
+ }, "strip", z.ZodTypeAny, {
857
+ sip?: {
858
+ host?: string;
859
+ port?: number;
860
+ transport?: "udp" | "tcp" | "tls" | "ws" | "wss";
861
+ }[];
862
+ signalingAddresses?: string[];
863
+ mediaAddresses?: string[];
864
+ rtpPorts?: {
865
+ min?: number;
866
+ max?: number;
867
+ };
868
+ }, {
869
+ sip?: {
870
+ host?: string;
871
+ port?: number;
872
+ transport?: "udp" | "tcp" | "tls" | "ws" | "wss";
873
+ }[];
874
+ signalingAddresses?: string[];
875
+ mediaAddresses?: string[];
876
+ rtpPorts?: {
877
+ min?: number;
878
+ max?: number;
879
+ };
880
+ }>>;
881
+ }, "strip", z.ZodTypeAny, {
882
+ id?: string;
883
+ name?: string;
884
+ default?: boolean;
885
+ endpoints?: {
886
+ sip?: {
887
+ host?: string;
888
+ port?: number;
889
+ transport?: "udp" | "tcp" | "tls" | "ws" | "wss";
890
+ }[];
891
+ signalingAddresses?: string[];
892
+ mediaAddresses?: string[];
893
+ rtpPorts?: {
894
+ min?: number;
895
+ max?: number;
896
+ };
897
+ };
898
+ }, {
899
+ id?: string;
900
+ name?: string;
901
+ default?: boolean;
902
+ endpoints?: {
903
+ sip?: {
904
+ host?: string;
905
+ port?: number;
906
+ transport?: "udp" | "tcp" | "tls" | "ws" | "wss";
907
+ }[];
908
+ signalingAddresses?: string[];
909
+ mediaAddresses?: string[];
910
+ rtpPorts?: {
911
+ min?: number;
912
+ max?: number;
913
+ };
914
+ };
915
+ }>, "many">>;
916
+ /**
917
+ * The operator key (PR-19): the only credential of the region admin API (create, list,
918
+ * publish, revoke public regions). `secret://` references are resolved. Absent: admin API off.
919
+ */
920
+ operatorKey: z.ZodOptional<z.ZodString>;
921
+ /** The flat monthly fee per private region (PR-11), shown when billing is on. */
922
+ privateRegionMonthlyFeeCents: z.ZodOptional<z.ZodNumber>;
923
+ /** `cp` in enrollment tokens. Defaults to appUrl. */
924
+ controlPlaneUrl: z.ZodOptional<z.ZodString>;
925
+ /** `leaf` in enrollment tokens. Defaults to tls://<domain>:7422. */
926
+ leafUrl: z.ZodOptional<z.ZodString>;
927
+ /** Allows a plain nats:// leaf URL (local stacks only). */
928
+ allowInsecureLeaf: z.ZodDefault<z.ZodBoolean>;
929
+ signingKey: z.ZodOptional<z.ZodObject<{
930
+ file: z.ZodString;
931
+ kid: z.ZodOptional<z.ZodString>;
932
+ }, "strip", z.ZodTypeAny, {
933
+ file?: string;
934
+ kid?: string;
935
+ }, {
936
+ file?: string;
937
+ kid?: string;
938
+ }>>;
939
+ hub: z.ZodOptional<z.ZodObject<{
940
+ url: z.ZodString;
941
+ credentialsFile: z.ZodString;
942
+ systemCredentialsFile: z.ZodString;
943
+ operatorSeedFile: z.ZodString;
944
+ accountSeedFile: z.ZodString;
945
+ }, "strip", z.ZodTypeAny, {
946
+ url?: string;
947
+ credentialsFile?: string;
948
+ systemCredentialsFile?: string;
949
+ operatorSeedFile?: string;
950
+ accountSeedFile?: string;
951
+ }, {
952
+ url?: string;
953
+ credentialsFile?: string;
954
+ systemCredentialsFile?: string;
955
+ operatorSeedFile?: string;
956
+ accountSeedFile?: string;
957
+ }>>;
958
+ relay: z.ZodDefault<z.ZodObject<{
959
+ firstChunkTimeoutMs: z.ZodDefault<z.ZodNumber>;
960
+ idleTimeoutMs: z.ZodDefault<z.ZodNumber>;
961
+ maxBytes: z.ZodDefault<z.ZodNumber>;
962
+ /** Relays in flight per region (HTTP 429 beyond). */
963
+ maxConcurrent: z.ZodDefault<z.ZodNumber>;
964
+ }, "strip", z.ZodTypeAny, {
965
+ firstChunkTimeoutMs?: number;
966
+ idleTimeoutMs?: number;
967
+ maxBytes?: number;
968
+ maxConcurrent?: number;
969
+ }, {
970
+ firstChunkTimeoutMs?: number;
971
+ idleTimeoutMs?: number;
972
+ maxBytes?: number;
973
+ maxConcurrent?: number;
974
+ }>>;
975
+ /** The release cells are measured against (default: this apiserver's version). */
976
+ currentVersion: z.ZodOptional<z.ZodString>;
977
+ configDebounceMs: z.ZodDefault<z.ZodNumber>;
978
+ }, "strip", z.ZodTypeAny, {
979
+ public?: {
980
+ id?: string;
981
+ name?: string;
982
+ default?: boolean;
983
+ endpoints?: {
984
+ sip?: {
985
+ host?: string;
986
+ port?: number;
987
+ transport?: "udp" | "tcp" | "tls" | "ws" | "wss";
988
+ }[];
989
+ signalingAddresses?: string[];
990
+ mediaAddresses?: string[];
991
+ rtpPorts?: {
992
+ min?: number;
993
+ max?: number;
994
+ };
995
+ };
996
+ }[];
997
+ operatorKey?: string;
998
+ privateRegionMonthlyFeeCents?: number;
999
+ controlPlaneUrl?: string;
1000
+ leafUrl?: string;
1001
+ allowInsecureLeaf?: boolean;
1002
+ signingKey?: {
1003
+ file?: string;
1004
+ kid?: string;
1005
+ };
1006
+ hub?: {
1007
+ url?: string;
1008
+ credentialsFile?: string;
1009
+ systemCredentialsFile?: string;
1010
+ operatorSeedFile?: string;
1011
+ accountSeedFile?: string;
1012
+ };
1013
+ relay?: {
1014
+ firstChunkTimeoutMs?: number;
1015
+ idleTimeoutMs?: number;
1016
+ maxBytes?: number;
1017
+ maxConcurrent?: number;
1018
+ };
1019
+ currentVersion?: string;
1020
+ configDebounceMs?: number;
1021
+ }, {
1022
+ public?: {
1023
+ id?: string;
1024
+ name?: string;
1025
+ default?: boolean;
1026
+ endpoints?: {
1027
+ sip?: {
1028
+ host?: string;
1029
+ port?: number;
1030
+ transport?: "udp" | "tcp" | "tls" | "ws" | "wss";
1031
+ }[];
1032
+ signalingAddresses?: string[];
1033
+ mediaAddresses?: string[];
1034
+ rtpPorts?: {
1035
+ min?: number;
1036
+ max?: number;
1037
+ };
1038
+ };
1039
+ }[];
1040
+ operatorKey?: string;
1041
+ privateRegionMonthlyFeeCents?: number;
1042
+ controlPlaneUrl?: string;
1043
+ leafUrl?: string;
1044
+ allowInsecureLeaf?: boolean;
1045
+ signingKey?: {
1046
+ file?: string;
1047
+ kid?: string;
1048
+ };
1049
+ hub?: {
1050
+ url?: string;
1051
+ credentialsFile?: string;
1052
+ systemCredentialsFile?: string;
1053
+ operatorSeedFile?: string;
1054
+ accountSeedFile?: string;
1055
+ };
1056
+ relay?: {
1057
+ firstChunkTimeoutMs?: number;
1058
+ idleTimeoutMs?: number;
1059
+ maxBytes?: number;
1060
+ maxConcurrent?: number;
1061
+ };
1062
+ currentVersion?: string;
1063
+ configDebounceMs?: number;
1064
+ }>>;
1065
+ }, "strip", z.ZodTypeAny, {
1066
+ domain?: string;
1067
+ appUrl?: string;
1068
+ signalingServer?: string;
1069
+ server?: {
1070
+ host?: string;
1071
+ bindAddr?: string;
1072
+ httpBridgePort?: number;
1073
+ };
1074
+ logs?: {
1075
+ format?: "text" | "json";
1076
+ level?: "error" | "warn" | "info" | "http" | "verbose" | "debug" | "silly";
1077
+ fluent?: {
1078
+ host?: string;
1079
+ port?: number;
1080
+ tagPrefix?: string;
1081
+ };
1082
+ transport?: "console" | "fluent";
1083
+ };
1084
+ telemetry?: {
1085
+ otlpEndpoint?: string;
1086
+ };
1087
+ database?: {
1088
+ url?: string;
1089
+ };
1090
+ encryption?: {
1091
+ key?: string;
1092
+ };
1093
+ smtp?: {
1094
+ user?: string;
1095
+ password?: string;
1096
+ host?: string;
1097
+ port?: number;
1098
+ secure?: boolean;
1099
+ sender?: string;
1100
+ };
1101
+ authz?: {
1102
+ enabled?: boolean;
1103
+ host?: string;
1104
+ port?: number;
1105
+ methods?: string[];
1106
+ };
1107
+ features?: {
1108
+ auth?: {
1109
+ methods?: ["password" | "email_code" | "github", ...("password" | "email_code" | "github")[]];
1110
+ signup?: "invite" | "open";
1111
+ };
1112
+ billing?: {
1113
+ enabled?: boolean;
1114
+ address?: string;
1115
+ };
1116
+ costs?: {
1117
+ display?: "none" | "usage" | "prices";
1118
+ };
1119
+ calls?: {
1120
+ transcripts?: {
1121
+ store?: boolean;
1122
+ retentionDays?: number;
1123
+ };
1124
+ recordings?: {
1125
+ store?: boolean;
1126
+ };
1127
+ };
1128
+ sip?: {
1129
+ names?: "domain" | "any";
1130
+ };
1131
+ };
1132
+ routr?: {
1133
+ apiEndpoint?: string;
1134
+ sipProxy?: string;
1135
+ roomrPeer?: {
1136
+ name?: string;
1137
+ aor?: string;
1138
+ username?: string;
1139
+ password?: string;
1140
+ };
1141
+ };
1142
+ nats?: {
1143
+ url?: string;
1144
+ password?: string;
1145
+ user?: string;
1146
+ };
1147
+ evaluations?: {
1148
+ credentials?: Record<string, string>;
1149
+ };
1150
+ templatesDir?: string;
1151
+ twilio?: {
1152
+ phoneNumber?: string;
1153
+ accountSid?: string;
1154
+ authToken?: string;
1155
+ };
1156
+ identity?: {
1157
+ keys?: {
1158
+ privateKey: string;
1159
+ publicKey: string;
1160
+ privateKeyPath: string;
1161
+ publicKeyPath: string;
1162
+ };
1163
+ owner?: {
1164
+ name?: string;
1165
+ email?: string;
1166
+ password? /**
1167
+ * host:port of Routr's SIP listener: API-originated calls are dialed through it
1168
+ * (CreateCall's to.proxy), as the roomr peer below (to.auth).
1169
+ */: string;
1170
+ };
1171
+ database?: {
1172
+ url?: string;
1173
+ };
1174
+ issuer?: string;
1175
+ audience?: string;
1176
+ tokens?: {
1177
+ accessTokenExpiresIn?: string;
1178
+ idTokenExpiresIn?: string;
1179
+ refreshTokenExpiresIn?: string;
1180
+ };
1181
+ security?: {
1182
+ contactVerificationRequired?: boolean;
1183
+ twoFactorAuthenticationRequired?: boolean;
1184
+ };
1185
+ invites?: {
1186
+ url?: string;
1187
+ failUrl?: string;
1188
+ expiration?: string;
1189
+ };
1190
+ oauth2?: {
1191
+ github?: {
1192
+ url?: string;
1193
+ clientId?: string;
1194
+ clientSecret?: string;
1195
+ apiUrl?: string;
1196
+ };
1197
+ };
1198
+ };
1199
+ callRecords?: {
1200
+ enabled?: boolean;
1201
+ stores?: ({
1202
+ dir?: string;
1203
+ } | {
1204
+ s3?: {
1205
+ bucket?: string;
1206
+ prefix?: string;
1207
+ region?: string;
1208
+ endpoint?: string;
1209
+ forcePathStyle?: boolean;
1210
+ credentials?: {
1211
+ accessKeyId?: string;
1212
+ secretAccessKey?: string;
1213
+ };
1214
+ };
1215
+ })[];
1216
+ retentionIntervalMinutes?: number;
1217
+ maintenanceTimeoutMs?: number;
1218
+ };
1219
+ apps?: {
1220
+ autopilotUrl?: string;
1221
+ autopilotSigningSecret?: string;
1222
+ allowInsecureWebhooks?: boolean;
1223
+ allowedDestinations?: string[];
1224
+ };
1225
+ webhooks?: {
1226
+ fanout?: boolean;
1227
+ intervalMs?: number;
1228
+ refreshMs?: number;
1229
+ };
1230
+ catalog?: {
1231
+ file?: string;
1232
+ files?: string[];
1233
+ };
1234
+ regions?: {
1235
+ public?: {
1236
+ id?: string;
1237
+ name?: string;
1238
+ default?: boolean;
1239
+ endpoints?: {
1240
+ sip?: {
1241
+ host?: string;
1242
+ port?: number;
1243
+ transport?: "udp" | "tcp" | "tls" | "ws" | "wss";
1244
+ }[];
1245
+ signalingAddresses?: string[];
1246
+ mediaAddresses?: string[];
1247
+ rtpPorts?: {
1248
+ min?: number;
1249
+ max?: number;
1250
+ };
1251
+ };
1252
+ }[];
1253
+ operatorKey?: string;
1254
+ privateRegionMonthlyFeeCents?: number;
1255
+ controlPlaneUrl?: string;
1256
+ leafUrl?: string;
1257
+ allowInsecureLeaf?: boolean;
1258
+ signingKey?: {
1259
+ file?: string;
1260
+ kid?: string;
1261
+ };
1262
+ hub?: {
1263
+ url?: string;
1264
+ credentialsFile?: string;
1265
+ systemCredentialsFile?: string;
1266
+ operatorSeedFile?: string;
1267
+ accountSeedFile?: string;
1268
+ };
1269
+ relay?: {
1270
+ firstChunkTimeoutMs?: number;
1271
+ idleTimeoutMs?: number;
1272
+ maxBytes?: number;
1273
+ maxConcurrent?: number;
1274
+ };
1275
+ currentVersion?: string;
1276
+ configDebounceMs?: number;
1277
+ };
1278
+ }, {
1279
+ domain?: string;
1280
+ appUrl?: string;
1281
+ signalingServer?: string;
1282
+ server?: {
1283
+ host?: string;
1284
+ bindAddr?: string;
1285
+ httpBridgePort?: number;
1286
+ };
1287
+ logs?: {
1288
+ format?: "text" | "json";
1289
+ level?: "error" | "warn" | "info" | "http" | "verbose" | "debug" | "silly";
1290
+ fluent?: {
1291
+ host?: string;
1292
+ port?: number;
1293
+ tagPrefix?: string;
1294
+ };
1295
+ transport?: "console" | "fluent";
1296
+ };
1297
+ telemetry?: {
1298
+ otlpEndpoint?: string;
1299
+ };
1300
+ database?: {
1301
+ url?: string;
1302
+ };
1303
+ encryption?: {
1304
+ key?: string;
1305
+ };
1306
+ smtp?: {
1307
+ user?: string;
1308
+ password?: string;
1309
+ host?: string;
1310
+ port?: number;
1311
+ secure?: boolean;
1312
+ sender?: string;
1313
+ };
1314
+ authz?: {
1315
+ enabled?: boolean;
1316
+ host?: string;
1317
+ port?: number;
1318
+ methods?: string[];
1319
+ };
1320
+ features?: {
1321
+ auth?: {
1322
+ methods?: ["password" | "email_code" | "github", ...("password" | "email_code" | "github")[]];
1323
+ signup?: "invite" | "open";
1324
+ };
1325
+ billing?: {
1326
+ enabled?: boolean;
1327
+ address?: string;
1328
+ };
1329
+ costs?: {
1330
+ display?: "none" | "usage" | "prices";
1331
+ };
1332
+ calls?: {
1333
+ transcripts?: {
1334
+ store?: boolean;
1335
+ retentionDays?: number;
1336
+ };
1337
+ recordings?: {
1338
+ store?: boolean;
1339
+ };
1340
+ };
1341
+ sip?: {
1342
+ names?: "domain" | "any";
1343
+ };
1344
+ };
1345
+ routr?: {
1346
+ apiEndpoint?: string;
1347
+ sipProxy?: string;
1348
+ roomrPeer?: {
1349
+ name?: string;
1350
+ aor?: string;
1351
+ username?: string;
1352
+ password?: string;
1353
+ };
1354
+ };
1355
+ nats?: {
1356
+ url?: string;
1357
+ password?: string;
1358
+ user?: string;
1359
+ };
1360
+ evaluations?: {
1361
+ credentials?: Record<string, string>;
1362
+ };
1363
+ templatesDir?: string;
1364
+ twilio?: {
1365
+ phoneNumber?: string;
1366
+ accountSid?: string;
1367
+ authToken?: string;
1368
+ };
1369
+ identity?: {
1370
+ keys?: {
1371
+ privateKey?: string;
1372
+ publicKey?: string;
1373
+ privateKeyPath?: string;
1374
+ publicKeyPath?: string;
1375
+ };
1376
+ owner?: {
1377
+ name?: string;
1378
+ email?: string;
1379
+ password?: string;
1380
+ };
1381
+ database?: {
1382
+ url?: string;
1383
+ };
1384
+ issuer?: string;
1385
+ audience?: string;
1386
+ tokens?: {
1387
+ accessTokenExpiresIn?: string;
1388
+ idTokenExpiresIn?: string;
1389
+ refreshTokenExpiresIn?: string;
1390
+ };
1391
+ security?: {
1392
+ contactVerificationRequired?: boolean;
1393
+ twoFactorAuthenticationRequired?: boolean;
1394
+ };
1395
+ invites?: {
1396
+ url?: string;
1397
+ failUrl?: string;
1398
+ expiration?: string;
1399
+ };
1400
+ oauth2?: {
1401
+ github?: {
1402
+ url?: string;
1403
+ clientId?: string;
1404
+ clientSecret?: string;
1405
+ apiUrl?: string;
1406
+ };
1407
+ };
1408
+ };
1409
+ callRecords?: {
1410
+ enabled?: boolean;
1411
+ stores?: ({
1412
+ dir?: string;
1413
+ } | {
1414
+ s3?: {
1415
+ bucket?: string;
1416
+ prefix?: string;
1417
+ region?: string;
1418
+ endpoint?: string;
1419
+ forcePathStyle?: boolean;
1420
+ credentials?: {
1421
+ accessKeyId?: string;
1422
+ secretAccessKey?: string;
1423
+ };
1424
+ };
1425
+ })[];
1426
+ retentionIntervalMinutes?: number;
1427
+ maintenanceTimeoutMs?: number;
1428
+ };
1429
+ apps?: {
1430
+ autopilotUrl?: string;
1431
+ autopilotSigningSecret?: string;
1432
+ allowInsecureWebhooks?: boolean;
1433
+ allowedDestinations?: string[];
1434
+ };
1435
+ webhooks?: {
1436
+ fanout?: boolean;
1437
+ intervalMs?: number;
1438
+ refreshMs?: number;
1439
+ };
1440
+ catalog?: {
1441
+ file?: string;
1442
+ files?: string[];
1443
+ };
1444
+ regions?: {
1445
+ public?: {
1446
+ id?: string;
1447
+ name?: string;
1448
+ default?: boolean;
1449
+ endpoints?: {
1450
+ sip?: {
1451
+ host?: string;
1452
+ port?: number;
1453
+ transport?: "udp" | "tcp" | "tls" | "ws" | "wss";
1454
+ }[];
1455
+ signalingAddresses?: string[];
1456
+ mediaAddresses?: string[];
1457
+ rtpPorts?: {
1458
+ min?: number;
1459
+ max?: number;
1460
+ };
1461
+ };
1462
+ }[];
1463
+ operatorKey?: string;
1464
+ privateRegionMonthlyFeeCents?: number;
1465
+ controlPlaneUrl?: string;
1466
+ leafUrl?: string;
1467
+ allowInsecureLeaf?: boolean;
1468
+ signingKey?: {
1469
+ file?: string;
1470
+ kid?: string;
1471
+ };
1472
+ hub?: {
1473
+ url?: string;
1474
+ credentialsFile?: string;
1475
+ systemCredentialsFile?: string;
1476
+ operatorSeedFile?: string;
1477
+ accountSeedFile?: string;
1478
+ };
1479
+ relay?: {
1480
+ firstChunkTimeoutMs?: number;
1481
+ idleTimeoutMs?: number;
1482
+ maxBytes?: number;
1483
+ maxConcurrent?: number;
1484
+ };
1485
+ currentVersion?: string;
1486
+ configDebounceMs?: number;
1487
+ };
1488
+ }>, {
1489
+ domain?: string;
1490
+ appUrl?: string;
1491
+ signalingServer?: string;
1492
+ server?: {
1493
+ host?: string;
1494
+ bindAddr?: string;
1495
+ httpBridgePort?: number;
1496
+ };
1497
+ logs?: {
1498
+ format?: "text" | "json";
1499
+ level?: "error" | "warn" | "info" | "http" | "verbose" | "debug" | "silly";
1500
+ fluent?: {
1501
+ host?: string;
1502
+ port?: number;
1503
+ tagPrefix?: string;
1504
+ };
1505
+ transport?: "console" | "fluent";
1506
+ };
1507
+ telemetry?: {
1508
+ otlpEndpoint?: string;
1509
+ };
1510
+ database?: {
1511
+ url?: string;
1512
+ };
1513
+ encryption?: {
1514
+ key?: string;
1515
+ };
1516
+ smtp?: {
1517
+ user?: string;
1518
+ password?: string;
1519
+ host?: string;
1520
+ port?: number;
1521
+ secure?: boolean;
1522
+ sender?: string;
1523
+ };
1524
+ authz?: {
1525
+ enabled?: boolean;
1526
+ host?: string;
1527
+ port?: number;
1528
+ methods?: string[];
1529
+ };
1530
+ features?: {
1531
+ auth?: {
1532
+ methods?: ["password" | "email_code" | "github", ...("password" | "email_code" | "github")[]];
1533
+ signup?: "invite" | "open";
1534
+ };
1535
+ billing?: {
1536
+ enabled?: boolean;
1537
+ address?: string;
1538
+ };
1539
+ costs?: {
1540
+ display?: "none" | "usage" | "prices";
1541
+ };
1542
+ calls?: {
1543
+ transcripts?: {
1544
+ store?: boolean;
1545
+ retentionDays?: number;
1546
+ };
1547
+ recordings?: {
1548
+ store?: boolean;
1549
+ };
1550
+ };
1551
+ sip?: {
1552
+ names?: "domain" | "any";
1553
+ };
1554
+ };
1555
+ routr?: {
1556
+ apiEndpoint?: string;
1557
+ sipProxy?: string;
1558
+ roomrPeer?: {
1559
+ name?: string;
1560
+ aor?: string;
1561
+ username?: string;
1562
+ password?: string;
1563
+ };
1564
+ };
1565
+ nats?: {
1566
+ url?: string;
1567
+ password?: string;
1568
+ user?: string;
1569
+ };
1570
+ evaluations?: {
1571
+ credentials?: Record<string, string>;
1572
+ };
1573
+ templatesDir?: string;
1574
+ twilio?: {
1575
+ phoneNumber?: string;
1576
+ accountSid?: string;
1577
+ authToken?: string;
1578
+ };
1579
+ identity?: {
1580
+ keys?: {
1581
+ privateKey: string;
1582
+ publicKey: string;
1583
+ privateKeyPath: string;
1584
+ publicKeyPath: string;
1585
+ };
1586
+ owner?: {
1587
+ name?: string;
1588
+ email?: string;
1589
+ password? /**
1590
+ * host:port of Routr's SIP listener: API-originated calls are dialed through it
1591
+ * (CreateCall's to.proxy), as the roomr peer below (to.auth).
1592
+ */: string;
1593
+ };
1594
+ database?: {
1595
+ url?: string;
1596
+ };
1597
+ issuer?: string;
1598
+ audience?: string;
1599
+ tokens?: {
1600
+ accessTokenExpiresIn?: string;
1601
+ idTokenExpiresIn?: string;
1602
+ refreshTokenExpiresIn?: string;
1603
+ };
1604
+ security?: {
1605
+ contactVerificationRequired?: boolean;
1606
+ twoFactorAuthenticationRequired?: boolean;
1607
+ };
1608
+ invites?: {
1609
+ url?: string;
1610
+ failUrl?: string;
1611
+ expiration?: string;
1612
+ };
1613
+ oauth2?: {
1614
+ github?: {
1615
+ url?: string;
1616
+ clientId?: string;
1617
+ clientSecret?: string;
1618
+ apiUrl?: string;
1619
+ };
1620
+ };
1621
+ };
1622
+ callRecords?: {
1623
+ enabled?: boolean;
1624
+ stores?: ({
1625
+ dir?: string;
1626
+ } | {
1627
+ s3?: {
1628
+ bucket?: string;
1629
+ prefix?: string;
1630
+ region?: string;
1631
+ endpoint?: string;
1632
+ forcePathStyle?: boolean;
1633
+ credentials?: {
1634
+ accessKeyId?: string;
1635
+ secretAccessKey?: string;
1636
+ };
1637
+ };
1638
+ })[];
1639
+ retentionIntervalMinutes?: number;
1640
+ maintenanceTimeoutMs?: number;
1641
+ };
1642
+ apps?: {
1643
+ autopilotUrl?: string;
1644
+ autopilotSigningSecret?: string;
1645
+ allowInsecureWebhooks?: boolean;
1646
+ allowedDestinations?: string[];
1647
+ };
1648
+ webhooks?: {
1649
+ fanout?: boolean;
1650
+ intervalMs?: number;
1651
+ refreshMs?: number;
1652
+ };
1653
+ catalog?: {
1654
+ file?: string;
1655
+ files?: string[];
1656
+ };
1657
+ regions?: {
1658
+ public?: {
1659
+ id?: string;
1660
+ name?: string;
1661
+ default?: boolean;
1662
+ endpoints?: {
1663
+ sip?: {
1664
+ host?: string;
1665
+ port?: number;
1666
+ transport?: "udp" | "tcp" | "tls" | "ws" | "wss";
1667
+ }[];
1668
+ signalingAddresses?: string[];
1669
+ mediaAddresses?: string[];
1670
+ rtpPorts?: {
1671
+ min?: number;
1672
+ max?: number;
1673
+ };
1674
+ };
1675
+ }[];
1676
+ operatorKey?: string;
1677
+ privateRegionMonthlyFeeCents?: number;
1678
+ controlPlaneUrl?: string;
1679
+ leafUrl?: string;
1680
+ allowInsecureLeaf?: boolean;
1681
+ signingKey?: {
1682
+ file?: string;
1683
+ kid?: string;
1684
+ };
1685
+ hub?: {
1686
+ url?: string;
1687
+ credentialsFile?: string;
1688
+ systemCredentialsFile?: string;
1689
+ operatorSeedFile?: string;
1690
+ accountSeedFile?: string;
1691
+ };
1692
+ relay?: {
1693
+ firstChunkTimeoutMs?: number;
1694
+ idleTimeoutMs?: number;
1695
+ maxBytes?: number;
1696
+ maxConcurrent?: number;
1697
+ };
1698
+ currentVersion?: string;
1699
+ configDebounceMs?: number;
1700
+ };
1701
+ }, {
1702
+ domain?: string;
1703
+ appUrl?: string;
1704
+ signalingServer?: string;
1705
+ server?: {
1706
+ host?: string;
1707
+ bindAddr?: string;
1708
+ httpBridgePort?: number;
1709
+ };
1710
+ logs?: {
1711
+ format?: "text" | "json";
1712
+ level?: "error" | "warn" | "info" | "http" | "verbose" | "debug" | "silly";
1713
+ fluent?: {
1714
+ host?: string;
1715
+ port?: number;
1716
+ tagPrefix?: string;
1717
+ };
1718
+ transport?: "console" | "fluent";
1719
+ };
1720
+ telemetry?: {
1721
+ otlpEndpoint?: string;
1722
+ };
1723
+ database?: {
1724
+ url?: string;
1725
+ };
1726
+ encryption?: {
1727
+ key?: string;
1728
+ };
1729
+ smtp?: {
1730
+ user?: string;
1731
+ password?: string;
1732
+ host?: string;
1733
+ port?: number;
1734
+ secure?: boolean;
1735
+ sender?: string;
1736
+ };
1737
+ authz?: {
1738
+ enabled?: boolean;
1739
+ host?: string;
1740
+ port?: number;
1741
+ methods?: string[];
1742
+ };
1743
+ features?: {
1744
+ auth?: {
1745
+ methods?: ["password" | "email_code" | "github", ...("password" | "email_code" | "github")[]];
1746
+ signup?: "invite" | "open";
1747
+ };
1748
+ billing?: {
1749
+ enabled?: boolean;
1750
+ address?: string;
1751
+ };
1752
+ costs?: {
1753
+ display?: "none" | "usage" | "prices";
1754
+ };
1755
+ calls?: {
1756
+ transcripts?: {
1757
+ store?: boolean;
1758
+ retentionDays?: number;
1759
+ };
1760
+ recordings?: {
1761
+ store?: boolean;
1762
+ };
1763
+ };
1764
+ sip?: {
1765
+ names?: "domain" | "any";
1766
+ };
1767
+ };
1768
+ routr?: {
1769
+ apiEndpoint?: string;
1770
+ sipProxy?: string;
1771
+ roomrPeer?: {
1772
+ name?: string;
1773
+ aor?: string;
1774
+ username?: string;
1775
+ password?: string;
1776
+ };
1777
+ };
1778
+ nats?: {
1779
+ url?: string;
1780
+ password?: string;
1781
+ user?: string;
1782
+ };
1783
+ evaluations?: {
1784
+ credentials?: Record<string, string>;
1785
+ };
1786
+ templatesDir?: string;
1787
+ twilio?: {
1788
+ phoneNumber?: string;
1789
+ accountSid?: string;
1790
+ authToken?: string;
1791
+ };
1792
+ identity?: {
1793
+ keys?: {
1794
+ privateKey?: string;
1795
+ publicKey?: string;
1796
+ privateKeyPath?: string;
1797
+ publicKeyPath?: string;
1798
+ };
1799
+ owner?: {
1800
+ name?: string;
1801
+ email?: string;
1802
+ password?: string;
1803
+ };
1804
+ database?: {
1805
+ url?: string;
1806
+ };
1807
+ issuer?: string;
1808
+ audience?: string;
1809
+ tokens?: {
1810
+ accessTokenExpiresIn?: string;
1811
+ idTokenExpiresIn?: string;
1812
+ refreshTokenExpiresIn?: string;
1813
+ };
1814
+ security?: {
1815
+ contactVerificationRequired?: boolean;
1816
+ twoFactorAuthenticationRequired?: boolean;
1817
+ };
1818
+ invites?: {
1819
+ url?: string;
1820
+ failUrl?: string;
1821
+ expiration?: string;
1822
+ };
1823
+ oauth2?: {
1824
+ github?: {
1825
+ url?: string;
1826
+ clientId?: string;
1827
+ clientSecret?: string;
1828
+ apiUrl?: string;
1829
+ };
1830
+ };
1831
+ };
1832
+ callRecords?: {
1833
+ enabled?: boolean;
1834
+ stores?: ({
1835
+ dir?: string;
1836
+ } | {
1837
+ s3?: {
1838
+ bucket?: string;
1839
+ prefix?: string;
1840
+ region?: string;
1841
+ endpoint?: string;
1842
+ forcePathStyle?: boolean;
1843
+ credentials?: {
1844
+ accessKeyId?: string;
1845
+ secretAccessKey?: string;
1846
+ };
1847
+ };
1848
+ })[];
1849
+ retentionIntervalMinutes?: number;
1850
+ maintenanceTimeoutMs?: number;
1851
+ };
1852
+ apps?: {
1853
+ autopilotUrl?: string;
1854
+ autopilotSigningSecret?: string;
1855
+ allowInsecureWebhooks?: boolean;
1856
+ allowedDestinations?: string[];
1857
+ };
1858
+ webhooks?: {
1859
+ fanout?: boolean;
1860
+ intervalMs?: number;
1861
+ refreshMs?: number;
1862
+ };
1863
+ catalog?: {
1864
+ file?: string;
1865
+ files?: string[];
1866
+ };
1867
+ regions?: {
1868
+ public?: {
1869
+ id?: string;
1870
+ name?: string;
1871
+ default?: boolean;
1872
+ endpoints?: {
1873
+ sip?: {
1874
+ host?: string;
1875
+ port?: number;
1876
+ transport?: "udp" | "tcp" | "tls" | "ws" | "wss";
1877
+ }[];
1878
+ signalingAddresses?: string[];
1879
+ mediaAddresses?: string[];
1880
+ rtpPorts?: {
1881
+ min?: number;
1882
+ max?: number;
1883
+ };
1884
+ };
1885
+ }[];
1886
+ operatorKey?: string;
1887
+ privateRegionMonthlyFeeCents?: number;
1888
+ controlPlaneUrl?: string;
1889
+ leafUrl?: string;
1890
+ allowInsecureLeaf?: boolean;
1891
+ signingKey?: {
1892
+ file?: string;
1893
+ kid?: string;
1894
+ };
1895
+ hub?: {
1896
+ url?: string;
1897
+ credentialsFile?: string;
1898
+ systemCredentialsFile?: string;
1899
+ operatorSeedFile?: string;
1900
+ accountSeedFile?: string;
1901
+ };
1902
+ relay?: {
1903
+ firstChunkTimeoutMs?: number;
1904
+ idleTimeoutMs?: number;
1905
+ maxBytes?: number;
1906
+ maxConcurrent?: number;
1907
+ };
1908
+ currentVersion?: string;
1909
+ configDebounceMs?: number;
1910
+ };
1911
+ }>;
1912
+ type FonosterConfig = z.infer<typeof fonosterConfigSchema>;
1913
+ /** Paths where ${VAR} may reference a value shared with another container. */
1914
+ /**
1915
+ * Where `${VAR}` may appear: every key (unify-config-placeholders). Secrets stay in `.env` and
1916
+ * reach the container through Compose's env_file.
1917
+ */
1918
+ declare const SHARED_VALUE_PATHS: string[];
1919
+ export { featuresSchema, fonosterConfigSchema, FonosterConfig, SHARED_VALUE_PATHS };