@voiceflow/dtos-interact 2.37.0 → 2.38.1-2ea50d4709.20
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/build/interface-config/interface-config-behaviour.util.d.mts +3 -0
- package/build/interface-config/interface-config-behaviour.util.d.mts.map +1 -1
- package/build/interface-config/interface-config-behaviour.util.mjs +3 -2
- package/build/interface-config/interface-config-behaviour.util.mjs.map +1 -1
- package/build/main.d.mts +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { InterfaceConfig } from "./interface-config.dto.mjs";
|
|
2
2
|
import { InterfaceConfigHistoryPersistence } from "./interface-config-history/interface-config-history.enum.mjs";
|
|
3
|
+
import { InterfaceConfigStartFirstTurn } from "./interface-config-start/interface-config-start.enum.mjs";
|
|
3
4
|
/**
|
|
4
5
|
* What the stored settings turn on for the visitor, every absent field at its default. The keys are interface-core's
|
|
5
6
|
* feature names. The settings hold no accepted file types, file size limit or survey prompt, so the reader adds them.
|
|
@@ -24,6 +25,8 @@ export interface InterfaceConfigBehaviour {
|
|
|
24
25
|
default: string;
|
|
25
26
|
supported: readonly string[];
|
|
26
27
|
};
|
|
28
|
+
/** who speaks first; interface-core offers it as `firstTurn` */
|
|
29
|
+
firstTurn: InterfaceConfigStartFirstTurn;
|
|
27
30
|
}
|
|
28
31
|
export declare const resolveInterfaceConfigBehaviour: (config: InterfaceConfig | null | undefined) => InterfaceConfigBehaviour;
|
|
29
32
|
//# sourceMappingURL=interface-config-behaviour.util.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface-config-behaviour.util.d.mts","names":[],"sources":["../../src/interface-config/interface-config-behaviour.util.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"interface-config-behaviour.util.d.mts","names":[],"sources":["../../src/interface-config/interface-config-behaviour.util.ts"],"mappings":";;;;;;;iBASiB;;EAEf;IAAc;;;EAEd;IAAQ;;EACR;EACA;;EAEA,aAAa;EACb;EACA;;EAEA;IAAa;IAAiB;;;EAE9B,WAAW;;qBAKA,kCACX,QAAQ,uCACP"}
|
|
@@ -2,7 +2,7 @@ import { INTERFACE_CONFIG_DEFAULTS } from "./interface-config.constant.mjs";
|
|
|
2
2
|
// src/interface-config/interface-config-behaviour.util.ts
|
|
3
3
|
const DEFAULTS = INTERFACE_CONFIG_DEFAULTS;
|
|
4
4
|
const resolveInterfaceConfigBehaviour = (config) => {
|
|
5
|
-
const { composer, end, transcript, voice, history, messages, locale } = config ?? {};
|
|
5
|
+
const { composer, end, transcript, voice, history, messages, locale, start } = config ?? {};
|
|
6
6
|
const defaultLanguage = locale?.default ?? DEFAULTS.locale.default;
|
|
7
7
|
const enabledLanguages = locale?.enabled ?? DEFAULTS.locale.enabled;
|
|
8
8
|
return {
|
|
@@ -16,7 +16,8 @@ const resolveInterfaceConfigBehaviour = (config) => {
|
|
|
16
16
|
languages: {
|
|
17
17
|
default: defaultLanguage,
|
|
18
18
|
supported: Array.from(/* @__PURE__ */ new Set([...enabledLanguages, defaultLanguage]))
|
|
19
|
-
}
|
|
19
|
+
},
|
|
20
|
+
firstTurn: start?.firstTurn ?? DEFAULTS.start.firstTurn
|
|
20
21
|
};
|
|
21
22
|
};
|
|
22
23
|
export { resolveInterfaceConfigBehaviour };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface-config-behaviour.util.mjs","names":[],"sources":["../../src/interface-config/interface-config-behaviour.util.ts"],"sourcesContent":["import type { InterfaceConfigHistoryPersistence } from './interface-config-history/interface-config-history.enum';\nimport { INTERFACE_CONFIG_DEFAULTS } from './interface-config.constant';\nimport type { InterfaceConfig } from './interface-config.dto';\n\n/**\n * What the stored settings turn on for the visitor, every absent field at its default. The keys are interface-core's\n * feature names. The settings hold no accepted file types, file size limit or survey prompt, so the reader adds them.\n */\nexport interface InterfaceConfigBehaviour {\n /** null while uploads are off */\n fileUpload: { maxFiles: number } | null;\n /** null while the survey is off */\n csat: { comment: boolean } | null;\n transcriptDownload: boolean;\n voiceCall: boolean;\n /** the stored value; interface-core calls `browser` device and `tab` session */\n persistence: InterfaceConfigHistoryPersistence;\n history: boolean;\n streaming: boolean;\n /** `supported` is the enabled list in its stored order, each tag once, with the default added when it is missing */\n languages: { default: string; supported: readonly string[] };\n}\n\nconst DEFAULTS = INTERFACE_CONFIG_DEFAULTS;\n\nexport const resolveInterfaceConfigBehaviour = (\n config: InterfaceConfig | null | undefined\n): InterfaceConfigBehaviour => {\n const { composer, end, transcript, voice, history, messages, locale } = config ?? {};\n const defaultLanguage = locale?.default ?? DEFAULTS.locale.default;\n const enabledLanguages = locale?.enabled ?? DEFAULTS.locale.enabled;\n\n return {\n fileUpload:\n (composer?.attachments?.enabled ?? DEFAULTS.composer.attachments.enabled)\n ? { maxFiles: composer?.attachments?.maxFiles ?? DEFAULTS.composer.attachments.maxFiles }\n : null,\n csat:\n (end?.survey?.enabled ?? DEFAULTS.end.survey.enabled)\n ? { comment: end?.survey?.comment ?? DEFAULTS.end.survey.comment }\n : null,\n transcriptDownload: transcript?.download ?? DEFAULTS.transcript.download,\n voiceCall: voice?.enabled ?? DEFAULTS.voice.enabled,\n persistence: history?.persistence ?? DEFAULTS.history.persistence,\n history: history?.enabled ?? DEFAULTS.history.enabled,\n streaming: messages?.streaming ?? DEFAULTS.messages.streaming,\n languages: {\n default: defaultLanguage,\n supported: Array.from(new Set([...enabledLanguages, defaultLanguage])),\n },\n };\n};\n"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"interface-config-behaviour.util.mjs","names":[],"sources":["../../src/interface-config/interface-config-behaviour.util.ts"],"sourcesContent":["import type { InterfaceConfigHistoryPersistence } from './interface-config-history/interface-config-history.enum';\nimport type { InterfaceConfigStartFirstTurn } from './interface-config-start/interface-config-start.enum';\nimport { INTERFACE_CONFIG_DEFAULTS } from './interface-config.constant';\nimport type { InterfaceConfig } from './interface-config.dto';\n\n/**\n * What the stored settings turn on for the visitor, every absent field at its default. The keys are interface-core's\n * feature names. The settings hold no accepted file types, file size limit or survey prompt, so the reader adds them.\n */\nexport interface InterfaceConfigBehaviour {\n /** null while uploads are off */\n fileUpload: { maxFiles: number } | null;\n /** null while the survey is off */\n csat: { comment: boolean } | null;\n transcriptDownload: boolean;\n voiceCall: boolean;\n /** the stored value; interface-core calls `browser` device and `tab` session */\n persistence: InterfaceConfigHistoryPersistence;\n history: boolean;\n streaming: boolean;\n /** `supported` is the enabled list in its stored order, each tag once, with the default added when it is missing */\n languages: { default: string; supported: readonly string[] };\n /** who speaks first; interface-core offers it as `firstTurn` */\n firstTurn: InterfaceConfigStartFirstTurn;\n}\n\nconst DEFAULTS = INTERFACE_CONFIG_DEFAULTS;\n\nexport const resolveInterfaceConfigBehaviour = (\n config: InterfaceConfig | null | undefined\n): InterfaceConfigBehaviour => {\n const { composer, end, transcript, voice, history, messages, locale, start } = config ?? {};\n const defaultLanguage = locale?.default ?? DEFAULTS.locale.default;\n const enabledLanguages = locale?.enabled ?? DEFAULTS.locale.enabled;\n\n return {\n fileUpload:\n (composer?.attachments?.enabled ?? DEFAULTS.composer.attachments.enabled)\n ? { maxFiles: composer?.attachments?.maxFiles ?? DEFAULTS.composer.attachments.maxFiles }\n : null,\n csat:\n (end?.survey?.enabled ?? DEFAULTS.end.survey.enabled)\n ? { comment: end?.survey?.comment ?? DEFAULTS.end.survey.comment }\n : null,\n transcriptDownload: transcript?.download ?? DEFAULTS.transcript.download,\n voiceCall: voice?.enabled ?? DEFAULTS.voice.enabled,\n persistence: history?.persistence ?? DEFAULTS.history.persistence,\n history: history?.enabled ?? DEFAULTS.history.enabled,\n streaming: messages?.streaming ?? DEFAULTS.messages.streaming,\n languages: {\n default: defaultLanguage,\n supported: Array.from(new Set([...enabledLanguages, defaultLanguage])),\n },\n firstTurn: start?.firstTurn ?? DEFAULTS.start.firstTurn,\n };\n};\n"],"mappings":";;AA0BA,MAAM,WAAW;AAEjB,MAAa,mCACX,WAC6B;CAC7B,MAAM,EAAE,UAAU,KAAK,YAAY,OAAO,SAAS,UAAU,QAAQ,UAAU,UAAU,CAAC;CAC1F,MAAM,kBAAkB,QAAQ,WAAW,SAAS,OAAO;CAC3D,MAAM,mBAAmB,QAAQ,WAAW,SAAS,OAAO;CAE5D,OAAO;EACL,YACG,UAAU,aAAa,WAAW,SAAS,SAAS,YAAY,UAC7D,EAAE,UAAU,UAAU,aAAa,YAAY,SAAS,SAAS,YAAY,SAAS,IACtF;EACN,MACG,KAAK,QAAQ,WAAW,SAAS,IAAI,OAAO,UACzC,EAAE,SAAS,KAAK,QAAQ,WAAW,SAAS,IAAI,OAAO,QAAQ,IAC/D;EACN,oBAAoB,YAAY,YAAY,SAAS,WAAW;EAChE,WAAW,OAAO,WAAW,SAAS,MAAM;EAC5C,aAAa,SAAS,eAAe,SAAS,QAAQ;EACtD,SAAS,SAAS,WAAW,SAAS,QAAQ;EAC9C,WAAW,UAAU,aAAa,SAAS,SAAS;EACpD,WAAW;GACT,SAAS;GACT,WAAW,MAAM,qBAAK,IAAI,IAAI,CAAC,GAAG,kBAAkB,eAAe,CAAC,CAAC;EACvE;EACA,WAAW,OAAO,aAAa,SAAS,MAAM;CAChD;AACF"}
|
package/build/main.d.mts
CHANGED
|
@@ -12,6 +12,7 @@ import { InterfaceConfigButton, InterfaceConfigButtonDTO, InterfaceConfigButtonI
|
|
|
12
12
|
import { INTERFACE_CONFIG_DEFAULTS, InterfaceConfigDefaults } from "./interface-config/interface-config.constant.mjs";
|
|
13
13
|
import { InterfaceConfig, InterfaceConfigDTO } from "./interface-config/interface-config.dto.mjs";
|
|
14
14
|
import { InterfaceConfigHistoryListStyle, InterfaceConfigHistoryListStyleDTO, InterfaceConfigHistoryPersistence, InterfaceConfigHistoryPersistenceDTO } from "./interface-config/interface-config-history/interface-config-history.enum.mjs";
|
|
15
|
+
import { InterfaceConfigStartFirstTurn, InterfaceConfigStartFirstTurnDTO, InterfaceConfigStartStarterDisplay, InterfaceConfigStartStarterDisplayDTO } from "./interface-config/interface-config-start/interface-config-start.enum.mjs";
|
|
15
16
|
import { InterfaceConfigBehaviour, resolveInterfaceConfigBehaviour } from "./interface-config/interface-config-behaviour.util.mjs";
|
|
16
17
|
import { INTERFACE_CONFIG_BUTTONS_DEFAULTS } from "./interface-config/interface-config-buttons/interface-config-buttons.constant.mjs";
|
|
17
18
|
import { InterfaceConfigButtonBuiltinAction, InterfaceConfigButtonBuiltinActionDTO, InterfaceConfigButtonEmphasis, InterfaceConfigButtonEmphasisDTO, InterfaceConfigButtonIconKind, InterfaceConfigButtonIconKindDTO, InterfaceConfigButtonPhase, InterfaceConfigButtonPhaseDTO, InterfaceConfigButtonSurface, InterfaceConfigButtonSurfaceDTO, InterfaceConfigButtonView, InterfaceConfigButtonViewDTO } from "./interface-config/interface-config-buttons/interface-config-buttons.enum.mjs";
|
|
@@ -56,7 +57,6 @@ import { INTERFACE_CONFIG_SOUNDS_DEFAULTS } from "./interface-config/interface-c
|
|
|
56
57
|
import { InterfaceConfigSounds, InterfaceConfigSoundsDTO } from "./interface-config/interface-config-sounds/interface-config-sounds.dto.mjs";
|
|
57
58
|
import { INTERFACE_CONFIG_START_DEFAULTS } from "./interface-config/interface-config-start/interface-config-start.constant.mjs";
|
|
58
59
|
import { InterfaceConfigStart, InterfaceConfigStartDTO, InterfaceConfigStartStarter, InterfaceConfigStartStarterDTO, InterfaceConfigStartTeaser, InterfaceConfigStartTeaserDTO, InterfaceConfigStartWelcomeBanner, InterfaceConfigStartWelcomeBannerDTO } from "./interface-config/interface-config-start/interface-config-start.dto.mjs";
|
|
59
|
-
import { InterfaceConfigStartFirstTurn, InterfaceConfigStartFirstTurnDTO, InterfaceConfigStartStarterDisplay, InterfaceConfigStartStarterDisplayDTO } from "./interface-config/interface-config-start/interface-config-start.enum.mjs";
|
|
60
60
|
import { INTERFACE_CONFIG_THEME_DEFAULTS } from "./interface-config/interface-config-theme/interface-config-theme.constant.mjs";
|
|
61
61
|
import { InterfaceConfigTheme, InterfaceConfigThemeBackground, InterfaceConfigThemeBackgroundDTO, InterfaceConfigThemeColors, InterfaceConfigThemeColorsDTO, InterfaceConfigThemeDTO, InterfaceConfigThemeDark, InterfaceConfigThemeDarkDTO, InterfaceConfigThemeFont, InterfaceConfigThemeFontDTO, InterfaceConfigThemeMotion, InterfaceConfigThemeMotionDTO, InterfaceConfigThemeRadius, InterfaceConfigThemeRadiusDTO, InterfaceConfigThemeShadow, InterfaceConfigThemeShadowDTO, InterfaceConfigThemeSize, InterfaceConfigThemeSizeDTO, InterfaceConfigThemeSpace, InterfaceConfigThemeSpaceDTO, InterfaceConfigThemeTokenColors, InterfaceConfigThemeTokenColorsDTO, InterfaceConfigThemeTokens, InterfaceConfigThemeTokensDTO } from "./interface-config/interface-config-theme/interface-config-theme.dto.mjs";
|
|
62
62
|
import { InterfaceConfigThemeBackgroundFit, InterfaceConfigThemeBackgroundFitDTO, InterfaceConfigThemeBackgroundScope, InterfaceConfigThemeBackgroundScopeDTO, InterfaceConfigThemeGlass, InterfaceConfigThemeGlassDTO, InterfaceConfigThemeMode, InterfaceConfigThemeModeDTO } from "./interface-config/interface-config-theme/interface-config-theme.enum.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voiceflow/dtos-interact",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.38.1-2ea50d4709.20+2ea50d4709",
|
|
4
4
|
"files": [
|
|
5
5
|
"build"
|
|
6
6
|
],
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"volta": {
|
|
40
40
|
"extends": "../../package.json"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "2ea50d4709dc7388b37d75d35035948363bb9f7b"
|
|
43
43
|
}
|