jsfe 1.39.0 → 1.39.1
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.
|
@@ -94,7 +94,7 @@ export function contactPrompt(cargo, options, callerAllowed, partial = false, es
|
|
|
94
94
|
}
|
|
95
95
|
const contactParams = [param('retry_flow', 'Retry destination'), param('cancel_flow', 'Exit destination'), param('cell_number', 'Phone already supplied'), param('email', 'Email already supplied'), param('acct_number', 'Account identifier already supplied'), param('account_pattern', 'Tenant account identifier pattern'), param('account_name', 'English account identifier label'), param('account_name_es', 'Spanish account identifier label'), param('account_shape', 'Tenant keypad identifier shapes', 'array'), param('intro', 'English introduction'), param('intro_es', 'Spanish introduction'), param('caller_on_file', 'yes, no or unknown caller-ID eligibility'), param('retry_call_type', 'Retry destination invocation policy'), param('validate_flow', 'Contact existence validator'), param('merge_partials', 'Allow split account identifiers', 'boolean'), param('parent_form', 'Owning task FORM instance'), param('contact_options', 'Internal options across protocol transitions', 'object'), param('retrying', 'Retry-menu continuation', 'boolean'), param('gce_partial', 'Internal split identifier continuation', 'boolean'), param('gce_rejected', 'Internal rejected contact continuation', 'boolean')];
|
|
96
96
|
const contactDefaults = { retry_flow: 'authenticate-user', cancel_flow: 'contact-support', cell_number: '', email: '', acct_number: '', account_pattern: '', account_name: '', account_name_es: '', account_shape: [], intro: '', intro_es: '', caller_on_file: '', retry_call_type: 'reboot', validate_flow: '', merge_partials: false, parent_form: '', contact_options: null, retrying: false, gce_partial: false, gce_rejected: false, contact_allowed: false, contact_prefill: '', contact_partial: false, contact_text: '', contact_digits: '', contact_mail: '', contact_phone: '', contact_id: null, contact_profiles: [], contact_keypad: null, contact_question: '', contact_question_es: '', contact_check_key: '', contact_error: '', contact_error_es: '', contact_kind: '' };
|
|
97
|
-
const contactProfiles = [{ name: 'phone', label: 'phone number', label_es: 'número de teléfono', profile: { kind: 'phone' } }, { name: 'email_address', label: 'email address', label_es: 'correo electrónico', profile: { kind: 'email' } }, { name: 'account', label: 'account number', label_es: 'número de cuenta', profile: { kind: 'identifier'
|
|
97
|
+
const contactProfiles = [{ name: 'phone', label: 'phone number', label_es: 'número de teléfono', profile: { kind: 'phone' } }, { name: 'email_address', label: 'email address', label_es: 'correo electrónico', profile: { kind: 'email' } }, { name: 'account', label: 'account number', label_es: 'número de cuenta', profile: { kind: 'identifier' } }, { ...raw, form_client: false }];
|
|
98
98
|
const contactReplay = (id, extra = {}) => call(id, 'get-cell-or-email', { contact_options: '{{contact_options}}', cell_number: '', email: '', acct_number: '', ...extra }, 'replace');
|
|
99
99
|
const contactMenu = id => call(id, 'generic-retry-with-options', { error_message: '{{contact_error}}', error_message_es: '{{contact_error_es}}', retry_flow: '{{contact_options.retry_flow}}', cancel_flow: '{{contact_options.cancel_flow}}', capture_patterns: '{{cargo.authCapture}}', retry_call_type: '{{contact_options.retry_call_type}}', parent_form: '{{contact_options.parent_form}}', contact_options: '{{contact_options}}', gce_menu: true }, 'replace');
|
|
100
100
|
export function contactError(kind, options, es = false) {
|
|
@@ -119,7 +119,7 @@ const contact = worker('get-cell-or-email', 'GetCellOrEmail', 'Identify a suppli
|
|
|
119
119
|
// account is needed) leads the verification code question instead (otpPrompt). A spoken question said it (or had none).
|
|
120
120
|
effect('identity_contact_intro_unsaid', "(!contact_prefill ? (cargo.otpIntro='',cargo.otpIntro_es='') : contact_options.intro && !cargo.contactIntroSkip && !contact_options.fromMenu ? (cargo.otpIntro=String(contact_options.intro),cargo.otpIntro_es=String(contact_options.intro_es || contact_options.intro)) : true,true)"),
|
|
121
121
|
effect('identity_contact_preselected', "(acct_number || cell_number || email ? true : (cargo.callerPreselected=!!(contact_prefill && contact_options.caller_on_file === 'yes')),true)"),
|
|
122
|
-
set('identity_contact_profiles', 'contact_profiles', "contact_profiles_base.map(function (field) {return field.name === 'account' ? Object.assign({},field,{profile:{kind:'identifier',pattern:contact_options.account_pattern
|
|
122
|
+
set('identity_contact_profiles', 'contact_profiles', "contact_profiles_base.filter(function (field) {return field.name !== 'account' || !!contact_options.account_pattern;}).map(function (field) {return field.name === 'account' ? Object.assign({},field,{profile:{kind:'identifier',pattern:contact_options.account_pattern}}) : field;}).concat(contact_allowed ? [{name:'caller_decision',label:'caller ID choice',label_es:'opción del identificador de llamadas',profile:{kind:'choice',choices:[{key:'yes',phrases:['1','yes','si','sí'],exact:true},{key:'no',phrases:['no','nope','nah'],exact:true}]}}] : [])"),
|
|
123
123
|
set('identity_contact_keypad', 'contact_keypad', "(function () {var shapes=[{first:'23456789',lengths:[10]},{first:'1',lengths:[11]}].concat(contact_options.account_shape || []);if(contact_partial){var left=[];(contact_options.account_shape || []).forEach(function(s){(s.lengths || []).forEach(function(n){var rest=n-String(cargo.gcePartial).length;if(rest>0 && left.indexOf(rest)<0)left.push(rest);});});return {min:1,max:12,autoSubmitMs:3000,complete:[{first:'0123456789',lengths:left.sort(function(a,b){return a-b;})}]};}return {min:7,max:12,autoSubmitMs:3000,autoSubmitChars:contact_allowed?['1']:[],complete:shapes};})()"),
|
|
124
124
|
set('identity_contact_question', 'contact_question', expression(contactPrompt, 'cargo', 'contact_options', 'contact_allowed', 'contact_partial')),
|
|
125
125
|
set('identity_contact_question_es', 'contact_question_es', expression(contactPrompt, 'cargo', 'contact_options', 'contact_allowed', 'contact_partial', 'true')),
|
package/dist/runtime-identity.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const JSFE_RUNTIME_FINGERPRINT = "sha256:
|
|
1
|
+
export const JSFE_RUNTIME_FINGERPRINT = "sha256:a953832e13337486b1aa6d9ea0eef7279c549109af33081d13f92e5265e48e20";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsfe",
|
|
3
|
-
"version": "1.39.
|
|
3
|
+
"version": "1.39.1",
|
|
4
4
|
"description": "TypeScript workflow engine for conversational/automation apps: multi-flow orchestration, interrupt/resume, stack-based control, robust errors, and flexible tool/REST integration.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ron Pinkas",
|