message: bug: Fix Alexa DialogMode build/reverse build
diff: @@ -49,19 +49,23 @@ class AlexaInteractionModel {
  let inputs = [];
  if (intent.slots) {
  for (let slot of intent.slots) {
  - if (_.startsWith(slot.type, BUILTIN_PREFIX)) {
  - inputs.push({
  + let input = {
  name: slot.name,
  - type: {
  + };
  + if (_.startsWith(slot.type, BUILTIN_PREFIX)) {
  + input.type = {
  alexa: slot.type,
  - },
  - });
  + };
  } else {
  - inputs.push({
  - name: slot.name,
  - type: slot.type,
  - });
  + input.type = slot.type;
  + }
  +
  + if (slot.samples) {
  + input.alexa = {
  + samples: slot.samples,
  + };
  }
  + inputs.push(input);
  }
  jovoIntent.inputs = inputs;
  }
  @@ -237,6 +241,9 @@ class AlexaInteractionModel {
  }
  }
  }
  + if (_.get(input, 'alexa')) {
  + _.merge(alexaInputObj, input.alexa);
  + }
  alexaIntentObj.slots.push(alexaInputObj);
  }
  }
  