@voiceflow/dtos-interact 2.28.2-e005919e4a.149 → 2.29.1-1d7e9be81d.148

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 (80) hide show
  1. package/build/main.d.ts +10 -1
  2. package/build/main.d.ts.map +1 -1
  3. package/build/main.js +10 -1
  4. package/build/main.js.map +1 -1
  5. package/build/request/request-config.dto.d.ts +0 -1
  6. package/build/request/request-config.dto.d.ts.map +1 -1
  7. package/build/request/request-config.dto.js +0 -1
  8. package/build/request/request-config.dto.js.map +1 -1
  9. package/build/socket/socket-asr-audio-send.dto.d.ts +7 -0
  10. package/build/socket/socket-asr-audio-send.dto.d.ts.map +1 -0
  11. package/build/socket/socket-asr-audio-send.dto.js +10 -0
  12. package/build/socket/socket-asr-audio-send.dto.js.map +1 -0
  13. package/build/socket/socket-asr-barge-in.dto.d.ts +7 -0
  14. package/build/socket/socket-asr-barge-in.dto.d.ts.map +1 -0
  15. package/build/socket/socket-asr-barge-in.dto.js +9 -0
  16. package/build/socket/socket-asr-barge-in.dto.js.map +1 -0
  17. package/build/socket/socket-asr-interrupt.dto.d.ts +7 -0
  18. package/build/socket/socket-asr-interrupt.dto.d.ts.map +1 -0
  19. package/build/socket/socket-asr-interrupt.dto.js +9 -0
  20. package/build/socket/socket-asr-interrupt.dto.js.map +1 -0
  21. package/build/socket/socket-asr-start.dto.d.ts +45 -0
  22. package/build/socket/socket-asr-start.dto.d.ts.map +1 -0
  23. package/build/socket/socket-asr-start.dto.js +31 -0
  24. package/build/socket/socket-asr-start.dto.js.map +1 -0
  25. package/build/socket/socket-asr-started.dto.d.ts +23 -0
  26. package/build/socket/socket-asr-started.dto.d.ts.map +1 -0
  27. package/build/socket/socket-asr-started.dto.js +15 -0
  28. package/build/socket/socket-asr-started.dto.js.map +1 -0
  29. package/build/socket/socket-asr-stop.dto.d.ts +7 -0
  30. package/build/socket/socket-asr-stop.dto.d.ts.map +1 -0
  31. package/build/socket/socket-asr-stop.dto.js +9 -0
  32. package/build/socket/socket-asr-stop.dto.js.map +1 -0
  33. package/build/socket/socket-asr-stopped.dto.d.ts +34 -0
  34. package/build/socket/socket-asr-stopped.dto.d.ts.map +1 -0
  35. package/build/socket/socket-asr-stopped.dto.js +20 -0
  36. package/build/socket/socket-asr-stopped.dto.js.map +1 -0
  37. package/build/socket/socket-asr-transcript-partial.dto.d.ts +13 -0
  38. package/build/socket/socket-asr-transcript-partial.dto.d.ts.map +1 -0
  39. package/build/socket/socket-asr-transcript-partial.dto.js +15 -0
  40. package/build/socket/socket-asr-transcript-partial.dto.js.map +1 -0
  41. package/build/socket/socket-asr-transcript.dto.d.ts +11 -0
  42. package/build/socket/socket-asr-transcript.dto.d.ts.map +1 -0
  43. package/build/socket/socket-asr-transcript.dto.js +13 -0
  44. package/build/socket/socket-asr-transcript.dto.js.map +1 -0
  45. package/build/socket/socket-client-start.dto.d.ts +0 -1
  46. package/build/socket/socket-client-start.dto.d.ts.map +1 -1
  47. package/build/socket/socket-client-start.dto.js +0 -1
  48. package/build/socket/socket-client-start.dto.js.map +1 -1
  49. package/build/socket/socket-message-type.enum.d.ts +80 -0
  50. package/build/socket/socket-message-type.enum.d.ts.map +1 -1
  51. package/build/socket/socket-message-type.enum.js +40 -0
  52. package/build/socket/socket-message-type.enum.js.map +1 -1
  53. package/build/socket/socket-message.dto.d.ts +164 -2
  54. package/build/socket/socket-message.dto.d.ts.map +1 -1
  55. package/build/socket/socket-message.dto.js +22 -0
  56. package/build/socket/socket-message.dto.js.map +1 -1
  57. package/build/socket/socket-playback-idle.dto.d.ts +9 -0
  58. package/build/socket/socket-playback-idle.dto.d.ts.map +1 -0
  59. package/build/socket/socket-playback-idle.dto.js +11 -0
  60. package/build/socket/socket-playback-idle.dto.js.map +1 -0
  61. package/build/widget-settings/widget-settings-chat-settings/widget-settings-chat-settings.dto.d.ts +17 -17
  62. package/build/widget-settings/widget-settings-chat-settings/widget-settings-chat-settings.dto.js +9 -9
  63. package/build/widget-settings/widget-settings-chat-settings/widget-settings-chat-settings.dto.js.map +1 -1
  64. package/build/widget-settings/widget-settings.constant.d.ts +2 -80
  65. package/build/widget-settings/widget-settings.constant.d.ts.map +1 -1
  66. package/build/widget-settings/widget-settings.constant.js +16 -132
  67. package/build/widget-settings/widget-settings.constant.js.map +1 -1
  68. package/build/widget-settings/widget-settings.dto.d.ts +24 -116
  69. package/build/widget-settings/widget-settings.dto.d.ts.map +1 -1
  70. package/build/widget-settings/widget-settings.dto.js +6 -72
  71. package/build/widget-settings/widget-settings.dto.js.map +1 -1
  72. package/build/widget-settings/widget-settings.enum.d.ts +0 -18
  73. package/build/widget-settings/widget-settings.enum.d.ts.map +1 -1
  74. package/build/widget-settings/widget-settings.enum.js +0 -14
  75. package/build/widget-settings/widget-settings.enum.js.map +1 -1
  76. package/package.json +2 -2
  77. package/build/widget-settings/widget-settings.util.d.ts +0 -5
  78. package/build/widget-settings/widget-settings.util.d.ts.map +0 -1
  79. package/build/widget-settings/widget-settings.util.js +0 -4
  80. package/build/widget-settings/widget-settings.util.js.map +0 -1
@@ -27,60 +27,13 @@ export declare const WIDGET_SETTINGS_DEFAULT_WIDTH = "400";
27
27
  * A number (not a numeric string) because every consumer uses it for comparison.
28
28
  */
29
29
  export declare const WIDGET_SETTINGS_MIN_WIDTH = 320;
30
- /**
31
- * The canonical set of widget content strings that are translatable — the shared contract between
32
- * the creator-app editor (which writes `settings.widget.translations[locale][key]`) and the webchat
33
- * widget (which reads it and resolves against the base catalog). Both repos MUST index
34
- * `translations` by these exact key strings; a key present in one repo but not the other is a
35
- * silently-broken translation. creator-app maps each key to its `settings.widget` path; webchat maps
36
- * each to its `content.*` base-catalog key. URLs and images are intentionally excluded (never
37
- * translated). Extend here — in one place — when a new content string becomes translatable.
38
- */
39
- export declare const WIDGET_TRANSLATABLE_CONTENT_KEYS: readonly ['banner.title', 'banner.description', 'placeholderText', 'aiDisclaimer.text', 'disclaimer.title', 'disclaimer.description', 'disclaimer.primaryButtonText', 'disclaimer.secondaryButtonText', 'launcher.text', 'voice.callToActionText', 'voice.startButtonText', 'voice.listeningText', 'voice.talkingText', 'voice.endButtonText'];
40
- export type WidgetTranslatableContentKey = (typeof WIDGET_TRANSLATABLE_CONTENT_KEYS)[number];
41
- /**
42
- * The Voiceflow default English copy for the 14 translatable content strings, keyed by
43
- * {@link WidgetTranslatableContentKey}. This is the text every template and
44
- * `WIDGET_SETTINGS_DEFAULT_SETTINGS` seed into new projects, and it is also the widget's identity
45
- * check for "this is our copy": while a widget is multilingual, stored text exactly equal to its
46
- * field's entry here renders from the shipped catalog in the visitor's language, and anything else
47
- * is treated as customer-authored and rendered as-is.
48
- *
49
- * FROZEN. Changing or removing a string silently re-classifies every stored copy of the old string
50
- * as customer-authored, so it stops translating. The webchat English catalog (`content.<key>` in
51
- * `libs/chat/src/i18n/locales/en.json`) must equal this map exactly; a future copy change needs the
52
- * widget to recognise both the old and the new string as ours before either side is edited.
53
- */
54
- export declare const WIDGET_SETTINGS_FALLBACK_CONTENT: {
55
- 'banner.title': string;
56
- 'banner.description': string;
57
- placeholderText: string;
58
- 'aiDisclaimer.text': string;
59
- 'disclaimer.title': string;
60
- 'disclaimer.description': string;
61
- 'disclaimer.primaryButtonText': string;
62
- 'disclaimer.secondaryButtonText': string;
63
- 'launcher.text': string;
64
- 'voice.callToActionText': string;
65
- 'voice.startButtonText': string;
66
- 'voice.listeningText': string;
67
- 'voice.talkingText': string;
68
- 'voice.endButtonText': string;
69
- };
70
- /**
71
- * Settings for a widget with nothing stored. Carries the Voiceflow default copy for every
72
- * translatable string (the same literals new projects have always been seeded with), and
73
- * deliberately NO `languages` block: every path that falls back to this object (the `v13_00`
74
- * backfill, a first save from a settings-less version, the runtime's fallback for a version with no
75
- * widget settings) must produce a single-language widget. A `languages` block here would opt all of
76
- * those projects into multilingual behaviour without anyone choosing it.
77
- */
78
30
  export declare const WIDGET_SETTINGS_DEFAULT_SETTINGS: {
79
31
  type: "chat";
80
32
  chat: {
81
33
  voiceInput: true;
82
34
  voiceOutput: false;
83
35
  voiceMode: true;
36
+ notificationSound: false;
84
37
  renderMode: "widget";
85
38
  headerImage: {
86
39
  enabled: true;
@@ -89,9 +42,9 @@ export declare const WIDGET_SETTINGS_DEFAULT_SETTINGS: {
89
42
  enabled: true;
90
43
  };
91
44
  banner: {
45
+ enabled: true;
92
46
  title: string;
93
47
  description: string;
94
- enabled: true;
95
48
  };
96
49
  placeholderText: string;
97
50
  aiDisclaimer: {
@@ -160,35 +113,4 @@ export declare const WIDGET_SETTINGS_DEFAULT_SETTINGS: {
160
113
  disableTranscript: false;
161
114
  };
162
115
  };
163
- /**
164
- * The language config the settings UI starts from when a widget has none stored: English only,
165
- * browser detection. Pure config: it carries no `enabled` flag, so reading it never opts a widget in.
166
- */
167
- export declare const WIDGET_SETTINGS_DEFAULT_LANGUAGES: {
168
- mode: "browser";
169
- default: string;
170
- supported: string[];
171
- };
172
- /**
173
- * Tier 1 of the widget language rollout: left-to-right locales the widget's font stack fully covers. The
174
- * "All supported languages" option snapshots this list into `languages.supported`, and new projects
175
- * start from it. Every entry is a `LegacyVFLocale` value — pinned by a test in `@voiceflow/utils-designer`,
176
- * since that enum cannot be imported here.
177
- */
178
- export declare const WIDGET_SHIPPED_LOCALES: readonly string[];
179
- /**
180
- * New-project language config: every shipped locale offered ("All supported languages"), browser
181
- * detection, opted in. `chosen` stays unset until the customer first switches to "Only languages I choose".
182
- *
183
- * Applied ONLY at genuine new-project creation (`AssistantService.createOneFromTemplate` and
184
- * `GenerationService.runAssistantGeneration`), gated by `FEAT_MULTILINGUAL_WIDGET`. Existing projects
185
- * never get it implicitly; their owner opts in from the settings page.
186
- */
187
- export declare const WIDGET_SETTINGS_NEW_PROJECT_LANGUAGES: {
188
- mode: "browser";
189
- default: string;
190
- supported: string[];
191
- offered: "all";
192
- enabled: true;
193
- };
194
116
  //# sourceMappingURL=widget-settings.constant.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"widget-settings.constant.d.ts","sourceRoot":"","sources":["../../src/widget-settings/widget-settings.constant.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,kCAAkC,YAAY,CAAC;AAE5D,eAAO,MAAM,+BAA+B;;;;;;;;;;;CAW3C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,QAAQ,CAAC;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C;;;;;;;;GAQG;AACH,eAAO,MAAM,gCAAgC,YAC3C,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,EACxB,8BAA8B,EAC9B,gCAAgC,EAChC,eAAe,EACf,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,CACb,CAAC;AAEX,MAAM,MAAM,4BAA4B,GAAG,CAAC,OAAO,gCAAgC,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7F;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;CAgBW,CAAC;AAEzD;;;;;;;GAOG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAyCzC,UAAU;QACV,OAAO;YACL,gBAAgB;YAChB,eAAe;YACf,aAAa;YACb,WAAW;YACX,aAAa;;;;;;YAMb,IAAI;YACJ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsBgB,CAAC;AAE3B;;;GAGG;AACH,eAAO,MAAM,iCAAiC;;;;CAIM,CAAC;AAErD;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAwBnD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,qCAAqC;;;;;;CAME,CAAC"}
1
+ {"version":3,"file":"widget-settings.constant.d.ts","sourceRoot":"","sources":["../../src/widget-settings/widget-settings.constant.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,kCAAkC,YAAY,CAAC;AAE5D,eAAO,MAAM,+BAA+B;;;;;;;;;;;CAW3C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,QAAQ,CAAC;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA2CzC,UAAU;QACV,OAAO;YACL,gBAAgB;YAChB,eAAe;YACf,aAAa;YACb,WAAW;YACX,aAAa;;;;;;YAMb,IAAI;YACJ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsBgB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { WidgetSettingsChatPersistence, WidgetSettingsChatRenderMode, WidgetSettingsLanguageOfferedSet, WidgetSettingsLanguageResolutionMode, WidgetSettingsLauncherType, WidgetSettingsVoiceRenderMode, WidgetSettingsWidgetPosition, WidgetSettingsWidgetType, } from './widget-settings.enum.js';
1
+ import { WidgetSettingsChatPersistence, WidgetSettingsChatRenderMode, WidgetSettingsLauncherType, WidgetSettingsVoiceRenderMode, WidgetSettingsWidgetPosition, WidgetSettingsWidgetType, } from './widget-settings.enum.js';
2
2
  export const WIDGET_SETTINGS_DEFAULT_MAIN_COLOR = '#397DFF';
3
3
  export const WIDGET_SETTINGS_DEFAULT_PALETTE = {
4
4
  50: '#E7F5FD',
@@ -28,74 +28,13 @@ export const WIDGET_SETTINGS_DEFAULT_WIDTH = '400';
28
28
  * A number (not a numeric string) because every consumer uses it for comparison.
29
29
  */
30
30
  export const WIDGET_SETTINGS_MIN_WIDTH = 320;
31
- /**
32
- * The canonical set of widget content strings that are translatable — the shared contract between
33
- * the creator-app editor (which writes `settings.widget.translations[locale][key]`) and the webchat
34
- * widget (which reads it and resolves against the base catalog). Both repos MUST index
35
- * `translations` by these exact key strings; a key present in one repo but not the other is a
36
- * silently-broken translation. creator-app maps each key to its `settings.widget` path; webchat maps
37
- * each to its `content.*` base-catalog key. URLs and images are intentionally excluded (never
38
- * translated). Extend here — in one place — when a new content string becomes translatable.
39
- */
40
- export const WIDGET_TRANSLATABLE_CONTENT_KEYS = [
41
- 'banner.title',
42
- 'banner.description',
43
- 'placeholderText',
44
- 'aiDisclaimer.text',
45
- 'disclaimer.title',
46
- 'disclaimer.description',
47
- 'disclaimer.primaryButtonText',
48
- 'disclaimer.secondaryButtonText',
49
- 'launcher.text',
50
- 'voice.callToActionText',
51
- 'voice.startButtonText',
52
- 'voice.listeningText',
53
- 'voice.talkingText',
54
- 'voice.endButtonText',
55
- ];
56
- /**
57
- * The Voiceflow default English copy for the 14 translatable content strings, keyed by
58
- * {@link WidgetTranslatableContentKey}. This is the text every template and
59
- * `WIDGET_SETTINGS_DEFAULT_SETTINGS` seed into new projects, and it is also the widget's identity
60
- * check for "this is our copy": while a widget is multilingual, stored text exactly equal to its
61
- * field's entry here renders from the shipped catalog in the visitor's language, and anything else
62
- * is treated as customer-authored and rendered as-is.
63
- *
64
- * FROZEN. Changing or removing a string silently re-classifies every stored copy of the old string
65
- * as customer-authored, so it stops translating. The webchat English catalog (`content.<key>` in
66
- * `libs/chat/src/i18n/locales/en.json`) must equal this map exactly; a future copy change needs the
67
- * widget to recognise both the old and the new string as ours before either side is edited.
68
- */
69
- export const WIDGET_SETTINGS_FALLBACK_CONTENT = {
70
- 'banner.title': 'Your AI agent',
71
- 'banner.description': 'How can I help you today?',
72
- placeholderText: 'Message...',
73
- 'aiDisclaimer.text': 'Generated by AI, double-check for accuracy.',
74
- 'disclaimer.title': 'Privacy notice',
75
- 'disclaimer.description': 'Before we can proceed with your conversation, we kindly ask you to review and accept our privacy policy, outlining how we handle and protect your personal information throughout our services.',
76
- 'disclaimer.primaryButtonText': 'Submit',
77
- 'disclaimer.secondaryButtonText': 'Privacy policy',
78
- 'launcher.text': 'Test your agent',
79
- 'voice.callToActionText': 'How can I help you?',
80
- 'voice.startButtonText': 'Start a call',
81
- 'voice.listeningText': 'Listening...',
82
- 'voice.talkingText': 'Talk to interrupt',
83
- 'voice.endButtonText': 'End',
84
- };
85
- /**
86
- * Settings for a widget with nothing stored. Carries the Voiceflow default copy for every
87
- * translatable string (the same literals new projects have always been seeded with), and
88
- * deliberately NO `languages` block: every path that falls back to this object (the `v13_00`
89
- * backfill, a first save from a settings-less version, the runtime's fallback for a version with no
90
- * widget settings) must produce a single-language widget. A `languages` block here would opt all of
91
- * those projects into multilingual behaviour without anyone choosing it.
92
- */
93
31
  export const WIDGET_SETTINGS_DEFAULT_SETTINGS = {
94
32
  type: WidgetSettingsWidgetType.CHAT,
95
33
  chat: {
96
34
  voiceInput: true,
97
35
  voiceOutput: false,
98
36
  voiceMode: true,
37
+ notificationSound: false,
99
38
  renderMode: WidgetSettingsChatRenderMode.WIDGET,
100
39
  headerImage: {
101
40
  enabled: true,
@@ -104,21 +43,21 @@ export const WIDGET_SETTINGS_DEFAULT_SETTINGS = {
104
43
  enabled: true,
105
44
  },
106
45
  banner: {
107
- title: WIDGET_SETTINGS_FALLBACK_CONTENT['banner.title'],
108
- description: WIDGET_SETTINGS_FALLBACK_CONTENT['banner.description'],
109
46
  enabled: true,
47
+ title: 'Your AI agent',
48
+ description: 'How can I help you today?',
110
49
  },
111
- placeholderText: WIDGET_SETTINGS_FALLBACK_CONTENT.placeholderText,
50
+ placeholderText: 'Message...',
112
51
  aiDisclaimer: {
113
52
  enabled: false,
114
- text: WIDGET_SETTINGS_FALLBACK_CONTENT['aiDisclaimer.text'],
53
+ text: 'Generated by AI, double-check for accuracy.',
115
54
  },
116
55
  disclaimer: {
117
56
  enabled: false,
118
- title: WIDGET_SETTINGS_FALLBACK_CONTENT['disclaimer.title'],
119
- description: WIDGET_SETTINGS_FALLBACK_CONTENT['disclaimer.description'],
120
- primaryButtonText: WIDGET_SETTINGS_FALLBACK_CONTENT['disclaimer.primaryButtonText'],
121
- secondaryButtonText: WIDGET_SETTINGS_FALLBACK_CONTENT['disclaimer.secondaryButtonText'],
57
+ title: 'Privacy notice',
58
+ description: 'Before we can proceed with your conversation, we kindly ask you to review and accept our privacy policy, outlining how we handle and protect your personal information throughout our services.',
59
+ primaryButtonText: 'Submit',
60
+ secondaryButtonText: 'Privacy policy',
122
61
  secondaryButtonURL: '',
123
62
  },
124
63
  handoffToAgentImageURL: '',
@@ -130,17 +69,17 @@ export const WIDGET_SETTINGS_DEFAULT_SETTINGS = {
130
69
  voice: {
131
70
  renderMode: WidgetSettingsVoiceRenderMode.FULL,
132
71
  content: {
133
- callToActionText: WIDGET_SETTINGS_FALLBACK_CONTENT['voice.callToActionText'],
134
- startButtonText: WIDGET_SETTINGS_FALLBACK_CONTENT['voice.startButtonText'],
135
- listeningText: WIDGET_SETTINGS_FALLBACK_CONTENT['voice.listeningText'],
136
- talkingText: WIDGET_SETTINGS_FALLBACK_CONTENT['voice.talkingText'],
137
- endButtonText: WIDGET_SETTINGS_FALLBACK_CONTENT['voice.endButtonText'],
72
+ callToActionText: 'How can I help you?',
73
+ startButtonText: 'Start a call',
74
+ listeningText: 'Listening...',
75
+ talkingText: 'Talk to interrupt',
76
+ endButtonText: 'End',
138
77
  },
139
78
  },
140
79
  common: {
141
80
  fontFamily: 'UCity Pro',
142
81
  launcher: {
143
- text: WIDGET_SETTINGS_FALLBACK_CONTENT['launcher.text'],
82
+ text: 'Test your agent',
144
83
  type: WidgetSettingsLauncherType.BOTH,
145
84
  },
146
85
  poweredBy: true,
@@ -164,59 +103,4 @@ export const WIDGET_SETTINGS_DEFAULT_SETTINGS = {
164
103
  disableTranscript: false,
165
104
  },
166
105
  };
167
- /**
168
- * The language config the settings UI starts from when a widget has none stored: English only,
169
- * browser detection. Pure config: it carries no `enabled` flag, so reading it never opts a widget in.
170
- */
171
- export const WIDGET_SETTINGS_DEFAULT_LANGUAGES = {
172
- mode: WidgetSettingsLanguageResolutionMode.BROWSER,
173
- default: 'en-US',
174
- supported: ['en-US'],
175
- };
176
- /**
177
- * Tier 1 of the widget language rollout: left-to-right locales the widget's font stack fully covers. The
178
- * "All supported languages" option snapshots this list into `languages.supported`, and new projects
179
- * start from it. Every entry is a `LegacyVFLocale` value — pinned by a test in `@voiceflow/utils-designer`,
180
- * since that enum cannot be imported here.
181
- */
182
- export const WIDGET_SHIPPED_LOCALES = [
183
- 'en-US',
184
- 'bg-BG',
185
- 'ca-ES',
186
- 'cs-CZ',
187
- 'da-DK',
188
- 'nl-NL',
189
- 'nl-BE',
190
- 'et-EE',
191
- 'fr-FR',
192
- 'fr-CA',
193
- 'de-DE',
194
- 'hu-HU',
195
- 'it-IT',
196
- 'pl-PL',
197
- 'pt-BR',
198
- 'pt-PT',
199
- 'ro-RO',
200
- 'ru-RU',
201
- 'es-ES',
202
- 'es-MX',
203
- 'tr-TR',
204
- 'uk-UA',
205
- 'vi-VN',
206
- ];
207
- /**
208
- * New-project language config: every shipped locale offered ("All supported languages"), browser
209
- * detection, opted in. `chosen` stays unset until the customer first switches to "Only languages I choose".
210
- *
211
- * Applied ONLY at genuine new-project creation (`AssistantService.createOneFromTemplate` and
212
- * `GenerationService.runAssistantGeneration`), gated by `FEAT_MULTILINGUAL_WIDGET`. Existing projects
213
- * never get it implicitly; their owner opts in from the settings page.
214
- */
215
- export const WIDGET_SETTINGS_NEW_PROJECT_LANGUAGES = {
216
- mode: WidgetSettingsLanguageResolutionMode.BROWSER,
217
- default: 'en-US',
218
- supported: [...WIDGET_SHIPPED_LOCALES],
219
- offered: WidgetSettingsLanguageOfferedSet.ALL,
220
- enabled: true,
221
- };
222
106
  //# sourceMappingURL=widget-settings.constant.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"widget-settings.constant.js","sourceRoot":"","sources":["../../src/widget-settings/widget-settings.constant.ts"],"names":[],"mappings":"AACA,OAAO,EACL,6BAA6B,EAC7B,4BAA4B,EAC5B,gCAAgC,EAChC,oCAAoC,EACpC,0BAA0B,EAC1B,6BAA6B,EAC7B,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,wBAAw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,OAAO,EAAE,gCAAgC,CAAC,GAAG;IAC7C,OAAO,EAAE,IAAI;CACqC,CAAC"}
1
+ {"version":3,"file":"widget-settings.constant.js","sourceRoot":"","sources":["../../src/widget-settings/widget-settings.constant.ts"],"names":[],"mappings":"AACA,OAAO,EACL,6BAA6B,EAC7B,4BAA4B,EAC5B,0BAA0B,EAC1B,6BAA6B,EAC7B,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,CAAC,MAAM,kCAAkC,GAAG,SAAS,CAAC;AAE5D,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,EAAE,EAAE,SAAS;IACb,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,kCAAkC;IACvC,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;CACf,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,KAAK,CAAC;AAEnD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,CAAC;AAE7C,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,IAAI,EAAE,wBAAwB,CAAC,IAAI;IAEnC,IAAI,EAAE;QACJ,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,IAAI;QACf,iBAAiB,EAAE,KAAK;QAExB,UAAU,EAAE,4BAA4B,CAAC,MAAM;QAE/C,WAAW,EAAE;YACX,OAAO,EAAE,IAAI;SACd;QACD,UAAU,EAAE;YACV,OAAO,EAAE,IAAI;SACd;QACD,MAAM,EAAE;YACN,OAAO,EAAE,IAAI;YACb,KAAK,EAAE,eAAe;YACtB,WAAW,EAAE,2BAA2B;SACzC;QACD,eAAe,EAAE,YAAY;QAC7B,YAAY,EAAE;YACZ,OAAO,EAAE,KAAK;YACd,IAAI,EAAE,6CAA6C;SACpD;QACD,UAAU,EAAE;YACV,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,gBAAgB;YACvB,WAAW,EACT,iMAAiM;YACnM,iBAAiB,EAAE,QAAQ;YAC3B,mBAAmB,EAAE,gBAAgB;YACrC,kBAAkB,EAAE,EAAE;SACvB;QACD,sBAAsB,EAAE,EAAE;QAC1B,IAAI,EAAE;YACJ,OAAO,EAAE,KAAK;YACd,uBAAuB,EAAE,IAAI;SAC9B;KACF;IACD,KAAK,EAAE;QACL,UAAU,EAAE,6BAA6B,CAAC,IAAI;QAC9C,OAAO,EAAE;YACP,gBAAgB,EAAE,qBAAqB;YACvC,eAAe,EAAE,cAAc;YAC/B,aAAa,EAAE,cAAc;YAC7B,WAAW,EAAE,mBAAmB;YAChC,aAAa,EAAE,KAAK;SACrB;KACF;IACD,MAAM,EAAE;QACN,UAAU,EAAE,WAAW;QACvB,QAAQ,EAAE;YACR,IAAI,EAAE,iBAAiB;YACvB,IAAI,EAAE,0BAA0B,CAAC,IAAI;SACtC;QACD,SAAS,EAAE,IAAI;QACf,UAAU,EAAE;YACV,OAAO,EAAE,IAAI;SACd;QACD,QAAQ,EAAE,4BAA4B,CAAC,KAAK;QAC5C,WAAW,EAAE,IAAI;QACjB,aAAa,EAAE,IAAI;QACnB,YAAY,EAAE;YACZ,KAAK,EAAE,kCAAkC;YACzC,OAAO,EAAE,+BAA+B;SACzC;QACD,WAAW,EAAE,6BAA6B,CAAC,aAAa;KACzD;IACD,QAAQ,EAAE;QACR,eAAe,EAAE;YACf,OAAO,EAAE,KAAK;YACd,OAAO,EAAE,EAAE;SACZ;QACD,iBAAiB,EAAE,KAAK;KACzB;CACuB,CAAC"}
@@ -30,11 +30,11 @@ export declare const WidgetSettingsPrimaryColorDTO: z.ZodObject<{
30
30
  export type WidgetSettingsPrimaryColor = z.infer<typeof WidgetSettingsPrimaryColorDTO>;
31
31
  export declare const WidgetSettingsVoiceSettingsContentDTO: z.ZodObject<{
32
32
  imageURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
- talkingText: z.ZodOptional<z.ZodString>;
34
- endButtonText: z.ZodOptional<z.ZodString>;
35
- listeningText: z.ZodOptional<z.ZodString>;
36
- startButtonText: z.ZodOptional<z.ZodString>;
37
- callToActionText: z.ZodOptional<z.ZodString>;
33
+ talkingText: z.ZodString;
34
+ endButtonText: z.ZodString;
35
+ listeningText: z.ZodString;
36
+ startButtonText: z.ZodString;
37
+ callToActionText: z.ZodString;
38
38
  }, z.core.$strip>;
39
39
  export type WidgetSettingsVoiceSettingsContent = z.infer<typeof WidgetSettingsVoiceSettingsContentDTO>;
40
40
  export declare const WidgetSettingsVoiceSettingsDTO: z.ZodObject<{
@@ -45,11 +45,11 @@ export declare const WidgetSettingsVoiceSettingsDTO: z.ZodObject<{
45
45
  }>;
46
46
  content: z.ZodObject<{
47
47
  imageURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
48
- talkingText: z.ZodOptional<z.ZodString>;
49
- endButtonText: z.ZodOptional<z.ZodString>;
50
- listeningText: z.ZodOptional<z.ZodString>;
51
- startButtonText: z.ZodOptional<z.ZodString>;
52
- callToActionText: z.ZodOptional<z.ZodString>;
48
+ talkingText: z.ZodString;
49
+ endButtonText: z.ZodString;
50
+ listeningText: z.ZodString;
51
+ startButtonText: z.ZodString;
52
+ callToActionText: z.ZodString;
53
53
  }, z.core.$strip>;
54
54
  }, z.core.$strip>;
55
55
  export type WidgetSettingsVoiceSettings = z.infer<typeof WidgetSettingsVoiceSettingsDTO>;
@@ -131,78 +131,6 @@ export declare const WidgetSettingsSecuritySettingsDTO: z.ZodObject<{
131
131
  isTranscriptDownloadEnabled: z.ZodOptional<z.ZodBoolean>;
132
132
  }, z.core.$strip>;
133
133
  export type WidgetSettingsSecuritySettings = z.infer<typeof WidgetSettingsSecuritySettingsDTO>;
134
- /**
135
- * Presentation-layer language config for the widget: the default UI language and the set of languages
136
- * offered to end-users (`supported`, which always contains `default`, listed first). The visitor's
137
- * language is auto-detected from their device against `supported`, falling back to `default`. Locale
138
- * codes are members of the `LegacyVFLocale` enum, but stored as strings because that enum lives in
139
- * `@voiceflow/dtos`, which depends on this package (so it cannot be imported here). The allowed set is
140
- * enforced at the settings UI. Distinct from `version.prototype.data.locales`, which is the agent/NLU
141
- * build locale — see COR-13728.
142
- *
143
- * `mode`: the settings UI always writes `browser`. `specific` (every visitor gets `default`) is a legacy
144
- * value that is still honoured when read; the UI normalizes it to `browser` on its next write, which is
145
- * behaviour-preserving because legacy `specific` configs always had `supported = [default]`.
146
- *
147
- * `offered` records which option of the offered-set control is selected. `all` means `supported` was set
148
- * to every shipped locale (`WIDGET_SHIPPED_LOCALES`) when the customer picked it; `chosen`, or absent,
149
- * means `supported` is the customer's own list. `supported` stays the set actually served either way, so
150
- * nothing downstream of the settings UI reads `offered`. `chosen` stashes the customer's own list while
151
- * `offered === 'all'`, so switching back to "Only languages I choose" restores it; it is only meaningful
152
- * while `offered === 'all'`.
153
- *
154
- * `enabled` is the explicit per-project opt-in: the widget is multilingual only when it is `true`.
155
- * Absent or `false` means the widget renders exactly as a single-language widget did before multilingual
156
- * shipped, and no locale is sent to the runtime. Opting out writes `false` rather than removing the
157
- * block, so the language config survives and re-enabling restores it.
158
- */
159
- export declare const WidgetSettingsLanguageSettingsDTO: z.ZodObject<{
160
- mode: z.ZodEnum<{
161
- readonly SPECIFIC: 'specific';
162
- readonly BROWSER: 'browser';
163
- }>;
164
- default: z.ZodString;
165
- supported: z.ZodArray<z.ZodString>;
166
- enabled: z.ZodOptional<z.ZodBoolean>;
167
- offered: z.ZodOptional<z.ZodEnum<{
168
- readonly ALL: 'all';
169
- readonly CHOSEN: 'chosen';
170
- }>>;
171
- chosen: z.ZodOptional<z.ZodArray<z.ZodString>>;
172
- }, z.core.$strip>;
173
- export type WidgetSettingsLanguageSettings = z.infer<typeof WidgetSettingsLanguageSettingsDTO>;
174
- /**
175
- * A single translation of one content string into one locale. `value` is the translated text;
176
- * `sourceHash` is the sha256 hex of the source string it was derived from — stamped on machine results and
177
- * on hand-edited overrides alike — so staleness is detectable when the source changes; `modified` marks a
178
- * hand-edited translation (an override), which re-translation never clobbers unless explicitly asked;
179
- * `failed` marks the last machine attempt for `sourceHash` as failed. A failed entry always has
180
- * `value: ''`: the widget only uses a translation whose value is non-empty, so it falls back to the source
181
- * text with no widget-side handling. Any later successful write replaces the entry and drops the flag.
182
- */
183
- export declare const WidgetSettingsTranslationEntryDTO: z.ZodObject<{
184
- value: z.ZodString;
185
- sourceHash: z.ZodOptional<z.ZodString>;
186
- modified: z.ZodOptional<z.ZodBoolean>;
187
- failed: z.ZodOptional<z.ZodBoolean>;
188
- }, z.core.$strip>;
189
- export type WidgetSettingsTranslationEntry = z.infer<typeof WidgetSettingsTranslationEntryDTO>;
190
- /**
191
- * Per-locale translations of widget content strings, keyed `[locale][contentKey]`. Only consulted
192
- * while the widget is multilingual (`languages.enabled === true`). A hand-edited (`modified`) entry
193
- * always wins; a machine entry only applies to customer-authored text, because stored text that
194
- * exactly equals the Voiceflow default for its field renders from the widget's shipped catalog in
195
- * the visitor's language instead. Partial per locale. Which keys are valid is enforced at the
196
- * settings UI (`WIDGET_TRANSLATABLE_CONTENT_KEYS`), not here, so the schema stays migration-free as
197
- * the translatable surface evolves. Locale codes match `languages.supported`.
198
- */
199
- export declare const WidgetSettingsTranslationsDTO: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
200
- value: z.ZodString;
201
- sourceHash: z.ZodOptional<z.ZodString>;
202
- modified: z.ZodOptional<z.ZodBoolean>;
203
- failed: z.ZodOptional<z.ZodBoolean>;
204
- }, z.core.$strip>>>;
205
- export type WidgetSettingsTranslations = z.infer<typeof WidgetSettingsTranslationsDTO>;
206
134
  export declare const WidgetSettingsDTO: z.ZodObject<{
207
135
  type: z.ZodEnum<{
208
136
  readonly CHAT: 'chat';
@@ -223,22 +151,22 @@ export declare const WidgetSettingsDTO: z.ZodObject<{
223
151
  url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
224
152
  }, z.core.$strip>;
225
153
  banner: z.ZodObject<{
226
- title: z.ZodOptional<z.ZodString>;
227
- description: z.ZodOptional<z.ZodString>;
154
+ title: z.ZodString;
155
+ description: z.ZodString;
228
156
  enabled: z.ZodBoolean;
229
157
  imageURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
230
158
  }, z.core.$strip>;
231
- placeholderText: z.ZodOptional<z.ZodString>;
159
+ placeholderText: z.ZodString;
232
160
  disclaimer: z.ZodOptional<z.ZodObject<{
233
161
  enabled: z.ZodBoolean;
234
- title: z.ZodOptional<z.ZodString>;
235
- description: z.ZodOptional<z.ZodString>;
236
- primaryButtonText: z.ZodOptional<z.ZodString>;
237
- secondaryButtonText: z.ZodOptional<z.ZodString>;
238
- secondaryButtonURL: z.ZodOptional<z.ZodString>;
162
+ title: z.ZodString;
163
+ description: z.ZodString;
164
+ primaryButtonText: z.ZodString;
165
+ secondaryButtonText: z.ZodString;
166
+ secondaryButtonURL: z.ZodString;
239
167
  }, z.core.$strip>>;
240
168
  aiDisclaimer: z.ZodObject<{
241
- text: z.ZodOptional<z.ZodString>;
169
+ text: z.ZodString;
242
170
  enabled: z.ZodBoolean;
243
171
  }, z.core.$strip>;
244
172
  handoffToAgentImageURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -273,11 +201,11 @@ export declare const WidgetSettingsDTO: z.ZodObject<{
273
201
  }>;
274
202
  content: z.ZodObject<{
275
203
  imageURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
276
- talkingText: z.ZodOptional<z.ZodString>;
277
- endButtonText: z.ZodOptional<z.ZodString>;
278
- listeningText: z.ZodOptional<z.ZodString>;
279
- startButtonText: z.ZodOptional<z.ZodString>;
280
- callToActionText: z.ZodOptional<z.ZodString>;
204
+ talkingText: z.ZodString;
205
+ endButtonText: z.ZodString;
206
+ listeningText: z.ZodString;
207
+ startButtonText: z.ZodString;
208
+ callToActionText: z.ZodString;
281
209
  }, z.core.$strip>;
282
210
  }, z.core.$strip>;
283
211
  common: z.ZodObject<{
@@ -334,26 +262,6 @@ export declare const WidgetSettingsDTO: z.ZodObject<{
334
262
  disableTranscript: z.ZodBoolean;
335
263
  isTranscriptDownloadEnabled: z.ZodOptional<z.ZodBoolean>;
336
264
  }, z.core.$strip>>;
337
- languages: z.ZodOptional<z.ZodObject<{
338
- mode: z.ZodEnum<{
339
- readonly SPECIFIC: 'specific';
340
- readonly BROWSER: 'browser';
341
- }>;
342
- default: z.ZodString;
343
- supported: z.ZodArray<z.ZodString>;
344
- enabled: z.ZodOptional<z.ZodBoolean>;
345
- offered: z.ZodOptional<z.ZodEnum<{
346
- readonly ALL: 'all';
347
- readonly CHOSEN: 'chosen';
348
- }>>;
349
- chosen: z.ZodOptional<z.ZodArray<z.ZodString>>;
350
- }, z.core.$strip>>;
351
- translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
352
- value: z.ZodString;
353
- sourceHash: z.ZodOptional<z.ZodString>;
354
- modified: z.ZodOptional<z.ZodBoolean>;
355
- failed: z.ZodOptional<z.ZodBoolean>;
356
- }, z.core.$strip>>>>;
357
265
  }, z.core.$strip>;
358
266
  export type WidgetSettings = z.infer<typeof WidgetSettingsDTO>;
359
267
  //# sourceMappingURL=widget-settings.dto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"widget-settings.dto.d.ts","sourceRoot":"","sources":["../../src/widget-settings/widget-settings.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,eAAO,MAAM,6BAA6B;;;;;;;;;;;iBAaG,CAAC;AAE9C,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEvF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;iBAKG,CAAC;AAE9C,MAAM,MAAM,0BAA0B,G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M,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEzF,eAAO,MAAM,uCAAuC;;;;;;;;iBAMG,CAAC;AAExD,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,CAAC;AAE3G,eAAO,MAAM,yCAAyC;;;;iBAMG,CAAC;AAE1D,eAAO,MAAM,2CAA2C,wCAEG,CAAC;AAE5D,MAAM,MAAM,sCAAsC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yCAAyC,CAAC,CAAC;AAE/G,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAcG,CAAC;AAEhD,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAE3F,eAAO,MAAM,gDAAgD;;;iBAKG,CAAC;AAEjE,MAAM,MAAM,6CAA6C,GAAG,CAAC,CAAC,KAAK,CACjE,OAAO,gDAAgD,CACxD,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;;;;iBAMG,CAAC;AAElD,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE/F,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQG,CAAC;AAElC,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { WidgetSettingsChatSettingsDTO } from './widget-settings-chat-settings/widget-settings-chat-settings.dto.js';
3
- import { WidgetSettingsChatPersistenceDTO, WidgetSettingsLanguageOfferedSetDTO, WidgetSettingsLanguageResolutionModeDTO, WidgetSettingsLauncherTypeDTO, WidgetSettingsVoiceRenderModeDTO, WidgetSettingsWidgetPositionDTO, WidgetSettingsWidgetTypeDTO, } from './widget-settings.enum.js';
3
+ import { WidgetSettingsChatPersistenceDTO, WidgetSettingsLauncherTypeDTO, WidgetSettingsVoiceRenderModeDTO, WidgetSettingsWidgetPositionDTO, WidgetSettingsWidgetTypeDTO, } from './widget-settings.enum.js';
4
4
  export const WidgetSettingsColorPaletteDTO = z
5
5
  .object({
6
6
  50: z.string(),
@@ -24,11 +24,11 @@ export const WidgetSettingsPrimaryColorDTO = z
24
24
  export const WidgetSettingsVoiceSettingsContentDTO = z
25
25
  .object({
26
26
  imageURL: z.string().nullable().optional(),
27
- talkingText: z.string().optional(),
28
- endButtonText: z.string().optional(),
29
- listeningText: z.string().optional(),
30
- startButtonText: z.string().optional(),
31
- callToActionText: z.string().optional(),
27
+ talkingText: z.string(),
28
+ endButtonText: z.string(),
29
+ listeningText: z.string(),
30
+ startButtonText: z.string(),
31
+ callToActionText: z.string(),
32
32
  })
33
33
  .meta({ id: 'WidgetSettingsVoiceSettingsContent' });
34
34
  export const WidgetSettingsVoiceSettingsDTO = z
@@ -82,70 +82,6 @@ export const WidgetSettingsSecuritySettingsDTO = z
82
82
  isTranscriptDownloadEnabled: z.boolean().optional(),
83
83
  })
84
84
  .meta({ id: 'WidgetSettingsSecuritySettings' });
85
- /**
86
- * Presentation-layer language config for the widget: the default UI language and the set of languages
87
- * offered to end-users (`supported`, which always contains `default`, listed first). The visitor's
88
- * language is auto-detected from their device against `supported`, falling back to `default`. Locale
89
- * codes are members of the `LegacyVFLocale` enum, but stored as strings because that enum lives in
90
- * `@voiceflow/dtos`, which depends on this package (so it cannot be imported here). The allowed set is
91
- * enforced at the settings UI. Distinct from `version.prototype.data.locales`, which is the agent/NLU
92
- * build locale — see COR-13728.
93
- *
94
- * `mode`: the settings UI always writes `browser`. `specific` (every visitor gets `default`) is a legacy
95
- * value that is still honoured when read; the UI normalizes it to `browser` on its next write, which is
96
- * behaviour-preserving because legacy `specific` configs always had `supported = [default]`.
97
- *
98
- * `offered` records which option of the offered-set control is selected. `all` means `supported` was set
99
- * to every shipped locale (`WIDGET_SHIPPED_LOCALES`) when the customer picked it; `chosen`, or absent,
100
- * means `supported` is the customer's own list. `supported` stays the set actually served either way, so
101
- * nothing downstream of the settings UI reads `offered`. `chosen` stashes the customer's own list while
102
- * `offered === 'all'`, so switching back to "Only languages I choose" restores it; it is only meaningful
103
- * while `offered === 'all'`.
104
- *
105
- * `enabled` is the explicit per-project opt-in: the widget is multilingual only when it is `true`.
106
- * Absent or `false` means the widget renders exactly as a single-language widget did before multilingual
107
- * shipped, and no locale is sent to the runtime. Opting out writes `false` rather than removing the
108
- * block, so the language config survives and re-enabling restores it.
109
- */
110
- export const WidgetSettingsLanguageSettingsDTO = z
111
- .object({
112
- mode: WidgetSettingsLanguageResolutionModeDTO,
113
- default: z.string(),
114
- supported: z.array(z.string()),
115
- enabled: z.boolean().optional(),
116
- offered: WidgetSettingsLanguageOfferedSetDTO.optional(),
117
- chosen: z.array(z.string()).optional(),
118
- })
119
- .meta({ id: 'WidgetSettingsLanguageSettings' });
120
- /**
121
- * A single translation of one content string into one locale. `value` is the translated text;
122
- * `sourceHash` is the sha256 hex of the source string it was derived from — stamped on machine results and
123
- * on hand-edited overrides alike — so staleness is detectable when the source changes; `modified` marks a
124
- * hand-edited translation (an override), which re-translation never clobbers unless explicitly asked;
125
- * `failed` marks the last machine attempt for `sourceHash` as failed. A failed entry always has
126
- * `value: ''`: the widget only uses a translation whose value is non-empty, so it falls back to the source
127
- * text with no widget-side handling. Any later successful write replaces the entry and drops the flag.
128
- */
129
- export const WidgetSettingsTranslationEntryDTO = z
130
- .object({
131
- value: z.string(),
132
- sourceHash: z.string().optional(),
133
- modified: z.boolean().optional(),
134
- failed: z.boolean().optional(),
135
- })
136
- .meta({ id: 'WidgetSettingsTranslationEntry' });
137
- /**
138
- * Per-locale translations of widget content strings, keyed `[locale][contentKey]`. Only consulted
139
- * while the widget is multilingual (`languages.enabled === true`). A hand-edited (`modified`) entry
140
- * always wins; a machine entry only applies to customer-authored text, because stored text that
141
- * exactly equals the Voiceflow default for its field renders from the widget's shipped catalog in
142
- * the visitor's language instead. Partial per locale. Which keys are valid is enforced at the
143
- * settings UI (`WIDGET_TRANSLATABLE_CONTENT_KEYS`), not here, so the schema stays migration-free as
144
- * the translatable surface evolves. Locale codes match `languages.supported`.
145
- */
146
- export const WidgetSettingsTranslationsDTO = z
147
- .record(z.string(), z.record(z.string(), WidgetSettingsTranslationEntryDTO))
148
- .meta({ id: 'WidgetSettingsTranslations' });
149
85
  export const WidgetSettingsDTO = z
150
86
  .object({
151
87
  type: WidgetSettingsWidgetTypeDTO,
@@ -153,8 +89,6 @@ export const WidgetSettingsDTO = z
153
89
  voice: WidgetSettingsVoiceSettingsDTO,
154
90
  common: WidgetSettingsCommonSettingsDTO,
155
91
  security: WidgetSettingsSecuritySettingsDTO.optional(),
156
- languages: WidgetSettingsLanguageSettingsDTO.optional(),
157
- translations: WidgetSettingsTranslationsDTO.optional(),
158
92
  })
159
93
  .meta({ id: 'WidgetSettings' });
160
94
  //# sourceMappingURL=widget-settings.dto.js.map