@voiceflow/dtos-interact 2.28.2-d38b5d77c7.148 → 2.29.0

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 (88) hide show
  1. package/build/main.d.ts +10 -3
  2. package/build/main.d.ts.map +1 -1
  3. package/build/main.js +10 -3
  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 -77
  65. package/build/widget-settings/widget-settings.constant.d.ts.map +1 -1
  66. package/build/widget-settings/widget-settings.constant.js +15 -128
  67. package/build/widget-settings/widget-settings.constant.js.map +1 -1
  68. package/build/widget-settings/widget-settings.dto.d.ts +24 -90
  69. package/build/widget-settings/widget-settings.dto.d.ts.map +1 -1
  70. package/build/widget-settings/widget-settings.dto.js +5 -60
  71. package/build/widget-settings/widget-settings.dto.js.map +1 -1
  72. package/package.json +2 -2
  73. package/build/widget-settings/widget-settings-locale.util.d.ts +0 -8
  74. package/build/widget-settings/widget-settings-locale.util.d.ts.map +0 -1
  75. package/build/widget-settings/widget-settings-locale.util.js +0 -16
  76. package/build/widget-settings/widget-settings-locale.util.js.map +0 -1
  77. package/build/widget-settings/widget-settings-localized-content.constant.d.ts +0 -9
  78. package/build/widget-settings/widget-settings-localized-content.constant.d.ts.map +0 -1
  79. package/build/widget-settings/widget-settings-localized-content.constant.js +0 -299
  80. package/build/widget-settings/widget-settings-localized-content.constant.js.map +0 -1
  81. package/build/widget-settings/widget-settings-localized-content.test.d.ts +0 -2
  82. package/build/widget-settings/widget-settings-localized-content.test.d.ts.map +0 -1
  83. package/build/widget-settings/widget-settings-localized-content.test.js +0 -29
  84. package/build/widget-settings/widget-settings-localized-content.test.js.map +0 -1
  85. package/build/widget-settings/widget-settings.util.d.ts +0 -6
  86. package/build/widget-settings/widget-settings.util.d.ts.map +0 -1
  87. package/build/widget-settings/widget-settings.util.js +0 -7
  88. 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,32 +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
- * 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
- default: string;
169
- supported: string[];
170
- };
171
- /**
172
- * Tier 1 of the widget language rollout: left-to-right locales the widget's font stack fully covers. The
173
- * "All supported languages" option snapshots this list into `languages.supported`, and new projects
174
- * start from it. Every entry is a `LegacyVFLocale` value — pinned by a test in `@voiceflow/utils-designer`,
175
- * since that enum cannot be imported here.
176
- */
177
- export declare const WIDGET_SHIPPED_LOCALES: readonly string[];
178
- /**
179
- * New-project language config: English only, multilingual off. `enabled` is derived from the language count
180
- * (`supported.length > 1`), so a new project starts single-language and turns multilingual on only once its
181
- * owner opts a second language in from the settings page.
182
- *
183
- * Applied ONLY at genuine new-project creation (`AssistantService.createOneFromTemplate` and
184
- * `GenerationService.runAssistantGeneration`), gated by `FEAT_MULTILINGUAL_WIDGET`.
185
- */
186
- export declare const WIDGET_SETTINGS_NEW_PROJECT_LANGUAGES: {
187
- default: string;
188
- supported: string[];
189
- enabled: false;
190
- };
191
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":"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;;;;;;;;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;;;CAGM,CAAC;AAErD;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAwBnD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,qCAAqC;;;;CAIE,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"}
@@ -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,56 +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
- * Pure config: it carries no `enabled` flag, so reading it never opts a widget in.
170
- */
171
- export const WIDGET_SETTINGS_DEFAULT_LANGUAGES = {
172
- default: 'en-US',
173
- supported: ['en-US'],
174
- };
175
- /**
176
- * Tier 1 of the widget language rollout: left-to-right locales the widget's font stack fully covers. The
177
- * "All supported languages" option snapshots this list into `languages.supported`, and new projects
178
- * start from it. Every entry is a `LegacyVFLocale` value — pinned by a test in `@voiceflow/utils-designer`,
179
- * since that enum cannot be imported here.
180
- */
181
- export const WIDGET_SHIPPED_LOCALES = [
182
- 'en-US',
183
- 'bg-BG',
184
- 'ca-ES',
185
- 'cs-CZ',
186
- 'da-DK',
187
- 'nl-NL',
188
- 'nl-BE',
189
- 'et-EE',
190
- 'fr-FR',
191
- 'fr-CA',
192
- 'de-DE',
193
- 'hu-HU',
194
- 'it-IT',
195
- 'pl-PL',
196
- 'pt-BR',
197
- 'pt-PT',
198
- 'ro-RO',
199
- 'ru-RU',
200
- 'es-ES',
201
- 'es-MX',
202
- 'tr-TR',
203
- 'uk-UA',
204
- 'vi-VN',
205
- ];
206
- /**
207
- * New-project language config: English only, multilingual off. `enabled` is derived from the language count
208
- * (`supported.length > 1`), so a new project starts single-language and turns multilingual on only once its
209
- * owner opts a second language in from the settings page.
210
- *
211
- * Applied ONLY at genuine new-project creation (`AssistantService.createOneFromTemplate` and
212
- * `GenerationService.runAssistantGeneration`), gated by `FEAT_MULTILINGUAL_WIDGET`.
213
- */
214
- export const WIDGET_SETTINGS_NEW_PROJECT_LANGUAGES = {
215
- default: 'en-US',
216
- supported: ['en-US'],
217
- enabled: false,
218
- };
219
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,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;AA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;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;AAE3B;;;GAGG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,OAAO,EAAE,OAAO;IAChB,SAAS,EAAE,CAAC,OAAO,CAAC;CAC8B,CAAC;AAErD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAsB;IACvD,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;CACR,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG;IACnD,OAAO,EAAE,OAAO;IAChB,SAAS,EAAE,CAAC,OAAO,CAAC;IACpB,OAAO,EAAE,KAAK;CACoC,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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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,61 +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
- * `enabled` is the explicit per-project opt-in: the widget is multilingual only when it is `true`.
144
- * Absent or `false` means the widget renders exactly as a single-language widget did before multilingual
145
- * shipped, and no locale is sent to the runtime. Opting out writes `false` rather than removing the
146
- * block, so the language config survives and re-enabling restores it.
147
- *
148
- * The pure opt-in roster (COR-14107) removed the legacy `mode`, `offered` and `chosen` fields; the
149
- * settings UI coerces any config still carrying them into this shape on its next write.
150
- */
151
- export declare const WidgetSettingsLanguageSettingsDTO: z.ZodObject<{
152
- default: z.ZodString;
153
- supported: z.ZodArray<z.ZodString>;
154
- enabled: z.ZodOptional<z.ZodBoolean>;
155
- }, z.core.$strip>;
156
- export type WidgetSettingsLanguageSettings = z.infer<typeof WidgetSettingsLanguageSettingsDTO>;
157
- /**
158
- * A single translation of one content string into one locale. `value` is the translated text;
159
- * `sourceHash` is the sha256 hex of the source string it was derived from — stamped on machine results and
160
- * on hand-edited overrides alike — so staleness is detectable when the source changes; `modified` marks a
161
- * hand-edited translation (an override), which re-translation never clobbers unless explicitly asked;
162
- * `failed` marks the last machine attempt for `sourceHash` as failed. A failed entry always has
163
- * `value: ''`: the widget only uses a translation whose value is non-empty, so it falls back to the source
164
- * text with no widget-side handling. Any later successful write replaces the entry and drops the flag.
165
- */
166
- export declare const WidgetSettingsTranslationEntryDTO: z.ZodObject<{
167
- value: z.ZodString;
168
- sourceHash: z.ZodOptional<z.ZodString>;
169
- modified: z.ZodOptional<z.ZodBoolean>;
170
- failed: z.ZodOptional<z.ZodBoolean>;
171
- }, z.core.$strip>;
172
- export type WidgetSettingsTranslationEntry = z.infer<typeof WidgetSettingsTranslationEntryDTO>;
173
- /**
174
- * Per-locale translations of widget content strings, keyed `[locale][contentKey]`. Only consulted
175
- * while the widget is multilingual (`languages.enabled === true`). A hand-edited (`modified`) entry
176
- * always wins; a machine entry only applies to customer-authored text, because stored text that
177
- * exactly equals the Voiceflow default for its field renders from the widget's shipped catalog in
178
- * the visitor's language instead. Partial per locale. Which keys are valid is enforced at the
179
- * settings UI (`WIDGET_TRANSLATABLE_CONTENT_KEYS`), not here, so the schema stays migration-free as
180
- * the translatable surface evolves. Locale codes match `languages.supported`.
181
- */
182
- export declare const WidgetSettingsTranslationsDTO: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
183
- value: z.ZodString;
184
- sourceHash: z.ZodOptional<z.ZodString>;
185
- modified: z.ZodOptional<z.ZodBoolean>;
186
- failed: z.ZodOptional<z.ZodBoolean>;
187
- }, z.core.$strip>>>;
188
- export type WidgetSettingsTranslations = z.infer<typeof WidgetSettingsTranslationsDTO>;
189
134
  export declare const WidgetSettingsDTO: z.ZodObject<{
190
135
  type: z.ZodEnum<{
191
136
  readonly CHAT: 'chat';
@@ -206,22 +151,22 @@ export declare const WidgetSettingsDTO: z.ZodObject<{
206
151
  url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
207
152
  }, z.core.$strip>;
208
153
  banner: z.ZodObject<{
209
- title: z.ZodOptional<z.ZodString>;
210
- description: z.ZodOptional<z.ZodString>;
154
+ title: z.ZodString;
155
+ description: z.ZodString;
211
156
  enabled: z.ZodBoolean;
212
157
  imageURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
213
158
  }, z.core.$strip>;
214
- placeholderText: z.ZodOptional<z.ZodString>;
159
+ placeholderText: z.ZodString;
215
160
  disclaimer: z.ZodOptional<z.ZodObject<{
216
161
  enabled: z.ZodBoolean;
217
- title: z.ZodOptional<z.ZodString>;
218
- description: z.ZodOptional<z.ZodString>;
219
- primaryButtonText: z.ZodOptional<z.ZodString>;
220
- secondaryButtonText: z.ZodOptional<z.ZodString>;
221
- 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;
222
167
  }, z.core.$strip>>;
223
168
  aiDisclaimer: z.ZodObject<{
224
- text: z.ZodOptional<z.ZodString>;
169
+ text: z.ZodString;
225
170
  enabled: z.ZodBoolean;
226
171
  }, z.core.$strip>;
227
172
  handoffToAgentImageURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -256,11 +201,11 @@ export declare const WidgetSettingsDTO: z.ZodObject<{
256
201
  }>;
257
202
  content: z.ZodObject<{
258
203
  imageURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
259
- talkingText: z.ZodOptional<z.ZodString>;
260
- endButtonText: z.ZodOptional<z.ZodString>;
261
- listeningText: z.ZodOptional<z.ZodString>;
262
- startButtonText: z.ZodOptional<z.ZodString>;
263
- 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;
264
209
  }, z.core.$strip>;
265
210
  }, z.core.$strip>;
266
211
  common: z.ZodObject<{
@@ -317,17 +262,6 @@ export declare const WidgetSettingsDTO: z.ZodObject<{
317
262
  disableTranscript: z.ZodBoolean;
318
263
  isTranscriptDownloadEnabled: z.ZodOptional<z.ZodBoolean>;
319
264
  }, z.core.$strip>>;
320
- languages: z.ZodOptional<z.ZodObject<{
321
- default: z.ZodString;
322
- supported: z.ZodArray<z.ZodString>;
323
- enabled: z.ZodOptional<z.ZodBoolean>;
324
- }, z.core.$strip>>;
325
- translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
326
- value: z.ZodString;
327
- sourceHash: z.ZodOptional<z.ZodString>;
328
- modified: z.ZodOptional<z.ZodBoolean>;
329
- failed: z.ZodOptional<z.ZodBoolean>;
330
- }, z.core.$strip>>>>;
331
265
  }, z.core.$strip>;
332
266
  export type WidgetSettings = z.infer<typeof WidgetSettingsDTO>;
333
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;AAWxB,eAAO,MAAM,6BAA6B;;;;;;;;;;;iBAaG,CAAC;AAE9C,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEvF,eAAO,MAAM,6BAA6B;;;;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,CAAC;AAE/C,MAAM,MAAM,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"}
@@ -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,59 +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
- * `enabled` is the explicit per-project opt-in: the widget is multilingual only when it is `true`.
95
- * Absent or `false` means the widget renders exactly as a single-language widget did before multilingual
96
- * shipped, and no locale is sent to the runtime. Opting out writes `false` rather than removing the
97
- * block, so the language config survives and re-enabling restores it.
98
- *
99
- * The pure opt-in roster (COR-14107) removed the legacy `mode`, `offered` and `chosen` fields; the
100
- * settings UI coerces any config still carrying them into this shape on its next write.
101
- */
102
- export const WidgetSettingsLanguageSettingsDTO = z
103
- .object({
104
- default: z.string(),
105
- supported: z.array(z.string()),
106
- enabled: z.boolean().optional(),
107
- })
108
- .meta({ id: 'WidgetSettingsLanguageSettings' });
109
- /**
110
- * A single translation of one content string into one locale. `value` is the translated text;
111
- * `sourceHash` is the sha256 hex of the source string it was derived from — stamped on machine results and
112
- * on hand-edited overrides alike — so staleness is detectable when the source changes; `modified` marks a
113
- * hand-edited translation (an override), which re-translation never clobbers unless explicitly asked;
114
- * `failed` marks the last machine attempt for `sourceHash` as failed. A failed entry always has
115
- * `value: ''`: the widget only uses a translation whose value is non-empty, so it falls back to the source
116
- * text with no widget-side handling. Any later successful write replaces the entry and drops the flag.
117
- */
118
- export const WidgetSettingsTranslationEntryDTO = z
119
- .object({
120
- value: z.string(),
121
- sourceHash: z.string().optional(),
122
- modified: z.boolean().optional(),
123
- failed: z.boolean().optional(),
124
- })
125
- .meta({ id: 'WidgetSettingsTranslationEntry' });
126
- /**
127
- * Per-locale translations of widget content strings, keyed `[locale][contentKey]`. Only consulted
128
- * while the widget is multilingual (`languages.enabled === true`). A hand-edited (`modified`) entry
129
- * always wins; a machine entry only applies to customer-authored text, because stored text that
130
- * exactly equals the Voiceflow default for its field renders from the widget's shipped catalog in
131
- * the visitor's language instead. Partial per locale. Which keys are valid is enforced at the
132
- * settings UI (`WIDGET_TRANSLATABLE_CONTENT_KEYS`), not here, so the schema stays migration-free as
133
- * the translatable surface evolves. Locale codes match `languages.supported`.
134
- */
135
- export const WidgetSettingsTranslationsDTO = z
136
- .record(z.string(), z.record(z.string(), WidgetSettingsTranslationEntryDTO))
137
- .meta({ id: 'WidgetSettingsTranslations' });
138
85
  export const WidgetSettingsDTO = z
139
86
  .object({
140
87
  type: WidgetSettingsWidgetTypeDTO,
@@ -142,8 +89,6 @@ export const WidgetSettingsDTO = z
142
89
  voice: WidgetSettingsVoiceSettingsDTO,
143
90
  common: WidgetSettingsCommonSettingsDTO,
144
91
  security: WidgetSettingsSecuritySettingsDTO.optional(),
145
- languages: WidgetSettingsLanguageSettingsDTO.optional(),
146
- translations: WidgetSettingsTranslationsDTO.optional(),
147
92
  })
148
93
  .meta({ id: 'WidgetSettings' });
149
94
  //# sourceMappingURL=widget-settings.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"widget-settings.dto.js","sourceRoot":"","sources":["../../src/widget-settings/widget-settings.dto.ts"],"names":[],"m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AAC,QAAQ,EAAE;CACvD,CAAC;KACD,IAAI,CAAC,EAAE,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voiceflow/dtos-interact",
3
- "version": "2.28.2-d38b5d77c7.148+d38b5d77c7",
3
+ "version": "2.29.0",
4
4
  "files": [
5
5
  "build"
6
6
  ],
@@ -35,5 +35,5 @@
35
35
  "volta": {
36
36
  "extends": "../../package.json"
37
37
  },
38
- "gitHead": "d38b5d77c7f95e6d8cdf127587e23438ed91c15b"
38
+ "gitHead": "3ca8c643a7df732e7df52b436a43ae2e64129846"
39
39
  }
@@ -1,8 +0,0 @@
1
- /** Lower-cased primary subtag of a BCP-47-ish locale code (`fr-CA` -> `fr`). */
2
- export declare const baseLanguage: (locale: string) => string;
3
- /**
4
- * Resolves a requested locale to the best available catalog locale, given the locales that actually
5
- * have a catalog entry. Ladder: exact match -> base language -> `en`.
6
- */
7
- export declare const resolveWidgetLocale: (locale: string, availableLocales: readonly string[]) => string;
8
- //# sourceMappingURL=widget-settings-locale.util.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"widget-settings-locale.util.d.ts","sourceRoot":"","sources":["../../src/widget-settings/widget-settings-locale.util.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,eAAO,MAAM,YAAY,WAAY,MAAM,KAAG,MAAqD,CAAC;AAEpG;;;GAGG;AACH,eAAO,MAAM,mBAAmB,WAAY,MAAM,oBAAoB,SAAS,MAAM,EAAE,KAAG,MAMzF,CAAC"}
@@ -1,16 +0,0 @@
1
- /** Lower-cased primary subtag of a BCP-47-ish locale code (`fr-CA` -> `fr`). */
2
- export const baseLanguage = (locale) => locale.toLowerCase().split(/[-_]/)[0] ?? '';
3
- /**
4
- * Resolves a requested locale to the best available catalog locale, given the locales that actually
5
- * have a catalog entry. Ladder: exact match -> base language -> `en`.
6
- */
7
- export const resolveWidgetLocale = (locale, availableLocales) => {
8
- const available = new Set(availableLocales);
9
- if (available.has(locale))
10
- return locale;
11
- const base = baseLanguage(locale);
12
- if (available.has(base))
13
- return base;
14
- return 'en';
15
- };
16
- //# sourceMappingURL=widget-settings-locale.util.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"widget-settings-locale.util.js","sourceRoot":"","sources":["../../src/widget-settings/widget-settings-locale.util.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAc,EAAU,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AAEpG;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,MAAc,EAAE,gBAAmC,EAAU,EAAE;IACjG,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAC5C,IAAI,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC;QAAE,OAAO,MAAM,CAAC;IACzC,MAAM,IAAI,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IAClC,IAAI,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACrC,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}