@fonoster/apiserver 0.9.20 → 0.9.23

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 (181) hide show
  1. package/dist/applications/buildService.d.ts +18 -0
  2. package/dist/applications/buildService.js +0 -18
  3. package/dist/applications/createCreateApplication.d.ts +18 -0
  4. package/dist/applications/createCreateApplication.js +2 -2
  5. package/dist/applications/createDeleteApplication.js +1 -1
  6. package/dist/applications/createGetApplication.js +2 -2
  7. package/dist/applications/createGetFnUtil.d.ts +3 -3
  8. package/dist/applications/createGetFnUtil.js +1 -1
  9. package/dist/applications/createListApplications.d.ts +18 -0
  10. package/dist/applications/createListApplications.js +1 -1
  11. package/dist/applications/createUpdateApplication.js +2 -2
  12. package/dist/applications/index.d.ts +18 -0
  13. package/dist/applications/index.js +1 -1
  14. package/dist/applications/types.d.ts +18 -0
  15. package/dist/applications/utils/applicationWithEncodedStruct.js +1 -1
  16. package/dist/applications/utils/convertToApplicationData.d.ts +18 -0
  17. package/dist/applications/validation/assistantWithoutApiKeySchema.js +1 -1
  18. package/dist/applications/validation/createValidationSchema.d.ts +4 -4
  19. package/dist/applications/validation/createValidationSchema.js +2 -2
  20. package/dist/applications/validation/prepareForValidation.d.ts +18 -0
  21. package/dist/applications/validation/speechValidators.d.ts +18 -0
  22. package/dist/applications/validation/speechValidators.js +1 -1
  23. package/dist/applications/validation/validOrThrow.d.ts +18 -0
  24. package/dist/calls/buildService.d.ts +18 -0
  25. package/dist/calls/buildService.js +3 -21
  26. package/dist/calls/createCall.d.ts +19 -1
  27. package/dist/calls/createCall.js +1 -1
  28. package/dist/calls/createCallPublisher.js +1 -1
  29. package/dist/calls/createFetchCalls.d.ts +19 -1
  30. package/dist/calls/createFetchCalls.js +2 -2
  31. package/dist/calls/createFetchSingleCall.d.ts +19 -1
  32. package/dist/calls/createFetchSingleCall.js +2 -2
  33. package/dist/calls/createTrackCall.js +1 -1
  34. package/dist/calls/getCall.d.ts +18 -0
  35. package/dist/calls/getCall.js +2 -2
  36. package/dist/calls/index.d.ts +18 -0
  37. package/dist/calls/index.js +1 -1
  38. package/dist/calls/influxdb.js +1 -1
  39. package/dist/calls/listCalls.d.ts +18 -0
  40. package/dist/calls/listCalls.js +1 -1
  41. package/dist/calls/runCallManager.js +1 -1
  42. package/dist/calls/types.d.ts +18 -0
  43. package/dist/core/allowList.d.ts +18 -0
  44. package/dist/core/allowList.js +1 -1
  45. package/dist/core/badRequestError.d.ts +18 -0
  46. package/dist/core/badRequestError.js +1 -1
  47. package/dist/core/buildWelcomeDemoService.d.ts +18 -0
  48. package/dist/core/buildWelcomeDemoService.js +1 -1
  49. package/dist/core/db.js +1 -1
  50. package/dist/core/httpBridge.d.ts +18 -0
  51. package/dist/core/identityConfig.d.ts +2 -1
  52. package/dist/core/identityConfig.js +3 -2
  53. package/dist/core/loadServices.d.ts +18 -0
  54. package/dist/core/loadServices.js +1 -1
  55. package/dist/core/notFoundError.d.ts +18 -0
  56. package/dist/core/notFoundError.js +1 -1
  57. package/dist/core/removeSwaggerNotice.js +1 -2
  58. package/dist/core/routrConfig.js +1 -1
  59. package/dist/core/runServices.js +6 -6
  60. package/dist/core/seed.js +1 -1
  61. package/dist/core/services.js +4 -4
  62. package/dist/core/upsertDefaultPeer.d.ts +0 -1
  63. package/dist/core/upsertDefaultPeer.js +2 -3
  64. package/dist/envs.d.ts +2 -1
  65. package/dist/envs.js +10 -8
  66. package/dist/events/createInfluxDbPub.js +1 -1
  67. package/dist/events/mapCallDirectionToEnum.d.ts +18 -0
  68. package/dist/events/mapCallDirectionToEnum.js +1 -1
  69. package/dist/events/nats.js +1 -1
  70. package/dist/events/transformEvent.js +2 -2
  71. package/dist/events/types.d.ts +18 -0
  72. package/dist/index.d.ts +0 -1
  73. package/dist/index.js +2 -21
  74. package/dist/secrets/buildService.d.ts +18 -0
  75. package/dist/secrets/buildService.js +0 -18
  76. package/dist/secrets/createGetFnUtil.d.ts +2 -2
  77. package/dist/secrets/createGetFnUtil.js +1 -1
  78. package/dist/secrets/createSecret.d.ts +18 -0
  79. package/dist/secrets/createSecret.js +1 -1
  80. package/dist/secrets/deleteSecret.js +2 -2
  81. package/dist/secrets/getSecret.js +2 -2
  82. package/dist/secrets/index.d.ts +18 -0
  83. package/dist/secrets/index.js +1 -1
  84. package/dist/secrets/listSecrets.d.ts +18 -0
  85. package/dist/secrets/listSecrets.js +1 -1
  86. package/dist/secrets/updateSecret.js +2 -2
  87. package/dist/utils/createCheckNumberPreconditions.js +1 -1
  88. package/dist/utils/createHandleDialEventsWithNats.d.ts +18 -0
  89. package/dist/utils/createHandleDialEventsWithNats.js +1 -1
  90. package/dist/utils/createHandleDialEventsWithVoiceClient.d.ts +18 -0
  91. package/dist/utils/createHandleDialEventsWithVoiceClient.js +0 -18
  92. package/dist/utils/index.d.ts +18 -0
  93. package/dist/utils/index.js +1 -1
  94. package/dist/utils/mapDialStatus.d.ts +18 -0
  95. package/dist/utils/mapDialStatus.js +1 -1
  96. package/dist/utils/withErrorHandlingAndValidationAndAccess.js +1 -2
  97. package/dist/voice/VoiceClientImpl.d.ts +18 -0
  98. package/dist/voice/VoiceClientImpl.js +3 -4
  99. package/dist/voice/VoiceDispatcher.js +2 -2
  100. package/dist/voice/connectToAri.js +4 -4
  101. package/dist/voice/createCreateVoiceClient.js +3 -3
  102. package/dist/voice/errors/ChannelVarNotFoundError.d.ts +18 -0
  103. package/dist/voice/errors/MethodNotImplementedError.d.ts +18 -0
  104. package/dist/voice/errors/MethodNotImplementedError.js +1 -1
  105. package/dist/voice/errors/index.d.ts +18 -0
  106. package/dist/voice/errors/index.js +1 -1
  107. package/dist/voice/handlers/createAnswerHandler.d.ts +18 -0
  108. package/dist/voice/handlers/createHangupHandler.d.ts +18 -0
  109. package/dist/voice/handlers/createPlaybackControlHandler.js +1 -1
  110. package/dist/voice/handlers/createRecordHandler.js +1 -1
  111. package/dist/voice/handlers/createSayHandler.js +1 -1
  112. package/dist/voice/handlers/createStreamGatherHandler.js +1 -1
  113. package/dist/voice/handlers/createStreamHandler.js +1 -1
  114. package/dist/voice/handlers/dial/createDialHandler.d.ts +18 -0
  115. package/dist/voice/handlers/dial/createDialHandler.js +4 -4
  116. package/dist/voice/handlers/dial/handleChannelLeftBridge.d.ts +18 -0
  117. package/dist/voice/handlers/dial/handleStasisEnd.d.ts +18 -0
  118. package/dist/voice/handlers/dial/handleStasisStart.d.ts +18 -0
  119. package/dist/voice/handlers/dial/handleStasisStart.js +1 -1
  120. package/dist/voice/handlers/dial/index.d.ts +18 -0
  121. package/dist/voice/handlers/dial/index.js +1 -1
  122. package/dist/voice/handlers/dial/recordChannel.d.ts +18 -0
  123. package/dist/voice/handlers/dial/recordChannel.js +1 -1
  124. package/dist/voice/handlers/gather/createGatherHandler.js +2 -2
  125. package/dist/voice/handlers/gather/getTimeoutPromise.d.ts +18 -0
  126. package/dist/voice/handlers/index.d.ts +18 -0
  127. package/dist/voice/handlers/index.js +1 -1
  128. package/dist/voice/handlers/utils/awaitForPlaybackFinished.d.ts +18 -0
  129. package/dist/voice/handlers/utils/awaitForRecordingFinished.js +1 -1
  130. package/dist/voice/handlers/utils/index.d.ts +18 -0
  131. package/dist/voice/handlers/utils/index.js +1 -1
  132. package/dist/voice/handlers/utils/isDtmf.d.ts +18 -0
  133. package/dist/voice/handlers/utils/isDtmf.js +1 -1
  134. package/dist/voice/handlers/utils/textChunksByClause.js +1 -2
  135. package/dist/voice/handlers/utils/textChunksByFirstNaturalPause.js +1 -2
  136. package/dist/voice/handlers/utils/withErrorHandling.d.ts +18 -0
  137. package/dist/voice/integrations/ApplicationNotFoundError.d.ts +18 -0
  138. package/dist/voice/integrations/ApplicationNotFoundError.js +1 -1
  139. package/dist/voice/integrations/createCreateContainer.d.ts +1 -1
  140. package/dist/voice/integrations/createCreateContainer.js +5 -5
  141. package/dist/voice/integrations/getSttConfig.d.ts +18 -0
  142. package/dist/voice/integrations/getSttConfig.js +1 -1
  143. package/dist/voice/integrations/getTtsConfig.js +18 -0
  144. package/dist/voice/integrations/index.d.ts +18 -0
  145. package/dist/voice/integrations/index.js +1 -1
  146. package/dist/voice/integrations/types.d.ts +18 -0
  147. package/dist/voice/stt/AbstractSpeechToText.d.ts +19 -1
  148. package/dist/voice/stt/Deepgram.d.ts +19 -1
  149. package/dist/voice/stt/Deepgram.js +4 -3
  150. package/dist/voice/stt/Google.d.ts +1 -1
  151. package/dist/voice/stt/Google.js +19 -1
  152. package/dist/voice/stt/SpeechToTextFactory.js +1 -1
  153. package/dist/voice/stt/types.d.ts +18 -0
  154. package/dist/voice/transcribeOnConnection.d.ts +18 -0
  155. package/dist/voice/tts/AbstractTextToSpeech.d.ts +18 -0
  156. package/dist/voice/tts/Azure.d.ts +18 -0
  157. package/dist/voice/tts/Azure.js +1 -1
  158. package/dist/voice/tts/Deepgram.d.ts +18 -0
  159. package/dist/voice/tts/Deepgram.js +2 -3
  160. package/dist/voice/tts/ElevenLabs.d.ts +18 -0
  161. package/dist/voice/tts/ElevenLabs.js +2 -2
  162. package/dist/voice/tts/Google.d.ts +18 -0
  163. package/dist/voice/tts/Google.js +1 -1
  164. package/dist/voice/tts/TextToSpeechFactory.js +1 -1
  165. package/dist/voice/tts/isSsml.d.ts +18 -0
  166. package/dist/voice/tts/isSsml.js +1 -1
  167. package/dist/voice/tts/streamToBuffer.d.ts +18 -0
  168. package/dist/voice/tts/streamToBuffer.js +1 -2
  169. package/dist/voice/tts/types.d.ts +18 -0
  170. package/dist/voice/types/ari.d.ts +18 -0
  171. package/dist/voice/types/ari.js +1 -1
  172. package/dist/voice/types/index.d.ts +18 -0
  173. package/dist/voice/types/index.js +1 -1
  174. package/dist/voice/types/voice.d.ts +18 -0
  175. package/dist/voice/utils/VoiceServiceClientConstructor.js +1 -1
  176. package/dist/voice/utils/createExternalMediaConfig.js +1 -1
  177. package/dist/voice/utils/createGetChannelVar.d.ts +18 -0
  178. package/dist/voice/utils/createGetChannelVarWithoutThrow.d.ts +18 -0
  179. package/dist/voice/utils/index.d.ts +18 -0
  180. package/dist/voice/utils/index.js +1 -1
  181. package/package.json +9 -9
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  type RegisterEvent = {
2
20
  aor: string;
3
21
  registeredAt: Date;
package/dist/index.d.ts CHANGED
@@ -1,2 +1 @@
1
- #!/usr/bin/env node
2
1
  export {};
package/dist/index.js CHANGED
@@ -1,4 +1,3 @@
1
- #!/usr/bin/env node
2
1
  "use strict";
3
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
3
  if (k2 === undefined) k2 = k;
@@ -46,34 +45,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
46
45
  return (mod && mod.__esModule) ? mod : { "default": mod };
47
46
  };
48
47
  Object.defineProperty(exports, "__esModule", { value: true });
49
- /*
50
- * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
51
- * http://github.com/fonoster/fonoster
52
- *
53
- * This file is part of Fonoster
54
- *
55
- * Licensed under the MIT License (the "License");
56
- * you may not use this file except in compliance with
57
- * the License. You may obtain a copy of the License at
58
- *
59
- * https://opensource.org/licenses/MIT
60
- *
61
- * Unless required by applicable law or agreed to in writing, software
62
- * distributed under the License is distributed on an "AS IS" BASIS,
63
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
64
- * See the License for the specific language governing permissions and
65
- * limitations under the License.
66
- */
48
+ const common_1 = require("@fonoster/common");
67
49
  const identity_1 = require("@fonoster/identity");
68
50
  const logger_1 = require("@fonoster/logger");
51
+ const identityConfig_1 = require("./core/identityConfig");
69
52
  const runServices_1 = __importDefault(require("./core/runServices"));
70
53
  const upsertDefaultPeer_1 = require("./core/upsertDefaultPeer");
71
54
  const envs_1 = require("./envs");
72
55
  const createInfluxDbPub_1 = require("./events/createInfluxDbPub");
73
56
  const nats_1 = require("./events/nats");
74
57
  const transformEvent_1 = require("./events/transformEvent");
75
- const common_1 = require("@fonoster/common");
76
- const identityConfig_1 = require("./core/identityConfig");
77
58
  Promise.resolve().then(() => __importStar(require("./core/removeSwaggerNotice")));
78
59
  function main() {
79
60
  return __awaiter(this, void 0, void 0, function* () {
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  import { Prisma } from "../core/db";
2
20
  declare function buildService(prisma: Prisma): {
3
21
  definition: {
@@ -1,24 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.buildService = buildService;
4
- /*
5
- * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
- * http://github.com/fonoster/fonoster
7
- *
8
- * This file is part of Fonoster
9
- *
10
- * Licensed under the MIT License (the "License");
11
- * you may not use this file except in compliance with
12
- * the License. You may obtain a copy of the License at
13
- *
14
- * https://opensource.org/licenses/MIT
15
- *
16
- * Unless required by applicable law or agreed to in writing, software
17
- * distributed under the License is distributed on an "AS IS" BASIS,
18
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
- * See the License for the specific language governing permissions and
20
- * limitations under the License.
21
- */
22
4
  const createSecret_1 = require("./createSecret");
23
5
  const deleteSecret_1 = require("./deleteSecret");
24
6
  const getSecret_1 = require("./getSecret");
@@ -3,10 +3,10 @@ declare function createGetFnUtil(prisma: Prisma): (ref: string) => Promise<{
3
3
  extended: {
4
4
  accessKeyId: string;
5
5
  };
6
- secret: string;
7
- name: string;
8
6
  ref: string;
9
7
  accessKeyId: string;
8
+ secret: string;
9
+ name: string;
10
10
  createdAt: Date;
11
11
  updatedAt: Date;
12
12
  } & {
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.createGetFnUtil = createGetFnUtil;
13
- /*
13
+ /**
14
14
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
15
15
  * http://github.com/fonoster/fonoster
16
16
  *
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  import { GrpcErrorMessage } from "@fonoster/common";
2
20
  import { Prisma } from "../core/db";
3
21
  declare function createSecret(prisma: Prisma): (call: {
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.createSecret = createSecret;
13
- /*
13
+ /**
14
14
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
15
15
  * http://github.com/fonoster/fonoster
16
16
  *
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.deleteSecret = deleteSecret;
13
- /*
13
+ /**
14
14
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
15
15
  * http://github.com/fonoster/fonoster
16
16
  *
@@ -30,8 +30,8 @@ exports.deleteSecret = deleteSecret;
30
30
  */
31
31
  const common_1 = require("@fonoster/common");
32
32
  const logger_1 = require("@fonoster/logger");
33
- const createGetFnUtil_1 = require("./createGetFnUtil");
34
33
  const withErrorHandlingAndValidationAndAccess_1 = require("../utils/withErrorHandlingAndValidationAndAccess");
34
+ const createGetFnUtil_1 = require("./createGetFnUtil");
35
35
  const logger = (0, logger_1.getLogger)({ service: "apiserver", filePath: __filename });
36
36
  function deleteSecret(prisma) {
37
37
  const getFn = (0, createGetFnUtil_1.createGetFnUtil)(prisma);
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.getSecret = getSecret;
13
- /*
13
+ /**
14
14
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
15
15
  * http://github.com/fonoster/fonoster
16
16
  *
@@ -30,8 +30,8 @@ exports.getSecret = getSecret;
30
30
  */
31
31
  const common_1 = require("@fonoster/common");
32
32
  const logger_1 = require("@fonoster/logger");
33
- const createGetFnUtil_1 = require("./createGetFnUtil");
34
33
  const withErrorHandlingAndValidationAndAccess_1 = require("../utils/withErrorHandlingAndValidationAndAccess");
34
+ const createGetFnUtil_1 = require("./createGetFnUtil");
35
35
  const logger = (0, logger_1.getLogger)({ service: "apiserver", filePath: __filename });
36
36
  function getSecret(prisma) {
37
37
  const getFn = (0, createGetFnUtil_1.createGetFnUtil)(prisma);
@@ -1 +1,19 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  export { buildService as buildSecretsService } from "./buildService";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.buildSecretsService = void 0;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  import { GrpcErrorMessage } from "@fonoster/common";
2
20
  import { Prisma } from "../core/db";
3
21
  declare function listSecrets(prisma: Prisma): (call: {
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.listSecrets = listSecrets;
13
- /*
13
+ /**
14
14
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
15
15
  * http://github.com/fonoster/fonoster
16
16
  *
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.updateSecret = updateSecret;
13
- /*
13
+ /**
14
14
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
15
15
  * http://github.com/fonoster/fonoster
16
16
  *
@@ -30,8 +30,8 @@ exports.updateSecret = updateSecret;
30
30
  */
31
31
  const common_1 = require("@fonoster/common");
32
32
  const logger_1 = require("@fonoster/logger");
33
- const createGetFnUtil_1 = require("./createGetFnUtil");
34
33
  const withErrorHandlingAndValidationAndAccess_1 = require("../utils/withErrorHandlingAndValidationAndAccess");
34
+ const createGetFnUtil_1 = require("./createGetFnUtil");
35
35
  const logger = (0, logger_1.getLogger)({ service: "apiserver", filePath: __filename });
36
36
  function updateSecret(prisma) {
37
37
  const getFn = (0, createGetFnUtil_1.createGetFnUtil)(prisma);
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.createCheckNumberPreconditions = createCheckNumberPreconditions;
13
- /*
13
+ /**
14
14
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
15
15
  * http://github.com/fonoster/fonoster
16
16
  *
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  import { NatsConnection } from "nats";
2
20
  declare function createHandleDialEventsWithNats(nc: NatsConnection): (callRef: string, event: {
3
21
  dialstatus: string;
@@ -10,8 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.createHandleDialEventsWithNats = createHandleDialEventsWithNats;
13
- const mapDialStatus_1 = require("./mapDialStatus");
14
13
  const envs_1 = require("../envs");
14
+ const mapDialStatus_1 = require("./mapDialStatus");
15
15
  function createHandleDialEventsWithNats(nc) {
16
16
  return function handleDialEventsWithNats(callRef, event) {
17
17
  return __awaiter(this, void 0, void 0, function* () {
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  import { VoiceClient } from "../voice/types";
2
20
  declare function createHandleDialEventsWithVoiceClient(voiceClient: VoiceClient): (event: {
3
21
  dialstatus: string;
@@ -10,24 +10,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.createHandleDialEventsWithVoiceClient = createHandleDialEventsWithVoiceClient;
13
- /*
14
- * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
15
- * http://github.com/fonoster/fonoster
16
- *
17
- * This file is part of Fonoster
18
- *
19
- * Licensed under the MIT License (the "License");
20
- * you may not use this file except in compliance with
21
- * the License. You may obtain a copy of the License at
22
- *
23
- * https://opensource.org/licenses/MIT
24
- *
25
- * Unless required by applicable law or agreed to in writing, software
26
- * distributed under the License is distributed on an "AS IS" BASIS,
27
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28
- * See the License for the specific language governing permissions and
29
- * limitations under the License.
30
- */
31
13
  const mapDialStatus_1 = require("./mapDialStatus");
32
14
  function createHandleDialEventsWithVoiceClient(voiceClient) {
33
15
  return function handleDialEventsWithVoiceClient(event) {
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  export * from "./createCheckNumberPreconditions";
2
20
  export * from "./createHandleDialEventsWithNats";
3
21
  export * from "./createHandleDialEventsWithVoiceClient";
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- /*
17
+ /**
18
18
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
19
19
  * http://github.com/fonoster/fonoster
20
20
  *
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  import { DialStatus } from "@fonoster/common";
2
20
  declare function mapDialStatus(status: string): DialStatus | undefined;
3
21
  export { mapDialStatus };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.mapDialStatus = mapDialStatus;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.withErrorHandlingAndValidationAndAccess = withErrorHandlingAndValidationAndAccess;
4
- /* eslint-disable @typescript-eslint/ban-types */
5
- /*
4
+ /**
6
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
7
6
  * http://github.com/fonoster/fonoster
8
7
  *
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  import { Stream } from "stream";
2
20
  import { SayOptions, VoiceClientConfig, VoiceIn, VoiceSessionStreamClient } from "@fonoster/common";
3
21
  import { AudioSocket } from "@fonoster/streams";
@@ -43,8 +43,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
43
43
  };
44
44
  Object.defineProperty(exports, "__esModule", { value: true });
45
45
  exports.VoiceClientImpl = void 0;
46
- /* eslint-disable new-cap */
47
- /*
46
+ /**
48
47
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
49
48
  * http://github.com/fonoster/fonoster
50
49
  *
@@ -63,17 +62,17 @@ exports.VoiceClientImpl = void 0;
63
62
  * limitations under the License.
64
63
  */
65
64
  const stream_1 = require("stream");
65
+ const authz_1 = require("@fonoster/authz");
66
66
  const common_1 = require("@fonoster/common");
67
67
  const logger_1 = require("@fonoster/logger");
68
68
  const streams_1 = require("@fonoster/streams");
69
69
  const grpc = __importStar(require("@grpc/grpc-js"));
70
70
  const pick_port_1 = require("pick-port");
71
+ const envs_1 = require("../envs");
71
72
  const transcribeOnConnection_1 = require("./transcribeOnConnection");
72
73
  const types_1 = require("./types");
73
74
  const createExternalMediaConfig_1 = require("./utils/createExternalMediaConfig");
74
75
  const VoiceServiceClientConstructor_1 = require("./utils/VoiceServiceClientConstructor");
75
- const envs_1 = require("../envs");
76
- const authz_1 = require("@fonoster/authz");
77
76
  const logger = (0, logger_1.getLogger)({ service: "apiserver", filePath: __filename });
78
77
  class VoiceClientImpl {
79
78
  constructor(params, filesServer) {
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.VoiceDispatcher = void 0;
13
- /*
13
+ /**
14
14
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
15
15
  * http://github.com/fonoster/fonoster
16
16
  *
@@ -30,9 +30,9 @@ exports.VoiceDispatcher = void 0;
30
30
  */
31
31
  const common_1 = require("@fonoster/common");
32
32
  const logger_1 = require("@fonoster/logger");
33
+ const utils_1 = require("../utils");
33
34
  const handlers_1 = require("./handlers");
34
35
  const types_1 = require("./types");
35
- const utils_1 = require("../utils");
36
36
  const utils_2 = require("./utils");
37
37
  const logger = (0, logger_1.getLogger)({ service: "apiserver", filePath: __filename });
38
38
  class VoiceDispatcher {
@@ -13,7 +13,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.connectToAri = connectToAri;
16
- /*
16
+ /**
17
17
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
18
18
  * http://github.com/fonoster/fonoster
19
19
  *
@@ -35,12 +35,12 @@ const logger_1 = require("@fonoster/logger");
35
35
  const ari_client_1 = __importDefault(require("ari-client"));
36
36
  const nats_1 = require("nats");
37
37
  const wait_port_1 = __importDefault(require("wait-port"));
38
- const integrations_1 = require("./integrations");
38
+ const db_1 = require("../core/db");
39
+ const envs_1 = require("../envs");
39
40
  const createCreateVoiceClient_1 = require("./createCreateVoiceClient");
41
+ const integrations_1 = require("./integrations");
40
42
  const types_1 = require("./types");
41
43
  const VoiceDispatcher_1 = require("./VoiceDispatcher");
42
- const db_1 = require("../core/db");
43
- const envs_1 = require("../envs");
44
44
  const logger = (0, logger_1.getLogger)({ service: "apiserver", filePath: __filename });
45
45
  const connection = {
46
46
  host: envs_1.ASTERISK_ARI_PROXY_URL.split("//")[1].split(":")[0],
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.createCreateVoiceClient = createCreateVoiceClient;
13
- /*
13
+ /**
14
14
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
15
15
  * http://github.com/fonoster/fonoster
16
16
  *
@@ -30,11 +30,11 @@ exports.createCreateVoiceClient = createCreateVoiceClient;
30
30
  */
31
31
  const identity_1 = require("@fonoster/identity");
32
32
  const logger_1 = require("@fonoster/logger");
33
+ const identityConfig_1 = require("../core/identityConfig");
34
+ const mapCallDirectionToEnum_1 = require("../events/mapCallDirectionToEnum");
33
35
  const types_1 = require("./types");
34
36
  const createGetChannelVarWithoutThrow_1 = require("./utils/createGetChannelVarWithoutThrow");
35
37
  const VoiceClientImpl_1 = require("./VoiceClientImpl");
36
- const identityConfig_1 = require("../core/identityConfig");
37
- const mapCallDirectionToEnum_1 = require("../events/mapCallDirectionToEnum");
38
38
  const logger = (0, logger_1.getLogger)({ service: "apiserver", filePath: __filename });
39
39
  const generateCallAccessToken = (0, identity_1.createGenerateCallAccessToken)(identityConfig_1.identityConfig);
40
40
  // Note: By the time the call arrives here the owner of the app MUST be authenticated
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  import { ChannelVar } from "../types";
2
20
  declare class ChannelVarNotFoundError extends Error {
3
21
  constructor(variable: ChannelVar);
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  declare class MethodNotImplementedError extends Error {
2
20
  constructor();
3
21
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MethodNotImplementedError = void 0;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *