@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.
- package/dist/applications/buildService.d.ts +18 -0
- package/dist/applications/buildService.js +0 -18
- package/dist/applications/createCreateApplication.d.ts +18 -0
- package/dist/applications/createCreateApplication.js +2 -2
- package/dist/applications/createDeleteApplication.js +1 -1
- package/dist/applications/createGetApplication.js +2 -2
- package/dist/applications/createGetFnUtil.d.ts +3 -3
- package/dist/applications/createGetFnUtil.js +1 -1
- package/dist/applications/createListApplications.d.ts +18 -0
- package/dist/applications/createListApplications.js +1 -1
- package/dist/applications/createUpdateApplication.js +2 -2
- package/dist/applications/index.d.ts +18 -0
- package/dist/applications/index.js +1 -1
- package/dist/applications/types.d.ts +18 -0
- package/dist/applications/utils/applicationWithEncodedStruct.js +1 -1
- package/dist/applications/utils/convertToApplicationData.d.ts +18 -0
- package/dist/applications/validation/assistantWithoutApiKeySchema.js +1 -1
- package/dist/applications/validation/createValidationSchema.d.ts +4 -4
- package/dist/applications/validation/createValidationSchema.js +2 -2
- package/dist/applications/validation/prepareForValidation.d.ts +18 -0
- package/dist/applications/validation/speechValidators.d.ts +18 -0
- package/dist/applications/validation/speechValidators.js +1 -1
- package/dist/applications/validation/validOrThrow.d.ts +18 -0
- package/dist/calls/buildService.d.ts +18 -0
- package/dist/calls/buildService.js +3 -21
- package/dist/calls/createCall.d.ts +19 -1
- package/dist/calls/createCall.js +1 -1
- package/dist/calls/createCallPublisher.js +1 -1
- package/dist/calls/createFetchCalls.d.ts +19 -1
- package/dist/calls/createFetchCalls.js +2 -2
- package/dist/calls/createFetchSingleCall.d.ts +19 -1
- package/dist/calls/createFetchSingleCall.js +2 -2
- package/dist/calls/createTrackCall.js +1 -1
- package/dist/calls/getCall.d.ts +18 -0
- package/dist/calls/getCall.js +2 -2
- package/dist/calls/index.d.ts +18 -0
- package/dist/calls/index.js +1 -1
- package/dist/calls/influxdb.js +1 -1
- package/dist/calls/listCalls.d.ts +18 -0
- package/dist/calls/listCalls.js +1 -1
- package/dist/calls/runCallManager.js +1 -1
- package/dist/calls/types.d.ts +18 -0
- package/dist/core/allowList.d.ts +18 -0
- package/dist/core/allowList.js +2 -1
- package/dist/core/badRequestError.d.ts +18 -0
- package/dist/core/badRequestError.js +1 -1
- package/dist/core/buildWelcomeDemoService.d.ts +18 -0
- package/dist/core/buildWelcomeDemoService.js +1 -1
- package/dist/core/db.js +1 -1
- package/dist/core/httpBridge.d.ts +18 -0
- package/dist/core/identityConfig.js +1 -1
- package/dist/core/loadServices.d.ts +18 -0
- package/dist/core/loadServices.js +1 -1
- package/dist/core/notFoundError.d.ts +18 -0
- package/dist/core/notFoundError.js +1 -1
- package/dist/core/removeSwaggerNotice.js +1 -2
- package/dist/core/routrConfig.js +1 -1
- package/dist/core/runServices.js +6 -6
- package/dist/core/seed.js +1 -1
- package/dist/core/services.d.ts +3 -0
- package/dist/core/services.js +4 -4
- package/dist/core/upsertDefaultPeer.d.ts +0 -1
- package/dist/core/upsertDefaultPeer.js +2 -3
- package/dist/envs.js +4 -4
- package/dist/events/createInfluxDbPub.js +1 -1
- package/dist/events/mapCallDirectionToEnum.d.ts +18 -0
- package/dist/events/mapCallDirectionToEnum.js +1 -1
- package/dist/events/nats.js +1 -1
- package/dist/events/transformEvent.js +2 -2
- package/dist/events/types.d.ts +18 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +2 -21
- package/dist/secrets/buildService.d.ts +18 -0
- package/dist/secrets/buildService.js +0 -18
- package/dist/secrets/createGetFnUtil.d.ts +2 -2
- package/dist/secrets/createGetFnUtil.js +1 -1
- package/dist/secrets/createSecret.d.ts +18 -0
- package/dist/secrets/createSecret.js +1 -1
- package/dist/secrets/deleteSecret.js +2 -2
- package/dist/secrets/getSecret.js +2 -2
- package/dist/secrets/index.d.ts +18 -0
- package/dist/secrets/index.js +1 -1
- package/dist/secrets/listSecrets.d.ts +18 -0
- package/dist/secrets/listSecrets.js +1 -1
- package/dist/secrets/updateSecret.js +2 -2
- package/dist/utils/createCheckNumberPreconditions.js +1 -1
- package/dist/utils/createHandleDialEventsWithNats.d.ts +18 -0
- package/dist/utils/createHandleDialEventsWithNats.js +1 -1
- package/dist/utils/createHandleDialEventsWithVoiceClient.d.ts +18 -0
- package/dist/utils/createHandleDialEventsWithVoiceClient.js +0 -18
- package/dist/utils/index.d.ts +18 -0
- package/dist/utils/index.js +1 -1
- package/dist/utils/mapDialStatus.d.ts +18 -0
- package/dist/utils/mapDialStatus.js +1 -1
- package/dist/utils/withErrorHandlingAndValidationAndAccess.js +1 -2
- package/dist/voice/VoiceClientImpl.d.ts +18 -0
- package/dist/voice/VoiceClientImpl.js +3 -4
- package/dist/voice/VoiceDispatcher.js +2 -2
- package/dist/voice/connectToAri.js +4 -4
- package/dist/voice/createCreateVoiceClient.js +3 -3
- package/dist/voice/errors/ChannelVarNotFoundError.d.ts +18 -0
- package/dist/voice/errors/MethodNotImplementedError.d.ts +18 -0
- package/dist/voice/errors/MethodNotImplementedError.js +1 -1
- package/dist/voice/errors/index.d.ts +18 -0
- package/dist/voice/errors/index.js +1 -1
- package/dist/voice/handlers/createAnswerHandler.d.ts +18 -0
- package/dist/voice/handlers/createHangupHandler.d.ts +18 -0
- package/dist/voice/handlers/createPlaybackControlHandler.js +1 -1
- package/dist/voice/handlers/createRecordHandler.js +1 -1
- package/dist/voice/handlers/createSayHandler.js +1 -1
- package/dist/voice/handlers/createStreamGatherHandler.js +1 -1
- package/dist/voice/handlers/createStreamHandler.js +1 -1
- package/dist/voice/handlers/dial/createDialHandler.d.ts +18 -0
- package/dist/voice/handlers/dial/createDialHandler.js +4 -4
- package/dist/voice/handlers/dial/handleChannelLeftBridge.d.ts +18 -0
- package/dist/voice/handlers/dial/handleStasisEnd.d.ts +18 -0
- package/dist/voice/handlers/dial/handleStasisStart.d.ts +18 -0
- package/dist/voice/handlers/dial/handleStasisStart.js +1 -1
- package/dist/voice/handlers/dial/index.d.ts +18 -0
- package/dist/voice/handlers/dial/index.js +1 -1
- package/dist/voice/handlers/dial/recordChannel.d.ts +18 -0
- package/dist/voice/handlers/dial/recordChannel.js +1 -1
- package/dist/voice/handlers/gather/createGatherHandler.js +2 -2
- package/dist/voice/handlers/gather/getTimeoutPromise.d.ts +18 -0
- package/dist/voice/handlers/index.d.ts +18 -0
- package/dist/voice/handlers/index.js +1 -1
- package/dist/voice/handlers/utils/awaitForPlaybackFinished.d.ts +18 -0
- package/dist/voice/handlers/utils/awaitForRecordingFinished.js +1 -1
- package/dist/voice/handlers/utils/index.d.ts +18 -0
- package/dist/voice/handlers/utils/index.js +1 -1
- package/dist/voice/handlers/utils/isDtmf.d.ts +18 -0
- package/dist/voice/handlers/utils/isDtmf.js +1 -1
- package/dist/voice/handlers/utils/textChunksByClause.js +1 -2
- package/dist/voice/handlers/utils/textChunksByFirstNaturalPause.js +1 -2
- package/dist/voice/handlers/utils/withErrorHandling.d.ts +18 -0
- package/dist/voice/integrations/ApplicationNotFoundError.d.ts +18 -0
- package/dist/voice/integrations/ApplicationNotFoundError.js +1 -1
- package/dist/voice/integrations/createCreateContainer.d.ts +1 -1
- package/dist/voice/integrations/createCreateContainer.js +5 -5
- package/dist/voice/integrations/getSttConfig.d.ts +18 -0
- package/dist/voice/integrations/getSttConfig.js +1 -1
- package/dist/voice/integrations/getTtsConfig.js +18 -0
- package/dist/voice/integrations/index.d.ts +18 -0
- package/dist/voice/integrations/index.js +1 -1
- package/dist/voice/integrations/types.d.ts +18 -0
- package/dist/voice/stt/AbstractSpeechToText.d.ts +19 -1
- package/dist/voice/stt/Deepgram.d.ts +19 -1
- package/dist/voice/stt/Deepgram.js +4 -3
- package/dist/voice/stt/Google.d.ts +1 -1
- package/dist/voice/stt/Google.js +19 -1
- package/dist/voice/stt/SpeechToTextFactory.js +1 -1
- package/dist/voice/stt/types.d.ts +18 -0
- package/dist/voice/transcribeOnConnection.d.ts +18 -0
- package/dist/voice/tts/AbstractTextToSpeech.d.ts +18 -0
- package/dist/voice/tts/Azure.d.ts +18 -0
- package/dist/voice/tts/Azure.js +1 -1
- package/dist/voice/tts/Deepgram.d.ts +18 -0
- package/dist/voice/tts/Deepgram.js +2 -3
- package/dist/voice/tts/ElevenLabs.d.ts +18 -0
- package/dist/voice/tts/ElevenLabs.js +2 -2
- package/dist/voice/tts/Google.d.ts +18 -0
- package/dist/voice/tts/Google.js +1 -1
- package/dist/voice/tts/TextToSpeechFactory.js +1 -1
- package/dist/voice/tts/isSsml.d.ts +18 -0
- package/dist/voice/tts/isSsml.js +1 -1
- package/dist/voice/tts/streamToBuffer.d.ts +18 -0
- package/dist/voice/tts/streamToBuffer.js +1 -2
- package/dist/voice/tts/types.d.ts +18 -0
- package/dist/voice/types/ari.d.ts +18 -0
- package/dist/voice/types/ari.js +1 -1
- package/dist/voice/types/index.d.ts +18 -0
- package/dist/voice/types/index.js +1 -1
- package/dist/voice/types/voice.d.ts +18 -0
- package/dist/voice/utils/VoiceServiceClientConstructor.js +1 -1
- package/dist/voice/utils/createExternalMediaConfig.js +1 -1
- package/dist/voice/utils/createGetChannelVar.d.ts +18 -0
- package/dist/voice/utils/createGetChannelVarWithoutThrow.d.ts +18 -0
- package/dist/voice/utils/index.d.ts +18 -0
- package/dist/voice/utils/index.js +1 -1
- package/package.json +9 -9
package/dist/calls/getCall.d.ts
CHANGED
|
@@ -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, InfluxDBClient } from "@fonoster/common";
|
|
2
20
|
declare function getCall(influx: InfluxDBClient): (call: {
|
|
3
21
|
request: unknown;
|
package/dist/calls/getCall.js
CHANGED
|
@@ -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.getCall = getCall;
|
|
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.getCall = getCall;
|
|
|
30
30
|
*/
|
|
31
31
|
const common_1 = require("@fonoster/common");
|
|
32
32
|
const logger_1 = require("@fonoster/logger");
|
|
33
|
-
const createFetchSingleCall_1 = require("./createFetchSingleCall");
|
|
34
33
|
const notFoundError_1 = require("../core/notFoundError");
|
|
34
|
+
const createFetchSingleCall_1 = require("./createFetchSingleCall");
|
|
35
35
|
const logger = (0, logger_1.getLogger)({ service: "apiserver", filePath: __filename });
|
|
36
36
|
function getCall(influx) {
|
|
37
37
|
const fetchSingleCall = (0, createFetchSingleCall_1.createFetchSingleCall)(influx);
|
package/dist/calls/index.d.ts
CHANGED
|
@@ -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 buildCallsService } from "./buildService";
|
package/dist/calls/index.js
CHANGED
package/dist/calls/influxdb.js
CHANGED
|
@@ -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, InfluxDBClient } from "@fonoster/common";
|
|
2
20
|
declare function listCalls(influx: InfluxDBClient): (call: {
|
|
3
21
|
request: unknown;
|
package/dist/calls/listCalls.js
CHANGED
|
@@ -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.listCalls = listCalls;
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
14
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
15
15
|
* http://github.com/fonoster/fonoster
|
|
16
16
|
*
|
|
@@ -13,7 +13,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.createCreateCallSubscriber = createCreateCallSubscriber;
|
|
16
|
-
|
|
16
|
+
/**
|
|
17
17
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
18
18
|
* http://github.com/fonoster/fonoster
|
|
19
19
|
*
|
package/dist/calls/types.d.ts
CHANGED
|
@@ -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, GrpcErrorMessage } from "@fonoster/common";
|
|
2
20
|
import { CallDetailRecord, CallStatus, CallType } from "@fonoster/types";
|
|
3
21
|
type ListCallsRequest = {
|
package/dist/core/allowList.d.ts
CHANGED
|
@@ -1,2 +1,20 @@
|
|
|
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 const allowList: string[];
|
|
2
20
|
export { allowList };
|
package/dist/core/allowList.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.allowList = void 0;
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
5
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
6
6
|
* http://github.com/fonoster/fonoster
|
|
7
7
|
*
|
|
@@ -22,6 +22,7 @@ exports.allowList = void 0;
|
|
|
22
22
|
const allowList = [
|
|
23
23
|
"/grpc.health.v1.Health/Check",
|
|
24
24
|
"/fonoster.identity.v1beta2.Identity/CreateUser",
|
|
25
|
+
"/fonoster.identity.v1beta2.Identity/CreateUserWithOauth2Code",
|
|
25
26
|
"/fonoster.identity.v1beta2.Identity/CreateWorkspace",
|
|
26
27
|
"/fonoster.identity.v1beta2.Identity/ExchangeApiKey",
|
|
27
28
|
"/fonoster.identity.v1beta2.Identity/ExchangeCredentials",
|
|
@@ -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 { status } from "@grpc/grpc-js";
|
|
2
20
|
declare const badRequestError: (message: string) => {
|
|
3
21
|
code: status;
|
|
@@ -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 { VoiceSessionStreamServer } from "@fonoster/common";
|
|
2
20
|
declare function buildWelcomeDemoService(): {
|
|
3
21
|
definition: {
|
package/dist/core/db.js
CHANGED
|
@@ -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 { Readable } from "stream";
|
|
2
20
|
import { IdentityConfig } from "@fonoster/identity";
|
|
3
21
|
declare function httpBridge(identityConfig: IdentityConfig, params: {
|
|
@@ -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 { ServiceDefinitionParams } from "@fonoster/common";
|
|
2
20
|
import * as grpc from "@grpc/grpc-js";
|
|
3
21
|
type FonosterService = {
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
13
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
14
14
|
* http://github.com/fonoster/fonoster
|
|
15
15
|
*
|
|
@@ -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 { status } from "@grpc/grpc-js";
|
|
2
20
|
declare const notFoundError: (message: string) => {
|
|
3
21
|
code: status;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
4
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
5
5
|
* http://github.com/fonoster/fonoster
|
|
6
6
|
*
|
|
@@ -18,7 +18,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
* See the License for the specific language governing permissions and
|
|
19
19
|
* limitations under the License.
|
|
20
20
|
*/
|
|
21
|
-
// eslint-disable-next-line no-console
|
|
22
21
|
const originalLog = console.log;
|
|
23
22
|
const containsDeprecationWarning = (str) => {
|
|
24
23
|
const deprecationWarning = "This API is using a deprecated version of Swagger! Please see http://github.com/wordnik/swagger-core/wiki for more info";
|
package/dist/core/routrConfig.js
CHANGED
package/dist/core/runServices.js
CHANGED
|
@@ -45,7 +45,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
45
45
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
|
|
48
|
+
/**
|
|
49
49
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
50
50
|
* http://github.com/fonoster/fonoster
|
|
51
51
|
*
|
|
@@ -63,19 +63,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
63
63
|
* See the License for the specific language governing permissions and
|
|
64
64
|
* limitations under the License.
|
|
65
65
|
*/
|
|
66
|
+
const authz_1 = require("@fonoster/authz");
|
|
66
67
|
const common_1 = require("@fonoster/common");
|
|
67
68
|
const logger_1 = require("@fonoster/logger");
|
|
68
69
|
const grpc = __importStar(require("@grpc/grpc-js"));
|
|
69
70
|
const grpc_health_check_1 = require("grpc-health-check");
|
|
70
|
-
const allowList_1 = require("./allowList");
|
|
71
|
-
const httpBridge_1 = require("./httpBridge");
|
|
72
|
-
const loadServices_1 = __importDefault(require("./loadServices"));
|
|
73
|
-
const services_1 = __importDefault(require("./services"));
|
|
74
71
|
const runCallManager_1 = require("../calls/runCallManager");
|
|
75
72
|
const envs_1 = require("../envs");
|
|
76
73
|
const connectToAri_1 = require("../voice/connectToAri");
|
|
77
|
-
const
|
|
74
|
+
const allowList_1 = require("./allowList");
|
|
75
|
+
const httpBridge_1 = require("./httpBridge");
|
|
78
76
|
const identityConfig_1 = require("./identityConfig");
|
|
77
|
+
const loadServices_1 = __importDefault(require("./loadServices"));
|
|
78
|
+
const services_1 = __importDefault(require("./services"));
|
|
79
79
|
const logger = (0, logger_1.getLogger)({ service: "apiserver", filePath: __filename });
|
|
80
80
|
const authorization = (0, common_1.createAuthInterceptor)(envs_1.IDENTITY_PUBLIC_KEY, allowList_1.allowList);
|
|
81
81
|
const checkMethodAuthorized = (0, authz_1.createCheckMethodAuthorized)(`${envs_1.AUTHZ_SERVICE_HOST}:${envs_1.AUTHZ_SERVICE_PORT}`, envs_1.AUTHZ_SERVICE_METHODS);
|
package/dist/core/seed.js
CHANGED
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
13
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
14
14
|
* http://github.com/fonoster/fonoster
|
|
15
15
|
*
|
package/dist/core/services.d.ts
CHANGED
|
@@ -105,6 +105,9 @@ declare const services: Promise<[{
|
|
|
105
105
|
createUser: (call: {
|
|
106
106
|
request: unknown;
|
|
107
107
|
}, callback: (error?: import("@fonoster/common").GrpcErrorMessage, response?: unknown) => void) => Promise<void>;
|
|
108
|
+
createUserWithOauth2Code: (call: {
|
|
109
|
+
request: unknown;
|
|
110
|
+
}, callback: (error?: import("@fonoster/common").GrpcErrorMessage, response?: unknown) => void) => Promise<void>;
|
|
108
111
|
getUser: (call: {
|
|
109
112
|
request: unknown;
|
|
110
113
|
}, callback: (error?: import("@fonoster/common").GrpcErrorMessage, response?: unknown) => void) => Promise<void>;
|
package/dist/core/services.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
4
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
5
5
|
* http://github.com/fonoster/fonoster
|
|
6
6
|
*
|
|
@@ -20,15 +20,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
20
20
|
*/
|
|
21
21
|
const identity_1 = require("@fonoster/identity");
|
|
22
22
|
const sipnet_1 = require("@fonoster/sipnet");
|
|
23
|
-
const db_1 = require("./db");
|
|
24
|
-
const identityConfig_1 = require("./identityConfig");
|
|
25
|
-
const routrConfig_1 = require("./routrConfig");
|
|
26
23
|
const applications_1 = require("../applications");
|
|
27
24
|
const calls_1 = require("../calls");
|
|
28
25
|
const influxdb_1 = require("../calls/influxdb");
|
|
29
26
|
const secrets_1 = require("../secrets");
|
|
30
27
|
const utils_1 = require("../utils");
|
|
31
28
|
const buildWelcomeDemoService_1 = require("./buildWelcomeDemoService");
|
|
29
|
+
const db_1 = require("./db");
|
|
30
|
+
const identityConfig_1 = require("./identityConfig");
|
|
31
|
+
const routrConfig_1 = require("./routrConfig");
|
|
32
32
|
const applicationsService = (0, applications_1.buildApplicationsService)(db_1.prisma);
|
|
33
33
|
const secretsService = (0, secrets_1.buildSecretsService)(db_1.prisma);
|
|
34
34
|
const callsService = (0, calls_1.buildCallsService)(influxdb_1.influxdb);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
"use strict";
|
|
3
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -14,7 +13,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
13
|
};
|
|
15
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
15
|
exports.upsertDefaultPeer = upsertDefaultPeer;
|
|
17
|
-
|
|
16
|
+
/**
|
|
18
17
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
19
18
|
* http://github.com/fonoster/fonoster
|
|
20
19
|
*
|
|
@@ -35,8 +34,8 @@ exports.upsertDefaultPeer = upsertDefaultPeer;
|
|
|
35
34
|
const logger_1 = require("@fonoster/logger");
|
|
36
35
|
const common_1 = require("@routr/common");
|
|
37
36
|
const sdk_1 = __importDefault(require("@routr/sdk"));
|
|
38
|
-
const routrConfig_1 = require("./routrConfig");
|
|
39
37
|
const envs_1 = require("../envs");
|
|
38
|
+
const routrConfig_1 = require("./routrConfig");
|
|
40
39
|
const logger = (0, logger_1.getLogger)({ service: "apiserver", filePath: __filename });
|
|
41
40
|
function createCredentialsForDefaultPeer() {
|
|
42
41
|
const credentials = new sdk_1.default.Credentials(routrConfig_1.routrConfig);
|
package/dist/envs.js
CHANGED
|
@@ -6,7 +6,7 @@ var _a;
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.SMTP_AUTH_USER = exports.SMTP_AUTH_PASS = exports.ROUTR_DEFAULT_PEER_USERNAME = exports.ROUTR_DEFAULT_PEER_PASSWORD = exports.ROUTR_DEFAULT_PEER_NAME = exports.ROUTR_DEFAULT_PEER_AOR = exports.ROUTR_API_ENDPOINT = exports.OWNER_PASSWORD = exports.OWNER_NAME = exports.OWNER_EMAIL = exports.NATS_URL = exports.INTEGRATIONS_FILE = exports.INFLUXDB_USERNAME = exports.INFLUXDB_URL = exports.INFLUXDB_TOKEN = exports.INFLUXDB_PASSWORD = exports.INFLUXDB_ORG = exports.AUTHZ_SERVICE_METHODS = exports.AUTHZ_SERVICE_PORT = exports.AUTHZ_SERVICE_HOST = exports.AUTHZ_SERVICE_ENABLED = exports.IDENTITY_DATABASE_URL = exports.IDENTITY_WORKSPACE_INVITE_URL = exports.IDENTITY_WORKSPACE_INVITE_EXPIRATION = exports.IDENTITY_RESET_PASSWORD_URL = exports.IDENTITY_WORKSPACE_INVITE_FAIL_URL = exports.IDENTITY_REFRESH_TOKEN_EXPIRES_IN = exports.IDENTITY_PUBLIC_KEY = exports.IDENTITY_PRIVATE_KEY = exports.IDENTITY_OAUTH2_GITHUB_CLIENT_SECRET = exports.IDENTITY_OAUTH2_GITHUB_CLIENT_ID = exports.IDENTITY_OAUTH2_GITHUB_ENABLED = exports.IDENTITY_USER_VERIFICATION_REQUIRED = exports.IDENTITY_ISSUER = exports.IDENTITY_ID_TOKEN_EXPIRES_IN = exports.IDENTITY_AUDIENCE = exports.IDENTITY_ACCESS_TOKEN_EXPIRES_IN = exports.HTTP_BRIDGE_PORT = exports.DEFAULT_NATS_QUEUE_GROUP = exports.CLOAK_ENCRYPTION_KEY = exports.CALLS_TRACK_CALL_SUBJECT = exports.CALLS_CREATE_SUBJECT = exports.ASTERISK_TRUNK = exports.ASTERISK_SYSTEM_DOMAIN = exports.ASTERISK_ARI_USERNAME = exports.ASTERISK_ARI_SECRET = exports.ASTERISK_ARI_PROXY_URL = exports.APP_URL = exports.APISERVER_HOST = exports.APISERVER_BIND_ADDR = void 0;
|
|
8
8
|
exports.TWILIO_PHONE_NUMBER = exports.TWILIO_AUTH_TOKEN = exports.TWILIO_ACCOUNT_SID = exports.TEMPLATES_DIR = exports.SMTP_SENDER = exports.SMTP_SECURE = exports.SMTP_PORT = exports.SMTP_HOST = void 0;
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
10
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
11
11
|
* http://github.com/fonoster/fonoster
|
|
12
12
|
*
|
|
@@ -99,9 +99,9 @@ if (e.APISERVER_IDENTITY_OAUTH2_GITHUB_ENABLED === "true") {
|
|
|
99
99
|
}
|
|
100
100
|
if (exports.IDENTITY_USER_VERIFICATION_REQUIRED) {
|
|
101
101
|
(0, common_1.assertEnvsAreSet)([
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
102
|
+
"APISERVER_TWILIO_ACCOUNT_SID",
|
|
103
|
+
"APISERVER_TWILIO_AUTH_TOKEN",
|
|
104
|
+
"APISERVER_TWILIO_PHONE_NUMBER"
|
|
105
105
|
]);
|
|
106
106
|
}
|
|
107
107
|
if (e.APISERVER_AUTHZ_SERVICE_ENABLED === "true") {
|
|
@@ -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 { CallDirection } from "@fonoster/types";
|
|
2
20
|
declare function mapCallDirectionToEnum(direction: string): CallDirection;
|
|
3
21
|
export { mapCallDirectionToEnum };
|
package/dist/events/nats.js
CHANGED
|
@@ -17,7 +17,7 @@ var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
|
17
17
|
};
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
19
|
exports.watchNats = watchNats;
|
|
20
|
-
|
|
20
|
+
/**
|
|
21
21
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
22
22
|
* http://github.com/fonoster/fonoster
|
|
23
23
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.transformEvent = transformEvent;
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
5
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
6
6
|
* http://github.com/fonoster/fonoster
|
|
7
7
|
*
|
|
@@ -20,8 +20,8 @@ exports.transformEvent = transformEvent;
|
|
|
20
20
|
* limitations under the License.
|
|
21
21
|
*/
|
|
22
22
|
const types_1 = require("@fonoster/types");
|
|
23
|
-
const mapCallDirectionToEnum_1 = require("./mapCallDirectionToEnum");
|
|
24
23
|
const uuid_1 = require("uuid");
|
|
24
|
+
const mapCallDirectionToEnum_1 = require("./mapCallDirectionToEnum");
|
|
25
25
|
const ACCESS_KEY_ID_HEADER = "X-Access-Key-Id";
|
|
26
26
|
const CALL_REF_HEADER = "X-Call-Ref";
|
|
27
27
|
const CALL_DIRECTION_HEADER = "X-Call-Direction";
|
package/dist/events/types.d.ts
CHANGED
|
@@ -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