@onereach/step-voice 7.0.49-VOIC1799.2 → 7.0.49
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/dst/Voice Agent.d.ts +8 -4
- package/dst/Voice Agent.js +5 -5
- package/package.json +1 -1
package/dst/Voice Agent.d.ts
CHANGED
|
@@ -74,6 +74,13 @@ interface WorkingHoursDayInput {
|
|
|
74
74
|
start?: string;
|
|
75
75
|
end?: string;
|
|
76
76
|
}
|
|
77
|
+
type WorkingHoursDaysInput = Partial<Record<WorkingHoursDayKey, WorkingHoursDayInput>>;
|
|
78
|
+
interface WorkingHoursInput {
|
|
79
|
+
enabled?: boolean | string;
|
|
80
|
+
timezone?: string;
|
|
81
|
+
closed_message?: string;
|
|
82
|
+
days?: WorkingHoursDaysInput;
|
|
83
|
+
}
|
|
77
84
|
interface INPUT {
|
|
78
85
|
handlers: Handler[];
|
|
79
86
|
subagents: Subagent[];
|
|
@@ -104,10 +111,7 @@ interface INPUT {
|
|
|
104
111
|
soft_timeout?: SoftTimeoutConfig;
|
|
105
112
|
system_tools?: AgentSystemToolConfig[];
|
|
106
113
|
knowledge?: AgentKnowledgeConfig[];
|
|
107
|
-
|
|
108
|
-
working_hours_timezone?: string;
|
|
109
|
-
working_hours_closed_message?: string;
|
|
110
|
-
working_hours_days?: Partial<Record<WorkingHoursDayKey, WorkingHoursDayInput>>;
|
|
114
|
+
working_hours?: WorkingHoursInput;
|
|
111
115
|
}
|
|
112
116
|
export default class VoiceAgent extends VoiceStep<Partial<INPUT>> {
|
|
113
117
|
runStep(): Promise<void>;
|
package/dst/Voice Agent.js
CHANGED
|
@@ -314,12 +314,12 @@ class VoiceAgent extends voice_1.default {
|
|
|
314
314
|
return settings;
|
|
315
315
|
}
|
|
316
316
|
buildWorkingHours() {
|
|
317
|
-
const {
|
|
318
|
-
if (!this.isStepFlagEnabled(
|
|
317
|
+
const { enabled = false, timezone: timezoneInput = 'UTC', closed_message: closedMessageInput = DEFAULT_CLOSED_MESSAGE, days = {} } = this.data.working_hours ?? {};
|
|
318
|
+
if (!this.isStepFlagEnabled(enabled))
|
|
319
319
|
return {};
|
|
320
|
-
const schedules = this.buildWorkingHoursSchedules(
|
|
321
|
-
const timezone = lodash_1.default.trim(String(
|
|
322
|
-
const closedMessage = lodash_1.default.trim(String(
|
|
320
|
+
const schedules = this.buildWorkingHoursSchedules(days);
|
|
321
|
+
const timezone = lodash_1.default.trim(String(timezoneInput || '')) || 'UTC';
|
|
322
|
+
const closedMessage = lodash_1.default.trim(String(closedMessageInput || '')) || DEFAULT_CLOSED_MESSAGE;
|
|
323
323
|
return {
|
|
324
324
|
working_hours: {
|
|
325
325
|
enabled: true,
|