@fonoster/apiserver 0.6.1-alpha.0 → 0.6.1
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 +3 -3
- package/dist/applications/buildService.js +1 -2
- package/dist/applications/createApplication.js +1 -2
- package/dist/applications/createGetFnUtil.js +1 -2
- package/dist/applications/deleteApplication.js +1 -2
- package/dist/applications/getApplication.js +1 -2
- package/dist/applications/listApplications.js +1 -2
- package/dist/applications/updateApplication.js +1 -2
- package/dist/applications/utils/applicationWithEncodedStruct.js +1 -2
- package/dist/applications/utils/convertToApplicationData.js +1 -2
- package/dist/applications/utils/getApplicationValidationSchema.d.ts +2 -2
- package/dist/applications/utils/getApplicationValidationSchema.js +1 -2
- package/dist/applications/utils/prepareForValidation.js +1 -2
- package/dist/applications/utils/validOrThrow.js +1 -2
- package/dist/calls/buildService.js +1 -2
- package/dist/calls/createCall.js +1 -2
- package/dist/calls/createCallPublisher.js +1 -2
- package/dist/calls/createFetchCalls.js +1 -2
- package/dist/calls/createFetchSingleCall.js +1 -2
- package/dist/calls/createTrackCallSubscriber.d.ts +0 -1
- package/dist/calls/createTrackCallSubscriber.js +1 -2
- package/dist/calls/getCall.js +1 -2
- package/dist/calls/listCalls.js +1 -2
- package/dist/calls/runCallManager.js +1 -2
- package/dist/calls/trackCall.js +1 -2
- package/dist/core/db.d.ts +2 -2
- package/dist/core/filesServer.js +1 -2
- package/dist/core/services.d.ts +6 -12
- package/dist/core/upsertDefaultPeer.js +4 -8
- package/dist/envs.js +11 -12
- package/dist/events/createInfluxDbPub.js +1 -2
- package/dist/events/nats.js +1 -2
- package/dist/secrets/buildService.d.ts +3 -9
- package/dist/secrets/buildService.js +1 -2
- package/dist/secrets/createGetFnUtil.js +1 -2
- package/dist/secrets/createSecret.js +1 -2
- package/dist/secrets/deleteSecret.js +1 -2
- package/dist/secrets/getSecret.js +1 -2
- package/dist/secrets/listSecrets.js +1 -2
- package/dist/secrets/updateSecret.js +1 -2
- package/dist/utils/makeCheckNumberPreconditions.js +1 -2
- package/dist/voice/VoiceClientImpl.d.ts +0 -1
- package/dist/voice/connectToAri.js +1 -2
- package/dist/voice/createExternalMediaConfig.js +1 -2
- package/dist/voice/handlers/Answer.js +1 -2
- package/dist/voice/handlers/Hangup.js +1 -2
- package/dist/voice/handlers/Mute.js +1 -2
- package/dist/voice/handlers/Play.js +1 -2
- package/dist/voice/handlers/PlayDtmf.js +1 -2
- package/dist/voice/handlers/PlaybackControl.js +1 -2
- package/dist/voice/handlers/Record.js +1 -2
- package/dist/voice/handlers/Say.js +1 -2
- package/dist/voice/handlers/StasisEnd.js +1 -2
- package/dist/voice/handlers/Unmute.js +1 -2
- package/dist/voice/handlers/awaitForRecordingFinished.js +1 -2
- package/dist/voice/handlers/dial/Dial.js +1 -2
- package/dist/voice/handlers/dial/handleChannelLeftBridge.js +1 -2
- package/dist/voice/handlers/dial/handleDialEvents.js +1 -2
- package/dist/voice/handlers/dial/handleStasisEnd.js +1 -2
- package/dist/voice/handlers/dial/handleStasisStart.js +1 -2
- package/dist/voice/handlers/dial/recordChannel.js +1 -2
- package/dist/voice/handlers/gather/Gather.js +1 -2
- package/dist/voice/handlers/gather/getTimeoutPromise.js +1 -2
- package/dist/voice/handlers/withErrorHandling.js +1 -2
- package/dist/voice/integrations/findIntegrationsCredentials.js +1 -2
- package/dist/voice/integrations/getSttConfig.js +1 -2
- package/dist/voice/integrations/getTtsConfig.js +1 -2
- package/dist/voice/integrations/makeCreateContainer.js +1 -2
- package/dist/voice/makeCreateVoiceClient.js +1 -2
- package/dist/voice/makeGetChannelVar.js +1 -2
- package/dist/voice/stt/AbstractSpeechToText.d.ts +0 -1
- package/dist/voice/stt/Google.d.ts +0 -1
- package/dist/voice/transcribeOnConnection.d.ts +0 -1
- package/dist/voice/transcribeOnConnection.js +1 -2
- package/dist/voice/tts/computeFilename.js +1 -2
- package/dist/voice/tts/flattenObject.js +1 -2
- package/dist/voice/tts/isSsml.js +1 -2
- package/dist/voice/types/voice.d.ts +0 -1
- package/package.json +8 -7
|
@@ -9,15 +9,15 @@ declare function buildService(prisma: Prisma): {
|
|
|
9
9
|
handlers: {
|
|
10
10
|
createApplication: (call: {
|
|
11
11
|
request: import("@fonoster/common").CreateApplicationRequest;
|
|
12
|
-
}, callback: (error: import("@fonoster/common").GrpcErrorMessage, response?: import("@fonoster/common").
|
|
12
|
+
}, callback: (error: import("@fonoster/common").GrpcErrorMessage, response?: import("@fonoster/common").CreateApplicationResponse) => void) => Promise<void>;
|
|
13
13
|
getApplication: (call: {
|
|
14
|
-
request: import("@fonoster/common").
|
|
14
|
+
request: import("@fonoster/common").GetApplicationRequest;
|
|
15
15
|
}, callback: (error?: import("@fonoster/common").GrpcErrorMessage, response?: import("@fonoster/common").Application) => void) => Promise<void>;
|
|
16
16
|
listApplications: (call: {
|
|
17
17
|
request: import("@fonoster/common").ListApplicationsRequest;
|
|
18
18
|
}, callback: (error: import("@fonoster/common").GrpcErrorMessage, response?: import("@fonoster/common").ListApplicationsResponse) => void) => Promise<void>;
|
|
19
19
|
deleteApplication: (call: {
|
|
20
|
-
request: import("@fonoster/common").
|
|
20
|
+
request: import("@fonoster/common").DeleteApplicationRequest;
|
|
21
21
|
}, callback: (error?: import("@fonoster/common").GrpcErrorMessage, response?: import("@fonoster/common").BaseApiObject) => void) => Promise<void>;
|
|
22
22
|
updateApplication: (call: {
|
|
23
23
|
request: import("@fonoster/common").UpdateApplicationRequest;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildService =
|
|
3
|
+
exports.buildService = buildService;
|
|
4
4
|
/*
|
|
5
5
|
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
6
6
|
* http://github.com/fonoster/fonoster
|
|
@@ -41,4 +41,3 @@ function buildService(prisma) {
|
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
exports.buildService = buildService;
|
|
@@ -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
|
-
exports.createApplication =
|
|
12
|
+
exports.createApplication = createApplication;
|
|
13
13
|
/*
|
|
14
14
|
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
15
15
|
* http://github.com/fonoster/fonoster
|
|
@@ -54,4 +54,3 @@ function createApplication(prisma) {
|
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
-
exports.createApplication = createApplication;
|
|
@@ -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
|
-
exports.createGetFnUtil =
|
|
12
|
+
exports.createGetFnUtil = createGetFnUtil;
|
|
13
13
|
const notFoundError_1 = require("../core/notFoundError");
|
|
14
14
|
function createGetFnUtil(prisma) {
|
|
15
15
|
return (ref) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -29,4 +29,3 @@ function createGetFnUtil(prisma) {
|
|
|
29
29
|
} });
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
exports.createGetFnUtil = createGetFnUtil;
|
|
@@ -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
|
-
exports.deleteApplication =
|
|
12
|
+
exports.deleteApplication = deleteApplication;
|
|
13
13
|
const identity_1 = require("@fonoster/identity");
|
|
14
14
|
const logger_1 = require("@fonoster/logger");
|
|
15
15
|
const createGetFnUtil_1 = require("./createGetFnUtil");
|
|
@@ -23,4 +23,3 @@ function deleteApplication(prisma) {
|
|
|
23
23
|
return { ref };
|
|
24
24
|
}), (ref) => getFn(ref));
|
|
25
25
|
}
|
|
26
|
-
exports.deleteApplication = deleteApplication;
|
|
@@ -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
|
-
exports.getApplication =
|
|
12
|
+
exports.getApplication = getApplication;
|
|
13
13
|
/*
|
|
14
14
|
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
15
15
|
* http://github.com/fonoster/fonoster
|
|
@@ -44,4 +44,3 @@ function getApplication(prisma) {
|
|
|
44
44
|
return result ? (0, applicationWithEncodedStruct_1.applicationWithEncodedStruct)(resultWithParsedDate) : null;
|
|
45
45
|
}), (ref) => getFn(ref));
|
|
46
46
|
}
|
|
47
|
-
exports.getApplication = getApplication;
|
|
@@ -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
|
-
exports.listApplications =
|
|
12
|
+
exports.listApplications = listApplications;
|
|
13
13
|
/*
|
|
14
14
|
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
15
15
|
* http://github.com/fonoster/fonoster
|
|
@@ -66,4 +66,3 @@ function listApplications(prisma) {
|
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
exports.listApplications = listApplications;
|
|
@@ -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
|
-
exports.updateApplication =
|
|
12
|
+
exports.updateApplication = updateApplication;
|
|
13
13
|
const identity_1 = require("@fonoster/identity");
|
|
14
14
|
const logger_1 = require("@fonoster/logger");
|
|
15
15
|
const createGetFnUtil_1 = require("./createGetFnUtil");
|
|
@@ -54,4 +54,3 @@ function updateApplication(prisma) {
|
|
|
54
54
|
return { ref: applicationRef };
|
|
55
55
|
}), (ref) => getFn(ref));
|
|
56
56
|
}
|
|
57
|
-
exports.updateApplication = updateApplication;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.applicationWithEncodedStruct =
|
|
3
|
+
exports.applicationWithEncodedStruct = applicationWithEncodedStruct;
|
|
4
4
|
const pb_util_1 = require("pb-util");
|
|
5
5
|
function applicationWithEncodedStruct(application) {
|
|
6
6
|
const encodeConfig = (property) => {
|
|
@@ -20,4 +20,3 @@ function applicationWithEncodedStruct(application) {
|
|
|
20
20
|
}
|
|
21
21
|
return result; // Return the modified object
|
|
22
22
|
}
|
|
23
|
-
exports.applicationWithEncodedStruct = applicationWithEncodedStruct;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.convertToApplicationData =
|
|
3
|
+
exports.convertToApplicationData = convertToApplicationData;
|
|
4
4
|
const client_1 = require("@prisma/client");
|
|
5
5
|
const pb_util_1 = require("pb-util");
|
|
6
6
|
function convertToApplicationData(request) {
|
|
@@ -35,4 +35,3 @@ function convertToApplicationData(request) {
|
|
|
35
35
|
}
|
|
36
36
|
return result;
|
|
37
37
|
}
|
|
38
|
-
exports.convertToApplicationData = convertToApplicationData;
|
|
@@ -35,6 +35,7 @@ declare function getApplicationValidationSchema(request: {
|
|
|
35
35
|
}, "strip", z.ZodTypeAny, {
|
|
36
36
|
name?: string;
|
|
37
37
|
type?: "PROGRAMMABLE_VOICE";
|
|
38
|
+
appEndpoint?: string;
|
|
38
39
|
textToSpeech?: {
|
|
39
40
|
[x: string]: any;
|
|
40
41
|
productRef?: unknown;
|
|
@@ -45,10 +46,10 @@ declare function getApplicationValidationSchema(request: {
|
|
|
45
46
|
productRef?: unknown;
|
|
46
47
|
config?: unknown;
|
|
47
48
|
};
|
|
48
|
-
appEndpoint?: string;
|
|
49
49
|
}, {
|
|
50
50
|
name?: string;
|
|
51
51
|
type?: "PROGRAMMABLE_VOICE";
|
|
52
|
+
appEndpoint?: string;
|
|
52
53
|
textToSpeech?: {
|
|
53
54
|
[x: string]: any;
|
|
54
55
|
productRef?: unknown;
|
|
@@ -59,6 +60,5 @@ declare function getApplicationValidationSchema(request: {
|
|
|
59
60
|
productRef?: unknown;
|
|
60
61
|
config?: unknown;
|
|
61
62
|
};
|
|
62
|
-
appEndpoint?: string;
|
|
63
63
|
}>;
|
|
64
64
|
export { getApplicationValidationSchema };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getApplicationValidationSchema =
|
|
3
|
+
exports.getApplicationValidationSchema = getApplicationValidationSchema;
|
|
4
4
|
/*
|
|
5
5
|
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
6
6
|
* http://github.com/fonoster/fonoster
|
|
@@ -61,4 +61,3 @@ function getApplicationValidationSchema(request) {
|
|
|
61
61
|
: zod_1.z.undefined()
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
|
-
exports.getApplicationValidationSchema = getApplicationValidationSchema;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.prepareForValidation =
|
|
3
|
+
exports.prepareForValidation = prepareForValidation;
|
|
4
4
|
const client_1 = require("@prisma/client");
|
|
5
5
|
const pb_util_1 = require("pb-util");
|
|
6
6
|
function prepareForValidation(request) {
|
|
@@ -33,4 +33,3 @@ function prepareForValidation(request) {
|
|
|
33
33
|
}
|
|
34
34
|
return result;
|
|
35
35
|
}
|
|
36
|
-
exports.prepareForValidation = prepareForValidation;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validOrThrow =
|
|
3
|
+
exports.validOrThrow = validOrThrow;
|
|
4
4
|
const getApplicationValidationSchema_1 = require("./getApplicationValidationSchema");
|
|
5
5
|
const prepareForValidation_1 = require("./prepareForValidation");
|
|
6
6
|
function validOrThrow(request) {
|
|
@@ -12,4 +12,3 @@ function validOrThrow(request) {
|
|
|
12
12
|
});
|
|
13
13
|
schema.parse(data);
|
|
14
14
|
}
|
|
15
|
-
exports.validOrThrow = validOrThrow;
|
|
@@ -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
|
-
exports.buildService =
|
|
12
|
+
exports.buildService = buildService;
|
|
13
13
|
/*
|
|
14
14
|
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
15
15
|
* http://github.com/fonoster/fonoster
|
|
@@ -55,4 +55,3 @@ function buildService(influxdb) {
|
|
|
55
55
|
};
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
exports.buildService = buildService;
|
package/dist/calls/createCall.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
|
-
exports.createCall =
|
|
12
|
+
exports.createCall = createCall;
|
|
13
13
|
/*
|
|
14
14
|
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
15
15
|
* http://github.com/fonoster/fonoster
|
|
@@ -61,4 +61,3 @@ function createCall(publisher) {
|
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
|
-
exports.createCall = createCall;
|
|
@@ -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
|
-
exports.createCallPublisher =
|
|
12
|
+
exports.createCallPublisher = createCallPublisher;
|
|
13
13
|
/*
|
|
14
14
|
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
15
15
|
* http://github.com/fonoster/fonoster
|
|
@@ -44,4 +44,3 @@ function createCallPublisher(natsUrl) {
|
|
|
44
44
|
};
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
exports.createCallPublisher = createCallPublisher;
|
|
@@ -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
|
-
exports.createFetchCalls =
|
|
12
|
+
exports.createFetchCalls = createFetchCalls;
|
|
13
13
|
/*
|
|
14
14
|
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
15
15
|
* http://github.com/fonoster/fonoster
|
|
@@ -84,4 +84,3 @@ function createFetchCalls(influxdb) {
|
|
|
84
84
|
};
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
|
-
exports.createFetchCalls = createFetchCalls;
|
|
@@ -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
|
-
exports.createFetchSingleCall =
|
|
12
|
+
exports.createFetchSingleCall = createFetchSingleCall;
|
|
13
13
|
/*
|
|
14
14
|
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
15
15
|
* http://github.com/fonoster/fonoster
|
|
@@ -45,4 +45,3 @@ function createFetchSingleCall(influxdb) {
|
|
|
45
45
|
return items.length > 0 ? items[0] : null;
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
exports.createFetchSingleCall = createFetchSingleCall;
|
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.createTrackCallSubscriber =
|
|
15
|
+
exports.createTrackCallSubscriber = createTrackCallSubscriber;
|
|
16
16
|
/*
|
|
17
17
|
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
18
18
|
* http://github.com/fonoster/fonoster
|
|
@@ -50,4 +50,3 @@ function createTrackCallSubscriber(natsUrl) {
|
|
|
50
50
|
};
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
exports.createTrackCallSubscriber = createTrackCallSubscriber;
|
package/dist/calls/getCall.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
|
-
exports.getCall =
|
|
12
|
+
exports.getCall = getCall;
|
|
13
13
|
/*
|
|
14
14
|
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
15
15
|
* http://github.com/fonoster/fonoster
|
|
@@ -57,4 +57,3 @@ function getCall(influx) {
|
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
|
-
exports.getCall = getCall;
|
package/dist/calls/listCalls.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
|
-
exports.listCalls =
|
|
12
|
+
exports.listCalls = listCalls;
|
|
13
13
|
/*
|
|
14
14
|
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
15
15
|
* http://github.com/fonoster/fonoster
|
|
@@ -49,4 +49,3 @@ function listCalls(influx) {
|
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
exports.listCalls = listCalls;
|
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.createCreateCallSubscriber =
|
|
15
|
+
exports.createCreateCallSubscriber = createCreateCallSubscriber;
|
|
16
16
|
/*
|
|
17
17
|
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
18
18
|
* http://github.com/fonoster/fonoster
|
|
@@ -79,4 +79,3 @@ function createCreateCallSubscriber(config) {
|
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
|
-
exports.createCreateCallSubscriber = createCreateCallSubscriber;
|
package/dist/calls/trackCall.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.trackCall =
|
|
3
|
+
exports.trackCall = trackCall;
|
|
4
4
|
/*
|
|
5
5
|
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
6
6
|
* http://github.com/fonoster/fonoster
|
|
@@ -61,4 +61,3 @@ function trackCall(subs) {
|
|
|
61
61
|
});
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
exports.trackCall = trackCall;
|
package/dist/core/db.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ declare const prisma: import("@prisma/client/runtime/library").DynamicClientExte
|
|
|
3
3
|
model: {};
|
|
4
4
|
query: {};
|
|
5
5
|
client: {};
|
|
6
|
-
}>, import(".prisma/client").Prisma.TypeMapCb, {
|
|
6
|
+
}, import(".prisma/client").Prisma.PrismaClientOptions>, import(".prisma/client").Prisma.TypeMapCb, {
|
|
7
7
|
result: {};
|
|
8
8
|
model: {};
|
|
9
9
|
query: {};
|
|
10
10
|
client: {};
|
|
11
|
-
}>;
|
|
11
|
+
}, {}>;
|
|
12
12
|
type Prisma = typeof prisma;
|
|
13
13
|
export { prisma, Prisma };
|
package/dist/core/filesServer.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.filesServer =
|
|
6
|
+
exports.filesServer = filesServer;
|
|
7
7
|
/*
|
|
8
8
|
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
9
9
|
* http://github.com/fonoster/fonoster
|
|
@@ -47,4 +47,3 @@ function filesServer(params) {
|
|
|
47
47
|
logger.info(`files server is running on port ${port}`);
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
exports.filesServer = filesServer;
|
package/dist/core/services.d.ts
CHANGED
|
@@ -8,15 +8,15 @@ declare const services: Promise<[{
|
|
|
8
8
|
handlers: {
|
|
9
9
|
createApplication: (call: {
|
|
10
10
|
request: import("@fonoster/common").CreateApplicationRequest;
|
|
11
|
-
}, callback: (error: import("@fonoster/common").GrpcErrorMessage, response?: import("@fonoster/common").
|
|
11
|
+
}, callback: (error: import("@fonoster/common").GrpcErrorMessage, response?: import("@fonoster/common").CreateApplicationResponse) => void) => Promise<void>;
|
|
12
12
|
getApplication: (call: {
|
|
13
|
-
request: import("@fonoster/common").
|
|
13
|
+
request: import("@fonoster/common").GetApplicationRequest;
|
|
14
14
|
}, callback: (error?: import("@fonoster/common").GrpcErrorMessage, response?: import("@fonoster/common").Application) => void) => Promise<void>;
|
|
15
15
|
listApplications: (call: {
|
|
16
16
|
request: import("@fonoster/common").ListApplicationsRequest;
|
|
17
17
|
}, callback: (error: import("@fonoster/common").GrpcErrorMessage, response?: import("@fonoster/common").ListApplicationsResponse) => void) => Promise<void>;
|
|
18
18
|
deleteApplication: (call: {
|
|
19
|
-
request: import("@fonoster/common").
|
|
19
|
+
request: import("@fonoster/common").DeleteApplicationRequest;
|
|
20
20
|
}, callback: (error?: import("@fonoster/common").GrpcErrorMessage, response?: import("@fonoster/common").BaseApiObject) => void) => Promise<void>;
|
|
21
21
|
updateApplication: (call: {
|
|
22
22
|
request: import("@fonoster/common").UpdateApplicationRequest;
|
|
@@ -34,21 +34,15 @@ declare const services: Promise<[{
|
|
|
34
34
|
handlers: {
|
|
35
35
|
createSecret: (call: {
|
|
36
36
|
request: import("../secrets/types").CreateSecretRequest;
|
|
37
|
-
}, callback: (error: import("@fonoster/common").GrpcErrorMessage, response?:
|
|
38
|
-
ref: string;
|
|
39
|
-
}) => void) => Promise<void>;
|
|
37
|
+
}, callback: (error: import("@fonoster/common").GrpcErrorMessage, response?: import("../secrets/types").CreateSecretResponse) => void) => Promise<void>;
|
|
40
38
|
getSecret: (call: {
|
|
41
|
-
request:
|
|
42
|
-
ref: string;
|
|
43
|
-
};
|
|
39
|
+
request: import("../secrets/types").GetSecretRequest;
|
|
44
40
|
}, callback: (error?: import("@fonoster/common").GrpcErrorMessage, response?: import("../secrets/types").Secret) => void) => Promise<void>;
|
|
45
41
|
listSecrets: (call: {
|
|
46
42
|
request: import("../secrets/types").ListSecretsRequest;
|
|
47
43
|
}, callback: (error: import("@fonoster/common").GrpcErrorMessage, response?: import("../secrets/types").ListSecretsResponse) => void) => Promise<void>;
|
|
48
44
|
deleteSecret: (call: {
|
|
49
|
-
request:
|
|
50
|
-
ref: string;
|
|
51
|
-
};
|
|
45
|
+
request: import("../secrets/types").DeleteSecretRequest;
|
|
52
46
|
}, callback: (error?: import("@fonoster/common").GrpcErrorMessage, response?: {
|
|
53
47
|
ref: string;
|
|
54
48
|
}) => void) => Promise<void>;
|
|
@@ -13,7 +13,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
14
|
};
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.upsertDefaultPeer =
|
|
16
|
+
exports.upsertDefaultPeer = upsertDefaultPeer;
|
|
17
17
|
/*
|
|
18
18
|
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
19
19
|
* http://github.com/fonoster/fonoster
|
|
@@ -35,14 +35,11 @@ exports.upsertDefaultPeer = void 0;
|
|
|
35
35
|
const logger_1 = require("@fonoster/logger");
|
|
36
36
|
const common_1 = require("@routr/common");
|
|
37
37
|
const sdk_1 = __importDefault(require("@routr/sdk"));
|
|
38
|
+
const routrConfig_1 = require("./routrConfig");
|
|
38
39
|
const envs_1 = require("../envs");
|
|
39
40
|
const logger = (0, logger_1.getLogger)({ service: "apiserver", filePath: __filename });
|
|
40
|
-
const clientOptions = {
|
|
41
|
-
endpoint: envs_1.ROUTR_API_ENDPOINT,
|
|
42
|
-
insecure: true
|
|
43
|
-
};
|
|
44
41
|
function createCredentialsForDefaultPeer() {
|
|
45
|
-
const credentials = new sdk_1.default.Credentials(
|
|
42
|
+
const credentials = new sdk_1.default.Credentials(routrConfig_1.routrConfig);
|
|
46
43
|
const request = {
|
|
47
44
|
name: envs_1.ROUTR_DEFAULT_PEER_NAME,
|
|
48
45
|
username: envs_1.ROUTR_DEFAULT_PEER_USERNAME,
|
|
@@ -52,7 +49,7 @@ function createCredentialsForDefaultPeer() {
|
|
|
52
49
|
}
|
|
53
50
|
function upsertDefaultPeer() {
|
|
54
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
-
const peers = new sdk_1.default.Peers(
|
|
52
|
+
const peers = new sdk_1.default.Peers(routrConfig_1.routrConfig);
|
|
56
53
|
logger.info("creating default peer");
|
|
57
54
|
try {
|
|
58
55
|
const request = {
|
|
@@ -89,4 +86,3 @@ function upsertDefaultPeer() {
|
|
|
89
86
|
}
|
|
90
87
|
});
|
|
91
88
|
}
|
|
92
|
-
exports.upsertDefaultPeer = upsertDefaultPeer;
|
package/dist/envs.js
CHANGED
|
@@ -33,17 +33,14 @@ if (process.env.NODE_ENV === "dev") {
|
|
|
33
33
|
}
|
|
34
34
|
const e = process.env;
|
|
35
35
|
(0, common_1.assertEnvsAreSet)([
|
|
36
|
-
"INTEGRATIONS_FILE",
|
|
37
|
-
"TTS_PATH_TO_FILES",
|
|
38
36
|
"APP_URL",
|
|
39
37
|
"CLOAK_ENCRYPTION_KEY",
|
|
40
38
|
"SMTP_HOST",
|
|
41
39
|
"SMTP_SENDER",
|
|
42
40
|
"SMTP_AUTH_USER",
|
|
43
41
|
"SMTP_AUTH_PASS",
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"IDENTITY_PUBLIC_KEY_PATH",
|
|
42
|
+
"IDENTITY_DATABASE_URL",
|
|
43
|
+
"DATABASE_URL",
|
|
47
44
|
"INFLUXDB_URL",
|
|
48
45
|
"INFLUXDB_INIT_USERNAME",
|
|
49
46
|
"INFLUXDB_INIT_PASSWORD",
|
|
@@ -55,15 +52,17 @@ const e = process.env;
|
|
|
55
52
|
"ASTERISK_ARI_SECRET",
|
|
56
53
|
"NATS_URL"
|
|
57
54
|
]);
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
const IDENTITY_PRIVATE_KEY_PATH = e.IDENTITY_PRIVATE_KEY_PATH || "/opt/fonoster/keys/private.pem";
|
|
56
|
+
const IDENTITY_PUBLIC_KEY_PATH = e.IDENTITY_PUBLIC_KEY_PATH || "/opt/fonoster/keys/public.pem";
|
|
57
|
+
(0, common_1.assertFileExists)(IDENTITY_PRIVATE_KEY_PATH);
|
|
58
|
+
(0, common_1.assertFileExists)(IDENTITY_PUBLIC_KEY_PATH);
|
|
60
59
|
// Frontend configurations
|
|
61
60
|
exports.APP_URL = e.APP_URL;
|
|
62
61
|
// Identity configurations
|
|
63
|
-
exports.IDENTITY_ISSUER = e.IDENTITY_ISSUER;
|
|
62
|
+
exports.IDENTITY_ISSUER = e.IDENTITY_ISSUER || "https://fonoster.local";
|
|
64
63
|
exports.IDENTITY_AUDIENCE = e.IDENTITY_AUDIENCE || "api";
|
|
65
|
-
exports.IDENTITY_PRIVATE_KEY = fs_1.default.readFileSync(
|
|
66
|
-
exports.IDENTITY_PUBLIC_KEY = fs_1.default.readFileSync(
|
|
64
|
+
exports.IDENTITY_PRIVATE_KEY = fs_1.default.readFileSync(IDENTITY_PRIVATE_KEY_PATH, "utf8");
|
|
65
|
+
exports.IDENTITY_PUBLIC_KEY = fs_1.default.readFileSync(IDENTITY_PUBLIC_KEY_PATH, "utf8");
|
|
67
66
|
exports.IDENTITY_ID_TOKEN_EXPIRES_IN = e.IDENTITY_ID_TOKEN_EXPIRES_IN || "15m";
|
|
68
67
|
exports.IDENTITY_ACCESS_TOKEN_EXPIRES_IN = e.IDENTITY_ACCESS_TOKEN_EXPIRES_IN || "15m";
|
|
69
68
|
exports.IDENTITY_REFRESH_TOKEN_EXPIRES_IN = e.IDENTITY_REFRESH_TOKEN_EXPIRES_IN || "24h";
|
|
@@ -89,7 +88,7 @@ exports.INFLUXDB_BUCKET = e.INFLUXDB_INIT_BUCKET;
|
|
|
89
88
|
exports.INFLUXDB_TOKEN = e.INFLUXDB_INIT_TOKEN;
|
|
90
89
|
// Other configurations
|
|
91
90
|
exports.CLOAK_ENCRYPTION_KEY = e.CLOAK_ENCRYPTION_KEY;
|
|
92
|
-
exports.ROUTR_API_ENDPOINT = e.ROUTR_API_ENDPOINT || "
|
|
91
|
+
exports.ROUTR_API_ENDPOINT = e.ROUTR_API_ENDPOINT || "routr:51908";
|
|
93
92
|
exports.ROUTR_DEFAULT_PEER_NAME = e.ROUTR_DEFAULT_PEER_NAME || "Voice Server";
|
|
94
93
|
exports.ROUTR_DEFAULT_PEER_USERNAME = e.ROUTR_DEFAULT_PEER_USERNAME || "voice";
|
|
95
94
|
exports.ROUTR_DEFAULT_PEER_AOR = e.ROUTR_DEFAULT_PEER_AOR || "sip:voice@default";
|
|
@@ -111,4 +110,4 @@ exports.TTS_PATH_TO_FILES = e.TTS_PATH_TO_FILES || os_1.default.tmpdir();
|
|
|
111
110
|
exports.FILES_SERVER_PORT = e.FILES_SERVER_PORT
|
|
112
111
|
? parseInt(e.FILES_SERVER_PORT)
|
|
113
112
|
: 9876;
|
|
114
|
-
exports.INTEGRATIONS_FILE = e.INTEGRATIONS_FILE;
|
|
113
|
+
exports.INTEGRATIONS_FILE = e.INTEGRATIONS_FILE || "/opt/fonoster/integrations.json";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createInfluxDbPub =
|
|
3
|
+
exports.createInfluxDbPub = createInfluxDbPub;
|
|
4
4
|
/*
|
|
5
5
|
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
6
6
|
* http://github.com/fonoster/fonoster
|
|
@@ -51,4 +51,3 @@ function createInfluxDbPub(config) {
|
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
exports.createInfluxDbPub = createInfluxDbPub;
|
package/dist/events/nats.js
CHANGED
|
@@ -16,7 +16,7 @@ var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
|
16
16
|
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
17
17
|
};
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.watchNats =
|
|
19
|
+
exports.watchNats = watchNats;
|
|
20
20
|
/*
|
|
21
21
|
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
22
22
|
* http://github.com/fonoster/fonoster
|
|
@@ -82,4 +82,3 @@ function watchNats(natsUrl, callback) {
|
|
|
82
82
|
yield Promise.all([streamEvents(r, callback), streamEvents(f, callback)]);
|
|
83
83
|
}))();
|
|
84
84
|
}
|
|
85
|
-
exports.watchNats = watchNats;
|
|
@@ -9,21 +9,15 @@ declare function buildService(prisma: Prisma): {
|
|
|
9
9
|
handlers: {
|
|
10
10
|
createSecret: (call: {
|
|
11
11
|
request: import("./types").CreateSecretRequest;
|
|
12
|
-
}, callback: (error: import("@fonoster/common").GrpcErrorMessage, response?:
|
|
13
|
-
ref: string;
|
|
14
|
-
}) => void) => Promise<void>;
|
|
12
|
+
}, callback: (error: import("@fonoster/common").GrpcErrorMessage, response?: import("./types").CreateSecretResponse) => void) => Promise<void>;
|
|
15
13
|
getSecret: (call: {
|
|
16
|
-
request:
|
|
17
|
-
ref: string;
|
|
18
|
-
};
|
|
14
|
+
request: import("./types").GetSecretRequest;
|
|
19
15
|
}, callback: (error?: import("@fonoster/common").GrpcErrorMessage, response?: import("./types").Secret) => void) => Promise<void>;
|
|
20
16
|
listSecrets: (call: {
|
|
21
17
|
request: import("./types").ListSecretsRequest;
|
|
22
18
|
}, callback: (error: import("@fonoster/common").GrpcErrorMessage, response?: import("./types").ListSecretsResponse) => void) => Promise<void>;
|
|
23
19
|
deleteSecret: (call: {
|
|
24
|
-
request:
|
|
25
|
-
ref: string;
|
|
26
|
-
};
|
|
20
|
+
request: import("./types").DeleteSecretRequest;
|
|
27
21
|
}, callback: (error?: import("@fonoster/common").GrpcErrorMessage, response?: {
|
|
28
22
|
ref: string;
|
|
29
23
|
}) => void) => Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildService =
|
|
3
|
+
exports.buildService = buildService;
|
|
4
4
|
/*
|
|
5
5
|
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
6
6
|
* http://github.com/fonoster/fonoster
|
|
@@ -41,4 +41,3 @@ function buildService(prisma) {
|
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
exports.buildService = buildService;
|
|
@@ -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
|
-
exports.createGetFnUtil =
|
|
12
|
+
exports.createGetFnUtil = createGetFnUtil;
|
|
13
13
|
/*
|
|
14
14
|
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
15
15
|
* http://github.com/fonoster/fonoster
|
|
@@ -43,4 +43,3 @@ function createGetFnUtil(prisma) {
|
|
|
43
43
|
} }));
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
exports.createGetFnUtil = createGetFnUtil;
|
|
@@ -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
|
-
exports.createSecret =
|
|
12
|
+
exports.createSecret = createSecret;
|
|
13
13
|
/*
|
|
14
14
|
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
15
15
|
* http://github.com/fonoster/fonoster
|
|
@@ -54,4 +54,3 @@ function createSecret(prisma) {
|
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
-
exports.createSecret = createSecret;
|