@fonoster/common 0.8.39 → 0.8.40

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.
@@ -6,6 +6,7 @@ declare const assistantSchema: z.ZodObject<{
6
6
  goodbyeMessage: z.ZodString;
7
7
  systemErrorMessage: z.ZodString;
8
8
  initialDtmf: z.ZodOptional<z.ZodString>;
9
+ maxSessionDuration: z.ZodDefault<z.ZodNumber>;
9
10
  maxSpeechWaitTimeout: z.ZodDefault<z.ZodNumber>;
10
11
  transferOptions: z.ZodOptional<z.ZodObject<{
11
12
  phoneNumber: z.ZodString;
@@ -55,6 +56,7 @@ declare const assistantSchema: z.ZodObject<{
55
56
  goodbyeMessage?: string;
56
57
  systemErrorMessage?: string;
57
58
  initialDtmf?: string;
59
+ maxSessionDuration?: number;
58
60
  maxSpeechWaitTimeout?: number;
59
61
  transferOptions?: {
60
62
  message?: string;
@@ -78,6 +80,7 @@ declare const assistantSchema: z.ZodObject<{
78
80
  goodbyeMessage?: string;
79
81
  systemErrorMessage?: string;
80
82
  initialDtmf?: string;
83
+ maxSessionDuration?: number;
81
84
  maxSpeechWaitTimeout?: number;
82
85
  transferOptions?: {
83
86
  message?: string;
@@ -298,6 +301,7 @@ declare const assistantSchema: z.ZodObject<{
298
301
  goodbyeMessage?: string;
299
302
  systemErrorMessage?: string;
300
303
  initialDtmf?: string;
304
+ maxSessionDuration?: number;
301
305
  maxSpeechWaitTimeout?: number;
302
306
  transferOptions?: {
303
307
  message?: string;
@@ -356,6 +360,7 @@ declare const assistantSchema: z.ZodObject<{
356
360
  goodbyeMessage?: string;
357
361
  systemErrorMessage?: string;
358
362
  initialDtmf?: string;
363
+ maxSessionDuration?: number;
359
364
  maxSpeechWaitTimeout?: number;
360
365
  transferOptions?: {
361
366
  message?: string;
@@ -5,6 +5,7 @@ declare const conversationSettingsSchema: z.ZodObject<{
5
5
  goodbyeMessage: z.ZodString;
6
6
  systemErrorMessage: z.ZodString;
7
7
  initialDtmf: z.ZodOptional<z.ZodString>;
8
+ maxSessionDuration: z.ZodDefault<z.ZodNumber>;
8
9
  maxSpeechWaitTimeout: z.ZodDefault<z.ZodNumber>;
9
10
  transferOptions: z.ZodOptional<z.ZodObject<{
10
11
  phoneNumber: z.ZodString;
@@ -54,6 +55,7 @@ declare const conversationSettingsSchema: z.ZodObject<{
54
55
  goodbyeMessage?: string;
55
56
  systemErrorMessage?: string;
56
57
  initialDtmf?: string;
58
+ maxSessionDuration?: number;
57
59
  maxSpeechWaitTimeout?: number;
58
60
  transferOptions?: {
59
61
  message?: string;
@@ -77,6 +79,7 @@ declare const conversationSettingsSchema: z.ZodObject<{
77
79
  goodbyeMessage?: string;
78
80
  systemErrorMessage?: string;
79
81
  initialDtmf?: string;
82
+ maxSessionDuration?: number;
80
83
  maxSpeechWaitTimeout?: number;
81
84
  transferOptions?: {
82
85
  message?: string;
@@ -55,12 +55,12 @@ exports.conversationSettingsSchema = void 0;
55
55
  const zod_1 = require("zod");
56
56
  const Messages = __importStar(require("../messages"));
57
57
  const NUMBER_BETWEEN_0_AND_1 = "Must be a number between 0 and 1";
58
- const MAX_SPEECH_WAIT_TIMEOUT = 10000;
58
+ const MAX_SPEECH_WAIT_TIMEOUT = 5000;
59
59
  const IDLE_OPTIONS_TIMEOUT = 10000;
60
60
  const IDLE_OPTIONS_MAX_TIMEOUT_COUNT = 3;
61
61
  const VAD_ACTIVATION_THRESHOLD = 0.3;
62
- const VAD_DEACTIVATION_THRESHOLD = 0.15;
63
- const VAD_DEBOUNCE_FRAMES = 1;
62
+ const VAD_DEACTIVATION_THRESHOLD = 0.25;
63
+ const VAD_DEBOUNCE_FRAMES = 3;
64
64
  const conversationSettingsSchema = zod_1.z.object({
65
65
  firstMessage: zod_1.z.string().optional(),
66
66
  systemTemplate: zod_1.z.string(),
@@ -70,6 +70,11 @@ const conversationSettingsSchema = zod_1.z.object({
70
70
  .string()
71
71
  .regex(/^[0-9*#]+$/, { message: Messages.VALID_DTMF })
72
72
  .optional(),
73
+ maxSessionDuration: zod_1.z
74
+ .number()
75
+ .int()
76
+ .positive()
77
+ .default(30 * 60 * 1000), // 30 minutes
73
78
  maxSpeechWaitTimeout: zod_1.z
74
79
  .number()
75
80
  .int({ message: Messages.POSITIVE_INTEGER_MESSAGE })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fonoster/common",
3
- "version": "0.8.39",
3
+ "version": "0.8.40",
4
4
  "description": "Common library for Fonoster projects",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/fonoster#readme",
@@ -18,7 +18,7 @@
18
18
  "clean": "rimraf ./dist node_modules tsconfig.tsbuildinfo"
19
19
  },
20
20
  "dependencies": {
21
- "@fonoster/logger": "^0.8.39",
21
+ "@fonoster/logger": "^0.8.40",
22
22
  "@grpc/grpc-js": "~1.10.6",
23
23
  "@grpc/proto-loader": "^0.7.12",
24
24
  "@influxdata/influxdb-client": "^1.35.0",
@@ -48,5 +48,5 @@
48
48
  "devDependencies": {
49
49
  "@types/nodemailer": "^6.4.14"
50
50
  },
51
- "gitHead": "3ba2a5330d268f5be03fd9d5bbd22aeeb264fa61"
51
+ "gitHead": "2bbf3dadb6e1e178c4eefdeb4291a2e05eef0f2b"
52
52
  }