@fonoster/apiserver 0.9.19 → 0.9.22

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 (180) 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 +2 -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.js +1 -1
  52. package/dist/core/loadServices.d.ts +18 -0
  53. package/dist/core/loadServices.js +1 -1
  54. package/dist/core/notFoundError.d.ts +18 -0
  55. package/dist/core/notFoundError.js +1 -1
  56. package/dist/core/removeSwaggerNotice.js +1 -2
  57. package/dist/core/routrConfig.js +1 -1
  58. package/dist/core/runServices.js +6 -6
  59. package/dist/core/seed.js +1 -1
  60. package/dist/core/services.d.ts +3 -0
  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.js +4 -4
  65. package/dist/events/createInfluxDbPub.js +1 -1
  66. package/dist/events/mapCallDirectionToEnum.d.ts +18 -0
  67. package/dist/events/mapCallDirectionToEnum.js +1 -1
  68. package/dist/events/nats.js +1 -1
  69. package/dist/events/transformEvent.js +2 -2
  70. package/dist/events/types.d.ts +18 -0
  71. package/dist/index.d.ts +0 -1
  72. package/dist/index.js +2 -21
  73. package/dist/secrets/buildService.d.ts +18 -0
  74. package/dist/secrets/buildService.js +0 -18
  75. package/dist/secrets/createGetFnUtil.d.ts +2 -2
  76. package/dist/secrets/createGetFnUtil.js +1 -1
  77. package/dist/secrets/createSecret.d.ts +18 -0
  78. package/dist/secrets/createSecret.js +1 -1
  79. package/dist/secrets/deleteSecret.js +2 -2
  80. package/dist/secrets/getSecret.js +2 -2
  81. package/dist/secrets/index.d.ts +18 -0
  82. package/dist/secrets/index.js +1 -1
  83. package/dist/secrets/listSecrets.d.ts +18 -0
  84. package/dist/secrets/listSecrets.js +1 -1
  85. package/dist/secrets/updateSecret.js +2 -2
  86. package/dist/utils/createCheckNumberPreconditions.js +1 -1
  87. package/dist/utils/createHandleDialEventsWithNats.d.ts +18 -0
  88. package/dist/utils/createHandleDialEventsWithNats.js +1 -1
  89. package/dist/utils/createHandleDialEventsWithVoiceClient.d.ts +18 -0
  90. package/dist/utils/createHandleDialEventsWithVoiceClient.js +0 -18
  91. package/dist/utils/index.d.ts +18 -0
  92. package/dist/utils/index.js +1 -1
  93. package/dist/utils/mapDialStatus.d.ts +18 -0
  94. package/dist/utils/mapDialStatus.js +1 -1
  95. package/dist/utils/withErrorHandlingAndValidationAndAccess.js +1 -2
  96. package/dist/voice/VoiceClientImpl.d.ts +18 -0
  97. package/dist/voice/VoiceClientImpl.js +3 -4
  98. package/dist/voice/VoiceDispatcher.js +2 -2
  99. package/dist/voice/connectToAri.js +4 -4
  100. package/dist/voice/createCreateVoiceClient.js +3 -3
  101. package/dist/voice/errors/ChannelVarNotFoundError.d.ts +18 -0
  102. package/dist/voice/errors/MethodNotImplementedError.d.ts +18 -0
  103. package/dist/voice/errors/MethodNotImplementedError.js +1 -1
  104. package/dist/voice/errors/index.d.ts +18 -0
  105. package/dist/voice/errors/index.js +1 -1
  106. package/dist/voice/handlers/createAnswerHandler.d.ts +18 -0
  107. package/dist/voice/handlers/createHangupHandler.d.ts +18 -0
  108. package/dist/voice/handlers/createPlaybackControlHandler.js +1 -1
  109. package/dist/voice/handlers/createRecordHandler.js +1 -1
  110. package/dist/voice/handlers/createSayHandler.js +1 -1
  111. package/dist/voice/handlers/createStreamGatherHandler.js +1 -1
  112. package/dist/voice/handlers/createStreamHandler.js +1 -1
  113. package/dist/voice/handlers/dial/createDialHandler.d.ts +18 -0
  114. package/dist/voice/handlers/dial/createDialHandler.js +4 -4
  115. package/dist/voice/handlers/dial/handleChannelLeftBridge.d.ts +18 -0
  116. package/dist/voice/handlers/dial/handleStasisEnd.d.ts +18 -0
  117. package/dist/voice/handlers/dial/handleStasisStart.d.ts +18 -0
  118. package/dist/voice/handlers/dial/handleStasisStart.js +1 -1
  119. package/dist/voice/handlers/dial/index.d.ts +18 -0
  120. package/dist/voice/handlers/dial/index.js +1 -1
  121. package/dist/voice/handlers/dial/recordChannel.d.ts +18 -0
  122. package/dist/voice/handlers/dial/recordChannel.js +1 -1
  123. package/dist/voice/handlers/gather/createGatherHandler.js +2 -2
  124. package/dist/voice/handlers/gather/getTimeoutPromise.d.ts +18 -0
  125. package/dist/voice/handlers/index.d.ts +18 -0
  126. package/dist/voice/handlers/index.js +1 -1
  127. package/dist/voice/handlers/utils/awaitForPlaybackFinished.d.ts +18 -0
  128. package/dist/voice/handlers/utils/awaitForRecordingFinished.js +1 -1
  129. package/dist/voice/handlers/utils/index.d.ts +18 -0
  130. package/dist/voice/handlers/utils/index.js +1 -1
  131. package/dist/voice/handlers/utils/isDtmf.d.ts +18 -0
  132. package/dist/voice/handlers/utils/isDtmf.js +1 -1
  133. package/dist/voice/handlers/utils/textChunksByClause.js +1 -2
  134. package/dist/voice/handlers/utils/textChunksByFirstNaturalPause.js +1 -2
  135. package/dist/voice/handlers/utils/withErrorHandling.d.ts +18 -0
  136. package/dist/voice/integrations/ApplicationNotFoundError.d.ts +18 -0
  137. package/dist/voice/integrations/ApplicationNotFoundError.js +1 -1
  138. package/dist/voice/integrations/createCreateContainer.d.ts +1 -1
  139. package/dist/voice/integrations/createCreateContainer.js +5 -5
  140. package/dist/voice/integrations/getSttConfig.d.ts +18 -0
  141. package/dist/voice/integrations/getSttConfig.js +1 -1
  142. package/dist/voice/integrations/getTtsConfig.js +18 -0
  143. package/dist/voice/integrations/index.d.ts +18 -0
  144. package/dist/voice/integrations/index.js +1 -1
  145. package/dist/voice/integrations/types.d.ts +18 -0
  146. package/dist/voice/stt/AbstractSpeechToText.d.ts +19 -1
  147. package/dist/voice/stt/Deepgram.d.ts +19 -1
  148. package/dist/voice/stt/Deepgram.js +4 -3
  149. package/dist/voice/stt/Google.d.ts +1 -1
  150. package/dist/voice/stt/Google.js +19 -1
  151. package/dist/voice/stt/SpeechToTextFactory.js +1 -1
  152. package/dist/voice/stt/types.d.ts +18 -0
  153. package/dist/voice/transcribeOnConnection.d.ts +18 -0
  154. package/dist/voice/tts/AbstractTextToSpeech.d.ts +18 -0
  155. package/dist/voice/tts/Azure.d.ts +18 -0
  156. package/dist/voice/tts/Azure.js +1 -1
  157. package/dist/voice/tts/Deepgram.d.ts +18 -0
  158. package/dist/voice/tts/Deepgram.js +2 -3
  159. package/dist/voice/tts/ElevenLabs.d.ts +18 -0
  160. package/dist/voice/tts/ElevenLabs.js +2 -2
  161. package/dist/voice/tts/Google.d.ts +18 -0
  162. package/dist/voice/tts/Google.js +1 -1
  163. package/dist/voice/tts/TextToSpeechFactory.js +1 -1
  164. package/dist/voice/tts/isSsml.d.ts +18 -0
  165. package/dist/voice/tts/isSsml.js +1 -1
  166. package/dist/voice/tts/streamToBuffer.d.ts +18 -0
  167. package/dist/voice/tts/streamToBuffer.js +1 -2
  168. package/dist/voice/tts/types.d.ts +18 -0
  169. package/dist/voice/types/ari.d.ts +18 -0
  170. package/dist/voice/types/ari.js +1 -1
  171. package/dist/voice/types/index.d.ts +18 -0
  172. package/dist/voice/types/index.js +1 -1
  173. package/dist/voice/types/voice.d.ts +18 -0
  174. package/dist/voice/utils/VoiceServiceClientConstructor.js +1 -1
  175. package/dist/voice/utils/createExternalMediaConfig.js +1 -1
  176. package/dist/voice/utils/createGetChannelVar.d.ts +18 -0
  177. package/dist/voice/utils/createGetChannelVarWithoutThrow.d.ts +18 -0
  178. package/dist/voice/utils/index.d.ts +18 -0
  179. package/dist/voice/utils/index.js +1 -1
  180. 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
  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 createCreateApplication_1 = require("./createCreateApplication");
23
5
  const createDeleteApplication_1 = require("./createDeleteApplication");
24
6
  const createGetApplication_1 = require("./createGetApplication");
@@ -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 createCreateApplication(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.createCreateApplication = createCreateApplication;
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.createCreateApplication = createCreateApplication;
30
30
  */
31
31
  const common_1 = require("@fonoster/common");
32
32
  const logger_1 = require("@fonoster/logger");
33
+ const client_1 = require("@prisma/client");
33
34
  const convertToApplicationData_1 = require("./utils/convertToApplicationData");
34
35
  const validOrThrow_1 = require("./validation/validOrThrow");
35
- const client_1 = require("@prisma/client");
36
36
  const logger = (0, logger_1.getLogger)({ service: "apiserver", filePath: __filename });
37
37
  function createCreateApplication(prisma) {
38
38
  const createApplication = (call, callback) => __awaiter(this, void 0, void 0, function* () {
@@ -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.createDeleteApplication = createDeleteApplication;
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.createGetApplication = createGetApplication;
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.createGetApplication = createGetApplication;
30
30
  */
31
31
  const common_1 = require("@fonoster/common");
32
32
  const logger_1 = require("@fonoster/logger");
33
+ const withErrorHandlingAndValidationAndAccess_1 = require("../utils/withErrorHandlingAndValidationAndAccess");
33
34
  const createGetFnUtil_1 = require("./createGetFnUtil");
34
35
  const applicationWithEncodedStruct_1 = require("./utils/applicationWithEncodedStruct");
35
- const withErrorHandlingAndValidationAndAccess_1 = require("../utils/withErrorHandlingAndValidationAndAccess");
36
36
  const logger = (0, logger_1.getLogger)({ service: "apiserver", filePath: __filename });
37
37
  function createGetApplication(prisma) {
38
38
  const getFn = (0, createGetFnUtil_1.createGetFnUtil)(prisma);
@@ -24,11 +24,11 @@ declare function createGetFnUtil(prisma: Prisma): (ref: string) => Promise<{
24
24
  productRef: string;
25
25
  applicationRef: string;
26
26
  };
27
- name: string;
28
- type: import(".prisma/client").$Enums.ApplicationType;
29
- endpoint: string;
30
27
  ref: string;
31
28
  accessKeyId: string;
29
+ endpoint: string;
30
+ type: import(".prisma/client").$Enums.ApplicationType;
31
+ name: string;
32
32
  createdAt: Date;
33
33
  updatedAt: Date;
34
34
  }>;
@@ -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 createListApplications(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.createListApplications = createListApplications;
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.createUpdateApplication = createUpdateApplication;
13
- /*
13
+ /**
14
14
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
15
15
  * http://github.com/fonoster/fonoster
16
16
  *
@@ -29,12 +29,12 @@ exports.createUpdateApplication = createUpdateApplication;
29
29
  * limitations under the License.
30
30
  */
31
31
  const common_1 = require("@fonoster/common");
32
+ const identity_1 = require("@fonoster/identity");
32
33
  const logger_1 = require("@fonoster/logger");
33
34
  const types_1 = require("@fonoster/types");
34
35
  const createGetFnUtil_1 = require("./createGetFnUtil");
35
36
  const convertToApplicationData_1 = require("./utils/convertToApplicationData");
36
37
  const validOrThrow_1 = require("./validation/validOrThrow");
37
- const identity_1 = require("@fonoster/identity");
38
38
  const logger = (0, logger_1.getLogger)({ service: "apiserver", filePath: __filename });
39
39
  function createUpdateApplication(prisma) {
40
40
  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 buildApplicationsService } from "./buildService";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.buildApplicationsService = 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 { ApplicationType } from "@prisma/client";
2
20
  type ApplicationData = {
3
21
  ref?: string;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.applicationWithEncodedStruct = applicationWithEncodedStruct;
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 { CreateApplicationRequest, UpdateApplicationRequest } from "@fonoster/types";
2
20
  import { Application } from "@prisma/client";
3
21
  declare function convertToApplicationData(request: CreateApplicationRequest | UpdateApplicationRequest): Application;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.assistantWithoutApiKeySchema = void 0;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *
@@ -1472,9 +1472,9 @@ declare function createValidationSchema(request: {
1472
1472
  };
1473
1473
  productRef?: string;
1474
1474
  };
1475
- name?: string;
1476
- type?: "EXTERNAL" | "AUTOPILOT";
1477
1475
  endpoint?: string;
1476
+ type?: "EXTERNAL" | "AUTOPILOT";
1477
+ name?: string;
1478
1478
  }, {
1479
1479
  textToSpeech?: {
1480
1480
  [x: string]: any;
@@ -1584,8 +1584,8 @@ declare function createValidationSchema(request: {
1584
1584
  };
1585
1585
  productRef?: string;
1586
1586
  };
1587
- name?: string;
1588
- type?: "EXTERNAL" | "AUTOPILOT";
1589
1587
  endpoint?: string;
1588
+ type?: "EXTERNAL" | "AUTOPILOT";
1589
+ name?: string;
1590
1590
  }>;
1591
1591
  export { createValidationSchema };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createValidationSchema = createValidationSchema;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *
@@ -22,8 +22,8 @@ exports.createValidationSchema = createValidationSchema;
22
22
  const common_1 = require("@fonoster/common");
23
23
  const client_1 = require("@prisma/client");
24
24
  const zod_1 = require("zod");
25
- const speechValidators_1 = require("./speechValidators");
26
25
  const assistantWithoutApiKeySchema_1 = require("./assistantWithoutApiKeySchema");
26
+ const speechValidators_1 = require("./speechValidators");
27
27
  const MAX_NAME_MESSAGE = "Name must contain at most 255 characters";
28
28
  function createValidationSchema(request) {
29
29
  const { applicationType, ttsEngineName, sttEngineName } = request;
@@ -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 { Application, CreateApplicationRequest, UpdateApplicationRequest } from "@fonoster/types";
2
20
  declare function prepareForValidation(request: CreateApplicationRequest | UpdateApplicationRequest): Application;
3
21
  export { prepareForValidation };
@@ -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 { Deepgram as DeepgramStt } from "../../voice/stt/Deepgram";
2
20
  import { Google as GoogleStt } from "../../voice/stt/Google";
3
21
  import { Azure as AzureTts } from "../../voice/tts/Azure";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.speechValidators = 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 { CreateApplicationRequest, UpdateApplicationRequest } from "@fonoster/types";
2
20
  declare function validOrThrow(request: CreateApplicationRequest | UpdateApplicationRequest): void;
3
21
  export { validOrThrow };
@@ -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 { InfluxDBClient } from "@fonoster/common";
2
20
  declare function buildService(influxdb: InfluxDBClient): Promise<{
3
21
  definition: {
@@ -10,32 +10,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.buildService = buildService;
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 nats_1 = require("nats");
14
+ const db_1 = require("../core/db");
15
+ const envs_1 = require("../envs");
32
16
  const createCall_1 = require("./createCall");
33
17
  const createCallPublisher_1 = require("./createCallPublisher");
18
+ const createTrackCall_1 = require("./createTrackCall");
34
19
  const getCall_1 = require("./getCall");
35
20
  const listCalls_1 = require("./listCalls");
36
- const createTrackCall_1 = require("./createTrackCall");
37
- const db_1 = require("../core/db");
38
- const envs_1 = require("../envs");
39
21
  function buildService(influxdb) {
40
22
  return __awaiter(this, void 0, void 0, function* () {
41
23
  const callPublisher = yield (0, createCallPublisher_1.createCallPublisher)(envs_1.NATS_URL);
@@ -1,6 +1,24 @@
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
- import { CallPublisher } from "./types";
3
20
  import { Prisma } from "../core/db";
21
+ import { CallPublisher } from "./types";
4
22
  declare function createCall(prisma: Prisma, publisher: CallPublisher): (call: {
5
23
  request: unknown;
6
24
  }, callback: (error?: import("@fonoster/common").GrpcErrorMessage, response?: unknown) => void) => Promise<void>;
@@ -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.createCall = createCall;
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.createCallPublisher = createCallPublisher;
13
- /*
13
+ /**
14
14
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
15
15
  * http://github.com/fonoster/fonoster
16
16
  *
@@ -1,4 +1,22 @@
1
- import { ListCallsRequest, ListCallsResponse } from "@fonoster/types";
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
+ */
2
19
  import { InfluxDBClient } from "@fonoster/common";
20
+ import { ListCallsRequest, ListCallsResponse } from "@fonoster/types";
3
21
  declare function createFetchCalls(influxdb: InfluxDBClient): (accessKeyId: string, request: ListCallsRequest) => Promise<ListCallsResponse>;
4
22
  export { createFetchCalls };
@@ -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.createFetchCalls = createFetchCalls;
13
- /*
13
+ /**
14
14
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
15
15
  * http://github.com/fonoster/fonoster
16
16
  *
@@ -28,9 +28,9 @@ exports.createFetchCalls = createFetchCalls;
28
28
  * See the License for the specific language governing permissions and
29
29
  * limitations under the License.
30
30
  */
31
+ const common_1 = require("@fonoster/common");
31
32
  const logger_1 = require("@fonoster/logger");
32
33
  const influxdb_client_1 = require("@influxdata/influxdb-client");
33
- const common_1 = require("@fonoster/common");
34
34
  const logger = (0, logger_1.getLogger)({ service: "apiserver", filePath: __filename });
35
35
  function createFetchCalls(influxdb) {
36
36
  return (accessKeyId, request) => __awaiter(this, void 0, void 0, function* () {
@@ -1,4 +1,22 @@
1
- import { CallDetailRecord } from "@fonoster/types";
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
+ */
2
19
  import { InfluxDBClient } from "@fonoster/common";
20
+ import { CallDetailRecord } from "@fonoster/types";
3
21
  declare function createFetchSingleCall(influxdb: InfluxDBClient): (accessKeyId: string, ref: string) => Promise<CallDetailRecord>;
4
22
  export { createFetchSingleCall };
@@ -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.createFetchSingleCall = createFetchSingleCall;
13
- /*
13
+ /**
14
14
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
15
15
  * http://github.com/fonoster/fonoster
16
16
  *
@@ -28,9 +28,9 @@ exports.createFetchSingleCall = createFetchSingleCall;
28
28
  * See the License for the specific language governing permissions and
29
29
  * limitations under the License.
30
30
  */
31
+ const common_1 = require("@fonoster/common");
31
32
  const logger_1 = require("@fonoster/logger");
32
33
  const influxdb_client_1 = require("@influxdata/influxdb-client");
33
- const common_1 = require("@fonoster/common");
34
34
  const logger = (0, logger_1.getLogger)({ service: "apiserver", filePath: __filename });
35
35
  function createFetchSingleCall(influxdb) {
36
36
  return (accessKeyId, ref) => __awaiter(this, void 0, void 0, function* () {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createTrackCall = createTrackCall;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *